@modern-js/module-tools 2.0.0-beta.2 → 2.0.0-beta.4
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/CHANGELOG.md +276 -205
- package/bin/modern.js +7 -1
- package/compiled/@babel/code-frame/index.d.ts +1 -0
- package/compiled/@babel/code-frame/index.js +1 -0
- package/compiled/@babel/code-frame/license +22 -0
- package/compiled/@babel/code-frame/package.json +1 -0
- package/compiled/@babel/generator/index.d.ts +1 -0
- package/compiled/@babel/generator/index.js +1 -0
- package/compiled/@babel/generator/license +22 -0
- package/compiled/@babel/generator/package.json +1 -0
- package/compiled/@babel/helper-validator-identifier/index.d.ts +1 -0
- package/compiled/@babel/helper-validator-identifier/index.js +1 -0
- package/compiled/@babel/helper-validator-identifier/license +22 -0
- package/compiled/@babel/helper-validator-identifier/package.json +1 -0
- package/compiled/@babel/highlight/index.d.ts +1 -0
- package/compiled/@babel/highlight/index.js +1 -0
- package/compiled/@babel/highlight/license +22 -0
- package/compiled/@babel/highlight/package.json +1 -0
- package/compiled/@babel/parser/@babel/types/lib/index-legacy.d.ts +2742 -0
- package/compiled/@babel/parser/index.js +1 -0
- package/compiled/@babel/parser/license +19 -0
- package/compiled/@babel/parser/package.json +1 -0
- package/compiled/@babel/parser/typings/babel-parser.d.ts +214 -0
- package/compiled/@babel/template/index.d.ts +1 -0
- package/compiled/@babel/template/index.js +1 -0
- package/compiled/@babel/template/license +22 -0
- package/compiled/@babel/template/package.json +1 -0
- package/compiled/@babel/traverse/index.d.ts +1199 -0
- package/compiled/@babel/traverse/index.js +1 -0
- package/compiled/@babel/traverse/license +22 -0
- package/compiled/@babel/traverse/package.json +1 -0
- package/compiled/@babel/types/index.js +1 -0
- package/compiled/@babel/types/lib/index-legacy.d.ts +2732 -0
- package/compiled/@babel/types/license +22 -0
- package/compiled/@babel/types/package.json +1 -0
- package/compiled/@rollup/plugin-json/@rollup/pluginutils/types/index.d.ts +86 -0
- package/compiled/@rollup/plugin-json/estree/index.d.ts +548 -0
- package/compiled/@rollup/plugin-json/index.js +1 -0
- package/compiled/@rollup/plugin-json/license +21 -0
- package/compiled/@rollup/plugin-json/package.json +1 -0
- package/compiled/@rollup/plugin-json/rollup/dist/rollup.d.ts +948 -0
- package/compiled/@rollup/plugin-json/types/index.d.ts +41 -0
- package/compiled/find-up/index.d.ts +138 -0
- package/compiled/find-up/index.js +1 -0
- package/compiled/find-up/license +9 -0
- package/compiled/find-up/locate-path/index.d.ts +83 -0
- package/compiled/find-up/package.json +1 -0
- package/compiled/less/index.d.ts +282 -0
- package/compiled/less/index.js +1 -0
- package/compiled/less/package.json +1 -0
- package/compiled/normalize-path/index.d.ts +8 -0
- package/compiled/normalize-path/index.js +8 -0
- package/compiled/normalize-path/license +21 -0
- package/compiled/normalize-path/package.json +1 -0
- package/compiled/p-map/@szmarczak/http-timer/dist/source/index.d.ts +32 -0
- package/compiled/p-map/cacheable-lookup/index.d.ts +139 -0
- package/compiled/p-map/cacheable-request/index.d.ts +137 -0
- package/compiled/p-map/got/dist/source/as-promise/index.d.ts +3 -0
- package/compiled/p-map/got/dist/source/as-promise/types.d.ts +256 -0
- package/compiled/p-map/got/dist/source/core/index.d.ts +1124 -0
- package/compiled/p-map/got/dist/source/core/utils/dns-ip-version.d.ts +5 -0
- package/compiled/p-map/got/dist/source/core/utils/options-to-url.d.ts +14 -0
- package/compiled/p-map/got/dist/source/core/utils/timed-out.d.ts +29 -0
- package/compiled/p-map/got/dist/source/index.d.ts +4 -0
- package/compiled/p-map/got/dist/source/types.d.ts +344 -0
- package/compiled/p-map/http-cache-semantics/index.d.ts +170 -0
- package/compiled/p-map/index.d.ts +67 -0
- package/compiled/p-map/index.js +1 -0
- package/compiled/p-map/keyv/src/index.d.ts +104 -0
- package/compiled/p-map/license +9 -0
- package/compiled/p-map/p-cancelable/index.d.ts +176 -0
- package/compiled/p-map/package.json +1 -0
- package/compiled/p-map/responselike/index.d.ts +34 -0
- package/compiled/postcss-custom-properties/index.d.ts +1 -0
- package/compiled/postcss-custom-properties/index.js +1 -0
- package/compiled/postcss-custom-properties/package.json +1 -0
- package/compiled/postcss-flexbugs-fixes/index.d.ts +1 -0
- package/compiled/postcss-flexbugs-fixes/index.js +1 -0
- package/compiled/postcss-flexbugs-fixes/license +20 -0
- package/compiled/postcss-flexbugs-fixes/package.json +1 -0
- package/compiled/postcss-font-variant/index.d.ts +1 -0
- package/compiled/postcss-font-variant/index.js +1 -0
- package/compiled/postcss-font-variant/license +20 -0
- package/compiled/postcss-font-variant/package.json +1 -0
- package/compiled/postcss-initial/index.d.ts +1 -0
- package/compiled/postcss-initial/index.js +1 -0
- package/compiled/postcss-initial/license +20 -0
- package/compiled/postcss-initial/package.json +1 -0
- package/compiled/postcss-media-minmax/index.d.ts +1 -0
- package/compiled/postcss-media-minmax/index.js +1 -0
- package/compiled/postcss-media-minmax/license +22 -0
- package/compiled/postcss-media-minmax/package.json +1 -0
- package/compiled/postcss-nesting/index.d.ts +1 -0
- package/compiled/postcss-nesting/index.js +2 -0
- package/compiled/postcss-nesting/package.json +1 -0
- package/compiled/postcss-page-break/index.d.ts +1 -0
- package/compiled/postcss-page-break/index.js +1 -0
- package/compiled/postcss-page-break/license +20 -0
- package/compiled/postcss-page-break/package.json +1 -0
- package/compiled/postcss-value-parser/index.d.ts +1 -0
- package/compiled/postcss-value-parser/index.js +1 -0
- package/compiled/postcss-value-parser/license +22 -0
- package/compiled/postcss-value-parser/package.json +1 -0
- package/compiled/rollup/fsevents.node +0 -0
- package/compiled/rollup/index.js +82 -0
- package/compiled/rollup/package.json +1 -0
- package/compiled/rollup/types/rollup.d.ts +948 -0
- package/compiled/rollup-plugin-dts/dist/rollup-plugin-dts.d.ts +21 -0
- package/compiled/rollup-plugin-dts/index.js +1 -0
- package/compiled/rollup-plugin-dts/package.json +1 -0
- package/compiled/rollup-plugin-dts/rollup/dist/rollup.d.ts +948 -0
- package/compiled/sass/index.js +1 -0
- package/compiled/sass/license +1619 -0
- package/compiled/sass/package.json +1 -0
- package/compiled/sass/types/compile.d.ts +152 -0
- package/compiled/sass/types/exception.d.ts +41 -0
- package/compiled/sass/types/importer.d.ts +294 -0
- package/compiled/sass/types/index.d.ts +80 -0
- package/compiled/sass/types/legacy/exception.d.ts +54 -0
- package/compiled/sass/types/legacy/function.d.ts +756 -0
- package/compiled/sass/types/legacy/importer.d.ts +168 -0
- package/compiled/sass/types/legacy/options.d.ts +642 -0
- package/compiled/sass/types/legacy/plugin_this.d.ts +73 -0
- package/compiled/sass/types/legacy/render.d.ts +139 -0
- package/compiled/sass/types/logger/index.d.ts +94 -0
- package/compiled/sass/types/logger/source_location.d.ts +21 -0
- package/compiled/sass/types/logger/source_span.d.ts +34 -0
- package/compiled/sass/types/options.d.ts +435 -0
- package/compiled/sass/types/util/promise_or.d.ts +17 -0
- package/compiled/sass/types/value/argument_list.d.ts +47 -0
- package/compiled/sass/types/value/boolean.d.ts +29 -0
- package/compiled/sass/types/value/color.d.ts +107 -0
- package/compiled/sass/types/value/function.d.ts +22 -0
- package/compiled/sass/types/value/index.d.ts +173 -0
- package/compiled/sass/types/value/list.d.ts +54 -0
- package/compiled/sass/types/value/map.d.ts +41 -0
- package/compiled/sass/types/value/number.d.ts +305 -0
- package/compiled/sass/types/value/string.d.ts +84 -0
- package/compiled/signal-exit/index.d.ts +24 -0
- package/compiled/signal-exit/index.js +1 -0
- package/compiled/signal-exit/package.json +1 -0
- package/dist/builder/build.d.ts +23 -0
- package/dist/builder/build.js +265 -0
- package/dist/builder/build.js.map +1 -0
- package/dist/builder/clear.d.ts +3 -0
- package/dist/builder/clear.js +74 -0
- package/dist/builder/clear.js.map +1 -0
- package/dist/builder/copy.d.ts +9 -0
- package/dist/builder/copy.js +207 -0
- package/dist/builder/copy.js.map +1 -0
- package/dist/builder/dts/index.d.ts +2 -0
- package/dist/builder/dts/index.js +27 -0
- package/dist/builder/dts/index.js.map +1 -0
- package/dist/builder/dts/rollup.d.ts +17 -0
- package/dist/builder/dts/rollup.js +180 -0
- package/dist/builder/dts/rollup.js.map +1 -0
- package/dist/builder/dts/tsc.d.ts +3 -0
- package/dist/builder/dts/tsc.js +160 -0
- package/dist/builder/dts/tsc.js.map +1 -0
- package/dist/builder/index.d.ts +8 -0
- package/dist/builder/index.js +124 -0
- package/dist/builder/index.js.map +1 -0
- package/dist/builder/platform.d.ts +4 -0
- package/dist/builder/platform.js +140 -0
- package/dist/builder/platform.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +103 -0
- package/dist/cli.js.map +1 -0
- package/dist/command.d.ts +7 -0
- package/dist/command.js +169 -0
- package/dist/command.js.map +1 -0
- package/dist/config/defineConfig.d.ts +2 -0
- package/dist/config/defineConfig.js +25 -0
- package/dist/config/defineConfig.js.map +1 -0
- package/dist/config/normalize.d.ts +17 -0
- package/dist/config/normalize.js +177 -0
- package/dist/config/normalize.js.map +1 -0
- package/dist/config/schema.d.ts +641 -0
- package/dist/config/schema.js +207 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/constants/build-presets.d.ts +81 -0
- package/dist/constants/build-presets.js +219 -0
- package/dist/constants/build-presets.js.map +1 -0
- package/dist/constants/build.d.ts +5 -0
- package/dist/constants/build.js +71 -0
- package/dist/constants/build.js.map +1 -0
- package/dist/constants/colors.d.ts +4 -0
- package/dist/constants/colors.js +29 -0
- package/dist/constants/colors.js.map +1 -0
- package/dist/constants/dts.d.ts +4 -0
- package/dist/constants/dts.js +45 -0
- package/dist/constants/dts.js.map +1 -0
- package/dist/constants/file.d.ts +3 -0
- package/dist/constants/file.js +29 -0
- package/dist/constants/file.js.map +1 -0
- package/dist/constants/legacy-build-presets.d.ts +13 -0
- package/dist/constants/legacy-build-presets.js +189 -0
- package/dist/constants/legacy-build-presets.js.map +1 -0
- package/dist/constants/log.d.ts +8 -0
- package/dist/constants/log.js +36 -0
- package/dist/constants/log.js.map +1 -0
- package/dist/dev.d.ts +10 -0
- package/dist/dev.js +135 -0
- package/dist/dev.js.map +1 -0
- package/dist/{types/features/build/error.d.ts → error.d.ts} +1 -1
- package/dist/error.js +139 -0
- package/dist/error.js.map +1 -0
- package/dist/hooks/build.d.ts +22 -0
- package/dist/hooks/build.js +35 -0
- package/dist/hooks/build.js.map +1 -0
- package/dist/hooks/dev.d.ts +12 -0
- package/dist/hooks/dev.js +33 -0
- package/dist/hooks/dev.js.map +1 -0
- package/dist/hooks/index.d.ts +29 -0
- package/dist/hooks/index.js +44 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/misc.d.ts +5 -0
- package/dist/hooks/misc.js +29 -0
- package/dist/hooks/misc.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/{types/locale → locale}/en.d.ts +0 -0
- package/dist/locale/en.js +47 -0
- package/dist/locale/en.js.map +1 -0
- package/dist/{types/locale → locale}/index.d.ts +0 -0
- package/dist/locale/index.js +34 -0
- package/dist/locale/index.js.map +1 -0
- package/dist/{types/locale → locale}/zh.d.ts +0 -0
- package/dist/locale/zh.js +47 -0
- package/dist/locale/zh.js.map +1 -0
- package/dist/plugins.d.ts +2 -0
- package/dist/plugins.js +51 -0
- package/dist/plugins.js.map +1 -0
- package/dist/types/color.d.ts +1 -0
- package/dist/{js/modern/features/build/types.js → types/color.js} +0 -0
- package/dist/types/command.d.ts +11 -0
- package/dist/{js/modern/schema/types.js → types/command.js} +0 -0
- package/dist/types/config/index.d.ts +95 -0
- package/dist/types/config/index.js +19 -0
- package/dist/types/config/index.js.map +1 -0
- package/dist/types/config/style.d.ts +12 -0
- package/dist/{js/modern/types.js → types/config/style.js} +0 -0
- package/dist/types/context.d.ts +5 -0
- package/dist/{js/node/features/build/types.js → types/context.js} +0 -0
- package/dist/types/copy.d.ts +15 -0
- package/dist/{js/node/schema/types.js → types/copy.js} +0 -0
- package/dist/types/{utils/tsconfig.d.ts → dts.d.ts} +11 -3
- package/dist/{js/node/types.js → types/dts.js} +0 -0
- package/dist/types/hooks.d.ts +25 -0
- package/dist/types/hooks.js +0 -0
- package/dist/types/index.d.ts +17 -6
- package/dist/types/index.js +23 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/utils.d.ts +7 -0
- package/dist/types/utils.js +0 -0
- package/dist/utils/builder.d.ts +8 -0
- package/dist/utils/builder.js +117 -0
- package/dist/utils/builder.js.map +1 -0
- package/dist/utils/config.d.ts +6 -0
- package/dist/utils/config.js +172 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/context.d.ts +7 -0
- package/dist/utils/context.js +68 -0
- package/dist/utils/context.js.map +1 -0
- package/dist/utils/dts.d.ts +14 -0
- package/dist/utils/dts.js +197 -0
- package/dist/utils/dts.js.map +1 -0
- package/dist/utils/input.d.ts +16 -0
- package/dist/utils/input.js +124 -0
- package/dist/utils/input.js.map +1 -0
- package/dist/utils/language.d.ts +2 -0
- package/dist/utils/language.js +75 -0
- package/dist/utils/language.js.map +1 -0
- package/dist/utils/libuild-plugins.d.ts +6 -0
- package/dist/utils/libuild-plugins.js +90 -0
- package/dist/utils/libuild-plugins.js.map +1 -0
- package/dist/utils/log.d.ts +2 -0
- package/dist/utils/log.js +76 -0
- package/dist/utils/log.js.map +1 -0
- package/dist/utils/onExit.d.ts +1 -0
- package/dist/utils/onExit.js +71 -0
- package/dist/utils/onExit.js.map +1 -0
- package/dist/utils/path.d.ts +1 -0
- package/dist/utils/path.js +73 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/style.d.ts +31 -0
- package/dist/utils/style.js +134 -0
- package/dist/utils/style.js.map +1 -0
- package/dist/{types/utils/tspaths-transform/index.d.ts → utils/tspaths-transform.d.ts} +0 -0
- package/dist/utils/tspaths-transform.js +115 -0
- package/dist/utils/tspaths-transform.js.map +1 -0
- package/package.json +47 -73
- package/dist/js/modern/cli/build.js +0 -11
- package/dist/js/modern/cli/dev.js +0 -11
- package/dist/js/modern/cli/index.js +0 -3
- package/dist/js/modern/cli/new.js +0 -13
- package/dist/js/modern/commands/build.js +0 -69
- package/dist/js/modern/commands/dev.js +0 -43
- package/dist/js/modern/commands/index.js +0 -2
- package/dist/js/modern/features/build/build-platform.js +0 -69
- package/dist/js/modern/features/build/bundle/index.js +0 -9
- package/dist/js/modern/features/build/bundle/runRollup.js +0 -136
- package/dist/js/modern/features/build/bundle/runSpeedy.js +0 -176
- package/dist/js/modern/features/build/bundleless/copy-assets.js +0 -75
- package/dist/js/modern/features/build/bundleless/generator-dts/index.js +0 -106
- package/dist/js/modern/features/build/bundleless/generator-dts/utils.js +0 -94
- package/dist/js/modern/features/build/bundleless/index.js +0 -21
- package/dist/js/modern/features/build/bundleless/runBabel.js +0 -242
- package/dist/js/modern/features/build/bundleless/style.js +0 -241
- package/dist/js/modern/features/build/constants.js +0 -98
- package/dist/js/modern/features/build/error.js +0 -127
- package/dist/js/modern/features/build/index.js +0 -117
- package/dist/js/modern/features/build/legacy-constants.js +0 -103
- package/dist/js/modern/features/build/logger/index.js +0 -2
- package/dist/js/modern/features/build/logger/logText.js +0 -56
- package/dist/js/modern/features/build/logger/loggerManager.js +0 -93
- package/dist/js/modern/features/build/normalize.js +0 -277
- package/dist/js/modern/features/build/utils.js +0 -92
- package/dist/js/modern/features/dev/index.js +0 -47
- package/dist/js/modern/hooks/build.js +0 -20
- package/dist/js/modern/hooks/dev.js +0 -14
- package/dist/js/modern/hooks/index.js +0 -15
- package/dist/js/modern/index.js +0 -63
- package/dist/js/modern/locale/en.js +0 -25
- package/dist/js/modern/locale/index.js +0 -10
- package/dist/js/modern/locale/zh.js +0 -25
- package/dist/js/modern/schema/build-config.js +0 -117
- package/dist/js/modern/schema/index.js +0 -4
- package/dist/js/modern/schema/output.js +0 -45
- package/dist/js/modern/schema/source.js +0 -7
- package/dist/js/modern/schema/tools.js +0 -6
- package/dist/js/modern/utils/babel.js +0 -84
- package/dist/js/modern/utils/color.js +0 -2
- package/dist/js/modern/utils/constants.js +0 -3
- package/dist/js/modern/utils/copy.js +0 -70
- package/dist/js/modern/utils/init-env.js +0 -13
- package/dist/js/modern/utils/json.js +0 -13
- package/dist/js/modern/utils/language.js +0 -6
- package/dist/js/modern/utils/logger.js +0 -96
- package/dist/js/modern/utils/readline.js +0 -17
- package/dist/js/modern/utils/tsconfig.js +0 -13
- package/dist/js/modern/utils/tspaths-transform/constants.js +0 -5
- package/dist/js/modern/utils/tspaths-transform/index.js +0 -113
- package/dist/js/modern/utils/tspaths-transform/utils.js +0 -18
- package/dist/js/modern/utils/valide.js +0 -26
- package/dist/js/node/cli/build.js +0 -18
- package/dist/js/node/cli/dev.js +0 -18
- package/dist/js/node/cli/index.js +0 -38
- package/dist/js/node/cli/new.js +0 -20
- package/dist/js/node/commands/build.js +0 -80
- package/dist/js/node/commands/dev.js +0 -52
- package/dist/js/node/commands/index.js +0 -19
- package/dist/js/node/features/build/build-platform.js +0 -76
- package/dist/js/node/features/build/bundle/index.js +0 -17
- package/dist/js/node/features/build/bundle/runRollup.js +0 -145
- package/dist/js/node/features/build/bundle/runSpeedy.js +0 -186
- package/dist/js/node/features/build/bundleless/copy-assets.js +0 -84
- package/dist/js/node/features/build/bundleless/generator-dts/index.js +0 -114
- package/dist/js/node/features/build/bundleless/generator-dts/utils.js +0 -105
- package/dist/js/node/features/build/bundleless/index.js +0 -29
- package/dist/js/node/features/build/bundleless/runBabel.js +0 -255
- package/dist/js/node/features/build/bundleless/style.js +0 -254
- package/dist/js/node/features/build/constants.js +0 -116
- package/dist/js/node/features/build/error.js +0 -139
- package/dist/js/node/features/build/index.js +0 -128
- package/dist/js/node/features/build/legacy-constants.js +0 -111
- package/dist/js/node/features/build/logger/index.js +0 -27
- package/dist/js/node/features/build/logger/logText.js +0 -66
- package/dist/js/node/features/build/logger/loggerManager.js +0 -95
- package/dist/js/node/features/build/normalize.js +0 -288
- package/dist/js/node/features/build/utils.js +0 -107
- package/dist/js/node/features/dev/index.js +0 -56
- package/dist/js/node/hooks/build.js +0 -32
- package/dist/js/node/hooks/dev.js +0 -24
- package/dist/js/node/hooks/index.js +0 -36
- package/dist/js/node/index.js +0 -83
- package/dist/js/node/locale/en.js +0 -32
- package/dist/js/node/locale/index.js +0 -17
- package/dist/js/node/locale/zh.js +0 -32
- package/dist/js/node/schema/build-config.js +0 -126
- package/dist/js/node/schema/index.js +0 -11
- package/dist/js/node/schema/output.js +0 -52
- package/dist/js/node/schema/source.js +0 -14
- package/dist/js/node/schema/tools.js +0 -13
- package/dist/js/node/utils/babel.js +0 -93
- package/dist/js/node/utils/color.js +0 -9
- package/dist/js/node/utils/constants.js +0 -11
- package/dist/js/node/utils/copy.js +0 -79
- package/dist/js/node/utils/init-env.js +0 -20
- package/dist/js/node/utils/json.js +0 -20
- package/dist/js/node/utils/language.js +0 -12
- package/dist/js/node/utils/logger.js +0 -107
- package/dist/js/node/utils/readline.js +0 -25
- package/dist/js/node/utils/tsconfig.js +0 -21
- package/dist/js/node/utils/tspaths-transform/constants.js +0 -12
- package/dist/js/node/utils/tspaths-transform/index.js +0 -123
- package/dist/js/node/utils/tspaths-transform/utils.js +0 -25
- package/dist/js/node/utils/valide.js +0 -34
- package/dist/types/cli/build.d.ts +0 -3
- package/dist/types/cli/dev.d.ts +0 -3
- package/dist/types/cli/index.d.ts +0 -3
- package/dist/types/cli/new.d.ts +0 -2
- package/dist/types/commands/build.d.ts +0 -17
- package/dist/types/commands/dev.d.ts +0 -5
- package/dist/types/commands/index.d.ts +0 -2
- package/dist/types/features/build/build-platform.d.ts +0 -7
- package/dist/types/features/build/bundle/index.d.ts +0 -3
- package/dist/types/features/build/bundle/runRollup.d.ts +0 -3
- package/dist/types/features/build/bundle/runSpeedy.d.ts +0 -10
- package/dist/types/features/build/bundleless/copy-assets.d.ts +0 -3
- package/dist/types/features/build/bundleless/generator-dts/index.d.ts +0 -3
- package/dist/types/features/build/bundleless/generator-dts/utils.d.ts +0 -21
- package/dist/types/features/build/bundleless/index.d.ts +0 -4
- package/dist/types/features/build/bundleless/runBabel.d.ts +0 -32
- package/dist/types/features/build/bundleless/style.d.ts +0 -25
- package/dist/types/features/build/constants.d.ts +0 -18
- package/dist/types/features/build/index.d.ts +0 -12
- package/dist/types/features/build/legacy-constants.d.ts +0 -8
- package/dist/types/features/build/logger/index.d.ts +0 -2
- package/dist/types/features/build/logger/logText.d.ts +0 -39
- package/dist/types/features/build/logger/loggerManager.d.ts +0 -40
- package/dist/types/features/build/normalize.d.ts +0 -19
- package/dist/types/features/build/types.d.ts +0 -15
- package/dist/types/features/build/utils.d.ts +0 -36
- package/dist/types/features/dev/index.d.ts +0 -9
- package/dist/types/hooks/build.d.ts +0 -46
- package/dist/types/hooks/dev.d.ts +0 -20
- package/dist/types/hooks/index.d.ts +0 -30
- package/dist/types/schema/build-config.d.ts +0 -205
- package/dist/types/schema/index.d.ts +0 -217
- package/dist/types/schema/output.d.ts +0 -215
- package/dist/types/schema/source.d.ts +0 -6
- package/dist/types/schema/tools.d.ts +0 -6
- package/dist/types/schema/types.d.ts +0 -45
- package/dist/types/types.d.ts +0 -51
- package/dist/types/utils/babel.d.ts +0 -8
- package/dist/types/utils/color.d.ts +0 -2
- package/dist/types/utils/constants.d.ts +0 -2
- package/dist/types/utils/copy.d.ts +0 -5
- package/dist/types/utils/init-env.d.ts +0 -21
- package/dist/types/utils/json.d.ts +0 -4
- package/dist/types/utils/language.d.ts +0 -1
- package/dist/types/utils/logger.d.ts +0 -58
- package/dist/types/utils/readline.d.ts +0 -9
- package/dist/types/utils/tspaths-transform/constants.d.ts +0 -1
- package/dist/types/utils/tspaths-transform/utils.d.ts +0 -4
- package/dist/types/utils/valide.d.ts +0 -12
- package/types.d.ts +0 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
(()=>{var e={249:(e,t,i)=>{"use strict";if(process.platform!=="darwin"){throw new Error(`Module 'fsevents' is not compatible with platform '${process.platform}'`)}const s=i(653);const n=s.constants;function watch(e,t,i){if(typeof e!=="string"){throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof e}`)}if("function"===typeof t&&"undefined"===typeof i){i=t;t=s.flags.SinceNow}if(typeof t!=="number"){throw new TypeError(`fsevents argument 2 must be a number and not a ${typeof t}`)}if(typeof i!=="function"){throw new TypeError(`fsevents argument 3 must be a function and not a ${typeof i}`)}let n=s.start(s.global,e,t,i);if(!n)throw new Error(`could not watch: ${e}`);return()=>{const e=n?Promise.resolve(n).then(s.stop):Promise.resolve(undefined);n=undefined;return e}}function getInfo(e,t){return{path:e,flags:t,event:getEventType(t),type:getFileType(t),changes:getFileChanges(t)}}function getFileType(e){if(n.ItemIsFile&e)return"file";if(n.ItemIsDir&e)return"directory";if(n.ItemIsSymlink&e)return"symlink"}function anyIsTrue(e){for(let t in e){if(e[t])return true}return false}function getEventType(e){if(n.ItemRemoved&e)return"deleted";if(n.ItemRenamed&e)return"moved";if(n.ItemCreated&e)return"created";if(n.ItemModified&e)return"modified";if(n.RootChanged&e)return"root-changed";if(n.ItemCloned&e)return"cloned";if(anyIsTrue(e))return"modified";return"unknown"}function getFileChanges(e){return{inode:!!(n.ItemInodeMetaMod&e),finder:!!(n.ItemFinderInfoMod&e),access:!!(n.ItemChangeOwner&e),xattrs:!!(n.ItemXattrMod&e)}}t.watch=watch;t.getInfo=getInfo;t.constants=n},695:(e,t,i)=>{"use strict";
|
|
2
|
+
/*
|
|
3
|
+
@license
|
|
4
|
+
Rollup.js v2.79.0
|
|
5
|
+
Wed, 31 Aug 2022 04:52:13 GMT - commit 8477f8ff1fe80086556021542b22942ad27a0a69
|
|
6
|
+
|
|
7
|
+
https://github.com/rollup/rollup
|
|
8
|
+
|
|
9
|
+
Released under the MIT License.
|
|
10
|
+
*/Object.defineProperties(t,{__esModule:{value:true},[Symbol.toStringTag]:{value:"Module"}});const s=i(17);i(822);i(282);i(74);i(113);i(147);i(361);t.VERSION=s.version;t.defineConfig=s.defineConfig;t.rollup=s.rollup;t.watch=s.watch},227:(e,t,i)=>{"use strict";
|
|
11
|
+
/*
|
|
12
|
+
@license
|
|
13
|
+
Rollup.js v2.79.0
|
|
14
|
+
Wed, 31 Aug 2022 04:52:13 GMT - commit 8477f8ff1fe80086556021542b22942ad27a0a69
|
|
15
|
+
|
|
16
|
+
https://github.com/rollup/rollup
|
|
17
|
+
|
|
18
|
+
Released under the MIT License.
|
|
19
|
+
*/const s=i(17);const n=i(147);const r=i(837);const o=i(781);const l=i(822);const c=i(37);const u=i(361);var h={};const d=n;const{Readable:p}=o;const f=l;const{promisify:m}=r;const g=s.picomatch.exports;const y=m(d.readdir);const E=m(d.stat);const x=m(d.lstat);const v=m(d.realpath);const b="!";const S="READDIRP_RECURSIVE_ERROR";const A=new Set(["ENOENT","EPERM","EACCES","ELOOP",S]);const w="files";const I="directories";const C="files_directories";const k="all";const _=[w,I,C,k];const isNormalFlowError=e=>A.has(e.code);const[P,N]=process.versions.node.split(".").slice(0,2).map((e=>Number.parseInt(e,10)));const R=process.platform==="win32"&&(P>10||P===10&&N>=5);const normalizeFilter=e=>{if(e===undefined)return;if(typeof e==="function")return e;if(typeof e==="string"){const t=g(e.trim());return e=>t(e.basename)}if(Array.isArray(e)){const t=[];const i=[];for(const s of e){const e=s.trim();if(e.charAt(0)===b){i.push(g(e.slice(1)))}else{t.push(g(e))}}if(i.length>0){if(t.length>0){return e=>t.some((t=>t(e.basename)))&&!i.some((t=>t(e.basename)))}return e=>!i.some((t=>t(e.basename)))}return e=>t.some((t=>t(e.basename)))}};class ReaddirpStream extends p{static get defaultOptions(){return{root:".",fileFilter:e=>true,directoryFilter:e=>true,type:w,lstat:false,depth:2147483648,alwaysStat:false}}constructor(e={}){super({objectMode:true,autoDestroy:true,highWaterMark:e.highWaterMark||4096});const t={...ReaddirpStream.defaultOptions,...e};const{root:i,type:s}=t;this._fileFilter=normalizeFilter(t.fileFilter);this._directoryFilter=normalizeFilter(t.directoryFilter);const n=t.lstat?x:E;if(R){this._stat=e=>n(e,{bigint:true})}else{this._stat=n}this._maxDepth=t.depth;this._wantsDir=[I,C,k].includes(s);this._wantsFile=[w,C,k].includes(s);this._wantsEverything=s===k;this._root=f.resolve(i);this._isDirent="Dirent"in d&&!t.alwaysStat;this._statsProp=this._isDirent?"dirent":"stats";this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent};this.parents=[this._exploreDir(i,1)];this.reading=false;this.parent=undefined}async _read(e){if(this.reading)return;this.reading=true;try{while(!this.destroyed&&e>0){const{path:t,depth:i,files:s=[]}=this.parent||{};if(s.length>0){const n=s.splice(0,e).map((e=>this._formatEntry(e,t)));for(const t of await Promise.all(n)){if(this.destroyed)return;const s=await this._getEntryType(t);if(s==="directory"&&this._directoryFilter(t)){if(i<=this._maxDepth){this.parents.push(this._exploreDir(t.fullPath,i+1))}if(this._wantsDir){this.push(t);e--}}else if((s==="file"||this._includeAsFile(t))&&this._fileFilter(t)){if(this._wantsFile){this.push(t);e--}}}}else{const e=this.parents.pop();if(!e){this.push(null);break}this.parent=await e;if(this.destroyed)return}}}catch(e){this.destroy(e)}finally{this.reading=false}}async _exploreDir(e,t){let i;try{i=await y(e,this._rdOptions)}catch(e){this._onError(e)}return{files:i,depth:t,path:e}}async _formatEntry(e,t){let i;try{const s=this._isDirent?e.name:e;const n=f.resolve(f.join(t,s));i={path:f.relative(this._root,n),fullPath:n,basename:s};i[this._statsProp]=this._isDirent?e:await this._stat(n)}catch(e){this._onError(e)}return i}_onError(e){if(isNormalFlowError(e)&&!this.destroyed){this.emit("warn",e)}else{this.destroy(e)}}async _getEntryType(e){const t=e&&e[this._statsProp];if(!t){return}if(t.isFile()){return"file"}if(t.isDirectory()){return"directory"}if(t&&t.isSymbolicLink()){const t=e.fullPath;try{const e=await v(t);const i=await x(e);if(i.isFile()){return"file"}if(i.isDirectory()){const i=e.length;if(t.startsWith(e)&&t.substr(i,1)===f.sep){const i=new Error(`Circular symlink detected: "${t}" points to "${e}"`);i.code=S;return this._onError(i)}return"directory"}}catch(e){this._onError(e)}}}_includeAsFile(e){const t=e&&e[this._statsProp];return t&&this._wantsEverything&&!t.isDirectory()}}const readdirp$1=(e,t={})=>{let i=t.entryType||t.type;if(i==="both")i=C;if(i)t.type=i;if(!e){throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)")}else if(typeof e!=="string"){throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)")}else if(i&&!_.includes(i)){throw new Error(`readdirp: Invalid type passed. Use one of ${_.join(", ")}`)}t.root=e;return new ReaddirpStream(t)};const readdirpPromise=(e,t={})=>new Promise(((i,s)=>{const n=[];readdirp$1(e,t).on("data",(e=>n.push(e))).on("end",(()=>i(n))).on("error",(e=>s(e)))}));readdirp$1.promise=readdirpPromise;readdirp$1.ReaddirpStream=ReaddirpStream;readdirp$1.default=readdirp$1;var T=readdirp$1;var $={exports:{}};
|
|
20
|
+
/*!
|
|
21
|
+
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
22
|
+
*
|
|
23
|
+
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
24
|
+
* Released under the MIT License.
|
|
25
|
+
*/var normalizePath$2=function(e,t){if(typeof e!=="string"){throw new TypeError("expected path to be a string")}if(e==="\\"||e==="/")return"/";var i=e.length;if(i<=1)return e;var s="";if(i>4&&e[3]==="\\"){var n=e[2];if((n==="?"||n===".")&&e.slice(0,2)==="\\\\"){e=e.slice(2);s="//"}}var r=e.split(/[/\\]+/);if(t!==false&&r[r.length-1]===""){r.pop()}return s+r.join("/")};Object.defineProperty($.exports,"__esModule",{value:true});const O=s.picomatch.exports;const D=normalizePath$2;const M="!";const L={returnIndex:false};const arrify$1=e=>Array.isArray(e)?e:[e];const createPattern=(e,t)=>{if(typeof e==="function"){return e}if(typeof e==="string"){const i=O(e,t);return t=>e===t||i(t)}if(e instanceof RegExp){return t=>e.test(t)}return e=>false};const matchPatterns=(e,t,i,s)=>{const n=Array.isArray(i);const r=n?i[0]:i;if(!n&&typeof r!=="string"){throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(r))}const o=D(r);for(let e=0;e<t.length;e++){const i=t[e];if(i(o)){return s?-1:false}}const l=n&&[o].concat(i.slice(1));for(let t=0;t<e.length;t++){const i=e[t];if(n?i(...l):i(o)){return s?t:true}}return s?-1:false};const anymatch$1=(e,t,i=L)=>{if(e==null){throw new TypeError("anymatch: specify first argument")}const s=typeof i==="boolean"?{returnIndex:i}:i;const n=s.returnIndex||false;const r=arrify$1(e);const o=r.filter((e=>typeof e==="string"&&e.charAt(0)===M)).map((e=>e.slice(1))).map((e=>O(e,s)));const l=r.filter((e=>typeof e!=="string"||typeof e==="string"&&e.charAt(0)!==M)).map((e=>createPattern(e,s)));if(t==null){return(e,t=false)=>{const i=typeof t==="boolean"?t:false;return matchPatterns(l,o,e,i)}}return matchPatterns(l,o,t,n)};anymatch$1.default=anymatch$1;$.exports=anymatch$1;
|
|
26
|
+
/*!
|
|
27
|
+
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
30
|
+
* Licensed under the MIT License.
|
|
31
|
+
*/var F=function isExtglob(e){if(typeof e!=="string"||e===""){return false}var t;while(t=/(\\).|([@?!+*]\(.*\))/g.exec(e)){if(t[2])return true;e=e.slice(t.index+t[0].length)}return false};
|
|
32
|
+
/*!
|
|
33
|
+
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
34
|
+
*
|
|
35
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
36
|
+
* Released under the MIT License.
|
|
37
|
+
*/var V=F;var B={"{":"}","(":")","[":"]"};var strictCheck=function(e){if(e[0]==="!"){return true}var t=0;var i=-2;var s=-2;var n=-2;var r=-2;var o=-2;while(t<e.length){if(e[t]==="*"){return true}if(e[t+1]==="?"&&/[\].+)]/.test(e[t])){return true}if(s!==-1&&e[t]==="["&&e[t+1]!=="]"){if(s<t){s=e.indexOf("]",t)}if(s>t){if(o===-1||o>s){return true}o=e.indexOf("\\",t);if(o===-1||o>s){return true}}}if(n!==-1&&e[t]==="{"&&e[t+1]!=="}"){n=e.indexOf("}",t);if(n>t){o=e.indexOf("\\",t);if(o===-1||o>n){return true}}}if(r!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"){r=e.indexOf(")",t);if(r>t){o=e.indexOf("\\",t);if(o===-1||o>r){return true}}}if(i!==-1&&e[t]==="("&&e[t+1]!=="|"){if(i<t){i=e.indexOf("|",t)}if(i!==-1&&e[i+1]!==")"){r=e.indexOf(")",i);if(r>i){o=e.indexOf("\\",i);if(o===-1||o>r){return true}}}}if(e[t]==="\\"){var l=e[t+1];t+=2;var c=B[l];if(c){var u=e.indexOf(c,t);if(u!==-1){t=u+1}}if(e[t]==="!"){return true}}else{t++}}return false};var relaxedCheck=function(e){if(e[0]==="!"){return true}var t=0;while(t<e.length){if(/[*?{}()[\]]/.test(e[t])){return true}if(e[t]==="\\"){var i=e[t+1];t+=2;var s=B[i];if(s){var n=e.indexOf(s,t);if(n!==-1){t=n+1}}if(e[t]==="!"){return true}}else{t++}}return false};var z=function isGlob(e,t){if(typeof e!=="string"||e===""){return false}if(V(e)){return true}var i=strictCheck;if(t&&t.strict===false){i=relaxedCheck}return i(e)};var U=z;var H=l.posix.dirname;var j=c.platform()==="win32";var G="/";var W=/\\/g;var q=/[\{\[].*[\}\]]$/;var K=/(^|[^\\])([\{\[]|\([^\)]+$)/;var Y=/\\([\!\*\?\|\[\]\(\)\{\}])/g;var X=function globParent(e,t){var i=Object.assign({flipBackslashes:true},t);if(i.flipBackslashes&&j&&e.indexOf(G)<0){e=e.replace(W,G)}if(q.test(e)){e+=G}e+="a";do{e=H(e)}while(U(e)||K.test(e));return e.replace(Y,"$1")};var Q={};(function(e){e.isInteger=e=>{if(typeof e==="number"){return Number.isInteger(e)}if(typeof e==="string"&&e.trim()!==""){return Number.isInteger(Number(e))}return false};e.find=(e,t)=>e.nodes.find((e=>e.type===t));e.exceedsLimit=(t,i,s=1,n)=>{if(n===false)return false;if(!e.isInteger(t)||!e.isInteger(i))return false;return(Number(i)-Number(t))/Number(s)>=n};e.escapeNode=(e,t=0,i)=>{let s=e.nodes[t];if(!s)return;if(i&&s.type===i||s.type==="open"||s.type==="close"){if(s.escaped!==true){s.value="\\"+s.value;s.escaped=true}}};e.encloseBrace=e=>{if(e.type!=="brace")return false;if(e.commas>>0+e.ranges>>0===0){e.invalid=true;return true}return false};e.isInvalidBrace=e=>{if(e.type!=="brace")return false;if(e.invalid===true||e.dollar)return true;if(e.commas>>0+e.ranges>>0===0){e.invalid=true;return true}if(e.open!==true||e.close!==true){e.invalid=true;return true}return false};e.isOpenOrClose=e=>{if(e.type==="open"||e.type==="close"){return true}return e.open===true||e.close===true};e.reduce=e=>e.reduce(((e,t)=>{if(t.type==="text")e.push(t.value);if(t.type==="range")t.type="text";return e}),[]);e.flatten=(...e)=>{const t=[];const flat=e=>{for(let i=0;i<e.length;i++){let s=e[i];Array.isArray(s)?flat(s):s!==void 0&&t.push(s)}return t};flat(e);return t}})(Q);const Z=Q;var stringify$4=(e,t={})=>{let stringify=(e,i={})=>{let s=t.escapeInvalid&&Z.isInvalidBrace(i);let n=e.invalid===true&&t.escapeInvalid===true;let r="";if(e.value){if((s||n)&&Z.isOpenOrClose(e)){return"\\"+e.value}return e.value}if(e.value){return e.value}if(e.nodes){for(let t of e.nodes){r+=stringify(t)}}return r};return stringify(e)};
|
|
38
|
+
/*!
|
|
39
|
+
* is-number <https://github.com/jonschlinkert/is-number>
|
|
40
|
+
*
|
|
41
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
42
|
+
* Released under the MIT License.
|
|
43
|
+
*/var isNumber$2=function(e){if(typeof e==="number"){return e-e===0}if(typeof e==="string"&&e.trim()!==""){return Number.isFinite?Number.isFinite(+e):isFinite(+e)}return false};
|
|
44
|
+
/*!
|
|
45
|
+
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
46
|
+
*
|
|
47
|
+
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
48
|
+
* Released under the MIT License.
|
|
49
|
+
*/const J=isNumber$2;const toRegexRange$1=(e,t,i)=>{if(J(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(J(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let s={relaxZeros:true,...i};if(typeof s.strictZeros==="boolean"){s.relaxZeros=s.strictZeros===false}let n=String(s.relaxZeros);let r=String(s.shorthand);let o=String(s.capture);let l=String(s.wrap);let c=e+":"+t+"="+n+r+o+l;if(toRegexRange$1.cache.hasOwnProperty(c)){return toRegexRange$1.cache[c].result}let u=Math.min(e,t);let h=Math.max(e,t);if(Math.abs(u-h)===1){let i=e+"|"+t;if(s.capture){return`(${i})`}if(s.wrap===false){return i}return`(?:${i})`}let d=hasPadding(e)||hasPadding(t);let p={min:e,max:t,a:u,b:h};let f=[];let m=[];if(d){p.isPadded=d;p.maxLen=String(p.max).length}if(u<0){let e=h<0?Math.abs(h):1;m=splitToPatterns(e,Math.abs(u),p,s);u=p.a=0}if(h>=0){f=splitToPatterns(u,h,p,s)}p.negatives=m;p.positives=f;p.result=collatePatterns(m,f);if(s.capture===true){p.result=`(${p.result})`}else if(s.wrap!==false&&f.length+m.length>1){p.result=`(?:${p.result})`}toRegexRange$1.cache[c]=p;return p.result};function collatePatterns(e,t,i){let s=filterPatterns(e,t,"-",false)||[];let n=filterPatterns(t,e,"",false)||[];let r=filterPatterns(e,t,"-?",true)||[];let o=s.concat(r).concat(n);return o.join("|")}function splitToRanges(e,t){let i=1;let s=1;let n=countNines(e,i);let r=new Set([t]);while(e<=n&&n<=t){r.add(n);i+=1;n=countNines(e,i)}n=countZeros(t+1,s)-1;while(e<n&&n<=t){r.add(n);s+=1;n=countZeros(t+1,s)-1}r=[...r];r.sort(compare);return r}function rangeToPattern(e,t,i){if(e===t){return{pattern:e,count:[],digits:0}}let s=zip(e,t);let n=s.length;let r="";let o=0;for(let e=0;e<n;e++){let[t,i]=s[e];if(t===i){r+=t}else if(t!=="0"||i!=="9"){r+=toCharacterClass(t,i)}else{o++}}if(o){r+=i.shorthand===true?"\\d":"[0-9]"}return{pattern:r,count:[o],digits:n}}function splitToPatterns(e,t,i,s){let n=splitToRanges(e,t);let r=[];let o=e;let l;for(let e=0;e<n.length;e++){let t=n[e];let c=rangeToPattern(String(o),String(t),s);let u="";if(!i.isPadded&&l&&l.pattern===c.pattern){if(l.count.length>1){l.count.pop()}l.count.push(c.count[0]);l.string=l.pattern+toQuantifier(l.count);o=t+1;continue}if(i.isPadded){u=padZeros(t,i,s)}c.string=u+c.pattern+toQuantifier(c.count);r.push(c);o=t+1;l=c}return r}function filterPatterns(e,t,i,s,n){let r=[];for(let n of e){let{string:e}=n;if(!s&&!contains(t,"string",e)){r.push(i+e)}if(s&&contains(t,"string",e)){r.push(i+e)}}return r}function zip(e,t){let i=[];for(let s=0;s<e.length;s++)i.push([e[s],t[s]]);return i}function compare(e,t){return e>t?1:t>e?-1:0}function contains(e,t,i){return e.some((e=>e[t]===i))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,i=""]=e;if(i||t>1){return`{${t+(i?","+i:"")}}`}return""}function toCharacterClass(e,t,i){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,i){if(!t.isPadded){return e}let s=Math.abs(t.maxLen-String(e).length);let n=i.relaxZeros!==false;switch(s){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:{return n?`0{0,${s}}`:`0{${s}}`}}}toRegexRange$1.cache={};toRegexRange$1.clearCache=()=>toRegexRange$1.cache={};var ee=toRegexRange$1;
|
|
50
|
+
/*!
|
|
51
|
+
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
54
|
+
* Licensed under the MIT License.
|
|
55
|
+
*/const te=r;const ie=ee;const isObject=e=>e!==null&&typeof e==="object"&&!Array.isArray(e);const transform=e=>t=>e===true?Number(t):String(t);const isValidValue=e=>typeof e==="number"||typeof e==="string"&&e!=="";const isNumber=e=>Number.isInteger(+e);const zeros=e=>{let t=`${e}`;let i=-1;if(t[0]==="-")t=t.slice(1);if(t==="0")return false;while(t[++i]==="0");return i>0};const stringify$3=(e,t,i)=>{if(typeof e==="string"||typeof t==="string"){return true}return i.stringify===true};const pad=(e,t,i)=>{if(t>0){let i=e[0]==="-"?"-":"";if(i)e=e.slice(1);e=i+e.padStart(i?t-1:t,"0")}if(i===false){return String(e)}return e};const toMaxLen=(e,t)=>{let i=e[0]==="-"?"-":"";if(i){e=e.slice(1);t--}while(e.length<t)e="0"+e;return i?"-"+e:e};const toSequence=(e,t)=>{e.negatives.sort(((e,t)=>e<t?-1:e>t?1:0));e.positives.sort(((e,t)=>e<t?-1:e>t?1:0));let i=t.capture?"":"?:";let s="";let n="";let r;if(e.positives.length){s=e.positives.join("|")}if(e.negatives.length){n=`-(${i}${e.negatives.join("|")})`}if(s&&n){r=`${s}|${n}`}else{r=s||n}if(t.wrap){return`(${i}${r})`}return r};const toRange=(e,t,i,s)=>{if(i){return ie(e,t,{wrap:false,...s})}let n=String.fromCharCode(e);if(e===t)return n;let r=String.fromCharCode(t);return`[${n}-${r}]`};const toRegex=(e,t,i)=>{if(Array.isArray(e)){let t=i.wrap===true;let s=i.capture?"":"?:";return t?`(${s}${e.join("|")})`:e.join("|")}return ie(e,t,i)};const rangeError=(...e)=>new RangeError("Invalid range arguments: "+te.inspect(...e));const invalidRange=(e,t,i)=>{if(i.strictRanges===true)throw rangeError([e,t]);return[]};const invalidStep=(e,t)=>{if(t.strictRanges===true){throw new TypeError(`Expected step "${e}" to be a number`)}return[]};const fillNumbers=(e,t,i=1,s={})=>{let n=Number(e);let r=Number(t);if(!Number.isInteger(n)||!Number.isInteger(r)){if(s.strictRanges===true)throw rangeError([e,t]);return[]}if(n===0)n=0;if(r===0)r=0;let o=n>r;let l=String(e);let c=String(t);let u=String(i);i=Math.max(Math.abs(i),1);let h=zeros(l)||zeros(c)||zeros(u);let d=h?Math.max(l.length,c.length,u.length):0;let p=h===false&&stringify$3(e,t,s)===false;let f=s.transform||transform(p);if(s.toRegex&&i===1){return toRange(toMaxLen(e,d),toMaxLen(t,d),true,s)}let m={negatives:[],positives:[]};let push=e=>m[e<0?"negatives":"positives"].push(Math.abs(e));let g=[];let y=0;while(o?n>=r:n<=r){if(s.toRegex===true&&i>1){push(n)}else{g.push(pad(f(n,y),d,p))}n=o?n-i:n+i;y++}if(s.toRegex===true){return i>1?toSequence(m,s):toRegex(g,null,{wrap:false,...s})}return g};const fillLetters=(e,t,i=1,s={})=>{if(!isNumber(e)&&e.length>1||!isNumber(t)&&t.length>1){return invalidRange(e,t,s)}let n=s.transform||(e=>String.fromCharCode(e));let r=`${e}`.charCodeAt(0);let o=`${t}`.charCodeAt(0);let l=r>o;let c=Math.min(r,o);let u=Math.max(r,o);if(s.toRegex&&i===1){return toRange(c,u,false,s)}let h=[];let d=0;while(l?r>=o:r<=o){h.push(n(r,d));r=l?r-i:r+i;d++}if(s.toRegex===true){return toRegex(h,null,{wrap:false,options:s})}return h};const fill$2=(e,t,i,s={})=>{if(t==null&&isValidValue(e)){return[e]}if(!isValidValue(e)||!isValidValue(t)){return invalidRange(e,t,s)}if(typeof i==="function"){return fill$2(e,t,1,{transform:i})}if(isObject(i)){return fill$2(e,t,0,i)}let n={...s};if(n.capture===true)n.wrap=true;i=i||n.step||1;if(!isNumber(i)){if(i!=null&&!isObject(i))return invalidStep(i,n);return fill$2(e,t,1,i)}if(isNumber(e)&&isNumber(t)){return fillNumbers(e,t,i,n)}return fillLetters(e,t,Math.max(Math.abs(i),1),n)};var se=fill$2;const ne=se;const re=Q;const compile$1=(e,t={})=>{let walk=(e,i={})=>{let s=re.isInvalidBrace(i);let n=e.invalid===true&&t.escapeInvalid===true;let r=s===true||n===true;let o=t.escapeInvalid===true?"\\":"";let l="";if(e.isOpen===true){return o+e.value}if(e.isClose===true){return o+e.value}if(e.type==="open"){return r?o+e.value:"("}if(e.type==="close"){return r?o+e.value:")"}if(e.type==="comma"){return e.prev.type==="comma"?"":r?e.value:"|"}if(e.value){return e.value}if(e.nodes&&e.ranges>0){let i=re.reduce(e.nodes);let s=ne(...i,{...t,wrap:false,toRegex:true});if(s.length!==0){return i.length>1&&s.length>1?`(${s})`:s}}if(e.nodes){for(let t of e.nodes){l+=walk(t,e)}}return l};return walk(e)};var ae=compile$1;const oe=se;const le=stringify$4;const ce=Q;const append=(e="",t="",i=false)=>{let s=[];e=[].concat(e);t=[].concat(t);if(!t.length)return e;if(!e.length){return i?ce.flatten(t).map((e=>`{${e}}`)):t}for(let n of e){if(Array.isArray(n)){for(let e of n){s.push(append(e,t,i))}}else{for(let e of t){if(i===true&&typeof e==="string")e=`{${e}}`;s.push(Array.isArray(e)?append(n,e,i):n+e)}}}return ce.flatten(s)};const expand$1=(e,t={})=>{let i=t.rangeLimit===void 0?1e3:t.rangeLimit;let walk=(e,s={})=>{e.queue=[];let n=s;let r=s.queue;while(n.type!=="brace"&&n.type!=="root"&&n.parent){n=n.parent;r=n.queue}if(e.invalid||e.dollar){r.push(append(r.pop(),le(e,t)));return}if(e.type==="brace"&&e.invalid!==true&&e.nodes.length===2){r.push(append(r.pop(),["{}"]));return}if(e.nodes&&e.ranges>0){let s=ce.reduce(e.nodes);if(ce.exceedsLimit(...s,t.step,i)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let n=oe(...s,t);if(n.length===0){n=le(e,t)}r.push(append(r.pop(),n));e.nodes=[];return}let o=ce.encloseBrace(e);let l=e.queue;let c=e;while(c.type!=="brace"&&c.type!=="root"&&c.parent){c=c.parent;l=c.queue}for(let t=0;t<e.nodes.length;t++){let i=e.nodes[t];if(i.type==="comma"&&e.type==="brace"){if(t===1)l.push("");l.push("");continue}if(i.type==="close"){r.push(append(r.pop(),l,o));continue}if(i.value&&i.type!=="open"){l.push(append(l.pop(),i.value));continue}if(i.nodes){walk(i,e)}}return l};return ce.flatten(walk(e))};var ue=expand$1;var he={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"};const de=stringify$4;const{MAX_LENGTH:pe,CHAR_BACKSLASH:fe,CHAR_BACKTICK:me,CHAR_COMMA:ge,CHAR_DOT:ye,CHAR_LEFT_PARENTHESES:Ee,CHAR_RIGHT_PARENTHESES:xe,CHAR_LEFT_CURLY_BRACE:ve,CHAR_RIGHT_CURLY_BRACE:be,CHAR_LEFT_SQUARE_BRACKET:Se,CHAR_RIGHT_SQUARE_BRACKET:Ae,CHAR_DOUBLE_QUOTE:we,CHAR_SINGLE_QUOTE:Ie,CHAR_NO_BREAK_SPACE:Ce,CHAR_ZERO_WIDTH_NOBREAK_SPACE:ke}=he;const parse$1=(e,t={})=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}let i=t||{};let s=typeof i.maxLength==="number"?Math.min(pe,i.maxLength):pe;if(e.length>s){throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${s})`)}let n={type:"root",input:e,nodes:[]};let r=[n];let o=n;let l=n;let c=0;let u=e.length;let h=0;let d=0;let p;const advance=()=>e[h++];const push=e=>{if(e.type==="text"&&l.type==="dot"){l.type="text"}if(l&&l.type==="text"&&e.type==="text"){l.value+=e.value;return}o.nodes.push(e);e.parent=o;e.prev=l;l=e;return e};push({type:"bos"});while(h<u){o=r[r.length-1];p=advance();if(p===ke||p===Ce){continue}if(p===fe){push({type:"text",value:(t.keepEscaping?p:"")+advance()});continue}if(p===Ae){push({type:"text",value:"\\"+p});continue}if(p===Se){c++;let e;while(h<u&&(e=advance())){p+=e;if(e===Se){c++;continue}if(e===fe){p+=advance();continue}if(e===Ae){c--;if(c===0){break}}}push({type:"text",value:p});continue}if(p===Ee){o=push({type:"paren",nodes:[]});r.push(o);push({type:"text",value:p});continue}if(p===xe){if(o.type!=="paren"){push({type:"text",value:p});continue}o=r.pop();push({type:"text",value:p});o=r[r.length-1];continue}if(p===we||p===Ie||p===me){let e=p;let i;if(t.keepQuotes!==true){p=""}while(h<u&&(i=advance())){if(i===fe){p+=i+advance();continue}if(i===e){if(t.keepQuotes===true)p+=i;break}p+=i}push({type:"text",value:p});continue}if(p===ve){d++;let e=l.value&&l.value.slice(-1)==="$"||o.dollar===true;let t={type:"brace",open:true,close:false,dollar:e,depth:d,commas:0,ranges:0,nodes:[]};o=push(t);r.push(o);push({type:"open",value:p});continue}if(p===be){if(o.type!=="brace"){push({type:"text",value:p});continue}let e="close";o=r.pop();o.close=true;push({type:e,value:p});d--;o=r[r.length-1];continue}if(p===ge&&d>0){if(o.ranges>0){o.ranges=0;let e=o.nodes.shift();o.nodes=[e,{type:"text",value:de(o)}]}push({type:"comma",value:p});o.commas++;continue}if(p===ye&&d>0&&o.commas===0){let e=o.nodes;if(d===0||e.length===0){push({type:"text",value:p});continue}if(l.type==="dot"){o.range=[];l.value+=p;l.type="range";if(o.nodes.length!==3&&o.nodes.length!==5){o.invalid=true;o.ranges=0;l.type="text";continue}o.ranges++;o.args=[];continue}if(l.type==="range"){e.pop();let t=e[e.length-1];t.value+=l.value+p;l=t;o.ranges--;continue}push({type:"dot",value:p});continue}push({type:"text",value:p})}do{o=r.pop();if(o.type!=="root"){o.nodes.forEach((e=>{if(!e.nodes){if(e.type==="open")e.isOpen=true;if(e.type==="close")e.isClose=true;if(!e.nodes)e.type="text";e.invalid=true}}));let e=r[r.length-1];let t=e.nodes.indexOf(o);e.nodes.splice(t,1,...o.nodes)}}while(r.length>0);push({type:"eos"});return n};var _e=parse$1;const Pe=stringify$4;const Ne=ae;const Re=ue;const Te=_e;const braces$1=(e,t={})=>{let i=[];if(Array.isArray(e)){for(let s of e){let e=braces$1.create(s,t);if(Array.isArray(e)){i.push(...e)}else{i.push(e)}}}else{i=[].concat(braces$1.create(e,t))}if(t&&t.expand===true&&t.nodupes===true){i=[...new Set(i)]}return i};braces$1.parse=(e,t={})=>Te(e,t);braces$1.stringify=(e,t={})=>{if(typeof e==="string"){return Pe(braces$1.parse(e,t),t)}return Pe(e,t)};braces$1.compile=(e,t={})=>{if(typeof e==="string"){e=braces$1.parse(e,t)}return Ne(e,t)};braces$1.expand=(e,t={})=>{if(typeof e==="string"){e=braces$1.parse(e,t)}let i=Re(e,t);if(t.noempty===true){i=i.filter(Boolean)}if(t.nodupes===true){i=[...new Set(i)]}return i};braces$1.create=(e,t={})=>{if(e===""||e.length<3){return[e]}return t.expand!==true?braces$1.compile(e,t):braces$1.expand(e,t)};var $e=braces$1;var Oe={exports:{}};const De=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];(function(e){e.exports=De})(Oe);const Me=l;const Le=Oe.exports;const Fe=new Set(Le);var isBinaryPath$1=e=>Fe.has(Me.extname(e).slice(1).toLowerCase());var Ve={};(function(e){const{sep:t}=l;const{platform:i}=process;const s=c;e.EV_ALL="all";e.EV_READY="ready";e.EV_ADD="add";e.EV_CHANGE="change";e.EV_ADD_DIR="addDir";e.EV_UNLINK="unlink";e.EV_UNLINK_DIR="unlinkDir";e.EV_RAW="raw";e.EV_ERROR="error";e.STR_DATA="data";e.STR_END="end";e.STR_CLOSE="close";e.FSEVENT_CREATED="created";e.FSEVENT_MODIFIED="modified";e.FSEVENT_DELETED="deleted";e.FSEVENT_MOVED="moved";e.FSEVENT_CLONED="cloned";e.FSEVENT_UNKNOWN="unknown";e.FSEVENT_TYPE_FILE="file";e.FSEVENT_TYPE_DIRECTORY="directory";e.FSEVENT_TYPE_SYMLINK="symlink";e.KEY_LISTENERS="listeners";e.KEY_ERR="errHandlers";e.KEY_RAW="rawEmitters";e.HANDLER_KEYS=[e.KEY_LISTENERS,e.KEY_ERR,e.KEY_RAW];e.DOT_SLASH=`.${t}`;e.BACK_SLASH_RE=/\\/g;e.DOUBLE_SLASH_RE=/\/\//;e.SLASH_OR_BACK_SLASH_RE=/[/\\]/;e.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/;e.REPLACER_RE=/^\.[/\\]/;e.SLASH="/";e.SLASH_SLASH="//";e.BRACE_START="{";e.BANG="!";e.ONE_DOT=".";e.TWO_DOTS="..";e.STAR="*";e.GLOBSTAR="**";e.ROOT_GLOBSTAR="/**/*";e.SLASH_GLOBSTAR="/**";e.DIR_SUFFIX="Dir";e.ANYMATCH_OPTS={dot:true};e.STRING_TYPE="string";e.FUNCTION_TYPE="function";e.EMPTY_STR="";e.EMPTY_FN=()=>{};e.IDENTITY_FN=e=>e;e.isWindows=i==="win32";e.isMacos=i==="darwin";e.isLinux=i==="linux";e.isIBMi=s.type()==="OS400"})(Ve);const Be=n;const ze=l;const{promisify:Ue}=r;const He=isBinaryPath$1;const{isWindows:je,isLinux:Ge,EMPTY_FN:We,EMPTY_STR:qe,KEY_LISTENERS:Ke,KEY_ERR:Ye,KEY_RAW:Xe,HANDLER_KEYS:Qe,EV_CHANGE:Ze,EV_ADD:Je,EV_ADD_DIR:et,EV_ERROR:tt,STR_DATA:it,STR_END:st,BRACE_START:nt,STAR:rt}=Ve;const ot="watch";const lt=Ue(Be.open);const ct=Ue(Be.stat);const ut=Ue(Be.lstat);const ht=Ue(Be.close);const dt=Ue(Be.realpath);const pt={lstat:ut,stat:ct};const foreach=(e,t)=>{if(e instanceof Set){e.forEach(t)}else{t(e)}};const addAndConvert=(e,t,i)=>{let s=e[t];if(!(s instanceof Set)){e[t]=s=new Set([s])}s.add(i)};const clearItem=e=>t=>{const i=e[t];if(i instanceof Set){i.clear()}else{delete e[t]}};const delFromSet=(e,t,i)=>{const s=e[t];if(s instanceof Set){s.delete(i)}else if(s===i){delete e[t]}};const isEmptySet=e=>e instanceof Set?e.size===0:!e;const ft=new Map;function createFsWatchInstance(e,t,i,s,n){const handleEvent=(t,s)=>{i(e);n(t,s,{watchedPath:e});if(s&&e!==s){fsWatchBroadcast(ze.resolve(e,s),Ke,ze.join(e,s))}};try{return Be.watch(e,t,handleEvent)}catch(e){s(e)}}const fsWatchBroadcast=(e,t,i,s,n)=>{const r=ft.get(e);if(!r)return;foreach(r[t],(e=>{e(i,s,n)}))};const setFsWatchListener=(e,t,i,s)=>{const{listener:n,errHandler:r,rawEmitter:o}=s;let l=ft.get(t);let c;if(!i.persistent){c=createFsWatchInstance(e,i,n,r,o);return c.close.bind(c)}if(l){addAndConvert(l,Ke,n);addAndConvert(l,Ye,r);addAndConvert(l,Xe,o)}else{c=createFsWatchInstance(e,i,fsWatchBroadcast.bind(null,t,Ke),r,fsWatchBroadcast.bind(null,t,Xe));if(!c)return;c.on(tt,(async i=>{const s=fsWatchBroadcast.bind(null,t,Ye);l.watcherUnusable=true;if(je&&i.code==="EPERM"){try{const t=await lt(e,"r");await ht(t);s(i)}catch(e){}}else{s(i)}}));l={listeners:n,errHandlers:r,rawEmitters:o,watcher:c};ft.set(t,l)}return()=>{delFromSet(l,Ke,n);delFromSet(l,Ye,r);delFromSet(l,Xe,o);if(isEmptySet(l.listeners)){l.watcher.close();ft.delete(t);Qe.forEach(clearItem(l));l.watcher=undefined;Object.freeze(l)}}};const mt=new Map;const setFsWatchFileListener=(e,t,i,s)=>{const{listener:n,rawEmitter:r}=s;let o=mt.get(t);const l=o&&o.options;if(l&&(l.persistent<i.persistent||l.interval>i.interval)){Be.unwatchFile(t);o=undefined}if(o){addAndConvert(o,Ke,n);addAndConvert(o,Xe,r)}else{o={listeners:n,rawEmitters:r,options:i,watcher:Be.watchFile(t,i,((i,s)=>{foreach(o.rawEmitters,(e=>{e(Ze,t,{curr:i,prev:s})}));const n=i.mtimeMs;if(i.size!==s.size||n>s.mtimeMs||n===0){foreach(o.listeners,(t=>t(e,i)))}}))};mt.set(t,o)}return()=>{delFromSet(o,Ke,n);delFromSet(o,Xe,r);if(isEmptySet(o.listeners)){mt.delete(t);Be.unwatchFile(t);o.options=o.watcher=undefined;Object.freeze(o)}}};class NodeFsHandler$1{constructor(e){this.fsw=e;this._boundHandleError=t=>e._handleError(t)}_watchWithNodeFs(e,t){const i=this.fsw.options;const s=ze.dirname(e);const n=ze.basename(e);const r=this.fsw._getWatchedDir(s);r.add(n);const o=ze.resolve(e);const l={persistent:i.persistent};if(!t)t=We;let c;if(i.usePolling){l.interval=i.enableBinaryInterval&&He(n)?i.binaryInterval:i.interval;c=setFsWatchFileListener(e,o,l,{listener:t,rawEmitter:this.fsw._emitRaw})}else{c=setFsWatchListener(e,o,l,{listener:t,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw})}return c}_handleFile(e,t,i){if(this.fsw.closed){return}const s=ze.dirname(e);const n=ze.basename(e);const r=this.fsw._getWatchedDir(s);let o=t;if(r.has(n))return;const listener=async(t,i)=>{if(!this.fsw._throttle(ot,e,5))return;if(!i||i.mtimeMs===0){try{const i=await ct(e);if(this.fsw.closed)return;const s=i.atimeMs;const n=i.mtimeMs;if(!s||s<=n||n!==o.mtimeMs){this.fsw._emit(Ze,e,i)}if(Ge&&o.ino!==i.ino){this.fsw._closeFile(t);o=i;this.fsw._addPathCloser(t,this._watchWithNodeFs(e,listener))}else{o=i}}catch(e){this.fsw._remove(s,n)}}else if(r.has(n)){const t=i.atimeMs;const s=i.mtimeMs;if(!t||t<=s||s!==o.mtimeMs){this.fsw._emit(Ze,e,i)}o=i}};const l=this._watchWithNodeFs(e,listener);if(!(i&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(Je,e,0))return;this.fsw._emit(Je,e,t)}return l}async _handleSymlink(e,t,i,s){if(this.fsw.closed){return}const n=e.fullPath;const r=this.fsw._getWatchedDir(t);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let t;try{t=await dt(i)}catch(e){this.fsw._emitReady();return true}if(this.fsw.closed)return;if(r.has(s)){if(this.fsw._symlinkPaths.get(n)!==t){this.fsw._symlinkPaths.set(n,t);this.fsw._emit(Ze,i,e.stats)}}else{r.add(s);this.fsw._symlinkPaths.set(n,t);this.fsw._emit(Je,i,e.stats)}this.fsw._emitReady();return true}if(this.fsw._symlinkPaths.has(n)){return true}this.fsw._symlinkPaths.set(n,true)}_handleRead(e,t,i,s,n,r,o){e=ze.join(e,qe);if(!i.hasGlob){o=this.fsw._throttle("readdir",e,1e3);if(!o)return}const l=this.fsw._getWatchedDir(i.path);const c=new Set;let u=this.fsw._readdirp(e,{fileFilter:e=>i.filterPath(e),directoryFilter:e=>i.filterDir(e),depth:0}).on(it,(async o=>{if(this.fsw.closed){u=undefined;return}const h=o.path;let d=ze.join(e,h);c.add(h);if(o.stats.isSymbolicLink()&&await this._handleSymlink(o,e,d,h)){return}if(this.fsw.closed){u=undefined;return}if(h===s||!s&&!l.has(h)){this.fsw._incrReadyCount();d=ze.join(n,ze.relative(n,d));this._addToNodeFs(d,t,i,r+1)}})).on(tt,this._boundHandleError);return new Promise((t=>u.once(st,(()=>{if(this.fsw.closed){u=undefined;return}const h=o?o.clear():false;t();l.getChildren().filter((t=>t!==e&&!c.has(t)&&(!i.hasGlob||i.filterPath({fullPath:ze.resolve(e,t)})))).forEach((t=>{this.fsw._remove(e,t)}));u=undefined;if(h)this._handleRead(e,false,i,s,n,r,o)}))))}async _handleDir(e,t,i,s,n,r,o){const l=this.fsw._getWatchedDir(ze.dirname(e));const c=l.has(ze.basename(e));if(!(i&&this.fsw.options.ignoreInitial)&&!n&&!c){if(!r.hasGlob||r.globFilter(e))this.fsw._emit(et,e,t)}l.add(ze.basename(e));this.fsw._getWatchedDir(e);let u;let h;const d=this.fsw.options.depth;if((d==null||s<=d)&&!this.fsw._symlinkPaths.has(o)){if(!n){await this._handleRead(e,i,r,n,e,s,u);if(this.fsw.closed)return}h=this._watchWithNodeFs(e,((t,i)=>{if(i&&i.mtimeMs===0)return;this._handleRead(t,false,r,n,e,s,u)}))}return h}async _addToNodeFs(e,t,i,s,n){const r=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed){r();return false}const o=this.fsw._getWatchHelpers(e,s);if(!o.hasGlob&&i){o.hasGlob=i.hasGlob;o.globFilter=i.globFilter;o.filterPath=e=>i.filterPath(e);o.filterDir=e=>i.filterDir(e)}try{const i=await pt[o.statMethod](o.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(o.watchPath,i)){r();return false}const l=this.fsw.options.followSymlinks&&!e.includes(rt)&&!e.includes(nt);let c;if(i.isDirectory()){const r=ze.resolve(e);const u=l?await dt(e):e;if(this.fsw.closed)return;c=await this._handleDir(o.watchPath,i,t,s,n,o,u);if(this.fsw.closed)return;if(r!==u&&u!==undefined){this.fsw._symlinkPaths.set(r,u)}}else if(i.isSymbolicLink()){const n=l?await dt(e):e;if(this.fsw.closed)return;const r=ze.dirname(o.watchPath);this.fsw._getWatchedDir(r).add(o.watchPath);this.fsw._emit(Je,o.watchPath,i);c=await this._handleDir(r,i,t,s,e,o,n);if(this.fsw.closed)return;if(n!==undefined){this.fsw._symlinkPaths.set(ze.resolve(e),n)}}else{c=this._handleFile(o.watchPath,i,t)}r();this.fsw._addPathCloser(e,c);return false}catch(t){if(this.fsw._handleError(t)){r();return e}}}}var gt=NodeFsHandler$1;var yt={exports:{}};const Et=s.getAugmentedNamespace(s.fseventsImporter);const xt=n;const vt=l;const{promisify:bt}=r;let St;try{St=Et.getFsEvents()}catch(e){if(process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR)console.error(e)}if(St){const e=process.version.match(/v(\d+)\.(\d+)/);if(e&&e[1]&&e[2]){const t=Number.parseInt(e[1],10);const i=Number.parseInt(e[2],10);if(t===8&&i<16){St=undefined}}}const{EV_ADD:At,EV_CHANGE:wt,EV_ADD_DIR:It,EV_UNLINK:Ct,EV_ERROR:kt,STR_DATA:_t,STR_END:Pt,FSEVENT_CREATED:Nt,FSEVENT_MODIFIED:Rt,FSEVENT_DELETED:Tt,FSEVENT_MOVED:$t,FSEVENT_UNKNOWN:Ot,FSEVENT_TYPE_FILE:Dt,FSEVENT_TYPE_DIRECTORY:Mt,FSEVENT_TYPE_SYMLINK:Lt,ROOT_GLOBSTAR:Ft,DIR_SUFFIX:Vt,DOT_SLASH:Bt,FUNCTION_TYPE:zt,EMPTY_FN:Ut,IDENTITY_FN:Ht}=Ve;const Depth=e=>isNaN(e)?{}:{depth:e};const jt=bt(xt.stat);const Gt=bt(xt.lstat);const Wt=bt(xt.realpath);const qt={stat:jt,lstat:Gt};const Kt=new Map;const Yt=10;const Xt=new Set([69888,70400,71424,72704,73472,131328,131840,262912]);const createFSEventsInstance=(e,t)=>{const i=St.watch(e,t);return{stop:i}};function setFSEventsListener(e,t,i,s){let n=vt.extname(t)?vt.dirname(t):t;const r=vt.dirname(n);let o=Kt.get(n);if(couldConsolidate(r)){n=r}const l=vt.resolve(e);const c=l!==t;const filteredListener=(e,s,n)=>{if(c)e=e.replace(t,l);if(e===l||!e.indexOf(l+vt.sep))i(e,s,n)};let u=false;for(const e of Kt.keys()){if(t.indexOf(vt.resolve(e)+vt.sep)===0){n=e;o=Kt.get(n);u=true;break}}if(o||u){o.listeners.add(filteredListener)}else{o={listeners:new Set([filteredListener]),rawEmitter:s,watcher:createFSEventsInstance(n,((e,t)=>{if(!o.listeners.size)return;const i=St.getInfo(e,t);o.listeners.forEach((s=>{s(e,t,i)}));o.rawEmitter(i.event,e,i)}))};Kt.set(n,o)}return()=>{const e=o.listeners;e.delete(filteredListener);if(!e.size){Kt.delete(n);if(o.watcher)return o.watcher.stop().then((()=>{o.rawEmitter=o.watcher=undefined;Object.freeze(o)}))}}}const couldConsolidate=e=>{let t=0;for(const i of Kt.keys()){if(i.indexOf(e)===0){t++;if(t>=Yt){return true}}}return false};const canUse=()=>St&&Kt.size<128;const calcDepth=(e,t)=>{let i=0;while(!e.indexOf(t)&&(e=vt.dirname(e))!==t)i++;return i};const sameTypes=(e,t)=>e.type===Mt&&t.isDirectory()||e.type===Lt&&t.isSymbolicLink()||e.type===Dt&&t.isFile();class FsEventsHandler$1{constructor(e){this.fsw=e}checkIgnored(e,t){const i=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,t)){i.add(e);if(t&&t.isDirectory()){i.add(e+Ft)}return true}i.delete(e);i.delete(e+Ft)}addOrChange(e,t,i,s,n,r,o,l){const c=n.has(r)?wt:At;this.handleEvent(c,e,t,i,s,n,r,o,l)}async checkExists(e,t,i,s,n,r,o,l){try{const c=await jt(e);if(this.fsw.closed)return;if(sameTypes(o,c)){this.addOrChange(e,t,i,s,n,r,o,l)}else{this.handleEvent(Ct,e,t,i,s,n,r,o,l)}}catch(c){if(c.code==="EACCES"){this.addOrChange(e,t,i,s,n,r,o,l)}else{this.handleEvent(Ct,e,t,i,s,n,r,o,l)}}}handleEvent(e,t,i,s,n,r,o,l,c){if(this.fsw.closed||this.checkIgnored(t))return;if(e===Ct){const e=l.type===Mt;if(e||r.has(o)){this.fsw._remove(n,o,e)}}else{if(e===At){if(l.type===Mt)this.fsw._getWatchedDir(t);if(l.type===Lt&&c.followSymlinks){const e=c.depth===undefined?undefined:calcDepth(i,s)+1;return this._addToFsEvents(t,false,true,e)}this.fsw._getWatchedDir(n).add(o)}const r=l.type===Mt?e+Vt:e;this.fsw._emit(r,t);if(r===It)this._addToFsEvents(t,false,true)}}_watchWithFsEvents(e,t,i,s){if(this.fsw.closed||this.fsw._isIgnored(e))return;const n=this.fsw.options;const watchCallback=async(r,o,l)=>{if(this.fsw.closed)return;if(n.depth!==undefined&&calcDepth(r,t)>n.depth)return;const c=i(vt.join(e,vt.relative(e,r)));if(s&&!s(c))return;const u=vt.dirname(c);const h=vt.basename(c);const d=this.fsw._getWatchedDir(l.type===Mt?c:u);if(Xt.has(o)||l.event===Ot){if(typeof n.ignored===zt){let e;try{e=await jt(c)}catch(e){}if(this.fsw.closed)return;if(this.checkIgnored(c,e))return;if(sameTypes(l,e)){this.addOrChange(c,r,t,u,d,h,l,n)}else{this.handleEvent(Ct,c,r,t,u,d,h,l,n)}}else{this.checkExists(c,r,t,u,d,h,l,n)}}else{switch(l.event){case Nt:case Rt:return this.addOrChange(c,r,t,u,d,h,l,n);case Tt:case $t:return this.checkExists(c,r,t,u,d,h,l,n)}}};const r=setFSEventsListener(e,t,watchCallback,this.fsw._emitRaw);this.fsw._emitReady();return r}async _handleFsEventsSymlink(e,t,i,s){if(this.fsw.closed||this.fsw._symlinkPaths.has(t))return;this.fsw._symlinkPaths.set(t,true);this.fsw._incrReadyCount();try{const t=await Wt(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(t)){return this.fsw._emitReady()}this.fsw._incrReadyCount();this._addToFsEvents(t||e,(s=>{let n=e;if(t&&t!==Bt){n=s.replace(t,e)}else if(s!==Bt){n=vt.join(e,s)}return i(n)}),false,s)}catch(e){if(this.fsw._handleError(e)){return this.fsw._emitReady()}}}emitAdd(e,t,i,s,n){const r=i(e);const o=t.isDirectory();const l=this.fsw._getWatchedDir(vt.dirname(r));const c=vt.basename(r);if(o)this.fsw._getWatchedDir(r);if(l.has(c))return;l.add(c);if(!s.ignoreInitial||n===true){this.fsw._emit(o?It:At,r,t)}}initWatch(e,t,i,s){if(this.fsw.closed)return;const n=this._watchWithFsEvents(i.watchPath,vt.resolve(e||i.watchPath),s,i.globFilter);this.fsw._addPathCloser(t,n)}async _addToFsEvents(e,t,i,s){if(this.fsw.closed){return}const n=this.fsw.options;const r=typeof t===zt?t:Ht;const o=this.fsw._getWatchHelpers(e);try{const t=await qt[o.statMethod](o.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(o.watchPath,t)){throw null}if(t.isDirectory()){if(!o.globFilter)this.emitAdd(r(e),t,r,n,i);if(s&&s>n.depth)return;this.fsw._readdirp(o.watchPath,{fileFilter:e=>o.filterPath(e),directoryFilter:e=>o.filterDir(e),...Depth(n.depth-(s||0))}).on(_t,(e=>{if(this.fsw.closed){return}if(e.stats.isDirectory()&&!o.filterPath(e))return;const t=vt.join(o.watchPath,e.path);const{fullPath:s}=e;if(o.followSymlinks&&e.stats.isSymbolicLink()){const e=n.depth===undefined?undefined:calcDepth(t,vt.resolve(o.watchPath))+1;this._handleFsEventsSymlink(t,s,r,e)}else{this.emitAdd(t,e.stats,r,n,i)}})).on(kt,Ut).on(Pt,(()=>{this.fsw._emitReady()}))}else{this.emitAdd(o.watchPath,t,r,n,i);this.fsw._emitReady()}}catch(e){if(!e||this.fsw._handleError(e)){this.fsw._emitReady();this.fsw._emitReady()}}if(n.persistent&&i!==true){if(typeof t===zt){this.initWatch(undefined,e,o,r)}else{let t;try{t=await Wt(o.watchPath)}catch(e){}this.initWatch(t,e,o,r)}}}}yt.exports=FsEventsHandler$1;yt.exports.canUse=canUse;const{EventEmitter:Qt}=u;const Zt=n;const Jt=l;const{promisify:ei}=r;const ti=T;const ii=$.exports.default;const si=X;const ni=z;const ri=$e;const ai=normalizePath$2;const oi=gt;const li=yt.exports;const{EV_ALL:ci,EV_READY:ui,EV_ADD:hi,EV_CHANGE:di,EV_UNLINK:pi,EV_ADD_DIR:fi,EV_UNLINK_DIR:mi,EV_RAW:gi,EV_ERROR:yi,STR_CLOSE:Ei,STR_END:xi,BACK_SLASH_RE:vi,DOUBLE_SLASH_RE:bi,SLASH_OR_BACK_SLASH_RE:Si,DOT_RE:Ai,REPLACER_RE:wi,SLASH:Ii,SLASH_SLASH:Ci,BRACE_START:ki,BANG:_i,ONE_DOT:Pi,TWO_DOTS:Ni,GLOBSTAR:Ri,SLASH_GLOBSTAR:Ti,ANYMATCH_OPTS:$i,STRING_TYPE:Oi,FUNCTION_TYPE:Di,EMPTY_STR:Mi,EMPTY_FN:Li,isWindows:Fi,isMacos:Vi,isIBMi:Bi}=Ve;const zi=ei(Zt.stat);const Ui=ei(Zt.readdir);const arrify=(e=[])=>Array.isArray(e)?e:[e];const flatten=(e,t=[])=>{e.forEach((e=>{if(Array.isArray(e)){flatten(e,t)}else{t.push(e)}}));return t};const unifyPaths=e=>{const t=flatten(arrify(e));if(!t.every((e=>typeof e===Oi))){throw new TypeError(`Non-string provided as watch path: ${t}`)}return t.map(normalizePathToUnix)};const toUnix=e=>{let t=e.replace(vi,Ii);let i=false;if(t.startsWith(Ci)){i=true}while(t.match(bi)){t=t.replace(bi,Ii)}if(i){t=Ii+t}return t};const normalizePathToUnix=e=>toUnix(Jt.normalize(toUnix(e)));const normalizeIgnored=(e=Mi)=>t=>{if(typeof t!==Oi)return t;return normalizePathToUnix(Jt.isAbsolute(t)?t:Jt.join(e,t))};const getAbsolutePath=(e,t)=>{if(Jt.isAbsolute(e)){return e}if(e.startsWith(_i)){return _i+Jt.join(t,e.slice(1))}return Jt.join(t,e)};const undef=(e,t)=>e[t]===undefined;class DirEntry{constructor(e,t){this.path=e;this._removeWatcher=t;this.items=new Set}add(e){const{items:t}=this;if(!t)return;if(e!==Pi&&e!==Ni)t.add(e)}async remove(e){const{items:t}=this;if(!t)return;t.delete(e);if(t.size>0)return;const i=this.path;try{await Ui(i)}catch(e){if(this._removeWatcher){this._removeWatcher(Jt.dirname(i),Jt.basename(i))}}}has(e){const{items:t}=this;if(!t)return;return t.has(e)}getChildren(){const{items:e}=this;if(!e)return;return[...e.values()]}dispose(){this.items.clear();delete this.path;delete this._removeWatcher;delete this.items;Object.freeze(this)}}const Hi="stat";const ji="lstat";class WatchHelper{constructor(e,t,i,s){this.fsw=s;this.path=e=e.replace(wi,Mi);this.watchPath=t;this.fullWatchPath=Jt.resolve(t);this.hasGlob=t!==e;if(e===Mi)this.hasGlob=false;this.globSymlink=this.hasGlob&&i?undefined:false;this.globFilter=this.hasGlob?ii(e,undefined,$i):false;this.dirParts=this.getDirParts(e);this.dirParts.forEach((e=>{if(e.length>1)e.pop()}));this.followSymlinks=i;this.statMethod=i?Hi:ji}checkGlobSymlink(e){if(this.globSymlink===undefined){this.globSymlink=e.fullParentDir===this.fullWatchPath?false:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}}if(this.globSymlink){return e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath)}return e.fullPath}entryPath(e){return Jt.join(this.watchPath,Jt.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:t}=e;if(t&&t.isSymbolicLink())return this.filterDir(e);const i=this.entryPath(e);const s=this.hasGlob&&typeof this.globFilter===Di?this.globFilter(i):true;return s&&this.fsw._isntIgnored(i,t)&&this.fsw._hasReadPermissions(t)}getDirParts(e){if(!this.hasGlob)return[];const t=[];const i=e.includes(ki)?ri.expand(e):[e];i.forEach((e=>{t.push(Jt.relative(this.watchPath,e).split(Si))}));return t}filterDir(e){if(this.hasGlob){const t=this.getDirParts(this.checkGlobSymlink(e));let i=false;this.unmatchedGlob=!this.dirParts.some((e=>e.every(((e,s)=>{if(e===Ri)i=true;return i||!t[0][s]||ii(e,t[0][s],$i)}))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class FSWatcher extends Qt{constructor(e){super();const t={};if(e)Object.assign(t,e);this._watched=new Map;this._closers=new Map;this._ignoredPaths=new Set;this._throttled=new Map;this._symlinkPaths=new Map;this._streams=new Set;this.closed=false;if(undef(t,"persistent"))t.persistent=true;if(undef(t,"ignoreInitial"))t.ignoreInitial=false;if(undef(t,"ignorePermissionErrors"))t.ignorePermissionErrors=false;if(undef(t,"interval"))t.interval=100;if(undef(t,"binaryInterval"))t.binaryInterval=300;if(undef(t,"disableGlobbing"))t.disableGlobbing=false;t.enableBinaryInterval=t.binaryInterval!==t.interval;if(undef(t,"useFsEvents"))t.useFsEvents=!t.usePolling;const i=li.canUse();if(!i)t.useFsEvents=false;if(undef(t,"usePolling")&&!t.useFsEvents){t.usePolling=Vi}if(Bi){t.usePolling=true}const s=process.env.CHOKIDAR_USEPOLLING;if(s!==undefined){const e=s.toLowerCase();if(e==="false"||e==="0"){t.usePolling=false}else if(e==="true"||e==="1"){t.usePolling=true}else{t.usePolling=!!e}}const n=process.env.CHOKIDAR_INTERVAL;if(n){t.interval=Number.parseInt(n,10)}if(undef(t,"atomic"))t.atomic=!t.usePolling&&!t.useFsEvents;if(t.atomic)this._pendingUnlinks=new Map;if(undef(t,"followSymlinks"))t.followSymlinks=true;if(undef(t,"awaitWriteFinish"))t.awaitWriteFinish=false;if(t.awaitWriteFinish===true)t.awaitWriteFinish={};const r=t.awaitWriteFinish;if(r){if(!r.stabilityThreshold)r.stabilityThreshold=2e3;if(!r.pollInterval)r.pollInterval=100;this._pendingWrites=new Map}if(t.ignored)t.ignored=arrify(t.ignored);let o=0;this._emitReady=()=>{o++;if(o>=this._readyCount){this._emitReady=Li;this._readyEmitted=true;process.nextTick((()=>this.emit(ui)))}};this._emitRaw=(...e)=>this.emit(gi,...e);this._readyEmitted=false;this.options=t;if(t.useFsEvents){this._fsEventsHandler=new li(this)}else{this._nodeFsHandler=new oi(this)}Object.freeze(t)}add(e,t,i){const{cwd:s,disableGlobbing:n}=this.options;this.closed=false;let r=unifyPaths(e);if(s){r=r.map((e=>{const t=getAbsolutePath(e,s);if(n||!ni(e)){return t}return ai(t)}))}r=r.filter((e=>{if(e.startsWith(_i)){this._ignoredPaths.add(e.slice(1));return false}this._ignoredPaths.delete(e);this._ignoredPaths.delete(e+Ti);this._userIgnored=undefined;return true}));if(this.options.useFsEvents&&this._fsEventsHandler){if(!this._readyCount)this._readyCount=r.length;if(this.options.persistent)this._readyCount*=2;r.forEach((e=>this._fsEventsHandler._addToFsEvents(e)))}else{if(!this._readyCount)this._readyCount=0;this._readyCount+=r.length;Promise.all(r.map((async e=>{const s=await this._nodeFsHandler._addToNodeFs(e,!i,0,0,t);if(s)this._emitReady();return s}))).then((e=>{if(this.closed)return;e.filter((e=>e)).forEach((e=>{this.add(Jt.dirname(e),Jt.basename(t||e))}))}))}return this}unwatch(e){if(this.closed)return this;const t=unifyPaths(e);const{cwd:i}=this.options;t.forEach((e=>{if(!Jt.isAbsolute(e)&&!this._closers.has(e)){if(i)e=Jt.join(i,e);e=Jt.resolve(e)}this._closePath(e);this._ignoredPaths.add(e);if(this._watched.has(e)){this._ignoredPaths.add(e+Ti)}this._userIgnored=undefined}));return this}close(){if(this.closed)return this._closePromise;this.closed=true;this.removeAllListeners();const e=[];this._closers.forEach((t=>t.forEach((t=>{const i=t();if(i instanceof Promise)e.push(i)}))));this._streams.forEach((e=>e.destroy()));this._userIgnored=undefined;this._readyCount=0;this._readyEmitted=false;this._watched.forEach((e=>e.dispose()));["closers","watched","streams","symlinkPaths","throttled"].forEach((e=>{this[`_${e}`].clear()}));this._closePromise=e.length?Promise.all(e).then((()=>undefined)):Promise.resolve();return this._closePromise}getWatched(){const e={};this._watched.forEach(((t,i)=>{const s=this.options.cwd?Jt.relative(this.options.cwd,i):i;e[s||Pi]=t.getChildren().sort()}));return e}emitWithAll(e,t){this.emit(...t);if(e!==yi)this.emit(ci,...t)}async _emit(e,t,i,s,n){if(this.closed)return;const r=this.options;if(Fi)t=Jt.normalize(t);if(r.cwd)t=Jt.relative(r.cwd,t);const o=[e,t];if(n!==undefined)o.push(i,s,n);else if(s!==undefined)o.push(i,s);else if(i!==undefined)o.push(i);const l=r.awaitWriteFinish;let c;if(l&&(c=this._pendingWrites.get(t))){c.lastChange=new Date;return this}if(r.atomic){if(e===pi){this._pendingUnlinks.set(t,o);setTimeout((()=>{this._pendingUnlinks.forEach(((e,t)=>{this.emit(...e);this.emit(ci,...e);this._pendingUnlinks.delete(t)}))}),typeof r.atomic==="number"?r.atomic:100);return this}if(e===hi&&this._pendingUnlinks.has(t)){e=o[0]=di;this._pendingUnlinks.delete(t)}}if(l&&(e===hi||e===di)&&this._readyEmitted){const awfEmit=(t,i)=>{if(t){e=o[0]=yi;o[1]=t;this.emitWithAll(e,o)}else if(i){if(o.length>2){o[2]=i}else{o.push(i)}this.emitWithAll(e,o)}};this._awaitWriteFinish(t,l.stabilityThreshold,e,awfEmit);return this}if(e===di){const e=!this._throttle(di,t,50);if(e)return this}if(r.alwaysStat&&i===undefined&&(e===hi||e===fi||e===di)){const e=r.cwd?Jt.join(r.cwd,t):t;let i;try{i=await zi(e)}catch(e){}if(!i||this.closed)return;o.push(i)}this.emitWithAll(e,o);return this}_handleError(e){const t=e&&e.code;if(e&&t!=="ENOENT"&&t!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||t!=="EPERM"&&t!=="EACCES")){this.emit(yi,e)}return e||this.closed}_throttle(e,t,i){if(!this._throttled.has(e)){this._throttled.set(e,new Map)}const s=this._throttled.get(e);const n=s.get(t);if(n){n.count++;return false}let r;const clear=()=>{const e=s.get(t);const i=e?e.count:0;s.delete(t);clearTimeout(r);if(e)clearTimeout(e.timeoutObject);return i};r=setTimeout(clear,i);const o={timeoutObject:r,clear:clear,count:0};s.set(t,o);return o}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,t,i,s){let n;let r=e;if(this.options.cwd&&!Jt.isAbsolute(e)){r=Jt.join(this.options.cwd,e)}const o=new Date;const awaitWriteFinish=i=>{Zt.stat(r,((r,o)=>{if(r||!this._pendingWrites.has(e)){if(r&&r.code!=="ENOENT")s(r);return}const l=Number(new Date);if(i&&o.size!==i.size){this._pendingWrites.get(e).lastChange=l}const c=this._pendingWrites.get(e);const u=l-c.lastChange;if(u>=t){this._pendingWrites.delete(e);s(undefined,o)}else{n=setTimeout(awaitWriteFinish,this.options.awaitWriteFinish.pollInterval,o)}}))};if(!this._pendingWrites.has(e)){this._pendingWrites.set(e,{lastChange:o,cancelWait:()=>{this._pendingWrites.delete(e);clearTimeout(n);return i}});n=setTimeout(awaitWriteFinish,this.options.awaitWriteFinish.pollInterval)}}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,t){if(this.options.atomic&&Ai.test(e))return true;if(!this._userIgnored){const{cwd:e}=this.options;const t=this.options.ignored;const i=t&&t.map(normalizeIgnored(e));const s=arrify(i).filter((e=>typeof e===Oi&&!ni(e))).map((e=>e+Ti));const n=this._getGlobIgnored().map(normalizeIgnored(e)).concat(i,s);this._userIgnored=ii(n,undefined,$i)}return this._userIgnored([e,t])}_isntIgnored(e,t){return!this._isIgnored(e,t)}_getWatchHelpers(e,t){const i=t||this.options.disableGlobbing||!ni(e)?e:si(e);const s=this.options.followSymlinks;return new WatchHelper(e,i,s,this)}_getWatchedDir(e){if(!this._boundRemove)this._boundRemove=this._remove.bind(this);const t=Jt.resolve(e);if(!this._watched.has(t))this._watched.set(t,new DirEntry(t,this._boundRemove));return this._watched.get(t)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return true;const t=e&&Number.parseInt(e.mode,10);const i=t&511;const s=Number.parseInt(i.toString(8)[0],10);return Boolean(4&s)}_remove(e,t,i){const s=Jt.join(e,t);const n=Jt.resolve(s);i=i!=null?i:this._watched.has(s)||this._watched.has(n);if(!this._throttle("remove",s,100))return;if(!i&&!this.options.useFsEvents&&this._watched.size===1){this.add(e,t,true)}const r=this._getWatchedDir(s);const o=r.getChildren();o.forEach((e=>this._remove(s,e)));const l=this._getWatchedDir(e);const c=l.has(t);l.remove(t);if(this._symlinkPaths.has(n)){this._symlinkPaths.delete(n)}let u=s;if(this.options.cwd)u=Jt.relative(this.options.cwd,s);if(this.options.awaitWriteFinish&&this._pendingWrites.has(u)){const e=this._pendingWrites.get(u).cancelWait();if(e===hi)return}this._watched.delete(s);this._watched.delete(n);const h=i?mi:pi;if(c&&!this._isIgnored(s))this._emit(h,s);if(!this.options.useFsEvents){this._closePath(s)}}_closePath(e){this._closeFile(e);const t=Jt.dirname(e);this._getWatchedDir(t).remove(Jt.basename(e))}_closeFile(e){const t=this._closers.get(e);if(!t)return;t.forEach((e=>e()));this._closers.delete(e)}_addPathCloser(e,t){if(!t)return;let i=this._closers.get(e);if(!i){i=[];this._closers.set(e,i)}i.push(t)}_readdirp(e,t){if(this.closed)return;const i={type:ci,alwaysStat:true,lstat:true,...t};let s=ti(e,i);this._streams.add(s);s.once(Ei,(()=>{s=undefined}));s.once(xi,(()=>{if(s){this._streams.delete(s);s=undefined}}));return s}}h.FSWatcher=FSWatcher;const watch=(e,t)=>{const i=new FSWatcher(t);i.add(e);return i};h.watch=watch;t.chokidar=h},173:(e,t,i)=>{"use strict";
|
|
56
|
+
/*
|
|
57
|
+
@license
|
|
58
|
+
Rollup.js v2.79.0
|
|
59
|
+
Wed, 31 Aug 2022 04:52:13 GMT - commit 8477f8ff1fe80086556021542b22942ad27a0a69
|
|
60
|
+
|
|
61
|
+
https://github.com/rollup/rollup
|
|
62
|
+
|
|
63
|
+
Released under the MIT License.
|
|
64
|
+
*/const s=i(17);const n={c:"config",d:"dir",e:"external",f:"format",g:"globals",h:"help",i:"input",m:"sourcemap",n:"name",o:"file",p:"plugin",v:"version",w:"watch"};function mergeOptions(e,t={external:[],globals:undefined},i=s.defaultOnWarn){const r=getCommandOptions(t);const o=mergeInputOptions(e,r,i);const l=o.onwarn;if(r.output){Object.assign(r,r.output)}const c=s.ensureArray(e.output);if(c.length===0)c.push({});const u=c.map((e=>mergeOutputOptions(e,r,l)));s.warnUnknownOptions(r,Object.keys(o).concat(Object.keys(u[0]).filter((e=>e!=="sourcemapPathTransform")),Object.keys(n),"config","environment","plugin","silent","failAfterWarnings","stdin","waitForBundleInput","configPlugin"),"CLI flags",l,/^_$|output$|config/);o.output=u;return o}function getCommandOptions(e){const t=e.external&&typeof e.external==="string"?e.external.split(","):[];return{...e,external:t,globals:typeof e.globals==="string"?e.globals.split(",").reduce(((e,i)=>{const[s,n]=i.split(":");e[s]=n;if(!t.includes(s)){t.push(s)}return e}),Object.create(null)):undefined}}function mergeInputOptions(e,t,i){const getOption=i=>{var s;return(s=t[i])!==null&&s!==void 0?s:e[i]};const n={acorn:getOption("acorn"),acornInjectPlugins:e.acornInjectPlugins,cache:e.cache,context:getOption("context"),experimentalCacheExpiry:getOption("experimentalCacheExpiry"),external:getExternal(e,t),inlineDynamicImports:getOption("inlineDynamicImports"),input:getOption("input")||[],makeAbsoluteExternalsRelative:getOption("makeAbsoluteExternalsRelative"),manualChunks:getOption("manualChunks"),maxParallelFileOps:getOption("maxParallelFileOps"),maxParallelFileReads:getOption("maxParallelFileReads"),moduleContext:getOption("moduleContext"),onwarn:getOnWarn(e,i),perf:getOption("perf"),plugins:s.ensureArray(e.plugins),preserveEntrySignatures:getOption("preserveEntrySignatures"),preserveModules:getOption("preserveModules"),preserveSymlinks:getOption("preserveSymlinks"),shimMissingExports:getOption("shimMissingExports"),strictDeprecations:getOption("strictDeprecations"),treeshake:getObjectOption(e,t,"treeshake",s.objectifyOptionWithPresets(s.treeshakePresets,"treeshake","false, true, ")),watch:getWatch(e,t)};s.warnUnknownOptions(e,Object.keys(n),"input options",n.onwarn,/^output$/);return n}const getExternal=(e,t)=>{const i=e.external;return typeof i==="function"?(e,s,n)=>i(e,s,n)||t.external.includes(e):s.ensureArray(i).concat(t.external)};const getOnWarn=(e,t)=>e.onwarn?i=>e.onwarn(i,t):t;const getObjectOption=(e,t,i,n=s.objectifyOption)=>{const r=normalizeObjectOptionValue(t[i],n);const o=normalizeObjectOptionValue(e[i],n);if(r!==undefined){return r&&{...o,...r}}return o};const getWatch=(e,t)=>e.watch!==false&&getObjectOption(e,t,"watch");const isWatchEnabled=e=>{if(Array.isArray(e)){return e.reduce(((e,t)=>typeof t==="boolean"?t:e),false)}return e===true};const normalizeObjectOptionValue=(e,t)=>{if(!e){return e}if(Array.isArray(e)){return e.reduce(((e,i)=>i&&e&&{...e,...t(i)}),{})}return t(e)};function mergeOutputOptions(e,t,i){const getOption=i=>{var s;return(s=t[i])!==null&&s!==void 0?s:e[i]};const n={amd:getObjectOption(e,t,"amd"),assetFileNames:getOption("assetFileNames"),banner:getOption("banner"),chunkFileNames:getOption("chunkFileNames"),compact:getOption("compact"),dir:getOption("dir"),dynamicImportFunction:getOption("dynamicImportFunction"),entryFileNames:getOption("entryFileNames"),esModule:getOption("esModule"),exports:getOption("exports"),extend:getOption("extend"),externalLiveBindings:getOption("externalLiveBindings"),file:getOption("file"),footer:getOption("footer"),format:getOption("format"),freeze:getOption("freeze"),generatedCode:getObjectOption(e,t,"generatedCode",s.objectifyOptionWithPresets(s.generatedCodePresets,"output.generatedCode","")),globals:getOption("globals"),hoistTransitiveImports:getOption("hoistTransitiveImports"),indent:getOption("indent"),inlineDynamicImports:getOption("inlineDynamicImports"),interop:getOption("interop"),intro:getOption("intro"),manualChunks:getOption("manualChunks"),minifyInternalExports:getOption("minifyInternalExports"),name:getOption("name"),namespaceToStringTag:getOption("namespaceToStringTag"),noConflict:getOption("noConflict"),outro:getOption("outro"),paths:getOption("paths"),plugins:s.ensureArray(e.plugins),preferConst:getOption("preferConst"),preserveModules:getOption("preserveModules"),preserveModulesRoot:getOption("preserveModulesRoot"),sanitizeFileName:getOption("sanitizeFileName"),sourcemap:getOption("sourcemap"),sourcemapBaseUrl:getOption("sourcemapBaseUrl"),sourcemapExcludeSources:getOption("sourcemapExcludeSources"),sourcemapFile:getOption("sourcemapFile"),sourcemapPathTransform:getOption("sourcemapPathTransform"),strict:getOption("strict"),systemNullSetters:getOption("systemNullSetters"),validate:getOption("validate")};s.warnUnknownOptions(e,Object.keys(n),"output options",i);return n}t.commandAliases=n;t.isWatchEnabled=isWatchEnabled;t.mergeOptions=mergeOptions},17:(e,t,i)=>{"use strict";
|
|
65
|
+
/*
|
|
66
|
+
@license
|
|
67
|
+
Rollup.js v2.79.0
|
|
68
|
+
Wed, 31 Aug 2022 04:52:13 GMT - commit 8477f8ff1fe80086556021542b22942ad27a0a69
|
|
69
|
+
|
|
70
|
+
https://github.com/rollup/rollup
|
|
71
|
+
|
|
72
|
+
Released under the MIT License.
|
|
73
|
+
*/const s=i(822);const n=i(282);const r=i(74);const o=i(113);const l=i(147);const c=i(361);function _interopNamespaceDefault(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e){t[i]=e[i]}}t.default=e;return t}var u="2.79.0";function ensureArray$1(e){if(Array.isArray(e)){return e.filter(Boolean)}if(e){return[e]}return[]}function getLocator$1(e,t){if(t===void 0){t={}}var i=t.offsetLine||0;var s=t.offsetColumn||0;var n=e.split("\n");var r=0;var o=n.map((function(e,t){var i=r+e.length+1;var s={start:r,end:i,line:t};r=i;return s}));var l=0;function rangeContains(e,t){return e.start<=t&&t<e.end}function getLocation(e,t){return{line:i+e.line,column:s+t-e.start,character:t}}function locate(t,i){if(typeof t==="string"){t=e.indexOf(t,i||0)}var s=o[l];var n=t>=s.end?1:-1;while(s){if(rangeContains(s,t))return getLocation(s,t);l+=n;s=o[l]}}return locate}function locate(e,t,i){if(typeof i==="number"){throw new Error("locate takes a { startIndex, offsetLine, offsetColumn } object as the third argument")}return getLocator$1(e,i)(t,i&&i.startIndex)}function spaces(e){let t="";while(e--)t+=" ";return t}function tabsToSpaces(e){return e.replace(/^\t+/,(e=>e.split("\t").join(" ")))}function getCodeFrame(e,t,i){let s=e.split("\n");const n=Math.max(0,t-3);let r=Math.min(t+2,s.length);s=s.slice(n,r);while(!/\S/.test(s[s.length-1])){s.pop();r-=1}const o=String(r).length;return s.map(((e,s)=>{const r=n+s+1===t;let l=String(s+n+1);while(l.length<o)l=` ${l}`;if(r){const t=spaces(o+2+tabsToSpaces(e.slice(0,i)).length)+"^";return`${l}: ${tabsToSpaces(e)}\n${t}`}return`${l}: ${tabsToSpaces(e)}`})).join("\n")}function printQuotedStringList(e,t){const i=e.length<=1;const s=e.map((e=>`"${e}"`));let n=i?s[0]:`${s.slice(0,-1).join(", ")} and ${s.slice(-1)[0]}`;if(t){n+=` ${i?t[0]:t[1]}`}return n}const h=/[/\\]/;function relative(e,t){const i=e.split(h).filter(Boolean);const s=t.split(h).filter(Boolean);if(i[0]===".")i.shift();if(s[0]===".")s.shift();while(i[0]&&s[0]&&i[0]===s[0]){i.shift();s.shift()}while(s[0]===".."&&i.length>0){s.shift();i.pop()}while(i.pop()){s.unshift("..")}return s.join("/")}const d=/^(?:\/|(?:[A-Za-z]:)?[\\|/])/;const p=/^\.?\.(\/|$)/;function isAbsolute(e){return d.test(e)}function isRelative(e){return p.test(e)}const f=/\\/g;function normalize(e){return e.replace(f,"/")}function getAliasName(e){const t=s.basename(e);return t.substring(0,t.length-s.extname(e).length)}function relativeId(e){if(!isAbsolute(e))return e;return relative(s.resolve(),e)}function isPathFragment(e){return e[0]==="/"||e[0]==="."&&(e[1]==="/"||e[1]===".")||isAbsolute(e)}const m=/^(\.\.\/)*\.\.$/;function getImportPath(e,t,i,n){let r=normalize(relative(s.dirname(e),t));if(i&&r.endsWith(".js")){r=r.slice(0,-3)}if(n){if(r==="")return"../"+s.basename(t);if(m.test(r)){return r.split("/").concat(["..",s.basename(t)]).join("/")}}return!r?".":r.startsWith("..")?r:"./"+r}function error(e){if(!(e instanceof Error))e=Object.assign(new Error(e.message),e);throw e}function augmentCodeLocation(e,t,i,s){if(typeof t==="object"){const{line:i,column:n}=t;e.loc={column:n,file:s,line:i}}else{e.pos=t;const{line:n,column:r}=locate(i,t,{offsetLine:1});e.loc={column:r,file:s,line:n}}if(e.frame===undefined){const{line:t,column:s}=e.loc;e.frame=getCodeFrame(i,t,s)}}var g;(function(e){e["ALREADY_CLOSED"]="ALREADY_CLOSED";e["ASSET_NOT_FINALISED"]="ASSET_NOT_FINALISED";e["ASSET_NOT_FOUND"]="ASSET_NOT_FOUND";e["ASSET_SOURCE_ALREADY_SET"]="ASSET_SOURCE_ALREADY_SET";e["ASSET_SOURCE_MISSING"]="ASSET_SOURCE_MISSING";e["BAD_LOADER"]="BAD_LOADER";e["CANNOT_EMIT_FROM_OPTIONS_HOOK"]="CANNOT_EMIT_FROM_OPTIONS_HOOK";e["CHUNK_NOT_GENERATED"]="CHUNK_NOT_GENERATED";e["CHUNK_INVALID"]="CHUNK_INVALID";e["CIRCULAR_REEXPORT"]="CIRCULAR_REEXPORT";e["CYCLIC_CROSS_CHUNK_REEXPORT"]="CYCLIC_CROSS_CHUNK_REEXPORT";e["DEPRECATED_FEATURE"]="DEPRECATED_FEATURE";e["EXTERNAL_SYNTHETIC_EXPORTS"]="EXTERNAL_SYNTHETIC_EXPORTS";e["FILE_NAME_CONFLICT"]="FILE_NAME_CONFLICT";e["FILE_NOT_FOUND"]="FILE_NOT_FOUND";e["INPUT_HOOK_IN_OUTPUT_PLUGIN"]="INPUT_HOOK_IN_OUTPUT_PLUGIN";e["INVALID_CHUNK"]="INVALID_CHUNK";e["INVALID_EXPORT_OPTION"]="INVALID_EXPORT_OPTION";e["INVALID_EXTERNAL_ID"]="INVALID_EXTERNAL_ID";e["INVALID_OPTION"]="INVALID_OPTION";e["INVALID_PLUGIN_HOOK"]="INVALID_PLUGIN_HOOK";e["INVALID_ROLLUP_PHASE"]="INVALID_ROLLUP_PHASE";e["MISSING_EXPORT"]="MISSING_EXPORT";e["MISSING_IMPLICIT_DEPENDANT"]="MISSING_IMPLICIT_DEPENDANT";e["MIXED_EXPORTS"]="MIXED_EXPORTS";e["NAMESPACE_CONFLICT"]="NAMESPACE_CONFLICT";e["AMBIGUOUS_EXTERNAL_NAMESPACES"]="AMBIGUOUS_EXTERNAL_NAMESPACES";e["NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE"]="NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE";e["PLUGIN_ERROR"]="PLUGIN_ERROR";e["PREFER_NAMED_EXPORTS"]="PREFER_NAMED_EXPORTS";e["SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT"]="SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT";e["UNEXPECTED_NAMED_IMPORT"]="UNEXPECTED_NAMED_IMPORT";e["UNRESOLVED_ENTRY"]="UNRESOLVED_ENTRY";e["UNRESOLVED_IMPORT"]="UNRESOLVED_IMPORT";e["VALIDATION_ERROR"]="VALIDATION_ERROR"})(g||(g={}));function errAssetNotFinalisedForFileName(e){return{code:g.ASSET_NOT_FINALISED,message:`Plugin error - Unable to get file name for asset "${e}". Ensure that the source is set and that generate is called first.`}}function errCannotEmitFromOptionsHook(){return{code:g.CANNOT_EMIT_FROM_OPTIONS_HOOK,message:`Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.`}}function errChunkNotGeneratedForFileName(e){return{code:g.CHUNK_NOT_GENERATED,message:`Plugin error - Unable to get file name for chunk "${e}". Ensure that generate is called first.`}}function errChunkInvalid({fileName:e,code:t},i){const s={code:g.CHUNK_INVALID,message:`Chunk "${e}" is not valid JavaScript: ${i.message}.`};augmentCodeLocation(s,i.loc,t,e);return s}function errCircularReexport(e,t){return{code:g.CIRCULAR_REEXPORT,id:t,message:`"${e}" cannot be exported from ${relativeId(t)} as it is a reexport that references itself.`}}function errCyclicCrossChunkReexport(e,t,i,s){return{code:g.CYCLIC_CROSS_CHUNK_REEXPORT,exporter:t,importer:s,message:`Export "${e}" of module ${relativeId(t)} was reexported through module ${relativeId(i)} while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.\nEither change the import in ${relativeId(s)} to point directly to the exporting module or do not use "preserveModules" to ensure these modules end up in the same chunk.`,reexporter:i}}function errAssetReferenceIdNotFoundForSetSource(e){return{code:g.ASSET_NOT_FOUND,message:`Plugin error - Unable to set the source for unknown asset "${e}".`}}function errAssetSourceAlreadySet(e){return{code:g.ASSET_SOURCE_ALREADY_SET,message:`Unable to set the source for asset "${e}", source already set.`}}function errNoAssetSourceSet(e){return{code:g.ASSET_SOURCE_MISSING,message:`Plugin error creating asset "${e}" - no asset source set.`}}function errBadLoader(e){return{code:g.BAD_LOADER,message:`Error loading ${relativeId(e)}: plugin load hook should return a string, a { code, map } object, or nothing/null`}}function errDeprecation(e){return{code:g.DEPRECATED_FEATURE,...typeof e==="string"?{message:e}:e}}function errFileReferenceIdNotFoundForFilename(e){return{code:g.FILE_NOT_FOUND,message:`Plugin error - Unable to get file name for unknown file "${e}".`}}function errFileNameConflict(e){return{code:g.FILE_NAME_CONFLICT,message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}function errInputHookInOutputPlugin(e,t){return{code:g.INPUT_HOOK_IN_OUTPUT_PLUGIN,message:`The "${t}" hook used by the output plugin ${e} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}}function errCannotAssignModuleToChunk(e,t,i){return{code:g.INVALID_CHUNK,message:`Cannot assign ${relativeId(e)} to the "${t}" chunk as it is already in the "${i}" chunk.`}}function errInvalidExportOptionValue(e){return{code:g.INVALID_EXPORT_OPTION,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${e}"`,url:`https://rollupjs.org/guide/en/#outputexports`}}function errIncompatibleExportOptionValue(e,t,i){return{code:"INVALID_EXPORT_OPTION",message:`"${e}" was specified for "output.exports", but entry module "${relativeId(i)}" has the following exports: ${t.join(", ")}`}}function errInternalIdCannotBeExternal(e,t){return{code:g.INVALID_EXTERNAL_ID,message:`'${e}' is imported as an external by ${relativeId(t)}, but is already an existing non-external module id.`}}function errInvalidOption(e,t,i,s){return{code:g.INVALID_OPTION,message:`Invalid value ${s!==undefined?`${JSON.stringify(s)} `:""}for option "${e}" - ${i}.`,url:`https://rollupjs.org/guide/en/#${t}`}}function errInvalidAddonPluginHook(e,t){return{code:g.INVALID_PLUGIN_HOOK,hook:e,message:`Error running plugin hook ${e} for plugin ${t}, expected a string, a function hook or an object with a "handler" string or function.`,plugin:t}}function errInvalidFunctionPluginHook(e,t){return{code:g.INVALID_PLUGIN_HOOK,hook:e,message:`Error running plugin hook ${e} for plugin ${t}, expected a function hook or an object with a "handler" function.`,plugin:t}}function errInvalidRollupPhaseForAddWatchFile(){return{code:g.INVALID_ROLLUP_PHASE,message:`Cannot call addWatchFile after the build has finished.`}}function errInvalidRollupPhaseForChunkEmission(){return{code:g.INVALID_ROLLUP_PHASE,message:`Cannot emit chunks after module loading has finished.`}}function errMissingExport(e,t,i){return{code:g.MISSING_EXPORT,message:`'${e}' is not exported by ${relativeId(i)}, imported by ${relativeId(t)}`,url:`https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module`}}function errImplicitDependantCannotBeExternal(e,t){return{code:g.MISSING_IMPLICIT_DEPENDANT,message:`Module "${relativeId(e)}" that should be implicitly loaded before "${relativeId(t)}" cannot be external.`}}function errUnresolvedImplicitDependant(e,t){return{code:g.MISSING_IMPLICIT_DEPENDANT,message:`Module "${relativeId(e)}" that should be implicitly loaded before "${relativeId(t)}" could not be resolved.`}}function errImplicitDependantIsNotIncluded(e){const t=Array.from(e.implicitlyLoadedBefore,(e=>relativeId(e.id))).sort();return{code:g.MISSING_IMPLICIT_DEPENDANT,message:`Module "${relativeId(e.id)}" that should be implicitly loaded before ${printQuotedStringList(t)} is not included in the module graph. Either it was not imported by an included module or only via a tree-shaken dynamic import, or no imported bindings were used and it had otherwise no side-effects.`}}function errMixedExport(e,t){return{code:g.MIXED_EXPORTS,id:e,message:`Entry module "${relativeId(e)}" is using named and default exports together. Consumers of your bundle will have to use \`${t||"chunk"}["default"]\` to access the default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning`,url:`https://rollupjs.org/guide/en/#outputexports`}}function errNamespaceConflict(e,t,i){return{code:g.NAMESPACE_CONFLICT,message:`Conflicting namespaces: "${relativeId(t)}" re-exports "${e}" from one of the modules ${printQuotedStringList(i.map((e=>relativeId(e))))} (will be ignored)`,name:e,reexporter:t,sources:i}}function errAmbiguousExternalNamespaces(e,t,i,s){return{code:g.AMBIGUOUS_EXTERNAL_NAMESPACES,message:`Ambiguous external namespace resolution: "${relativeId(t)}" re-exports "${e}" from one of the external modules ${printQuotedStringList(s.map((e=>relativeId(e))))}, guessing "${relativeId(i)}".`,name:e,reexporter:t,sources:s}}function errNoTransformMapOrAstWithoutCode(e){return{code:g.NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE,message:`The plugin "${e}" returned a "map" or "ast" without returning `+'a "code". This will be ignored.'}}function errPreferNamedExports(e){const t=relativeId(e);return{code:g.PREFER_NAMED_EXPORTS,id:e,message:`Entry module "${t}" is implicitly using "default" export mode, which means for CommonJS output that its default export is assigned to "module.exports". For many tools, such CommonJS output will not be interchangeable with the original ES module. If this is intended, explicitly set "output.exports" to either "auto" or "default", otherwise you might want to consider changing the signature of "${t}" to use named exports only.`,url:`https://rollupjs.org/guide/en/#outputexports`}}function errSyntheticNamedExportsNeedNamespaceExport(e,t){return{code:g.SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT,id:e,message:`Module "${relativeId(e)}" that is marked with 'syntheticNamedExports: ${JSON.stringify(t)}' needs ${typeof t==="string"&&t!=="default"?`an explicit export named "${t}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}}function errUnexpectedNamedImport(e,t,i){const s=i?"reexport":"import";return{code:g.UNEXPECTED_NAMED_IMPORT,id:e,message:`The named export "${t}" was ${s}ed from the external module ${relativeId(e)} even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:"https://rollupjs.org/guide/en/#outputinterop"}}function errUnexpectedNamespaceReexport(e){return{code:g.UNEXPECTED_NAMED_IMPORT,id:e,message:`There was a namespace "*" reexport from the external module ${relativeId(e)} even though its interop type is "defaultOnly". This will be ignored as namespace reexports only reexport named exports. If this is not intended, either remove or change this reexport or change the value of the "output.interop" option.`,url:"https://rollupjs.org/guide/en/#outputinterop"}}function errEntryCannotBeExternal(e){return{code:g.UNRESOLVED_ENTRY,message:`Entry module cannot be external (${relativeId(e)}).`}}function errUnresolvedEntry(e){return{code:g.UNRESOLVED_ENTRY,message:`Could not resolve entry module (${relativeId(e)}).`}}function errUnresolvedImport(e,t){return{code:g.UNRESOLVED_IMPORT,message:`Could not resolve '${e}' from ${relativeId(t)}`}}function errUnresolvedImportTreatedAsExternal(e,t){return{code:g.UNRESOLVED_IMPORT,importer:relativeId(t),message:`'${e}' is imported by ${relativeId(t)}, but could not be resolved – treating it as an external dependency`,source:e,url:"https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency"}}function errExternalSyntheticExports(e,t){return{code:g.EXTERNAL_SYNTHETIC_EXPORTS,importer:relativeId(t),message:`External '${e}' can not have 'syntheticNamedExports' enabled.`,source:e}}function errFailedValidation(e){return{code:g.VALIDATION_ERROR,message:e}}function errAlreadyClosed(){return{code:g.ALREADY_CLOSED,message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}}function warnDeprecation(e,t,i){warnDeprecationWithOptions(e,t,i.onwarn,i.strictDeprecations)}function warnDeprecationWithOptions(e,t,i,s){if(t||s){const t=errDeprecation(e);if(s){return error(t)}i(t)}}const defaultOnWarn=e=>console.warn(e.message||e);function warnUnknownOptions(e,t,i,s,n=/$./){const r=new Set(t);const o=Object.keys(e).filter((e=>!(r.has(e)||n.test(e))));if(o.length>0){s({code:"UNKNOWN_OPTION",message:`Unknown ${i}: ${o.join(", ")}. Allowed options: ${[...r].sort().join(", ")}`})}}const y={recommended:{annotations:true,correctVarValueBeforeDeclaration:false,moduleSideEffects:()=>true,propertyReadSideEffects:true,tryCatchDeoptimization:true,unknownGlobalSideEffects:false},safest:{annotations:true,correctVarValueBeforeDeclaration:true,moduleSideEffects:()=>true,propertyReadSideEffects:true,tryCatchDeoptimization:true,unknownGlobalSideEffects:true},smallest:{annotations:true,correctVarValueBeforeDeclaration:false,moduleSideEffects:()=>false,propertyReadSideEffects:false,tryCatchDeoptimization:false,unknownGlobalSideEffects:false}};const E={es2015:{arrowFunctions:true,constBindings:true,objectShorthand:true,reservedNamesAsProps:true,symbols:true},es5:{arrowFunctions:false,constBindings:false,objectShorthand:false,reservedNamesAsProps:true,symbols:false}};const objectifyOption=e=>e&&typeof e==="object"?e:{};const objectifyOptionWithPresets=(e,t,i)=>s=>{if(typeof s==="string"){const n=e[s];if(n){return n}error(errInvalidOption(t,getHashFromObjectOption(t),`valid values are ${i}${printQuotedStringList(Object.keys(e))}. You can also supply an object for more fine-grained control`,s))}return objectifyOption(s)};const getOptionWithPreset=(e,t,i,s)=>{const n=e===null||e===void 0?void 0:e.preset;if(n){const s=t[n];if(s){return{...s,...e}}else{error(errInvalidOption(`${i}.preset`,getHashFromObjectOption(i),`valid values are ${printQuotedStringList(Object.keys(t))}`,n))}}return objectifyOptionWithPresets(t,i,s)(e)};const getHashFromObjectOption=e=>e.split(".").join("").toLowerCase();let x;let v;async function loadFsEvents(){try{({default:x}=await Promise.resolve().then((()=>_interopNamespaceDefault(i(249)))))}catch(e){v=e}}function getFsEvents(){if(v)throw v;return x}const b=Object.defineProperty({__proto__:null,loadFsEvents:loadFsEvents,getFsEvents:getFsEvents},Symbol.toStringTag,{value:"Module"});var S=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function getAugmentedNamespace(e){var t=e.default;if(typeof t=="function"){var a=function(){return t.apply(this,arguments)};a.prototype=t.prototype}else a={};Object.defineProperty(a,"__esModule",{value:true});Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,i.get?i:{enumerable:true,get:function(){return e[t]}})}));return a}var A={};var w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";for(var I=0;I<w.length;I++){A[w.charCodeAt(I)]=I}function decode(e){var t=[];var i=[];var s=[0,0,0,0,0];var n=0;for(var r=0,o=0,l=0;r<e.length;r++){var c=e.charCodeAt(r);if(c===44){segmentify(i,s,n);n=0}else if(c===59){segmentify(i,s,n);n=0;t.push(i);i=[];s[0]=0}else{var u=A[c];if(u===undefined){throw new Error("Invalid character ("+String.fromCharCode(c)+")")}var h=u&32;u&=31;l+=u<<o;if(h){o+=5}else{var d=l&1;l>>>=1;if(d){l=l===0?-2147483648:-l}s[n]+=l;n++;l=o=0}}}segmentify(i,s,n);t.push(i);return t}function segmentify(e,t,i){if(i===4)e.push([t[0],t[1],t[2],t[3]]);else if(i===5)e.push([t[0],t[1],t[2],t[3],t[4]]);else if(i===1)e.push([t[0]])}function encode(e){var t=0;var i=0;var s=0;var n=0;var r="";for(var o=0;o<e.length;o++){var l=e[o];if(o>0)r+=";";if(l.length===0)continue;var c=0;var u=[];for(var h=0,d=l;h<d.length;h++){var p=d[h];var f=encodeInteger(p[0]-c);c=p[0];if(p.length>1){f+=encodeInteger(p[1]-t)+encodeInteger(p[2]-i)+encodeInteger(p[3]-s);t=p[1];i=p[2];s=p[3]}if(p.length===5){f+=encodeInteger(p[4]-n);n=p[4]}u.push(f)}r+=u.join(",")}return r}function encodeInteger(e){var t="";e=e<0?-e<<1|1:e<<1;do{var i=e&31;e>>>=5;if(e>0){i|=32}t+=w[i]}while(e>0);return t}class BitSet{constructor(e){this.bits=e instanceof BitSet?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}}class Chunk$1{constructor(e,t,i){this.start=e;this.end=t;this.original=i;this.intro="";this.outro="";this.content=i;this.storeName=false;this.edited=false;Object.defineProperties(this,{previous:{writable:true,value:null},next:{writable:true,value:null}})}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new Chunk$1(this.start,this.end,this.original);e.intro=this.intro;e.outro=this.outro;e.content=this.content;e.storeName=this.storeName;e.edited=this.edited;return e}contains(e){return this.start<e&&e<this.end}eachNext(e){let t=this;while(t){e(t);t=t.next}}eachPrevious(e){let t=this;while(t){e(t);t=t.previous}}edit(e,t,i){this.content=e;if(!i){this.intro="";this.outro=""}this.storeName=t;this.edited=true;return this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}split(e){const t=e-this.start;const i=this.original.slice(0,t);const s=this.original.slice(t);this.original=i;const n=new Chunk$1(e,this.end,s);n.outro=this.outro;this.outro="";this.end=e;if(this.edited){n.edit("",false);this.content=""}else{this.content=i}n.next=this.next;if(n.next)n.next.previous=n;n.previous=this;this.next=n;return n}toString(){return this.intro+this.content+this.outro}trimEnd(e){this.outro=this.outro.replace(e,"");if(this.outro.length)return true;const t=this.content.replace(e,"");if(t.length){if(t!==this.content){this.split(this.start+t.length).edit("",undefined,true)}return true}else{this.edit("",undefined,true);this.intro=this.intro.replace(e,"");if(this.intro.length)return true}}trimStart(e){this.intro=this.intro.replace(e,"");if(this.intro.length)return true;const t=this.content.replace(e,"");if(t.length){if(t!==this.content){this.split(this.end-t.length);this.edit("",undefined,true)}return true}else{this.edit("",undefined,true);this.outro=this.outro.replace(e,"");if(this.outro.length)return true}}}let btoa=()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")};if(typeof window!=="undefined"&&typeof window.btoa==="function"){btoa=e=>window.btoa(unescape(encodeURIComponent(e)))}else if(typeof Buffer==="function"){btoa=e=>Buffer.from(e,"utf-8").toString("base64")}class SourceMap{constructor(e){this.version=3;this.file=e.file;this.sources=e.sources;this.sourcesContent=e.sourcesContent;this.names=e.names;this.mappings=encode(e.mappings)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+btoa(this.toString())}}function guessIndent(e){const t=e.split("\n");const i=t.filter((e=>/^\t+/.test(e)));const s=t.filter((e=>/^ {2,}/.test(e)));if(i.length===0&&s.length===0){return null}if(i.length>=s.length){return"\t"}const n=s.reduce(((e,t)=>{const i=/^ +/.exec(t)[0].length;return Math.min(i,e)}),Infinity);return new Array(n+1).join(" ")}function getRelativePath(e,t){const i=e.split(/[/\\]/);const s=t.split(/[/\\]/);i.pop();while(i[0]===s[0]){i.shift();s.shift()}if(i.length){let e=i.length;while(e--)i[e]=".."}return i.concat(s).join("/")}const C=Object.prototype.toString;function isObject$1(e){return C.call(e)==="[object Object]"}function getLocator(e){const t=e.split("\n");const i=[];for(let e=0,s=0;e<t.length;e++){i.push(s);s+=t[e].length+1}return function locate(e){let t=0;let s=i.length;while(t<s){const n=t+s>>1;if(e<i[n]){s=n}else{t=n+1}}const n=t-1;const r=e-i[n];return{line:n,column:r}}}class Mappings{constructor(e){this.hires=e;this.generatedCodeLine=0;this.generatedCodeColumn=0;this.raw=[];this.rawSegments=this.raw[this.generatedCodeLine]=[];this.pending=null}addEdit(e,t,i,s){if(t.length){const t=[this.generatedCodeColumn,e,i.line,i.column];if(s>=0){t.push(s)}this.rawSegments.push(t)}else if(this.pending){this.rawSegments.push(this.pending)}this.advance(t);this.pending=null}addUneditedChunk(e,t,i,s,n){let r=t.start;let o=true;while(r<t.end){if(this.hires||o||n.has(r)){this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column])}if(i[r]==="\n"){s.line+=1;s.column=0;this.generatedCodeLine+=1;this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0;o=true}else{s.column+=1;this.generatedCodeColumn+=1;o=false}r+=1}this.pending=null}advance(e){if(!e)return;const t=e.split("\n");if(t.length>1){for(let e=0;e<t.length-1;e++){this.generatedCodeLine++;this.raw[this.generatedCodeLine]=this.rawSegments=[]}this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}}const k="\n";const _={insertLeft:false,insertRight:false,storeName:false};class MagicString{constructor(e,t={}){const i=new Chunk$1(0,e.length,e);Object.defineProperties(this,{original:{writable:true,value:e},outro:{writable:true,value:""},intro:{writable:true,value:""},firstChunk:{writable:true,value:i},lastChunk:{writable:true,value:i},lastSearchedChunk:{writable:true,value:i},byStart:{writable:true,value:{}},byEnd:{writable:true,value:{}},filename:{writable:true,value:t.filename},indentExclusionRanges:{writable:true,value:t.indentExclusionRanges},sourcemapLocations:{writable:true,value:new BitSet},storedNames:{writable:true,value:{}},indentStr:{writable:true,value:guessIndent(e)}});this.byStart[0]=i;this.byEnd[e.length]=i}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!=="string")throw new TypeError("outro content must be a string");this.outro+=e;return this}appendLeft(e,t){if(typeof t!=="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];if(i){i.appendLeft(t)}else{this.intro+=t}return this}appendRight(e,t){if(typeof t!=="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];if(i){i.appendRight(t)}else{this.outro+=t}return this}clone(){const e=new MagicString(this.original,{filename:this.filename});let t=this.firstChunk;let i=e.firstChunk=e.lastSearchedChunk=t.clone();while(t){e.byStart[i.start]=i;e.byEnd[i.end]=i;const s=t.next;const n=s&&s.clone();if(n){i.next=n;n.previous=i;i=n}t=s}e.lastChunk=i;if(this.indentExclusionRanges){e.indentExclusionRanges=this.indentExclusionRanges.slice()}e.sourcemapLocations=new BitSet(this.sourcemapLocations);e.intro=this.intro;e.outro=this.outro;return e}generateDecodedMap(e){e=e||{};const t=0;const i=Object.keys(this.storedNames);const s=new Mappings(e.hires);const n=getLocator(this.original);if(this.intro){s.advance(this.intro)}this.firstChunk.eachNext((e=>{const r=n(e.start);if(e.intro.length)s.advance(e.intro);if(e.edited){s.addEdit(t,e.content,r,e.storeName?i.indexOf(e.original):-1)}else{s.addUneditedChunk(t,e,this.original,r,this.sourcemapLocations)}if(e.outro.length)s.advance(e.outro)}));return{file:e.file?e.file.split(/[/\\]/).pop():null,sources:[e.source?getRelativePath(e.file||"",e.source):null],sourcesContent:e.includeContent?[this.original]:[null],names:i,mappings:s.raw}}generateMap(e){return new SourceMap(this.generateDecodedMap(e))}getIndentString(){return this.indentStr===null?"\t":this.indentStr}indent(e,t){const i=/^[^\r\n]/gm;if(isObject$1(e)){t=e;e=undefined}e=e!==undefined?e:this.indentStr||"\t";if(e==="")return this;t=t||{};const s={};if(t.exclude){const e=typeof t.exclude[0]==="number"?[t.exclude]:t.exclude;e.forEach((e=>{for(let t=e[0];t<e[1];t+=1){s[t]=true}}))}let n=t.indentStart!==false;const replacer=t=>{if(n)return`${e}${t}`;n=true;return t};this.intro=this.intro.replace(i,replacer);let r=0;let o=this.firstChunk;while(o){const t=o.end;if(o.edited){if(!s[r]){o.content=o.content.replace(i,replacer);if(o.content.length){n=o.content[o.content.length-1]==="\n"}}}else{r=o.start;while(r<t){if(!s[r]){const t=this.original[r];if(t==="\n"){n=true}else if(t!=="\r"&&n){n=false;if(r===o.start){o.prependRight(e)}else{this._splitChunk(o,r);o=o.next;o.prependRight(e)}}}r+=1}}r=o.end;o=o.next}this.outro=this.outro.replace(i,replacer);return this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,t){if(!_.insertLeft){console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead");_.insertLeft=true}return this.appendLeft(e,t)}insertRight(e,t){if(!_.insertRight){console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead");_.insertRight=true}return this.prependRight(e,t)}move(e,t,i){if(i>=e&&i<=t)throw new Error("Cannot move a selection inside itself");this._split(e);this._split(t);this._split(i);const s=this.byStart[e];const n=this.byEnd[t];const r=s.previous;const o=n.next;const l=this.byStart[i];if(!l&&n===this.lastChunk)return this;const c=l?l.previous:this.lastChunk;if(r)r.next=o;if(o)o.previous=r;if(c)c.next=s;if(l)l.previous=n;if(!s.previous)this.firstChunk=n.next;if(!n.next){this.lastChunk=s.previous;this.lastChunk.next=null}s.previous=c;n.next=l||null;if(!c)this.firstChunk=s;if(!l)this.lastChunk=n;return this}overwrite(e,t,i,s){if(typeof i!=="string")throw new TypeError("replacement content must be a string");while(e<0)e+=this.original.length;while(t<0)t+=this.original.length;if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e);this._split(t);if(s===true){if(!_.storeName){console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string");_.storeName=true}s={storeName:true}}const n=s!==undefined?s.storeName:false;const r=s!==undefined?s.contentOnly:false;if(n){const i=this.original.slice(e,t);Object.defineProperty(this.storedNames,i,{writable:true,value:true,enumerable:true})}const o=this.byStart[e];const l=this.byEnd[t];if(o){let e=o;while(e!==l){if(e.next!==this.byStart[e.end]){throw new Error("Cannot overwrite across a split point")}e=e.next;e.edit("",false)}o.edit(i,n,r)}else{const s=new Chunk$1(e,t,"").edit(i,n);l.next=s;s.previous=l}return this}prepend(e){if(typeof e!=="string")throw new TypeError("outro content must be a string");this.intro=e+this.intro;return this}prependLeft(e,t){if(typeof t!=="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];if(i){i.prependLeft(t)}else{this.intro=t+this.intro}return this}prependRight(e,t){if(typeof t!=="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];if(i){i.prependRight(t)}else{this.outro=t+this.outro}return this}remove(e,t){while(e<0)e+=this.original.length;while(t<0)t+=this.original.length;if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e);this._split(t);let i=this.byStart[e];while(i){i.intro="";i.outro="";i.edit("");i=t>i.end?this.byStart[i.end]:null}return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);if(this.intro.length)return this.intro[this.intro.length-1];return""}lastLine(){let e=this.outro.lastIndexOf(k);if(e!==-1)return this.outro.substr(e+1);let t=this.outro;let i=this.lastChunk;do{if(i.outro.length>0){e=i.outro.lastIndexOf(k);if(e!==-1)return i.outro.substr(e+1)+t;t=i.outro+t}if(i.content.length>0){e=i.content.lastIndexOf(k);if(e!==-1)return i.content.substr(e+1)+t;t=i.content+t}if(i.intro.length>0){e=i.intro.lastIndexOf(k);if(e!==-1)return i.intro.substr(e+1)+t;t=i.intro+t}}while(i=i.previous);e=this.intro.lastIndexOf(k);if(e!==-1)return this.intro.substr(e+1)+t;return this.intro+t}slice(e=0,t=this.original.length){while(e<0)e+=this.original.length;while(t<0)t+=this.original.length;let i="";let s=this.firstChunk;while(s&&(s.start>e||s.end<=e)){if(s.start<t&&s.end>=t){return i}s=s.next}if(s&&s.edited&&s.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const n=s;while(s){if(s.intro&&(n!==s||s.start===e)){i+=s.intro}const r=s.start<t&&s.end>=t;if(r&&s.edited&&s.end!==t)throw new Error(`Cannot use replaced character ${t} as slice end anchor.`);const o=n===s?e-s.start:0;const l=r?s.content.length+t-s.end:s.content.length;i+=s.content.slice(o,l);if(s.outro&&(!r||s.end===t)){i+=s.outro}if(r){break}s=s.next}return i}snip(e,t){const i=this.clone();i.remove(0,e);i.remove(t,i.original.length);return i}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk;const i=e>t.end;while(t){if(t.contains(e))return this._splitChunk(t,e);t=i?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(e,t){if(e.edited&&e.content.length){const i=getLocator(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${i.line}:${i.column} – "${e.original}")`)}const i=e.split(t);this.byEnd[t]=e;this.byStart[t]=i;this.byEnd[i.end]=i;if(e===this.lastChunk)this.lastChunk=i;this.lastSearchedChunk=e;return true}toString(){let e=this.intro;let t=this.firstChunk;while(t){e+=t.toString();t=t.next}return e+this.outro}isEmpty(){let e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return false}while(e=e.next);return true}length(){let e=this.firstChunk;let t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const t=new RegExp((e||"\\s")+"+$");this.outro=this.outro.replace(t,"");if(this.outro.length)return true;let i=this.lastChunk;do{const e=i.end;const s=i.trimEnd(t);if(i.end!==e){if(this.lastChunk===i){this.lastChunk=i.next}this.byEnd[i.end]=i;this.byStart[i.next.start]=i.next;this.byEnd[i.next.end]=i.next}if(s)return true;i=i.previous}while(i);return false}trimEnd(e){this.trimEndAborted(e);return this}trimStartAborted(e){const t=new RegExp("^"+(e||"\\s")+"+");this.intro=this.intro.replace(t,"");if(this.intro.length)return true;let i=this.firstChunk;do{const e=i.end;const s=i.trimStart(t);if(i.end!==e){if(i===this.lastChunk)this.lastChunk=i.next;this.byEnd[i.end]=i;this.byStart[i.next.start]=i.next;this.byEnd[i.next.end]=i.next}if(s)return true;i=i.next}while(i);return false}trimStart(e){this.trimStartAborted(e);return this}hasChanged(){return this.original!==this.toString()}replace(e,t){function getReplacement(e,i){if(typeof t==="string"){return t.replace(/\$(\$|&|\d+)/g,((t,i)=>{if(i==="$")return"$";if(i==="&")return e[0];const s=+i;if(s<e.length)return e[+i];return`$${i}`}))}else{return t(...e,e.index,i,e.groups)}}function matchAll(e,t){let i;const s=[];while(i=e.exec(t)){s.push(i)}return s}if(typeof e!=="string"&&e.global){const t=matchAll(e,this.original);t.forEach((e=>{if(e.index!=null)this.overwrite(e.index,e.index+e[0].length,getReplacement(e,this.original))}))}else{const t=this.original.match(e);if(t&&t.index!=null)this.overwrite(t.index,t.index+t[0].length,getReplacement(t,this.original))}return this}}const P=Object.prototype.hasOwnProperty;class Bundle$1{constructor(e={}){this.intro=e.intro||"";this.separator=e.separator!==undefined?e.separator:"\n";this.sources=[];this.uniqueSources=[];this.uniqueSourceIndexByFilename={}}addSource(e){if(e instanceof MagicString){return this.addSource({content:e,filename:e.filename,separator:this.separator})}if(!isObject$1(e)||!e.content){throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`")}["filename","indentExclusionRanges","separator"].forEach((t=>{if(!P.call(e,t))e[t]=e.content[t]}));if(e.separator===undefined){e.separator=this.separator}if(e.filename){if(!P.call(this.uniqueSourceIndexByFilename,e.filename)){this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length;this.uniqueSources.push({filename:e.filename,content:e.content.original})}else{const t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content){throw new Error(`Illegal source: same filename (${e.filename}), different contents`)}}}this.sources.push(e);return this}append(e,t){this.addSource({content:new MagicString(e),separator:t&&t.separator||""});return this}clone(){const e=new Bundle$1({intro:this.intro,separator:this.separator});this.sources.forEach((t=>{e.addSource({filename:t.filename,content:t.content.clone(),separator:t.separator})}));return e}generateDecodedMap(e={}){const t=[];this.sources.forEach((e=>{Object.keys(e.content.storedNames).forEach((e=>{if(!~t.indexOf(e))t.push(e)}))}));const i=new Mappings(e.hires);if(this.intro){i.advance(this.intro)}this.sources.forEach(((e,s)=>{if(s>0){i.advance(this.separator)}const n=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1;const r=e.content;const o=getLocator(r.original);if(r.intro){i.advance(r.intro)}r.firstChunk.eachNext((s=>{const l=o(s.start);if(s.intro.length)i.advance(s.intro);if(e.filename){if(s.edited){i.addEdit(n,s.content,l,s.storeName?t.indexOf(s.original):-1)}else{i.addUneditedChunk(n,s,r.original,l,r.sourcemapLocations)}}else{i.advance(s.content)}if(s.outro.length)i.advance(s.outro)}));if(r.outro){i.advance(r.outro)}}));return{file:e.file?e.file.split(/[/\\]/).pop():null,sources:this.uniqueSources.map((t=>e.file?getRelativePath(e.file,t.filename):t.filename)),sourcesContent:this.uniqueSources.map((t=>e.includeContent?t.content:null)),names:t,mappings:i.raw}}generateMap(e){return new SourceMap(this.generateDecodedMap(e))}getIndentString(){const e={};this.sources.forEach((t=>{const i=t.content.indentStr;if(i===null)return;if(!e[i])e[i]=0;e[i]+=1}));return Object.keys(e).sort(((t,i)=>e[t]-e[i]))[0]||"\t"}indent(e){if(!arguments.length){e=this.getIndentString()}if(e==="")return this;let t=!this.intro||this.intro.slice(-1)==="\n";this.sources.forEach(((i,s)=>{const n=i.separator!==undefined?i.separator:this.separator;const r=t||s>0&&/\r?\n$/.test(n);i.content.indent(e,{exclude:i.indentExclusionRanges,indentStart:r});t=i.content.lastChar()==="\n"}));if(this.intro){this.intro=e+this.intro.replace(/^[^\n]/gm,((t,i)=>i>0?e+t:t))}return this}prepend(e){this.intro=e+this.intro;return this}toString(){const e=this.sources.map(((e,t)=>{const i=e.separator!==undefined?e.separator:this.separator;const s=(t>0?i:"")+e.content.toString();return s})).join("");return this.intro+e}isEmpty(){if(this.intro.length&&this.intro.trim())return false;if(this.sources.some((e=>!e.content.isEmpty())))return false;return true}length(){return this.sources.reduce(((e,t)=>e+t.content.length()),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimStart(e){const t=new RegExp("^"+(e||"\\s")+"+");this.intro=this.intro.replace(t,"");if(!this.intro){let t;let i=0;do{t=this.sources[i++];if(!t){break}}while(!t.content.trimStartAborted(e))}return this}trimEnd(e){const t=new RegExp((e||"\\s")+"+$");let i;let s=this.sources.length-1;do{i=this.sources[s--];if(!i){this.intro=this.intro.replace(t,"");break}}while(!i.content.trimEndAborted(e));return this}}function getOrCreate(e,t,i){const s=e.get(t);if(s){return s}const n=i();e.set(t,n);return n}const N=Symbol("Unknown Key");const R=Symbol("Unknown Non-Accessor Key");const T=Symbol("Unknown Integer");const $=[];const O=[N];const D=[R];const M=[T];const L=Symbol("Entities");class PathTracker{constructor(){this.entityPaths=Object.create(null,{[L]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,t){const i=this.getEntities(e);if(i.has(t))return true;i.add(t);return false}withTrackedEntityAtPath(e,t,i,s){const n=this.getEntities(e);if(n.has(t))return s;n.add(t);const r=i();n.delete(t);return r}getEntities(e){let t=this.entityPaths;for(const i of e){t=t[i]=t[i]||Object.create(null,{[L]:{value:new Set}})}return t[L]}}const F=new PathTracker;class DiscriminatedPathTracker{constructor(){this.entityPaths=Object.create(null,{[L]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,i){let s=this.entityPaths;for(const t of e){s=s[t]=s[t]||Object.create(null,{[L]:{value:new Map}})}const n=getOrCreate(s[L],t,(()=>new Set));if(n.has(i))return true;n.add(i);return false}}const V=Symbol("Unknown Value");const B=Symbol("Unknown Truthy Value");class ExpressionEntity{constructor(){this.included=false}deoptimizePath(e){}deoptimizeThisOnInteractionAtPath({thisArg:e},t,i){e.deoptimizePath(O)}getLiteralValueAtPath(e,t,i){return V}getReturnExpressionWhenCalledAtPath(e,t,i,s){return z}hasEffectsOnInteractionAtPath(e,t,i){return true}include(e,t,i){this.included=true}includeCallArguments(e,t){for(const i of t){i.include(e,false)}}shouldBeIncluded(e){return true}}const z=new class UnknownExpression extends ExpressionEntity{};const U=0;const H=1;const j=2;const G={thisArg:null,type:U};const W=[z];const q={args:W,thisArg:null,type:H};const K=[];const Y={args:K,thisArg:null,type:j,withNew:false};class Variable extends ExpressionEntity{constructor(e){super();this.name=e;this.alwaysRendered=false;this.initReached=false;this.isId=false;this.isReassigned=false;this.kind=null;this.renderBaseName=null;this.renderName=null}addReference(e){}getBaseVariableName(){return this.renderBaseName||this.renderName||this.name}getName(e){const t=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(t)}`:t}hasEffectsOnInteractionAtPath(e,{type:t},i){return t!==U||e.length>0}include(){this.included=true}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e;this.renderName=t}}class ExternalVariable extends Variable{constructor(e,t){super(t);this.referenced=false;this.module=e;this.isNamespace=t==="*"}addReference(e){this.referenced=true;if(this.name==="default"||this.name==="*"){this.module.suggestName(e.name)}}hasEffectsOnInteractionAtPath(e,{type:t}){return t!==U||e.length>(this.isNamespace?1:0)}include(){if(!this.included){this.included=true;this.module.used=true}}}const X=Object.freeze(Object.create(null));const Q=Object.freeze({});const Z=Object.freeze([]);const J=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","NaN","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);const ee=J;const te=/[^$_a-zA-Z0-9]/g;const startsWithDigit=e=>/\d/.test(e[0]);const needsEscape=e=>startsWithDigit(e)||ee.has(e)||e==="arguments";function isLegal(e){if(needsEscape(e)){return false}return!te.test(e)}function makeLegal(e){e=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase())).replace(te,"_");if(needsEscape(e))e=`_${e}`;return e||"_"}class ExternalModule{constructor(e,t,i,s,n){this.options=e;this.id=t;this.renormalizeRenderPath=n;this.declarations=new Map;this.defaultVariableName="";this.dynamicImporters=[];this.execIndex=Infinity;this.exportedVariables=new Map;this.importers=[];this.mostCommonSuggestion=0;this.nameSuggestions=new Map;this.namespaceVariableName="";this.reexported=false;this.renderPath=undefined;this.used=false;this.variableName="";this.suggestedVariableName=makeLegal(t.split(/[\\/]/).pop());const{importers:r,dynamicImporters:o}=this;const l=this.info={ast:null,code:null,dynamicallyImportedIdResolutions:Z,dynamicallyImportedIds:Z,get dynamicImporters(){return o.sort()},hasDefaultExport:null,get hasModuleSideEffects(){warnDeprecation("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",false,e);return l.moduleSideEffects},id:t,implicitlyLoadedAfterOneOf:Z,implicitlyLoadedBefore:Z,importedIdResolutions:Z,importedIds:Z,get importers(){return r.sort()},isEntry:false,isExternal:true,isIncluded:null,meta:s,moduleSideEffects:i,syntheticNamedExports:false};Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:false})}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const i=new ExternalVariable(this,e);this.declarations.set(e,i);this.exportedVariables.set(i,e);return[i]}setRenderPath(e,t){this.renderPath=typeof e.paths==="function"?e.paths(this.id):e.paths[this.id];if(!this.renderPath){this.renderPath=this.renormalizeRenderPath?normalize(s.relative(t,this.id)):this.id}}suggestName(e){var t;const i=((t=this.nameSuggestions.get(e))!==null&&t!==void 0?t:0)+1;this.nameSuggestions.set(e,i);if(i>this.mostCommonSuggestion){this.mostCommonSuggestion=i;this.suggestedVariableName=e}}warnUnusedImports(){const e=Array.from(this.declarations).filter((([e,t])=>e!=="*"&&!t.included&&!this.reexported&&!t.referenced)).map((([e])=>e));if(e.length===0)return;const t=new Set;for(const i of e){for(const e of this.declarations.get(i).module.importers){t.add(e)}}const i=[...t];this.options.onwarn({code:"UNUSED_EXTERNAL_IMPORT",message:`${printQuotedStringList(e,["is","are"])} imported from external module "${this.id}" but never used in ${printQuotedStringList(i.map((e=>relativeId(e))))}.`,names:e,source:this.id,sources:i})}}var ie={exports:{}};var se={};const ne=s;const re="\\\\/";const ae=`[^${re}]`;const oe="\\.";const le="\\+";const ce="\\?";const ue="\\/";const he="(?=.)";const de="[^/]";const pe=`(?:${ue}|$)`;const fe=`(?:^|${ue})`;const me=`${oe}{1,2}${pe}`;const ge=`(?!${oe})`;const ye=`(?!${fe}${me})`;const Ee=`(?!${oe}{0,1}${pe})`;const xe=`(?!${me})`;const ve=`[^.${ue}]`;const be=`${de}*?`;const Se={DOT_LITERAL:oe,PLUS_LITERAL:le,QMARK_LITERAL:ce,SLASH_LITERAL:ue,ONE_CHAR:he,QMARK:de,END_ANCHOR:pe,DOTS_SLASH:me,NO_DOT:ge,NO_DOTS:ye,NO_DOT_SLASH:Ee,NO_DOTS_SLASH:xe,QMARK_NO_DOT:ve,STAR:be,START_ANCHOR:fe};const Ae={...Se,SLASH_LITERAL:`[${re}]`,QMARK:ae,STAR:`${ae}*?`,DOTS_SLASH:`${oe}{1,2}(?:[${re}]|$)`,NO_DOT:`(?!${oe})`,NO_DOTS:`(?!(?:^|[${re}])${oe}{1,2}(?:[${re}]|$))`,NO_DOT_SLASH:`(?!${oe}{0,1}(?:[${re}]|$))`,NO_DOTS_SLASH:`(?!${oe}{1,2}(?:[${re}]|$))`,QMARK_NO_DOT:`[^.${re}]`,START_ANCHOR:`(?:^|[${re}])`,END_ANCHOR:`(?:[${re}]|$)`};const we={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};var Ie={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:we,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:ne.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===true?Ae:Se}};(function(e){const t=s;const i=process.platform==="win32";const{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:r,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:l}=Ie;e.isObject=e=>e!==null&&typeof e==="object"&&!Array.isArray(e);e.hasRegexChars=e=>o.test(e);e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t);e.escapeRegex=e=>e.replace(l,"\\$1");e.toPosixSlashes=e=>e.replace(n,"/");e.removeBackslashes=e=>e.replace(r,(e=>e==="\\"?"":e));e.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);if(e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10){return true}return false};e.isWindows=e=>{if(e&&typeof e.windows==="boolean"){return e.windows}return i===true||t.sep==="\\"};e.escapeLast=(t,i,s)=>{const n=t.lastIndexOf(i,s);if(n===-1)return t;if(t[n-1]==="\\")return e.escapeLast(t,i,n-1);return`${t.slice(0,n)}\\${t.slice(n)}`};e.removePrefix=(e,t={})=>{let i=e;if(i.startsWith("./")){i=i.slice(2);t.prefix="./"}return i};e.wrapOutput=(e,t={},i={})=>{const s=i.contains?"":"^";const n=i.contains?"":"$";let r=`${s}(?:${e})${n}`;if(t.negated===true){r=`(?:^(?!${r}).*$)`}return r}})(se);const Ce=se;const{CHAR_ASTERISK:ke,CHAR_AT:_e,CHAR_BACKWARD_SLASH:Pe,CHAR_COMMA:Ne,CHAR_DOT:Re,CHAR_EXCLAMATION_MARK:Te,CHAR_FORWARD_SLASH:$e,CHAR_LEFT_CURLY_BRACE:Oe,CHAR_LEFT_PARENTHESES:De,CHAR_LEFT_SQUARE_BRACKET:Me,CHAR_PLUS:Le,CHAR_QUESTION_MARK:Fe,CHAR_RIGHT_CURLY_BRACE:Ve,CHAR_RIGHT_PARENTHESES:Be,CHAR_RIGHT_SQUARE_BRACKET:ze}=Ie;const isPathSeparator=e=>e===$e||e===Pe;const depth=e=>{if(e.isPrefix!==true){e.depth=e.isGlobstar?Infinity:1}};const scan$1=(e,t)=>{const i=t||{};const s=e.length-1;const n=i.parts===true||i.scanToEnd===true;const r=[];const o=[];const l=[];let c=e;let u=-1;let h=0;let d=0;let p=false;let f=false;let m=false;let g=false;let y=false;let E=false;let x=false;let v=false;let b=false;let S=false;let A=0;let w;let I;let C={value:"",depth:0,isGlob:false};const eos=()=>u>=s;const peek=()=>c.charCodeAt(u+1);const advance=()=>{w=I;return c.charCodeAt(++u)};while(u<s){I=advance();let e;if(I===Pe){x=C.backslashes=true;I=advance();if(I===Oe){E=true}continue}if(E===true||I===Oe){A++;while(eos()!==true&&(I=advance())){if(I===Pe){x=C.backslashes=true;advance();continue}if(I===Oe){A++;continue}if(E!==true&&I===Re&&(I=advance())===Re){p=C.isBrace=true;m=C.isGlob=true;S=true;if(n===true){continue}break}if(E!==true&&I===Ne){p=C.isBrace=true;m=C.isGlob=true;S=true;if(n===true){continue}break}if(I===Ve){A--;if(A===0){E=false;p=C.isBrace=true;S=true;break}}}if(n===true){continue}break}if(I===$e){r.push(u);o.push(C);C={value:"",depth:0,isGlob:false};if(S===true)continue;if(w===Re&&u===h+1){h+=2;continue}d=u+1;continue}if(i.noext!==true){const e=I===Le||I===_e||I===ke||I===Fe||I===Te;if(e===true&&peek()===De){m=C.isGlob=true;g=C.isExtglob=true;S=true;if(I===Te&&u===h){b=true}if(n===true){while(eos()!==true&&(I=advance())){if(I===Pe){x=C.backslashes=true;I=advance();continue}if(I===Be){m=C.isGlob=true;S=true;break}}continue}break}}if(I===ke){if(w===ke)y=C.isGlobstar=true;m=C.isGlob=true;S=true;if(n===true){continue}break}if(I===Fe){m=C.isGlob=true;S=true;if(n===true){continue}break}if(I===Me){while(eos()!==true&&(e=advance())){if(e===Pe){x=C.backslashes=true;advance();continue}if(e===ze){f=C.isBracket=true;m=C.isGlob=true;S=true;break}}if(n===true){continue}break}if(i.nonegate!==true&&I===Te&&u===h){v=C.negated=true;h++;continue}if(i.noparen!==true&&I===De){m=C.isGlob=true;if(n===true){while(eos()!==true&&(I=advance())){if(I===De){x=C.backslashes=true;I=advance();continue}if(I===Be){S=true;break}}continue}break}if(m===true){S=true;if(n===true){continue}break}}if(i.noext===true){g=false;m=false}let k=c;let _="";let P="";if(h>0){_=c.slice(0,h);c=c.slice(h);d-=h}if(k&&m===true&&d>0){k=c.slice(0,d);P=c.slice(d)}else if(m===true){k="";P=c}else{k=c}if(k&&k!==""&&k!=="/"&&k!==c){if(isPathSeparator(k.charCodeAt(k.length-1))){k=k.slice(0,-1)}}if(i.unescape===true){if(P)P=Ce.removeBackslashes(P);if(k&&x===true){k=Ce.removeBackslashes(k)}}const N={prefix:_,input:e,start:h,base:k,glob:P,isBrace:p,isBracket:f,isGlob:m,isExtglob:g,isGlobstar:y,negated:v,negatedExtglob:b};if(i.tokens===true){N.maxDepth=0;if(!isPathSeparator(I)){o.push(C)}N.tokens=o}if(i.parts===true||i.tokens===true){let t;for(let s=0;s<r.length;s++){const n=t?t+1:h;const c=r[s];const u=e.slice(n,c);if(i.tokens){if(s===0&&h!==0){o[s].isPrefix=true;o[s].value=_}else{o[s].value=u}depth(o[s]);N.maxDepth+=o[s].depth}if(s!==0||u!==""){l.push(u)}t=c}if(t&&t+1<e.length){const s=e.slice(t+1);l.push(s);if(i.tokens){o[o.length-1].value=s;depth(o[o.length-1]);N.maxDepth+=o[o.length-1].depth}}N.slashes=r;N.parts=l}return N};var Ue=scan$1;const He=Ie;const je=se;const{MAX_LENGTH:Ge,POSIX_REGEX_SOURCE:We,REGEX_NON_SPECIAL_CHARS:qe,REGEX_SPECIAL_CHARS_BACKREF:Ke,REPLACEMENTS:Ye}=He;const expandRange=(e,t)=>{if(typeof t.expandRange==="function"){return t.expandRange(...e,t)}e.sort();const i=`[${e.join("-")}]`;return i};const syntaxError=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`;const parse$1=(e,t)=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}e=Ye[e]||e;const i={...t};const s=typeof i.maxLength==="number"?Math.min(Ge,i.maxLength):Ge;let n=e.length;if(n>s){throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${s}`)}const r={type:"bos",value:"",output:i.prepend||""};const o=[r];const l=i.capture?"":"?:";const c=je.isWindows(t);const u=He.globChars(c);const h=He.extglobChars(u);const{DOT_LITERAL:d,PLUS_LITERAL:p,SLASH_LITERAL:f,ONE_CHAR:m,DOTS_SLASH:g,NO_DOT:y,NO_DOT_SLASH:E,NO_DOTS_SLASH:x,QMARK:v,QMARK_NO_DOT:b,STAR:S,START_ANCHOR:A}=u;const globstar=e=>`(${l}(?:(?!${A}${e.dot?g:d}).)*?)`;const w=i.dot?"":y;const I=i.dot?v:b;let C=i.bash===true?globstar(i):S;if(i.capture){C=`(${C})`}if(typeof i.noext==="boolean"){i.noextglob=i.noext}const k={input:e,index:-1,start:0,dot:i.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:o};e=je.removePrefix(e,k);n=e.length;const _=[];const P=[];const N=[];let R=r;let T;const eos=()=>k.index===n-1;const $=k.peek=(t=1)=>e[k.index+t];const O=k.advance=()=>e[++k.index]||"";const remaining=()=>e.slice(k.index+1);const consume=(e="",t=0)=>{k.consumed+=e;k.index+=t};const append=e=>{k.output+=e.output!=null?e.output:e.value;consume(e.value)};const negate=()=>{let e=1;while($()==="!"&&($(2)!=="("||$(3)==="?")){O();k.start++;e++}if(e%2===0){return false}k.negated=true;k.start++;return true};const increment=e=>{k[e]++;N.push(e)};const decrement=e=>{k[e]--;N.pop()};const push=e=>{if(R.type==="globstar"){const t=k.braces>0&&(e.type==="comma"||e.type==="brace");const i=e.extglob===true||_.length&&(e.type==="pipe"||e.type==="paren");if(e.type!=="slash"&&e.type!=="paren"&&!t&&!i){k.output=k.output.slice(0,-R.output.length);R.type="star";R.value="*";R.output=C;k.output+=R.output}}if(_.length&&e.type!=="paren"){_[_.length-1].inner+=e.value}if(e.value||e.output)append(e);if(R&&R.type==="text"&&e.type==="text"){R.value+=e.value;R.output=(R.output||"")+e.value;return}e.prev=R;o.push(e);R=e};const extglobOpen=(e,t)=>{const s={...h[t],conditions:1,inner:""};s.prev=R;s.parens=k.parens;s.output=k.output;const n=(i.capture?"(":"")+s.open;increment("parens");push({type:e,value:t,output:k.output?"":m});push({type:"paren",extglob:true,value:O(),output:n});_.push(s)};const extglobClose=e=>{let s=e.close+(i.capture?")":"");let n;if(e.type==="negate"){let r=C;if(e.inner&&e.inner.length>1&&e.inner.includes("/")){r=globstar(i)}if(r!==C||eos()||/^\)+$/.test(remaining())){s=e.close=`)$))${r}`}if(e.inner.includes("*")&&(n=remaining())&&/^\.[^\\/.]+$/.test(n)){const i=parse$1(n,{...t,fastpaths:false}).output;s=e.close=`)${i})${r})`}if(e.prev.type==="bos"){k.negatedExtglob=true}}push({type:"paren",extglob:true,value:T,output:s});decrement("parens")};if(i.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(e)){let s=false;let n=e.replace(Ke,((e,t,i,n,r,o)=>{if(n==="\\"){s=true;return e}if(n==="?"){if(t){return t+n+(r?v.repeat(r.length):"")}if(o===0){return I+(r?v.repeat(r.length):"")}return v.repeat(i.length)}if(n==="."){return d.repeat(i.length)}if(n==="*"){if(t){return t+n+(r?C:"")}return C}return t?e:`\\${e}`}));if(s===true){if(i.unescape===true){n=n.replace(/\\/g,"")}else{n=n.replace(/\\+/g,(e=>e.length%2===0?"\\\\":e?"\\":""))}}if(n===e&&i.contains===true){k.output=e;return k}k.output=je.wrapOutput(n,k,t);return k}while(!eos()){T=O();if(T==="\0"){continue}if(T==="\\"){const e=$();if(e==="/"&&i.bash!==true){continue}if(e==="."||e===";"){continue}if(!e){T+="\\";push({type:"text",value:T});continue}const t=/^\\+/.exec(remaining());let s=0;if(t&&t[0].length>2){s=t[0].length;k.index+=s;if(s%2!==0){T+="\\"}}if(i.unescape===true){T=O()}else{T+=O()}if(k.brackets===0){push({type:"text",value:T});continue}}if(k.brackets>0&&(T!=="]"||R.value==="["||R.value==="[^")){if(i.posix!==false&&T===":"){const e=R.value.slice(1);if(e.includes("[")){R.posix=true;if(e.includes(":")){const e=R.value.lastIndexOf("[");const t=R.value.slice(0,e);const i=R.value.slice(e+2);const s=We[i];if(s){R.value=t+s;k.backtrack=true;O();if(!r.output&&o.indexOf(R)===1){r.output=m}continue}}}}if(T==="["&&$()!==":"||T==="-"&&$()==="]"){T=`\\${T}`}if(T==="]"&&(R.value==="["||R.value==="[^")){T=`\\${T}`}if(i.posix===true&&T==="!"&&R.value==="["){T="^"}R.value+=T;append({value:T});continue}if(k.quotes===1&&T!=='"'){T=je.escapeRegex(T);R.value+=T;append({value:T});continue}if(T==='"'){k.quotes=k.quotes===1?0:1;if(i.keepQuotes===true){push({type:"text",value:T})}continue}if(T==="("){increment("parens");push({type:"paren",value:T});continue}if(T===")"){if(k.parens===0&&i.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const e=_[_.length-1];if(e&&k.parens===e.parens+1){extglobClose(_.pop());continue}push({type:"paren",value:T,output:k.parens?")":"\\)"});decrement("parens");continue}if(T==="["){if(i.nobracket===true||!remaining().includes("]")){if(i.nobracket!==true&&i.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}T=`\\${T}`}else{increment("brackets")}push({type:"bracket",value:T});continue}if(T==="]"){if(i.nobracket===true||R&&R.type==="bracket"&&R.value.length===1){push({type:"text",value:T,output:`\\${T}`});continue}if(k.brackets===0){if(i.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:T,output:`\\${T}`});continue}decrement("brackets");const e=R.value.slice(1);if(R.posix!==true&&e[0]==="^"&&!e.includes("/")){T=`/${T}`}R.value+=T;append({value:T});if(i.literalBrackets===false||je.hasRegexChars(e)){continue}const t=je.escapeRegex(R.value);k.output=k.output.slice(0,-R.value.length);if(i.literalBrackets===true){k.output+=t;R.value=t;continue}R.value=`(${l}${t}|${R.value})`;k.output+=R.value;continue}if(T==="{"&&i.nobrace!==true){increment("braces");const e={type:"brace",value:T,output:"(",outputIndex:k.output.length,tokensIndex:k.tokens.length};P.push(e);push(e);continue}if(T==="}"){const e=P[P.length-1];if(i.nobrace===true||!e){push({type:"text",value:T,output:T});continue}let t=")";if(e.dots===true){const e=o.slice();const s=[];for(let t=e.length-1;t>=0;t--){o.pop();if(e[t].type==="brace"){break}if(e[t].type!=="dots"){s.unshift(e[t].value)}}t=expandRange(s,i);k.backtrack=true}if(e.comma!==true&&e.dots!==true){const i=k.output.slice(0,e.outputIndex);const s=k.tokens.slice(e.tokensIndex);e.value=e.output="\\{";T=t="\\}";k.output=i;for(const e of s){k.output+=e.output||e.value}}push({type:"brace",value:T,output:t});decrement("braces");P.pop();continue}if(T==="|"){if(_.length>0){_[_.length-1].conditions++}push({type:"text",value:T});continue}if(T===","){let e=T;const t=P[P.length-1];if(t&&N[N.length-1]==="braces"){t.comma=true;e="|"}push({type:"comma",value:T,output:e});continue}if(T==="/"){if(R.type==="dot"&&k.index===k.start+1){k.start=k.index+1;k.consumed="";k.output="";o.pop();R=r;continue}push({type:"slash",value:T,output:f});continue}if(T==="."){if(k.braces>0&&R.type==="dot"){if(R.value===".")R.output=d;const e=P[P.length-1];R.type="dots";R.output+=T;R.value+=T;e.dots=true;continue}if(k.braces+k.parens===0&&R.type!=="bos"&&R.type!=="slash"){push({type:"text",value:T,output:d});continue}push({type:"dot",value:T,output:d});continue}if(T==="?"){const e=R&&R.value==="(";if(!e&&i.noextglob!==true&&$()==="("&&$(2)!=="?"){extglobOpen("qmark",T);continue}if(R&&R.type==="paren"){const e=$();let t=T;if(e==="<"&&!je.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(R.value==="("&&!/[!=<:]/.test(e)||e==="<"&&!/<([!=]|\w+>)/.test(remaining())){t=`\\${T}`}push({type:"text",value:T,output:t});continue}if(i.dot!==true&&(R.type==="slash"||R.type==="bos")){push({type:"qmark",value:T,output:b});continue}push({type:"qmark",value:T,output:v});continue}if(T==="!"){if(i.noextglob!==true&&$()==="("){if($(2)!=="?"||!/[!=<:]/.test($(3))){extglobOpen("negate",T);continue}}if(i.nonegate!==true&&k.index===0){negate();continue}}if(T==="+"){if(i.noextglob!==true&&$()==="("&&$(2)!=="?"){extglobOpen("plus",T);continue}if(R&&R.value==="("||i.regex===false){push({type:"plus",value:T,output:p});continue}if(R&&(R.type==="bracket"||R.type==="paren"||R.type==="brace")||k.parens>0){push({type:"plus",value:T});continue}push({type:"plus",value:p});continue}if(T==="@"){if(i.noextglob!==true&&$()==="("&&$(2)!=="?"){push({type:"at",extglob:true,value:T,output:""});continue}push({type:"text",value:T});continue}if(T!=="*"){if(T==="$"||T==="^"){T=`\\${T}`}const e=qe.exec(remaining());if(e){T+=e[0];k.index+=e[0].length}push({type:"text",value:T});continue}if(R&&(R.type==="globstar"||R.star===true)){R.type="star";R.star=true;R.value+=T;R.output=C;k.backtrack=true;k.globstar=true;consume(T);continue}let t=remaining();if(i.noextglob!==true&&/^\([^?]/.test(t)){extglobOpen("star",T);continue}if(R.type==="star"){if(i.noglobstar===true){consume(T);continue}const s=R.prev;const n=s.prev;const r=s.type==="slash"||s.type==="bos";const o=n&&(n.type==="star"||n.type==="globstar");if(i.bash===true&&(!r||t[0]&&t[0]!=="/")){push({type:"star",value:T,output:""});continue}const l=k.braces>0&&(s.type==="comma"||s.type==="brace");const c=_.length&&(s.type==="pipe"||s.type==="paren");if(!r&&s.type!=="paren"&&!l&&!c){push({type:"star",value:T,output:""});continue}while(t.slice(0,3)==="/**"){const i=e[k.index+4];if(i&&i!=="/"){break}t=t.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){R.type="globstar";R.value+=T;R.output=globstar(i);k.output=R.output;k.globstar=true;consume(T);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!o&&eos()){k.output=k.output.slice(0,-(s.output+R.output).length);s.output=`(?:${s.output}`;R.type="globstar";R.output=globstar(i)+(i.strictSlashes?")":"|$)");R.value+=T;k.globstar=true;k.output+=s.output+R.output;consume(T);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&t[0]==="/"){const e=t[1]!==void 0?"|$":"";k.output=k.output.slice(0,-(s.output+R.output).length);s.output=`(?:${s.output}`;R.type="globstar";R.output=`${globstar(i)}${f}|${f}${e})`;R.value+=T;k.output+=s.output+R.output;k.globstar=true;consume(T+O());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&t[0]==="/"){R.type="globstar";R.value+=T;R.output=`(?:^|${f}|${globstar(i)}${f})`;k.output=R.output;k.globstar=true;consume(T+O());push({type:"slash",value:"/",output:""});continue}k.output=k.output.slice(0,-R.output.length);R.type="globstar";R.output=globstar(i);R.value+=T;k.output+=R.output;k.globstar=true;consume(T);continue}const s={type:"star",value:T,output:C};if(i.bash===true){s.output=".*?";if(R.type==="bos"||R.type==="slash"){s.output=w+s.output}push(s);continue}if(R&&(R.type==="bracket"||R.type==="paren")&&i.regex===true){s.output=T;push(s);continue}if(k.index===k.start||R.type==="slash"||R.type==="dot"){if(R.type==="dot"){k.output+=E;R.output+=E}else if(i.dot===true){k.output+=x;R.output+=x}else{k.output+=w;R.output+=w}if($()!=="*"){k.output+=m;R.output+=m}}push(s)}while(k.brackets>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));k.output=je.escapeLast(k.output,"[");decrement("brackets")}while(k.parens>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));k.output=je.escapeLast(k.output,"(");decrement("parens")}while(k.braces>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));k.output=je.escapeLast(k.output,"{");decrement("braces")}if(i.strictSlashes!==true&&(R.type==="star"||R.type==="bracket")){push({type:"maybe_slash",value:"",output:`${f}?`})}if(k.backtrack===true){k.output="";for(const e of k.tokens){k.output+=e.output!=null?e.output:e.value;if(e.suffix){k.output+=e.suffix}}}return k};parse$1.fastpaths=(e,t)=>{const i={...t};const s=typeof i.maxLength==="number"?Math.min(Ge,i.maxLength):Ge;const n=e.length;if(n>s){throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${s}`)}e=Ye[e]||e;const r=je.isWindows(t);const{DOT_LITERAL:o,SLASH_LITERAL:l,ONE_CHAR:c,DOTS_SLASH:u,NO_DOT:h,NO_DOTS:d,NO_DOTS_SLASH:p,STAR:f,START_ANCHOR:m}=He.globChars(r);const g=i.dot?d:h;const y=i.dot?p:h;const E=i.capture?"":"?:";const x={negated:false,prefix:""};let v=i.bash===true?".*?":f;if(i.capture){v=`(${v})`}const globstar=e=>{if(e.noglobstar===true)return v;return`(${E}(?:(?!${m}${e.dot?u:o}).)*?)`};const create=e=>{switch(e){case"*":return`${g}${c}${v}`;case".*":return`${o}${c}${v}`;case"*.*":return`${g}${v}${o}${c}${v}`;case"*/*":return`${g}${v}${l}${c}${y}${v}`;case"**":return g+globstar(i);case"**/*":return`(?:${g}${globstar(i)}${l})?${y}${c}${v}`;case"**/*.*":return`(?:${g}${globstar(i)}${l})?${y}${v}${o}${c}${v}`;case"**/.*":return`(?:${g}${globstar(i)}${l})?${o}${c}${v}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const i=create(t[1]);if(!i)return;return i+o+t[2]}}};const b=je.removePrefix(e,x);let S=create(b);if(S&&i.strictSlashes!==true){S+=`${l}?`}return S};var Xe=parse$1;const Qe=s;const Ze=Ue;const Je=Xe;const et=se;const tt=Ie;const isObject=e=>e&&typeof e==="object"&&!Array.isArray(e);const picomatch=(e,t,i=false)=>{if(Array.isArray(e)){const s=e.map((e=>picomatch(e,t,i)));const arrayMatcher=e=>{for(const t of s){const i=t(e);if(i)return i}return false};return arrayMatcher}const s=isObject(e)&&e.tokens&&e.input;if(e===""||typeof e!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const n=t||{};const r=et.isWindows(t);const o=s?picomatch.compileRe(e,t):picomatch.makeRe(e,t,false,true);const l=o.state;delete o.state;let isIgnored=()=>false;if(n.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(n.ignore,e,i)}const matcher=(i,s=false)=>{const{isMatch:c,match:u,output:h}=picomatch.test(i,o,t,{glob:e,posix:r});const d={glob:e,state:l,regex:o,posix:r,input:i,output:h,match:u,isMatch:c};if(typeof n.onResult==="function"){n.onResult(d)}if(c===false){d.isMatch=false;return s?d:false}if(isIgnored(i)){if(typeof n.onIgnore==="function"){n.onIgnore(d)}d.isMatch=false;return s?d:false}if(typeof n.onMatch==="function"){n.onMatch(d)}return s?d:true};if(i){matcher.state=l}return matcher};picomatch.test=(e,t,i,{glob:s,posix:n}={})=>{if(typeof e!=="string"){throw new TypeError("Expected input to be a string")}if(e===""){return{isMatch:false,output:""}}const r=i||{};const o=r.format||(n?et.toPosixSlashes:null);let l=e===s;let c=l&&o?o(e):e;if(l===false){c=o?o(e):e;l=c===s}if(l===false||r.capture===true){if(r.matchBase===true||r.basename===true){l=picomatch.matchBase(e,t,i,n)}else{l=t.exec(c)}}return{isMatch:Boolean(l),match:l,output:c}};picomatch.matchBase=(e,t,i,s=et.isWindows(i))=>{const n=t instanceof RegExp?t:picomatch.makeRe(t,i);return n.test(Qe.basename(e))};picomatch.isMatch=(e,t,i)=>picomatch(t,i)(e);picomatch.parse=(e,t)=>{if(Array.isArray(e))return e.map((e=>picomatch.parse(e,t)));return Je(e,{...t,fastpaths:false})};picomatch.scan=(e,t)=>Ze(e,t);picomatch.compileRe=(e,t,i=false,s=false)=>{if(i===true){return e.output}const n=t||{};const r=n.contains?"":"^";const o=n.contains?"":"$";let l=`${r}(?:${e.output})${o}`;if(e&&e.negated===true){l=`^(?!${l}).*$`}const c=picomatch.toRegex(l,t);if(s===true){c.state=e}return c};picomatch.makeRe=(e,t={},i=false,s=false)=>{if(!e||typeof e!=="string"){throw new TypeError("Expected a non-empty string")}let n={negated:false,fastpaths:true};if(t.fastpaths!==false&&(e[0]==="."||e[0]==="*")){n.output=Je.fastpaths(e,t)}if(!n.output){n=Je(e,t)}return picomatch.compileRe(n,t,i,s)};picomatch.toRegex=(e,t)=>{try{const i=t||{};return new RegExp(e,i.flags||(i.nocase?"i":""))}catch(e){if(t&&t.debug===true)throw e;return/$^/}};picomatch.constants=tt;var it=picomatch;(function(e){e.exports=it})(ie);const st=getDefaultExportFromCjs(ie.exports);const nt={ArrayPattern(e,t){for(const i of t.elements){if(i)nt[i.type](e,i)}},AssignmentPattern(e,t){nt[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const i of t.properties){if(i.type==="RestElement"){nt.RestElement(e,i)}else{nt[i.value.type](e,i.value)}}},RestElement(e,t){nt[t.argument.type](e,t.argument)}};const rt=function extractAssignedNames(e){const t=[];nt[e.type](t,e);return t};function isArray$1(e){return Array.isArray(e)}function ensureArray(e){if(isArray$1(e))return e;if(e==null)return[];return[e]}const ot=function normalizePath(e){return e.split(s.win32.sep).join(s.posix.sep)};function getMatcherString(e,t){if(t===false||s.isAbsolute(e)||e.startsWith("*")){return ot(e)}const i=ot(s.resolve(t||"")).replace(/[-^$*+?.()|[\]{}]/g,"\\$&");return s.posix.join(i,ot(e))}const lt=function createFilter(e,t,i){const s=i&&i.resolve;const getMatcher=e=>e instanceof RegExp?e:{test:t=>{const i=getMatcherString(e,s);const n=st(i,{dot:true});const r=n(t);return r}};const n=ensureArray(e).map(getMatcher);const r=ensureArray(t).map(getMatcher);return function result(e){if(typeof e!=="string")return false;if(/\0/.test(e))return false;const t=ot(e);for(let e=0;e<r.length;++e){const i=r[e];if(i.test(t))return false}for(let e=0;e<n.length;++e){const i=n[e];if(i.test(t))return true}return!n.length}};const ct="break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public";const ut="arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl";const ht=new Set(`${ct} ${ut}`.split(" "));ht.add("");const dt=0;const pt=1;const ft=2;function createInclusionContext(){return{brokenFlow:dt,includedCallArguments:new Set,includedLabels:new Set}}function createHasEffectsContext(){return{accessed:new PathTracker,assigned:new PathTracker,brokenFlow:dt,called:new DiscriminatedPathTracker,ignore:{breaks:false,continues:false,labels:new Set,returnYield:false},includedLabels:new Set,instantiated:new DiscriminatedPathTracker,replacedVariableInits:new Map}}function assembleMemberDescriptions(e,t=null){return Object.create(t,e)}const mt=new class UndefinedExpression extends ExpressionEntity{getLiteralValueAtPath(){return undefined}};const gt={value:{hasEffectsWhenCalled:null,returns:z}};const yt=new class UnknownBoolean extends ExpressionEntity{getReturnExpressionWhenCalledAtPath(e){if(e.length===1){return getMemberReturnExpressionWhenCalled(It,e[0])}return z}hasEffectsOnInteractionAtPath(e,t,i){if(t.type===U){return e.length>1}if(t.type===j&&e.length===1){return hasMemberEffectWhenCalled(It,e[0],t,i)}return true}};const Et={value:{hasEffectsWhenCalled:null,returns:yt}};const xt=new class UnknownNumber extends ExpressionEntity{getReturnExpressionWhenCalledAtPath(e){if(e.length===1){return getMemberReturnExpressionWhenCalled(Ct,e[0])}return z}hasEffectsOnInteractionAtPath(e,t,i){if(t.type===U){return e.length>1}if(t.type===j&&e.length===1){return hasMemberEffectWhenCalled(Ct,e[0],t,i)}return true}};const vt={value:{hasEffectsWhenCalled:null,returns:xt}};const bt=new class UnknownString extends ExpressionEntity{getReturnExpressionWhenCalledAtPath(e){if(e.length===1){return getMemberReturnExpressionWhenCalled(kt,e[0])}return z}hasEffectsOnInteractionAtPath(e,t,i){if(t.type===U){return e.length>1}if(t.type===j&&e.length===1){return hasMemberEffectWhenCalled(kt,e[0],t,i)}return true}};const St={value:{hasEffectsWhenCalled:null,returns:bt}};const At={value:{hasEffectsWhenCalled({args:e},t){const i=e[1];return e.length<2||typeof i.getLiteralValueAtPath($,F,{deoptimizeCache(){}})==="symbol"&&i.hasEffectsOnInteractionAtPath($,Y,t)},returns:bt}};const wt=assembleMemberDescriptions({hasOwnProperty:Et,isPrototypeOf:Et,propertyIsEnumerable:Et,toLocaleString:St,toString:St,valueOf:gt});const It=assembleMemberDescriptions({valueOf:Et},wt);const Ct=assembleMemberDescriptions({toExponential:St,toFixed:St,toLocaleString:St,toPrecision:St,valueOf:vt},wt);const kt=assembleMemberDescriptions({anchor:St,at:gt,big:St,blink:St,bold:St,charAt:St,charCodeAt:vt,codePointAt:gt,concat:St,endsWith:Et,fixed:St,fontcolor:St,fontsize:St,includes:Et,indexOf:vt,italics:St,lastIndexOf:vt,link:St,localeCompare:vt,match:gt,matchAll:gt,normalize:St,padEnd:St,padStart:St,repeat:St,replace:At,replaceAll:At,search:vt,slice:St,small:St,split:gt,startsWith:Et,strike:St,sub:St,substr:St,substring:St,sup:St,toLocaleLowerCase:St,toLocaleUpperCase:St,toLowerCase:St,toString:St,toUpperCase:St,trim:St,trimEnd:St,trimLeft:St,trimRight:St,trimStart:St,valueOf:St},wt);function getLiteralMembersForValue(e){switch(typeof e){case"boolean":return It;case"number":return Ct;case"string":return kt}return Object.create(null)}function hasMemberEffectWhenCalled(e,t,i,s){var n,r;if(typeof t!=="string"||!e[t]){return true}return((r=(n=e[t]).hasEffectsWhenCalled)===null||r===void 0?void 0:r.call(n,i,s))||false}function getMemberReturnExpressionWhenCalled(e,t){if(typeof t!=="string"||!e[t])return z;return e[t].returns}function skipThrough(e,t,i){i(e,t)}function ignore(e,t,i){}var _t={};_t.Program=_t.BlockStatement=_t.StaticBlock=function(e,t,i){for(var s=0,n=e.body;s<n.length;s+=1){var r=n[s];i(r,t,"Statement")}};_t.Statement=skipThrough;_t.EmptyStatement=ignore;_t.ExpressionStatement=_t.ParenthesizedExpression=_t.ChainExpression=function(e,t,i){return i(e.expression,t,"Expression")};_t.IfStatement=function(e,t,i){i(e.test,t,"Expression");i(e.consequent,t,"Statement");if(e.alternate){i(e.alternate,t,"Statement")}};_t.LabeledStatement=function(e,t,i){return i(e.body,t,"Statement")};_t.BreakStatement=_t.ContinueStatement=ignore;_t.WithStatement=function(e,t,i){i(e.object,t,"Expression");i(e.body,t,"Statement")};_t.SwitchStatement=function(e,t,i){i(e.discriminant,t,"Expression");for(var s=0,n=e.cases;s<n.length;s+=1){var r=n[s];if(r.test){i(r.test,t,"Expression")}for(var o=0,l=r.consequent;o<l.length;o+=1){var c=l[o];i(c,t,"Statement")}}};_t.SwitchCase=function(e,t,i){if(e.test){i(e.test,t,"Expression")}for(var s=0,n=e.consequent;s<n.length;s+=1){var r=n[s];i(r,t,"Statement")}};_t.ReturnStatement=_t.YieldExpression=_t.AwaitExpression=function(e,t,i){if(e.argument){i(e.argument,t,"Expression")}};_t.ThrowStatement=_t.SpreadElement=function(e,t,i){return i(e.argument,t,"Expression")};_t.TryStatement=function(e,t,i){i(e.block,t,"Statement");if(e.handler){i(e.handler,t)}if(e.finalizer){i(e.finalizer,t,"Statement")}};_t.CatchClause=function(e,t,i){if(e.param){i(e.param,t,"Pattern")}i(e.body,t,"Statement")};_t.WhileStatement=_t.DoWhileStatement=function(e,t,i){i(e.test,t,"Expression");i(e.body,t,"Statement")};_t.ForStatement=function(e,t,i){if(e.init){i(e.init,t,"ForInit")}if(e.test){i(e.test,t,"Expression")}if(e.update){i(e.update,t,"Expression")}i(e.body,t,"Statement")};_t.ForInStatement=_t.ForOfStatement=function(e,t,i){i(e.left,t,"ForInit");i(e.right,t,"Expression");i(e.body,t,"Statement")};_t.ForInit=function(e,t,i){if(e.type==="VariableDeclaration"){i(e,t)}else{i(e,t,"Expression")}};_t.DebuggerStatement=ignore;_t.FunctionDeclaration=function(e,t,i){return i(e,t,"Function")};_t.VariableDeclaration=function(e,t,i){for(var s=0,n=e.declarations;s<n.length;s+=1){var r=n[s];i(r,t)}};_t.VariableDeclarator=function(e,t,i){i(e.id,t,"Pattern");if(e.init){i(e.init,t,"Expression")}};_t.Function=function(e,t,i){if(e.id){i(e.id,t,"Pattern")}for(var s=0,n=e.params;s<n.length;s+=1){var r=n[s];i(r,t,"Pattern")}i(e.body,t,e.expression?"Expression":"Statement")};_t.Pattern=function(e,t,i){if(e.type==="Identifier"){i(e,t,"VariablePattern")}else if(e.type==="MemberExpression"){i(e,t,"MemberPattern")}else{i(e,t)}};_t.VariablePattern=ignore;_t.MemberPattern=skipThrough;_t.RestElement=function(e,t,i){return i(e.argument,t,"Pattern")};_t.ArrayPattern=function(e,t,i){for(var s=0,n=e.elements;s<n.length;s+=1){var r=n[s];if(r){i(r,t,"Pattern")}}};_t.ObjectPattern=function(e,t,i){for(var s=0,n=e.properties;s<n.length;s+=1){var r=n[s];if(r.type==="Property"){if(r.computed){i(r.key,t,"Expression")}i(r.value,t,"Pattern")}else if(r.type==="RestElement"){i(r.argument,t,"Pattern")}}};_t.Expression=skipThrough;_t.ThisExpression=_t.Super=_t.MetaProperty=ignore;_t.ArrayExpression=function(e,t,i){for(var s=0,n=e.elements;s<n.length;s+=1){var r=n[s];if(r){i(r,t,"Expression")}}};_t.ObjectExpression=function(e,t,i){for(var s=0,n=e.properties;s<n.length;s+=1){var r=n[s];i(r,t)}};_t.FunctionExpression=_t.ArrowFunctionExpression=_t.FunctionDeclaration;_t.SequenceExpression=function(e,t,i){for(var s=0,n=e.expressions;s<n.length;s+=1){var r=n[s];i(r,t,"Expression")}};_t.TemplateLiteral=function(e,t,i){for(var s=0,n=e.quasis;s<n.length;s+=1){var r=n[s];i(r,t)}for(var o=0,l=e.expressions;o<l.length;o+=1){var c=l[o];i(c,t,"Expression")}};_t.TemplateElement=ignore;_t.UnaryExpression=_t.UpdateExpression=function(e,t,i){i(e.argument,t,"Expression")};_t.BinaryExpression=_t.LogicalExpression=function(e,t,i){i(e.left,t,"Expression");i(e.right,t,"Expression")};_t.AssignmentExpression=_t.AssignmentPattern=function(e,t,i){i(e.left,t,"Pattern");i(e.right,t,"Expression")};_t.ConditionalExpression=function(e,t,i){i(e.test,t,"Expression");i(e.consequent,t,"Expression");i(e.alternate,t,"Expression")};_t.NewExpression=_t.CallExpression=function(e,t,i){i(e.callee,t,"Expression");if(e.arguments){for(var s=0,n=e.arguments;s<n.length;s+=1){var r=n[s];i(r,t,"Expression")}}};_t.MemberExpression=function(e,t,i){i(e.object,t,"Expression");if(e.computed){i(e.property,t,"Expression")}};_t.ExportNamedDeclaration=_t.ExportDefaultDeclaration=function(e,t,i){if(e.declaration){i(e.declaration,t,e.type==="ExportNamedDeclaration"||e.declaration.id?"Statement":"Expression")}if(e.source){i(e.source,t,"Expression")}};_t.ExportAllDeclaration=function(e,t,i){if(e.exported){i(e.exported,t)}i(e.source,t,"Expression")};_t.ImportDeclaration=function(e,t,i){for(var s=0,n=e.specifiers;s<n.length;s+=1){var r=n[s];i(r,t)}i(e.source,t,"Expression")};_t.ImportExpression=function(e,t,i){i(e.source,t,"Expression")};_t.ImportSpecifier=_t.ImportDefaultSpecifier=_t.ImportNamespaceSpecifier=_t.Identifier=_t.PrivateIdentifier=_t.Literal=ignore;_t.TaggedTemplateExpression=function(e,t,i){i(e.tag,t,"Expression");i(e.quasi,t,"Expression")};_t.ClassDeclaration=_t.ClassExpression=function(e,t,i){return i(e,t,"Class")};_t.Class=function(e,t,i){if(e.id){i(e.id,t,"Pattern")}if(e.superClass){i(e.superClass,t,"Expression")}i(e.body,t)};_t.ClassBody=function(e,t,i){for(var s=0,n=e.body;s<n.length;s+=1){var r=n[s];i(r,t)}};_t.MethodDefinition=_t.PropertyDefinition=_t.Property=function(e,t,i){if(e.computed){i(e.key,t,"Expression")}if(e.value){i(e.value,t,"Expression")}};const Pt="ArrowFunctionExpression";const Nt="BinaryExpression";const Rt="BlockStatement";const Tt="CallExpression";const $t="ChainExpression";const Ot="ConditionalExpression";const Dt="ExpressionStatement";const Mt="Identifier";const Lt="ImportDefaultSpecifier";const Ft="ImportNamespaceSpecifier";const Vt="LogicalExpression";const Bt="NewExpression";const zt="Program";const Ut="Property";const Ht="ReturnStatement";const jt="SequenceExpression";t.SOURCEMAPPING_URL="sourceMa";t.SOURCEMAPPING_URL+="ppingURL";const Gt="[ \\f\\r\\t\\v\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]";const Wt=new RegExp(`^#${Gt}+${t.SOURCEMAPPING_URL}=.+`);const qt="_rollupAnnotations";const Kt="_rollupRemoved";function handlePureAnnotationsOfNode(e,t,i=e.type){const{annotations:s}=t;let n=s[t.annotationIndex];while(n&&e.start>=n.end){markPureNode(e,n,t.code);n=s[++t.annotationIndex]}if(n&&n.end<=e.end){_t[i](e,t,handlePureAnnotationsOfNode);while((n=s[t.annotationIndex])&&n.end<=e.end){++t.annotationIndex;annotateNode(e,n,false)}}}const Yt=/[^\s(]/g;const Xt=/\S/g;function markPureNode(e,t,i){const s=[];let n;const r=i.slice(t.end,e.start);if(doesNotMatchOutsideComment(r,Yt)){const t=e.start;while(true){s.push(e);switch(e.type){case Dt:case $t:e=e.expression;continue;case jt:if(doesNotMatchOutsideComment(i.slice(t,e.start),Xt)){e=e.expressions[0];continue}n=true;break;case Ot:if(doesNotMatchOutsideComment(i.slice(t,e.start),Xt)){e=e.test;continue}n=true;break;case Vt:case Nt:if(doesNotMatchOutsideComment(i.slice(t,e.start),Xt)){e=e.left;continue}n=true;break;case Tt:case Bt:break;default:n=true}break}}else{n=true}if(n){annotateNode(e,t,false)}else{for(const e of s){annotateNode(e,t,true)}}}function doesNotMatchOutsideComment(e,t){let i;while((i=t.exec(e))!==null){if(i[0]==="/"){const i=e.charCodeAt(t.lastIndex);if(i===42){t.lastIndex=e.indexOf("*/",t.lastIndex+1)+2;continue}else if(i===47){t.lastIndex=e.indexOf("\n",t.lastIndex+1)+1;continue}}t.lastIndex=0;return false}return true}const Qt=/[@#]__PURE__/;function addAnnotations(e,t,i){const s=[];const n=[];for(const t of e){if(Qt.test(t.value)){s.push(t)}else if(Wt.test(t.value)){n.push(t)}}for(const e of n){annotateNode(t,e,false)}handlePureAnnotationsOfNode(t,{annotationIndex:0,annotations:s,code:i})}function annotateNode(e,t,i){const s=i?qt:Kt;const n=e[s];if(n){n.push(t)}else{e[s]=[t]}}const Zt={Literal:[],Program:["body"]};function getAndCreateKeys(e){Zt[e.type]=Object.keys(e).filter((t=>typeof e[t]==="object"&&t.charCodeAt(0)!==95));return Zt[e.type]}const Jt="variables";class NodeBase extends ExpressionEntity{constructor(e,t,i){super();this.deoptimized=false;this.esTreeNode=e;this.keys=Zt[e.type]||getAndCreateKeys(e);this.parent=t;this.context=t.context;this.createScope(i);this.parseNode(e);this.initialise();this.context.magicString.addSourcemapLocation(this.start);this.context.magicString.addSourcemapLocation(this.end)}addExportedVariables(e,t){}bind(){for(const e of this.keys){const t=this[e];if(t===null)continue;if(Array.isArray(t)){for(const e of t){e===null||e===void 0?void 0:e.bind()}}else{t.bind()}}}createScope(e){this.scope=e}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();for(const t of this.keys){const i=this[t];if(i===null)continue;if(Array.isArray(i)){for(const t of i){if(t===null||t===void 0?void 0:t.hasEffects(e))return true}}else if(i.hasEffects(e))return true}return false}hasEffectsAsAssignmentTarget(e,t){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath($,this.assignmentInteraction,e)}include(e,t,i){if(!this.deoptimized)this.applyDeoptimizations();this.included=true;for(const i of this.keys){const s=this[i];if(s===null)continue;if(Array.isArray(s)){for(const i of s){i===null||i===void 0?void 0:i.include(e,t)}}else{s.include(e,t)}}}includeAsAssignmentTarget(e,t,i){this.include(e,t)}initialise(){}insertSemicolon(e){if(e.original[this.end-1]!==";"){e.appendLeft(this.end,";")}}parseNode(e){for(const[t,i]of Object.entries(e)){if(this.hasOwnProperty(t))continue;if(t.charCodeAt(0)===95){if(t===qt){this.annotations=i}else if(t===Kt){for(const{start:e,end:t}of i)this.context.magicString.remove(e,t)}}else if(typeof i!=="object"||i===null){this[t]=i}else if(Array.isArray(i)){this[t]=[];for(const e of i){this[t].push(e===null?null:new(this.context.getNodeConstructor(e.type))(e,this,this.scope))}}else{this[t]=new(this.context.getNodeConstructor(i.type))(i,this,this.scope)}}}render(e,t){for(const i of this.keys){const s=this[i];if(s===null)continue;if(Array.isArray(s)){for(const i of s){i===null||i===void 0?void 0:i.render(e,t)}}else{s.render(e,t)}}}setAssignedValue(e){this.assignmentInteraction={args:[e],thisArg:null,type:H}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(createHasEffectsContext())}applyDeoptimizations(){this.deoptimized=true;for(const e of this.keys){const t=this[e];if(t===null)continue;if(Array.isArray(t)){for(const e of t){e===null||e===void 0?void 0:e.deoptimizePath(O)}}else{t.deoptimizePath(O)}}this.context.requestTreeshakingPass()}}class SpreadElement extends NodeBase{deoptimizeThisOnInteractionAtPath(e,t,i){if(t.length>0){this.argument.deoptimizeThisOnInteractionAtPath(e,[N,...t],i)}}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();const{propertyReadSideEffects:t}=this.context.options.treeshake;return this.argument.hasEffects(e)||t&&(t==="always"||this.argument.hasEffectsOnInteractionAtPath(O,G,e))}applyDeoptimizations(){this.deoptimized=true;this.argument.deoptimizePath([N,N]);this.context.requestTreeshakingPass()}}class Method extends ExpressionEntity{constructor(e){super();this.description=e}deoptimizeThisOnInteractionAtPath({type:e,thisArg:t},i){if(e===j&&i.length===0&&this.description.mutatesSelfAsArray){t.deoptimizePath(M)}}getReturnExpressionWhenCalledAtPath(e,{thisArg:t}){if(e.length>0){return z}return this.description.returnsPrimitive||(this.description.returns==="self"?t||z:this.description.returns())}hasEffectsOnInteractionAtPath(e,t,i){var s,n;const{type:r}=t;if(e.length>(r===U?1:0)){return true}if(r===j){if(this.description.mutatesSelfAsArray===true&&((s=t.thisArg)===null||s===void 0?void 0:s.hasEffectsOnInteractionAtPath(M,q,i))){return true}if(this.description.callsArgs){for(const e of this.description.callsArgs){if((n=t.args[e])===null||n===void 0?void 0:n.hasEffectsOnInteractionAtPath($,Y,i)){return true}}}}return false}}const ei=[new Method({callsArgs:null,mutatesSelfAsArray:false,returns:null,returnsPrimitive:yt})];const ti=[new Method({callsArgs:null,mutatesSelfAsArray:false,returns:null,returnsPrimitive:bt})];const ii=[new Method({callsArgs:null,mutatesSelfAsArray:false,returns:null,returnsPrimitive:xt})];const si=[new Method({callsArgs:null,mutatesSelfAsArray:false,returns:null,returnsPrimitive:z})];const ni=/^\d+$/;class ObjectEntity extends ExpressionEntity{constructor(e,t,i=false){super();this.prototypeExpression=t;this.immutable=i;this.allProperties=[];this.deoptimizedPaths=Object.create(null);this.expressionsToBeDeoptimizedByKey=Object.create(null);this.gettersByKey=Object.create(null);this.hasLostTrack=false;this.hasUnknownDeoptimizedInteger=false;this.hasUnknownDeoptimizedProperty=false;this.propertiesAndGettersByKey=Object.create(null);this.propertiesAndSettersByKey=Object.create(null);this.settersByKey=Object.create(null);this.thisParametersToBeDeoptimized=new Set;this.unknownIntegerProps=[];this.unmatchableGetters=[];this.unmatchablePropertiesAndGetters=[];this.unmatchableSetters=[];if(Array.isArray(e)){this.buildPropertyMaps(e)}else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=e;for(const t of Object.values(e)){this.allProperties.push(...t)}}}deoptimizeAllProperties(e){var t;const i=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(e){this.hasUnknownDeoptimizedProperty=true}else{this.hasLostTrack=true}if(i){return}for(const e of Object.values(this.propertiesAndGettersByKey).concat(Object.values(this.settersByKey))){for(const t of e){t.deoptimizePath(O)}}(t=this.prototypeExpression)===null||t===void 0?void 0:t.deoptimizePath([N,N]);this.deoptimizeCachedEntities()}deoptimizeIntegerProperties(){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger){return}this.hasUnknownDeoptimizedInteger=true;for(const[e,t]of Object.entries(this.propertiesAndGettersByKey)){if(ni.test(e)){for(const e of t){e.deoptimizePath(O)}}}this.deoptimizeCachedIntegerEntities()}deoptimizePath(e){var t;if(this.hasLostTrack||this.immutable){return}const i=e[0];if(e.length===1){if(typeof i!=="string"){if(i===T){return this.deoptimizeIntegerProperties()}return this.deoptimizeAllProperties(i===R)}if(!this.deoptimizedPaths[i]){this.deoptimizedPaths[i]=true;const e=this.expressionsToBeDeoptimizedByKey[i];if(e){for(const t of e){t.deoptimizeCache()}}}}const s=e.length===1?O:e.slice(1);for(const e of typeof i==="string"?(this.propertiesAndGettersByKey[i]||this.unmatchablePropertiesAndGetters).concat(this.settersByKey[i]||this.unmatchableSetters):this.allProperties){e.deoptimizePath(s)}(t=this.prototypeExpression)===null||t===void 0?void 0:t.deoptimizePath(e.length===1?[...e,N]:e)}deoptimizeThisOnInteractionAtPath(e,t,i){var s;const[n,...r]=t;if(this.hasLostTrack||(e.type===j||t.length>1)&&(this.hasUnknownDeoptimizedProperty||typeof n==="string"&&this.deoptimizedPaths[n])){e.thisArg.deoptimizePath(O);return}const[o,l,c]=e.type===j||t.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:e.type===U?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(typeof n==="string"){if(o[n]){const t=l[n];if(t){for(const s of t){s.deoptimizeThisOnInteractionAtPath(e,r,i)}}if(!this.immutable){this.thisParametersToBeDeoptimized.add(e.thisArg)}return}for(const t of c){t.deoptimizeThisOnInteractionAtPath(e,r,i)}if(ni.test(n)){for(const t of this.unknownIntegerProps){t.deoptimizeThisOnInteractionAtPath(e,r,i)}}}else{for(const t of Object.values(l).concat([c])){for(const s of t){s.deoptimizeThisOnInteractionAtPath(e,r,i)}}for(const t of this.unknownIntegerProps){t.deoptimizeThisOnInteractionAtPath(e,r,i)}}if(!this.immutable){this.thisParametersToBeDeoptimized.add(e.thisArg)}(s=this.prototypeExpression)===null||s===void 0?void 0:s.deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){if(e.length===0){return B}const s=e[0];const n=this.getMemberExpressionAndTrackDeopt(s,i);if(n){return n.getLiteralValueAtPath(e.slice(1),t,i)}if(this.prototypeExpression){return this.prototypeExpression.getLiteralValueAtPath(e,t,i)}if(e.length===1){return undefined}return V}getReturnExpressionWhenCalledAtPath(e,t,i,s){if(e.length===0){return z}const[n,...r]=e;const o=this.getMemberExpressionAndTrackDeopt(n,s);if(o){return o.getReturnExpressionWhenCalledAtPath(r,t,i,s)}if(this.prototypeExpression){return this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,t,i,s)}return z}hasEffectsOnInteractionAtPath(e,t,i){const[s,...n]=e;if(n.length||t.type===j){const r=this.getMemberExpression(s);if(r){return r.hasEffectsOnInteractionAtPath(n,t,i)}if(this.prototypeExpression){return this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,i)}return true}if(s===R)return false;if(this.hasLostTrack)return true;const[r,o,l]=t.type===U?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(typeof s==="string"){if(r[s]){const e=o[s];if(e){for(const s of e){if(s.hasEffectsOnInteractionAtPath(n,t,i))return true}}return false}for(const e of l){if(e.hasEffectsOnInteractionAtPath(n,t,i)){return true}}}else{for(const e of Object.values(o).concat([l])){for(const s of e){if(s.hasEffectsOnInteractionAtPath(n,t,i))return true}}}if(this.prototypeExpression){return this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,i)}return false}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:i,propertiesAndSettersByKey:s,settersByKey:n,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:l,unmatchableGetters:c,unmatchableSetters:u}=this;const h=[];for(let d=e.length-1;d>=0;d--){const{key:p,kind:f,property:m}=e[d];t.push(m);if(typeof p!=="string"){if(p===T){o.push(m);continue}if(f==="set")u.push(m);if(f==="get")c.push(m);if(f!=="get")h.push(m);if(f!=="set")l.push(m)}else{if(f==="set"){if(!s[p]){s[p]=[m,...h];n[p]=[m,...u]}}else if(f==="get"){if(!i[p]){i[p]=[m,...l];r[p]=[m,...c]}}else{if(!s[p]){s[p]=[m,...h]}if(!i[p]){i[p]=[m,...l]}}}}}deoptimizeCachedEntities(){for(const e of Object.values(this.expressionsToBeDeoptimizedByKey)){for(const t of e){t.deoptimizeCache()}}for(const e of this.thisParametersToBeDeoptimized){e.deoptimizePath(O)}}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey)){if(ni.test(e)){for(const e of t){e.deoptimizeCache()}}}for(const e of this.thisParametersToBeDeoptimized){e.deoptimizePath(M)}}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||typeof e!=="string"||this.hasUnknownDeoptimizedInteger&&ni.test(e)||this.deoptimizedPaths[e]){return z}const t=this.propertiesAndGettersByKey[e];if((t===null||t===void 0?void 0:t.length)===1){return t[0]}if(t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length&&ni.test(e)){return z}return null}getMemberExpressionAndTrackDeopt(e,t){if(typeof e!=="string"){return z}const i=this.getMemberExpression(e);if(!(i===z||this.immutable)){const i=this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[];i.push(t)}return i}}const isInteger=e=>typeof e==="string"&&/^\d+$/.test(e);const ri=new class ObjectPrototypeFallbackExpression extends ExpressionEntity{deoptimizeThisOnInteractionAtPath({type:e,thisArg:t},i){if(e===j&&i.length===1&&!isInteger(i[0])){t.deoptimizePath(O)}}getLiteralValueAtPath(e){return e.length===1&&isInteger(e[0])?undefined:V}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||t===j}};const ai=new ObjectEntity({__proto__:null,hasOwnProperty:ei,isPrototypeOf:ei,propertyIsEnumerable:ei,toLocaleString:ti,toString:ti,valueOf:si},ri,true);const oi=[{key:T,kind:"init",property:z},{key:"length",kind:"init",property:xt}];const li=[new Method({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:yt})];const ci=[new Method({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:xt})];const ui=[new Method({callsArgs:null,mutatesSelfAsArray:true,returns:()=>new ObjectEntity(oi,xi),returnsPrimitive:null})];const hi=[new Method({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:()=>new ObjectEntity(oi,xi),returnsPrimitive:null})];const di=[new Method({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:()=>new ObjectEntity(oi,xi),returnsPrimitive:null})];const pi=[new Method({callsArgs:null,mutatesSelfAsArray:true,returns:null,returnsPrimitive:xt})];const fi=[new Method({callsArgs:null,mutatesSelfAsArray:true,returns:null,returnsPrimitive:z})];const mi=[new Method({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:z})];const gi=[new Method({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:z})];const yi=[new Method({callsArgs:null,mutatesSelfAsArray:true,returns:"self",returnsPrimitive:null})];const Ei=[new Method({callsArgs:[0],mutatesSelfAsArray:true,returns:"self",returnsPrimitive:null})];const xi=new ObjectEntity({__proto__:null,at:mi,concat:hi,copyWithin:yi,entries:hi,every:li,fill:yi,filter:di,find:gi,findIndex:ci,findLast:gi,findLastIndex:ci,flat:hi,flatMap:di,forEach:gi,group:gi,groupToMap:gi,includes:ei,indexOf:ii,join:ti,keys:si,lastIndexOf:ii,map:di,pop:fi,push:pi,reduce:gi,reduceRight:gi,reverse:yi,shift:fi,slice:hi,some:li,sort:Ei,splice:ui,toLocaleString:ti,toString:ti,unshift:pi,values:mi},ai,true);class ArrayExpression extends NodeBase{constructor(){super(...arguments);this.objectEntity=null}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){this.getObjectEntity().deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){return this.getObjectEntity().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffectsOnInteractionAtPath(e,t,i){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,i)}applyDeoptimizations(){this.deoptimized=true;let e=false;for(let t=0;t<this.elements.length;t++){const i=this.elements[t];if(i){if(e||i instanceof SpreadElement){e=true;i.deoptimizePath(O)}}}this.context.requestTreeshakingPass()}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}const e=[{key:"length",kind:"init",property:xt}];let t=false;for(let i=0;i<this.elements.length;i++){const s=this.elements[i];if(t||s instanceof SpreadElement){if(s){t=true;e.unshift({key:T,kind:"init",property:s})}}else if(!s){e.push({key:String(i),kind:"init",property:mt})}else{e.push({key:String(i),kind:"init",property:s})}}return this.objectEntity=new ObjectEntity(e,xi)}}class ArrayPattern extends NodeBase{addExportedVariables(e,t){for(const i of this.elements){i===null||i===void 0?void 0:i.addExportedVariables(e,t)}}declare(e){const t=[];for(const i of this.elements){if(i!==null){t.push(...i.declare(e,z))}}return t}deoptimizePath(){for(const e of this.elements){e===null||e===void 0?void 0:e.deoptimizePath($)}}hasEffectsOnInteractionAtPath(e,t,i){for(const e of this.elements){if(e===null||e===void 0?void 0:e.hasEffectsOnInteractionAtPath($,t,i))return true}return false}markDeclarationReached(){for(const e of this.elements){e===null||e===void 0?void 0:e.markDeclarationReached()}}}class LocalVariable extends Variable{constructor(e,t,i,s){super(e);this.calledFromTryStatement=false;this.additionalInitializers=null;this.expressionsToBeDeoptimized=[];this.declarations=t?[t]:[];this.init=i;this.deoptimizationTracker=s.deoptimizationTracker;this.module=s.module}addDeclaration(e,t){this.declarations.push(e);const i=this.markInitializersForDeoptimization();if(t!==null){i.push(t)}}consolidateInitializers(){if(this.additionalInitializers!==null){for(const e of this.additionalInitializers){e.deoptimizePath(O)}this.additionalInitializers=null}}deoptimizePath(e){var t,i;if(this.isReassigned||this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this)){return}if(e.length===0){if(!this.isReassigned){this.isReassigned=true;const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=[];for(const t of e){t.deoptimizeCache()}(t=this.init)===null||t===void 0?void 0:t.deoptimizePath(O)}}else{(i=this.init)===null||i===void 0?void 0:i.deoptimizePath(e)}}deoptimizeThisOnInteractionAtPath(e,t,i){if(this.isReassigned||!this.init){return e.thisArg.deoptimizePath(O)}i.withTrackedEntityAtPath(t,this.init,(()=>this.init.deoptimizeThisOnInteractionAtPath(e,t,i)),undefined)}getLiteralValueAtPath(e,t,i){if(this.isReassigned||!this.init){return V}return t.withTrackedEntityAtPath(e,this.init,(()=>{this.expressionsToBeDeoptimized.push(i);return this.init.getLiteralValueAtPath(e,t,i)}),V)}getReturnExpressionWhenCalledAtPath(e,t,i,s){if(this.isReassigned||!this.init){return z}return i.withTrackedEntityAtPath(e,this.init,(()=>{this.expressionsToBeDeoptimized.push(s);return this.init.getReturnExpressionWhenCalledAtPath(e,t,i,s)}),z)}hasEffectsOnInteractionAtPath(e,t,i){switch(t.type){case U:if(this.isReassigned)return true;return this.init&&!i.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,i);case H:if(this.included)return true;if(e.length===0)return false;if(this.isReassigned)return true;return this.init&&!i.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,i);case j:if(this.isReassigned)return true;return this.init&&!(t.withNew?i.instantiated:i.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,i)}}include(){if(!this.included){this.included=true;for(const e of this.declarations){if(!e.included)e.include(createInclusionContext(),false);let t=e.parent;while(!t.included){t.included=true;if(t.type===zt)break;t=t.parent}}}}includeCallArguments(e,t){if(this.isReassigned||this.init&&e.includedCallArguments.has(this.init)){for(const i of t){i.include(e,false)}}else if(this.init){e.includedCallArguments.add(this.init);this.init.includeCallArguments(e,t);e.includedCallArguments.delete(this.init)}}markCalledFromTryStatement(){this.calledFromTryStatement=true}markInitializersForDeoptimization(){if(this.additionalInitializers===null){this.additionalInitializers=this.init===null?[]:[this.init];this.init=z;this.isReassigned=true}return this.additionalInitializers}}const vi="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$";const bi=64;function toBase64(e){let t="";do{const i=e%bi;e=Math.floor(e/bi);t=vi[i]+t}while(e!==0);return t}function getSafeName(e,t){let i=e;let s=1;while(t.has(i)||ee.has(i)){i=`${e}$${toBase64(s++)}`}t.add(i);return i}class Scope$1{constructor(){this.children=[];this.variables=new Map}addDeclaration(e,t,i,s){const n=e.name;let r=this.variables.get(n);if(r){r.addDeclaration(e,i)}else{r=new LocalVariable(e.name,e,i||mt,t);this.variables.set(n,r)}return r}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}}class ChildScope extends Scope$1{constructor(e){super();this.accessedOutsideVariables=new Map;this.parent=e;e.children.push(this)}addAccessedDynamicImport(e){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(e);if(this.parent instanceof ChildScope){this.parent.addAccessedDynamicImport(e)}}addAccessedGlobals(e,t){const i=t.get(this)||new Set;for(const t of e){i.add(t)}t.set(this,i);if(this.parent instanceof ChildScope){this.parent.addAccessedGlobals(e,t)}}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t);this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof ChildScope&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,t,i,s){for(const s of this.accessedOutsideVariables.values()){if(s.included){e.add(s.getBaseVariableName());if(t==="system"&&i.has(s)){e.add("exports")}}}const n=s.get(this);if(n){for(const t of n){e.add(t)}}}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,t,i){const s=new Set;this.addUsedOutsideNames(s,e,t,i);if(this.accessedDynamicImports){for(const e of this.accessedDynamicImports){if(e.inlineNamespace){s.add(e.inlineNamespace.getBaseVariableName())}}}for(const[e,t]of this.variables){if(t.included||t.alwaysRendered){t.setRenderNames(null,getSafeName(e,s))}}for(const s of this.children){s.deconflict(e,t,i)}}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t){return t}const i=this.parent.findVariable(e);this.accessedOutsideVariables.set(e,i);return i}}class ParameterScope extends ChildScope{constructor(e,t){super(e);this.parameters=[];this.hasRest=false;this.context=t;this.hoistedBodyVarScope=new ChildScope(this)}addParameterDeclaration(e){const t=e.name;let i=this.hoistedBodyVarScope.variables.get(t);if(i){i.addDeclaration(e,null)}else{i=new LocalVariable(t,e,z,this.context)}this.variables.set(t,i);return i}addParameterVariables(e,t){this.parameters=e;for(const t of e){for(const e of t){e.alwaysRendered=true}}this.hasRest=t}includeCallArguments(e,t){let i=false;let s=false;const n=this.hasRest&&this.parameters[this.parameters.length-1];for(const i of t){if(i instanceof SpreadElement){for(const i of t){i.include(e,false)}break}}for(let r=t.length-1;r>=0;r--){const o=this.parameters[r]||n;const l=t[r];if(o){i=false;if(o.length===0){s=true}else{for(const e of o){if(e.included){s=true}if(e.calledFromTryStatement){i=true}}}}if(!s&&l.shouldBeIncluded(e)){s=true}if(s){l.include(e,i)}}}}class ReturnValueScope extends ParameterScope{constructor(){super(...arguments);this.returnExpression=null;this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}getReturnExpression(){if(this.returnExpression===null)this.updateReturnExpression();return this.returnExpression}updateReturnExpression(){if(this.returnExpressions.length===1){this.returnExpression=this.returnExpressions[0]}else{this.returnExpression=z;for(const e of this.returnExpressions){e.deoptimizePath(O)}}}}function is_reference(e,t){if(e.type==="MemberExpression"){return!e.computed&&is_reference(e.object,e)}if(e.type==="Identifier"){if(!t)return true;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"PropertyDefinition":return t.computed||e===t.value;case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return false;default:return true}}return false}const Si=Symbol("Value Properties");const Ai={hasEffectsWhenCalled(){return false}};const wi={hasEffectsWhenCalled(){return true}};const Ii={__proto__:null,[Si]:wi};const Ci={__proto__:null,[Si]:Ai};const ki={__proto__:null,[Si]:{hasEffectsWhenCalled({args:e},t){return!e.length||e[0].hasEffectsOnInteractionAtPath(D,q,t)}}};const _i={__proto__:null,[Si]:wi,prototype:Ii};const Pi={__proto__:null,[Si]:Ai,prototype:Ii};const Ni={__proto__:null,[Si]:Ai,from:Ci,of:Ci,prototype:Ii};const Ri={__proto__:null,[Si]:Ai,supportedLocalesOf:Pi};const Ti={global:Ii,globalThis:Ii,self:Ii,window:Ii,__proto__:null,[Si]:wi,Array:{__proto__:null,[Si]:wi,from:Ii,isArray:Ci,of:Ci,prototype:Ii},ArrayBuffer:{__proto__:null,[Si]:Ai,isView:Ci,prototype:Ii},Atomics:Ii,BigInt:_i,BigInt64Array:_i,BigUint64Array:_i,Boolean:Pi,constructor:_i,DataView:Pi,Date:{__proto__:null,[Si]:Ai,now:Ci,parse:Ci,prototype:Ii,UTC:Ci},decodeURI:Ci,decodeURIComponent:Ci,encodeURI:Ci,encodeURIComponent:Ci,Error:Pi,escape:Ci,eval:Ii,EvalError:Pi,Float32Array:Ni,Float64Array:Ni,Function:_i,hasOwnProperty:Ii,Infinity:Ii,Int16Array:Ni,Int32Array:Ni,Int8Array:Ni,isFinite:Ci,isNaN:Ci,isPrototypeOf:Ii,JSON:Ii,Map:Pi,Math:{__proto__:null,[Si]:wi,abs:Ci,acos:Ci,acosh:Ci,asin:Ci,asinh:Ci,atan:Ci,atan2:Ci,atanh:Ci,cbrt:Ci,ceil:Ci,clz32:Ci,cos:Ci,cosh:Ci,exp:Ci,expm1:Ci,floor:Ci,fround:Ci,hypot:Ci,imul:Ci,log:Ci,log10:Ci,log1p:Ci,log2:Ci,max:Ci,min:Ci,pow:Ci,random:Ci,round:Ci,sign:Ci,sin:Ci,sinh:Ci,sqrt:Ci,tan:Ci,tanh:Ci,trunc:Ci},NaN:Ii,Number:{__proto__:null,[Si]:Ai,isFinite:Ci,isInteger:Ci,isNaN:Ci,isSafeInteger:Ci,parseFloat:Ci,parseInt:Ci,prototype:Ii},Object:{__proto__:null,[Si]:Ai,create:Ci,defineProperty:ki,defineProperties:ki,getOwnPropertyDescriptor:Ci,getOwnPropertyNames:Ci,getOwnPropertySymbols:Ci,getPrototypeOf:Ci,hasOwn:Ci,is:Ci,isExtensible:Ci,isFrozen:Ci,isSealed:Ci,keys:Ci,fromEntries:Ci,entries:Ci,prototype:Ii},parseFloat:Ci,parseInt:Ci,Promise:{__proto__:null,[Si]:wi,all:Ii,prototype:Ii,race:Ii,reject:Ii,resolve:Ii},propertyIsEnumerable:Ii,Proxy:Ii,RangeError:Pi,ReferenceError:Pi,Reflect:Ii,RegExp:Pi,Set:Pi,SharedArrayBuffer:_i,String:{__proto__:null,[Si]:Ai,fromCharCode:Ci,fromCodePoint:Ci,prototype:Ii,raw:Ci},Symbol:{__proto__:null,[Si]:Ai,for:Ci,keyFor:Ci,prototype:Ii},SyntaxError:Pi,toLocaleString:Ii,toString:Ii,TypeError:Pi,Uint16Array:Ni,Uint32Array:Ni,Uint8Array:Ni,Uint8ClampedArray:Ni,unescape:Ci,URIError:Pi,valueOf:Ii,WeakMap:Pi,WeakSet:Pi,clearInterval:_i,clearTimeout:_i,console:Ii,Intl:{__proto__:null,[Si]:wi,Collator:Ri,DateTimeFormat:Ri,ListFormat:Ri,NumberFormat:Ri,PluralRules:Ri,RelativeTimeFormat:Ri},setInterval:_i,setTimeout:_i,TextDecoder:_i,TextEncoder:_i,URL:_i,URLSearchParams:_i,AbortController:_i,AbortSignal:_i,addEventListener:Ii,alert:Ii,AnalyserNode:_i,Animation:_i,AnimationEvent:_i,applicationCache:Ii,ApplicationCache:_i,ApplicationCacheErrorEvent:_i,atob:Ii,Attr:_i,Audio:_i,AudioBuffer:_i,AudioBufferSourceNode:_i,AudioContext:_i,AudioDestinationNode:_i,AudioListener:_i,AudioNode:_i,AudioParam:_i,AudioProcessingEvent:_i,AudioScheduledSourceNode:_i,AudioWorkletNode:_i,BarProp:_i,BaseAudioContext:_i,BatteryManager:_i,BeforeUnloadEvent:_i,BiquadFilterNode:_i,Blob:_i,BlobEvent:_i,blur:Ii,BroadcastChannel:_i,btoa:Ii,ByteLengthQueuingStrategy:_i,Cache:_i,caches:Ii,CacheStorage:_i,cancelAnimationFrame:Ii,cancelIdleCallback:Ii,CanvasCaptureMediaStreamTrack:_i,CanvasGradient:_i,CanvasPattern:_i,CanvasRenderingContext2D:_i,ChannelMergerNode:_i,ChannelSplitterNode:_i,CharacterData:_i,clientInformation:Ii,ClipboardEvent:_i,close:Ii,closed:Ii,CloseEvent:_i,Comment:_i,CompositionEvent:_i,confirm:Ii,ConstantSourceNode:_i,ConvolverNode:_i,CountQueuingStrategy:_i,createImageBitmap:Ii,Credential:_i,CredentialsContainer:_i,crypto:Ii,Crypto:_i,CryptoKey:_i,CSS:_i,CSSConditionRule:_i,CSSFontFaceRule:_i,CSSGroupingRule:_i,CSSImportRule:_i,CSSKeyframeRule:_i,CSSKeyframesRule:_i,CSSMediaRule:_i,CSSNamespaceRule:_i,CSSPageRule:_i,CSSRule:_i,CSSRuleList:_i,CSSStyleDeclaration:_i,CSSStyleRule:_i,CSSStyleSheet:_i,CSSSupportsRule:_i,CustomElementRegistry:_i,customElements:Ii,CustomEvent:_i,DataTransfer:_i,DataTransferItem:_i,DataTransferItemList:_i,defaultstatus:Ii,defaultStatus:Ii,DelayNode:_i,DeviceMotionEvent:_i,DeviceOrientationEvent:_i,devicePixelRatio:Ii,dispatchEvent:Ii,document:Ii,Document:_i,DocumentFragment:_i,DocumentType:_i,DOMError:_i,DOMException:_i,DOMImplementation:_i,DOMMatrix:_i,DOMMatrixReadOnly:_i,DOMParser:_i,DOMPoint:_i,DOMPointReadOnly:_i,DOMQuad:_i,DOMRect:_i,DOMRectReadOnly:_i,DOMStringList:_i,DOMStringMap:_i,DOMTokenList:_i,DragEvent:_i,DynamicsCompressorNode:_i,Element:_i,ErrorEvent:_i,Event:_i,EventSource:_i,EventTarget:_i,external:Ii,fetch:Ii,File:_i,FileList:_i,FileReader:_i,find:Ii,focus:Ii,FocusEvent:_i,FontFace:_i,FontFaceSetLoadEvent:_i,FormData:_i,frames:Ii,GainNode:_i,Gamepad:_i,GamepadButton:_i,GamepadEvent:_i,getComputedStyle:Ii,getSelection:Ii,HashChangeEvent:_i,Headers:_i,history:Ii,History:_i,HTMLAllCollection:_i,HTMLAnchorElement:_i,HTMLAreaElement:_i,HTMLAudioElement:_i,HTMLBaseElement:_i,HTMLBodyElement:_i,HTMLBRElement:_i,HTMLButtonElement:_i,HTMLCanvasElement:_i,HTMLCollection:_i,HTMLContentElement:_i,HTMLDataElement:_i,HTMLDataListElement:_i,HTMLDetailsElement:_i,HTMLDialogElement:_i,HTMLDirectoryElement:_i,HTMLDivElement:_i,HTMLDListElement:_i,HTMLDocument:_i,HTMLElement:_i,HTMLEmbedElement:_i,HTMLFieldSetElement:_i,HTMLFontElement:_i,HTMLFormControlsCollection:_i,HTMLFormElement:_i,HTMLFrameElement:_i,HTMLFrameSetElement:_i,HTMLHeadElement:_i,HTMLHeadingElement:_i,HTMLHRElement:_i,HTMLHtmlElement:_i,HTMLIFrameElement:_i,HTMLImageElement:_i,HTMLInputElement:_i,HTMLLabelElement:_i,HTMLLegendElement:_i,HTMLLIElement:_i,HTMLLinkElement:_i,HTMLMapElement:_i,HTMLMarqueeElement:_i,HTMLMediaElement:_i,HTMLMenuElement:_i,HTMLMetaElement:_i,HTMLMeterElement:_i,HTMLModElement:_i,HTMLObjectElement:_i,HTMLOListElement:_i,HTMLOptGroupElement:_i,HTMLOptionElement:_i,HTMLOptionsCollection:_i,HTMLOutputElement:_i,HTMLParagraphElement:_i,HTMLParamElement:_i,HTMLPictureElement:_i,HTMLPreElement:_i,HTMLProgressElement:_i,HTMLQuoteElement:_i,HTMLScriptElement:_i,HTMLSelectElement:_i,HTMLShadowElement:_i,HTMLSlotElement:_i,HTMLSourceElement:_i,HTMLSpanElement:_i,HTMLStyleElement:_i,HTMLTableCaptionElement:_i,HTMLTableCellElement:_i,HTMLTableColElement:_i,HTMLTableElement:_i,HTMLTableRowElement:_i,HTMLTableSectionElement:_i,HTMLTemplateElement:_i,HTMLTextAreaElement:_i,HTMLTimeElement:_i,HTMLTitleElement:_i,HTMLTrackElement:_i,HTMLUListElement:_i,HTMLUnknownElement:_i,HTMLVideoElement:_i,IDBCursor:_i,IDBCursorWithValue:_i,IDBDatabase:_i,IDBFactory:_i,IDBIndex:_i,IDBKeyRange:_i,IDBObjectStore:_i,IDBOpenDBRequest:_i,IDBRequest:_i,IDBTransaction:_i,IDBVersionChangeEvent:_i,IdleDeadline:_i,IIRFilterNode:_i,Image:_i,ImageBitmap:_i,ImageBitmapRenderingContext:_i,ImageCapture:_i,ImageData:_i,indexedDB:Ii,innerHeight:Ii,innerWidth:Ii,InputEvent:_i,IntersectionObserver:_i,IntersectionObserverEntry:_i,isSecureContext:Ii,KeyboardEvent:_i,KeyframeEffect:_i,length:Ii,localStorage:Ii,location:Ii,Location:_i,locationbar:Ii,matchMedia:Ii,MediaDeviceInfo:_i,MediaDevices:_i,MediaElementAudioSourceNode:_i,MediaEncryptedEvent:_i,MediaError:_i,MediaKeyMessageEvent:_i,MediaKeySession:_i,MediaKeyStatusMap:_i,MediaKeySystemAccess:_i,MediaList:_i,MediaQueryList:_i,MediaQueryListEvent:_i,MediaRecorder:_i,MediaSettingsRange:_i,MediaSource:_i,MediaStream:_i,MediaStreamAudioDestinationNode:_i,MediaStreamAudioSourceNode:_i,MediaStreamEvent:_i,MediaStreamTrack:_i,MediaStreamTrackEvent:_i,menubar:Ii,MessageChannel:_i,MessageEvent:_i,MessagePort:_i,MIDIAccess:_i,MIDIConnectionEvent:_i,MIDIInput:_i,MIDIInputMap:_i,MIDIMessageEvent:_i,MIDIOutput:_i,MIDIOutputMap:_i,MIDIPort:_i,MimeType:_i,MimeTypeArray:_i,MouseEvent:_i,moveBy:Ii,moveTo:Ii,MutationEvent:_i,MutationObserver:_i,MutationRecord:_i,name:Ii,NamedNodeMap:_i,NavigationPreloadManager:_i,navigator:Ii,Navigator:_i,NetworkInformation:_i,Node:_i,NodeFilter:Ii,NodeIterator:_i,NodeList:_i,Notification:_i,OfflineAudioCompletionEvent:_i,OfflineAudioContext:_i,offscreenBuffering:Ii,OffscreenCanvas:_i,open:Ii,openDatabase:Ii,Option:_i,origin:Ii,OscillatorNode:_i,outerHeight:Ii,outerWidth:Ii,PageTransitionEvent:_i,pageXOffset:Ii,pageYOffset:Ii,PannerNode:_i,parent:Ii,Path2D:_i,PaymentAddress:_i,PaymentRequest:_i,PaymentRequestUpdateEvent:_i,PaymentResponse:_i,performance:Ii,Performance:_i,PerformanceEntry:_i,PerformanceLongTaskTiming:_i,PerformanceMark:_i,PerformanceMeasure:_i,PerformanceNavigation:_i,PerformanceNavigationTiming:_i,PerformanceObserver:_i,PerformanceObserverEntryList:_i,PerformancePaintTiming:_i,PerformanceResourceTiming:_i,PerformanceTiming:_i,PeriodicWave:_i,Permissions:_i,PermissionStatus:_i,personalbar:Ii,PhotoCapabilities:_i,Plugin:_i,PluginArray:_i,PointerEvent:_i,PopStateEvent:_i,postMessage:Ii,Presentation:_i,PresentationAvailability:_i,PresentationConnection:_i,PresentationConnectionAvailableEvent:_i,PresentationConnectionCloseEvent:_i,PresentationConnectionList:_i,PresentationReceiver:_i,PresentationRequest:_i,print:Ii,ProcessingInstruction:_i,ProgressEvent:_i,PromiseRejectionEvent:_i,prompt:Ii,PushManager:_i,PushSubscription:_i,PushSubscriptionOptions:_i,queueMicrotask:Ii,RadioNodeList:_i,Range:_i,ReadableStream:_i,RemotePlayback:_i,removeEventListener:Ii,Request:_i,requestAnimationFrame:Ii,requestIdleCallback:Ii,resizeBy:Ii,ResizeObserver:_i,ResizeObserverEntry:_i,resizeTo:Ii,Response:_i,RTCCertificate:_i,RTCDataChannel:_i,RTCDataChannelEvent:_i,RTCDtlsTransport:_i,RTCIceCandidate:_i,RTCIceTransport:_i,RTCPeerConnection:_i,RTCPeerConnectionIceEvent:_i,RTCRtpReceiver:_i,RTCRtpSender:_i,RTCSctpTransport:_i,RTCSessionDescription:_i,RTCStatsReport:_i,RTCTrackEvent:_i,screen:Ii,Screen:_i,screenLeft:Ii,ScreenOrientation:_i,screenTop:Ii,screenX:Ii,screenY:Ii,ScriptProcessorNode:_i,scroll:Ii,scrollbars:Ii,scrollBy:Ii,scrollTo:Ii,scrollX:Ii,scrollY:Ii,SecurityPolicyViolationEvent:_i,Selection:_i,ServiceWorker:_i,ServiceWorkerContainer:_i,ServiceWorkerRegistration:_i,sessionStorage:Ii,ShadowRoot:_i,SharedWorker:_i,SourceBuffer:_i,SourceBufferList:_i,speechSynthesis:Ii,SpeechSynthesisEvent:_i,SpeechSynthesisUtterance:_i,StaticRange:_i,status:Ii,statusbar:Ii,StereoPannerNode:_i,stop:Ii,Storage:_i,StorageEvent:_i,StorageManager:_i,styleMedia:Ii,StyleSheet:_i,StyleSheetList:_i,SubtleCrypto:_i,SVGAElement:_i,SVGAngle:_i,SVGAnimatedAngle:_i,SVGAnimatedBoolean:_i,SVGAnimatedEnumeration:_i,SVGAnimatedInteger:_i,SVGAnimatedLength:_i,SVGAnimatedLengthList:_i,SVGAnimatedNumber:_i,SVGAnimatedNumberList:_i,SVGAnimatedPreserveAspectRatio:_i,SVGAnimatedRect:_i,SVGAnimatedString:_i,SVGAnimatedTransformList:_i,SVGAnimateElement:_i,SVGAnimateMotionElement:_i,SVGAnimateTransformElement:_i,SVGAnimationElement:_i,SVGCircleElement:_i,SVGClipPathElement:_i,SVGComponentTransferFunctionElement:_i,SVGDefsElement:_i,SVGDescElement:_i,SVGDiscardElement:_i,SVGElement:_i,SVGEllipseElement:_i,SVGFEBlendElement:_i,SVGFEColorMatrixElement:_i,SVGFEComponentTransferElement:_i,SVGFECompositeElement:_i,SVGFEConvolveMatrixElement:_i,SVGFEDiffuseLightingElement:_i,SVGFEDisplacementMapElement:_i,SVGFEDistantLightElement:_i,SVGFEDropShadowElement:_i,SVGFEFloodElement:_i,SVGFEFuncAElement:_i,SVGFEFuncBElement:_i,SVGFEFuncGElement:_i,SVGFEFuncRElement:_i,SVGFEGaussianBlurElement:_i,SVGFEImageElement:_i,SVGFEMergeElement:_i,SVGFEMergeNodeElement:_i,SVGFEMorphologyElement:_i,SVGFEOffsetElement:_i,SVGFEPointLightElement:_i,SVGFESpecularLightingElement:_i,SVGFESpotLightElement:_i,SVGFETileElement:_i,SVGFETurbulenceElement:_i,SVGFilterElement:_i,SVGForeignObjectElement:_i,SVGGElement:_i,SVGGeometryElement:_i,SVGGradientElement:_i,SVGGraphicsElement:_i,SVGImageElement:_i,SVGLength:_i,SVGLengthList:_i,SVGLinearGradientElement:_i,SVGLineElement:_i,SVGMarkerElement:_i,SVGMaskElement:_i,SVGMatrix:_i,SVGMetadataElement:_i,SVGMPathElement:_i,SVGNumber:_i,SVGNumberList:_i,SVGPathElement:_i,SVGPatternElement:_i,SVGPoint:_i,SVGPointList:_i,SVGPolygonElement:_i,SVGPolylineElement:_i,SVGPreserveAspectRatio:_i,SVGRadialGradientElement:_i,SVGRect:_i,SVGRectElement:_i,SVGScriptElement:_i,SVGSetElement:_i,SVGStopElement:_i,SVGStringList:_i,SVGStyleElement:_i,SVGSVGElement:_i,SVGSwitchElement:_i,SVGSymbolElement:_i,SVGTextContentElement:_i,SVGTextElement:_i,SVGTextPathElement:_i,SVGTextPositioningElement:_i,SVGTitleElement:_i,SVGTransform:_i,SVGTransformList:_i,SVGTSpanElement:_i,SVGUnitTypes:_i,SVGUseElement:_i,SVGViewElement:_i,TaskAttributionTiming:_i,Text:_i,TextEvent:_i,TextMetrics:_i,TextTrack:_i,TextTrackCue:_i,TextTrackCueList:_i,TextTrackList:_i,TimeRanges:_i,toolbar:Ii,top:Ii,Touch:_i,TouchEvent:_i,TouchList:_i,TrackEvent:_i,TransitionEvent:_i,TreeWalker:_i,UIEvent:_i,ValidityState:_i,visualViewport:Ii,VisualViewport:_i,VTTCue:_i,WaveShaperNode:_i,WebAssembly:Ii,WebGL2RenderingContext:_i,WebGLActiveInfo:_i,WebGLBuffer:_i,WebGLContextEvent:_i,WebGLFramebuffer:_i,WebGLProgram:_i,WebGLQuery:_i,WebGLRenderbuffer:_i,WebGLRenderingContext:_i,WebGLSampler:_i,WebGLShader:_i,WebGLShaderPrecisionFormat:_i,WebGLSync:_i,WebGLTexture:_i,WebGLTransformFeedback:_i,WebGLUniformLocation:_i,WebGLVertexArrayObject:_i,WebSocket:_i,WheelEvent:_i,Window:_i,Worker:_i,WritableStream:_i,XMLDocument:_i,XMLHttpRequest:_i,XMLHttpRequestEventTarget:_i,XMLHttpRequestUpload:_i,XMLSerializer:_i,XPathEvaluator:_i,XPathExpression:_i,XPathResult:_i,XSLTProcessor:_i};for(const e of["window","global","self","globalThis"]){Ti[e]=Ti}function getGlobalAtPath(e){let t=Ti;for(const i of e){if(typeof i!=="string"){return null}t=t[i];if(!t){return null}}return t[Si]}class GlobalVariable extends Variable{constructor(){super(...arguments);this.isReassigned=true}getLiteralValueAtPath(e,t,i){return getGlobalAtPath([this.name,...e])?B:V}hasEffectsOnInteractionAtPath(e,t,i){switch(t.type){case U:if(e.length===0){return this.name!=="undefined"&&!getGlobalAtPath([this.name])}return!getGlobalAtPath([this.name,...e].slice(0,-1));case H:return true;case j:{const s=getGlobalAtPath([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,i)}}}}const $i={__proto__:null,class:true,const:true,let:true,var:true};class Identifier extends NodeBase{constructor(){super(...arguments);this.variable=null;this.isTDZAccess=null}addExportedVariables(e,t){if(t.has(this.variable)){e.push(this.variable)}}bind(){if(!this.variable&&is_reference(this,this.parent)){this.variable=this.scope.findVariable(this.name);this.variable.addReference(this)}}declare(e,t){let i;const{treeshake:s}=this.context.options;switch(e){case"var":i=this.scope.addDeclaration(this,this.context,t,true);if(s&&s.correctVarValueBeforeDeclaration){i.markInitializersForDeoptimization()}break;case"function":i=this.scope.addDeclaration(this,this.context,t,false);break;case"let":case"const":case"class":i=this.scope.addDeclaration(this,this.context,t,false);break;case"parameter":i=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Internal Error: Unexpected identifier kind ${e}.`)}i.kind=e;return[this.variable=i]}deoptimizePath(e){var t;if(e.length===0&&!this.scope.contains(this.name)){this.disallowImportReassignment()}(t=this.variable)===null||t===void 0?void 0:t.deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){this.variable.deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){return this.getVariableRespectingTDZ().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();if(this.isPossibleTDZ()&&this.variable.kind!=="var"){return true}return this.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof GlobalVariable&&this.variable.hasEffectsOnInteractionAtPath($,G,e)}hasEffectsOnInteractionAtPath(e,t,i){switch(t.type){case U:return this.variable!==null&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,i);case H:return(e.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(e,t,i);case j:return this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,i)}}include(){if(!this.deoptimized)this.applyDeoptimizations();if(!this.included){this.included=true;if(this.variable!==null){this.context.includeVariableInModule(this.variable)}}}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){if(this.isTDZAccess!==null)return this.isTDZAccess;if(!(this.variable instanceof LocalVariable)||!this.variable.kind||!(this.variable.kind in $i)){return this.isTDZAccess=false}let e;if(this.variable.declarations&&this.variable.declarations.length===1&&(e=this.variable.declarations[0])&&this.start<e.start&&closestParentFunctionOrProgram(this)===closestParentFunctionOrProgram(e)){return this.isTDZAccess=true}if(!this.variable.initReached){return this.isTDZAccess=true}return this.isTDZAccess=false}markDeclarationReached(){this.variable.initReached=true}render(e,{snippets:{getPropertyAccess:t}},{renderedParentType:i,isCalleeOfRenderedParent:s,isShorthandProperty:n}=X){if(this.variable){const r=this.variable.getName(t);if(r!==this.name){e.overwrite(this.start,this.end,r,{contentOnly:true,storeName:true});if(n){e.prependRight(this.start,`${this.name}: `)}}if(r==="eval"&&i===Tt&&s){e.appendRight(this.start,"0, ")}}}applyDeoptimizations(){this.deoptimized=true;if(this.variable instanceof LocalVariable){this.variable.consolidateInitializers();this.context.requestTreeshakingPass()}}disallowImportReassignment(){return this.context.error({code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment to import '${this.name}'`},this.start)}getVariableRespectingTDZ(){if(this.isPossibleTDZ()){return z}return this.variable}}function closestParentFunctionOrProgram(e){while(e&&!/^Program|Function/.test(e.type)){e=e.parent}return e}function treeshakeNode(e,t,i,s){t.remove(i,s);if(e.annotations){for(const s of e.annotations){if(s.start<i){t.remove(s.start,s.end)}else{return}}}}function removeAnnotations(e,t){if(!e.annotations&&e.parent.type===Dt){e=e.parent}if(e.annotations){for(const i of e.annotations){t.remove(i.start,i.end)}}}const Oi={isNoStatement:true};function findFirstOccurrenceOutsideComment(e,t,i=0){let s,n;s=e.indexOf(t,i);while(true){i=e.indexOf("/",i);if(i===-1||i>=s)return s;n=e.charCodeAt(++i);++i;i=n===47?e.indexOf("\n",i)+1:e.indexOf("*/",i)+2;if(i>s){s=e.indexOf(t,i)}}}const Di=/\S/g;function findNonWhiteSpace(e,t){Di.lastIndex=t;const i=Di.exec(e);return i.index}function findFirstLineBreakOutsideComment(e){let t,i,s=0;t=e.indexOf("\n",s);while(true){s=e.indexOf("/",s);if(s===-1||s>t)return[t,t+1];i=e.charCodeAt(s+1);if(i===47)return[s,t+1];s=e.indexOf("*/",s+3)+2;if(s>t){t=e.indexOf("\n",s)}}}function renderStatementList(e,t,i,s,n){let r,o,l,c;let u=e[0];let h=!u.included||u.needsBoundaries;if(h){c=i+findFirstLineBreakOutsideComment(t.original.slice(i,u.start))[1]}for(let i=1;i<=e.length;i++){r=u;o=c;l=h;u=e[i];h=u===undefined?false:!u.included||u.needsBoundaries;if(l||h){c=r.end+findFirstLineBreakOutsideComment(t.original.slice(r.end,u===undefined?s:u.start))[1];if(r.included){l?r.render(t,n,{end:c,start:o}):r.render(t,n)}else{treeshakeNode(r,t,o,c)}}else{r.render(t,n)}}}function getCommaSeparatedNodesWithBoundaries(e,t,i,s){const n=[];let r,o,l,c,u;let h=i-1;for(let s=0;s<e.length;s++){o=e[s];if(r!==undefined){h=r.end+findFirstOccurrenceOutsideComment(t.original.slice(r.end,o.start),",")}l=c=h+1+findFirstLineBreakOutsideComment(t.original.slice(h+1,o.start))[1];while(u=t.original.charCodeAt(l),u===32||u===9||u===10||u===13)l++;if(r!==undefined){n.push({contentEnd:c,end:l,node:r,separator:h,start:i})}r=o;i=l}n.push({contentEnd:s,end:s,node:r,separator:null,start:i});return n}function removeLineBreaks(e,t,i){while(true){const[s,n]=findFirstLineBreakOutsideComment(e.original.slice(t,i));if(s===-1){break}e.remove(t+s,t+=n)}}class BlockScope extends ChildScope{addDeclaration(e,t,i,s){if(s){const n=this.parent.addDeclaration(e,t,i,s);n.markInitializersForDeoptimization();return n}else{return super.addDeclaration(e,t,i,false)}}}class ExpressionStatement extends NodeBase{initialise(){if(this.directive&&this.directive!=="use strict"&&this.parent.type===zt){this.context.warn({code:"MODULE_LEVEL_DIRECTIVE",message:`Module level directives cause errors when bundled, '${this.directive}' was ignored.`},this.start)}}render(e,t){super.render(e,t);if(this.included)this.insertSemicolon(e)}shouldBeIncluded(e){if(this.directive&&this.directive!=="use strict")return this.parent.type!==zt;return super.shouldBeIncluded(e)}applyDeoptimizations(){}}class BlockStatement extends NodeBase{constructor(){super(...arguments);this.directlyIncluded=false}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];if(!e||e.type!==Ht){this.scope.addReturnExpression(z)}}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new BlockScope(e)}hasEffects(e){if(this.deoptimizeBody)return true;for(const t of this.body){if(e.brokenFlow)break;if(t.hasEffects(e))return true}return false}include(e,t){if(!(this.deoptimizeBody&&this.directlyIncluded)){this.included=true;this.directlyIncluded=true;if(this.deoptimizeBody)t=true;for(const i of this.body){if(t||i.shouldBeIncluded(e))i.include(e,t)}}}initialise(){const e=this.body[0];this.deoptimizeBody=e instanceof ExpressionStatement&&e.directive==="use asm"}render(e,t){if(this.body.length){renderStatementList(this.body,e,this.start+1,this.end-1,t)}else{super.render(e,t)}}}class RestElement extends NodeBase{constructor(){super(...arguments);this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t){this.declarationInit=t;return this.argument.declare(e,z)}deoptimizePath(e){e.length===0&&this.argument.deoptimizePath($)}hasEffectsOnInteractionAtPath(e,t,i){return e.length>0||this.argument.hasEffectsOnInteractionAtPath($,t,i)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=true;if(this.declarationInit!==null){this.declarationInit.deoptimizePath([N,N]);this.context.requestTreeshakingPass()}}}class FunctionBase extends NodeBase{constructor(){super(...arguments);this.objectEntity=null;this.deoptimizedReturn=false}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e);if(e.length===1&&e[0]===N){this.scope.getReturnExpression().deoptimizePath(O)}}deoptimizeThisOnInteractionAtPath(e,t,i){if(t.length>0){this.getObjectEntity().deoptimizeThisOnInteractionAtPath(e,t,i)}}getLiteralValueAtPath(e,t,i){return this.getObjectEntity().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){if(e.length>0){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,i,s)}if(this.async){if(!this.deoptimizedReturn){this.deoptimizedReturn=true;this.scope.getReturnExpression().deoptimizePath(O);this.context.requestTreeshakingPass()}return z}return this.scope.getReturnExpression()}hasEffectsOnInteractionAtPath(e,t,i){if(e.length>0||t.type!==j){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,i)}if(this.async){const{propertyReadSideEffects:e}=this.context.options.treeshake;const t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],Y,i)||e&&(e==="always"||t.hasEffectsOnInteractionAtPath(["then"],G,i))){return true}}for(const e of this.params){if(e.hasEffects(i))return true}return false}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();this.included=true;const{brokenFlow:i}=e;e.brokenFlow=dt;this.body.include(e,t);e.brokenFlow=i}includeCallArguments(e,t){this.scope.includeCallArguments(e,t)}initialise(){this.scope.addParameterVariables(this.params.map((e=>e.declare("parameter",z))),this.params[this.params.length-1]instanceof RestElement);if(this.body instanceof BlockStatement){this.body.addImplicitReturnExpressionToScope()}else{this.scope.addReturnExpression(this.body)}}parseNode(e){if(e.body.type===Rt){this.body=new BlockStatement(e.body,this,this.scope.hoistedBodyVarScope)}super.parseNode(e)}applyDeoptimizations(){}}FunctionBase.prototype.preventChildBlockScope=true;class ArrowFunctionExpression extends FunctionBase{constructor(){super(...arguments);this.objectEntity=null}createScope(e){this.scope=new ReturnValueScope(e,this.context)}hasEffects(){if(!this.deoptimized)this.applyDeoptimizations();return false}hasEffectsOnInteractionAtPath(e,t,i){if(super.hasEffectsOnInteractionAtPath(e,t,i))return true;if(t.type===j){const{ignore:e,brokenFlow:t}=i;i.ignore={breaks:false,continues:false,labels:new Set,returnYield:true};if(this.body.hasEffects(i))return true;i.ignore=e;i.brokenFlow=t}return false}include(e,t){super.include(e,t);for(const i of this.params){if(!(i instanceof Identifier)){i.include(e,t)}}}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}return this.objectEntity=new ObjectEntity([],ai)}}function getSystemExportStatement(e,{exportNamesByVariable:t,snippets:{_:i,getObject:s,getPropertyAccess:n}},r=""){if(e.length===1&&t.get(e[0]).length===1){const s=e[0];return`exports('${t.get(s)}',${i}${s.getName(n)}${r})`}else{const i=[];for(const s of e){for(const e of t.get(s)){i.push([e,s.getName(n)+r])}}return`exports(${s(i,{lineBreakIndent:null})})`}}function renderSystemExportExpression(e,t,i,s,{exportNamesByVariable:n,snippets:{_:r}}){s.prependRight(t,`exports('${n.get(e)}',${r}`);s.appendLeft(i,")")}function renderSystemExportFunction(e,t,i,s,n,r){const{_:o,getDirectReturnIifeLeft:l}=r.snippets;n.prependRight(t,l(["v"],`${getSystemExportStatement(e,r)},${o}v`,{needsArrowReturnParens:true,needsWrappedFunction:s}));n.appendLeft(i,")")}function renderSystemExportSequenceAfterExpression(e,t,i,s,n,r){const{_:o,getPropertyAccess:l}=r.snippets;n.appendLeft(i,`,${o}${getSystemExportStatement([e],r)},${o}${e.getName(l)}`);if(s){n.prependRight(t,"(");n.appendLeft(i,")")}}function renderSystemExportSequenceBeforeExpression(e,t,i,s,n,r,o){const{_:l}=r.snippets;n.prependRight(t,`${getSystemExportStatement([e],r,o)},${l}`);if(s){n.prependRight(t,"(");n.appendLeft(i,")")}}class ObjectPattern extends NodeBase{addExportedVariables(e,t){for(const i of this.properties){if(i.type===Ut){i.value.addExportedVariables(e,t)}else{i.argument.addExportedVariables(e,t)}}}declare(e,t){const i=[];for(const s of this.properties){i.push(...s.declare(e,t))}return i}deoptimizePath(e){if(e.length===0){for(const t of this.properties){t.deoptimizePath(e)}}}hasEffectsOnInteractionAtPath(e,t,i){for(const e of this.properties){if(e.hasEffectsOnInteractionAtPath($,t,i))return true}return false}markDeclarationReached(){for(const e of this.properties){e.markDeclarationReached()}}}class AssignmentExpression extends NodeBase{hasEffects(e){const{deoptimized:t,left:i,right:s}=this;if(!t)this.applyDeoptimizations();return s.hasEffects(e)||i.hasEffectsAsAssignmentTarget(e,this.operator!=="=")}hasEffectsOnInteractionAtPath(e,t,i){return this.right.hasEffectsOnInteractionAtPath(e,t,i)}include(e,t){const{deoptimized:i,left:s,right:n,operator:r}=this;if(!i)this.applyDeoptimizations();this.included=true;if(t||r!=="="||s.included||s.hasEffectsAsAssignmentTarget(createHasEffectsContext(),false)){s.includeAsAssignmentTarget(e,t,r!=="=")}n.include(e,t)}initialise(){this.left.setAssignedValue(this.right)}render(e,t,{preventASI:i,renderedParentType:s,renderedSurroundingElement:n}=X){const{left:r,right:o,start:l,end:c,parent:u}=this;if(r.included){r.render(e,t);o.render(e,t)}else{const c=findNonWhiteSpace(e.original,findFirstOccurrenceOutsideComment(e.original,"=",r.end)+1);e.remove(l,c);if(i){removeLineBreaks(e,c,o.start)}o.render(e,t,{renderedParentType:s||u.type,renderedSurroundingElement:n||u.type})}if(t.format==="system"){if(r instanceof Identifier){const i=r.variable;const s=t.exportNamesByVariable.get(i);if(s){if(s.length===1){renderSystemExportExpression(i,l,c,e,t)}else{renderSystemExportSequenceAfterExpression(i,l,c,u.type!==Dt,e,t)}return}}else{const i=[];r.addExportedVariables(i,t.exportNamesByVariable);if(i.length>0){renderSystemExportFunction(i,l,c,n===Dt,e,t);return}}}if(r.included&&r instanceof ObjectPattern&&(n===Dt||n===Pt)){e.appendRight(l,"(");e.prependLeft(c,")")}}applyDeoptimizations(){this.deoptimized=true;this.left.deoptimizePath($);this.right.deoptimizePath(O);this.context.requestTreeshakingPass()}}class AssignmentPattern extends NodeBase{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t){return this.left.declare(e,t)}deoptimizePath(e){e.length===0&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,i){return e.length>0||this.left.hasEffectsOnInteractionAtPath($,t,i)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:i}=X){this.left.render(e,t,{isShorthandProperty:i});this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=true;this.left.deoptimizePath($);this.right.deoptimizePath(O);this.context.requestTreeshakingPass()}}class ArgumentsVariable extends LocalVariable{constructor(e){super("arguments",null,z,e)}hasEffectsOnInteractionAtPath(e,{type:t}){return t!==U||e.length>1}}class ThisVariable extends LocalVariable{constructor(e){super("this",null,null,e);this.deoptimizedPaths=[];this.entitiesToBeDeoptimized=new Set;this.thisDeoptimizationList=[];this.thisDeoptimizations=new DiscriminatedPathTracker}addEntityToBeDeoptimized(e){for(const t of this.deoptimizedPaths){e.deoptimizePath(t)}for(const{interaction:t,path:i}of this.thisDeoptimizationList){e.deoptimizeThisOnInteractionAtPath(t,i,F)}this.entitiesToBeDeoptimized.add(e)}deoptimizePath(e){if(e.length===0||this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this)){return}this.deoptimizedPaths.push(e);for(const t of this.entitiesToBeDeoptimized){t.deoptimizePath(e)}}deoptimizeThisOnInteractionAtPath(e,t){const i={interaction:e,path:t};if(!this.thisDeoptimizations.trackEntityAtPathAndGetIfTracked(t,e.type,e.thisArg)){for(const i of this.entitiesToBeDeoptimized){i.deoptimizeThisOnInteractionAtPath(e,t,F)}this.thisDeoptimizationList.push(i)}}hasEffectsOnInteractionAtPath(e,t,i){return this.getInit(i).hasEffectsOnInteractionAtPath(e,t,i)||super.hasEffectsOnInteractionAtPath(e,t,i)}getInit(e){return e.replacedVariableInits.get(this)||z}}class FunctionScope extends ReturnValueScope{constructor(e,t){super(e,t);this.variables.set("arguments",this.argumentsVariable=new ArgumentsVariable(t));this.variables.set("this",this.thisVariable=new ThisVariable(t))}findLexicalBoundary(){return this}includeCallArguments(e,t){super.includeCallArguments(e,t);if(this.argumentsVariable.included){for(const i of t){if(!i.included){i.include(e,false)}}}}}class FunctionNode extends FunctionBase{constructor(){super(...arguments);this.objectEntity=null}createScope(e){this.scope=new FunctionScope(e,this.context)}deoptimizeThisOnInteractionAtPath(e,t,i){super.deoptimizeThisOnInteractionAtPath(e,t,i);if(e.type===j&&t.length===0){this.scope.thisVariable.addEntityToBeDeoptimized(e.thisArg)}}hasEffects(e){var t;if(!this.deoptimized)this.applyDeoptimizations();return!!((t=this.id)===null||t===void 0?void 0:t.hasEffects(e))}hasEffectsOnInteractionAtPath(e,t,i){if(super.hasEffectsOnInteractionAtPath(e,t,i))return true;if(t.type===j){const e=i.replacedVariableInits.get(this.scope.thisVariable);i.replacedVariableInits.set(this.scope.thisVariable,t.withNew?new ObjectEntity(Object.create(null),ai):z);const{brokenFlow:s,ignore:n}=i;i.ignore={breaks:false,continues:false,labels:new Set,returnYield:true};if(this.body.hasEffects(i))return true;i.brokenFlow=s;if(e){i.replacedVariableInits.set(this.scope.thisVariable,e)}else{i.replacedVariableInits.delete(this.scope.thisVariable)}i.ignore=n}return false}include(e,t){var i;super.include(e,t);(i=this.id)===null||i===void 0?void 0:i.include();const s=this.scope.argumentsVariable.included;for(const i of this.params){if(!(i instanceof Identifier)||s){i.include(e,t)}}}initialise(){var e;super.initialise();(e=this.id)===null||e===void 0?void 0:e.declare("function",this)}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}return this.objectEntity=new ObjectEntity([{key:"prototype",kind:"init",property:new ObjectEntity([],ai)}],ai)}}class AwaitExpression extends NodeBase{hasEffects(){if(!this.deoptimized)this.applyDeoptimizations();return true}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();if(!this.included){this.included=true;e:if(!this.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof FunctionNode||e instanceof ArrowFunctionExpression)break e}while(e=e.parent);this.context.usesTopLevelAwait=true}}this.argument.include(e,t)}}const Mi={"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"%":(e,t)=>e%t,"&":(e,t)=>e&t,"*":(e,t)=>e*t,"**":(e,t)=>e**t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"<":(e,t)=>e<t,"<<":(e,t)=>e<<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t,"^":(e,t)=>e^t,"|":(e,t)=>e|t};class BinaryExpression extends NodeBase{deoptimizeCache(){}getLiteralValueAtPath(e,t,i){if(e.length>0)return V;const s=this.left.getLiteralValueAtPath($,t,i);if(typeof s==="symbol")return V;const n=this.right.getLiteralValueAtPath($,t,i);if(typeof n==="symbol")return V;const r=Mi[this.operator];if(!r)return V;return r(s,n)}hasEffects(e){if(this.operator==="+"&&this.parent instanceof ExpressionStatement&&this.left.getLiteralValueAtPath($,F,this)===""){return true}return super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return t!==U||e.length>1}render(e,t,{renderedSurroundingElement:i}=X){this.left.render(e,t,{renderedSurroundingElement:i});this.right.render(e,t)}}class BreakStatement extends NodeBase{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return true;e.includedLabels.add(this.label.name);e.brokenFlow=ft}else{if(!e.ignore.breaks)return true;e.brokenFlow=pt}return false}include(e){this.included=true;if(this.label){this.label.include();e.includedLabels.add(this.label.name)}e.brokenFlow=this.label?ft:pt}}function renderCallArguments(e,t,i){if(i.arguments.length>0){if(i.arguments[i.arguments.length-1].included){for(const s of i.arguments){s.render(e,t)}}else{let s=i.arguments.length-2;while(s>=0&&!i.arguments[s].included){s--}if(s>=0){for(let n=0;n<=s;n++){i.arguments[n].render(e,t)}e.remove(findFirstOccurrenceOutsideComment(e.original,",",i.arguments[s].end),i.end-1)}else{e.remove(findFirstOccurrenceOutsideComment(e.original,"(",i.callee.end)+1,i.end-1)}}}}class Literal extends NodeBase{deoptimizeThisOnInteractionAtPath(){}getLiteralValueAtPath(e){if(e.length>0||this.value===null&&this.context.code.charCodeAt(this.start)!==110||typeof this.value==="bigint"||this.context.code.charCodeAt(this.start)===47){return V}return this.value}getReturnExpressionWhenCalledAtPath(e){if(e.length!==1)return z;return getMemberReturnExpressionWhenCalled(this.members,e[0])}hasEffectsOnInteractionAtPath(e,t,i){switch(t.type){case U:return e.length>(this.value===null?0:1);case H:return true;case j:return e.length!==1||hasMemberEffectWhenCalled(this.members,e[0],t,i)}}initialise(){this.members=getLiteralMembersForValue(this.value)}parseNode(e){this.value=e.value;this.regex=e.regex;super.parseNode(e)}render(e){if(typeof this.value==="string"){e.indentExclusionRanges.push([this.start+1,this.end-1])}}}const Li=7;function getResolvablePropertyKey(e){return e.computed?getResolvableComputedPropertyKey(e.property):e.property.name}function getResolvableComputedPropertyKey(e){if(e instanceof Literal){return String(e.value)}return null}function getPathIfNotComputed(e){const t=e.propertyKey;const i=e.object;if(typeof t==="string"){if(i instanceof Identifier){return[{key:i.name,pos:i.start},{key:t,pos:e.property.start}]}if(i instanceof MemberExpression){const s=getPathIfNotComputed(i);return s&&[...s,{key:t,pos:e.property.start}]}}return null}function getStringFromPath(e){let t=e[0].key;for(let i=1;i<e.length;i++){t+="."+e[i].key}return t}class MemberExpression extends NodeBase{constructor(){super(...arguments);this.variable=null;this.assignmentDeoptimized=false;this.bound=false;this.expressionsToBeDeoptimized=[];this.replacement=null}bind(){this.bound=true;const e=getPathIfNotComputed(this);const t=e&&this.scope.findVariable(e[0].key);if(t&&t.isNamespace){const i=resolveNamespaceVariables(t,e.slice(1),this.context);if(!i){super.bind()}else if(typeof i==="string"){this.replacement=i}else{this.variable=i;this.scope.addNamespaceMemberAccess(getStringFromPath(e),i)}}else{super.bind()}}deoptimizeCache(){const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=[];this.propertyKey=N;this.object.deoptimizePath(O);for(const t of e){t.deoptimizeCache()}}deoptimizePath(e){if(e.length===0)this.disallowNamespaceReassignment();if(this.variable){this.variable.deoptimizePath(e)}else if(!this.replacement){if(e.length<Li){const t=this.getPropertyKey();this.object.deoptimizePath([t===N?R:t,...e])}}}deoptimizeThisOnInteractionAtPath(e,t,i){if(this.variable){this.variable.deoptimizeThisOnInteractionAtPath(e,t,i)}else if(!this.replacement){if(t.length<Li){this.object.deoptimizeThisOnInteractionAtPath(e,[this.getPropertyKey(),...t],i)}else{e.thisArg.deoptimizePath(O)}}}getLiteralValueAtPath(e,t,i){if(this.variable){return this.variable.getLiteralValueAtPath(e,t,i)}if(this.replacement){return V}this.expressionsToBeDeoptimized.push(i);if(e.length<Li){return this.object.getLiteralValueAtPath([this.getPropertyKey(),...e],t,i)}return V}getReturnExpressionWhenCalledAtPath(e,t,i,s){if(this.variable){return this.variable.getReturnExpressionWhenCalledAtPath(e,t,i,s)}if(this.replacement){return z}this.expressionsToBeDeoptimized.push(s);if(e.length<Li){return this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(),...e],t,i,s)}return z}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();return this.property.hasEffects(e)||this.object.hasEffects(e)||this.hasAccessEffect(e)}hasEffectsAsAssignmentTarget(e,t){if(t&&!this.deoptimized)this.applyDeoptimizations();if(!this.assignmentDeoptimized)this.applyAssignmentDeoptimization();return this.property.hasEffects(e)||this.object.hasEffects(e)||t&&this.hasAccessEffect(e)||this.hasEffectsOnInteractionAtPath($,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,i){if(this.variable){return this.variable.hasEffectsOnInteractionAtPath(e,t,i)}if(this.replacement){return true}if(e.length<Li){return this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey(),...e],t,i)}return true}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();this.includeProperties(e,t)}includeAsAssignmentTarget(e,t,i){if(!this.assignmentDeoptimized)this.applyAssignmentDeoptimization();if(i){this.include(e,t)}else{this.includeProperties(e,t)}}includeCallArguments(e,t){if(this.variable){this.variable.includeCallArguments(e,t)}else{super.includeCallArguments(e,t)}}initialise(){this.propertyKey=getResolvablePropertyKey(this);this.accessInteraction={thisArg:this.object,type:U}}render(e,t,{renderedParentType:i,isCalleeOfRenderedParent:s,renderedSurroundingElement:n}=X){if(this.variable||this.replacement){const{snippets:{getPropertyAccess:n}}=t;let r=this.variable?this.variable.getName(n):this.replacement;if(i&&s)r="0, "+r;e.overwrite(this.start,this.end,r,{contentOnly:true,storeName:true})}else{if(i&&s){e.appendRight(this.start,"0, ")}this.object.render(e,t,{renderedSurroundingElement:n});this.property.render(e,t)}}setAssignedValue(e){this.assignmentInteraction={args:[e],thisArg:this.object,type:H}}applyDeoptimizations(){this.deoptimized=true;const{propertyReadSideEffects:e}=this.context.options.treeshake;if(this.bound&&e&&!(this.variable||this.replacement)){const e=this.getPropertyKey();this.object.deoptimizeThisOnInteractionAtPath(this.accessInteraction,[e],F);this.context.requestTreeshakingPass()}}applyAssignmentDeoptimization(){this.assignmentDeoptimized=true;const{propertyReadSideEffects:e}=this.context.options.treeshake;if(this.bound&&e&&!(this.variable||this.replacement)){this.object.deoptimizeThisOnInteractionAtPath(this.assignmentInteraction,[this.getPropertyKey()],F);this.context.requestTreeshakingPass()}}disallowNamespaceReassignment(){if(this.object instanceof Identifier){const e=this.scope.findVariable(this.object.name);if(e.isNamespace){if(this.variable){this.context.includeVariableInModule(this.variable)}this.context.warn({code:"ILLEGAL_NAMESPACE_REASSIGNMENT",message:`Illegal reassignment to import '${this.object.name}'`},this.start)}}}getPropertyKey(){if(this.propertyKey===null){this.propertyKey=N;const e=this.property.getLiteralValueAtPath($,F,this);return this.propertyKey=typeof e==="symbol"?N:String(e)}return this.propertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.context.options.treeshake;return!(this.variable||this.replacement)&&t&&(t==="always"||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey()],this.accessInteraction,e))}includeProperties(e,t){if(!this.included){this.included=true;if(this.variable){this.context.includeVariableInModule(this.variable)}}this.object.include(e,t);this.property.include(e,t)}}function resolveNamespaceVariables(e,t,i){if(t.length===0)return e;if(!e.isNamespace||e instanceof ExternalVariable)return null;const s=t[0].key;const n=e.context.traceExport(s);if(!n){const n=e.context.fileName;i.warn({code:"MISSING_EXPORT",exporter:relativeId(n),importer:relativeId(i.fileName),message:`'${s}' is not exported by '${relativeId(n)}'`,missing:s,url:`https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module`},t[0].pos);return"undefined"}return resolveNamespaceVariables(n,t.slice(1),i)}class CallExpressionBase extends NodeBase{constructor(){super(...arguments);this.returnExpression=null;this.deoptimizableDependentExpressions=[];this.expressionsToBeDeoptimized=new Set}deoptimizeCache(){if(this.returnExpression!==z){this.returnExpression=z;for(const e of this.deoptimizableDependentExpressions){e.deoptimizeCache()}for(const e of this.expressionsToBeDeoptimized){e.deoptimizePath(O)}}}deoptimizePath(e){if(e.length===0||this.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this)){return}const t=this.getReturnExpression();if(t!==z){t.deoptimizePath(e)}}deoptimizeThisOnInteractionAtPath(e,t,i){const s=this.getReturnExpression(i);if(s===z){e.thisArg.deoptimizePath(O)}else{i.withTrackedEntityAtPath(t,s,(()=>{this.expressionsToBeDeoptimized.add(e.thisArg);s.deoptimizeThisOnInteractionAtPath(e,t,i)}),undefined)}}getLiteralValueAtPath(e,t,i){const s=this.getReturnExpression(t);if(s===z){return V}return t.withTrackedEntityAtPath(e,s,(()=>{this.deoptimizableDependentExpressions.push(i);return s.getLiteralValueAtPath(e,t,i)}),V)}getReturnExpressionWhenCalledAtPath(e,t,i,s){const n=this.getReturnExpression(i);if(this.returnExpression===z){return z}return i.withTrackedEntityAtPath(e,n,(()=>{this.deoptimizableDependentExpressions.push(s);return n.getReturnExpressionWhenCalledAtPath(e,t,i,s)}),z)}hasEffectsOnInteractionAtPath(e,t,i){const{type:s}=t;if(s===j){if((t.withNew?i.instantiated:i.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)){return false}}else if((s===H?i.assigned:i.accessed).trackEntityAtPathAndGetIfTracked(e,this)){return false}return this.getReturnExpression().hasEffectsOnInteractionAtPath(e,t,i)}}class CallExpression extends CallExpressionBase{bind(){super.bind();if(this.callee instanceof Identifier){const e=this.scope.findVariable(this.callee.name);if(e.isNamespace){this.context.warn({code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ('${this.callee.name}')`},this.start)}if(this.callee.name==="eval"){this.context.warn({code:"EVAL",message:`Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification`,url:"https://rollupjs.org/guide/en/#avoiding-eval"},this.start)}}this.interaction={args:this.arguments,thisArg:this.callee instanceof MemberExpression&&!this.callee.variable?this.callee.object:null,type:j,withNew:false}}hasEffects(e){try{for(const t of this.arguments){if(t.hasEffects(e))return true}if(this.context.options.treeshake.annotations&&this.annotations)return false;return this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath($,this.interaction,e)}finally{if(!this.deoptimized)this.applyDeoptimizations()}}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();if(t){super.include(e,t);if(t===Jt&&this.callee instanceof Identifier&&this.callee.variable){this.callee.variable.markCalledFromTryStatement()}}else{this.included=true;this.callee.include(e,false)}this.callee.includeCallArguments(e,this.arguments)}render(e,t,{renderedSurroundingElement:i}=X){this.callee.render(e,t,{isCalleeOfRenderedParent:true,renderedSurroundingElement:i});renderCallArguments(e,t,this)}applyDeoptimizations(){this.deoptimized=true;if(this.interaction.thisArg){this.callee.deoptimizeThisOnInteractionAtPath(this.interaction,$,F)}for(const e of this.arguments){e.deoptimizePath(O)}this.context.requestTreeshakingPass()}getReturnExpression(e=F){if(this.returnExpression===null){this.returnExpression=z;return this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath($,this.interaction,e,this)}return this.returnExpression}}class CatchScope extends ParameterScope{addDeclaration(e,t,i,s){const n=this.variables.get(e.name);if(n){this.parent.addDeclaration(e,t,mt,s);n.addDeclaration(e,i);return n}return this.parent.addDeclaration(e,t,i,s)}}class CatchClause extends NodeBase{createScope(e){this.scope=new CatchScope(e,this.context)}parseNode(e){const{param:t}=e;if(t){this.param=new(this.context.getNodeConstructor(t.type))(t,this,this.scope);this.param.declare("parameter",z)}super.parseNode(e)}}class ChainExpression extends NodeBase{}class ClassBodyScope extends ChildScope{constructor(e,t,i){super(e);this.variables.set("this",this.thisVariable=new LocalVariable("this",null,t,i));this.instanceScope=new ChildScope(this);this.instanceScope.variables.set("this",new ThisVariable(i))}findLexicalBoundary(){return this}}class ClassBody extends NodeBase{createScope(e){this.scope=new ClassBodyScope(e,this.parent,this.context)}include(e,t){this.included=true;this.context.includeVariableInModule(this.scope.thisVariable);for(const i of this.body){i.include(e,t)}}parseNode(e){const t=this.body=[];for(const i of e.body){t.push(new(this.context.getNodeConstructor(i.type))(i,this,i.static?this.scope:this.scope.instanceScope))}super.parseNode(e)}applyDeoptimizations(){}}class MethodBase extends NodeBase{constructor(){super(...arguments);this.accessedValue=null}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue().deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){if(e.type===U&&this.kind==="get"&&t.length===0){return this.value.deoptimizeThisOnInteractionAtPath({args:K,thisArg:e.thisArg,type:j,withNew:false},$,i)}if(e.type===H&&this.kind==="set"&&t.length===0){return this.value.deoptimizeThisOnInteractionAtPath({args:e.args,thisArg:e.thisArg,type:j,withNew:false},$,i)}this.getAccessedValue().deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){return this.getAccessedValue().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.getAccessedValue().getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffects(e){return this.key.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,i){if(this.kind==="get"&&t.type===U&&e.length===0){return this.value.hasEffectsOnInteractionAtPath($,{args:K,thisArg:t.thisArg,type:j,withNew:false},i)}if(this.kind==="set"&&t.type===H){return this.value.hasEffectsOnInteractionAtPath($,{args:t.args,thisArg:t.thisArg,type:j,withNew:false},i)}return this.getAccessedValue().hasEffectsOnInteractionAtPath(e,t,i)}applyDeoptimizations(){}getAccessedValue(){if(this.accessedValue===null){if(this.kind==="get"){this.accessedValue=z;return this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath($,Y,F,this)}else{return this.accessedValue=this.value}}return this.accessedValue}}class MethodDefinition extends MethodBase{applyDeoptimizations(){}}class ObjectMember extends ExpressionEntity{constructor(e,t){super();this.object=e;this.key=t}deoptimizePath(e){this.object.deoptimizePath([this.key,...e])}deoptimizeThisOnInteractionAtPath(e,t,i){this.object.deoptimizeThisOnInteractionAtPath(e,[this.key,...t],i)}getLiteralValueAtPath(e,t,i){return this.object.getLiteralValueAtPath([this.key,...e],t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...e],t,i,s)}hasEffectsOnInteractionAtPath(e,t,i){return this.object.hasEffectsOnInteractionAtPath([this.key,...e],t,i)}}class ClassNode extends NodeBase{constructor(){super(...arguments);this.objectEntity=null}createScope(e){this.scope=new ChildScope(e)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){this.getObjectEntity().deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){return this.getObjectEntity().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffects(e){var t,i;if(!this.deoptimized)this.applyDeoptimizations();const s=((t=this.superClass)===null||t===void 0?void 0:t.hasEffects(e))||this.body.hasEffects(e);(i=this.id)===null||i===void 0?void 0:i.markDeclarationReached();return s||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,i){var s;if(t.type===j&&e.length===0){return!t.withNew||(this.classConstructor!==null?this.classConstructor.hasEffectsOnInteractionAtPath(e,t,i):(s=this.superClass)===null||s===void 0?void 0:s.hasEffectsOnInteractionAtPath(e,t,i))||false}else{return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,i)}}include(e,t){var i;if(!this.deoptimized)this.applyDeoptimizations();this.included=true;(i=this.superClass)===null||i===void 0?void 0:i.include(e,t);this.body.include(e,t);if(this.id){this.id.markDeclarationReached();this.id.include()}}initialise(){var e;(e=this.id)===null||e===void 0?void 0:e.declare("class",this);for(const e of this.body.body){if(e instanceof MethodDefinition&&e.kind==="constructor"){this.classConstructor=e;return}}this.classConstructor=null}applyDeoptimizations(){this.deoptimized=true;for(const e of this.body.body){if(!(e.static||e instanceof MethodDefinition&&e.kind==="constructor")){e.deoptimizePath(O)}}this.context.requestTreeshakingPass()}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}const e=[];const t=[];for(const i of this.body.body){const s=i.static?e:t;const n=i.kind;if(s===t&&!n)continue;const r=n==="set"||n==="get"?n:"init";let o;if(i.computed){const e=i.key.getLiteralValueAtPath($,F,this);if(typeof e==="symbol"){s.push({key:N,kind:r,property:i});continue}else{o=String(e)}}else{o=i.key instanceof Identifier?i.key.name:String(i.key.value)}s.push({key:o,kind:r,property:i})}e.unshift({key:"prototype",kind:"init",property:new ObjectEntity(t,this.superClass?new ObjectMember(this.superClass,"prototype"):ai)});return this.objectEntity=new ObjectEntity(e,this.superClass||ai)}}class ClassDeclaration extends ClassNode{initialise(){super.initialise();if(this.id!==null){this.id.variable.isId=true}}parseNode(e){if(e.id!==null){this.id=new Identifier(e.id,this,this.scope.parent)}super.parseNode(e)}render(e,t){const{exportNamesByVariable:i,format:s,snippets:{_:n}}=t;if(s==="system"&&this.id&&i.has(this.id.variable)){e.appendLeft(this.end,`${n}${getSystemExportStatement([this.id.variable],t)};`)}super.render(e,t)}}class ClassExpression extends ClassNode{render(e,t,{renderedSurroundingElement:i}=X){super.render(e,t);if(i===Dt){e.appendRight(this.start,"(");e.prependLeft(this.end,")")}}}class MultiExpression extends ExpressionEntity{constructor(e){super();this.expressions=e;this.included=false}deoptimizePath(e){for(const t of this.expressions){t.deoptimizePath(e)}}getReturnExpressionWhenCalledAtPath(e,t,i,s){return new MultiExpression(this.expressions.map((n=>n.getReturnExpressionWhenCalledAtPath(e,t,i,s))))}hasEffectsOnInteractionAtPath(e,t,i){for(const s of this.expressions){if(s.hasEffectsOnInteractionAtPath(e,t,i))return true}return false}}class ConditionalExpression extends NodeBase{constructor(){super(...arguments);this.expressionsToBeDeoptimized=[];this.isBranchResolutionAnalysed=false;this.usedBranch=null}deoptimizeCache(){if(this.usedBranch!==null){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null;e.deoptimizePath(O);for(const e of this.expressionsToBeDeoptimized){e.deoptimizeCache()}}}deoptimizePath(e){const t=this.getUsedBranch();if(!t){this.consequent.deoptimizePath(e);this.alternate.deoptimizePath(e)}else{t.deoptimizePath(e)}}deoptimizeThisOnInteractionAtPath(e,t,i){this.consequent.deoptimizeThisOnInteractionAtPath(e,t,i);this.alternate.deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){const s=this.getUsedBranch();if(!s)return V;this.expressionsToBeDeoptimized.push(i);return s.getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){const n=this.getUsedBranch();if(!n)return new MultiExpression([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,i,s),this.alternate.getReturnExpressionWhenCalledAtPath(e,t,i,s)]);this.expressionsToBeDeoptimized.push(s);return n.getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffects(e){if(this.test.hasEffects(e))return true;const t=this.getUsedBranch();if(!t){return this.consequent.hasEffects(e)||this.alternate.hasEffects(e)}return t.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,i){const s=this.getUsedBranch();if(!s){return this.consequent.hasEffectsOnInteractionAtPath(e,t,i)||this.alternate.hasEffectsOnInteractionAtPath(e,t,i)}return s.hasEffectsOnInteractionAtPath(e,t,i)}include(e,t){this.included=true;const i=this.getUsedBranch();if(t||this.test.shouldBeIncluded(e)||i===null){this.test.include(e,t);this.consequent.include(e,t);this.alternate.include(e,t)}else{i.include(e,t)}}includeCallArguments(e,t){const i=this.getUsedBranch();if(!i){this.consequent.includeCallArguments(e,t);this.alternate.includeCallArguments(e,t)}else{i.includeCallArguments(e,t)}}render(e,t,{isCalleeOfRenderedParent:i,preventASI:s,renderedParentType:n,renderedSurroundingElement:r}=X){const o=this.getUsedBranch();if(!this.test.included){const l=findFirstOccurrenceOutsideComment(e.original,":",this.consequent.end);const c=findNonWhiteSpace(e.original,(this.consequent.included?findFirstOccurrenceOutsideComment(e.original,"?",this.test.end):l)+1);if(s){removeLineBreaks(e,c,o.start)}e.remove(this.start,c);if(this.consequent.included){e.remove(l,this.end)}removeAnnotations(this,e);o.render(e,t,{isCalleeOfRenderedParent:i,preventASI:true,renderedParentType:n||this.parent.type,renderedSurroundingElement:r||this.parent.type})}else{this.test.render(e,t,{renderedSurroundingElement:r});this.consequent.render(e,t);this.alternate.render(e,t)}}getUsedBranch(){if(this.isBranchResolutionAnalysed){return this.usedBranch}this.isBranchResolutionAnalysed=true;const e=this.test.getLiteralValueAtPath($,F,this);return typeof e==="symbol"?null:this.usedBranch=e?this.consequent:this.alternate}}class ContinueStatement extends NodeBase{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return true;e.includedLabels.add(this.label.name);e.brokenFlow=ft}else{if(!e.ignore.continues)return true;e.brokenFlow=pt}return false}include(e){this.included=true;if(this.label){this.label.include();e.includedLabels.add(this.label.name)}e.brokenFlow=this.label?ft:pt}}class DoWhileStatement extends NodeBase{hasEffects(e){if(this.test.hasEffects(e))return true;const{brokenFlow:t,ignore:{breaks:i,continues:s}}=e;e.ignore.breaks=true;e.ignore.continues=true;if(this.body.hasEffects(e))return true;e.ignore.breaks=i;e.ignore.continues=s;e.brokenFlow=t;return false}include(e,t){this.included=true;this.test.include(e,t);const{brokenFlow:i}=e;this.body.include(e,t,{asSingleStatement:true});e.brokenFlow=i}}class EmptyStatement extends NodeBase{hasEffects(){return false}}class ExportAllDeclaration extends NodeBase{hasEffects(){return false}initialise(){this.context.addExport(this)}render(e,t,i){e.remove(i.start,i.end)}applyDeoptimizations(){}}ExportAllDeclaration.prototype.needsBoundaries=true;class FunctionDeclaration extends FunctionNode{initialise(){super.initialise();if(this.id!==null){this.id.variable.isId=true}}parseNode(e){if(e.id!==null){this.id=new Identifier(e.id,this,this.scope.parent)}super.parseNode(e)}}function getDeclarationStart(e,t){return findNonWhiteSpace(e,findFirstOccurrenceOutsideComment(e,"default",t)+7)}function getIdInsertPosition(e,t,i,s){const n=findFirstOccurrenceOutsideComment(e,t,s)+t.length;e=e.slice(n,findFirstOccurrenceOutsideComment(e,i,n));const r=findFirstOccurrenceOutsideComment(e,"*");if(r===-1){return n}return n+r+1}class ExportDefaultDeclaration extends NodeBase{include(e,t){super.include(e,t);if(t){this.context.includeVariableInModule(this.variable)}}initialise(){const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name;this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.context.getModuleName(),this,this.context);this.context.addExport(this)}render(e,t,i){const{start:s,end:n}=i;const r=getDeclarationStart(e.original,this.start);if(this.declaration instanceof FunctionDeclaration){this.renderNamedDeclaration(e,r,"function","(",this.declaration.id===null,t)}else if(this.declaration instanceof ClassDeclaration){this.renderNamedDeclaration(e,r,"class","{",this.declaration.id===null,t)}else if(this.variable.getOriginalVariable()!==this.variable){treeshakeNode(this,e,s,n);return}else if(this.variable.included){this.renderVariableDeclaration(e,r,t)}else{e.remove(this.start,r);this.declaration.render(e,t,{renderedSurroundingElement:Dt});if(e.original[this.end-1]!==";"){e.appendLeft(this.end,";")}return}this.declaration.render(e,t)}applyDeoptimizations(){}renderNamedDeclaration(e,t,i,s,n,r){const{exportNamesByVariable:o,format:l,snippets:{getPropertyAccess:c}}=r;const u=this.variable.getName(c);e.remove(this.start,t);if(n){e.appendLeft(getIdInsertPosition(e.original,i,s,t),` ${u}`)}if(l==="system"&&this.declaration instanceof ClassDeclaration&&o.has(this.variable)){e.appendLeft(this.end,` ${getSystemExportStatement([this.variable],r)};`)}}renderVariableDeclaration(e,t,{format:i,exportNamesByVariable:s,snippets:{cnst:n,getPropertyAccess:r}}){const o=e.original.charCodeAt(this.end-1)===59;const l=i==="system"&&s.get(this.variable);if(l){e.overwrite(this.start,t,`${n} ${this.variable.getName(r)} = exports('${l[0]}', `);e.appendRight(o?this.end-1:this.end,")"+(o?"":";"))}else{e.overwrite(this.start,t,`${n} ${this.variable.getName(r)} = `);if(!o){e.appendLeft(this.end,";")}}}}ExportDefaultDeclaration.prototype.needsBoundaries=true;class ExportNamedDeclaration extends NodeBase{bind(){var e;(e=this.declaration)===null||e===void 0?void 0:e.bind()}hasEffects(e){var t;return!!((t=this.declaration)===null||t===void 0?void 0:t.hasEffects(e))}initialise(){this.context.addExport(this)}render(e,t,i){const{start:s,end:n}=i;if(this.declaration===null){e.remove(s,n)}else{e.remove(this.start,this.declaration.start);this.declaration.render(e,t,{end:n,start:s})}}applyDeoptimizations(){}}ExportNamedDeclaration.prototype.needsBoundaries=true;class ExportSpecifier extends NodeBase{applyDeoptimizations(){}}class ForInStatement extends NodeBase{createScope(e){this.scope=new BlockScope(e)}hasEffects(e){const{deoptimized:t,left:i,right:s}=this;if(!t)this.applyDeoptimizations();if(i.hasEffectsAsAssignmentTarget(e,false)||s.hasEffects(e))return true;const{brokenFlow:n,ignore:{breaks:r,continues:o}}=e;e.ignore.breaks=true;e.ignore.continues=true;if(this.body.hasEffects(e))return true;e.ignore.breaks=r;e.ignore.continues=o;e.brokenFlow=n;return false}include(e,t){const{body:i,deoptimized:s,left:n,right:r}=this;if(!s)this.applyDeoptimizations();this.included=true;n.includeAsAssignmentTarget(e,t||true,false);r.include(e,t);const{brokenFlow:o}=e;i.include(e,t,{asSingleStatement:true});e.brokenFlow=o}initialise(){this.left.setAssignedValue(z)}render(e,t){this.left.render(e,t,Oi);this.right.render(e,t,Oi);if(e.original.charCodeAt(this.right.start-1)===110){e.prependLeft(this.right.start," ")}this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=true;this.left.deoptimizePath($);this.context.requestTreeshakingPass()}}class ForOfStatement extends NodeBase{createScope(e){this.scope=new BlockScope(e)}hasEffects(){if(!this.deoptimized)this.applyDeoptimizations();return true}include(e,t){const{body:i,deoptimized:s,left:n,right:r}=this;if(!s)this.applyDeoptimizations();this.included=true;n.includeAsAssignmentTarget(e,t||true,false);r.include(e,t);const{brokenFlow:o}=e;i.include(e,t,{asSingleStatement:true});e.brokenFlow=o}initialise(){this.left.setAssignedValue(z)}render(e,t){this.left.render(e,t,Oi);this.right.render(e,t,Oi);if(e.original.charCodeAt(this.right.start-1)===102){e.prependLeft(this.right.start," ")}this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=true;this.left.deoptimizePath($);this.context.requestTreeshakingPass()}}class ForStatement extends NodeBase{createScope(e){this.scope=new BlockScope(e)}hasEffects(e){var t,i,s;if(((t=this.init)===null||t===void 0?void 0:t.hasEffects(e))||((i=this.test)===null||i===void 0?void 0:i.hasEffects(e))||((s=this.update)===null||s===void 0?void 0:s.hasEffects(e)))return true;const{brokenFlow:n,ignore:{breaks:r,continues:o}}=e;e.ignore.breaks=true;e.ignore.continues=true;if(this.body.hasEffects(e))return true;e.ignore.breaks=r;e.ignore.continues=o;e.brokenFlow=n;return false}include(e,t){var i,s,n;this.included=true;(i=this.init)===null||i===void 0?void 0:i.include(e,t,{asSingleStatement:true});(s=this.test)===null||s===void 0?void 0:s.include(e,t);const{brokenFlow:r}=e;(n=this.update)===null||n===void 0?void 0:n.include(e,t);this.body.include(e,t,{asSingleStatement:true});e.brokenFlow=r}render(e,t){var i,s,n;(i=this.init)===null||i===void 0?void 0:i.render(e,t,Oi);(s=this.test)===null||s===void 0?void 0:s.render(e,t,Oi);(n=this.update)===null||n===void 0?void 0:n.render(e,t,Oi);this.body.render(e,t)}}class FunctionExpression extends FunctionNode{render(e,t,{renderedSurroundingElement:i}=X){super.render(e,t);if(i===Dt){e.appendRight(this.start,"(");e.prependLeft(this.end,")")}}}class TrackingScope extends BlockScope{constructor(){super(...arguments);this.hoistedDeclarations=[]}addDeclaration(e,t,i,s){this.hoistedDeclarations.push(e);return super.addDeclaration(e,t,i,s)}}const Fi=Symbol("unset");class IfStatement extends NodeBase{constructor(){super(...arguments);this.testValue=Fi}deoptimizeCache(){this.testValue=V}hasEffects(e){var t;if(this.test.hasEffects(e)){return true}const i=this.getTestValue();if(typeof i==="symbol"){const{brokenFlow:t}=e;if(this.consequent.hasEffects(e))return true;const i=e.brokenFlow;e.brokenFlow=t;if(this.alternate===null)return false;if(this.alternate.hasEffects(e))return true;e.brokenFlow=e.brokenFlow<i?e.brokenFlow:i;return false}return i?this.consequent.hasEffects(e):!!((t=this.alternate)===null||t===void 0?void 0:t.hasEffects(e))}include(e,t){this.included=true;if(t){this.includeRecursively(t,e)}else{const t=this.getTestValue();if(typeof t==="symbol"){this.includeUnknownTest(e)}else{this.includeKnownTest(e,t)}}}parseNode(e){this.consequentScope=new TrackingScope(this.scope);this.consequent=new(this.context.getNodeConstructor(e.consequent.type))(e.consequent,this,this.consequentScope);if(e.alternate){this.alternateScope=new TrackingScope(this.scope);this.alternate=new(this.context.getNodeConstructor(e.alternate.type))(e.alternate,this,this.alternateScope)}super.parseNode(e)}render(e,t){const{snippets:{getPropertyAccess:i}}=t;const s=this.getTestValue();const n=[];const r=this.test.included;const o=!this.context.options.treeshake;if(r){this.test.render(e,t)}else{e.remove(this.start,this.consequent.start)}if(this.consequent.included&&(o||typeof s==="symbol"||s)){this.consequent.render(e,t)}else{e.overwrite(this.consequent.start,this.consequent.end,r?";":"");n.push(...this.consequentScope.hoistedDeclarations)}if(this.alternate){if(this.alternate.included&&(o||typeof s==="symbol"||!s)){if(r){if(e.original.charCodeAt(this.alternate.start-1)===101){e.prependLeft(this.alternate.start," ")}}else{e.remove(this.consequent.end,this.alternate.start)}this.alternate.render(e,t)}else{if(r&&this.shouldKeepAlternateBranch()){e.overwrite(this.alternate.start,this.end,";")}else{e.remove(this.consequent.end,this.end)}n.push(...this.alternateScope.hoistedDeclarations)}}this.renderHoistedDeclarations(n,e,i)}applyDeoptimizations(){}getTestValue(){if(this.testValue===Fi){return this.testValue=this.test.getLiteralValueAtPath($,F,this)}return this.testValue}includeKnownTest(e,t){var i;if(this.test.shouldBeIncluded(e)){this.test.include(e,false)}if(t&&this.consequent.shouldBeIncluded(e)){this.consequent.include(e,false,{asSingleStatement:true})}if(!t&&((i=this.alternate)===null||i===void 0?void 0:i.shouldBeIncluded(e))){this.alternate.include(e,false,{asSingleStatement:true})}}includeRecursively(e,t){var i;this.test.include(t,e);this.consequent.include(t,e);(i=this.alternate)===null||i===void 0?void 0:i.include(t,e)}includeUnknownTest(e){var t;this.test.include(e,false);const{brokenFlow:i}=e;let s=dt;if(this.consequent.shouldBeIncluded(e)){this.consequent.include(e,false,{asSingleStatement:true});s=e.brokenFlow;e.brokenFlow=i}if((t=this.alternate)===null||t===void 0?void 0:t.shouldBeIncluded(e)){this.alternate.include(e,false,{asSingleStatement:true});e.brokenFlow=e.brokenFlow<s?e.brokenFlow:s}}renderHoistedDeclarations(e,t,i){const s=[...new Set(e.map((e=>{const t=e.variable;return t.included?t.getName(i):""})))].filter(Boolean).join(", ");if(s){const e=this.parent.type;const i=e!==zt&&e!==Rt;t.prependRight(this.start,`${i?"{ ":""}var ${s}; `);if(i){t.appendLeft(this.end,` }`)}}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof IfStatement&&e.alternate){return true}if(e instanceof BlockStatement){return false}e=e.parent}while(e);return false}}class ImportDeclaration extends NodeBase{bind(){}hasEffects(){return false}initialise(){this.context.addImport(this)}render(e,t,i){e.remove(i.start,i.end)}applyDeoptimizations(){}}ImportDeclaration.prototype.needsBoundaries=true;class ImportDefaultSpecifier extends NodeBase{applyDeoptimizations(){}}const Vi="_interopDefault";const Bi="_interopDefaultLegacy";const zi="_interopNamespace";const Ui="_interopNamespaceDefault";const Hi="_interopNamespaceDefaultOnly";const ji="_mergeNamespaces";const Gi={auto:Vi,default:null,defaultOnly:null,esModule:null,false:null,true:Bi};const isDefaultAProperty=(e,t)=>e==="esModule"||t&&(e==="auto"||e==="true");const Wi={auto:zi,default:Ui,defaultOnly:Hi,esModule:null,false:null,true:zi};const canDefaultBeTakenFromNamespace=(e,t)=>isDefaultAProperty(e,t)&&Gi[e]===Vi;const getHelpersBlock=(e,t,i,s,n,r,o)=>{const l=new Set(e);for(const e of Ki){if(t.has(e)){l.add(e)}}return Ki.map((e=>l.has(e)?qi[e](i,s,n,r,o,l):"")).join("")};const qi={[Bi](e,t,i){const{_:s,getDirectReturnFunction:n,n:r}=t;const[o,l]=n(["e"],{functionReturn:true,lineBreakIndent:null,name:Bi});return`${o}e${s}&&${s}typeof e${s}===${s}'object'${s}&&${s}'default'${s}in e${s}?${s}`+`${i?getDefaultLiveBinding(t):getDefaultStatic(t)}${l}${r}${r}`},[Vi](e,t,i){const{_:s,getDirectReturnFunction:n,n:r}=t;const[o,l]=n(["e"],{functionReturn:true,lineBreakIndent:null,name:Vi});return`${o}e${s}&&${s}e.__esModule${s}?${s}`+`${i?getDefaultLiveBinding(t):getDefaultStatic(t)}${l}${r}${r}`},[Hi](e,t,i,s,n){const{getDirectReturnFunction:r,getObject:o,n:l}=t;const[c,u]=r(["e"],{functionReturn:true,lineBreakIndent:null,name:Hi});return`${c}${getFrozen(s,getWithToStringTag(n,o([["__proto__","null"],["default","e"]],{lineBreakIndent:null}),t))}${u}${l}${l}`},[Ui](e,t,i,s,n){const{_:r,n:o}=t;return`function ${Ui}(e)${r}{${o}`+createNamespaceObject(e,e,t,i,s,n)+`}${o}${o}`},[zi](e,t,i,s,n,r){const{_:o,getDirectReturnFunction:l,n:c}=t;if(r.has(Ui)){const[e,t]=l(["e"],{functionReturn:true,lineBreakIndent:null,name:zi});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${Ui}(e)${t}${c}${c}`}return`function ${zi}(e)${o}{${c}`+`${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${c}`+createNamespaceObject(e,e,t,i,s,n)+`}${c}${c}`},[ji](e,t,i,s,n){const{_:r,cnst:o,n:l}=t;const c=o==="var"&&i;return`function ${ji}(n, m)${r}{${l}`+`${e}${loopOverNamespaces(`{${l}`+`${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${l}`+(i?c?copyOwnPropertyLiveBinding:copyPropertyLiveBinding:copyPropertyStatic)(e,e+e+e+e,t)+`${e}${e}${e}}${l}`+`${e}${e}}`,c,e,t)}${l}`+`${e}return ${getFrozen(s,getWithToStringTag(n,"n",t))};${l}`+`}${l}${l}`}};const getDefaultLiveBinding=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`;const getDefaultStatic=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`;const createNamespaceObject=(e,t,i,s,n,r)=>{const{_:o,cnst:l,getObject:c,getPropertyAccess:u,n:h,s:d}=i;const p=`{${h}`+(s?copyNonDefaultOwnPropertyLiveBinding:copyPropertyStatic)(e,t+e+e,i)+`${t}${e}}`;return`${t}${l} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${getToStringTagValue(c)}${o}}`:""});${h}`+`${t}if${o}(e)${o}{${h}`+`${t}${e}${loopOverKeys(p,!s,i)}${h}`+`${t}}${h}`+`${t}n${u("default")}${o}=${o}e;${h}`+`${t}return ${getFrozen(n,"n")}${d}${h}`};const loopOverKeys=(e,t,{_:i,cnst:s,getFunctionIntro:n,s:r})=>s!=="var"||t?`for${i}(${s} k in e)${i}${e}`:`Object.keys(e).forEach(${n(["k"],{isAsync:false,name:null})}${e})${r}`;const loopOverNamespaces=(e,t,i,{_:s,cnst:n,getDirectReturnFunction:r,getFunctionIntro:o,n:l})=>{if(t){const[t,n]=r(["e"],{functionReturn:false,lineBreakIndent:{base:i,t:i},name:null});return`m.forEach(${t}`+`e${s}&&${s}typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e)${s}&&${s}Object.keys(e).forEach(${o(["k"],{isAsync:false,name:null})}${e})${n});`}return`for${s}(var i${s}=${s}0;${s}i${s}<${s}m.length;${s}i++)${s}{${l}`+`${i}${i}${n} e${s}=${s}m[i];${l}`+`${i}${i}if${s}(typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e))${s}{${s}for${s}(${n} k in e)${s}${e}${s}}${l}${i}}`};const copyNonDefaultOwnPropertyLiveBinding=(e,t,i)=>{const{_:s,n:n}=i;return`${t}if${s}(k${s}!==${s}'default')${s}{${n}`+copyOwnPropertyLiveBinding(e,t+e,i)+`${t}}${n}`};const copyOwnPropertyLiveBinding=(e,t,{_:i,cnst:s,getDirectReturnFunction:n,n:r})=>{const[o,l]=n([],{functionReturn:true,lineBreakIndent:null,name:null});return`${t}${s} d${i}=${i}Object.getOwnPropertyDescriptor(e,${i}k);${r}`+`${t}Object.defineProperty(n,${i}k,${i}d.get${i}?${i}d${i}:${i}{${r}`+`${t}${e}enumerable:${i}true,${r}`+`${t}${e}get:${i}${o}e[k]${l}${r}`+`${t}});${r}`};const copyPropertyLiveBinding=(e,t,{_:i,cnst:s,getDirectReturnFunction:n,n:r})=>{const[o,l]=n([],{functionReturn:true,lineBreakIndent:null,name:null});return`${t}${s} d${i}=${i}Object.getOwnPropertyDescriptor(e,${i}k);${r}`+`${t}if${i}(d)${i}{${r}`+`${t}${e}Object.defineProperty(n,${i}k,${i}d.get${i}?${i}d${i}:${i}{${r}`+`${t}${e}${e}enumerable:${i}true,${r}`+`${t}${e}${e}get:${i}${o}e[k]${l}${r}`+`${t}${e}});${r}`+`${t}}${r}`};const copyPropertyStatic=(e,t,{_:i,n:s})=>`${t}n[k]${i}=${i}e[k];${s}`;const getFrozen=(e,t)=>e?`Object.freeze(${t})`:t;const getWithToStringTag=(e,t,{_:i,getObject:s})=>e?`Object.defineProperty(${t},${i}Symbol.toStringTag,${i}${getToStringTagValue(s)})`:t;const Ki=Object.keys(qi);function getToStringTagValue(e){return e([["value","'Module'"]],{lineBreakIndent:null})}class ImportExpression extends NodeBase{constructor(){super(...arguments);this.inlineNamespace=null;this.mechanism=null;this.resolution=null}hasEffects(){return true}include(e,t){if(!this.included){this.included=true;this.context.includeDynamicImport(this);this.scope.addAccessedDynamicImport(this)}this.source.include(e,t)}initialise(){this.context.addDynamicImport(this)}render(e,t){if(this.inlineNamespace){const{snippets:{getDirectReturnFunction:i,getPropertyAccess:s}}=t;const[n,r]=i([],{functionReturn:true,lineBreakIndent:null,name:null});e.overwrite(this.start,this.end,`Promise.resolve().then(${n}${this.inlineNamespace.getName(s)}${r})`,{contentOnly:true});return}if(this.mechanism){e.overwrite(this.start,findFirstOccurrenceOutsideComment(e.original,"(",this.start+6)+1,this.mechanism.left,{contentOnly:true});e.overwrite(this.end-1,this.end,this.mechanism.right,{contentOnly:true})}this.source.render(e,t)}renderFinalResolution(e,t,i,{getDirectReturnFunction:s}){e.overwrite(this.source.start,this.source.end,t);if(i){const[t,n]=s(["n"],{functionReturn:true,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${t}n.${i}${n})`)}}setExternalResolution(e,t,i,s,n,r){const{format:o}=i;this.inlineNamespace=null;this.resolution=t;const l=[...Yi[o]||[]];let c;({helper:c,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,i,s,n));if(c){l.push(c)}if(l.length>0){this.scope.addAccessedGlobals(l,r)}}setInternalResolution(e){this.inlineNamespace=e}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(e,t,{compact:i,dynamicImportFunction:s,format:n,generatedCode:{arrowFunctions:r},interop:o},{_:l,getDirectReturnFunction:c,getDirectReturnIifeLeft:u},h){const d=h.hookFirstSync("renderDynamicImport",[{customResolution:typeof this.resolution==="string"?this.resolution:null,format:n,moduleId:this.context.module.id,targetModuleId:this.resolution&&typeof this.resolution!=="string"?this.resolution.id:null}]);if(d){return{helper:null,mechanism:d}}const p=!this.resolution||typeof this.resolution==="string";switch(n){case"cjs":{const i=getInteropHelper(e,t,o);let s=`require(`;let n=`)`;if(i){s=`/*#__PURE__*/${i}(${s}`;n+=")"}const[l,h]=c([],{functionReturn:true,lineBreakIndent:null,name:null});s=`Promise.resolve().then(${l}${s}`;n+=`${h})`;if(!r&&p){s=u(["t"],`${s}t${n}`,{needsArrowReturnParens:false,needsWrappedFunction:true});n=")"}return{helper:i,mechanism:{left:s,right:n}}}case"amd":{const s=i?"c":"resolve";const n=i?"e":"reject";const h=getInteropHelper(e,t,o);const[d,f]=c(["m"],{functionReturn:false,lineBreakIndent:null,name:null});const m=h?`${d}${s}(/*#__PURE__*/${h}(m))${f}`:s;const[g,y]=c([s,n],{functionReturn:false,lineBreakIndent:null,name:null});let E=`new Promise(${g}require([`;let x=`],${l}${m},${l}${n})${y})`;if(!r&&p){E=u(["t"],`${E}t${x}`,{needsArrowReturnParens:false,needsWrappedFunction:true});x=")"}return{helper:h,mechanism:{left:E,right:x}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}};case"es":if(s){return{helper:null,mechanism:{left:`${s}(`,right:")"}}}}return{helper:null,mechanism:null}}}function getInteropHelper(e,t,i){return t==="external"?Wi[String(i(e instanceof ExternalModule?e.id:null))]:t==="default"?Hi:null}const Yi={amd:["require"],cjs:["require"],system:["module"]};class ImportNamespaceSpecifier extends NodeBase{applyDeoptimizations(){}}class ImportSpecifier extends NodeBase{applyDeoptimizations(){}}class LabeledStatement extends NodeBase{hasEffects(e){const t=e.brokenFlow;e.ignore.labels.add(this.label.name);if(this.body.hasEffects(e))return true;e.ignore.labels.delete(this.label.name);if(e.includedLabels.has(this.label.name)){e.includedLabels.delete(this.label.name);e.brokenFlow=t}return false}include(e,t){this.included=true;const i=e.brokenFlow;this.body.include(e,t);if(t||e.includedLabels.has(this.label.name)){this.label.include();e.includedLabels.delete(this.label.name);e.brokenFlow=i}}render(e,t){if(this.label.included){this.label.render(e,t)}else{e.remove(this.start,findNonWhiteSpace(e.original,findFirstOccurrenceOutsideComment(e.original,":",this.label.end)+1))}this.body.render(e,t)}}class LogicalExpression extends NodeBase{constructor(){super(...arguments);this.expressionsToBeDeoptimized=[];this.isBranchResolutionAnalysed=false;this.usedBranch=null}deoptimizeCache(){if(this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null;e.deoptimizePath(O);for(const e of this.expressionsToBeDeoptimized){e.deoptimizeCache()}this.context.requestTreeshakingPass()}}deoptimizePath(e){const t=this.getUsedBranch();if(!t){this.left.deoptimizePath(e);this.right.deoptimizePath(e)}else{t.deoptimizePath(e)}}deoptimizeThisOnInteractionAtPath(e,t,i){this.left.deoptimizeThisOnInteractionAtPath(e,t,i);this.right.deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){const s=this.getUsedBranch();if(!s)return V;this.expressionsToBeDeoptimized.push(i);return s.getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){const n=this.getUsedBranch();if(!n)return new MultiExpression([this.left.getReturnExpressionWhenCalledAtPath(e,t,i,s),this.right.getReturnExpressionWhenCalledAtPath(e,t,i,s)]);this.expressionsToBeDeoptimized.push(s);return n.getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffects(e){if(this.left.hasEffects(e)){return true}if(this.getUsedBranch()!==this.left){return this.right.hasEffects(e)}return false}hasEffectsOnInteractionAtPath(e,t,i){const s=this.getUsedBranch();if(!s){return this.left.hasEffectsOnInteractionAtPath(e,t,i)||this.right.hasEffectsOnInteractionAtPath(e,t,i)}return s.hasEffectsOnInteractionAtPath(e,t,i)}include(e,t){this.included=true;const i=this.getUsedBranch();if(t||i===this.right&&this.left.shouldBeIncluded(e)||!i){this.left.include(e,t);this.right.include(e,t)}else{i.include(e,t)}}render(e,t,{isCalleeOfRenderedParent:i,preventASI:s,renderedParentType:n,renderedSurroundingElement:r}=X){if(!this.left.included||!this.right.included){const o=findFirstOccurrenceOutsideComment(e.original,this.operator,this.left.end);if(this.right.included){const t=findNonWhiteSpace(e.original,o+2);e.remove(this.start,t);if(s){removeLineBreaks(e,t,this.right.start)}}else{e.remove(o,this.end)}removeAnnotations(this,e);this.getUsedBranch().render(e,t,{isCalleeOfRenderedParent:i,preventASI:s,renderedParentType:n||this.parent.type,renderedSurroundingElement:r||this.parent.type})}else{this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r});this.right.render(e,t)}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=true;const e=this.left.getLiteralValueAtPath($,F,this);if(typeof e==="symbol"){return null}else{this.usedBranch=this.operator==="||"&&e||this.operator==="&&"&&!e||this.operator==="??"&&e!=null?this.left:this.right}}return this.usedBranch}}const Xi="ROLLUP_ASSET_URL_";const Qi="ROLLUP_CHUNK_URL_";const Zi="ROLLUP_FILE_URL_";class MetaProperty extends NodeBase{addAccessedGlobals(e,t){const i=this.metaProperty;const s=(i&&(i.startsWith(Zi)||i.startsWith(Xi)||i.startsWith(Qi))?ts:Ji)[e];if(s.length>0){this.scope.addAccessedGlobals(s,t)}}getReferencedFileName(e){const t=this.metaProperty;if(t&&t.startsWith(Zi)){return e.getFileName(t.substring(Zi.length))}return null}hasEffects(){return false}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||t!==U}include(){if(!this.included){this.included=true;if(this.meta.name==="import"){this.context.addImportMeta(this);const e=this.parent;this.metaProperty=e instanceof MemberExpression&&typeof e.propertyKey==="string"?e.propertyKey:null}}}renderFinalMechanism(e,t,i,n,r){var o;const l=this.parent;const c=this.metaProperty;if(c&&(c.startsWith(Zi)||c.startsWith(Xi)||c.startsWith(Qi))){let n=null;let o=null;let u=null;let h;if(c.startsWith(Zi)){n=c.substring(Zi.length);h=r.getFileName(n)}else if(c.startsWith(Xi)){warnDeprecation(`Using the "${Xi}" prefix to reference files is deprecated. Use the "${Zi}" prefix instead.`,true,this.context.options);o=c.substring(Xi.length);h=r.getFileName(o)}else{warnDeprecation(`Using the "${Qi}" prefix to reference files is deprecated. Use the "${Zi}" prefix instead.`,true,this.context.options);u=c.substring(Qi.length);h=r.getFileName(u)}const d=normalize(s.relative(s.dirname(t),h));let p;if(o!==null){p=r.hookFirstSync("resolveAssetUrl",[{assetFileName:h,chunkId:t,format:i,moduleId:this.context.module.id,relativeAssetPath:d}])}if(!p){p=r.hookFirstSync("resolveFileUrl",[{assetReferenceId:o,chunkId:t,chunkReferenceId:u,fileName:h,format:i,moduleId:this.context.module.id,referenceId:n||o||u,relativePath:d}])||is[i](d)}e.overwrite(l.start,l.end,p,{contentOnly:true});return}const u=r.hookFirstSync("resolveImportMeta",[c,{chunkId:t,format:i,moduleId:this.context.module.id}])||((o=ss[i])===null||o===void 0?void 0:o.call(ss,c,{chunkId:t,snippets:n}));if(typeof u==="string"){if(l instanceof MemberExpression){e.overwrite(l.start,l.end,u,{contentOnly:true})}else{e.overwrite(this.start,this.end,u,{contentOnly:true})}}}}const Ji={amd:["document","module","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module"],umd:["document","require","URL"]};const ts={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]};const getResolveUrl=(e,t="URL")=>`new ${t}(${e}).href`;const getRelativeUrlFromDocument=(e,t=false)=>getResolveUrl(`'${e}', ${t?`typeof document === 'undefined' ? location.href : `:""}document.currentScript && document.currentScript.src || document.baseURI`);const getGenericImportMetaMechanism=e=>(t,{chunkId:i})=>{const s=e(i);return t===null?`({ url: ${s} })`:t==="url"?s:"undefined"};const getUrlFromDocument=(e,t=false)=>`${t?`typeof document === 'undefined' ? location.href : `:""}(document.currentScript && document.currentScript.src || new URL('${e}', document.baseURI).href)`;const is={amd:e=>{if(e[0]!==".")e="./"+e;return getResolveUrl(`require.toUrl('${e}'), document.baseURI`)},cjs:e=>`(typeof document === 'undefined' ? ${getResolveUrl(`'file:' + __dirname + '/${e}'`,`(require('u' + 'rl').URL)`)} : ${getRelativeUrlFromDocument(e)})`,es:e=>getResolveUrl(`'${e}', import.meta.url`),iife:e=>getRelativeUrlFromDocument(e),system:e=>getResolveUrl(`'${e}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${getResolveUrl(`'file:' + __dirname + '/${e}'`,`(require('u' + 'rl').URL)`)} : ${getRelativeUrlFromDocument(e,true)})`};const ss={amd:getGenericImportMetaMechanism((()=>getResolveUrl(`module.uri, document.baseURI`))),cjs:getGenericImportMetaMechanism((e=>`(typeof document === 'undefined' ? ${getResolveUrl(`'file:' + __filename`,`(require('u' + 'rl').URL)`)} : ${getUrlFromDocument(e)})`)),iife:getGenericImportMetaMechanism((e=>getUrlFromDocument(e))),system:(e,{snippets:{getPropertyAccess:t}})=>e===null?`module.meta`:`module.meta${t(e)}`,umd:getGenericImportMetaMechanism((e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${getResolveUrl(`'file:' + __filename`,`(require('u' + 'rl').URL)`)} : ${getUrlFromDocument(e,true)})`))};class NewExpression extends NodeBase{hasEffects(e){try{for(const t of this.arguments){if(t.hasEffects(e))return true}if(this.context.options.treeshake.annotations&&this.annotations){return false}return this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath($,this.interaction,e)}finally{if(!this.deoptimized)this.applyDeoptimizations()}}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||t!==U}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();if(t){super.include(e,t)}else{this.included=true;this.callee.include(e,false)}this.callee.includeCallArguments(e,this.arguments)}initialise(){this.interaction={args:this.arguments,thisArg:null,type:j,withNew:true}}render(e,t){this.callee.render(e,t);renderCallArguments(e,t,this)}applyDeoptimizations(){this.deoptimized=true;for(const e of this.arguments){e.deoptimizePath(O)}this.context.requestTreeshakingPass()}}class ObjectExpression extends NodeBase{constructor(){super(...arguments);this.objectEntity=null}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){this.getObjectEntity().deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){return this.getObjectEntity().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffectsOnInteractionAtPath(e,t,i){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,i)}render(e,t,{renderedSurroundingElement:i}=X){super.render(e,t);if(i===Dt||i===Pt){e.appendRight(this.start,"(");e.prependLeft(this.end,")")}}applyDeoptimizations(){}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}let e=ai;const t=[];for(const i of this.properties){if(i instanceof SpreadElement){t.push({key:N,kind:"init",property:i});continue}let s;if(i.computed){const e=i.key.getLiteralValueAtPath($,F,this);if(typeof e==="symbol"){t.push({key:N,kind:i.kind,property:i});continue}else{s=String(e)}}else{s=i.key instanceof Identifier?i.key.name:String(i.key.value);if(s==="__proto__"&&i.kind==="init"){e=i.value instanceof Literal&&i.value.value===null?null:i.value;continue}}t.push({key:s,kind:i.kind,property:i})}return this.objectEntity=new ObjectEntity(t,e)}}class PrivateIdentifier extends NodeBase{}class Program extends NodeBase{constructor(){super(...arguments);this.hasCachedEffect=false}hasEffects(e){if(this.hasCachedEffect)return true;for(const t of this.body){if(t.hasEffects(e)){return this.hasCachedEffect=true}}return false}include(e,t){this.included=true;for(const i of this.body){if(t||i.shouldBeIncluded(e)){i.include(e,t)}}}render(e,t){if(this.body.length){renderStatementList(this.body,e,this.start,this.end,t)}else{super.render(e,t)}}applyDeoptimizations(){}}class Property extends MethodBase{constructor(){super(...arguments);this.declarationInit=null}declare(e,t){this.declarationInit=t;return this.value.declare(e,z)}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();const t=this.context.options.treeshake.propertyReadSideEffects;return this.parent.type==="ObjectPattern"&&t==="always"||this.key.hasEffects(e)||this.value.hasEffects(e)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){if(!this.shorthand){this.key.render(e,t)}this.value.render(e,t,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){this.deoptimized=true;if(this.declarationInit!==null){this.declarationInit.deoptimizePath([N,N]);this.context.requestTreeshakingPass()}}}class PropertyDefinition extends NodeBase{deoptimizePath(e){var t;(t=this.value)===null||t===void 0?void 0:t.deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){var s;(s=this.value)===null||s===void 0?void 0:s.deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){return this.value?this.value.getLiteralValueAtPath(e,t,i):V}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,i,s):z}hasEffects(e){var t;return this.key.hasEffects(e)||this.static&&!!((t=this.value)===null||t===void 0?void 0:t.hasEffects(e))}hasEffectsOnInteractionAtPath(e,t,i){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,i)}applyDeoptimizations(){}}class ReturnStatement extends NodeBase{hasEffects(e){var t;if(!e.ignore.returnYield||((t=this.argument)===null||t===void 0?void 0:t.hasEffects(e)))return true;e.brokenFlow=ft;return false}include(e,t){var i;this.included=true;(i=this.argument)===null||i===void 0?void 0:i.include(e,t);e.brokenFlow=ft}initialise(){this.scope.addReturnExpression(this.argument||z)}render(e,t){if(this.argument){this.argument.render(e,t,{preventASI:true});if(this.argument.start===this.start+6){e.prependLeft(this.start+6," ")}}}}class SequenceExpression extends NodeBase{deoptimizePath(e){this.expressions[this.expressions.length-1].deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){this.expressions[this.expressions.length-1].deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,i)}hasEffects(e){for(const t of this.expressions){if(t.hasEffects(e))return true}return false}hasEffectsOnInteractionAtPath(e,t,i){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,t,i)}include(e,t){this.included=true;const i=this.expressions[this.expressions.length-1];for(const s of this.expressions){if(t||s===i&&!(this.parent instanceof ExpressionStatement)||s.shouldBeIncluded(e))s.include(e,t)}}render(e,t,{renderedParentType:i,isCalleeOfRenderedParent:s,preventASI:n}=X){let r=0;let o=null;const l=this.expressions[this.expressions.length-1];for(const{node:c,separator:u,start:h,end:d}of getCommaSeparatedNodesWithBoundaries(this.expressions,e,this.start,this.end)){if(!c.included){treeshakeNode(c,e,h,d);continue}r++;o=u;if(r===1&&n){removeLineBreaks(e,h,c.start)}if(r===1){const n=i||this.parent.type;c.render(e,t,{isCalleeOfRenderedParent:s&&c===l,renderedParentType:n,renderedSurroundingElement:n})}else{c.render(e,t)}}if(o){e.remove(o,this.end)}}}class StaticBlock extends NodeBase{createScope(e){this.scope=new BlockScope(e)}hasEffects(e){for(const t of this.body){if(t.hasEffects(e))return true}return false}include(e,t){this.included=true;for(const i of this.body){if(t||i.shouldBeIncluded(e))i.include(e,t)}}render(e,t){if(this.body.length){renderStatementList(this.body,e,this.start+1,this.end-1,t)}else{super.render(e,t)}}}class Super extends NodeBase{bind(){this.variable=this.scope.findVariable("this")}deoptimizePath(e){this.variable.deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){this.variable.deoptimizeThisOnInteractionAtPath(e,t,i)}include(){if(!this.included){this.included=true;this.context.includeVariableInModule(this.variable)}}}class SwitchCase extends NodeBase{hasEffects(e){var t;if((t=this.test)===null||t===void 0?void 0:t.hasEffects(e))return true;for(const t of this.consequent){if(e.brokenFlow)break;if(t.hasEffects(e))return true}return false}include(e,t){var i;this.included=true;(i=this.test)===null||i===void 0?void 0:i.include(e,t);for(const i of this.consequent){if(t||i.shouldBeIncluded(e))i.include(e,t)}}render(e,t,i){if(this.consequent.length){this.test&&this.test.render(e,t);const s=this.test?this.test.end:findFirstOccurrenceOutsideComment(e.original,"default",this.start)+7;const n=findFirstOccurrenceOutsideComment(e.original,":",s)+1;renderStatementList(this.consequent,e,n,i.end,t)}else{super.render(e,t)}}}SwitchCase.prototype.needsBoundaries=true;class SwitchStatement extends NodeBase{createScope(e){this.scope=new BlockScope(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return true;const{brokenFlow:t,ignore:{breaks:i}}=e;let s=Infinity;e.ignore.breaks=true;for(const i of this.cases){if(i.hasEffects(e))return true;s=e.brokenFlow<s?e.brokenFlow:s;e.brokenFlow=t}if(this.defaultCase!==null&&!(s===pt)){e.brokenFlow=s}e.ignore.breaks=i;return false}include(e,t){this.included=true;this.discriminant.include(e,t);const{brokenFlow:i}=e;let s=Infinity;let n=t||this.defaultCase!==null&&this.defaultCase<this.cases.length-1;for(let r=this.cases.length-1;r>=0;r--){const o=this.cases[r];if(o.included){n=true}if(!n){const e=createHasEffectsContext();e.ignore.breaks=true;n=o.hasEffects(e)}if(n){o.include(e,t);s=s<e.brokenFlow?s:e.brokenFlow;e.brokenFlow=i}else{s=i}}if(n&&this.defaultCase!==null&&!(s===pt)){e.brokenFlow=s}}initialise(){for(let e=0;e<this.cases.length;e++){if(this.cases[e].test===null){this.defaultCase=e;return}}this.defaultCase=null}render(e,t){this.discriminant.render(e,t);if(this.cases.length>0){renderStatementList(this.cases,e,this.cases[0].start,this.end-1,t)}}}class TaggedTemplateExpression extends CallExpressionBase{bind(){super.bind();if(this.tag.type===Mt){const e=this.tag.name;const t=this.scope.findVariable(e);if(t.isNamespace){this.context.warn({code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ('${e}')`},this.start)}}}hasEffects(e){try{for(const t of this.quasi.expressions){if(t.hasEffects(e))return true}return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath($,this.interaction,e)}finally{if(!this.deoptimized)this.applyDeoptimizations()}}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();if(t){super.include(e,t)}else{this.included=true;this.tag.include(e,t);this.quasi.include(e,t)}this.tag.includeCallArguments(e,this.interaction.args);const i=this.getReturnExpression();if(!i.included){i.include(e,false)}}initialise(){this.interaction={args:[z,...this.quasi.expressions],thisArg:this.tag instanceof MemberExpression&&!this.tag.variable?this.tag.object:null,type:j,withNew:false}}render(e,t){this.tag.render(e,t,{isCalleeOfRenderedParent:true});this.quasi.render(e,t)}applyDeoptimizations(){this.deoptimized=true;if(this.interaction.thisArg){this.tag.deoptimizeThisOnInteractionAtPath(this.interaction,$,F)}for(const e of this.quasi.expressions){e.deoptimizePath(O)}this.context.requestTreeshakingPass()}getReturnExpression(e=F){if(this.returnExpression===null){this.returnExpression=z;return this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath($,this.interaction,e,this)}return this.returnExpression}}class TemplateElement extends NodeBase{bind(){}hasEffects(){return false}include(){this.included=true}parseNode(e){this.value=e.value;super.parseNode(e)}render(){}}class TemplateLiteral extends NodeBase{deoptimizeThisOnInteractionAtPath(){}getLiteralValueAtPath(e){if(e.length>0||this.quasis.length!==1){return V}return this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){if(e.length!==1){return z}return getMemberReturnExpressionWhenCalled(kt,e[0])}hasEffectsOnInteractionAtPath(e,t,i){if(t.type===U){return e.length>1}if(t.type===j&&e.length===1){return hasMemberEffectWhenCalled(kt,e[0],t,i)}return true}render(e,t){e.indentExclusionRanges.push([this.start,this.end]);super.render(e,t)}}class UndefinedVariable extends Variable{constructor(){super("undefined")}getLiteralValueAtPath(){return undefined}}class ExportDefaultVariable extends LocalVariable{constructor(e,t,i){super(e,t,t.declaration,i);this.hasId=false;this.originalId=null;this.originalVariable=null;const s=t.declaration;if((s instanceof FunctionDeclaration||s instanceof ClassDeclaration)&&s.id){this.hasId=true;this.originalId=s.id}else if(s instanceof Identifier){this.originalId=s}}addReference(e){if(!this.hasId){this.name=e.name}}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getBaseVariableName(){const e=this.getOriginalVariable();if(e===this){return super.getBaseVariableName()}else{return e.getBaseVariableName()}}getDirectOriginalVariable(){return this.originalId&&(this.hasId||!(this.originalId.isPossibleTDZ()||this.originalId.variable.isReassigned||this.originalId.variable instanceof UndefinedVariable||"syntheticNamespace"in this.originalId.variable))?this.originalId.variable:null}getName(e){const t=this.getOriginalVariable();if(t===this){return super.getName(e)}else{return t.getName(e)}}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let e=this;let t;const i=new Set;do{i.add(e);t=e;e=t.getDirectOriginalVariable()}while(e instanceof ExportDefaultVariable&&!i.has(e));return this.originalVariable=e||t}}class ModuleScope extends ChildScope{constructor(e,t){super(e);this.context=t;this.variables.set("this",new LocalVariable("this",null,mt,t))}addExportDefaultDeclaration(e,t,i){const s=new ExportDefaultVariable(e,t,i);this.variables.set("default",s);return s}addNamespaceMemberAccess(){}deconflict(e,t,i){for(const s of this.children)s.deconflict(e,t,i)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t){return t}const i=this.context.traceVariable(e)||this.parent.findVariable(e);if(i instanceof GlobalVariable){this.accessedOutsideVariables.set(e,i)}return i}}class ThisExpression extends NodeBase{bind(){this.variable=this.scope.findVariable("this")}deoptimizePath(e){this.variable.deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){this.variable.deoptimizeThisOnInteractionAtPath(e.thisArg===this?{...e,thisArg:this.variable}:e,t,i)}hasEffectsOnInteractionAtPath(e,t,i){if(e.length===0){return t.type!==U}return this.variable.hasEffectsOnInteractionAtPath(e,t,i)}include(){if(!this.included){this.included=true;this.context.includeVariableInModule(this.variable)}}initialise(){this.alias=this.scope.findLexicalBoundary()instanceof ModuleScope?this.context.moduleContext:null;if(this.alias==="undefined"){this.context.warn({code:"THIS_IS_UNDEFINED",message:`The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten`,url:`https://rollupjs.org/guide/en/#error-this-is-undefined`},this.start)}}render(e){if(this.alias!==null){e.overwrite(this.start,this.end,this.alias,{contentOnly:false,storeName:true})}}}class ThrowStatement extends NodeBase{hasEffects(){return true}include(e,t){this.included=true;this.argument.include(e,t);e.brokenFlow=ft}render(e,t){this.argument.render(e,t,{preventASI:true});if(this.argument.start===this.start+5){e.prependLeft(this.start+5," ")}}}class TryStatement extends NodeBase{constructor(){super(...arguments);this.directlyIncluded=false;this.includedLabelsAfterBlock=null}hasEffects(e){var t;return(this.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(e))||!!((t=this.finalizer)===null||t===void 0?void 0:t.hasEffects(e))}include(e,t){var i,s;const n=(i=this.context.options.treeshake)===null||i===void 0?void 0:i.tryCatchDeoptimization;const{brokenFlow:r}=e;if(!this.directlyIncluded||!n){this.included=true;this.directlyIncluded=true;this.block.include(e,n?Jt:t);if(e.includedLabels.size>0){this.includedLabelsAfterBlock=[...e.includedLabels]}e.brokenFlow=r}else if(this.includedLabelsAfterBlock){for(const t of this.includedLabelsAfterBlock){e.includedLabels.add(t)}}if(this.handler!==null){this.handler.include(e,t);e.brokenFlow=r}(s=this.finalizer)===null||s===void 0?void 0:s.include(e,t)}}const ns={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>V,typeof:e=>typeof e,void:()=>undefined,"~":e=>~e};class UnaryExpression extends NodeBase{getLiteralValueAtPath(e,t,i){if(e.length>0)return V;const s=this.argument.getLiteralValueAtPath($,t,i);if(typeof s==="symbol")return V;return ns[this.operator](s)}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();if(this.operator==="typeof"&&this.argument instanceof Identifier)return false;return this.argument.hasEffects(e)||this.operator==="delete"&&this.argument.hasEffectsOnInteractionAtPath($,q,e)}hasEffectsOnInteractionAtPath(e,{type:t}){return t!==U||e.length>(this.operator==="void"?0:1)}applyDeoptimizations(){this.deoptimized=true;if(this.operator==="delete"){this.argument.deoptimizePath($);this.context.requestTreeshakingPass()}}}class UnknownNode extends NodeBase{hasEffects(){return true}include(e){super.include(e,true)}}class UpdateExpression extends NodeBase{hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();return this.argument.hasEffectsAsAssignmentTarget(e,true)}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||t!==U}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();this.included=true;this.argument.includeAsAssignmentTarget(e,t,true)}initialise(){this.argument.setAssignedValue(z)}render(e,t){const{exportNamesByVariable:i,format:s,snippets:{_:n}}=t;this.argument.render(e,t);if(s==="system"){const s=this.argument.variable;const r=i.get(s);if(r){if(this.prefix){if(r.length===1){renderSystemExportExpression(s,this.start,this.end,e,t)}else{renderSystemExportSequenceAfterExpression(s,this.start,this.end,this.parent.type!==Dt,e,t)}}else{const i=this.operator[0];renderSystemExportSequenceBeforeExpression(s,this.start,this.end,this.parent.type!==Dt,e,t,`${n}${i}${n}1`)}}}}applyDeoptimizations(){this.deoptimized=true;this.argument.deoptimizePath($);if(this.argument instanceof Identifier){const e=this.scope.findVariable(this.argument.name);e.isReassigned=true}this.context.requestTreeshakingPass()}}function isReassignedExportsMember(e,t){return e.renderBaseName!==null&&t.has(e)&&e.isReassigned}function areAllDeclarationsIncludedAndNotExported(e,t){for(const i of e){if(!i.id.included)return false;if(i.id.type===Mt){if(t.has(i.id.variable))return false}else{const e=[];i.id.addExportedVariables(e,t);if(e.length>0)return false}}return true}class VariableDeclaration extends NodeBase{deoptimizePath(){for(const e of this.declarations){e.deoptimizePath($)}}hasEffectsOnInteractionAtPath(){return false}include(e,t,{asSingleStatement:i}=X){this.included=true;for(const s of this.declarations){if(t||s.shouldBeIncluded(e))s.include(e,t);if(i){s.id.include(e,t)}}}initialise(){for(const e of this.declarations){e.declareDeclarator(this.kind)}}render(e,t,i=X){if(areAllDeclarationsIncludedAndNotExported(this.declarations,t.exportNamesByVariable)){for(const i of this.declarations){i.render(e,t)}if(!i.isNoStatement&&e.original.charCodeAt(this.end-1)!==59){e.appendLeft(this.end,";")}}else{this.renderReplacedDeclarations(e,t)}}applyDeoptimizations(){}renderDeclarationEnd(e,t,i,s,n,r,o){if(e.original.charCodeAt(this.end-1)===59){e.remove(this.end-1,this.end)}t+=";";if(i!==null){if(e.original.charCodeAt(s-1)===10&&(e.original.charCodeAt(this.end)===10||e.original.charCodeAt(this.end)===13)){s--;if(e.original.charCodeAt(s)===13){s--}}if(s===i+1){e.overwrite(i,n,t)}else{e.overwrite(i,i+1,t);e.remove(s,n)}}else{e.appendLeft(n,t)}if(r.length>0){e.appendLeft(n,` ${getSystemExportStatement(r,o)};`)}}renderReplacedDeclarations(e,t){const i=getCommaSeparatedNodesWithBoundaries(this.declarations,e,this.start+this.kind.length,this.end-(e.original.charCodeAt(this.end-1)===59?1:0));let s,n;n=findNonWhiteSpace(e.original,this.start+this.kind.length);let r=n-1;e.remove(this.start,r);let o=false;let l=false;let c="",u,h;const d=[];const p=gatherSystemExportsAndGetSingleExport(i,t,d);for(const{node:d,start:f,separator:m,contentEnd:g,end:y}of i){if(!d.included){e.remove(f,y);continue}d.render(e,t);u="";h="";if(!d.id.included||d.id instanceof Identifier&&isReassignedExportsMember(d.id.variable,t.exportNamesByVariable)){if(l){c+=";"}o=false}else{if(p&&p===d.id.variable){const i=findFirstOccurrenceOutsideComment(e.original,"=",d.id.end);renderSystemExportExpression(p,findNonWhiteSpace(e.original,i+1),m===null?g:m,e,t)}if(o){c+=","}else{if(l){c+=";"}u+=`${this.kind} `;o=true}}if(n===r+1){e.overwrite(r,n,c+u)}else{e.overwrite(r,r+1,c);e.appendLeft(n,u)}s=g;n=y;l=true;r=m;c=h}this.renderDeclarationEnd(e,c,r,s,n,d,t)}}function gatherSystemExportsAndGetSingleExport(e,t,i){var s;let n=null;if(t.format==="system"){for(const{node:r}of e){if(r.id instanceof Identifier&&r.init&&i.length===0&&((s=t.exportNamesByVariable.get(r.id.variable))===null||s===void 0?void 0:s.length)===1){n=r.id.variable;i.push(n)}else{r.id.addExportedVariables(i,t.exportNamesByVariable)}}if(i.length>1){n=null}else if(n){i.length=0}}return n}class VariableDeclarator extends NodeBase{declareDeclarator(e){this.id.declare(e,this.init||mt)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){var t;const i=(t=this.init)===null||t===void 0?void 0:t.hasEffects(e);this.id.markDeclarationReached();return i||this.id.hasEffects(e)}include(e,t){var i;this.included=true;(i=this.init)===null||i===void 0?void 0:i.include(e,t);this.id.markDeclarationReached();if(t||this.id.shouldBeIncluded(e)){this.id.include(e,t)}}render(e,t){const{exportNamesByVariable:i,snippets:{_:s}}=t;const n=this.id.included;if(n){this.id.render(e,t)}else{const t=findFirstOccurrenceOutsideComment(e.original,"=",this.id.end);e.remove(this.start,findNonWhiteSpace(e.original,t+1))}if(this.init){this.init.render(e,t,n?X:{renderedSurroundingElement:Dt})}else if(this.id instanceof Identifier&&isReassignedExportsMember(this.id.variable,i)){e.appendLeft(this.end,`${s}=${s}void 0`)}}applyDeoptimizations(){}}class WhileStatement extends NodeBase{hasEffects(e){if(this.test.hasEffects(e))return true;const{brokenFlow:t,ignore:{breaks:i,continues:s}}=e;e.ignore.breaks=true;e.ignore.continues=true;if(this.body.hasEffects(e))return true;e.ignore.breaks=i;e.ignore.continues=s;e.brokenFlow=t;return false}include(e,t){this.included=true;this.test.include(e,t);const{brokenFlow:i}=e;this.body.include(e,t,{asSingleStatement:true});e.brokenFlow=i}}class YieldExpression extends NodeBase{hasEffects(e){var t;if(!this.deoptimized)this.applyDeoptimizations();return!(e.ignore.returnYield&&!((t=this.argument)===null||t===void 0?void 0:t.hasEffects(e)))}render(e,t){if(this.argument){this.argument.render(e,t,{preventASI:true});if(this.argument.start===this.start+5){e.prependLeft(this.start+5," ")}}}}const rs={ArrayExpression:ArrayExpression,ArrayPattern:ArrayPattern,ArrowFunctionExpression:ArrowFunctionExpression,AssignmentExpression:AssignmentExpression,AssignmentPattern:AssignmentPattern,AwaitExpression:AwaitExpression,BinaryExpression:BinaryExpression,BlockStatement:BlockStatement,BreakStatement:BreakStatement,CallExpression:CallExpression,CatchClause:CatchClause,ChainExpression:ChainExpression,ClassBody:ClassBody,ClassDeclaration:ClassDeclaration,ClassExpression:ClassExpression,ConditionalExpression:ConditionalExpression,ContinueStatement:ContinueStatement,DoWhileStatement:DoWhileStatement,EmptyStatement:EmptyStatement,ExportAllDeclaration:ExportAllDeclaration,ExportDefaultDeclaration:ExportDefaultDeclaration,ExportNamedDeclaration:ExportNamedDeclaration,ExportSpecifier:ExportSpecifier,ExpressionStatement:ExpressionStatement,ForInStatement:ForInStatement,ForOfStatement:ForOfStatement,ForStatement:ForStatement,FunctionDeclaration:FunctionDeclaration,FunctionExpression:FunctionExpression,Identifier:Identifier,IfStatement:IfStatement,ImportDeclaration:ImportDeclaration,ImportDefaultSpecifier:ImportDefaultSpecifier,ImportExpression:ImportExpression,ImportNamespaceSpecifier:ImportNamespaceSpecifier,ImportSpecifier:ImportSpecifier,LabeledStatement:LabeledStatement,Literal:Literal,LogicalExpression:LogicalExpression,MemberExpression:MemberExpression,MetaProperty:MetaProperty,MethodDefinition:MethodDefinition,NewExpression:NewExpression,ObjectExpression:ObjectExpression,ObjectPattern:ObjectPattern,PrivateIdentifier:PrivateIdentifier,Program:Program,Property:Property,PropertyDefinition:PropertyDefinition,RestElement:RestElement,ReturnStatement:ReturnStatement,SequenceExpression:SequenceExpression,SpreadElement:SpreadElement,StaticBlock:StaticBlock,Super:Super,SwitchCase:SwitchCase,SwitchStatement:SwitchStatement,TaggedTemplateExpression:TaggedTemplateExpression,TemplateElement:TemplateElement,TemplateLiteral:TemplateLiteral,ThisExpression:ThisExpression,ThrowStatement:ThrowStatement,TryStatement:TryStatement,UnaryExpression:UnaryExpression,UnknownNode:UnknownNode,UpdateExpression:UpdateExpression,VariableDeclaration:VariableDeclaration,VariableDeclarator:VariableDeclarator,WhileStatement:WhileStatement,YieldExpression:YieldExpression};const as="_missingExportShim";class ExportShimVariable extends Variable{constructor(e){super(as);this.module=e}include(){super.include();this.module.needsExportShim=true}}class NamespaceVariable extends Variable{constructor(e){super(e.getModuleName());this.memberVariables=null;this.mergedNamespaces=[];this.referencedEarly=false;this.references=[];this.context=e;this.module=e.module}addReference(e){this.references.push(e);this.name=e.name}getMemberVariables(){if(this.memberVariables){return this.memberVariables}const e=Object.create(null);for(const t of this.context.getExports().concat(this.context.getReexports())){if(t[0]!=="*"&&t!==this.module.info.syntheticNamedExports){const i=this.context.traceExport(t);if(i){e[t]=i}}}return this.memberVariables=e}include(){this.included=true;this.context.includeAllExports()}prepare(e){if(this.mergedNamespaces.length>0){this.module.scope.addAccessedGlobals([ji],e)}}renderBlock(e){const{exportNamesByVariable:t,format:i,freeze:s,indent:n,namespaceToStringTag:r,snippets:{_:o,cnst:l,getObject:c,getPropertyAccess:u,n:h,s:d}}=e;const p=this.getMemberVariables();const f=Object.entries(p).map((([e,t])=>{if(this.referencedEarly||t.isReassigned){return[null,`get ${e}${o}()${o}{${o}return ${t.getName(u)}${d}${o}}`]}return[e,t.getName(u)]}));f.unshift([null,`__proto__:${o}null`]);let m=c(f,{lineBreakIndent:{base:"",t:n}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map((e=>e.getName(u)));m=`/*#__PURE__*/${ji}(${m},${o}[${e.join(`,${o}`)}])`}else{if(r){m=`/*#__PURE__*/Object.defineProperty(${m},${o}Symbol.toStringTag,${o}${getToStringTagValue(c)})`}if(s){m=`/*#__PURE__*/Object.freeze(${m})`}}const g=this.getName(u);m=`${l} ${g}${o}=${o}${m};`;if(i==="system"&&t.has(this)){m+=`${h}${getSystemExportStatement([this],e)};`}return m}renderFirst(){return this.referencedEarly}setMergedNamespaces(e){this.mergedNamespaces=e;const t=this.context.getModuleExecIndex();for(const e of this.references){if(e.context.getModuleExecIndex()<=t){this.referencedEarly=true;break}}}}NamespaceVariable.prototype.isNamespace=true;class SyntheticNamedExportVariable extends Variable{constructor(e,t,i){super(t);this.baseVariable=null;this.context=e;this.module=e.module;this.syntheticNamespace=i}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let e=this.syntheticNamespace;while(e instanceof ExportDefaultVariable||e instanceof SyntheticNamedExportVariable){if(e instanceof ExportDefaultVariable){const t=e.getOriginalVariable();if(t===e)break;e=t}if(e instanceof SyntheticNamedExportVariable){e=e.syntheticNamespace}}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}include(){this.included=true;this.context.includeVariableInModule(this.syntheticNamespace)}setRenderNames(e,t){super.setRenderNames(e,t)}}var os;(function(e){e[e["LOAD_AND_PARSE"]=0]="LOAD_AND_PARSE";e[e["ANALYSE"]=1]="ANALYSE";e[e["GENERATE"]=2]="GENERATE"})(os||(os={}));function getId(e){return e.id}function getOriginalLocation(e,t){const i=e.filter((e=>!!e.mappings));e:while(i.length>0){const e=i.pop();const s=e.mappings[t.line-1];if(s){const e=s.filter((e=>e.length>1));const i=e[e.length-1];for(const s of e){if(s[0]>=t.column||s===i){t={column:s[3],line:s[2]+1};continue e}}}throw new Error("Can't resolve original location of error.")}return t}const NOOP=()=>{};let ls=new Map;function getPersistedLabel(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`${" ".repeat(t-4)}- ${e}`}}function timeStartImpl(e,t=3){e=getPersistedLabel(e,t);const i=n.memoryUsage().heapUsed;const s=r.performance.now();const o=ls.get(e);if(o===undefined){ls.set(e,{memory:0,startMemory:i,startTime:s,time:0,totalMemory:0})}else{o.startMemory=i;o.startTime=s}}function timeEndImpl(e,t=3){e=getPersistedLabel(e,t);const i=ls.get(e);if(i!==undefined){const e=n.memoryUsage().heapUsed;i.memory+=e-i.startMemory;i.time+=r.performance.now()-i.startTime;i.totalMemory=Math.max(i.totalMemory,e)}}function getTimings(){const e={};for(const[t,{memory:i,time:s,totalMemory:n}]of ls){e[t]=[s,i,n]}return e}let cs=NOOP;let us=NOOP;const hs=["load","resolveDynamicImport","resolveId","transform"];function getPluginWithTimers(e,t){for(const i of hs){if(i in e){let s=`plugin ${t}`;if(e.name){s+=` (${e.name})`}s+=` - ${i}`;const n=e[i];e[i]=function(...e){cs(s,4);const t=n.apply(this,e);us(s,4);if(t&&typeof t.then==="function"){cs(`${s} (async)`,4);return t.then((e=>{us(`${s} (async)`,4);return e}))}return t}}}return e}function initialiseTimers(e){if(e.perf){ls=new Map;cs=timeStartImpl;us=timeEndImpl;e.plugins=e.plugins.map(getPluginWithTimers)}else{cs=NOOP;us=NOOP}}function markModuleAndImpureDependenciesAsExecuted(e){e.isExecuted=true;const t=[e];const i=new Set;for(const e of t){for(const s of[...e.dependencies,...e.implicitlyLoadedBefore]){if(!(s instanceof ExternalModule)&&!s.isExecuted&&(s.info.moduleSideEffects||e.implicitlyLoadedBefore.has(s))&&!i.has(s.id)){s.isExecuted=true;i.add(s.id);t.push(s)}}}}const ds={identifier:null,localName:as};function getVariableForExportNameRecursive(e,t,i,s,n=new Map){const r=n.get(t);if(r){if(r.has(e)){return s?[null]:error(errCircularReexport(t,e.id))}r.add(e)}else{n.set(t,new Set([e]))}return e.getVariableForExportName(t,{importerForSideEffects:i,isExportAllSearch:s,searchedNamesAndModules:n})}function getAndExtendSideEffectModules(e,t){const i=getOrCreate(t.sideEffectDependenciesByVariable,e,(()=>new Set));let s=e;const n=new Set([s]);while(true){const e=s.module;s=s instanceof ExportDefaultVariable?s.getDirectOriginalVariable():s instanceof SyntheticNamedExportVariable?s.syntheticNamespace:null;if(!s||n.has(s)){break}n.add(s);i.add(e);const t=e.sideEffectDependenciesByVariable.get(s);if(t){for(const e of t){i.add(e)}}}return i}class Module{constructor(e,t,i,s,n,r,o){this.graph=e;this.id=t;this.options=i;this.alternativeReexportModules=new Map;this.chunkFileNames=new Set;this.chunkNames=[];this.cycles=new Set;this.dependencies=new Set;this.dynamicDependencies=new Set;this.dynamicImporters=[];this.dynamicImports=[];this.execIndex=Infinity;this.implicitlyLoadedAfter=new Set;this.implicitlyLoadedBefore=new Set;this.importDescriptions=new Map;this.importMetas=[];this.importedFromNotTreeshaken=false;this.importers=[];this.includedDynamicImporters=[];this.includedImports=new Set;this.isExecuted=false;this.isUserDefinedEntryPoint=false;this.needsExportShim=false;this.sideEffectDependenciesByVariable=new Map;this.sources=new Set;this.usesTopLevelAwait=false;this.allExportNames=null;this.ast=null;this.exportAllModules=[];this.exportAllSources=new Set;this.exportNamesByVariable=null;this.exportShimVariable=new ExportShimVariable(this);this.exports=new Map;this.namespaceReexportsByName=new Map;this.reexportDescriptions=new Map;this.relevantDependencies=null;this.syntheticExports=new Map;this.syntheticNamespace=null;this.transformDependencies=[];this.transitiveReexports=null;this.excludeFromSourcemap=/\0/.test(t);this.context=i.moduleContext(t);this.preserveSignature=this.options.preserveEntrySignatures;const l=this;const{dynamicImports:c,dynamicImporters:u,implicitlyLoadedAfter:h,implicitlyLoadedBefore:d,importers:p,reexportDescriptions:f,sources:m}=this;this.info={ast:null,code:null,get dynamicallyImportedIdResolutions(){return c.map((({argument:e})=>typeof e==="string"&&l.resolvedIds[e])).filter(Boolean)},get dynamicallyImportedIds(){return c.map((({id:e})=>e)).filter((e=>e!=null))},get dynamicImporters(){return u.sort()},get hasDefaultExport(){if(!l.ast){return null}return l.exports.has("default")||f.has("default")},get hasModuleSideEffects(){warnDeprecation("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",false,i);return this.moduleSideEffects},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(h,getId).sort()},get implicitlyLoadedBefore(){return Array.from(d,getId).sort()},get importedIdResolutions(){return Array.from(m,(e=>l.resolvedIds[e])).filter(Boolean)},get importedIds(){return Array.from(m,(e=>{var t;return(t=l.resolvedIds[e])===null||t===void 0?void 0:t.id})).filter(Boolean)},get importers(){return p.sort()},isEntry:s,isExternal:false,get isIncluded(){if(e.phase!==os.GENERATE){return null}return l.isIncluded()},meta:{...o},moduleSideEffects:n,syntheticNamedExports:r};Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:false})}basename(){const e=s.basename(this.id);const t=s.extname(this.id);return makeLegal(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}error(e,t){this.addLocationToLogProps(e,t);return error(e)}getAllExportNames(){if(this.allExportNames){return this.allExportNames}this.allExportNames=new Set([...this.exports.keys(),...this.reexportDescriptions.keys()]);for(const e of this.exportAllModules){if(e instanceof ExternalModule){this.allExportNames.add(`*${e.id}`);continue}for(const t of e.getAllExportNames()){if(t!=="default")this.allExportNames.add(t)}}if(typeof this.info.syntheticNamedExports==="string"){this.allExportNames.delete(this.info.syntheticNamedExports)}return this.allExportNames}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const e=new Set;const t=new Set;const i=new Set(this.includedImports);if(this.info.isEntry||this.includedDynamicImporters.length>0||this.namespace.included||this.implicitlyLoadedAfter.size>0){for(const e of[...this.getReexports(),...this.getExports()]){const[t]=this.getVariableForExportName(e);if(t){i.add(t)}}}for(let s of i){const i=this.sideEffectDependenciesByVariable.get(s);if(i){for(const e of i){t.add(e)}}if(s instanceof SyntheticNamedExportVariable){s=s.getBaseVariable()}else if(s instanceof ExportDefaultVariable){s=s.getOriginalVariable()}e.add(s.module)}if(!this.options.treeshake||this.info.moduleSideEffects==="no-treeshake"){for(const e of this.dependencies){this.relevantDependencies.add(e)}}else{this.addRelevantSideEffectDependencies(this.relevantDependencies,e,t)}for(const t of e){this.relevantDependencies.add(t)}return this.relevantDependencies}getExportNamesByVariable(){if(this.exportNamesByVariable){return this.exportNamesByVariable}const e=new Map;for(const t of this.getAllExportNames()){let[i]=this.getVariableForExportName(t);if(i instanceof ExportDefaultVariable){i=i.getOriginalVariable()}if(!i||!(i.included||i instanceof ExternalVariable)){continue}const s=e.get(i);if(s){s.push(t)}else{e.set(i,[t])}}return this.exportNamesByVariable=e}getExports(){return Array.from(this.exports.keys())}getReexports(){if(this.transitiveReexports){return this.transitiveReexports}this.transitiveReexports=[];const e=new Set(this.reexportDescriptions.keys());for(const t of this.exportAllModules){if(t instanceof ExternalModule){e.add(`*${t.id}`)}else{for(const i of[...t.getReexports(),...t.getExports()]){if(i!=="default")e.add(i)}}}return this.transitiveReexports=[...e]}getRenderedExports(){const e=[];const t=[];for(const i of this.exports.keys()){const[s]=this.getVariableForExportName(i);(s&&s.included?e:t).push(i)}return{removedExports:t,renderedExports:e}}getSyntheticNamespace(){if(this.syntheticNamespace===null){this.syntheticNamespace=undefined;[this.syntheticNamespace]=this.getVariableForExportName(typeof this.info.syntheticNamedExports==="string"?this.info.syntheticNamedExports:"default",{onlyExplicit:true})}if(!this.syntheticNamespace){return error(errSyntheticNamedExportsNeedNamespaceExport(this.id,this.info.syntheticNamedExports))}return this.syntheticNamespace}getVariableForExportName(e,{importerForSideEffects:t,isExportAllSearch:i,onlyExplicit:s,searchedNamesAndModules:n}=Q){var r;if(e[0]==="*"){if(e.length===1){return[this.namespace]}const t=this.graph.modulesById.get(e.slice(1));return t.getVariableForExportName("*")}const o=this.reexportDescriptions.get(e);if(o){const[e]=getVariableForExportNameRecursive(o.module,o.localName,t,false,n);if(!e){return this.error(errMissingExport(o.localName,this.id,o.module.id),o.start)}if(t){setAlternativeExporterIfCyclic(e,t,this)}return[e]}const l=this.exports.get(e);if(l){if(l===ds){return[this.exportShimVariable]}const e=l.localName;const i=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:n});if(t){getOrCreate(t.sideEffectDependenciesByVariable,i,(()=>new Set)).add(this);setAlternativeExporterIfCyclic(i,t,this)}return[i]}if(s){return[null]}if(e!=="default"){const i=(r=this.namespaceReexportsByName.get(e))!==null&&r!==void 0?r:this.getVariableFromNamespaceReexports(e,t,n);this.namespaceReexportsByName.set(e,i);if(i[0]){return i}}if(this.info.syntheticNamedExports){return[getOrCreate(this.syntheticExports,e,(()=>new SyntheticNamedExportVariable(this.astContext,e,this.getSyntheticNamespace())))]}if(!i){if(this.options.shimMissingExports){this.shimMissingExport(e);return[this.exportShimVariable]}}return[null]}hasEffects(){return this.info.moduleSideEffects==="no-treeshake"||this.ast.included&&this.ast.hasEffects(createHasEffectsContext())}include(){const e=createInclusionContext();if(this.ast.shouldBeIncluded(e))this.ast.include(e,false)}includeAllExports(e){if(!this.isExecuted){markModuleAndImpureDependenciesAsExecuted(this);this.graph.needsTreeshakingPass=true}for(const t of this.exports.keys()){if(e||t!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(t)[0];e.deoptimizePath(O);if(!e.included){this.includeVariable(e)}}}for(const e of this.getReexports()){const[t]=this.getVariableForExportName(e);if(t){t.deoptimizePath(O);if(!t.included){this.includeVariable(t)}if(t instanceof ExternalVariable){t.module.reexported=true}}}if(e){this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}}includeAllInBundle(){this.ast.include(createInclusionContext(),true);this.includeAllExports(false)}isIncluded(){return this.ast.included||this.namespace.included||this.importedFromNotTreeshaken}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions);this.addModulesToImportDescriptions(this.reexportDescriptions);const e=[];for(const t of this.exportAllSources){const i=this.graph.modulesById.get(this.resolvedIds[t].id);if(i instanceof ExternalModule){e.push(i);continue}this.exportAllModules.push(i)}this.exportAllModules.push(...e)}render(e){const t=this.magicString.clone();this.ast.render(t,e);this.usesTopLevelAwait=this.astContext.usesTopLevelAwait;return t}setSource({ast:e,code:t,customTransformCache:i,originalCode:s,originalSourcemap:n,resolvedIds:r,sourcemapChain:o,transformDependencies:l,transformFiles:c,...u}){this.info.code=t;this.originalCode=s;this.originalSourcemap=n;this.sourcemapChain=o;if(c){this.transformFiles=c}this.transformDependencies=l;this.customTransformCache=i;this.updateOptions(u);cs("generate ast",3);if(!e){e=this.tryParse()}us("generate ast",3);this.resolvedIds=r||Object.create(null);const h=this.id;this.magicString=new MagicString(t,{filename:this.excludeFromSourcemap?null:h,indentExclusionRanges:[]});cs("analyse ast",3);this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:h,getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>rs[e]||rs.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(true),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),magicString:this.magicString,module:this,moduleContext:this.context,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=true,traceExport:e=>this.getVariableForExportName(e)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:false,warn:this.warn.bind(this)};this.scope=new ModuleScope(this.graph.scope,this.astContext);this.namespace=new NamespaceVariable(this.astContext);this.ast=new Program(e,{context:this.astContext,type:"Module"},this.scope);this.info.ast=e;us("analyse ast",3)}toJSON(){return{ast:this.ast.esTreeNode,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,getId),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(e,{importerForSideEffects:t,isExportAllSearch:i,searchedNamesAndModules:s}=Q){const n=this.scope.variables.get(e);if(n){return n}const r=this.importDescriptions.get(e);if(r){const e=r.module;if(e instanceof Module&&r.name==="*"){return e.namespace}const[n]=getVariableForExportNameRecursive(e,r.name,t||this,i,s);if(!n){return this.error(errMissingExport(r.name,this.id,e.id),r.start)}return n}return null}tryParse(){try{return this.graph.contextParse(this.info.code)}catch(e){let t=e.message.replace(/ \(\d+:\d+\)$/,"");if(this.id.endsWith(".json")){t+=" (Note that you need @rollup/plugin-json to import JSON files)"}else if(!this.id.endsWith(".js")){t+=" (Note that you need plugins to import files that are not JavaScript)"}return this.error({code:"PARSE_ERROR",message:t,parserError:e},e.pos)}}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:i}){if(t!=null){this.info.moduleSideEffects=t}if(i!=null){this.info.syntheticNamedExports=i}if(e!=null){Object.assign(this.info.meta,e)}}warn(e,t){this.addLocationToLogProps(e,t);this.options.onwarn(e)}addDynamicImport(e){let t=e.source;if(t instanceof TemplateLiteral){if(t.quasis.length===1&&t.quasis[0].value.cooked){t=t.quasis[0].value.cooked}}else if(t instanceof Literal&&typeof t.value==="string"){t=t.value}this.dynamicImports.push({argument:t,id:null,node:e,resolution:null})}addExport(e){if(e instanceof ExportDefaultDeclaration){this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"})}else if(e instanceof ExportAllDeclaration){const t=e.source.value;this.sources.add(t);if(e.exported){const i=e.exported.name;this.reexportDescriptions.set(i,{localName:"*",module:null,source:t,start:e.start})}else{this.exportAllSources.add(t)}}else if(e.source instanceof Literal){const t=e.source.value;this.sources.add(t);for(const i of e.specifiers){const e=i.exported.name;this.reexportDescriptions.set(e,{localName:i.local.name,module:null,source:t,start:i.start})}}else if(e.declaration){const t=e.declaration;if(t instanceof VariableDeclaration){for(const e of t.declarations){for(const t of rt(e.id)){this.exports.set(t,{identifier:null,localName:t})}}}else{const e=t.id.name;this.exports.set(e,{identifier:null,localName:e})}}else{for(const t of e.specifiers){const e=t.local.name;const i=t.exported.name;this.exports.set(i,{identifier:null,localName:e})}}}addImport(e){const t=e.source.value;this.sources.add(t);for(const i of e.specifiers){const e=i.type===Lt;const s=i.type===Ft;const n=e?"default":s?"*":i.imported.name;this.importDescriptions.set(i.local.name,{module:null,name:n,source:t,start:i.start})}}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id;e.pos=t;let i=this.info.code;const s=locate(i,t,{offsetLine:1});if(s){let{column:n,line:r}=s;try{({column:n,line:r}=getOriginalLocation(this.sourcemapChain,{column:n,line:r}));i=this.originalCode}catch(e){this.options.onwarn({code:"SOURCEMAP_ERROR",id:this.id,loc:{column:n,file:this.id,line:r},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:t})}augmentCodeLocation(e,{column:n,line:r},i,this.id)}}addModulesToImportDescriptions(e){for(const t of e.values()){const{id:e}=this.resolvedIds[t.source];t.module=this.graph.modulesById.get(e)}}addRelevantSideEffectDependencies(e,t,i){const s=new Set;const addSideEffectDependencies=n=>{for(const r of n){if(s.has(r)){continue}s.add(r);if(t.has(r)){e.add(r);continue}if(!(r.info.moduleSideEffects||i.has(r))){continue}if(r instanceof ExternalModule||r.hasEffects()){e.add(r);continue}addSideEffectDependencies(r.dependencies)}};addSideEffectDependencies(this.dependencies);addSideEffectDependencies(i)}getVariableFromNamespaceReexports(e,t,i){let s=null;const n=new Map;const r=new Set;for(const o of this.exportAllModules){if(o.info.syntheticNamedExports===e){continue}const[l,c]=getVariableForExportNameRecursive(o,e,t,true,copyNameToModulesMap(i));if(o instanceof ExternalModule||c){r.add(l)}else if(l instanceof SyntheticNamedExportVariable){if(!s){s=l}}else if(l){n.set(l,o)}}if(n.size>0){const t=[...n];const i=t[0][0];if(t.length===1){return[i]}this.options.onwarn(errNamespaceConflict(e,this.id,t.map((([,e])=>e.id))));return[null]}if(r.size>0){const t=[...r];const i=t[0];if(t.length>1){this.options.onwarn(errAmbiguousExternalNamespaces(e,this.id,i.module.id,t.map((e=>e.module.id))))}return[i,true]}if(s){return[s]}return[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set;const t=new Set;for(const i of[this,...this.exportAllModules]){if(i instanceof ExternalModule){const[t]=i.getVariableForExportName("*");t.include();this.includedImports.add(t);e.add(t)}else if(i.info.syntheticNamedExports){const e=i.getSyntheticNamespace();e.include();this.includedImports.add(e);t.add(e)}}return[...t,...e]}includeDynamicImport(e){const t=this.dynamicImports.find((t=>t.node===e)).resolution;if(t instanceof Module){t.includedDynamicImporters.push(this);t.includeAllExports(true)}}includeVariable(e){if(!e.included){e.include();this.graph.needsTreeshakingPass=true;const t=e.module;if(t instanceof Module){if(!t.isExecuted){markModuleAndImpureDependenciesAsExecuted(t)}if(t!==this){const t=getAndExtendSideEffectModules(e,this);for(const e of t){if(!e.isExecuted){markModuleAndImpureDependenciesAsExecuted(e)}}}}}}includeVariableInModule(e){this.includeVariable(e);const t=e.module;if(t&&t!==this){this.includedImports.add(e)}}shimMissingExport(e){this.options.onwarn({code:"SHIMMED_EXPORT",exporter:relativeId(this.id),exportName:e,message:`Missing export "${e}" has been shimmed in module ${relativeId(this.id)}.`});this.exports.set(e,ds)}}function setAlternativeExporterIfCyclic(e,t,i){if(e.module instanceof Module&&e.module!==i){const s=e.module.cycles;if(s.size>0){const n=i.cycles;for(const r of n){if(s.has(r)){t.alternativeReexportModules.set(e,i);break}}}}}const copyNameToModulesMap=e=>e&&new Map(Array.from(e,(([e,t])=>[e,new Set(t)])));function removeJsExtension(e){return e.endsWith(".js")?e.slice(0,-3):e}function getCompleteAmdId(e,t){if(e.autoId){return`${e.basePath?e.basePath+"/":""}${removeJsExtension(t)}`}return e.id||""}function getExportBlock$1(e,t,i,s,n,r,o,l="return "){const{_:c,cnst:u,getDirectReturnFunction:h,getFunctionIntro:d,getPropertyAccess:p,n:f,s:m}=n;if(!i){return`${f}${f}${l}${getSingleDefaultExport(e,t,s,o,p)};`}let g="";for(const{defaultVariableName:e,id:n,isChunk:l,name:u,namedExportsMode:d,namespaceVariableName:m,reexports:y}of t){if(y&&i){for(const t of y){if(t.reexported!=="*"){const i=getReexportedImportName(u,t.imported,d,l,e,m,s,n,o,p);if(g)g+=f;if(t.imported!=="*"&&t.needsLiveBinding){const[e,s]=h([],{functionReturn:true,lineBreakIndent:null,name:null});g+=`Object.defineProperty(exports,${c}'${t.reexported}',${c}{${f}`+`${r}enumerable:${c}true,${f}`+`${r}get:${c}${e}${i}${s}${f}});`}else{g+=`exports${p(t.reexported)}${c}=${c}${i};`}}}}}for(const{exported:t,local:i}of e){const e=`exports${p(t)}`;const s=i;if(e!==s){if(g)g+=f;g+=`${e}${c}=${c}${s};`}}for(const{name:e,reexports:s}of t){if(s&&i){for(const t of s){if(t.reexported==="*"){if(g)g+=f;const i=`{${f}${r}if${c}(k${c}!==${c}'default'${c}&&${c}!exports.hasOwnProperty(k))${c}${getDefineProperty(e,t.needsLiveBinding,r,n)}${m}${f}}`;g+=u==="var"&&t.needsLiveBinding?`Object.keys(${e}).forEach(${d(["k"],{isAsync:false,name:null})}${i});`:`for${c}(${u} k in ${e})${c}${i}`}}}}if(g){return`${f}${f}${g}`}return""}function getSingleDefaultExport(e,t,i,s,n){if(e.length>0){return e[0].local}else{for(const{defaultVariableName:e,id:r,isChunk:o,name:l,namedExportsMode:c,namespaceVariableName:u,reexports:h}of t){if(h){return getReexportedImportName(l,h[0].imported,c,o,e,u,i,r,s,n)}}}}function getReexportedImportName(e,t,i,s,n,r,o,l,c,u){if(t==="default"){if(!s){const t=String(o(l));const i=Gi[t]?n:e;return isDefaultAProperty(t,c)?`${i}${u("default")}`:i}return i?`${e}${u("default")}`:e}if(t==="*"){return(s?!i:Wi[String(o(l))])?r:e}return`${e}${u(t)}`}function getEsModuleValue(e){return e([["value","true"]],{lineBreakIndent:null})}function getNamespaceMarkers(e,t,i,{_:s,getObject:n}){if(e){if(t){if(i){return`Object.defineProperties(exports,${s}${n([["__esModule",getEsModuleValue(n)],[null,`[Symbol.toStringTag]:${s}${getToStringTagValue(n)}`]],{lineBreakIndent:null})});`}return`Object.defineProperty(exports,${s}'__esModule',${s}${getEsModuleValue(n)});`}if(i){return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${getToStringTagValue(n)});`}}return""}const getDefineProperty=(e,t,i,{_:s,getDirectReturnFunction:n,n:r})=>{if(t){const[t,o]=n([],{functionReturn:true,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${s}k,${s}{${r}`+`${i}${i}enumerable:${s}true,${r}`+`${i}${i}get:${s}${t}${e}[k]${o}${r}${i}})`}return`exports[k]${s}=${s}${e}[k]`};function getInteropBlock(e,t,i,s,n,r,o,l){const{_:c,cnst:u,n:h}=l;const d=new Set;const p=[];const addInteropStatement=(e,t,i)=>{d.add(t);p.push(`${u} ${e}${c}=${c}/*#__PURE__*/${t}(${i});`)};for(const{defaultVariableName:i,imports:s,id:n,isChunk:r,name:o,namedExportsMode:l,namespaceVariableName:c,reexports:u}of e){if(r){for(const{imported:e,reexported:t}of[...s||[],...u||[]]){if(e==="*"&&t!=="*"){if(!l){addInteropStatement(c,Hi,o)}break}}}else{const e=String(t(n));let r=false;let l=false;for(const{imported:t,reexported:n}of[...s||[],...u||[]]){let s;let u;if(t==="default"){if(!r){r=true;if(i!==c){u=i;s=Gi[e]}}}else if(t==="*"&&n!=="*"){if(!l){l=true;s=Wi[e];u=c}}if(s){addInteropStatement(u,s,o)}}}}return`${getHelpersBlock(d,r,o,l,i,s,n)}${p.length>0?`${p.join(h)}${h}${h}`:""}`}function addJsExtension(e){return e.endsWith(".js")?e:e+".js"}function updateExtensionForRelativeAmdId(e,t){if(e[0]!=="."){return e}return t?addJsExtension(e):removeJsExtension(e)}const ps={assert:true,buffer:true,console:true,constants:true,domain:true,events:true,http:true,https:true,os:true,path:true,process:true,punycode:true,querystring:true,stream:true,string_decoder:true,timers:true,tty:true,url:true,util:true,vm:true,zlib:true};function warnOnBuiltins(e,t){const i=t.map((({id:e})=>e)).filter((e=>e in ps));if(!i.length)return;e({code:"MISSING_NODE_BUILTINS",message:`Creating a browser bundle that depends on Node.js built-in modules (${printQuotedStringList(i)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`,modules:i})}function amd(e,{accessedGlobals:t,dependencies:i,exports:s,hasExports:n,id:r,indent:o,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:h,outro:d,snippets:p,warn:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:E,interop:x,namespaceToStringTag:v,strict:b}){warnOnBuiltins(f,i);const S=i.map((e=>`'${updateExtensionForRelativeAmdId(e.id,m.forceJsExtensionForImports)}'`));const A=i.map((e=>e.name));const{n:w,getNonArrowFunctionIntro:I,_:C}=p;if(h&&n){A.unshift(`exports`);S.unshift(`'exports'`)}if(t.has("require")){A.unshift("require");S.unshift(`'require'`)}if(t.has("module")){A.unshift("module");S.unshift(`'module'`)}const k=getCompleteAmdId(m,r);const _=(k?`'${k}',${C}`:``)+(S.length?`[${S.join(`,${C}`)}],${C}`:``);const P=b?`${C}'use strict';`:"";e.prepend(`${l}${getInteropBlock(i,x,y,E,v,t,o,p)}`);const N=getExportBlock$1(s,i,h,x,p,o,y);let R=getNamespaceMarkers(h&&n,c&&g,u&&v,p);if(R){R=w+w+R}e.append(`${N}${R}${d}`);return e.indent(o).prepend(`${m.define}(${_}(${I(A,{isAsync:false,name:null})}{${P}${w}${w}`).append(`${w}${w}}));`)}function cjs(e,{accessedGlobals:t,dependencies:i,exports:s,hasExports:n,indent:r,intro:o,isEntryFacade:l,isModuleFacade:c,namedExportsMode:u,outro:h,snippets:d},{compact:p,esModule:f,externalLiveBindings:m,freeze:g,interop:y,namespaceToStringTag:E,strict:x}){const{_:v,n:b}=d;const S=x?`'use strict';${b}${b}`:"";let A=getNamespaceMarkers(u&&n,l&&f,c&&E,d);if(A){A+=b+b}const w=getImportBlock$1(i,d,p);const I=getInteropBlock(i,y,m,g,E,t,r,d);e.prepend(`${S}${o}${A}${w}${I}`);const C=getExportBlock$1(s,i,u,y,d,r,m,`module.exports${v}=${v}`);return e.append(`${C}${h}`)}function getImportBlock$1(e,{_:t,cnst:i,n:s},n){let r="";let o=false;for(const{id:l,name:c,reexports:u,imports:h}of e){if(!u&&!h){if(r){r+=n&&!o?",":`;${s}`}o=false;r+=`require('${l}')`}else{r+=n&&o?",":`${r?`;${s}`:""}${i} `;o=true;r+=`${c}${t}=${t}require('${l}')`}}if(r){return`${r};${s}${s}`}return""}function es(e,{accessedGlobals:t,indent:i,intro:s,outro:n,dependencies:r,exports:o,snippets:l},{externalLiveBindings:c,freeze:u,namespaceToStringTag:h}){const{_:d,n:p}=l;const f=getImportBlock(r,d);if(f.length>0)s+=f.join(p)+p+p;s+=getHelpersBlock(null,t,i,l,c,u,h);if(s)e.prepend(s);const m=getExportBlock(o,l);if(m.length)e.append(p+p+m.join(p).trim());if(n)e.append(n);return e.trim()}function getImportBlock(e,t){const i=[];for(const{id:s,reexports:n,imports:r,name:o}of e){if(!n&&!r){i.push(`import${t}'${s}';`);continue}if(r){let e=null;let n=null;const o=[];for(const t of r){if(t.imported==="default"){e=t}else if(t.imported==="*"){n=t}else{o.push(t)}}if(n){i.push(`import${t}*${t}as ${n.local} from${t}'${s}';`)}if(e&&o.length===0){i.push(`import ${e.local} from${t}'${s}';`)}else if(o.length>0){i.push(`import ${e?`${e.local},${t}`:""}{${t}${o.map((e=>{if(e.imported===e.local){return e.imported}else{return`${e.imported} as ${e.local}`}})).join(`,${t}`)}${t}}${t}from${t}'${s}';`)}}if(n){let e=null;const l=[];const c=[];for(const t of n){if(t.reexported==="*"){e=t}else if(t.imported==="*"){l.push(t)}else{c.push(t)}}if(e){i.push(`export${t}*${t}from${t}'${s}';`)}if(l.length>0){if(!r||!r.some((e=>e.imported==="*"&&e.local===o))){i.push(`import${t}*${t}as ${o} from${t}'${s}';`)}for(const e of l){i.push(`export${t}{${t}${o===e.reexported?o:`${o} as ${e.reexported}`} };`)}}if(c.length>0){i.push(`export${t}{${t}${c.map((e=>{if(e.imported===e.reexported){return e.imported}else{return`${e.imported} as ${e.reexported}`}})).join(`,${t}`)}${t}}${t}from${t}'${s}';`)}}}return i}function getExportBlock(e,{_:t,cnst:i}){const s=[];const n=[];for(const r of e){if(r.expression){s.push(`${i} ${r.local}${t}=${t}${r.expression};`)}n.push(r.exported===r.local?r.local:`${r.local} as ${r.exported}`)}if(n.length){s.push(`export${t}{${t}${n.join(`,${t}`)}${t}};`)}return s}const keypath=(e,t)=>e.split(".").map(t).join("");function setupNamespace(e,t,i,{_:s,getPropertyAccess:n,s:r},o){const l=e.split(".");l[0]=(typeof i==="function"?i(l[0]):i[l[0]])||l[0];l.pop();let c=t;return l.map((e=>{c+=n(e);return`${c}${s}=${s}${c}${s}||${s}{}${r}`})).join(o?",":"\n")+(o&&l.length?";":"\n")}function assignToDeepVariable(e,t,i,s,{_:n,getPropertyAccess:r}){const o=e.split(".");o[0]=(typeof i==="function"?i(o[0]):i[o[0]])||o[0];const l=o.pop();let c=t;let u=o.map((e=>{c+=r(e);return`${c}${n}=${n}${c}${n}||${n}{}`})).concat(`${c}${r(l)}`).join(`,${n}`)+`${n}=${n}${s}`;if(o.length>0){u=`(${u})`}return u}function trimEmptyImports(e){let t=e.length;while(t--){const{imports:i,reexports:s}=e[t];if(i||s){return e.slice(0,t+1)}}return[]}function iife(e,{accessedGlobals:t,dependencies:i,exports:s,hasExports:n,indent:r,intro:o,namedExportsMode:l,outro:c,snippets:u,warn:h},{compact:d,esModule:p,extend:f,freeze:m,externalLiveBindings:g,globals:y,interop:E,name:x,namespaceToStringTag:v,strict:b}){const{_:S,getNonArrowFunctionIntro:A,getPropertyAccess:w,n:I}=u;const C=x&&x.includes(".");const k=!f&&!C;if(x&&k&&!isLegal(x)){return error({code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name "${x}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`})}warnOnBuiltins(h,i);const _=trimEmptyImports(i);const P=_.map((e=>e.globalName||"null"));const N=_.map((e=>e.name));if(n&&!x){h({code:"MISSING_NAME_OPTION_FOR_IIFE_EXPORT",message:`If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.`})}if(l&&n){if(f){P.unshift(`this${keypath(x,w)}${S}=${S}this${keypath(x,w)}${S}||${S}{}`);N.unshift("exports")}else{P.unshift("{}");N.unshift("exports")}}const R=b?`${r}'use strict';${I}`:"";const T=getInteropBlock(i,E,g,m,v,t,r,u);e.prepend(`${o}${T}`);let $=`(${A(N,{isAsync:false,name:null})}{${I}${R}${I}`;if(n){if(x&&!(f&&l)){$=(k?`var ${x}`:`this${keypath(x,w)}`)+`${S}=${S}${$}`}if(C){$=setupNamespace(x,"this",y,u,d)+$}}let O=`${I}${I}})(${P.join(`,${S}`)});`;if(n&&!f&&l){O=`${I}${I}${r}return exports;${O}`}const D=getExportBlock$1(s,i,l,E,u,r,g);let M=getNamespaceMarkers(l&&n,p,v,u);if(M){M=I+I+M}e.append(`${D}${M}${c}`);return e.indent(r).prepend($).append(O)}function system(e,{accessedGlobals:t,dependencies:i,exports:s,hasExports:n,indent:r,intro:o,snippets:l,outro:c,usesTopLevelAwait:u},{externalLiveBindings:h,freeze:d,name:p,namespaceToStringTag:f,strict:m,systemNullSetters:g}){const{_:y,getFunctionIntro:E,getNonArrowFunctionIntro:x,n:v,s:b}=l;const{importBindings:S,setters:A,starExcludes:w}=analyzeDependencies(i,s,r,l);const I=p?`'${p}',${y}`:"";const C=t.has("module")?["exports","module"]:n?["exports"]:[];let k=`System.register(${I}[`+i.map((({id:e})=>`'${e}'`)).join(`,${y}`)+`],${y}(${x(C,{isAsync:false,name:null})}{${v}${r}${m?"'use strict';":""}`+getStarExcludesBlock(w,r,l)+getImportBindingsBlock(S,r,l)+`${v}${r}return${y}{${A.length?`${v}${r}${r}setters:${y}[${A.map((e=>e?`${E(["module"],{isAsync:false,name:null})}{${v}${r}${r}${r}${e}${v}${r}${r}}`:g?`null`:`${E([],{isAsync:false,name:null})}{}`)).join(`,${y}`)}],`:""}${v}`;k+=`${r}${r}execute:${y}(${x([],{isAsync:u,name:null})}{${v}${v}`;const _=`${r}${r}})${v}${r}}${b}${v}}));`;e.prepend(o+getHelpersBlock(null,t,r,l,h,d,f)+getHoistedExportsBlock(s,r,l));e.append(`${c}${v}${v}`+getSyntheticExportsBlock(s,r,l)+getMissingExportsBlock(s,r,l));return e.indent(`${r}${r}${r}`).append(_).prepend(k)}function analyzeDependencies(e,t,i,{_:s,cnst:n,getObject:r,getPropertyAccess:o,n:l}){const c=[];const u=[];let h=null;for(const{imports:d,reexports:p}of e){const f=[];if(d){for(const e of d){c.push(e.local);if(e.imported==="*"){f.push(`${e.local}${s}=${s}module;`)}else{f.push(`${e.local}${s}=${s}module${o(e.imported)};`)}}}if(p){const l=[];let c=false;for(const{imported:e,reexported:t}of p){if(t==="*"){c=true}else{l.push([t,e==="*"?"module":`module${o(e)}`])}}if(l.length>1||c){const o=r(l,{lineBreakIndent:null});if(c){if(!h){h=getStarExcludes({dependencies:e,exports:t})}f.push(`${n} setter${s}=${s}${o};`,`for${s}(${n} name in module)${s}{`,`${i}if${s}(!_starExcludes[name])${s}setter[name]${s}=${s}module[name];`,"}","exports(setter);")}else{f.push(`exports(${o});`)}}else{const[e,t]=l[0];f.push(`exports('${e}',${s}${t});`)}}u.push(f.join(`${l}${i}${i}${i}`))}return{importBindings:c,setters:u,starExcludes:h}}const getStarExcludes=({dependencies:e,exports:t})=>{const i=new Set(t.map((e=>e.exported)));i.add("default");for(const{reexports:t}of e){if(t){for(const e of t){if(e.reexported!=="*")i.add(e.reexported)}}}return i};const getStarExcludesBlock=(e,t,{_:i,cnst:s,getObject:n,n:r})=>e?`${r}${t}${s} _starExcludes${i}=${i}${n([...e].map((e=>[e,"1"])),{lineBreakIndent:{base:t,t:t}})};`:"";const getImportBindingsBlock=(e,t,{_:i,n:s})=>e.length?`${s}${t}var ${e.join(`,${i}`)};`:"";const getHoistedExportsBlock=(e,t,i)=>getExportsBlock(e.filter((e=>e.hoisted)).map((e=>({name:e.exported,value:e.local}))),t,i);function getExportsBlock(e,t,{_:i,n:s}){if(e.length===0){return""}if(e.length===1){return`exports('${e[0].name}',${i}${e[0].value});${s}${s}`}return`exports({${s}`+e.map((({name:e,value:s})=>`${t}${e}:${i}${s}`)).join(`,${s}`)+`${s}});${s}${s}`}const getSyntheticExportsBlock=(e,t,i)=>getExportsBlock(e.filter((e=>e.expression)).map((e=>({name:e.exported,value:e.local}))),t,i);const getMissingExportsBlock=(e,t,i)=>getExportsBlock(e.filter((e=>e.local===as)).map((e=>({name:e.exported,value:as}))),t,i);function globalProp(e,t,i){if(!e)return"null";return`${t}${keypath(e,i)}`}function safeAccess(e,t,{_:i,getPropertyAccess:s}){let n=t;return e.split(".").map((e=>n+=s(e))).join(`${i}&&${i}`)}function umd(e,{accessedGlobals:t,dependencies:i,exports:s,hasExports:n,id:r,indent:o,intro:l,namedExportsMode:c,outro:u,snippets:h,warn:d},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:E,interop:x,name:v,namespaceToStringTag:b,globals:S,noConflict:A,strict:w}){const{_:I,cnst:C,getFunctionIntro:k,getNonArrowFunctionIntro:_,getPropertyAccess:P,n:N,s:R}=h;const T=f?"f":"factory";const $=f?"g":"global";if(n&&!v){return error({code:"MISSING_NAME_OPTION_FOR_IIFE_EXPORT",message:'You must supply "output.name" for UMD bundles that have exports so that the exports are accessible in environments without a module loader.'})}warnOnBuiltins(d,i);const O=i.map((e=>`'${updateExtensionForRelativeAmdId(e.id,p.forceJsExtensionForImports)}'`));const D=i.map((e=>`require('${e.id}')`));const M=trimEmptyImports(i);const L=M.map((e=>globalProp(e.globalName,$,P)));const F=M.map((e=>e.name));if(c&&(n||A)){O.unshift(`'exports'`);D.unshift(`exports`);L.unshift(assignToDeepVariable(v,$,S,`${g?`${globalProp(v,$,P)}${I}||${I}`:""}{}`,h));F.unshift("exports")}const V=getCompleteAmdId(p,r);const B=(V?`'${V}',${I}`:``)+(O.length?`[${O.join(`,${I}`)}],${I}`:``);const z=p.define;const U=!c&&n?`module.exports${I}=${I}`:``;const H=w?`${I}'use strict';${N}`:``;let j;if(A){const e=f?"e":"exports";let t;if(!c&&n){t=`${C} ${e}${I}=${I}${assignToDeepVariable(v,$,S,`${T}(${L.join(`,${I}`)})`,h)};`}else{const i=L.shift();t=`${C} ${e}${I}=${I}${i};${N}`+`${o}${o}${T}(${[e].concat(L).join(`,${I}`)});`}j=`(${k([],{isAsync:false,name:null})}{${N}`+`${o}${o}${C} current${I}=${I}${safeAccess(v,$,h)};${N}`+`${o}${o}${t}${N}`+`${o}${o}${e}.noConflict${I}=${I}${k([],{isAsync:false,name:null})}{${I}`+`${globalProp(v,$,P)}${I}=${I}current;${I}return ${e}${R}${I}};${N}`+`${o}})()`}else{j=`${T}(${L.join(`,${I}`)})`;if(!c&&n){j=assignToDeepVariable(v,$,S,j,h)}}const G=n||A&&c||L.length>0;const W=[T];if(G){W.unshift($)}const q=G?`this,${I}`:"";const K=G?`(${$}${I}=${I}typeof globalThis${I}!==${I}'undefined'${I}?${I}globalThis${I}:${I}${$}${I}||${I}self,${I}`:"";const Y=G?")":"";const X=G?`${o}typeof exports${I}===${I}'object'${I}&&${I}typeof module${I}!==${I}'undefined'${I}?`+`${I}${U}${T}(${D.join(`,${I}`)})${I}:${N}`:"";const Q=`(${_(W,{isAsync:false,name:null})}{${N}`+X+`${o}typeof ${z}${I}===${I}'function'${I}&&${I}${z}.amd${I}?${I}${z}(${B}${T})${I}:${N}`+`${o}${K}${j}${Y};${N}`+`})(${q}(${_(F,{isAsync:false,name:null})}{${H}${N}`;const Z=N+N+"}));";e.prepend(`${l}${getInteropBlock(i,x,y,E,b,t,o,h)}`);const J=getExportBlock$1(s,i,c,x,h,o,y);let ee=getNamespaceMarkers(c&&n,m,b,h);if(ee){ee=N+N+ee}e.append(`${J}${ee}${u}`);return e.trim().indent(o).append(Z).prepend(Q)}const fs={amd:amd,cjs:cjs,es:es,iife:iife,system:system,umd:umd};class Source{constructor(e,t){this.isOriginal=true;this.filename=e;this.content=t}traceSegment(e,t,i){return{column:t,line:e,name:i,source:this}}}class Link{constructor(e,t){this.sources=t;this.names=e.names;this.mappings=e.mappings}traceMappings(){const e=[];const t=new Map;const i=[];const s=[];const n=new Map;const r=[];for(const o of this.mappings){const l=[];for(const r of o){if(r.length===1)continue;const o=this.sources[r[1]];if(!o)continue;const c=o.traceSegment(r[2],r[3],r.length===5?this.names[r[4]]:"");if(c){const{column:o,line:u,name:h,source:{content:d,filename:p}}=c;let f=t.get(p);if(f===undefined){f=e.length;e.push(p);t.set(p,f);i[f]=d}else if(i[f]==null){i[f]=d}else if(d!=null&&i[f]!==d){return error({message:`Multiple conflicting contents for sourcemap source ${p}`})}const m=[r[0],f,u,o];if(h){let e=n.get(h);if(e===undefined){e=s.length;s.push(h);n.set(h,e)}m[4]=e}l.push(m)}}r.push(l)}return{mappings:r,names:s,sources:e,sourcesContent:i}}traceSegment(e,t,i){const s=this.mappings[e];if(!s)return null;let n=0;let r=s.length-1;while(n<=r){const e=n+r>>1;const o=s[e];if(o[0]===t||n===r){if(o.length==1)return null;const e=this.sources[o[1]];if(!e)return null;return e.traceSegment(o[2],o[3],o.length===5?this.names[o[4]]:i)}if(o[0]>t){r=e-1}else{n=e+1}}return null}}function getLinkMap(e){return function linkMap(t,i){if(i.mappings){return new Link(i,[t])}e({code:"SOURCEMAP_BROKEN",message:`Sourcemap is likely to be incorrect: a plugin (${i.plugin}) was used to transform `+"files, but didn't generate a sourcemap for the transformation. Consult the plugin "+"documentation for help",plugin:i.plugin,url:`https://rollupjs.org/guide/en/#warning-sourcemap-is-likely-to-be-incorrect`});return new Link({mappings:[],names:[]},[t])}}function getCollapsedSourcemap(e,t,i,n,r){let o;if(!i){o=new Source(e,t)}else{const t=i.sources;const n=i.sourcesContent||[];const r=s.dirname(e)||".";const l=i.sourceRoot||".";const c=t.map(((e,t)=>new Source(s.resolve(r,l,e),n[t])));o=new Link(i,c)}return n.reduce(r,o)}function collapseSourcemaps(e,t,i,n,r,o){const l=getLinkMap(o);const c=i.filter((e=>!e.excludeFromSourcemap)).map((e=>getCollapsedSourcemap(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,l)));const u=new Link(t,c);const h=n.reduce(l,u);let{sources:d,sourcesContent:p,names:f,mappings:m}=h.traceMappings();if(e){const t=s.dirname(e);d=d.map((e=>s.relative(t,e)));e=s.basename(e)}p=r?null:p;return new SourceMap({file:e,mappings:m,names:f,sources:d,sourcesContent:p})}function collapseSourcemap(e,t,i,s,n){if(!s.length){return i}const r=getCollapsedSourcemap(e,t,i,s,getLinkMap(n));const o=r.traceMappings();return{version:3,...o}}const createHash=()=>o.createHash("sha256");const ms={amd:deconflictImportsOther,cjs:deconflictImportsOther,es:deconflictImportsEsmOrSystem,iife:deconflictImportsOther,system:deconflictImportsEsmOrSystem,umd:deconflictImportsOther};function deconflictChunk(e,t,i,s,n,r,o,l,c,u,h,d,p){const f=e.slice().reverse();for(const e of f){e.scope.addUsedOutsideNames(s,n,h,d)}deconflictTopLevelVariables(s,f,p);ms[n](s,i,t,r,o,l,c,u);for(const e of f){e.scope.deconflict(n,h,d)}}function deconflictImportsEsmOrSystem(e,t,i,s,n,r,o,l){for(const t of i.dependencies){if(n||t instanceof ExternalModule){t.variableName=getSafeName(t.suggestedVariableName,e)}}for(const i of t){const t=i.module;const s=i.name;if(i.isNamespace&&(n||t instanceof ExternalModule)){i.setRenderNames(null,(t instanceof ExternalModule?t:o.get(t)).variableName)}else if(t instanceof ExternalModule&&s==="default"){i.setRenderNames(null,getSafeName([...t.exportedVariables].some((([e,t])=>t==="*"&&e.included))?t.suggestedVariableName+"__default":t.suggestedVariableName,e))}else{i.setRenderNames(null,getSafeName(s,e))}}for(const t of l){t.setRenderNames(null,getSafeName(t.name,e))}}function deconflictImportsOther(e,t,{deconflictedDefault:i,deconflictedNamespace:s,dependencies:n},r,o,l,c){for(const t of n){t.variableName=getSafeName(t.suggestedVariableName,e)}for(const t of s){t.namespaceVariableName=getSafeName(`${t.suggestedVariableName}__namespace`,e)}for(const t of i){if(s.has(t)&&canDefaultBeTakenFromNamespace(String(r(t.id)),l)){t.defaultVariableName=t.namespaceVariableName}else{t.defaultVariableName=getSafeName(`${t.suggestedVariableName}__default`,e)}}for(const e of t){const t=e.module;if(t instanceof ExternalModule){const i=e.name;if(i==="default"){const i=String(r(t.id));const s=Gi[i]?t.defaultVariableName:t.variableName;if(isDefaultAProperty(i,l)){e.setRenderNames(s,"default")}else{e.setRenderNames(null,s)}}else if(i==="*"){e.setRenderNames(null,Wi[String(r(t.id))]?t.namespaceVariableName:t.variableName)}else{e.setRenderNames(t.variableName,null)}}else{const i=c.get(t);if(o&&e.isNamespace){e.setRenderNames(null,i.exportMode==="default"?i.namespaceVariableName:i.variableName)}else if(i.exportMode==="default"){e.setRenderNames(null,i.variableName)}else{e.setRenderNames(i.variableName,i.getVariableExportName(e))}}}}function deconflictTopLevelVariables(e,t,i){for(const s of t){for(const t of s.scope.variables.values()){if(t.included&&!(t.renderBaseName||t instanceof ExportDefaultVariable&&t.getOriginalVariable()!==t)){t.setRenderNames(null,getSafeName(t.name,e))}}if(i.has(s)){const t=s.namespace;t.setRenderNames(null,getSafeName(t.name,e))}}}const gs=/[\\'\r\n\u2028\u2029]/;const ys=/(['\r\n\u2028\u2029])/g;const Es=/\\/g;function escapeId(e){if(!e.match(gs))return e;return e.replace(Es,"\\\\").replace(ys,"\\$1")}function assignExportsToMangledNames(e,t,i){let s=0;for(const n of e){let[e]=n.name;if(t.has(e)){do{e=toBase64(++s);if(e.charCodeAt(0)===49){s+=9*64**(e.length-1);e=toBase64(s)}}while(ee.has(e)||t.has(e))}t.set(e,n);i.set(n,[e])}}function assignExportsToNames(e,t,i){for(const s of e){let e=0;let n=s.name;while(t.has(n)){n=s.name+"$"+ ++e}t.set(n,s);i.set(s,[n])}}function getExportMode(e,{exports:t,name:i,format:s},n,r,o){const l=e.getExportNames();if(t==="default"){if(l.length!==1||l[0]!=="default"){return error(errIncompatibleExportOptionValue("default",l,r))}}else if(t==="none"&&l.length){return error(errIncompatibleExportOptionValue("none",l,r))}if(t==="auto"){if(l.length===0){t="none"}else if(l.length===1&&l[0]==="default"){if(s==="cjs"&&n.has("exports")){o(errPreferNamedExports(r))}t="default"}else{if(s!=="es"&&s!=="system"&&l.includes("default")){o(errMixedExport(r,i))}t="named"}}return t}function guessIndentString(e){const t=e.split("\n");const i=t.filter((e=>/^\t+/.test(e)));const s=t.filter((e=>/^ {2,}/.test(e)));if(i.length===0&&s.length===0){return null}if(i.length>=s.length){return"\t"}const n=s.reduce(((e,t)=>{const i=/^ +/.exec(t)[0].length;return Math.min(i,e)}),Infinity);return new Array(n+1).join(" ")}function getIndentString(e,t){if(t.indent!==true)return t.indent;for(const t of e){const e=guessIndentString(t.originalCode);if(e!==null)return e}return"\t"}function getStaticDependencies(e,t,i){const s=[];const n=new Set;for(let r=t.length-1;r>=0;r--){const o=t[r];if(!n.has(o)){const t=[];addStaticDependencies(o,t,n,e,i);s.unshift(t)}}const r=new Set;for(const e of s){for(const t of e){r.add(t)}}return r}function addStaticDependencies(e,t,i,s,n){const r=e.getDependenciesToBeIncluded();for(const e of r){if(e instanceof ExternalModule){t.push(e);continue}const r=n.get(e);if(r!==s){t.push(r);continue}if(!i.has(e)){i.add(e);addStaticDependencies(e,t,i,s,n)}}}function decodedSourcemap(e){if(!e)return null;if(typeof e==="string"){e=JSON.parse(e)}if(e.mappings===""){return{mappings:[],names:[],sources:[],version:3}}const t=typeof e.mappings==="string"?decode(e.mappings):e.mappings;return{...e,mappings:t}}function renderChunk({code:e,options:t,outputPluginDriver:i,renderChunk:s,sourcemapChain:n}){const renderChunkReducer=(e,t,i)=>{if(t==null)return e;if(typeof t==="string")t={code:t,map:undefined};if(t.map!==null){const e=decodedSourcemap(t.map);n.push(e||{missing:true,plugin:i.name})}return t.code};return i.hookReduceArg0("renderChunk",[e,s,t],renderChunkReducer)}function renderNamePattern(e,t,i){if(isPathFragment(e))return error(errFailedValidation(`Invalid pattern "${e}" for "${t}", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.`));return e.replace(/\[(\w+)\]/g,((e,s)=>{if(!i.hasOwnProperty(s)){return error(errFailedValidation(`"[${s}]" is not a valid placeholder in "${t}" pattern.`))}const n=i[s]();if(isPathFragment(n))return error(errFailedValidation(`Invalid substitution "${n}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`));return n}))}function makeUnique(e,t){const i=new Set(Object.keys(t).map((e=>e.toLowerCase())));if(!i.has(e.toLocaleLowerCase()))return e;const n=s.extname(e);e=e.substring(0,e.length-n.length);let r,o=1;while(i.has((r=e+ ++o+n).toLowerCase()));return r}const xs=[".js",".jsx",".ts",".tsx"];function getGlobalName(e,t,i,s){const n=typeof t==="function"?t(e.id):t[e.id];if(n){return n}if(i){s({code:"MISSING_GLOBAL_NAME",guess:e.variableName,message:`No name was provided for external module '${e.id}' in output.globals – guessing '${e.variableName}'`,source:e.id});return e.variableName}}class Chunk{constructor(e,t,i,s,n,r,o,l,c,u){this.orderedModules=e;this.inputOptions=t;this.outputOptions=i;this.unsetOptions=s;this.pluginDriver=n;this.modulesById=r;this.chunkByModule=o;this.facadeChunkByModule=l;this.includedNamespaces=c;this.manualChunkAlias=u;this.entryModules=[];this.exportMode="named";this.facadeModule=null;this.id=null;this.namespaceVariableName="";this.needsExportsShim=false;this.variableName="";this.accessedGlobalsByScope=new Map;this.dependencies=new Set;this.dynamicDependencies=new Set;this.dynamicEntryModules=[];this.dynamicName=null;this.exportNamesByVariable=new Map;this.exports=new Set;this.exportsByName=new Map;this.fileName=null;this.implicitEntryModules=[];this.implicitlyLoadedBefore=new Set;this.imports=new Set;this.includedReexportsByModule=new Map;this.indentString=undefined;this.isEmpty=true;this.name=null;this.renderedDependencies=null;this.renderedExports=null;this.renderedHash=undefined;this.renderedModuleSources=new Map;this.renderedModules=Object.create(null);this.renderedSource=null;this.sortedExportNames=null;this.strictFacade=false;this.usedModules=undefined;this.execIndex=e.length>0?e[0].execIndex:Infinity;const h=new Set(e);for(const t of e){if(t.namespace.included){c.add(t)}if(this.isEmpty&&t.isIncluded()){this.isEmpty=false}if(t.info.isEntry||i.preserveModules){this.entryModules.push(t)}for(const e of t.includedDynamicImporters){if(!h.has(e)){this.dynamicEntryModules.push(t);if(t.info.syntheticNamedExports&&!i.preserveModules){c.add(t);this.exports.add(t.namespace)}}}if(t.implicitlyLoadedAfter.size>0){this.implicitEntryModules.push(t)}}this.suggestedVariableName=makeLegal(this.generateVariableName())}static generateFacade(e,t,i,s,n,r,o,l,c,u){const h=new Chunk([],e,t,i,s,n,r,o,l,null);h.assignFacadeName(u,c);if(!o.has(c)){o.set(c,h)}for(const e of c.getDependenciesToBeIncluded()){h.dependencies.add(e instanceof Module?r.get(e):e)}if(!h.dependencies.has(r.get(c))&&c.info.moduleSideEffects&&c.hasEffects()){h.dependencies.add(r.get(c))}h.ensureReexportsAreAvailableForModule(c);h.facadeModule=c;h.strictFacade=true;return h}canModuleBeFacade(e,t){const i=e.getExportNamesByVariable();for(const t of this.exports){if(!i.has(t)){if(i.size===0&&e.isUserDefinedEntryPoint&&e.preserveSignature==="strict"&&this.unsetOptions.has("preserveEntrySignatures")){this.inputOptions.onwarn({code:"EMPTY_FACADE",id:e.id,message:`To preserve the export signature of the entry module "${relativeId(e.id)}", an empty facade chunk was created. This often happens when creating a bundle for a web app where chunks are placed in script tags and exports are ignored. In this case it is recommended to set "preserveEntrySignatures: false" to avoid this and reduce the number of chunks. Otherwise if this is intentional, set "preserveEntrySignatures: 'strict'" explicitly to silence this warning.`,url:"https://rollupjs.org/guide/en/#preserveentrysignatures"})}return false}}for(const s of t){if(!(i.has(s)||s.module===e)){return false}}return true}generateExports(){this.sortedExportNames=null;const e=new Set(this.exports);if(this.facadeModule!==null&&(this.facadeModule.preserveSignature!==false||this.strictFacade)){const t=this.facadeModule.getExportNamesByVariable();for(const[i,s]of t){this.exportNamesByVariable.set(i,[...s]);for(const e of s){this.exportsByName.set(e,i)}e.delete(i)}}if(this.outputOptions.minifyInternalExports){assignExportsToMangledNames(e,this.exportsByName,this.exportNamesByVariable)}else{assignExportsToNames(e,this.exportsByName,this.exportNamesByVariable)}if(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)this.exportMode=getExportMode(this,this.outputOptions,this.unsetOptions,this.facadeModule.id,this.inputOptions.onwarn)}generateFacades(){var e;const t=[];const i=new Set([...this.entryModules,...this.implicitEntryModules]);const s=new Set(this.dynamicEntryModules.map((({namespace:e})=>e)));for(const e of i){if(e.preserveSignature){for(const t of e.getExportNamesByVariable().keys()){s.add(t)}}}for(const e of i){const i=Array.from(new Set(e.chunkNames.filter((({isUserDefined:e})=>e)).map((({name:e})=>e))),(e=>({name:e})));if(i.length===0&&e.isUserDefinedEntryPoint){i.push({})}i.push(...Array.from(e.chunkFileNames,(e=>({fileName:e}))));if(i.length===0){i.push({})}if(!this.facadeModule){const t=e.preserveSignature==="strict"||e.preserveSignature==="exports-only"&&e.getExportNamesByVariable().size!==0;if(!t||this.outputOptions.preserveModules||this.canModuleBeFacade(e,s)){this.facadeModule=e;this.facadeChunkByModule.set(e,this);if(e.preserveSignature){this.strictFacade=t}this.assignFacadeName(i.shift(),e)}}for(const s of i){t.push(Chunk.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.facadeChunkByModule,this.includedNamespaces,e,s))}}for(const t of this.dynamicEntryModules){if(t.info.syntheticNamedExports)continue;if(!this.facadeModule&&this.canModuleBeFacade(t,s)){this.facadeModule=t;this.facadeChunkByModule.set(t,this);this.strictFacade=true;this.dynamicName=getChunkNameFromModule(t)}else if(this.facadeModule===t&&!this.strictFacade&&this.canModuleBeFacade(t,s)){this.strictFacade=true}else if(!((e=this.facadeChunkByModule.get(t))===null||e===void 0?void 0:e.strictFacade)){this.includedNamespaces.add(t);this.exports.add(t.namespace)}}if(!this.outputOptions.preserveModules){this.addNecessaryImportsForFacades()}return t}generateId(e,t,i,s){if(this.fileName!==null){return this.fileName}const[n,r]=this.facadeModule&&this.facadeModule.isUserDefinedEntryPoint?[t.entryFileNames,"output.entryFileNames"]:[t.chunkFileNames,"output.chunkFileNames"];return makeUnique(renderNamePattern(typeof n==="function"?n(this.getChunkInfo()):n,r,{format:()=>t.format,hash:()=>s?this.computeContentHashWithDependencies(e,t,i):"[hash]",name:()=>this.getChunkName()}),i)}generateIdPreserveModules(e,t,i,n){const[{id:r}]=this.orderedModules;const o=this.outputOptions.sanitizeFileName(r.split(vs,1)[0]);let l;const c=n.has("entryFileNames")?"[name][assetExtname].js":t.entryFileNames;const u=typeof c==="function"?c(this.getChunkInfo()):c;if(isAbsolute(o)){const i=s.dirname(o);const n=s.extname(o);const r=renderNamePattern(u,"output.entryFileNames",{assetExtname:()=>xs.includes(n)?"":n,ext:()=>n.substring(1),extname:()=>n,format:()=>t.format,name:()=>this.getChunkName()});const c=`${i}/${r}`;const{preserveModulesRoot:h}=t;if(h&&s.resolve(c).startsWith(h)){l=c.slice(h.length).replace(/^[\\/]/,"")}else{l=relative(e,c)}}else{const e=s.extname(o);const i=renderNamePattern(u,"output.entryFileNames",{assetExtname:()=>xs.includes(e)?"":e,ext:()=>e.substring(1),extname:()=>e,format:()=>t.format,name:()=>getAliasName(o)});l=`_virtual/${i}`}return makeUnique(normalize(l),i)}getChunkInfo(){const e=this.facadeModule;const t=this.getChunkName.bind(this);return{exports:this.getExportNames(),facadeModuleId:e&&e.id,isDynamicEntry:this.dynamicEntryModules.length>0,isEntry:e!==null&&e.info.isEntry,isImplicitEntry:this.implicitEntryModules.length>0,modules:this.renderedModules,get name(){return t()},type:"chunk"}}getChunkInfoWithFileNames(){return Object.assign(this.getChunkInfo(),{code:undefined,dynamicImports:Array.from(this.dynamicDependencies,getId),fileName:this.id,implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,getId),importedBindings:this.getImportedBindingsPerDependency(),imports:Array.from(this.dependencies,getId),map:undefined,referencedFiles:this.getReferencedFiles()})}getChunkName(){var e;return(e=this.name)!==null&&e!==void 0?e:this.name=this.outputOptions.sanitizeFileName(this.getFallbackChunkName())}getExportNames(){var e;return(e=this.sortedExportNames)!==null&&e!==void 0?e:this.sortedExportNames=Array.from(this.exportsByName.keys()).sort()}getRenderedHash(){if(this.renderedHash)return this.renderedHash;const e=createHash();const t=this.pluginDriver.hookReduceValueSync("augmentChunkHash","",[this.getChunkInfo()],((e,t)=>{if(t){e+=t}return e}));e.update(t);e.update(this.renderedSource.toString());e.update(this.getExportNames().map((e=>{const t=this.exportsByName.get(e);return`${relativeId(t.module.id).replace(/\\/g,"/")}:${t.name}:${e}`})).join(","));return this.renderedHash=e.digest("hex")}getVariableExportName(e){if(this.outputOptions.preserveModules&&e instanceof NamespaceVariable){return"*"}return this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=getStaticDependencies(this,this.orderedModules,this.chunkByModule);for(const e of this.orderedModules){this.addDependenciesToChunk(e.dynamicDependencies,this.dynamicDependencies);this.addDependenciesToChunk(e.implicitlyLoadedBefore,this.implicitlyLoadedBefore);this.setUpChunkImportsAndExportsForModule(e)}}preRender(e,t,i){const{_:s,getPropertyAccess:n,n:r}=i;const o=new Bundle$1({separator:`${r}${r}`});this.usedModules=[];this.indentString=getIndentString(this.orderedModules,e);const l={dynamicImportFunction:e.dynamicImportFunction,exportNamesByVariable:this.exportNamesByVariable,format:e.format,freeze:e.freeze,indent:this.indentString,namespaceToStringTag:e.namespaceToStringTag,outputPluginDriver:this.pluginDriver,snippets:i};if(e.hoistTransitiveImports&&!this.outputOptions.preserveModules&&this.facadeModule!==null){for(const e of this.dependencies){if(e instanceof Chunk)this.inlineChunkDependencies(e)}}this.prepareModulesForRendering(i);this.setIdentifierRenderResolutions(e);let c="";const u=this.renderedModules;for(const t of this.orderedModules){let i=0;if(t.isIncluded()||this.includedNamespaces.has(t)){const s=t.render(l).trim();i=s.length();if(i){if(e.compact&&s.lastLine().includes("//"))s.append("\n");this.renderedModuleSources.set(t,s);o.addSource(s);this.usedModules.push(t)}const n=t.namespace;if(this.includedNamespaces.has(t)&&!this.outputOptions.preserveModules){const e=n.renderBlock(l);if(n.renderFirst())c+=r+e;else o.addSource(new MagicString(e))}}const{renderedExports:s,removedExports:n}=t.getRenderedExports();const{renderedModuleSources:h}=this;u[t.id]={get code(){var e,i;return(i=(e=h.get(t))===null||e===void 0?void 0:e.toString())!==null&&i!==void 0?i:null},originalLength:t.originalCode.length,removedExports:n,renderedExports:s,renderedLength:i}}if(c)o.prepend(c+r+r);if(this.needsExportsShim){o.prepend(`${r}${i.cnst} ${as}${s}=${s}void 0;${r}${r}`)}if(e.compact){this.renderedSource=o}else{this.renderedSource=o.trim()}this.renderedHash=undefined;if(this.isEmpty&&this.getExportNames().length===0&&this.dependencies.size===0){const e=this.getChunkName();this.inputOptions.onwarn({chunkName:e,code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${e}"`})}this.setExternalRenderPaths(e,t);this.renderedDependencies=this.getChunkDependencyDeclarations(e,n);this.renderedExports=this.exportMode==="none"?[]:this.getChunkExportDeclarations(e.format,n)}async render(e,t,i,n){cs("render format",2);const r=e.format;const o=fs[r];if(e.dynamicImportFunction&&r!=="es"){this.inputOptions.onwarn(errInvalidOption("output.dynamicImportFunction","outputdynamicImportFunction",'this option is ignored for formats other than "es"'))}for(const e of this.dependencies){const t=this.renderedDependencies.get(e);if(e instanceof ExternalModule){const i=e.renderPath;t.id=escapeId(e.renormalizeRenderPath?getImportPath(this.id,i,false,false):i)}else{t.namedExportsMode=e.exportMode!=="default";t.id=escapeId(getImportPath(this.id,e.id,false,true))}}this.finaliseDynamicImports(e,n);this.finaliseImportMetas(r,n);const l=this.renderedExports.length!==0||[...this.renderedDependencies.values()].some((e=>e.reexports&&e.reexports.length!==0));let c=null;const u=new Set;for(const e of this.orderedModules){if(e.usesTopLevelAwait){c=e.id}const t=this.accessedGlobalsByScope.get(e.scope);if(t){for(const e of t){u.add(e)}}}if(c!==null&&r!=="es"&&r!=="system"){return error({code:"INVALID_TLA_FORMAT",id:c,message:`Module format ${r} does not support top-level await. Use the "es" or "system" output formats rather.`})}if(!this.id){throw new Error("Internal Error: expecting chunk id")}const h=o(this.renderedSource,{accessedGlobals:u,dependencies:[...this.renderedDependencies.values()],exports:this.renderedExports,hasExports:l,id:this.id,indent:this.indentString,intro:t.intro,isEntryFacade:this.outputOptions.preserveModules||this.facadeModule!==null&&this.facadeModule.info.isEntry,isModuleFacade:this.facadeModule!==null,namedExportsMode:this.exportMode!=="default",outro:t.outro,snippets:n,usesTopLevelAwait:c!==null,warn:this.inputOptions.onwarn},e);if(t.banner)h.prepend(t.banner);if(t.footer)h.append(t.footer);const d=h.toString();us("render format",2);let p=null;const f=[];let m=await renderChunk({code:d,options:e,outputPluginDriver:this.pluginDriver,renderChunk:i,sourcemapChain:f});if(e.sourcemap){cs("sourcemap",2);let t;if(e.file)t=s.resolve(e.sourcemapFile||e.file);else if(e.dir)t=s.resolve(e.dir,this.id);else t=s.resolve(this.id);const i=h.generateDecodedMap({});p=collapseSourcemaps(t,i,this.usedModules,f,e.sourcemapExcludeSources,this.inputOptions.onwarn);p.sources=p.sources.map((i=>{const{sourcemapPathTransform:s}=e;if(s){const e=s(i,`${t}.map`);if(typeof e!=="string"){error(errFailedValidation(`sourcemapPathTransform function must return a string.`))}return e}return i})).map(normalize);us("sourcemap",2)}if(!e.compact&&m[m.length-1]!=="\n")m+="\n";return{code:m,map:p}}addDependenciesToChunk(e,t){for(const i of e){if(i instanceof Module){const e=this.chunkByModule.get(i);if(e&&e!==this){t.add(e)}}else{t.add(i)}}}addNecessaryImportsForFacades(){for(const[e,t]of this.includedReexportsByModule){if(this.includedNamespaces.has(e)){for(const e of t){this.imports.add(e)}}}}assignFacadeName({fileName:e,name:t},i){if(e){this.fileName=e}else{this.name=this.outputOptions.sanitizeFileName(t||getChunkNameFromModule(i))}}checkCircularDependencyImport(e,t){const i=e.module;if(i instanceof Module){const s=this.chunkByModule.get(i);let n;do{n=t.alternativeReexportModules.get(e);if(n){const r=this.chunkByModule.get(n);if(r&&r!==s){this.inputOptions.onwarn(errCyclicCrossChunkReexport(i.getExportNamesByVariable().get(e)[0],i.id,n.id,t.id))}t=n}}while(n)}}computeContentHashWithDependencies(e,t,i){const s=createHash();s.update([e.intro,e.outro,e.banner,e.footer].join(":"));s.update(t.format);const n=new Set([this]);for(const r of n){if(r instanceof ExternalModule){s.update(`:${r.renderPath}`)}else{s.update(r.getRenderedHash());s.update(r.generateId(e,t,i,false))}if(r instanceof ExternalModule)continue;for(const e of[...r.dependencies,...r.dynamicDependencies]){n.add(e)}}return s.digest("hex").substr(0,8)}ensureReexportsAreAvailableForModule(e){const t=[];const i=e.getExportNamesByVariable();for(const s of i.keys()){const i=s instanceof SyntheticNamedExportVariable;const n=i?s.getBaseVariable():s;if(!(n instanceof NamespaceVariable&&this.outputOptions.preserveModules)){this.checkCircularDependencyImport(n,e);const s=n.module;if(s instanceof Module){const e=this.chunkByModule.get(s);if(e&&e!==this){e.exports.add(n);t.push(n);if(i){this.imports.add(n)}}}}}if(t.length){this.includedReexportsByModule.set(e,t)}}finaliseDynamicImports(e,t){const i=e.format==="amd"&&!e.amd.forceJsExtensionForImports;for(const[e,s]of this.renderedModuleSources){for(const{node:n,resolution:r}of e.dynamicImports){const e=this.chunkByModule.get(r);const o=this.facadeChunkByModule.get(r);if(!r||!n.included||e===this){continue}const l=r instanceof Module?`'${escapeId(getImportPath(this.id,(o||e).id,i,true))}'`:r instanceof ExternalModule?`'${escapeId(r.renormalizeRenderPath?getImportPath(this.id,r.renderPath,i,false):r.renderPath)}'`:r;n.renderFinalResolution(s,l,r instanceof Module&&!(o===null||o===void 0?void 0:o.strictFacade)&&e.exportNamesByVariable.get(r.namespace)[0],t)}}}finaliseImportMetas(e,t){for(const[i,s]of this.renderedModuleSources){for(const n of i.importMetas){n.renderFinalMechanism(s,this.id,e,t,this.pluginDriver)}}}generateVariableName(){if(this.manualChunkAlias){return this.manualChunkAlias}const e=this.entryModules[0]||this.implicitEntryModules[0]||this.dynamicEntryModules[0]||this.orderedModules[this.orderedModules.length-1];if(e){return getChunkNameFromModule(e)}return"chunk"}getChunkDependencyDeclarations(e,t){const i=this.getImportSpecifiers(t);const s=this.getReexportSpecifiers();const n=new Map;for(const t of this.dependencies){const r=i.get(t)||null;const o=s.get(t)||null;const l=t instanceof ExternalModule||t.exportMode!=="default";n.set(t,{defaultVariableName:t.defaultVariableName,globalName:t instanceof ExternalModule&&(e.format==="umd"||e.format==="iife")&&getGlobalName(t,e.globals,(r||o)!==null,this.inputOptions.onwarn),id:undefined,imports:r,isChunk:t instanceof Chunk,name:t.variableName,namedExportsMode:l,namespaceVariableName:t.namespaceVariableName,reexports:o})}return n}getChunkExportDeclarations(e,t){const i=[];for(const s of this.getExportNames()){if(s[0]==="*")continue;const n=this.exportsByName.get(s);if(!(n instanceof SyntheticNamedExportVariable)){const e=n.module;if(e&&this.chunkByModule.get(e)!==this)continue}let r=null;let o=false;let l=n.getName(t);if(n instanceof LocalVariable){for(const e of n.declarations){if(e.parent instanceof FunctionDeclaration||e instanceof ExportDefaultDeclaration&&e.declaration instanceof FunctionDeclaration){o=true;break}}}else if(n instanceof SyntheticNamedExportVariable){r=l;if(e==="es"){l=n.renderName}}i.push({exported:s,expression:r,hoisted:o,local:l})}return i}getDependenciesToBeDeconflicted(e,t,i){const s=new Set;const n=new Set;const r=new Set;for(const t of[...this.exportNamesByVariable.keys(),...this.imports]){if(e||t.isNamespace){const o=t.module;if(o instanceof ExternalModule){s.add(o);if(e){if(t.name==="default"){if(Gi[String(i(o.id))]){n.add(o)}}else if(t.name==="*"){if(Wi[String(i(o.id))]){r.add(o)}}}}else{const i=this.chunkByModule.get(o);if(i!==this){s.add(i);if(e&&i.exportMode==="default"&&t.isNamespace){r.add(i)}}}}}if(t){for(const e of this.dependencies){s.add(e)}}return{deconflictedDefault:n,deconflictedNamespace:r,dependencies:s}}getFallbackChunkName(){if(this.manualChunkAlias){return this.manualChunkAlias}if(this.dynamicName){return this.dynamicName}if(this.fileName){return getAliasName(this.fileName)}return getAliasName(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(e){const{interop:t}=this.outputOptions;const i=new Map;for(const s of this.imports){const n=s.module;let r;let o;if(n instanceof ExternalModule){r=n;o=s.name;if(o!=="default"&&o!=="*"&&t(n.id)==="defaultOnly"){return error(errUnexpectedNamedImport(n.id,o,false))}}else{r=this.chunkByModule.get(n);o=r.getVariableExportName(s)}getOrCreate(i,r,(()=>[])).push({imported:o,local:s.getName(e)})}return i}getImportedBindingsPerDependency(){const e={};for(const[t,i]of this.renderedDependencies){const s=new Set;if(i.imports){for(const{imported:e}of i.imports){s.add(e)}}if(i.reexports){for(const{imported:e}of i.reexports){s.add(e)}}e[t.id]=[...s]}return e}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions;const i=new Map;for(let s of this.getExportNames()){let n;let r;let o=false;if(s[0]==="*"){const i=s.substring(1);if(t(i)==="defaultOnly"){this.inputOptions.onwarn(errUnexpectedNamespaceReexport(i))}o=e;n=this.modulesById.get(i);r=s="*"}else{const i=this.exportsByName.get(s);if(i instanceof SyntheticNamedExportVariable)continue;const l=i.module;if(l instanceof Module){n=this.chunkByModule.get(l);if(n===this)continue;r=n.getVariableExportName(i);o=i.isReassigned}else{n=l;r=i.name;if(r!=="default"&&r!=="*"&&t(l.id)==="defaultOnly"){return error(errUnexpectedNamedImport(l.id,r,true))}o=e&&(r!=="default"||isDefaultAProperty(String(t(l.id)),true))}}getOrCreate(i,n,(()=>[])).push({imported:r,needsLiveBinding:o,reexported:s})}return i}getReferencedFiles(){const e=[];for(const t of this.orderedModules){for(const i of t.importMetas){const t=i.getReferencedFileName(this.pluginDriver);if(t){e.push(t)}}}return e}inlineChunkDependencies(e){for(const t of e.dependencies){if(this.dependencies.has(t))continue;this.dependencies.add(t);if(t instanceof Chunk){this.inlineChunkDependencies(t)}}}prepareModulesForRendering(e){var t;const i=this.accessedGlobalsByScope;for(const s of this.orderedModules){for(const{node:n,resolution:r}of s.dynamicImports){if(n.included){if(r instanceof Module){const s=this.chunkByModule.get(r);if(s===this){n.setInternalResolution(r.namespace)}else{n.setExternalResolution(((t=this.facadeChunkByModule.get(r))===null||t===void 0?void 0:t.exportMode)||s.exportMode,r,this.outputOptions,e,this.pluginDriver,i)}}else{n.setExternalResolution("external",r,this.outputOptions,e,this.pluginDriver,i)}}}for(const e of s.importMetas){e.addAccessedGlobals(this.outputOptions.format,i)}if(this.includedNamespaces.has(s)&&!this.outputOptions.preserveModules){s.namespace.prepare(i)}}}setExternalRenderPaths(e,t){for(const i of[...this.dependencies,...this.dynamicDependencies]){if(i instanceof ExternalModule){i.setRenderPath(e,t)}}}setIdentifierRenderResolutions({format:e,interop:t,namespaceToStringTag:i}){const s=new Set;for(const t of this.getExportNames()){const i=this.exportsByName.get(t);if(e!=="es"&&e!=="system"&&i.isReassigned&&!i.isId){i.setRenderNames("exports",t)}else if(i instanceof SyntheticNamedExportVariable){s.add(i)}else{i.setRenderNames(null,null)}}for(const e of this.orderedModules){if(e.needsExportShim){this.needsExportsShim=true;break}}const n=new Set(["Object","Promise"]);if(this.needsExportsShim){n.add(as)}if(i){n.add("Symbol")}switch(e){case"system":n.add("module").add("exports");break;case"es":break;case"cjs":n.add("module").add("require").add("__filename").add("__dirname");default:n.add("exports");for(const e of Ki){n.add(e)}}deconflictChunk(this.orderedModules,this.getDependenciesToBeDeconflicted(e!=="es"&&e!=="system",e==="amd"||e==="umd"||e==="iife",t),this.imports,n,e,t,this.outputOptions.preserveModules,this.outputOptions.externalLiveBindings,this.chunkByModule,s,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setUpChunkImportsAndExportsForModule(e){const t=new Set(e.includedImports);if(!this.outputOptions.preserveModules){if(this.includedNamespaces.has(e)){const i=e.namespace.getMemberVariables();for(const e of Object.values(i)){t.add(e)}}}for(let i of t){if(i instanceof ExportDefaultVariable){i=i.getOriginalVariable()}if(i instanceof SyntheticNamedExportVariable){i=i.getBaseVariable()}const t=this.chunkByModule.get(i.module);if(t!==this){this.imports.add(i);if(!(i instanceof NamespaceVariable&&this.outputOptions.preserveModules)&&i.module instanceof Module){t.exports.add(i);this.checkCircularDependencyImport(i,e)}}}if(this.includedNamespaces.has(e)||e.info.isEntry&&e.preserveSignature!==false||e.includedDynamicImporters.some((e=>this.chunkByModule.get(e)!==this))){this.ensureReexportsAreAvailableForModule(e)}for(const{node:t,resolution:i}of e.dynamicImports){if(t.included&&i instanceof Module&&this.chunkByModule.get(i)===this&&!this.includedNamespaces.has(i)){this.includedNamespaces.add(i);this.ensureReexportsAreAvailableForModule(i)}}}}function getChunkNameFromModule(e){var t,i,s,n;return(n=(i=(t=e.chunkNames.find((({isUserDefined:e})=>e)))===null||t===void 0?void 0:t.name)!==null&&i!==void 0?i:(s=e.chunkNames[0])===null||s===void 0?void 0:s.name)!==null&&n!==void 0?n:getAliasName(e.id)}const vs=/[?#]/;function generateAssetFileName(e,t,i,n){const r=i.sanitizeFileName(e||"asset");return makeUnique(renderNamePattern(typeof i.assetFileNames==="function"?i.assetFileNames({name:e,source:t,type:"asset"}):i.assetFileNames,"output.assetFileNames",{ext:()=>s.extname(r).substring(1),extname:()=>s.extname(r),hash(){return createHash().update(r).update(":").update(t).digest("hex").substring(0,8)},name:()=>r.substring(0,r.length-s.extname(r).length)}),n)}function reserveFileNameInBundle(e,t,i){if(e in t){i(errFileNameConflict(e))}t[e]=bs}const bs={type:"placeholder"};function hasValidType(e){return Boolean(e&&(e.type==="asset"||e.type==="chunk"))}function hasValidName(e){const t=e.fileName||e.name;return!t||typeof t==="string"&&!isPathFragment(t)}function getValidSource(e,t,i){if(!(typeof e==="string"||e instanceof Uint8Array)){const e=t.fileName||t.name||i;return error(errFailedValidation(`Could not set source for ${typeof e==="string"?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}function getAssetFileName(e,t){if(typeof e.fileName!=="string"){return error(errAssetNotFinalisedForFileName(e.name||t))}return e.fileName}function getChunkFileName(e,t){var i;const s=e.fileName||e.module&&((i=t===null||t===void 0?void 0:t.get(e.module))===null||i===void 0?void 0:i.id);if(!s)return error(errChunkNotGeneratedForFileName(e.fileName||e.name));return s}class FileEmitter{constructor(e,t,i){this.graph=e;this.options=t;this.bundle=null;this.facadeChunkByModule=null;this.outputOptions=null;this.assertAssetsFinalized=()=>{for(const[e,t]of this.filesByReferenceId){if(t.type==="asset"&&typeof t.fileName!=="string")return error(errNoAssetSourceSet(t.name||e))}};this.emitFile=e=>{if(!hasValidType(e)){return error(errFailedValidation(`Emitted files must be of type "asset" or "chunk", received "${e&&e.type}".`))}if(!hasValidName(e)){return error(errFailedValidation(`The "fileName" or "name" properties of emitted files must be strings that are neither absolute nor relative paths, received "${e.fileName||e.name}".`))}if(e.type==="chunk"){return this.emitChunk(e)}return this.emitAsset(e)};this.getFileName=e=>{const t=this.filesByReferenceId.get(e);if(!t)return error(errFileReferenceIdNotFoundForFilename(e));if(t.type==="chunk"){return getChunkFileName(t,this.facadeChunkByModule)}return getAssetFileName(t,e)};this.setAssetSource=(e,t)=>{const i=this.filesByReferenceId.get(e);if(!i)return error(errAssetReferenceIdNotFoundForSetSource(e));if(i.type!=="asset"){return error(errFailedValidation(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`))}if(i.source!==undefined){return error(errAssetSourceAlreadySet(i.name||e))}const s=getValidSource(t,i,e);if(this.bundle){this.finalizeAsset(i,s,e,this.bundle)}else{i.source=s}};this.setOutputBundle=(e,t,i)=>{this.outputOptions=t;this.bundle=e;this.facadeChunkByModule=i;for(const e of this.filesByReferenceId.values()){if(e.fileName){reserveFileNameInBundle(e.fileName,this.bundle,this.options.onwarn)}}for(const[e,t]of this.filesByReferenceId){if(t.type==="asset"&&t.source!==undefined){this.finalizeAsset(t,t.source,e,this.bundle)}}};this.filesByReferenceId=i?new Map(i.filesByReferenceId):new Map}assignReferenceId(e,t){let i;do{i=createHash().update(i||t).digest("hex").substring(0,8)}while(this.filesByReferenceId.has(i));this.filesByReferenceId.set(i,e);return i}emitAsset(e){const t=typeof e.source!=="undefined"?getValidSource(e.source,e,null):undefined;const i={fileName:e.fileName,name:e.name,source:t,type:"asset"};const s=this.assignReferenceId(i,e.fileName||e.name||e.type);if(this.bundle){if(e.fileName){reserveFileNameInBundle(e.fileName,this.bundle,this.options.onwarn)}if(t!==undefined){this.finalizeAsset(i,t,s,this.bundle)}}return s}emitChunk(e){if(this.graph.phase>os.LOAD_AND_PARSE){return error(errInvalidRollupPhaseForChunkEmission())}if(typeof e.id!=="string"){return error(errFailedValidation(`Emitted chunks need to have a valid string id, received "${e.id}"`))}const t={fileName:e.fileName,module:null,name:e.name||e.id,type:"chunk"};this.graph.moduleLoader.emitChunk(e).then((e=>t.module=e)).catch((()=>{}));return this.assignReferenceId(t,e.id)}finalizeAsset(e,t,i,s){const n=e.fileName||findExistingAssetFileNameWithSource(s,t)||generateAssetFileName(e.name,t,this.outputOptions,s);const r={...e,fileName:n,source:t};this.filesByReferenceId.set(i,r);const{options:o}=this;s[n]={fileName:n,get isAsset(){warnDeprecation('Accessing "isAsset" on files in the bundle is deprecated, please use "type === \'asset\'" instead',true,o);return true},name:e.name,source:t,type:"asset"}}}function findExistingAssetFileNameWithSource(e,t){for(const[i,s]of Object.entries(e)){if(s.type==="asset"&&areSourcesEqual(t,s.source))return i}return null}function areSourcesEqual(e,t){if(typeof e==="string"){return e===t}if(typeof t==="string"){return false}if("equals"in e){return e.equals(t)}if(e.length!==t.length){return false}for(let i=0;i<e.length;i++){if(e[i]!==t[i]){return false}}return true}const concatSep=(e,t)=>t?`${e}\n${t}`:e;const concatDblSep=(e,t)=>t?`${e}\n\n${t}`:e;async function createAddons(e,t){try{let[i,s,n,r]=await Promise.all([t.hookReduceValue("banner",e.banner(),[],concatSep),t.hookReduceValue("footer",e.footer(),[],concatSep),t.hookReduceValue("intro",e.intro(),[],concatDblSep),t.hookReduceValue("outro",e.outro(),[],concatDblSep)]);if(n)n+="\n\n";if(r)r=`\n\n${r}`;if(i.length)i+="\n";if(s.length)s="\n"+s;return{banner:i,footer:s,intro:n,outro:r}}catch(e){return error({code:"ADDON_ERROR",message:`Could not retrieve ${e.hook}. Check configuration of plugin ${e.plugin}.\n\tError Message: ${e.message}`})}}function getChunkAssignments(e,t){const i=[];const s=new Set(t.keys());const n=Object.create(null);for(const[e,i]of t){const t=n[i]=n[i]||[];addStaticDependenciesToManualChunk(e,t,s)}for(const[e,t]of Object.entries(n)){i.push({alias:e,modules:t})}const r=new Map;const{dependentEntryPointsByModule:o,dynamicEntryModules:l}=analyzeModuleGraph(e);const c=getDynamicDependentEntryPoints(o,l);const u=new Set(e);function assignEntryToStaticDependencies(e,t){const i=new Set([e]);for(const n of i){const l=getOrCreate(r,n,(()=>new Set));if(t&&areEntryPointsContainedOrDynamicallyDependent(t,o.get(n))){continue}else{l.add(e)}for(const e of n.getDependenciesToBeIncluded()){if(!(e instanceof ExternalModule||s.has(e))){i.add(e)}}}}function areEntryPointsContainedOrDynamicallyDependent(e,t){const i=new Set(e);for(const e of i){if(!t.has(e)){if(u.has(e))return false;const t=c.get(e);for(const e of t){i.add(e)}}}return true}for(const t of e){if(!s.has(t)){assignEntryToStaticDependencies(t,null)}}for(const e of l){if(!s.has(e)){assignEntryToStaticDependencies(e,c.get(e))}}i.push(...createChunks([...e,...l],r));return i}function addStaticDependenciesToManualChunk(e,t,i){const s=new Set([e]);for(const e of s){i.add(e);t.push(e);for(const t of e.dependencies){if(!(t instanceof ExternalModule||i.has(t))){s.add(t)}}}}function analyzeModuleGraph(e){const t=new Set;const i=new Map;const s=new Set(e);for(const e of s){const n=new Set([e]);for(const r of n){getOrCreate(i,r,(()=>new Set)).add(e);for(const e of r.getDependenciesToBeIncluded()){if(!(e instanceof ExternalModule)){n.add(e)}}for(const{resolution:e}of r.dynamicImports){if(e instanceof Module&&e.includedDynamicImporters.length>0){t.add(e);s.add(e)}}for(const e of r.implicitlyLoadedBefore){t.add(e);s.add(e)}}}return{dependentEntryPointsByModule:i,dynamicEntryModules:t}}function getDynamicDependentEntryPoints(e,t){const i=new Map;for(const s of t){const t=getOrCreate(i,s,(()=>new Set));for(const i of[...s.includedDynamicImporters,...s.implicitlyLoadedAfter]){for(const s of e.get(i)){t.add(s)}}}return i}function createChunks(e,t){const i=Object.create(null);for(const[s,n]of t){let t="";for(const i of e){t+=n.has(i)?"X":"_"}const r=i[t];if(r){r.push(s)}else{i[t]=[s]}}return Object.values(i).map((e=>({alias:null,modules:e})))}function commondir(e){if(e.length===0)return"/";if(e.length===1)return s.dirname(e[0]);const t=e.slice(1).reduce(((e,t)=>{const i=t.split(/\/+|\\+/);let s;for(s=0;e[s]===i[s]&&s<Math.min(e.length,i.length);s++);return e.slice(0,s)}),e[0].split(/\/+|\\+/));return t.length>1?t.join("/"):"/"}const compareExecIndex=(e,t)=>e.execIndex>t.execIndex?1:-1;function sortByExecutionOrder(e){e.sort(compareExecIndex)}function analyseModuleExecution(e){let t=0;const i=[];const s=new Set;const n=new Set;const r=new Map;const o=[];const analyseModule=e=>{if(e instanceof Module){for(const t of e.dependencies){if(r.has(t)){if(!s.has(t)){i.push(getCyclePath(t,e,r))}continue}r.set(t,e);analyseModule(t)}for(const t of e.implicitlyLoadedBefore){n.add(t)}for(const{resolution:t}of e.dynamicImports){if(t instanceof Module){n.add(t)}}o.push(e)}e.execIndex=t++;s.add(e)};for(const t of e){if(!r.has(t)){r.set(t,null);analyseModule(t)}}for(const e of n){if(!r.has(e)){r.set(e,null);analyseModule(e)}}return{cyclePaths:i,orderedModules:o}}function getCyclePath(e,t,i){const s=Symbol(e.id);const n=[relativeId(e.id)];let r=t;e.cycles.add(s);while(r!==e){r.cycles.add(s);n.push(relativeId(r.id));r=i.get(r)}n.push(n[0]);n.reverse();return n}function getGenerateCodeSnippets({compact:e,generatedCode:{arrowFunctions:t,constBindings:i,objectShorthand:s,reservedNamesAsProps:n}}){const{_:r,n:o,s:l}=e?{_:"",n:"",s:""}:{_:" ",n:"\n",s:";"};const c=i?"const":"var";const getNonArrowFunctionIntro=(e,{isAsync:t,name:i})=>`${t?`async `:""}function${i?` ${i}`:""}${r}(${e.join(`,${r}`)})${r}`;const u=t?(e,{isAsync:t,name:i})=>{const s=e.length===1;const n=t?`async${s?" ":r}`:"";return`${i?`${c} ${i}${r}=${r}`:""}${n}${s?e[0]:`(${e.join(`,${r}`)})`}${r}=>${r}`}:getNonArrowFunctionIntro;const getDirectReturnFunction=(e,{functionReturn:i,lineBreakIndent:s,name:n})=>[`${u(e,{isAsync:false,name:n})}${t?s?`${o}${s.base}${s.t}`:"":`{${s?`${o}${s.base}${s.t}`:r}${i?"return ":""}`}`,t?`${n?";":""}${s?`${o}${s.base}`:""}`:`${l}${s?`${o}${s.base}`:r}}`];const h=n?e=>Ss.test(e):e=>!ee.has(e)&&Ss.test(e);return{_:r,cnst:c,getDirectReturnFunction:getDirectReturnFunction,getDirectReturnIifeLeft:(e,i,{needsArrowReturnParens:s,needsWrappedFunction:n})=>{const[r,o]=getDirectReturnFunction(e,{functionReturn:true,lineBreakIndent:null,name:null});return`${wrapIfNeeded(`${r}${wrapIfNeeded(i,t&&s)}${o}`,t||n)}(`},getFunctionIntro:u,getNonArrowFunctionIntro:getNonArrowFunctionIntro,getObject(e,{lineBreakIndent:t}){const i=t?`${o}${t.base}${t.t}`:r;return`{${e.map((([e,t])=>{if(e===null)return`${i}${t}`;const n=!h(e);return e===t&&s&&!n?i+e:`${i}${n?`'${e}'`:e}:${r}${t}`})).join(`,`)}${e.length===0?"":t?`${o}${t.base}`:r}}`},getPropertyAccess:e=>h(e)?`.${e}`:`[${JSON.stringify(e)}]`,n:o,s:l}}const wrapIfNeeded=(e,t)=>t?`(${e})`:e;const Ss=/^(?!\d)[\w$]+$/;class Bundle{constructor(e,t,i,s,n){this.outputOptions=e;this.unsetOptions=t;this.inputOptions=i;this.pluginDriver=s;this.graph=n;this.facadeChunkByModule=new Map;this.includedNamespaces=new Set}async generate(e){cs("GENERATE",1);const t=Object.create(null);this.pluginDriver.setOutputBundle(t,this.outputOptions,this.facadeChunkByModule);try{await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]);cs("generate chunks",2);const e=await this.generateChunks();if(e.length>1){validateOptionsForMultiChunkOutput(this.outputOptions,this.inputOptions.onwarn)}const i=commondir(getAbsoluteEntryModulePaths(e));us("generate chunks",2);cs("render modules",2);const s=await createAddons(this.outputOptions,this.pluginDriver);const n=getGenerateCodeSnippets(this.outputOptions);this.prerenderChunks(e,i,n);us("render modules",2);await this.addFinalizedChunksToBundle(e,i,s,t,n)}catch(e){await this.pluginDriver.hookParallel("renderError",[e]);throw e}await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,t,e]);this.finaliseAssets(t);us("GENERATE",1);return t}async addFinalizedChunksToBundle(e,t,i,s,n){this.assignChunkIds(e,t,i,s);for(const t of e){s[t.id]=t.getChunkInfoWithFileNames()}await Promise.all(e.map((async e=>{const t=s[e.id];Object.assign(t,await e.render(this.outputOptions,i,t,n))})))}async addManualChunks(e){const t=new Map;const i=await Promise.all(Object.entries(e).map((async([e,t])=>({alias:e,entries:await this.graph.moduleLoader.addAdditionalModules(t)}))));for(const{alias:e,entries:s}of i){for(const i of s){addModuleToManualChunk(e,i,t)}}return t}assignChunkIds(e,t,i,n){const r=[];const o=[];for(const t of e){(t.facadeModule&&t.facadeModule.isUserDefinedEntryPoint?r:o).push(t)}const l=r.concat(o);for(const e of l){if(this.outputOptions.file){e.id=s.basename(this.outputOptions.file)}else if(this.outputOptions.preserveModules){e.id=e.generateIdPreserveModules(t,this.outputOptions,n,this.unsetOptions)}else{e.id=e.generateId(i,this.outputOptions,n,true)}n[e.id]=bs}}assignManualChunks(e){const t=[];const i={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const s of this.graph.modulesById.values()){if(s instanceof Module){const n=e(s.id,i);if(typeof n==="string"){t.push([n,s])}}}t.sort((([e],[t])=>e>t?1:e<t?-1:0));const s=new Map;for(const[e,i]of t){addModuleToManualChunk(e,i,s)}return s}finaliseAssets(e){for(const t of Object.values(e)){if(!t.type){warnDeprecation('A plugin is directly adding properties to the bundle object in the "generateBundle" hook. This is deprecated and will be removed in a future Rollup version, please use "this.emitFile" instead.',true,this.inputOptions);t.type="asset"}if(this.outputOptions.validate&&"code"in t){try{this.graph.contextParse(t.code,{allowHashBang:true,ecmaVersion:"latest"})}catch(e){this.inputOptions.onwarn(errChunkInvalid(t,e))}}}this.pluginDriver.finaliseAssets()}async generateChunks(){const{manualChunks:e}=this.outputOptions;const t=typeof e==="object"?await this.addManualChunks(e):this.assignManualChunks(e);const i=[];const s=new Map;for(const{alias:e,modules:n}of this.outputOptions.inlineDynamicImports?[{alias:null,modules:getIncludedModules(this.graph.modulesById)}]:this.outputOptions.preserveModules?getIncludedModules(this.graph.modulesById).map((e=>({alias:null,modules:[e]}))):getChunkAssignments(this.graph.entryModules,t)){sortByExecutionOrder(n);const t=new Chunk(n,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,s,this.facadeChunkByModule,this.includedNamespaces,e);i.push(t);for(const e of n){s.set(e,t)}}for(const e of i){e.link()}const n=[];for(const e of i){n.push(...e.generateFacades())}return[...i,...n]}prerenderChunks(e,t,i){for(const t of e){t.generateExports()}for(const s of e){s.preRender(this.outputOptions,t,i)}}}function getAbsoluteEntryModulePaths(e){const t=[];for(const i of e){for(const e of i.entryModules){if(isAbsolute(e.id)){t.push(e.id)}}}return t}function validateOptionsForMultiChunkOutput(e,t){if(e.format==="umd"||e.format==="iife")return error(errInvalidOption("output.format","outputformat","UMD and IIFE output formats are not supported for code-splitting builds",e.format));if(typeof e.file==="string")return error(errInvalidOption("output.file","outputdir",'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option'));if(e.sourcemapFile)return error(errInvalidOption("output.sourcemapFile","outputsourcemapfile",'"output.sourcemapFile" is only supported for single-file builds'));if(!e.amd.autoId&&e.amd.id)t(errInvalidOption("output.amd.id","outputamd",'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))}function getIncludedModules(e){return[...e.values()].filter((e=>e instanceof Module&&(e.isIncluded()||e.info.isEntry||e.includedDynamicImporters.length>0)))}function addModuleToManualChunk(e,t,i){const s=i.get(t);if(typeof s==="string"&&s!==e){return error(errCannotAssignModuleToChunk(t.id,e,s))}i.set(t,e)}var As=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];var ws=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938];var Is="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";var Cs="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";var ks={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"};var _s="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";var Ps={5:_s,"5module":_s+" export import",6:_s+" const class extends export import super"};var Ns=/^in(stanceof)?$/;var Rs=new RegExp("["+Cs+"]");var Ts=new RegExp("["+Cs+Is+"]");function isInAstralSet(e,t){var i=65536;for(var s=0;s<t.length;s+=2){i+=t[s];if(i>e){return false}i+=t[s+1];if(i>=e){return true}}}function isIdentifierStart(e,t){if(e<65){return e===36}if(e<91){return true}if(e<97){return e===95}if(e<123){return true}if(e<=65535){return e>=170&&Rs.test(String.fromCharCode(e))}if(t===false){return false}return isInAstralSet(e,ws)}function isIdentifierChar(e,t){if(e<48){return e===36}if(e<58){return true}if(e<65){return false}if(e<91){return true}if(e<97){return e===95}if(e<123){return true}if(e<=65535){return e>=170&&Ts.test(String.fromCharCode(e))}if(t===false){return false}return isInAstralSet(e,ws)||isInAstralSet(e,As)}var $s=function TokenType(e,t){if(t===void 0)t={};this.label=e;this.keyword=t.keyword;this.beforeExpr=!!t.beforeExpr;this.startsExpr=!!t.startsExpr;this.isLoop=!!t.isLoop;this.isAssign=!!t.isAssign;this.prefix=!!t.prefix;this.postfix=!!t.postfix;this.binop=t.binop||null;this.updateContext=null};function binop(e,t){return new $s(e,{beforeExpr:true,binop:t})}var Os={beforeExpr:true},Ds={startsExpr:true};var Ms={};function kw(e,t){if(t===void 0)t={};t.keyword=e;return Ms[e]=new $s(e,t)}var Ls={num:new $s("num",Ds),regexp:new $s("regexp",Ds),string:new $s("string",Ds),name:new $s("name",Ds),privateId:new $s("privateId",Ds),eof:new $s("eof"),bracketL:new $s("[",{beforeExpr:true,startsExpr:true}),bracketR:new $s("]"),braceL:new $s("{",{beforeExpr:true,startsExpr:true}),braceR:new $s("}"),parenL:new $s("(",{beforeExpr:true,startsExpr:true}),parenR:new $s(")"),comma:new $s(",",Os),semi:new $s(";",Os),colon:new $s(":",Os),dot:new $s("."),question:new $s("?",Os),questionDot:new $s("?."),arrow:new $s("=>",Os),template:new $s("template"),invalidTemplate:new $s("invalidTemplate"),ellipsis:new $s("...",Os),backQuote:new $s("`",Ds),dollarBraceL:new $s("${",{beforeExpr:true,startsExpr:true}),eq:new $s("=",{beforeExpr:true,isAssign:true}),assign:new $s("_=",{beforeExpr:true,isAssign:true}),incDec:new $s("++/--",{prefix:true,postfix:true,startsExpr:true}),prefix:new $s("!/~",{beforeExpr:true,prefix:true,startsExpr:true}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=/===/!==",6),relational:binop("</>/<=/>=",7),bitShift:binop("<</>>/>>>",8),plusMin:new $s("+/-",{beforeExpr:true,binop:9,prefix:true,startsExpr:true}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10),starstar:new $s("**",{beforeExpr:true}),coalesce:binop("??",1),_break:kw("break"),_case:kw("case",Os),_catch:kw("catch"),_continue:kw("continue"),_debugger:kw("debugger"),_default:kw("default",Os),_do:kw("do",{isLoop:true,beforeExpr:true}),_else:kw("else",Os),_finally:kw("finally"),_for:kw("for",{isLoop:true}),_function:kw("function",Ds),_if:kw("if"),_return:kw("return",Os),_switch:kw("switch"),_throw:kw("throw",Os),_try:kw("try"),_var:kw("var"),_const:kw("const"),_while:kw("while",{isLoop:true}),_with:kw("with"),_new:kw("new",{beforeExpr:true,startsExpr:true}),_this:kw("this",Ds),_super:kw("super",Ds),_class:kw("class",Ds),_extends:kw("extends",Os),_export:kw("export"),_import:kw("import",Ds),_null:kw("null",Ds),_true:kw("true",Ds),_false:kw("false",Ds),_in:kw("in",{beforeExpr:true,binop:7}),_instanceof:kw("instanceof",{beforeExpr:true,binop:7}),_typeof:kw("typeof",{beforeExpr:true,prefix:true,startsExpr:true}),_void:kw("void",{beforeExpr:true,prefix:true,startsExpr:true}),_delete:kw("delete",{beforeExpr:true,prefix:true,startsExpr:true})};var Fs=/\r\n?|\n|\u2028|\u2029/;var Vs=new RegExp(Fs.source,"g");function isNewLine(e){return e===10||e===13||e===8232||e===8233}function nextLineBreak(e,t,i){if(i===void 0)i=e.length;for(var s=t;s<i;s++){var n=e.charCodeAt(s);if(isNewLine(n)){return s<i-1&&n===13&&e.charCodeAt(s+1)===10?s+2:s+1}}return-1}var Bs=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;var zs=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;var Us=Object.prototype;var Hs=Us.hasOwnProperty;var js=Us.toString;var Gs=Object.hasOwn||function(e,t){return Hs.call(e,t)};var Ws=Array.isArray||function(e){return js.call(e)==="[object Array]"};function wordsRegexp(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}function codePointToString(e){if(e<=65535){return String.fromCharCode(e)}e-=65536;return String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var qs=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;var Ks=function Position(e,t){this.line=e;this.column=t};Ks.prototype.offset=function offset(e){return new Ks(this.line,this.column+e)};var Ys=function SourceLocation(e,t,i){this.start=t;this.end=i;if(e.sourceFile!==null){this.source=e.sourceFile}};function getLineInfo(e,t){for(var i=1,s=0;;){var n=nextLineBreak(e,s,t);if(n<0){return new Ks(i,t-s)}++i;s=n}}var Xs={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:false,allowImportExportEverywhere:false,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:false,locations:false,onToken:null,onComment:null,ranges:false,program:null,sourceFile:null,directSourceFile:null,preserveParens:false};var Qs=false;function getOptions(e){var t={};for(var i in Xs){t[i]=e&&Gs(e,i)?e[i]:Xs[i]}if(t.ecmaVersion==="latest"){t.ecmaVersion=1e8}else if(t.ecmaVersion==null){if(!Qs&&typeof console==="object"&&console.warn){Qs=true;console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")}t.ecmaVersion=11}else if(t.ecmaVersion>=2015){t.ecmaVersion-=2009}if(t.allowReserved==null){t.allowReserved=t.ecmaVersion<5}if(Ws(t.onToken)){var s=t.onToken;t.onToken=function(e){return s.push(e)}}if(Ws(t.onComment)){t.onComment=pushComment(t,t.onComment)}return t}function pushComment(e,t){return function(i,s,n,r,o,l){var c={type:i?"Block":"Line",value:s,start:n,end:r};if(e.locations){c.loc=new Ys(this,o,l)}if(e.ranges){c.range=[n,r]}t.push(c)}}var Zs=1,Js=2,en=4,tn=8,sn=16,nn=32,rn=64,an=128,on=256,ln=Zs|Js|on;function functionFlags(e,t){return Js|(e?en:0)|(t?tn:0)}var cn=0,un=1,hn=2,dn=3,pn=4,fn=5;var mn=function Parser(e,t,i){this.options=e=getOptions(e);this.sourceFile=e.sourceFile;this.keywords=wordsRegexp(Ps[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var s="";if(e.allowReserved!==true){s=ks[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3];if(e.sourceType==="module"){s+=" await"}}this.reservedWords=wordsRegexp(s);var n=(s?s+" ":"")+ks.strict;this.reservedWordsStrict=wordsRegexp(n);this.reservedWordsStrictBind=wordsRegexp(n+" "+ks.strictBind);this.input=String(t);this.containsEsc=false;if(i){this.pos=i;this.lineStart=this.input.lastIndexOf("\n",i-1)+1;this.curLine=this.input.slice(0,this.lineStart).split(Fs).length}else{this.pos=this.lineStart=0;this.curLine=1}this.type=Ls.eof;this.value=null;this.start=this.end=this.pos;this.startLoc=this.endLoc=this.curPosition();this.lastTokEndLoc=this.lastTokStartLoc=null;this.lastTokStart=this.lastTokEnd=this.pos;this.context=this.initialContext();this.exprAllowed=true;this.inModule=e.sourceType==="module";this.strict=this.inModule||this.strictDirective(this.pos);this.potentialArrowAt=-1;this.potentialArrowInForAwait=false;this.yieldPos=this.awaitPos=this.awaitIdentPos=0;this.labels=[];this.undefinedExports=Object.create(null);if(this.pos===0&&e.allowHashBang&&this.input.slice(0,2)==="#!"){this.skipLineComment(2)}this.scopeStack=[];this.enterScope(Zs);this.regexpState=null;this.privateNameStack=[]};var gn={inFunction:{configurable:true},inGenerator:{configurable:true},inAsync:{configurable:true},canAwait:{configurable:true},allowSuper:{configurable:true},allowDirectSuper:{configurable:true},treatFunctionsAsVar:{configurable:true},allowNewDotTarget:{configurable:true},inClassStaticBlock:{configurable:true}};mn.prototype.parse=function parse(){var e=this.options.program||this.startNode();this.nextToken();return this.parseTopLevel(e)};gn.inFunction.get=function(){return(this.currentVarScope().flags&Js)>0};gn.inGenerator.get=function(){return(this.currentVarScope().flags&tn)>0&&!this.currentVarScope().inClassFieldInit};gn.inAsync.get=function(){return(this.currentVarScope().flags&en)>0&&!this.currentVarScope().inClassFieldInit};gn.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&on){return false}if(t.flags&Js){return(t.flags&en)>0}}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};gn.allowSuper.get=function(){var e=this.currentThisScope();var t=e.flags;var i=e.inClassFieldInit;return(t&rn)>0||i||this.options.allowSuperOutsideMethod};gn.allowDirectSuper.get=function(){return(this.currentThisScope().flags&an)>0};gn.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};gn.allowNewDotTarget.get=function(){var e=this.currentThisScope();var t=e.flags;var i=e.inClassFieldInit;return(t&(Js|on))>0||i};gn.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&on)>0};mn.extend=function extend(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];var i=this;for(var s=0;s<e.length;s++){i=e[s](i)}return i};mn.parse=function parse(e,t){return new this(t,e).parse()};mn.parseExpressionAt=function parseExpressionAt(e,t,i){var s=new this(i,e,t);s.nextToken();return s.parseExpression()};mn.tokenizer=function tokenizer(e,t){return new this(t,e)};Object.defineProperties(mn.prototype,gn);var yn=mn.prototype;var En=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;yn.strictDirective=function(e){if(this.options.ecmaVersion<5){return false}for(;;){zs.lastIndex=e;e+=zs.exec(this.input)[0].length;var t=En.exec(this.input.slice(e));if(!t){return false}if((t[1]||t[2])==="use strict"){zs.lastIndex=e+t[0].length;var i=zs.exec(this.input),s=i.index+i[0].length;var n=this.input.charAt(s);return n===";"||n==="}"||Fs.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||n==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length;zs.lastIndex=e;e+=zs.exec(this.input)[0].length;if(this.input[e]===";"){e++}}};yn.eat=function(e){if(this.type===e){this.next();return true}else{return false}};yn.isContextual=function(e){return this.type===Ls.name&&this.value===e&&!this.containsEsc};yn.eatContextual=function(e){if(!this.isContextual(e)){return false}this.next();return true};yn.expectContextual=function(e){if(!this.eatContextual(e)){this.unexpected()}};yn.canInsertSemicolon=function(){return this.type===Ls.eof||this.type===Ls.braceR||Fs.test(this.input.slice(this.lastTokEnd,this.start))};yn.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon){this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc)}return true}};yn.semicolon=function(){if(!this.eat(Ls.semi)&&!this.insertSemicolon()){this.unexpected()}};yn.afterTrailingComma=function(e,t){if(this.type===e){if(this.options.onTrailingComma){this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc)}if(!t){this.next()}return true}};yn.expect=function(e){this.eat(e)||this.unexpected()};yn.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var xn=function DestructuringErrors(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};yn.checkPatternErrors=function(e,t){if(!e){return}if(e.trailingComma>-1){this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element")}var i=t?e.parenthesizedAssign:e.parenthesizedBind;if(i>-1){this.raiseRecoverable(i,"Parenthesized pattern")}};yn.checkExpressionErrors=function(e,t){if(!e){return false}var i=e.shorthandAssign;var s=e.doubleProto;if(!t){return i>=0||s>=0}if(i>=0){this.raise(i,"Shorthand property assignments are valid only in destructuring patterns")}if(s>=0){this.raiseRecoverable(s,"Redefinition of __proto__ property")}};yn.checkYieldAwaitInDefaultParams=function(){if(this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)){this.raise(this.yieldPos,"Yield expression cannot be a default value")}if(this.awaitPos){this.raise(this.awaitPos,"Await expression cannot be a default value")}};yn.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression"){return this.isSimpleAssignTarget(e.expression)}return e.type==="Identifier"||e.type==="MemberExpression"};var vn=mn.prototype;vn.parseTopLevel=function(e){var t=Object.create(null);if(!e.body){e.body=[]}while(this.type!==Ls.eof){var i=this.parseStatement(null,true,t);e.body.push(i)}if(this.inModule){for(var s=0,n=Object.keys(this.undefinedExports);s<n.length;s+=1){var r=n[s];this.raiseRecoverable(this.undefinedExports[r].start,"Export '"+r+"' is not defined")}}this.adaptDirectivePrologue(e.body);this.next();e.sourceType=this.options.sourceType;return this.finishNode(e,"Program")};var bn={kind:"loop"},Sn={kind:"switch"};vn.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let")){return false}zs.lastIndex=this.pos;var t=zs.exec(this.input);var i=this.pos+t[0].length,s=this.input.charCodeAt(i);if(s===91||s===92||s>55295&&s<56320){return true}if(e){return false}if(s===123){return true}if(isIdentifierStart(s,true)){var n=i+1;while(isIdentifierChar(s=this.input.charCodeAt(n),true)){++n}if(s===92||s>55295&&s<56320){return true}var r=this.input.slice(i,n);if(!Ns.test(r)){return true}}return false};vn.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async")){return false}zs.lastIndex=this.pos;var e=zs.exec(this.input);var t=this.pos+e[0].length,i;return!Fs.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(isIdentifierChar(i=this.input.charCodeAt(t+8))||i>55295&&i<56320))};vn.parseStatement=function(e,t,i){var s=this.type,n=this.startNode(),r;if(this.isLet(e)){s=Ls._var;r="let"}switch(s){case Ls._break:case Ls._continue:return this.parseBreakContinueStatement(n,s.keyword);case Ls._debugger:return this.parseDebuggerStatement(n);case Ls._do:return this.parseDoStatement(n);case Ls._for:return this.parseForStatement(n);case Ls._function:if(e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6){this.unexpected()}return this.parseFunctionStatement(n,false,!e);case Ls._class:if(e){this.unexpected()}return this.parseClass(n,true);case Ls._if:return this.parseIfStatement(n);case Ls._return:return this.parseReturnStatement(n);case Ls._switch:return this.parseSwitchStatement(n);case Ls._throw:return this.parseThrowStatement(n);case Ls._try:return this.parseTryStatement(n);case Ls._const:case Ls._var:r=r||this.value;if(e&&r!=="var"){this.unexpected()}return this.parseVarStatement(n,r);case Ls._while:return this.parseWhileStatement(n);case Ls._with:return this.parseWithStatement(n);case Ls.braceL:return this.parseBlock(true,n);case Ls.semi:return this.parseEmptyStatement(n);case Ls._export:case Ls._import:if(this.options.ecmaVersion>10&&s===Ls._import){zs.lastIndex=this.pos;var o=zs.exec(this.input);var l=this.pos+o[0].length,c=this.input.charCodeAt(l);if(c===40||c===46){return this.parseExpressionStatement(n,this.parseExpression())}}if(!this.options.allowImportExportEverywhere){if(!t){this.raise(this.start,"'import' and 'export' may only appear at the top level")}if(!this.inModule){this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}}return s===Ls._import?this.parseImport(n):this.parseExport(n,i);default:if(this.isAsyncFunction()){if(e){this.unexpected()}this.next();return this.parseFunctionStatement(n,true,!e)}var u=this.value,h=this.parseExpression();if(s===Ls.name&&h.type==="Identifier"&&this.eat(Ls.colon)){return this.parseLabeledStatement(n,u,h,e)}else{return this.parseExpressionStatement(n,h)}}};vn.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next();if(this.eat(Ls.semi)||this.insertSemicolon()){e.label=null}else if(this.type!==Ls.name){this.unexpected()}else{e.label=this.parseIdent();this.semicolon()}var s=0;for(;s<this.labels.length;++s){var n=this.labels[s];if(e.label==null||n.name===e.label.name){if(n.kind!=null&&(i||n.kind==="loop")){break}if(e.label&&i){break}}}if(s===this.labels.length){this.raise(e.start,"Unsyntactic "+t)}return this.finishNode(e,i?"BreakStatement":"ContinueStatement")};vn.parseDebuggerStatement=function(e){this.next();this.semicolon();return this.finishNode(e,"DebuggerStatement")};vn.parseDoStatement=function(e){this.next();this.labels.push(bn);e.body=this.parseStatement("do");this.labels.pop();this.expect(Ls._while);e.test=this.parseParenExpression();if(this.options.ecmaVersion>=6){this.eat(Ls.semi)}else{this.semicolon()}return this.finishNode(e,"DoWhileStatement")};vn.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;this.labels.push(bn);this.enterScope(0);this.expect(Ls.parenL);if(this.type===Ls.semi){if(t>-1){this.unexpected(t)}return this.parseFor(e,null)}var i=this.isLet();if(this.type===Ls._var||this.type===Ls._const||i){var s=this.startNode(),n=i?"let":this.value;this.next();this.parseVar(s,true,n);this.finishNode(s,"VariableDeclaration");if((this.type===Ls._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&s.declarations.length===1){if(this.options.ecmaVersion>=9){if(this.type===Ls._in){if(t>-1){this.unexpected(t)}}else{e.await=t>-1}}return this.parseForIn(e,s)}if(t>-1){this.unexpected(t)}return this.parseFor(e,s)}var r=this.isContextual("let"),o=false;var l=new xn;var c=this.parseExpression(t>-1?"await":true,l);if(this.type===Ls._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(this.options.ecmaVersion>=9){if(this.type===Ls._in){if(t>-1){this.unexpected(t)}}else{e.await=t>-1}}if(r&&o){this.raise(c.start,"The left-hand side of a for-of loop may not start with 'let'.")}this.toAssignable(c,false,l);this.checkLValPattern(c);return this.parseForIn(e,c)}else{this.checkExpressionErrors(l,true)}if(t>-1){this.unexpected(t)}return this.parseFor(e,c)};vn.parseFunctionStatement=function(e,t,i){this.next();return this.parseFunction(e,wn|(i?0:In),false,t)};vn.parseIfStatement=function(e){this.next();e.test=this.parseParenExpression();e.consequent=this.parseStatement("if");e.alternate=this.eat(Ls._else)?this.parseStatement("if"):null;return this.finishNode(e,"IfStatement")};vn.parseReturnStatement=function(e){if(!this.inFunction&&!this.options.allowReturnOutsideFunction){this.raise(this.start,"'return' outside of function")}this.next();if(this.eat(Ls.semi)||this.insertSemicolon()){e.argument=null}else{e.argument=this.parseExpression();this.semicolon()}return this.finishNode(e,"ReturnStatement")};vn.parseSwitchStatement=function(e){this.next();e.discriminant=this.parseParenExpression();e.cases=[];this.expect(Ls.braceL);this.labels.push(Sn);this.enterScope(0);var t;for(var i=false;this.type!==Ls.braceR;){if(this.type===Ls._case||this.type===Ls._default){var s=this.type===Ls._case;if(t){this.finishNode(t,"SwitchCase")}e.cases.push(t=this.startNode());t.consequent=[];this.next();if(s){t.test=this.parseExpression()}else{if(i){this.raiseRecoverable(this.lastTokStart,"Multiple default clauses")}i=true;t.test=null}this.expect(Ls.colon)}else{if(!t){this.unexpected()}t.consequent.push(this.parseStatement(null))}}this.exitScope();if(t){this.finishNode(t,"SwitchCase")}this.next();this.labels.pop();return this.finishNode(e,"SwitchStatement")};vn.parseThrowStatement=function(e){this.next();if(Fs.test(this.input.slice(this.lastTokEnd,this.start))){this.raise(this.lastTokEnd,"Illegal newline after throw")}e.argument=this.parseExpression();this.semicolon();return this.finishNode(e,"ThrowStatement")};var An=[];vn.parseTryStatement=function(e){this.next();e.block=this.parseBlock();e.handler=null;if(this.type===Ls._catch){var t=this.startNode();this.next();if(this.eat(Ls.parenL)){t.param=this.parseBindingAtom();var i=t.param.type==="Identifier";this.enterScope(i?nn:0);this.checkLValPattern(t.param,i?pn:hn);this.expect(Ls.parenR)}else{if(this.options.ecmaVersion<10){this.unexpected()}t.param=null;this.enterScope(0)}t.body=this.parseBlock(false);this.exitScope();e.handler=this.finishNode(t,"CatchClause")}e.finalizer=this.eat(Ls._finally)?this.parseBlock():null;if(!e.handler&&!e.finalizer){this.raise(e.start,"Missing catch or finally clause")}return this.finishNode(e,"TryStatement")};vn.parseVarStatement=function(e,t){this.next();this.parseVar(e,false,t);this.semicolon();return this.finishNode(e,"VariableDeclaration")};vn.parseWhileStatement=function(e){this.next();e.test=this.parseParenExpression();this.labels.push(bn);e.body=this.parseStatement("while");this.labels.pop();return this.finishNode(e,"WhileStatement")};vn.parseWithStatement=function(e){if(this.strict){this.raise(this.start,"'with' in strict mode")}this.next();e.object=this.parseParenExpression();e.body=this.parseStatement("with");return this.finishNode(e,"WithStatement")};vn.parseEmptyStatement=function(e){this.next();return this.finishNode(e,"EmptyStatement")};vn.parseLabeledStatement=function(e,t,i,s){for(var n=0,r=this.labels;n<r.length;n+=1){var o=r[n];if(o.name===t){this.raise(i.start,"Label '"+t+"' is already declared")}}var l=this.type.isLoop?"loop":this.type===Ls._switch?"switch":null;for(var c=this.labels.length-1;c>=0;c--){var u=this.labels[c];if(u.statementStart===e.start){u.statementStart=this.start;u.kind=l}else{break}}this.labels.push({name:t,kind:l,statementStart:this.start});e.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label");this.labels.pop();e.label=i;return this.finishNode(e,"LabeledStatement")};vn.parseExpressionStatement=function(e,t){e.expression=t;this.semicolon();return this.finishNode(e,"ExpressionStatement")};vn.parseBlock=function(e,t,i){if(e===void 0)e=true;if(t===void 0)t=this.startNode();t.body=[];this.expect(Ls.braceL);if(e){this.enterScope(0)}while(this.type!==Ls.braceR){var s=this.parseStatement(null);t.body.push(s)}if(i){this.strict=false}this.next();if(e){this.exitScope()}return this.finishNode(t,"BlockStatement")};vn.parseFor=function(e,t){e.init=t;this.expect(Ls.semi);e.test=this.type===Ls.semi?null:this.parseExpression();this.expect(Ls.semi);e.update=this.type===Ls.parenR?null:this.parseExpression();this.expect(Ls.parenR);e.body=this.parseStatement("for");this.exitScope();this.labels.pop();return this.finishNode(e,"ForStatement")};vn.parseForIn=function(e,t){var i=this.type===Ls._in;this.next();if(t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")){this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer")}e.left=t;e.right=i?this.parseExpression():this.parseMaybeAssign();this.expect(Ls.parenR);e.body=this.parseStatement("for");this.exitScope();this.labels.pop();return this.finishNode(e,i?"ForInStatement":"ForOfStatement")};vn.parseVar=function(e,t,i){e.declarations=[];e.kind=i;for(;;){var s=this.startNode();this.parseVarId(s,i);if(this.eat(Ls.eq)){s.init=this.parseMaybeAssign(t)}else if(i==="const"&&!(this.type===Ls._in||this.options.ecmaVersion>=6&&this.isContextual("of"))){this.unexpected()}else if(s.id.type!=="Identifier"&&!(t&&(this.type===Ls._in||this.isContextual("of")))){this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value")}else{s.init=null}e.declarations.push(this.finishNode(s,"VariableDeclarator"));if(!this.eat(Ls.comma)){break}}return e};vn.parseVarId=function(e,t){e.id=this.parseBindingAtom();this.checkLValPattern(e.id,t==="var"?un:hn,false)};var wn=1,In=2,Cn=4;vn.parseFunction=function(e,t,i,s,n){this.initFunction(e);if(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s){if(this.type===Ls.star&&t&In){this.unexpected()}e.generator=this.eat(Ls.star)}if(this.options.ecmaVersion>=8){e.async=!!s}if(t&wn){e.id=t&Cn&&this.type!==Ls.name?null:this.parseIdent();if(e.id&&!(t&In)){this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?un:hn:dn)}}var r=this.yieldPos,o=this.awaitPos,l=this.awaitIdentPos;this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;this.enterScope(functionFlags(e.async,e.generator));if(!(t&wn)){e.id=this.type===Ls.name?this.parseIdent():null}this.parseFunctionParams(e);this.parseFunctionBody(e,i,false,n);this.yieldPos=r;this.awaitPos=o;this.awaitIdentPos=l;return this.finishNode(e,t&wn?"FunctionDeclaration":"FunctionExpression")};vn.parseFunctionParams=function(e){this.expect(Ls.parenL);e.params=this.parseBindingList(Ls.parenR,false,this.options.ecmaVersion>=8);this.checkYieldAwaitInDefaultParams()};vn.parseClass=function(e,t){this.next();var i=this.strict;this.strict=true;this.parseClassId(e,t);this.parseClassSuper(e);var s=this.enterClassBody();var n=this.startNode();var r=false;n.body=[];this.expect(Ls.braceL);while(this.type!==Ls.braceR){var o=this.parseClassElement(e.superClass!==null);if(o){n.body.push(o);if(o.type==="MethodDefinition"&&o.kind==="constructor"){if(r){this.raise(o.start,"Duplicate constructor in the same class")}r=true}else if(o.key&&o.key.type==="PrivateIdentifier"&&isPrivateNameConflicted(s,o)){this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared")}}}this.strict=i;this.next();e.body=this.finishNode(n,"ClassBody");this.exitClassBody();return this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};vn.parseClassElement=function(e){if(this.eat(Ls.semi)){return null}var t=this.options.ecmaVersion;var i=this.startNode();var s="";var n=false;var r=false;var o="method";var l=false;if(this.eatContextual("static")){if(t>=13&&this.eat(Ls.braceL)){this.parseClassStaticBlock(i);return i}if(this.isClassElementNameStart()||this.type===Ls.star){l=true}else{s="static"}}i.static=l;if(!s&&t>=8&&this.eatContextual("async")){if((this.isClassElementNameStart()||this.type===Ls.star)&&!this.canInsertSemicolon()){r=true}else{s="async"}}if(!s&&(t>=9||!r)&&this.eat(Ls.star)){n=true}if(!s&&!r&&!n){var c=this.value;if(this.eatContextual("get")||this.eatContextual("set")){if(this.isClassElementNameStart()){o=c}else{s=c}}}if(s){i.computed=false;i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc);i.key.name=s;this.finishNode(i.key,"Identifier")}else{this.parseClassElementName(i)}if(t<13||this.type===Ls.parenL||o!=="method"||n||r){var u=!i.static&&checkKeyName(i,"constructor");var h=u&&e;if(u&&o!=="method"){this.raise(i.key.start,"Constructor can't have get/set modifier")}i.kind=u?"constructor":o;this.parseClassMethod(i,n,r,h)}else{this.parseClassField(i)}return i};vn.isClassElementNameStart=function(){return this.type===Ls.name||this.type===Ls.privateId||this.type===Ls.num||this.type===Ls.string||this.type===Ls.bracketL||this.type.keyword};vn.parseClassElementName=function(e){if(this.type===Ls.privateId){if(this.value==="constructor"){this.raise(this.start,"Classes can't have an element named '#constructor'")}e.computed=false;e.key=this.parsePrivateIdent()}else{this.parsePropertyName(e)}};vn.parseClassMethod=function(e,t,i,s){var n=e.key;if(e.kind==="constructor"){if(t){this.raise(n.start,"Constructor can't be a generator")}if(i){this.raise(n.start,"Constructor can't be an async method")}}else if(e.static&&checkKeyName(e,"prototype")){this.raise(n.start,"Classes may not have a static property named prototype")}var r=e.value=this.parseMethod(t,i,s);if(e.kind==="get"&&r.params.length!==0){this.raiseRecoverable(r.start,"getter should have no params")}if(e.kind==="set"&&r.params.length!==1){this.raiseRecoverable(r.start,"setter should have exactly one param")}if(e.kind==="set"&&r.params[0].type==="RestElement"){this.raiseRecoverable(r.params[0].start,"Setter cannot use rest params")}return this.finishNode(e,"MethodDefinition")};vn.parseClassField=function(e){if(checkKeyName(e,"constructor")){this.raise(e.key.start,"Classes can't have a field named 'constructor'")}else if(e.static&&checkKeyName(e,"prototype")){this.raise(e.key.start,"Classes can't have a static field named 'prototype'")}if(this.eat(Ls.eq)){var t=this.currentThisScope();var i=t.inClassFieldInit;t.inClassFieldInit=true;e.value=this.parseMaybeAssign();t.inClassFieldInit=i}else{e.value=null}this.semicolon();return this.finishNode(e,"PropertyDefinition")};vn.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;this.labels=[];this.enterScope(on|rn);while(this.type!==Ls.braceR){var i=this.parseStatement(null);e.body.push(i)}this.next();this.exitScope();this.labels=t;return this.finishNode(e,"StaticBlock")};vn.parseClassId=function(e,t){if(this.type===Ls.name){e.id=this.parseIdent();if(t){this.checkLValSimple(e.id,hn,false)}}else{if(t===true){this.unexpected()}e.id=null}};vn.parseClassSuper=function(e){e.superClass=this.eat(Ls._extends)?this.parseExprSubscripts(false):null};vn.enterClassBody=function(){var e={declared:Object.create(null),used:[]};this.privateNameStack.push(e);return e.declared};vn.exitClassBody=function(){var e=this.privateNameStack.pop();var t=e.declared;var i=e.used;var s=this.privateNameStack.length;var n=s===0?null:this.privateNameStack[s-1];for(var r=0;r<i.length;++r){var o=i[r];if(!Gs(t,o.name)){if(n){n.used.push(o)}else{this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class")}}}};function isPrivateNameConflicted(e,t){var i=t.key.name;var s=e[i];var n="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")){n=(t.static?"s":"i")+t.kind}if(s==="iget"&&n==="iset"||s==="iset"&&n==="iget"||s==="sget"&&n==="sset"||s==="sset"&&n==="sget"){e[i]="true";return false}else if(!s){e[i]=n;return false}else{return true}}function checkKeyName(e,t){var i=e.computed;var s=e.key;return!i&&(s.type==="Identifier"&&s.name===t||s.type==="Literal"&&s.value===t)}vn.parseExport=function(e,t){this.next();if(this.eat(Ls.star)){if(this.options.ecmaVersion>=11){if(this.eatContextual("as")){e.exported=this.parseModuleExportName();this.checkExport(t,e.exported,this.lastTokStart)}else{e.exported=null}}this.expectContextual("from");if(this.type!==Ls.string){this.unexpected()}e.source=this.parseExprAtom();this.semicolon();return this.finishNode(e,"ExportAllDeclaration")}if(this.eat(Ls._default)){this.checkExport(t,"default",this.lastTokStart);var i;if(this.type===Ls._function||(i=this.isAsyncFunction())){var s=this.startNode();this.next();if(i){this.next()}e.declaration=this.parseFunction(s,wn|Cn,false,i)}else if(this.type===Ls._class){var n=this.startNode();e.declaration=this.parseClass(n,"nullableID")}else{e.declaration=this.parseMaybeAssign();this.semicolon()}return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement()){e.declaration=this.parseStatement(null);if(e.declaration.type==="VariableDeclaration"){this.checkVariableExport(t,e.declaration.declarations)}else{this.checkExport(t,e.declaration.id,e.declaration.id.start)}e.specifiers=[];e.source=null}else{e.declaration=null;e.specifiers=this.parseExportSpecifiers(t);if(this.eatContextual("from")){if(this.type!==Ls.string){this.unexpected()}e.source=this.parseExprAtom()}else{for(var r=0,o=e.specifiers;r<o.length;r+=1){var l=o[r];this.checkUnreserved(l.local);this.checkLocalExport(l.local);if(l.local.type==="Literal"){this.raise(l.local.start,"A string literal cannot be used as an exported binding without `from`.")}}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};vn.checkExport=function(e,t,i){if(!e){return}if(typeof t!=="string"){t=t.type==="Identifier"?t.name:t.value}if(Gs(e,t)){this.raiseRecoverable(i,"Duplicate export '"+t+"'")}e[t]=true};vn.checkPatternExport=function(e,t){var i=t.type;if(i==="Identifier"){this.checkExport(e,t,t.start)}else if(i==="ObjectPattern"){for(var s=0,n=t.properties;s<n.length;s+=1){var r=n[s];this.checkPatternExport(e,r)}}else if(i==="ArrayPattern"){for(var o=0,l=t.elements;o<l.length;o+=1){var c=l[o];if(c){this.checkPatternExport(e,c)}}}else if(i==="Property"){this.checkPatternExport(e,t.value)}else if(i==="AssignmentPattern"){this.checkPatternExport(e,t.left)}else if(i==="RestElement"){this.checkPatternExport(e,t.argument)}else if(i==="ParenthesizedExpression"){this.checkPatternExport(e,t.expression)}};vn.checkVariableExport=function(e,t){if(!e){return}for(var i=0,s=t;i<s.length;i+=1){var n=s[i];this.checkPatternExport(e,n.id)}};vn.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};vn.parseExportSpecifiers=function(e){var t=[],i=true;this.expect(Ls.braceL);while(!this.eat(Ls.braceR)){if(!i){this.expect(Ls.comma);if(this.afterTrailingComma(Ls.braceR)){break}}else{i=false}var s=this.startNode();s.local=this.parseModuleExportName();s.exported=this.eatContextual("as")?this.parseModuleExportName():s.local;this.checkExport(e,s.exported,s.exported.start);t.push(this.finishNode(s,"ExportSpecifier"))}return t};vn.parseImport=function(e){this.next();if(this.type===Ls.string){e.specifiers=An;e.source=this.parseExprAtom()}else{e.specifiers=this.parseImportSpecifiers();this.expectContextual("from");e.source=this.type===Ls.string?this.parseExprAtom():this.unexpected()}this.semicolon();return this.finishNode(e,"ImportDeclaration")};vn.parseImportSpecifiers=function(){var e=[],t=true;if(this.type===Ls.name){var i=this.startNode();i.local=this.parseIdent();this.checkLValSimple(i.local,hn);e.push(this.finishNode(i,"ImportDefaultSpecifier"));if(!this.eat(Ls.comma)){return e}}if(this.type===Ls.star){var s=this.startNode();this.next();this.expectContextual("as");s.local=this.parseIdent();this.checkLValSimple(s.local,hn);e.push(this.finishNode(s,"ImportNamespaceSpecifier"));return e}this.expect(Ls.braceL);while(!this.eat(Ls.braceR)){if(!t){this.expect(Ls.comma);if(this.afterTrailingComma(Ls.braceR)){break}}else{t=false}var n=this.startNode();n.imported=this.parseModuleExportName();if(this.eatContextual("as")){n.local=this.parseIdent()}else{this.checkUnreserved(n.imported);n.local=n.imported}this.checkLValSimple(n.local,hn);e.push(this.finishNode(n,"ImportSpecifier"))}return e};vn.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===Ls.string){var e=this.parseLiteral(this.value);if(qs.test(e.value)){this.raise(e.start,"An export name cannot include a lone surrogate.")}return e}return this.parseIdent(true)};vn.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t){e[t].directive=e[t].expression.raw.slice(1,-1)}};vn.isDirectiveCandidate=function(e){return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value==="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var kn=mn.prototype;kn.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e){switch(e.type){case"Identifier":if(this.inAsync&&e.name==="await"){this.raise(e.start,"Cannot use 'await' as identifier inside an async function")}break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";if(i){this.checkPatternErrors(i,true)}for(var s=0,n=e.properties;s<n.length;s+=1){var r=n[s];this.toAssignable(r,t);if(r.type==="RestElement"&&(r.argument.type==="ArrayPattern"||r.argument.type==="ObjectPattern")){this.raise(r.argument.start,"Unexpected token")}}break;case"Property":if(e.kind!=="init"){this.raise(e.key.start,"Object pattern can't contain getter or setter")}this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern";if(i){this.checkPatternErrors(i,true)}this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement";this.toAssignable(e.argument,t);if(e.argument.type==="AssignmentPattern"){this.raise(e.argument.start,"Rest elements cannot have a default value")}break;case"AssignmentExpression":if(e.operator!=="="){this.raise(e.left.end,"Only '=' operator can be used for specifying default value.")}e.type="AssignmentPattern";delete e.operator;this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,i);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t){break}default:this.raise(e.start,"Assigning to rvalue")}}else if(i){this.checkPatternErrors(i,true)}return e};kn.toAssignableList=function(e,t){var i=e.length;for(var s=0;s<i;s++){var n=e[s];if(n){this.toAssignable(n,t)}}if(i){var r=e[i-1];if(this.options.ecmaVersion===6&&t&&r&&r.type==="RestElement"&&r.argument.type!=="Identifier"){this.unexpected(r.argument.start)}}return e};kn.parseSpread=function(e){var t=this.startNode();this.next();t.argument=this.parseMaybeAssign(false,e);return this.finishNode(t,"SpreadElement")};kn.parseRestBinding=function(){var e=this.startNode();this.next();if(this.options.ecmaVersion===6&&this.type!==Ls.name){this.unexpected()}e.argument=this.parseBindingAtom();return this.finishNode(e,"RestElement")};kn.parseBindingAtom=function(){if(this.options.ecmaVersion>=6){switch(this.type){case Ls.bracketL:var e=this.startNode();this.next();e.elements=this.parseBindingList(Ls.bracketR,true,true);return this.finishNode(e,"ArrayPattern");case Ls.braceL:return this.parseObj(true)}}return this.parseIdent()};kn.parseBindingList=function(e,t,i){var s=[],n=true;while(!this.eat(e)){if(n){n=false}else{this.expect(Ls.comma)}if(t&&this.type===Ls.comma){s.push(null)}else if(i&&this.afterTrailingComma(e)){break}else if(this.type===Ls.ellipsis){var r=this.parseRestBinding();this.parseBindingListItem(r);s.push(r);if(this.type===Ls.comma){this.raise(this.start,"Comma is not permitted after the rest element")}this.expect(e);break}else{var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o);s.push(o)}}return s};kn.parseBindingListItem=function(e){return e};kn.parseMaybeDefault=function(e,t,i){i=i||this.parseBindingAtom();if(this.options.ecmaVersion<6||!this.eat(Ls.eq)){return i}var s=this.startNodeAt(e,t);s.left=i;s.right=this.parseMaybeAssign();return this.finishNode(s,"AssignmentPattern")};kn.checkLValSimple=function(e,t,i){if(t===void 0)t=cn;var s=t!==cn;switch(e.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(e.name)){this.raiseRecoverable(e.start,(s?"Binding ":"Assigning to ")+e.name+" in strict mode")}if(s){if(t===hn&&e.name==="let"){this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name")}if(i){if(Gs(i,e.name)){this.raiseRecoverable(e.start,"Argument name clash")}i[e.name]=true}if(t!==fn){this.declareName(e.name,t,e.start)}}break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(s){this.raiseRecoverable(e.start,"Binding member expression")}break;case"ParenthesizedExpression":if(s){this.raiseRecoverable(e.start,"Binding parenthesized expression")}return this.checkLValSimple(e.expression,t,i);default:this.raise(e.start,(s?"Binding":"Assigning to")+" rvalue")}};kn.checkLValPattern=function(e,t,i){if(t===void 0)t=cn;switch(e.type){case"ObjectPattern":for(var s=0,n=e.properties;s<n.length;s+=1){var r=n[s];this.checkLValInnerPattern(r,t,i)}break;case"ArrayPattern":for(var o=0,l=e.elements;o<l.length;o+=1){var c=l[o];if(c){this.checkLValInnerPattern(c,t,i)}}break;default:this.checkLValSimple(e,t,i)}};kn.checkLValInnerPattern=function(e,t,i){if(t===void 0)t=cn;switch(e.type){case"Property":this.checkLValInnerPattern(e.value,t,i);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,i);break;case"RestElement":this.checkLValPattern(e.argument,t,i);break;default:this.checkLValPattern(e,t,i)}};var _n=function TokContext(e,t,i,s,n){this.token=e;this.isExpr=!!t;this.preserveSpace=!!i;this.override=s;this.generator=!!n};var Pn={b_stat:new _n("{",false),b_expr:new _n("{",true),b_tmpl:new _n("${",false),p_stat:new _n("(",false),p_expr:new _n("(",true),q_tmpl:new _n("`",true,true,(function(e){return e.tryReadTemplateToken()})),f_stat:new _n("function",false),f_expr:new _n("function",true),f_expr_gen:new _n("function",true,false,null,true),f_gen:new _n("function",false,false,null,true)};var Nn=mn.prototype;Nn.initialContext=function(){return[Pn.b_stat]};Nn.curContext=function(){return this.context[this.context.length-1]};Nn.braceIsBlock=function(e){var t=this.curContext();if(t===Pn.f_expr||t===Pn.f_stat){return true}if(e===Ls.colon&&(t===Pn.b_stat||t===Pn.b_expr)){return!t.isExpr}if(e===Ls._return||e===Ls.name&&this.exprAllowed){return Fs.test(this.input.slice(this.lastTokEnd,this.start))}if(e===Ls._else||e===Ls.semi||e===Ls.eof||e===Ls.parenR||e===Ls.arrow){return true}if(e===Ls.braceL){return t===Pn.b_stat}if(e===Ls._var||e===Ls._const||e===Ls.name){return false}return!this.exprAllowed};Nn.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function"){return t.generator}}return false};Nn.updateContext=function(e){var t,i=this.type;if(i.keyword&&e===Ls.dot){this.exprAllowed=false}else if(t=i.updateContext){t.call(this,e)}else{this.exprAllowed=i.beforeExpr}};Nn.overrideContext=function(e){if(this.curContext()!==e){this.context[this.context.length-1]=e}};Ls.parenR.updateContext=Ls.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=true;return}var e=this.context.pop();if(e===Pn.b_stat&&this.curContext().token==="function"){e=this.context.pop()}this.exprAllowed=!e.isExpr};Ls.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?Pn.b_stat:Pn.b_expr);this.exprAllowed=true};Ls.dollarBraceL.updateContext=function(){this.context.push(Pn.b_tmpl);this.exprAllowed=true};Ls.parenL.updateContext=function(e){var t=e===Ls._if||e===Ls._for||e===Ls._with||e===Ls._while;this.context.push(t?Pn.p_stat:Pn.p_expr);this.exprAllowed=true};Ls.incDec.updateContext=function(){};Ls._function.updateContext=Ls._class.updateContext=function(e){if(e.beforeExpr&&e!==Ls._else&&!(e===Ls.semi&&this.curContext()!==Pn.p_stat)&&!(e===Ls._return&&Fs.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===Ls.colon||e===Ls.braceL)&&this.curContext()===Pn.b_stat)){this.context.push(Pn.f_expr)}else{this.context.push(Pn.f_stat)}this.exprAllowed=false};Ls.backQuote.updateContext=function(){if(this.curContext()===Pn.q_tmpl){this.context.pop()}else{this.context.push(Pn.q_tmpl)}this.exprAllowed=false};Ls.star.updateContext=function(e){if(e===Ls._function){var t=this.context.length-1;if(this.context[t]===Pn.f_expr){this.context[t]=Pn.f_expr_gen}else{this.context[t]=Pn.f_gen}}this.exprAllowed=true};Ls.name.updateContext=function(e){var t=false;if(this.options.ecmaVersion>=6&&e!==Ls.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext()){t=true}}this.exprAllowed=t};var Rn=mn.prototype;Rn.checkPropClash=function(e,t,i){if(this.options.ecmaVersion>=9&&e.type==="SpreadElement"){return}if(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand)){return}var s=e.key;var n;switch(s.type){case"Identifier":n=s.name;break;case"Literal":n=String(s.value);break;default:return}var r=e.kind;if(this.options.ecmaVersion>=6){if(n==="__proto__"&&r==="init"){if(t.proto){if(i){if(i.doubleProto<0){i.doubleProto=s.start}}else{this.raiseRecoverable(s.start,"Redefinition of __proto__ property")}}t.proto=true}return}n="$"+n;var o=t[n];if(o){var l;if(r==="init"){l=this.strict&&o.init||o.get||o.set}else{l=o.init||o[r]}if(l){this.raiseRecoverable(s.start,"Redefinition of property")}}else{o=t[n]={init:false,get:false,set:false}}o[r]=true};Rn.parseExpression=function(e,t){var i=this.start,s=this.startLoc;var n=this.parseMaybeAssign(e,t);if(this.type===Ls.comma){var r=this.startNodeAt(i,s);r.expressions=[n];while(this.eat(Ls.comma)){r.expressions.push(this.parseMaybeAssign(e,t))}return this.finishNode(r,"SequenceExpression")}return n};Rn.parseMaybeAssign=function(e,t,i){if(this.isContextual("yield")){if(this.inGenerator){return this.parseYield(e)}else{this.exprAllowed=false}}var s=false,n=-1,r=-1,o=-1;if(t){n=t.parenthesizedAssign;r=t.trailingComma;o=t.doubleProto;t.parenthesizedAssign=t.trailingComma=-1}else{t=new xn;s=true}var l=this.start,c=this.startLoc;if(this.type===Ls.parenL||this.type===Ls.name){this.potentialArrowAt=this.start;this.potentialArrowInForAwait=e==="await"}var u=this.parseMaybeConditional(e,t);if(i){u=i.call(this,u,l,c)}if(this.type.isAssign){var h=this.startNodeAt(l,c);h.operator=this.value;if(this.type===Ls.eq){u=this.toAssignable(u,false,t)}if(!s){t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1}if(t.shorthandAssign>=u.start){t.shorthandAssign=-1}if(this.type===Ls.eq){this.checkLValPattern(u)}else{this.checkLValSimple(u)}h.left=u;this.next();h.right=this.parseMaybeAssign(e);if(o>-1){t.doubleProto=o}return this.finishNode(h,"AssignmentExpression")}else{if(s){this.checkExpressionErrors(t,true)}}if(n>-1){t.parenthesizedAssign=n}if(r>-1){t.trailingComma=r}return u};Rn.parseMaybeConditional=function(e,t){var i=this.start,s=this.startLoc;var n=this.parseExprOps(e,t);if(this.checkExpressionErrors(t)){return n}if(this.eat(Ls.question)){var r=this.startNodeAt(i,s);r.test=n;r.consequent=this.parseMaybeAssign();this.expect(Ls.colon);r.alternate=this.parseMaybeAssign(e);return this.finishNode(r,"ConditionalExpression")}return n};Rn.parseExprOps=function(e,t){var i=this.start,s=this.startLoc;var n=this.parseMaybeUnary(t,false,false,e);if(this.checkExpressionErrors(t)){return n}return n.start===i&&n.type==="ArrowFunctionExpression"?n:this.parseExprOp(n,i,s,-1,e)};Rn.parseExprOp=function(e,t,i,s,n){var r=this.type.binop;if(r!=null&&(!n||this.type!==Ls._in)){if(r>s){var o=this.type===Ls.logicalOR||this.type===Ls.logicalAND;var l=this.type===Ls.coalesce;if(l){r=Ls.logicalAND.binop}var c=this.value;this.next();var u=this.start,h=this.startLoc;var d=this.parseExprOp(this.parseMaybeUnary(null,false,false,n),u,h,r,n);var p=this.buildBinary(t,i,e,d,c,o||l);if(o&&this.type===Ls.coalesce||l&&(this.type===Ls.logicalOR||this.type===Ls.logicalAND)){this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses")}return this.parseExprOp(p,t,i,s,n)}}return e};Rn.buildBinary=function(e,t,i,s,n,r){if(s.type==="PrivateIdentifier"){this.raise(s.start,"Private identifier can only be left side of binary expression")}var o=this.startNodeAt(e,t);o.left=i;o.operator=n;o.right=s;return this.finishNode(o,r?"LogicalExpression":"BinaryExpression")};Rn.parseMaybeUnary=function(e,t,i,s){var n=this.start,r=this.startLoc,o;if(this.isContextual("await")&&this.canAwait){o=this.parseAwait(s);t=true}else if(this.type.prefix){var l=this.startNode(),c=this.type===Ls.incDec;l.operator=this.value;l.prefix=true;this.next();l.argument=this.parseMaybeUnary(null,true,c,s);this.checkExpressionErrors(e,true);if(c){this.checkLValSimple(l.argument)}else if(this.strict&&l.operator==="delete"&&l.argument.type==="Identifier"){this.raiseRecoverable(l.start,"Deleting local variable in strict mode")}else if(l.operator==="delete"&&isPrivateFieldAccess(l.argument)){this.raiseRecoverable(l.start,"Private fields can not be deleted")}else{t=true}o=this.finishNode(l,c?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===Ls.privateId){if(s||this.privateNameStack.length===0){this.unexpected()}o=this.parsePrivateIdent();if(this.type!==Ls._in){this.unexpected()}}else{o=this.parseExprSubscripts(e,s);if(this.checkExpressionErrors(e)){return o}while(this.type.postfix&&!this.canInsertSemicolon()){var u=this.startNodeAt(n,r);u.operator=this.value;u.prefix=false;u.argument=o;this.checkLValSimple(o);this.next();o=this.finishNode(u,"UpdateExpression")}}if(!i&&this.eat(Ls.starstar)){if(t){this.unexpected(this.lastTokStart)}else{return this.buildBinary(n,r,o,this.parseMaybeUnary(null,false,false,s),"**",false)}}else{return o}};function isPrivateFieldAccess(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&isPrivateFieldAccess(e.expression)}Rn.parseExprSubscripts=function(e,t){var i=this.start,s=this.startLoc;var n=this.parseExprAtom(e,t);if(n.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")"){return n}var r=this.parseSubscripts(n,i,s,false,t);if(e&&r.type==="MemberExpression"){if(e.parenthesizedAssign>=r.start){e.parenthesizedAssign=-1}if(e.parenthesizedBind>=r.start){e.parenthesizedBind=-1}if(e.trailingComma>=r.start){e.trailingComma=-1}}return r};Rn.parseSubscripts=function(e,t,i,s,n){var r=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start;var o=false;while(true){var l=this.parseSubscript(e,t,i,s,r,o,n);if(l.optional){o=true}if(l===e||l.type==="ArrowFunctionExpression"){if(o){var c=this.startNodeAt(t,i);c.expression=l;l=this.finishNode(c,"ChainExpression")}return l}e=l}};Rn.parseSubscript=function(e,t,i,s,n,r,o){var l=this.options.ecmaVersion>=11;var c=l&&this.eat(Ls.questionDot);if(s&&c){this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions")}var u=this.eat(Ls.bracketL);if(u||c&&this.type!==Ls.parenL&&this.type!==Ls.backQuote||this.eat(Ls.dot)){var h=this.startNodeAt(t,i);h.object=e;if(u){h.property=this.parseExpression();this.expect(Ls.bracketR)}else if(this.type===Ls.privateId&&e.type!=="Super"){h.property=this.parsePrivateIdent()}else{h.property=this.parseIdent(this.options.allowReserved!=="never")}h.computed=!!u;if(l){h.optional=c}e=this.finishNode(h,"MemberExpression")}else if(!s&&this.eat(Ls.parenL)){var d=new xn,p=this.yieldPos,f=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;var g=this.parseExprList(Ls.parenR,this.options.ecmaVersion>=8,false,d);if(n&&!c&&!this.canInsertSemicolon()&&this.eat(Ls.arrow)){this.checkPatternErrors(d,false);this.checkYieldAwaitInDefaultParams();if(this.awaitIdentPos>0){this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function")}this.yieldPos=p;this.awaitPos=f;this.awaitIdentPos=m;return this.parseArrowExpression(this.startNodeAt(t,i),g,true,o)}this.checkExpressionErrors(d,true);this.yieldPos=p||this.yieldPos;this.awaitPos=f||this.awaitPos;this.awaitIdentPos=m||this.awaitIdentPos;var y=this.startNodeAt(t,i);y.callee=e;y.arguments=g;if(l){y.optional=c}e=this.finishNode(y,"CallExpression")}else if(this.type===Ls.backQuote){if(c||r){this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions")}var E=this.startNodeAt(t,i);E.tag=e;E.quasi=this.parseTemplate({isTagged:true});e=this.finishNode(E,"TaggedTemplateExpression")}return e};Rn.parseExprAtom=function(e,t){if(this.type===Ls.slash){this.readRegexp()}var i,s=this.potentialArrowAt===this.start;switch(this.type){case Ls._super:if(!this.allowSuper){this.raise(this.start,"'super' keyword outside a method")}i=this.startNode();this.next();if(this.type===Ls.parenL&&!this.allowDirectSuper){this.raise(i.start,"super() call outside constructor of a subclass")}if(this.type!==Ls.dot&&this.type!==Ls.bracketL&&this.type!==Ls.parenL){this.unexpected()}return this.finishNode(i,"Super");case Ls._this:i=this.startNode();this.next();return this.finishNode(i,"ThisExpression");case Ls.name:var n=this.start,r=this.startLoc,o=this.containsEsc;var l=this.parseIdent(false);if(this.options.ecmaVersion>=8&&!o&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(Ls._function)){this.overrideContext(Pn.f_expr);return this.parseFunction(this.startNodeAt(n,r),0,false,true,t)}if(s&&!this.canInsertSemicolon()){if(this.eat(Ls.arrow)){return this.parseArrowExpression(this.startNodeAt(n,r),[l],false,t)}if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===Ls.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){l=this.parseIdent(false);if(this.canInsertSemicolon()||!this.eat(Ls.arrow)){this.unexpected()}return this.parseArrowExpression(this.startNodeAt(n,r),[l],true,t)}}return l;case Ls.regexp:var c=this.value;i=this.parseLiteral(c.value);i.regex={pattern:c.pattern,flags:c.flags};return i;case Ls.num:case Ls.string:return this.parseLiteral(this.value);case Ls._null:case Ls._true:case Ls._false:i=this.startNode();i.value=this.type===Ls._null?null:this.type===Ls._true;i.raw=this.type.keyword;this.next();return this.finishNode(i,"Literal");case Ls.parenL:var u=this.start,h=this.parseParenAndDistinguishExpression(s,t);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(h)){e.parenthesizedAssign=u}if(e.parenthesizedBind<0){e.parenthesizedBind=u}}return h;case Ls.bracketL:i=this.startNode();this.next();i.elements=this.parseExprList(Ls.bracketR,true,true,e);return this.finishNode(i,"ArrayExpression");case Ls.braceL:this.overrideContext(Pn.b_expr);return this.parseObj(false,e);case Ls._function:i=this.startNode();this.next();return this.parseFunction(i,0);case Ls._class:return this.parseClass(this.startNode(),false);case Ls._new:return this.parseNew();case Ls.backQuote:return this.parseTemplate();case Ls._import:if(this.options.ecmaVersion>=11){return this.parseExprImport()}else{return this.unexpected()}default:this.unexpected()}};Rn.parseExprImport=function(){var e=this.startNode();if(this.containsEsc){this.raiseRecoverable(this.start,"Escape sequence in keyword import")}var t=this.parseIdent(true);switch(this.type){case Ls.parenL:return this.parseDynamicImport(e);case Ls.dot:e.meta=t;return this.parseImportMeta(e);default:this.unexpected()}};Rn.parseDynamicImport=function(e){this.next();e.source=this.parseMaybeAssign();if(!this.eat(Ls.parenR)){var t=this.start;if(this.eat(Ls.comma)&&this.eat(Ls.parenR)){this.raiseRecoverable(t,"Trailing comma is not allowed in import()")}else{this.unexpected(t)}}return this.finishNode(e,"ImportExpression")};Rn.parseImportMeta=function(e){this.next();var t=this.containsEsc;e.property=this.parseIdent(true);if(e.property.name!=="meta"){this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'")}if(t){this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters")}if(this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere){this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module")}return this.finishNode(e,"MetaProperty")};Rn.parseLiteral=function(e){var t=this.startNode();t.value=e;t.raw=this.input.slice(this.start,this.end);if(t.raw.charCodeAt(t.raw.length-1)===110){t.bigint=t.raw.slice(0,-1).replace(/_/g,"")}this.next();return this.finishNode(t,"Literal")};Rn.parseParenExpression=function(){this.expect(Ls.parenL);var e=this.parseExpression();this.expect(Ls.parenR);return e};Rn.parseParenAndDistinguishExpression=function(e,t){var i=this.start,s=this.startLoc,n,r=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,l=this.startLoc;var c=[],u=true,h=false;var d=new xn,p=this.yieldPos,f=this.awaitPos,m;this.yieldPos=0;this.awaitPos=0;while(this.type!==Ls.parenR){u?u=false:this.expect(Ls.comma);if(r&&this.afterTrailingComma(Ls.parenR,true)){h=true;break}else if(this.type===Ls.ellipsis){m=this.start;c.push(this.parseParenItem(this.parseRestBinding()));if(this.type===Ls.comma){this.raise(this.start,"Comma is not permitted after the rest element")}break}else{c.push(this.parseMaybeAssign(false,d,this.parseParenItem))}}var g=this.lastTokEnd,y=this.lastTokEndLoc;this.expect(Ls.parenR);if(e&&!this.canInsertSemicolon()&&this.eat(Ls.arrow)){this.checkPatternErrors(d,false);this.checkYieldAwaitInDefaultParams();this.yieldPos=p;this.awaitPos=f;return this.parseParenArrowList(i,s,c,t)}if(!c.length||h){this.unexpected(this.lastTokStart)}if(m){this.unexpected(m)}this.checkExpressionErrors(d,true);this.yieldPos=p||this.yieldPos;this.awaitPos=f||this.awaitPos;if(c.length>1){n=this.startNodeAt(o,l);n.expressions=c;this.finishNodeAt(n,"SequenceExpression",g,y)}else{n=c[0]}}else{n=this.parseParenExpression()}if(this.options.preserveParens){var E=this.startNodeAt(i,s);E.expression=n;return this.finishNode(E,"ParenthesizedExpression")}else{return n}};Rn.parseParenItem=function(e){return e};Rn.parseParenArrowList=function(e,t,i,s){return this.parseArrowExpression(this.startNodeAt(e,t),i,false,s)};var Tn=[];Rn.parseNew=function(){if(this.containsEsc){this.raiseRecoverable(this.start,"Escape sequence in keyword new")}var e=this.startNode();var t=this.parseIdent(true);if(this.options.ecmaVersion>=6&&this.eat(Ls.dot)){e.meta=t;var i=this.containsEsc;e.property=this.parseIdent(true);if(e.property.name!=="target"){this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'")}if(i){this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters")}if(!this.allowNewDotTarget){this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block")}return this.finishNode(e,"MetaProperty")}var s=this.start,n=this.startLoc,r=this.type===Ls._import;e.callee=this.parseSubscripts(this.parseExprAtom(),s,n,true,false);if(r&&e.callee.type==="ImportExpression"){this.raise(s,"Cannot use new with import()")}if(this.eat(Ls.parenL)){e.arguments=this.parseExprList(Ls.parenR,this.options.ecmaVersion>=8,false)}else{e.arguments=Tn}return this.finishNode(e,"NewExpression")};Rn.parseTemplateElement=function(e){var t=e.isTagged;var i=this.startNode();if(this.type===Ls.invalidTemplate){if(!t){this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal")}i.value={raw:this.value,cooked:null}}else{i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value}}this.next();i.tail=this.type===Ls.backQuote;return this.finishNode(i,"TemplateElement")};Rn.parseTemplate=function(e){if(e===void 0)e={};var t=e.isTagged;if(t===void 0)t=false;var i=this.startNode();this.next();i.expressions=[];var s=this.parseTemplateElement({isTagged:t});i.quasis=[s];while(!s.tail){if(this.type===Ls.eof){this.raise(this.pos,"Unterminated template literal")}this.expect(Ls.dollarBraceL);i.expressions.push(this.parseExpression());this.expect(Ls.braceR);i.quasis.push(s=this.parseTemplateElement({isTagged:t}))}this.next();return this.finishNode(i,"TemplateLiteral")};Rn.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===Ls.name||this.type===Ls.num||this.type===Ls.string||this.type===Ls.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===Ls.star)&&!Fs.test(this.input.slice(this.lastTokEnd,this.start))};Rn.parseObj=function(e,t){var i=this.startNode(),s=true,n={};i.properties=[];this.next();while(!this.eat(Ls.braceR)){if(!s){this.expect(Ls.comma);if(this.options.ecmaVersion>=5&&this.afterTrailingComma(Ls.braceR)){break}}else{s=false}var r=this.parseProperty(e,t);if(!e){this.checkPropClash(r,n,t)}i.properties.push(r)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};Rn.parseProperty=function(e,t){var i=this.startNode(),s,n,r,o;if(this.options.ecmaVersion>=9&&this.eat(Ls.ellipsis)){if(e){i.argument=this.parseIdent(false);if(this.type===Ls.comma){this.raise(this.start,"Comma is not permitted after the rest element")}return this.finishNode(i,"RestElement")}if(this.type===Ls.parenL&&t){if(t.parenthesizedAssign<0){t.parenthesizedAssign=this.start}if(t.parenthesizedBind<0){t.parenthesizedBind=this.start}}i.argument=this.parseMaybeAssign(false,t);if(this.type===Ls.comma&&t&&t.trailingComma<0){t.trailingComma=this.start}return this.finishNode(i,"SpreadElement")}if(this.options.ecmaVersion>=6){i.method=false;i.shorthand=false;if(e||t){r=this.start;o=this.startLoc}if(!e){s=this.eat(Ls.star)}}var l=this.containsEsc;this.parsePropertyName(i);if(!e&&!l&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)){n=true;s=this.options.ecmaVersion>=9&&this.eat(Ls.star);this.parsePropertyName(i,t)}else{n=false}this.parsePropertyValue(i,e,s,n,r,o,t,l);return this.finishNode(i,"Property")};Rn.parsePropertyValue=function(e,t,i,s,n,r,o,l){if((i||s)&&this.type===Ls.colon){this.unexpected()}if(this.eat(Ls.colon)){e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(false,o);e.kind="init"}else if(this.options.ecmaVersion>=6&&this.type===Ls.parenL){if(t){this.unexpected()}e.kind="init";e.method=true;e.value=this.parseMethod(i,s)}else if(!t&&!l&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==Ls.comma&&this.type!==Ls.braceR&&this.type!==Ls.eq)){if(i||s){this.unexpected()}e.kind=e.key.name;this.parsePropertyName(e);e.value=this.parseMethod(false);var c=e.kind==="get"?0:1;if(e.value.params.length!==c){var u=e.value.start;if(e.kind==="get"){this.raiseRecoverable(u,"getter should have no params")}else{this.raiseRecoverable(u,"setter should have exactly one param")}}else{if(e.kind==="set"&&e.value.params[0].type==="RestElement"){this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}}}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(i||s){this.unexpected()}this.checkUnreserved(e.key);if(e.key.name==="await"&&!this.awaitIdentPos){this.awaitIdentPos=n}e.kind="init";if(t){e.value=this.parseMaybeDefault(n,r,this.copyNode(e.key))}else if(this.type===Ls.eq&&o){if(o.shorthandAssign<0){o.shorthandAssign=this.start}e.value=this.parseMaybeDefault(n,r,this.copyNode(e.key))}else{e.value=this.copyNode(e.key)}e.shorthand=true}else{this.unexpected()}};Rn.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(Ls.bracketL)){e.computed=true;e.key=this.parseMaybeAssign();this.expect(Ls.bracketR);return e.key}else{e.computed=false}}return e.key=this.type===Ls.num||this.type===Ls.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};Rn.initFunction=function(e){e.id=null;if(this.options.ecmaVersion>=6){e.generator=e.expression=false}if(this.options.ecmaVersion>=8){e.async=false}};Rn.parseMethod=function(e,t,i){var s=this.startNode(),n=this.yieldPos,r=this.awaitPos,o=this.awaitIdentPos;this.initFunction(s);if(this.options.ecmaVersion>=6){s.generator=e}if(this.options.ecmaVersion>=8){s.async=!!t}this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;this.enterScope(functionFlags(t,s.generator)|rn|(i?an:0));this.expect(Ls.parenL);s.params=this.parseBindingList(Ls.parenR,false,this.options.ecmaVersion>=8);this.checkYieldAwaitInDefaultParams();this.parseFunctionBody(s,false,true,false);this.yieldPos=n;this.awaitPos=r;this.awaitIdentPos=o;return this.finishNode(s,"FunctionExpression")};Rn.parseArrowExpression=function(e,t,i,s){var n=this.yieldPos,r=this.awaitPos,o=this.awaitIdentPos;this.enterScope(functionFlags(i,false)|sn);this.initFunction(e);if(this.options.ecmaVersion>=8){e.async=!!i}this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;e.params=this.toAssignableList(t,true);this.parseFunctionBody(e,true,false,s);this.yieldPos=n;this.awaitPos=r;this.awaitIdentPos=o;return this.finishNode(e,"ArrowFunctionExpression")};Rn.parseFunctionBody=function(e,t,i,s){var n=t&&this.type!==Ls.braceL;var r=this.strict,o=false;if(n){e.body=this.parseMaybeAssign(s);e.expression=true;this.checkParams(e,false)}else{var l=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!r||l){o=this.strictDirective(this.end);if(o&&l){this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}}var c=this.labels;this.labels=[];if(o){this.strict=true}this.checkParams(e,!r&&!o&&!t&&!i&&this.isSimpleParamList(e.params));if(this.strict&&e.id){this.checkLValSimple(e.id,fn)}e.body=this.parseBlock(false,undefined,o&&!r);e.expression=false;this.adaptDirectivePrologue(e.body.body);this.labels=c}this.exitScope()};Rn.isSimpleParamList=function(e){for(var t=0,i=e;t<i.length;t+=1){var s=i[t];if(s.type!=="Identifier"){return false}}return true};Rn.checkParams=function(e,t){var i=Object.create(null);for(var s=0,n=e.params;s<n.length;s+=1){var r=n[s];this.checkLValInnerPattern(r,un,t?null:i)}};Rn.parseExprList=function(e,t,i,s){var n=[],r=true;while(!this.eat(e)){if(!r){this.expect(Ls.comma);if(t&&this.afterTrailingComma(e)){break}}else{r=false}var o=void 0;if(i&&this.type===Ls.comma){o=null}else if(this.type===Ls.ellipsis){o=this.parseSpread(s);if(s&&this.type===Ls.comma&&s.trailingComma<0){s.trailingComma=this.start}}else{o=this.parseMaybeAssign(false,s)}n.push(o)}return n};Rn.checkUnreserved=function(e){var t=e.start;var i=e.end;var s=e.name;if(this.inGenerator&&s==="yield"){this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator")}if(this.inAsync&&s==="await"){this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function")}if(this.currentThisScope().inClassFieldInit&&s==="arguments"){this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer")}if(this.inClassStaticBlock&&(s==="arguments"||s==="await")){this.raise(t,"Cannot use "+s+" in class static initialization block")}if(this.keywords.test(s)){this.raise(t,"Unexpected keyword '"+s+"'")}if(this.options.ecmaVersion<6&&this.input.slice(t,i).indexOf("\\")!==-1){return}var n=this.strict?this.reservedWordsStrict:this.reservedWords;if(n.test(s)){if(!this.inAsync&&s==="await"){this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function")}this.raiseRecoverable(t,"The keyword '"+s+"' is reserved")}};Rn.parseIdent=function(e,t){var i=this.startNode();if(this.type===Ls.name){i.name=this.value}else if(this.type.keyword){i.name=this.type.keyword;if((i.name==="class"||i.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)){this.context.pop()}}else{this.unexpected()}this.next(!!e);this.finishNode(i,"Identifier");if(!e){this.checkUnreserved(i);if(i.name==="await"&&!this.awaitIdentPos){this.awaitIdentPos=i.start}}return i};Rn.parsePrivateIdent=function(){var e=this.startNode();if(this.type===Ls.privateId){e.name=this.value}else{this.unexpected()}this.next();this.finishNode(e,"PrivateIdentifier");if(this.privateNameStack.length===0){this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class")}else{this.privateNameStack[this.privateNameStack.length-1].used.push(e)}return e};Rn.parseYield=function(e){if(!this.yieldPos){this.yieldPos=this.start}var t=this.startNode();this.next();if(this.type===Ls.semi||this.canInsertSemicolon()||this.type!==Ls.star&&!this.type.startsExpr){t.delegate=false;t.argument=null}else{t.delegate=this.eat(Ls.star);t.argument=this.parseMaybeAssign(e)}return this.finishNode(t,"YieldExpression")};Rn.parseAwait=function(e){if(!this.awaitPos){this.awaitPos=this.start}var t=this.startNode();this.next();t.argument=this.parseMaybeUnary(null,true,false,e);return this.finishNode(t,"AwaitExpression")};var $n=mn.prototype;$n.raise=function(e,t){var i=getLineInfo(this.input,e);t+=" ("+i.line+":"+i.column+")";var s=new SyntaxError(t);s.pos=e;s.loc=i;s.raisedAt=this.pos;throw s};$n.raiseRecoverable=$n.raise;$n.curPosition=function(){if(this.options.locations){return new Ks(this.curLine,this.pos-this.lineStart)}};var On=mn.prototype;var Dn=function Scope(e){this.flags=e;this.var=[];this.lexical=[];this.functions=[];this.inClassFieldInit=false};On.enterScope=function(e){this.scopeStack.push(new Dn(e))};On.exitScope=function(){this.scopeStack.pop()};On.treatFunctionsAsVarInScope=function(e){return e.flags&Js||!this.inModule&&e.flags&Zs};On.declareName=function(e,t,i){var s=false;if(t===hn){var n=this.currentScope();s=n.lexical.indexOf(e)>-1||n.functions.indexOf(e)>-1||n.var.indexOf(e)>-1;n.lexical.push(e);if(this.inModule&&n.flags&Zs){delete this.undefinedExports[e]}}else if(t===pn){var r=this.currentScope();r.lexical.push(e)}else if(t===dn){var o=this.currentScope();if(this.treatFunctionsAsVar){s=o.lexical.indexOf(e)>-1}else{s=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1}o.functions.push(e)}else{for(var l=this.scopeStack.length-1;l>=0;--l){var c=this.scopeStack[l];if(c.lexical.indexOf(e)>-1&&!(c.flags&nn&&c.lexical[0]===e)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(e)>-1){s=true;break}c.var.push(e);if(this.inModule&&c.flags&Zs){delete this.undefinedExports[e]}if(c.flags&ln){break}}}if(s){this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")}};On.checkLocalExport=function(e){if(this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1){this.undefinedExports[e.name]=e}};On.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};On.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&ln){return t}}};On.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&ln&&!(t.flags&sn)){return t}}};var Mn=function Node(e,t,i){this.type="";this.start=t;this.end=0;if(e.options.locations){this.loc=new Ys(e,i)}if(e.options.directSourceFile){this.sourceFile=e.options.directSourceFile}if(e.options.ranges){this.range=[t,0]}};var Ln=mn.prototype;Ln.startNode=function(){return new Mn(this,this.start,this.startLoc)};Ln.startNodeAt=function(e,t){return new Mn(this,e,t)};function finishNodeAt(e,t,i,s){e.type=t;e.end=i;if(this.options.locations){e.loc.end=s}if(this.options.ranges){e.range[1]=i}return e}Ln.finishNode=function(e,t){return finishNodeAt.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Ln.finishNodeAt=function(e,t,i,s){return finishNodeAt.call(this,e,t,i,s)};Ln.copyNode=function(e){var t=new Mn(this,e.start,this.startLoc);for(var i in e){t[i]=e[i]}return t};var Fn="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";var Vn=Fn+" Extended_Pictographic";var Bn=Vn;var zn=Bn+" EBase EComp EMod EPres ExtPict";var Un=zn;var Hn={9:Fn,10:Vn,11:Bn,12:zn,13:Un};var jn="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";var Gn="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";var Wn=Gn+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";var qn=Wn+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";var Kn=qn+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";var Yn=Kn+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";var Xn={9:Gn,10:Wn,11:qn,12:Kn,13:Yn};var Qn={};function buildUnicodeData(e){var t=Qn[e]={binary:wordsRegexp(Hn[e]+" "+jn),nonBinary:{General_Category:wordsRegexp(jn),Script:wordsRegexp(Xn[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script;t.nonBinary.gc=t.nonBinary.General_Category;t.nonBinary.sc=t.nonBinary.Script;t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Zn=0,Jn=[9,10,11,12,13];Zn<Jn.length;Zn+=1){var er=Jn[Zn];buildUnicodeData(er)}var tr=mn.prototype;var ir=function RegExpValidationState(e){this.parser=e;this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"");this.unicodeProperties=Qn[e.options.ecmaVersion>=13?13:e.options.ecmaVersion];this.source="";this.flags="";this.start=0;this.switchU=false;this.switchN=false;this.pos=0;this.lastIntValue=0;this.lastStringValue="";this.lastAssertionIsQuantifiable=false;this.numCapturingParens=0;this.maxBackReference=0;this.groupNames=[];this.backReferenceNames=[]};ir.prototype.reset=function reset(e,t,i){var s=i.indexOf("u")!==-1;this.start=e|0;this.source=t+"";this.flags=i;this.switchU=s&&this.parser.options.ecmaVersion>=6;this.switchN=s&&this.parser.options.ecmaVersion>=9};ir.prototype.raise=function raise(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)};ir.prototype.at=function at(e,t){if(t===void 0)t=false;var i=this.source;var s=i.length;if(e>=s){return-1}var n=i.charCodeAt(e);if(!(t||this.switchU)||n<=55295||n>=57344||e+1>=s){return n}var r=i.charCodeAt(e+1);return r>=56320&&r<=57343?(n<<10)+r-56613888:n};ir.prototype.nextIndex=function nextIndex(e,t){if(t===void 0)t=false;var i=this.source;var s=i.length;if(e>=s){return s}var n=i.charCodeAt(e),r;if(!(t||this.switchU)||n<=55295||n>=57344||e+1>=s||(r=i.charCodeAt(e+1))<56320||r>57343){return e+1}return e+2};ir.prototype.current=function current(e){if(e===void 0)e=false;return this.at(this.pos,e)};ir.prototype.lookahead=function lookahead(e){if(e===void 0)e=false;return this.at(this.nextIndex(this.pos,e),e)};ir.prototype.advance=function advance(e){if(e===void 0)e=false;this.pos=this.nextIndex(this.pos,e)};ir.prototype.eat=function eat(e,t){if(t===void 0)t=false;if(this.current(t)===e){this.advance(t);return true}return false};tr.validateRegExpFlags=function(e){var t=e.validFlags;var i=e.flags;for(var s=0;s<i.length;s++){var n=i.charAt(s);if(t.indexOf(n)===-1){this.raise(e.start,"Invalid regular expression flag")}if(i.indexOf(n,s+1)>-1){this.raise(e.start,"Duplicate regular expression flag")}}};tr.validateRegExpPattern=function(e){this.regexp_pattern(e);if(!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0){e.switchN=true;this.regexp_pattern(e)}};tr.regexp_pattern=function(e){e.pos=0;e.lastIntValue=0;e.lastStringValue="";e.lastAssertionIsQuantifiable=false;e.numCapturingParens=0;e.maxBackReference=0;e.groupNames.length=0;e.backReferenceNames.length=0;this.regexp_disjunction(e);if(e.pos!==e.source.length){if(e.eat(41)){e.raise("Unmatched ')'")}if(e.eat(93)||e.eat(125)){e.raise("Lone quantifier brackets")}}if(e.maxBackReference>e.numCapturingParens){e.raise("Invalid escape")}for(var t=0,i=e.backReferenceNames;t<i.length;t+=1){var s=i[t];if(e.groupNames.indexOf(s)===-1){e.raise("Invalid named capture referenced")}}};tr.regexp_disjunction=function(e){this.regexp_alternative(e);while(e.eat(124)){this.regexp_alternative(e)}if(this.regexp_eatQuantifier(e,true)){e.raise("Nothing to repeat")}if(e.eat(123)){e.raise("Lone quantifier brackets")}};tr.regexp_alternative=function(e){while(e.pos<e.source.length&&this.regexp_eatTerm(e)){}};tr.regexp_eatTerm=function(e){if(this.regexp_eatAssertion(e)){if(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)){if(e.switchU){e.raise("Invalid quantifier")}}return true}if(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e)){this.regexp_eatQuantifier(e);return true}return false};tr.regexp_eatAssertion=function(e){var t=e.pos;e.lastAssertionIsQuantifiable=false;if(e.eat(94)||e.eat(36)){return true}if(e.eat(92)){if(e.eat(66)||e.eat(98)){return true}e.pos=t}if(e.eat(40)&&e.eat(63)){var i=false;if(this.options.ecmaVersion>=9){i=e.eat(60)}if(e.eat(61)||e.eat(33)){this.regexp_disjunction(e);if(!e.eat(41)){e.raise("Unterminated group")}e.lastAssertionIsQuantifiable=!i;return true}}e.pos=t;return false};tr.regexp_eatQuantifier=function(e,t){if(t===void 0)t=false;if(this.regexp_eatQuantifierPrefix(e,t)){e.eat(63);return true}return false};tr.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};tr.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var s=0,n=-1;if(this.regexp_eatDecimalDigits(e)){s=e.lastIntValue;if(e.eat(44)&&this.regexp_eatDecimalDigits(e)){n=e.lastIntValue}if(e.eat(125)){if(n!==-1&&n<s&&!t){e.raise("numbers out of order in {} quantifier")}return true}}if(e.switchU&&!t){e.raise("Incomplete quantifier")}e.pos=i}return false};tr.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};tr.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e)){return true}e.pos=t}return false};tr.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){this.regexp_disjunction(e);if(e.eat(41)){return true}e.raise("Unterminated group")}e.pos=t}return false};tr.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9){this.regexp_groupSpecifier(e)}else if(e.current()===63){e.raise("Invalid group")}this.regexp_disjunction(e);if(e.eat(41)){e.numCapturingParens+=1;return true}e.raise("Unterminated group")}return false};tr.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};tr.regexp_eatInvalidBracedQuantifier=function(e){if(this.regexp_eatBracedQuantifier(e,true)){e.raise("Nothing to repeat")}return false};tr.regexp_eatSyntaxCharacter=function(e){var t=e.current();if(isSyntaxCharacter(t)){e.lastIntValue=t;e.advance();return true}return false};function isSyntaxCharacter(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}tr.regexp_eatPatternCharacters=function(e){var t=e.pos;var i=0;while((i=e.current())!==-1&&!isSyntaxCharacter(i)){e.advance()}return e.pos!==t};tr.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();if(t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124){e.advance();return true}return false};tr.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){if(e.groupNames.indexOf(e.lastStringValue)!==-1){e.raise("Duplicate capture group name")}e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};tr.regexp_eatGroupName=function(e){e.lastStringValue="";if(e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62)){return true}e.raise("Invalid capture group name")}return false};tr.regexp_eatRegExpIdentifierName=function(e){e.lastStringValue="";if(this.regexp_eatRegExpIdentifierStart(e)){e.lastStringValue+=codePointToString(e.lastIntValue);while(this.regexp_eatRegExpIdentifierPart(e)){e.lastStringValue+=codePointToString(e.lastIntValue)}return true}return false};tr.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos;var i=this.options.ecmaVersion>=11;var s=e.current(i);e.advance(i);if(s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)){s=e.lastIntValue}if(isRegExpIdentifierStart(s)){e.lastIntValue=s;return true}e.pos=t;return false};function isRegExpIdentifierStart(e){return isIdentifierStart(e,true)||e===36||e===95}tr.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos;var i=this.options.ecmaVersion>=11;var s=e.current(i);e.advance(i);if(s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)){s=e.lastIntValue}if(isRegExpIdentifierPart(s)){e.lastIntValue=s;return true}e.pos=t;return false};function isRegExpIdentifierPart(e){return isIdentifierChar(e,true)||e===36||e===95||e===8204||e===8205}tr.regexp_eatAtomEscape=function(e){if(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)){return true}if(e.switchU){if(e.current()===99){e.raise("Invalid unicode escape")}e.raise("Invalid escape")}return false};tr.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU){if(i>e.maxBackReference){e.maxBackReference=i}return true}if(i<=e.numCapturingParens){return true}e.pos=t}return false};tr.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e)){e.backReferenceNames.push(e.lastStringValue);return true}e.raise("Invalid named reference")}return false};tr.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,false)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};tr.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e)){return true}e.pos=t}return false};tr.regexp_eatZero=function(e){if(e.current()===48&&!isDecimalDigit(e.lookahead())){e.lastIntValue=0;e.advance();return true}return false};tr.regexp_eatControlEscape=function(e){var t=e.current();if(t===116){e.lastIntValue=9;e.advance();return true}if(t===110){e.lastIntValue=10;e.advance();return true}if(t===118){e.lastIntValue=11;e.advance();return true}if(t===102){e.lastIntValue=12;e.advance();return true}if(t===114){e.lastIntValue=13;e.advance();return true}return false};tr.regexp_eatControlLetter=function(e){var t=e.current();if(isControlLetter(t)){e.lastIntValue=t%32;e.advance();return true}return false};function isControlLetter(e){return e>=65&&e<=90||e>=97&&e<=122}tr.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){if(t===void 0)t=false;var i=e.pos;var s=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(s&&n>=55296&&n<=56319){var r=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343){e.lastIntValue=(n-55296)*1024+(o-56320)+65536;return true}}e.pos=r;e.lastIntValue=n}return true}if(s&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&isValidUnicode(e.lastIntValue)){return true}if(s){e.raise("Invalid unicode escape")}e.pos=i}return false};function isValidUnicode(e){return e>=0&&e<=1114111}tr.regexp_eatIdentityEscape=function(e){if(e.switchU){if(this.regexp_eatSyntaxCharacter(e)){return true}if(e.eat(47)){e.lastIntValue=47;return true}return false}var t=e.current();if(t!==99&&(!e.switchN||t!==107)){e.lastIntValue=t;e.advance();return true}return false};tr.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48);e.advance()}while((t=e.current())>=48&&t<=57);return true}return false};tr.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(isCharacterClassEscape(t)){e.lastIntValue=-1;e.advance();return true}if(e.switchU&&this.options.ecmaVersion>=9&&(t===80||t===112)){e.lastIntValue=-1;e.advance();if(e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125)){return true}e.raise("Invalid property name")}return false};function isCharacterClassEscape(e){return e===100||e===68||e===115||e===83||e===119||e===87}tr.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var s=e.lastStringValue;this.regexp_validateUnicodePropertyNameAndValue(e,i,s);return true}}e.pos=t;if(this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var n=e.lastStringValue;this.regexp_validateUnicodePropertyNameOrValue(e,n);return true}return false};tr.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){if(!Gs(e.unicodeProperties.nonBinary,t)){e.raise("Invalid property name")}if(!e.unicodeProperties.nonBinary[t].test(i)){e.raise("Invalid property value")}};tr.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(!e.unicodeProperties.binary.test(t)){e.raise("Invalid property name")}};tr.regexp_eatUnicodePropertyName=function(e){var t=0;e.lastStringValue="";while(isUnicodePropertyNameCharacter(t=e.current())){e.lastStringValue+=codePointToString(t);e.advance()}return e.lastStringValue!==""};function isUnicodePropertyNameCharacter(e){return isControlLetter(e)||e===95}tr.regexp_eatUnicodePropertyValue=function(e){var t=0;e.lastStringValue="";while(isUnicodePropertyValueCharacter(t=e.current())){e.lastStringValue+=codePointToString(t);e.advance()}return e.lastStringValue!==""};function isUnicodePropertyValueCharacter(e){return isUnicodePropertyNameCharacter(e)||isDecimalDigit(e)}tr.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};tr.regexp_eatCharacterClass=function(e){if(e.eat(91)){e.eat(94);this.regexp_classRanges(e);if(e.eat(93)){return true}e.raise("Unterminated character class")}return false};tr.regexp_classRanges=function(e){while(this.regexp_eatClassAtom(e)){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;if(e.switchU&&(t===-1||i===-1)){e.raise("Invalid character class")}if(t!==-1&&i!==-1&&t>i){e.raise("Range out of order in character class")}}}};tr.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e)){return true}if(e.switchU){var i=e.current();if(i===99||isOctalDigit(i)){e.raise("Invalid class escape")}e.raise("Invalid escape")}e.pos=t}var s=e.current();if(s!==93){e.lastIntValue=s;e.advance();return true}return false};tr.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98)){e.lastIntValue=8;return true}if(e.switchU&&e.eat(45)){e.lastIntValue=45;return true}if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e)){return true}e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};tr.regexp_eatClassControlLetter=function(e){var t=e.current();if(isDecimalDigit(t)||t===95){e.lastIntValue=t%32;e.advance();return true}return false};tr.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2)){return true}if(e.switchU){e.raise("Invalid escape")}e.pos=t}return false};tr.regexp_eatDecimalDigits=function(e){var t=e.pos;var i=0;e.lastIntValue=0;while(isDecimalDigit(i=e.current())){e.lastIntValue=10*e.lastIntValue+(i-48);e.advance()}return e.pos!==t};function isDecimalDigit(e){return e>=48&&e<=57}tr.regexp_eatHexDigits=function(e){var t=e.pos;var i=0;e.lastIntValue=0;while(isHexDigit(i=e.current())){e.lastIntValue=16*e.lastIntValue+hexToInt(i);e.advance()}return e.pos!==t};function isHexDigit(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function hexToInt(e){if(e>=65&&e<=70){return 10+(e-65)}if(e>=97&&e<=102){return 10+(e-97)}return e-48}tr.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;if(t<=3&&this.regexp_eatOctalDigit(e)){e.lastIntValue=t*64+i*8+e.lastIntValue}else{e.lastIntValue=t*8+i}}else{e.lastIntValue=t}return true}return false};tr.regexp_eatOctalDigit=function(e){var t=e.current();if(isOctalDigit(t)){e.lastIntValue=t-48;e.advance();return true}e.lastIntValue=0;return false};function isOctalDigit(e){return e>=48&&e<=55}tr.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var s=0;s<t;++s){var n=e.current();if(!isHexDigit(n)){e.pos=i;return false}e.lastIntValue=16*e.lastIntValue+hexToInt(n);e.advance()}return true};var sr=function Token(e){this.type=e.type;this.value=e.value;this.start=e.start;this.end=e.end;if(e.options.locations){this.loc=new Ys(e,e.startLoc,e.endLoc)}if(e.options.ranges){this.range=[e.start,e.end]}};var nr=mn.prototype;nr.next=function(e){if(!e&&this.type.keyword&&this.containsEsc){this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword)}if(this.options.onToken){this.options.onToken(new sr(this))}this.lastTokEnd=this.end;this.lastTokStart=this.start;this.lastTokEndLoc=this.endLoc;this.lastTokStartLoc=this.startLoc;this.nextToken()};nr.getToken=function(){this.next();return new sr(this)};if(typeof Symbol!=="undefined"){nr[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===Ls.eof,value:t}}}}}nr.nextToken=function(){var e=this.curContext();if(!e||!e.preserveSpace){this.skipSpace()}this.start=this.pos;if(this.options.locations){this.startLoc=this.curPosition()}if(this.pos>=this.input.length){return this.finishToken(Ls.eof)}if(e.override){return e.override(this)}else{this.readToken(this.fullCharCodeAtPos())}};nr.readToken=function(e){if(isIdentifierStart(e,this.options.ecmaVersion>=6)||e===92){return this.readWord()}return this.getTokenFromCode(e)};nr.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320){return e}var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};nr.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition();var t=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1){this.raise(this.pos-2,"Unterminated comment")}this.pos=i+2;if(this.options.locations){for(var s=void 0,n=t;(s=nextLineBreak(this.input,n,this.pos))>-1;){++this.curLine;n=this.lineStart=s}}if(this.options.onComment){this.options.onComment(true,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())}};nr.skipLineComment=function(e){var t=this.pos;var i=this.options.onComment&&this.curPosition();var s=this.input.charCodeAt(this.pos+=e);while(this.pos<this.input.length&&!isNewLine(s)){s=this.input.charCodeAt(++this.pos)}if(this.options.onComment){this.options.onComment(false,this.input.slice(t+e,this.pos),t,this.pos,i,this.curPosition())}};nr.skipSpace=function(){e:while(this.pos<this.input.length){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:if(this.input.charCodeAt(this.pos+1)===10){++this.pos}case 10:case 8232:case 8233:++this.pos;if(this.options.locations){++this.curLine;this.lineStart=this.pos}break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&Bs.test(String.fromCharCode(e))){++this.pos}else{break e}}}};nr.finishToken=function(e,t){this.end=this.pos;if(this.options.locations){this.endLoc=this.curPosition()}var i=this.type;this.type=e;this.value=t;this.updateContext(i)};nr.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57){return this.readNumber(true)}var t=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&e===46&&t===46){this.pos+=3;return this.finishToken(Ls.ellipsis)}else{++this.pos;return this.finishToken(Ls.dot)}};nr.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);if(this.exprAllowed){++this.pos;return this.readRegexp()}if(e===61){return this.finishOp(Ls.assign,2)}return this.finishOp(Ls.slash,1)};nr.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1);var i=1;var s=e===42?Ls.star:Ls.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42){++i;s=Ls.starstar;t=this.input.charCodeAt(this.pos+2)}if(t===61){return this.finishOp(Ls.assign,i+1)}return this.finishOp(s,i)};nr.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61){return this.finishOp(Ls.assign,3)}}return this.finishOp(e===124?Ls.logicalOR:Ls.logicalAND,2)}if(t===61){return this.finishOp(Ls.assign,2)}return this.finishOp(e===124?Ls.bitwiseOR:Ls.bitwiseAND,1)};nr.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61){return this.finishOp(Ls.assign,2)}return this.finishOp(Ls.bitwiseXOR,1)};nr.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Fs.test(this.input.slice(this.lastTokEnd,this.pos)))){this.skipLineComment(3);this.skipSpace();return this.nextToken()}return this.finishOp(Ls.incDec,2)}if(t===61){return this.finishOp(Ls.assign,2)}return this.finishOp(Ls.plusMin,1)};nr.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1);var i=1;if(t===e){i=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2;if(this.input.charCodeAt(this.pos+i)===61){return this.finishOp(Ls.assign,i+1)}return this.finishOp(Ls.bitShift,i)}if(t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45){this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(t===61){i=2}return this.finishOp(Ls.relational,i)};nr.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61){return this.finishOp(Ls.equality,this.input.charCodeAt(this.pos+2)===61?3:2)}if(e===61&&t===62&&this.options.ecmaVersion>=6){this.pos+=2;return this.finishToken(Ls.arrow)}return this.finishOp(e===61?Ls.eq:Ls.prefix,1)};nr.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57){return this.finishOp(Ls.questionDot,2)}}if(t===63){if(e>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61){return this.finishOp(Ls.assign,3)}}return this.finishOp(Ls.coalesce,2)}}return this.finishOp(Ls.question,1)};nr.readToken_numberSign=function(){var e=this.options.ecmaVersion;var t=35;if(e>=13){++this.pos;t=this.fullCharCodeAtPos();if(isIdentifierStart(t,true)||t===92){return this.finishToken(Ls.privateId,this.readWord1())}}this.raise(this.pos,"Unexpected character '"+codePointToString(t)+"'")};nr.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:++this.pos;return this.finishToken(Ls.parenL);case 41:++this.pos;return this.finishToken(Ls.parenR);case 59:++this.pos;return this.finishToken(Ls.semi);case 44:++this.pos;return this.finishToken(Ls.comma);case 91:++this.pos;return this.finishToken(Ls.bracketL);case 93:++this.pos;return this.finishToken(Ls.bracketR);case 123:++this.pos;return this.finishToken(Ls.braceL);case 125:++this.pos;return this.finishToken(Ls.braceR);case 58:++this.pos;return this.finishToken(Ls.colon);case 96:if(this.options.ecmaVersion<6){break}++this.pos;return this.finishToken(Ls.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88){return this.readRadixNumber(16)}if(this.options.ecmaVersion>=6){if(t===111||t===79){return this.readRadixNumber(8)}if(t===98||t===66){return this.readRadixNumber(2)}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(false);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(Ls.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+codePointToString(e)+"'")};nr.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);this.pos+=t;return this.finishToken(e,i)};nr.readRegexp=function(){var e,t,i=this.pos;for(;;){if(this.pos>=this.input.length){this.raise(i,"Unterminated regular expression")}var s=this.input.charAt(this.pos);if(Fs.test(s)){this.raise(i,"Unterminated regular expression")}if(!e){if(s==="["){t=true}else if(s==="]"&&t){t=false}else if(s==="/"&&!t){break}e=s==="\\"}else{e=false}++this.pos}var n=this.input.slice(i,this.pos);++this.pos;var r=this.pos;var o=this.readWord1();if(this.containsEsc){this.unexpected(r)}var l=this.regexpState||(this.regexpState=new ir(this));l.reset(i,n,o);this.validateRegExpFlags(l);this.validateRegExpPattern(l);var c=null;try{c=new RegExp(n,o)}catch(e){}return this.finishToken(Ls.regexp,{pattern:n,flags:o,value:c})};nr.readInt=function(e,t,i){var s=this.options.ecmaVersion>=12&&t===undefined;var n=i&&this.input.charCodeAt(this.pos)===48;var r=this.pos,o=0,l=0;for(var c=0,u=t==null?Infinity:t;c<u;++c,++this.pos){var h=this.input.charCodeAt(this.pos),d=void 0;if(s&&h===95){if(n){this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals")}if(l===95){this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore")}if(c===0){this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits")}l=h;continue}if(h>=97){d=h-97+10}else if(h>=65){d=h-65+10}else if(h>=48&&h<=57){d=h-48}else{d=Infinity}if(d>=e){break}l=h;o=o*e+d}if(s&&l===95){this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits")}if(this.pos===r||t!=null&&this.pos-r!==t){return null}return o};function stringToNumber(e,t){if(t){return parseInt(e,8)}return parseFloat(e.replace(/_/g,""))}function stringToBigInt(e){if(typeof BigInt!=="function"){return null}return BigInt(e.replace(/_/g,""))}nr.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);if(i==null){this.raise(this.start+2,"Expected number in radix "+e)}if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110){i=stringToBigInt(this.input.slice(t,this.pos));++this.pos}else if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}return this.finishToken(Ls.num,i)};nr.readNumber=function(e){var t=this.pos;if(!e&&this.readInt(10,undefined,true)===null){this.raise(t,"Invalid number")}var i=this.pos-t>=2&&this.input.charCodeAt(t)===48;if(i&&this.strict){this.raise(t,"Invalid number")}var s=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&s===110){var n=stringToBigInt(this.input.slice(t,this.pos));++this.pos;if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}return this.finishToken(Ls.num,n)}if(i&&/[89]/.test(this.input.slice(t,this.pos))){i=false}if(s===46&&!i){++this.pos;this.readInt(10);s=this.input.charCodeAt(this.pos)}if((s===69||s===101)&&!i){s=this.input.charCodeAt(++this.pos);if(s===43||s===45){++this.pos}if(this.readInt(10)===null){this.raise(t,"Invalid number")}}if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}var r=stringToNumber(this.input.slice(t,this.pos),i);return this.finishToken(Ls.num,r)};nr.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){if(this.options.ecmaVersion<6){this.unexpected()}var i=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos);++this.pos;if(t>1114111){this.invalidStringToken(i,"Code point out of bounds")}}else{t=this.readHexChar(4)}return t};nr.readString=function(e){var t="",i=++this.pos;for(;;){if(this.pos>=this.input.length){this.raise(this.start,"Unterminated string constant")}var s=this.input.charCodeAt(this.pos);if(s===e){break}if(s===92){t+=this.input.slice(i,this.pos);t+=this.readEscapedChar(false);i=this.pos}else if(s===8232||s===8233){if(this.options.ecmaVersion<10){this.raise(this.start,"Unterminated string constant")}++this.pos;if(this.options.locations){this.curLine++;this.lineStart=this.pos}}else{if(isNewLine(s)){this.raise(this.start,"Unterminated string constant")}++this.pos}}t+=this.input.slice(i,this.pos++);return this.finishToken(Ls.string,t)};var rr={};nr.tryReadTemplateToken=function(){this.inTemplateElement=true;try{this.readTmplToken()}catch(e){if(e===rr){this.readInvalidTemplateToken()}else{throw e}}this.inTemplateElement=false};nr.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9){throw rr}else{this.raise(e,t)}};nr.readTmplToken=function(){var e="",t=this.pos;for(;;){if(this.pos>=this.input.length){this.raise(this.start,"Unterminated template")}var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===Ls.template||this.type===Ls.invalidTemplate)){if(i===36){this.pos+=2;return this.finishToken(Ls.dollarBraceL)}else{++this.pos;return this.finishToken(Ls.backQuote)}}e+=this.input.slice(t,this.pos);return this.finishToken(Ls.template,e)}if(i===92){e+=this.input.slice(t,this.pos);e+=this.readEscapedChar(true);t=this.pos}else if(isNewLine(i)){e+=this.input.slice(t,this.pos);++this.pos;switch(i){case 13:if(this.input.charCodeAt(this.pos)===10){++this.pos}case 10:e+="\n";break;default:e+=String.fromCharCode(i);break}if(this.options.locations){++this.curLine;this.lineStart=this.pos}t=this.pos}else{++this.pos}}};nr.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++){switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{"){break}case"`":return this.finishToken(Ls.invalidTemplate,this.input.slice(this.start,this.pos))}}this.raise(this.start,"Unterminated template")};nr.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);++this.pos;switch(t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:if(this.input.charCodeAt(this.pos)===10){++this.pos}case 10:if(this.options.locations){this.lineStart=this.pos;++this.curLine}return"";case 56:case 57:if(this.strict){this.invalidStringToken(this.pos-1,"Invalid escape sequence")}if(e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string");return null}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0];var n=parseInt(s,8);if(n>255){s=s.slice(0,-1);n=parseInt(s,8)}this.pos+=s.length-1;t=this.input.charCodeAt(this.pos);if((s!=="0"||t===56||t===57)&&(this.strict||e)){this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode")}return String.fromCharCode(n)}if(isNewLine(t)){return""}return String.fromCharCode(t)}};nr.readHexChar=function(e){var t=this.pos;var i=this.readInt(16,e);if(i===null){this.invalidStringToken(t,"Bad character escape sequence")}return i};nr.readWord1=function(){this.containsEsc=false;var e="",t=true,i=this.pos;var s=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var n=this.fullCharCodeAtPos();if(isIdentifierChar(n,s)){this.pos+=n<=65535?1:2}else if(n===92){this.containsEsc=true;e+=this.input.slice(i,this.pos);var r=this.pos;if(this.input.charCodeAt(++this.pos)!==117){this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX")}++this.pos;var o=this.readCodePoint();if(!(t?isIdentifierStart:isIdentifierChar)(o,s)){this.invalidStringToken(r,"Invalid Unicode escape")}e+=codePointToString(o);i=this.pos}else{break}t=false}return e+this.input.slice(i,this.pos)};nr.readWord=function(){var e=this.readWord1();var t=Ls.name;if(this.keywords.test(e)){t=Ms[e]}return this.finishToken(t,e)};var ar="8.7.1";mn.acorn={Parser:mn,version:ar,defaultOptions:Xs,Position:Ks,SourceLocation:Ys,getLineInfo:getLineInfo,Node:Mn,TokenType:$s,tokTypes:Ls,keywordTypes:Ms,TokContext:_n,tokContexts:Pn,isIdentifierChar:isIdentifierChar,isIdentifierStart:isIdentifierStart,Token:sr,isNewLine:isNewLine,lineBreak:Fs,lineBreakG:Vs,nonASCIIwhitespace:Bs};function resolveIdViaPlugins(e,t,i,s,n,r,o){let l=null;let c=null;if(n){l=new Set;for(const i of n){if(e===i.source&&t===i.importer){l.add(i.plugin)}}c=(e,t)=>({...e,resolve:(e,i,{custom:r,isEntry:o,skipSelf:l}=X)=>s(e,i,r,o,l?[...n,{importer:i,plugin:t,source:e}]:n)})}return i.hookFirst("resolveId",[e,t,{custom:r,isEntry:o}],c,l)}async function resolveId(e,t,i,n,r,o,l,c){const u=await resolveIdViaPlugins(e,t,n,r,o,l,c);if(u!=null)return u;if(t!==undefined&&!isAbsolute(e)&&e[0]!==".")return null;return addJsExtensionIfNecessary(t?s.resolve(s.dirname(t),e):s.resolve(e),i)}async function addJsExtensionIfNecessary(e,t){var i,s;return(s=(i=await findFile(e,t))!==null&&i!==void 0?i:await findFile(e+".mjs",t))!==null&&s!==void 0?s:await findFile(e+".js",t)}async function findFile(e,t){try{const i=await l.promises.lstat(e);if(!t&&i.isSymbolicLink())return await findFile(await l.promises.realpath(e),t);if(t&&i.isSymbolicLink()||i.isFile()){const t=s.basename(e);const i=await l.promises.readdir(s.dirname(e));if(i.includes(t))return e}}catch(e){}}const or="at position ";const lr="at output position ";function throwPluginError(e,t,{hook:i,id:s}={}){if(typeof e==="string")e={message:e};if(e.code&&e.code!==g.PLUGIN_ERROR){e.pluginCode=e.code}e.code=g.PLUGIN_ERROR;e.plugin=t;if(i){e.hook=i}if(s){e.id=s}return error(e)}const cr=[{active:true,deprecated:"resolveAssetUrl",replacement:"resolveFileUrl"}];function warnDeprecatedHooks(e,t){for(const{active:i,deprecated:s,replacement:n}of cr){for(const r of e){if(s in r){warnDeprecation({message:`The "${s}" hook used by plugin ${r.name} is deprecated. The "${n}" hook should be used instead.`,plugin:r.name},i,t)}}}}function createPluginCache(e){return{delete(t){return delete e[t]},get(t){const i=e[t];if(!i)return undefined;i[0]=0;return i[1]},has(t){const i=e[t];if(!i)return false;i[0]=0;return true},set(t,i){e[t]=[0,i]}}}function getTrackedPluginCache(e,t){return{delete(i){t();return e.delete(i)},get(i){t();return e.get(i)},has(i){t();return e.has(i)},set(i,s){t();return e.set(i,s)}}}const ur={delete(){return false},get(){return undefined},has(){return false},set(){}};function uncacheablePluginError(e){if(e.startsWith(or)||e.startsWith(lr)){return error({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."})}return error({code:"DUPLICATE_PLUGIN_NAME",message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`})}function getCacheForUncacheablePlugin(e){return{delete(){return uncacheablePluginError(e)},get(){return uncacheablePluginError(e)},has(){return uncacheablePluginError(e)},set(){return uncacheablePluginError(e)}}}async function transform(e,t,i,s){const n=t.id;const r=[];let o=e.map===null?null:decodedSourcemap(e.map);const l=e.code;let c=e.ast;const u=[];const h=[];let d=false;const useCustomTransformCache=()=>d=true;let p="";const f=e.code;function transformReducer(e,i,n){let o;let l;if(typeof i==="string"){o=i}else if(i&&typeof i==="object"){t.updateOptions(i);if(i.code==null){if(i.map||i.ast){s(errNoTransformMapOrAstWithoutCode(n.name))}return e}({code:o,map:l,ast:c}=i)}else{return e}if(l!==null){r.push(decodedSourcemap(typeof l==="string"?JSON.parse(l):l)||{missing:true,plugin:n.name})}return o}let m;try{m=await i.hookReduceArg0("transform",[f,n],transformReducer,((e,t)=>{p=t.name;return{...e,addWatchFile(t){u.push(t);e.addWatchFile(t)},cache:d?e.cache:getTrackedPluginCache(e.cache,useCustomTransformCache),emitAsset(t,i){h.push({name:t,source:i,type:"asset"});return e.emitAsset(t,i)},emitChunk(t,i){h.push({id:t,name:i&&i.name,type:"chunk"});return e.emitChunk(t,i)},emitFile(e){h.push(e);return i.emitFile(e)},error(t,i){if(typeof t==="string")t={message:t};if(i)augmentCodeLocation(t,i,f,n);t.id=n;t.hook="transform";return e.error(t)},getCombinedSourcemap(){const e=collapseSourcemap(n,l,o,r,s);if(!e){const e=new MagicString(l);return e.generateMap({hires:true,includeContent:true,source:n})}if(o!==e){o=e;r.length=0}return new SourceMap({...e,file:null,sourcesContent:e.sourcesContent})},setAssetSource(){return this.error({code:"INVALID_SETASSETSOURCE",message:`setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook.`})},warn(t,i){if(typeof t==="string")t={message:t};if(i)augmentCodeLocation(t,i,f,n);t.id=n;t.hook="transform";e.warn(t)}}}))}catch(e){throwPluginError(e,p,{hook:"transform",id:n})}if(!d){if(h.length)t.transformFiles=h}return{ast:c,code:m,customTransformCache:d,originalCode:l,originalSourcemap:o,sourcemapChain:r,transformDependencies:u}}const hr="resolveDependencies";class ModuleLoader{constructor(e,t,i,s){this.graph=e;this.modulesById=t;this.options=i;this.pluginDriver=s;this.implicitEntryModules=new Set;this.indexedEntryModules=[];this.latestLoadModulesPromise=Promise.resolve();this.moduleLoadPromises=new Map;this.modulesWithLoadedDependencies=new Set;this.nextChunkNamePriority=0;this.nextEntryModuleIndex=0;this.resolveId=async(e,t,i,s,n=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(this.options.external(e,t,false)?false:await resolveId(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,n,i,typeof s==="boolean"?s:!t),t,e));this.hasModuleSideEffects=i.treeshake?i.treeshake.moduleSideEffects:()=>true}async addAdditionalModules(e){const t=this.extendLoadModulesPromise(Promise.all(e.map((e=>this.loadEntryModule(e,false,undefined,null)))));await this.awaitLoadModulesPromise();return t}async addEntryModules(e,t){const i=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const s=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const n=await this.extendLoadModulesPromise(Promise.all(e.map((({id:e,importer:t})=>this.loadEntryModule(e,true,t,null)))).then((n=>{for(let r=0;r<n.length;r++){const o=n[r];o.isUserDefinedEntryPoint=o.isUserDefinedEntryPoint||t;addChunkNamesToModule(o,e[r],t,s+r);const l=this.indexedEntryModules.find((e=>e.module===o));if(!l){this.indexedEntryModules.push({index:i+r,module:o})}else{l.index=Math.min(l.index,i+r)}}this.indexedEntryModules.sort((({index:e},{index:t})=>e>t?1:-1));return n})));await this.awaitLoadModulesPromise();return{entryModules:this.indexedEntryModules.map((({module:e})=>e)),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:n}}async emitChunk({fileName:e,id:t,importer:i,name:s,implicitlyLoadedAfterOneOf:n,preserveSignature:r}){const o={fileName:e||null,id:t,importer:i,name:s||null};const l=n?await this.addEntryWithImplicitDependants(o,n):(await this.addEntryModules([o],false)).newEntryModules[0];if(r!=null){l.preserveSignature=r}return l}async preloadModule(e){const t=await this.fetchModule(this.getResolvedIdWithDefaults(e),undefined,false,e.resolveDependencies?hr:true);return t.info}addEntryWithImplicitDependants(e,t){const i=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,false,e.importer,null).then((async s=>{addChunkNamesToModule(s,e,false,i);if(!s.info.isEntry){this.implicitEntryModules.add(s);const i=await Promise.all(t.map((t=>this.loadEntryModule(t,false,e.importer,s.id))));for(const e of i){s.implicitlyLoadedAfter.add(e)}for(const e of s.implicitlyLoadedAfter){e.implicitlyLoadedBefore.add(s)}}return s})))}async addModuleSource(e,t,i){cs("load modules",3);let s;try{s=await this.graph.fileOperationQueue.run((async()=>{var t;return(t=await this.pluginDriver.hookFirst("load",[e]))!==null&&t!==void 0?t:await l.promises.readFile(e,"utf8")}))}catch(i){us("load modules",3);let s=`Could not load ${e}`;if(t)s+=` (imported by ${relativeId(t)})`;s+=`: ${i.message}`;i.message=s;throw i}us("load modules",3);const n=typeof s==="string"?{code:s}:s!=null&&typeof s==="object"&&typeof s.code==="string"?s:error(errBadLoader(e));const r=this.graph.cachedModules.get(e);if(r&&!r.customTransformCache&&r.originalCode===n.code&&!await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:r.ast,code:r.code,id:r.id,meta:r.meta,moduleSideEffects:r.moduleSideEffects,resolvedSources:r.resolvedIds,syntheticNamedExports:r.syntheticNamedExports}])){if(r.transformFiles){for(const e of r.transformFiles)this.pluginDriver.emitFile(e)}i.setSource(r)}else{i.updateOptions(n);i.setSource(await transform(n,i,this.pluginDriver,this.options.onwarn))}}async awaitLoadModulesPromise(){let e;do{e=this.latestLoadModulesPromise;await e}while(e!==this.latestLoadModulesPromise)}extendLoadModulesPromise(e){this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]);this.latestLoadModulesPromise.catch((()=>{}));return e}async fetchDynamicDependencies(e,t){const i=await Promise.all(t.map((t=>t.then((async([t,i])=>{if(i===null)return null;if(typeof i==="string"){t.resolution=i;return null}return t.resolution=await this.fetchResolvedDependency(relativeId(i.id),e.id,i)})))));for(const t of i){if(t){e.dynamicDependencies.add(t);t.dynamicImporters.push(e.id)}}}async fetchModule({id:e,meta:t,moduleSideEffects:i,syntheticNamedExports:s},n,r,o){const l=this.modulesById.get(e);if(l instanceof Module){await this.handleExistingModule(l,r,o);return l}const c=new Module(this.graph,e,this.options,r,i,s,t);this.modulesById.set(e,c);this.graph.watchFiles[e]=true;const u=this.addModuleSource(e,n,c).then((()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),h]));const h=waitForDependencyResolution(u).then((()=>this.pluginDriver.hookParallel("moduleParsed",[c.info])));h.catch((()=>{}));this.moduleLoadPromises.set(c,u);const d=await u;if(!o){await this.fetchModuleDependencies(c,...d)}else if(o===hr){await h}return c}async fetchModuleDependencies(e,t,i,s){if(this.modulesWithLoadedDependencies.has(e)){return}this.modulesWithLoadedDependencies.add(e);await Promise.all([this.fetchStaticDependencies(e,t),this.fetchDynamicDependencies(e,i)]);e.linkImports();await s}fetchResolvedDependency(e,t,i){if(i.external){const{external:s,id:n,moduleSideEffects:r,meta:o}=i;if(!this.modulesById.has(n)){this.modulesById.set(n,new ExternalModule(this.options,n,r,o,s!=="absolute"&&isAbsolute(n)))}const l=this.modulesById.get(n);if(!(l instanceof ExternalModule)){return error(errInternalIdCannotBeExternal(e,t))}return Promise.resolve(l)}return this.fetchModule(i,t,false,false)}async fetchStaticDependencies(e,t){for(const i of await Promise.all(t.map((t=>t.then((([t,i])=>this.fetchResolvedDependency(t,e.id,i))))))){e.dependencies.add(i);i.importers.push(e.id)}if(!this.options.treeshake||e.info.moduleSideEffects==="no-treeshake"){for(const t of e.dependencies){if(t instanceof Module){t.importedFromNotTreeshaken=true}}}}getNormalizedResolvedIdWithoutDefaults(e,t,i){const{makeAbsoluteExternalsRelative:s}=this.options;if(e){if(typeof e==="object"){const n=e.external||this.options.external(e.id,t,true);return{...e,external:n&&(n==="relative"||!isAbsolute(e.id)||n===true&&isNotAbsoluteExternal(e.id,i,s)||"absolute")}}const n=this.options.external(e,t,true);return{external:n&&(isNotAbsoluteExternal(e,i,s)||"absolute"),id:n&&s?normalizeRelativeExternalId(e,t):e}}const n=s?normalizeRelativeExternalId(i,t):i;if(e!==false&&!this.options.external(n,t,true)){return null}return{external:isNotAbsoluteExternal(n,i,s)||"absolute",id:n}}getResolveDynamicImportPromises(e){return e.dynamicImports.map((async t=>{const i=await this.resolveDynamicImport(e,typeof t.argument==="string"?t.argument:t.argument.esTreeNode,e.id);if(i&&typeof i==="object"){t.id=i.id}return[t,i]}))}getResolveStaticDependencyPromises(e){return Array.from(e.sources,(async t=>[t,e.resolvedIds[t]=e.resolvedIds[t]||this.handleResolveId(await this.resolveId(t,e.id,Q,false),t,e.id)]))}getResolvedIdWithDefaults(e){var t,i;if(!e){return null}const s=e.external||false;return{external:s,id:e.id,meta:e.meta||{},moduleSideEffects:(t=e.moduleSideEffects)!==null&&t!==void 0?t:this.hasModuleSideEffects(e.id,!!s),syntheticNamedExports:(i=e.syntheticNamedExports)!==null&&i!==void 0?i:false}}async handleExistingModule(e,t,i){const s=this.moduleLoadPromises.get(e);if(i){return i===hr?waitForDependencyResolution(s):s}if(t){e.info.isEntry=true;this.implicitEntryModules.delete(e);for(const t of e.implicitlyLoadedAfter){t.implicitlyLoadedBefore.delete(e)}e.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(e,...await s)}handleResolveId(e,t,i){if(e===null){if(isRelative(t)){return error(errUnresolvedImport(t,i))}this.options.onwarn(errUnresolvedImportTreatedAsExternal(t,i));return{external:true,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,true),syntheticNamedExports:false}}else if(e.external&&e.syntheticNamedExports){this.options.onwarn(errExternalSyntheticExports(t,i))}return e}async loadEntryModule(e,t,i,s){const n=await resolveId(e,i,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,Q,true);if(n==null){return error(s===null?errUnresolvedEntry(e):errUnresolvedImplicitDependant(e,s))}if(n===false||typeof n==="object"&&n.external){return error(s===null?errEntryCannotBeExternal(e):errImplicitDependantCannotBeExternal(e,s))}return this.fetchModule(this.getResolvedIdWithDefaults(typeof n==="object"?n:{id:n}),undefined,t,false)}async resolveDynamicImport(e,t,i){var s;var n;const r=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,i]);if(typeof t!=="string"){if(typeof r==="string"){return r}if(!r){return null}return{external:false,moduleSideEffects:true,...r}}if(r==null){return(s=(n=e.resolvedIds)[t])!==null&&s!==void 0?s:n[t]=this.handleResolveId(await this.resolveId(t,e.id,Q,false),t,e.id)}return this.handleResolveId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(r,i,t)),t,i)}}function normalizeRelativeExternalId(e,t){return isRelative(e)?t?s.resolve(t,"..",e):s.resolve(e):e}function addChunkNamesToModule(e,{fileName:t,name:i},s,n){var r;if(t!==null){e.chunkFileNames.add(t)}else if(i!==null){let t=0;while(((r=e.chunkNames[t])===null||r===void 0?void 0:r.priority)<n)t++;e.chunkNames.splice(t,0,{isUserDefined:s,name:i,priority:n})}}function isNotAbsoluteExternal(e,t,i){return i===true||i==="ifRelativeSource"&&isRelative(t)||!isAbsolute(e)}async function waitForDependencyResolution(e){const[t,i]=await e;return Promise.all([...t,...i])}class GlobalScope extends Scope$1{constructor(){super();this.parent=null;this.variables.set("undefined",new UndefinedVariable)}findVariable(e){let t=this.variables.get(e);if(!t){t=new GlobalVariable(e);this.variables.set(e,t)}return t}}function getDeprecatedContextHandler(e,t,i,s,n,r){let o=false;return(...l)=>{if(!o){o=true;warnDeprecation({message:`The "this.${t}" plugin context function used by plugin ${s} is deprecated. The "this.${i}" plugin context function should be used instead.`,plugin:s},n,r)}return e(...l)}}function getPluginContext(e,t,i,s,n,r){let o=true;if(typeof e.cacheKey!=="string"){if(e.name.startsWith(or)||e.name.startsWith(lr)||r.has(e.name)){o=false}else{r.add(e.name)}}let l;if(!t){l=ur}else if(o){const i=e.cacheKey||e.name;l=createPluginCache(t[i]||(t[i]=Object.create(null)))}else{l=getCacheForUncacheablePlugin(e.name)}return{addWatchFile(e){if(i.phase>=os.GENERATE){return this.error(errInvalidRollupPhaseForAddWatchFile())}i.watchFiles[e]=true},cache:l,emitAsset:getDeprecatedContextHandler(((e,t)=>n.emitFile({name:e,source:t,type:"asset"})),"emitAsset","emitFile",e.name,true,s),emitChunk:getDeprecatedContextHandler(((e,t)=>n.emitFile({id:e,name:t&&t.name,type:"chunk"})),"emitChunk","emitFile",e.name,true,s),emitFile:n.emitFile.bind(n),error(t){return throwPluginError(t,e.name)},getAssetFileName:getDeprecatedContextHandler(n.getFileName,"getAssetFileName","getFileName",e.name,true,s),getChunkFileName:getDeprecatedContextHandler(n.getFileName,"getChunkFileName","getFileName",e.name,true,s),getFileName:n.getFileName,getModuleIds:()=>i.modulesById.keys(),getModuleInfo:i.getModuleInfo,getWatchFiles:()=>Object.keys(i.watchFiles),isExternal:getDeprecatedContextHandler(((e,t,i=false)=>s.external(e,t,i)),"isExternal","resolve",e.name,true,s),load(e){return i.moduleLoader.preloadModule(e)},meta:{rollupVersion:u,watchMode:i.watchMode},get moduleIds(){function*wrappedModuleIds(){warnDeprecation({message:`Accessing "this.moduleIds" on the plugin context by plugin ${e.name} is deprecated. The "this.getModuleIds" plugin context function should be used instead.`,plugin:e.name},false,s);yield*t}const t=i.modulesById.keys();return wrappedModuleIds()},parse:i.contextParse.bind(i),resolve(t,s,{custom:n,isEntry:r,skipSelf:o}=X){return i.moduleLoader.resolveId(t,s,n,r,o?[{importer:s,plugin:e,source:t}]:null)},resolveId:getDeprecatedContextHandler(((e,t)=>i.moduleLoader.resolveId(e,t,X,undefined).then((e=>e&&e.id))),"resolveId","resolve",e.name,true,s),setAssetSource:n.setAssetSource,warn(t){if(typeof t==="string")t={message:t};if(t.code)t.pluginCode=t.code;t.code="PLUGIN_WARNING";t.plugin=e.name;s.onwarn(t)}}}const dr={buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1};const pr=Object.keys(dr);class PluginDriver{constructor(e,t,i,s,n){this.graph=e;this.options=t;this.pluginCache=s;this.sortedPlugins=new Map;this.unfulfilledActions=new Set;warnDeprecatedHooks(i,t);this.fileEmitter=new FileEmitter(e,t,n&&n.fileEmitter);this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter);this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter);this.finaliseAssets=this.fileEmitter.assertAssetsFinalized.bind(this.fileEmitter);this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter);this.plugins=i.concat(n?n.plugins:[]);const r=new Set;this.pluginContexts=new Map(this.plugins.map((i=>[i,getPluginContext(i,s,e,t,this.fileEmitter,r)])));if(n){for(const e of i){for(const i of pr){if(i in e){t.onwarn(errInputHookInOutputPlugin(e.name,i))}}}}}createOutputPluginDriver(e){return new PluginDriver(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,t,i,s){let n=Promise.resolve(null);for(const r of this.getSortedPlugins(e)){if(s&&s.has(r))continue;n=n.then((s=>{if(s!=null)return s;return this.runHook(e,t,r,i)}))}return n}hookFirstSync(e,t,i){for(const s of this.getSortedPlugins(e)){const n=this.runHookSync(e,t,s,i);if(n!=null)return n}return null}async hookParallel(e,t,i){const s=[];for(const n of this.getSortedPlugins(e)){if(n[e].sequential){await Promise.all(s);s.length=0;await this.runHook(e,t,n,i)}else{s.push(this.runHook(e,t,n,i))}}await Promise.all(s)}hookReduceArg0(e,[t,...i],s,n){let r=Promise.resolve(t);for(const t of this.getSortedPlugins(e)){r=r.then((r=>this.runHook(e,[r,...i],t,n).then((e=>s.call(this.pluginContexts.get(t),r,e,t)))))}return r}hookReduceArg0Sync(e,[t,...i],s,n){for(const r of this.getSortedPlugins(e)){const o=[t,...i];const l=this.runHookSync(e,o,r,n);t=s.call(this.pluginContexts.get(r),t,l,r)}return t}async hookReduceValue(e,t,i,s){const n=[];const r=[];for(const t of this.getSortedPlugins(e,validateAddonPluginHandler)){if(t[e].sequential){n.push(...await Promise.all(r));r.length=0;n.push(await this.runHook(e,i,t))}else{r.push(this.runHook(e,i,t))}}n.push(...await Promise.all(r));return n.reduce(s,await t)}hookReduceValueSync(e,t,i,s,n){let r=t;for(const t of this.getSortedPlugins(e)){const o=this.runHookSync(e,i,t,n);r=s.call(this.pluginContexts.get(t),r,o,t)}return r}hookSeq(e,t,i){let s=Promise.resolve();for(const n of this.getSortedPlugins(e)){s=s.then((()=>this.runHook(e,t,n,i)))}return s.then(noReturn)}getSortedPlugins(e,t){return getOrCreate(this.sortedPlugins,e,(()=>getSortedValidatedPlugins(e,this.plugins,t)))}runHook(e,t,i,s){const n=i[e];const r=typeof n==="object"?n.handler:n;let o=this.pluginContexts.get(i);if(s){o=s(o,i)}let l=null;return Promise.resolve().then((()=>{if(typeof r!=="function"){return r}const s=r.apply(o,t);if(!(s===null||s===void 0?void 0:s.then)){return s}l=[i.name,e,t];this.unfulfilledActions.add(l);return Promise.resolve(s).then((e=>{this.unfulfilledActions.delete(l);return e}))})).catch((t=>{if(l!==null){this.unfulfilledActions.delete(l)}return throwPluginError(t,i.name,{hook:e})}))}runHookSync(e,t,i,s){const n=i[e];const r=typeof n==="object"?n.handler:n;let o=this.pluginContexts.get(i);if(s){o=s(o,i)}try{return r.apply(o,t)}catch(t){return throwPluginError(t,i.name,{hook:e})}}}function getSortedValidatedPlugins(e,t,i=validateFunctionPluginHandler){const s=[];const n=[];const r=[];for(const o of t){const t=o[e];if(t){if(typeof t==="object"){i(t.handler,e,o);if(t.order==="pre"){s.push(o);continue}if(t.order==="post"){r.push(o);continue}}else{i(t,e,o)}n.push(o)}}return[...s,...n,...r]}function validateFunctionPluginHandler(e,t,i){if(typeof e!=="function"){error(errInvalidFunctionPluginHook(t,i.name))}}function validateAddonPluginHandler(e,t,i){if(typeof e!=="string"&&typeof e!=="function"){return error(errInvalidAddonPluginHook(t,i.name))}}function noReturn(){}class Queue{constructor(e){this.maxParallel=e;this.queue=[];this.workerCount=0}run(e){return new Promise(((t,i)=>{this.queue.push({reject:i,resolve:t,task:e});this.work()}))}async work(){if(this.workerCount>=this.maxParallel)return;this.workerCount++;let e;while(e=this.queue.shift()){const{reject:t,resolve:i,task:s}=e;try{const e=await s();i(e)}catch(e){t(e)}}this.workerCount--}}function normalizeEntryModules(e){if(Array.isArray(e)){return e.map((e=>({fileName:null,id:e,implicitlyLoadedAfter:[],importer:undefined,name:null})))}return Object.entries(e).map((([e,t])=>({fileName:null,id:t,implicitlyLoadedAfter:[],importer:undefined,name:e})))}class Graph{constructor(e,t){var i,s;this.options=e;this.cachedModules=new Map;this.deoptimizationTracker=new PathTracker;this.entryModules=[];this.modulesById=new Map;this.needsTreeshakingPass=false;this.phase=os.LOAD_AND_PARSE;this.scope=new GlobalScope;this.watchFiles=Object.create(null);this.watchMode=false;this.externalModules=[];this.implicitEntryModules=[];this.modules=[];this.getModuleInfo=e=>{const t=this.modulesById.get(e);if(!t)return null;return t.info};if(e.cache!==false){if((i=e.cache)===null||i===void 0?void 0:i.modules){for(const t of e.cache.modules)this.cachedModules.set(t.id,t)}this.pluginCache=((s=e.cache)===null||s===void 0?void 0:s.plugins)||Object.create(null);for(const e in this.pluginCache){const t=this.pluginCache[e];for(const e of Object.values(t))e[0]++}}if(t){this.watchMode=true;const handleChange=(...e)=>this.pluginDriver.hookParallel("watchChange",e);const handleClose=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentAwaited("change",handleChange);t.onCurrentAwaited("close",handleClose)}this.pluginDriver=new PluginDriver(this,e,e.plugins,this.pluginCache);this.acornParser=mn.extend(...e.acornInjectPlugins);this.moduleLoader=new ModuleLoader(this,this.modulesById,this.options,this.pluginDriver);this.fileOperationQueue=new Queue(e.maxParallelFileOps)}async build(){cs("generate module graph",2);await this.generateModuleGraph();us("generate module graph",2);cs("sort modules",2);this.phase=os.ANALYSE;this.sortModules();us("sort modules",2);cs("mark included statements",2);this.includeStatements();us("mark included statements",2);this.phase=os.GENERATE}contextParse(e,t={}){const i=t.onComment;const s=[];if(i&&typeof i=="function"){t.onComment=(e,n,r,o,...l)=>{s.push({end:o,start:r,type:e?"Block":"Line",value:n});return i.call(t,e,n,r,o,...l)}}else{t.onComment=s}const n=this.acornParser.parse(e,{...this.options.acorn,...t});if(typeof i=="object"){i.push(...s)}t.onComment=i;addAnnotations(s,n,e);return n}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let i=true;for(const[e,s]of Object.entries(t)){if(s[0]>=this.options.experimentalCacheExpiry)delete t[e];else i=false}if(i)delete this.pluginCache[e]}return{modules:this.modules.map((e=>e.toJSON())),plugins:this.pluginCache}}async generateModuleGraph(){({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules(normalizeEntryModules(this.options.input),true));if(this.entryModules.length===0){throw new Error("You must supply options.input to rollup")}for(const e of this.modulesById.values()){if(e instanceof Module){this.modules.push(e)}else{this.externalModules.push(e)}}}includeStatements(){for(const e of[...this.entryModules,...this.implicitEntryModules]){markModuleAndImpureDependenciesAsExecuted(e)}if(this.options.treeshake){let e=1;do{cs(`treeshaking pass ${e}`,3);this.needsTreeshakingPass=false;for(const e of this.modules){if(e.isExecuted){if(e.info.moduleSideEffects==="no-treeshake"){e.includeAllInBundle()}else{e.include()}}}if(e===1){for(const e of[...this.entryModules,...this.implicitEntryModules]){if(e.preserveSignature!==false){e.includeAllExports(false);this.needsTreeshakingPass=true}}}us(`treeshaking pass ${e++}`,3)}while(this.needsTreeshakingPass)}else{for(const e of this.modules)e.includeAllInBundle()}for(const e of this.externalModules)e.warnUnusedImports();for(const e of this.implicitEntryModules){for(const t of e.implicitlyLoadedAfter){if(!(t.info.isEntry||t.isIncluded())){error(errImplicitDependantIsNotIncluded(t))}}}}sortModules(){const{orderedModules:e,cyclePaths:t}=analyseModuleExecution(this.entryModules);for(const e of t){this.options.onwarn({code:"CIRCULAR_DEPENDENCY",cycle:e,importer:e[0],message:`Circular dependency: ${e.join(" -> ")}`})}this.modules=e;for(const e of this.modules){e.bindReferences()}this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules){for(const t of e.importDescriptions.values()){if(t.name!=="*"&&!t.module.getVariableForExportName(t.name)[0]){e.warn({code:"NON_EXISTENT_EXPORT",message:`Non-existent export '${t.name}' is imported from ${relativeId(t.module.id)}`,name:t.name,source:t.module.id},t.start)}}}}}function formatAction([e,t,i]){const s=`(${e}) ${t}`;const n=JSON.stringify;switch(t){case"resolveId":return`${s} ${n(i[0])} ${n(i[1])}`;case"load":return`${s} ${n(i[0])}`;case"transform":return`${s} ${n(i[1])}`;case"shouldTransformCachedModule":return`${s} ${n(i[0].id)}`;case"moduleParsed":return`${s} ${n(i[0].id)}`}return s}const fr="beforeExit";const mr=new c.EventEmitter;mr.setMaxListeners(0);n.on(fr,(()=>mr.emit(fr)));async function catchUnfinishedHookActions(e,t){let i;const s=new Promise(((t,s)=>{i=()=>{const t=e.getUnfulfilledHookActions();s(new Error(`Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:\n`+[...t].map(formatAction).join("\n")))};mr.once(fr,i)}));const n=await Promise.race([t(),s]);mr.off(fr,i);return n}function normalizeInputOptions(e){var t,i,s;const n=new Set;const r=(t=e.context)!==null&&t!==void 0?t:"undefined";const o=getOnwarn(e);const l=e.strictDeprecations||false;const c=getmaxParallelFileOps(e,o,l);const u={acorn:getAcorn(e),acornInjectPlugins:getAcornInjectPlugins(e),cache:getCache(e),context:r,experimentalCacheExpiry:(i=e.experimentalCacheExpiry)!==null&&i!==void 0?i:10,external:getIdMatcher(e.external),inlineDynamicImports:getInlineDynamicImports$1(e,o,l),input:getInput(e),makeAbsoluteExternalsRelative:(s=e.makeAbsoluteExternalsRelative)!==null&&s!==void 0?s:true,manualChunks:getManualChunks$1(e,o,l),maxParallelFileOps:c,maxParallelFileReads:c,moduleContext:getModuleContext(e,r),onwarn:o,perf:e.perf||false,plugins:ensureArray$1(e.plugins),preserveEntrySignatures:getPreserveEntrySignatures(e,n),preserveModules:getPreserveModules$1(e,o,l),preserveSymlinks:e.preserveSymlinks||false,shimMissingExports:e.shimMissingExports||false,strictDeprecations:l,treeshake:getTreeshake(e,o,l)};warnUnknownOptions(e,[...Object.keys(u),"watch"],"input options",u.onwarn,/^(output)$/);return{options:u,unsetOptions:n}}const getOnwarn=e=>{const{onwarn:t}=e;return t?e=>{e.toString=()=>{let t="";if(e.plugin)t+=`(${e.plugin} plugin) `;if(e.loc)t+=`${relativeId(e.loc.file)} (${e.loc.line}:${e.loc.column}) `;t+=e.message;return t};t(e,defaultOnWarn)}:defaultOnWarn};const getAcorn=e=>({allowAwaitOutsideFunction:true,ecmaVersion:"latest",preserveParens:false,sourceType:"module",...e.acorn});const getAcornInjectPlugins=e=>ensureArray$1(e.acornInjectPlugins);const getCache=e=>{var t;return((t=e.cache)===null||t===void 0?void 0:t.cache)||e.cache};const getIdMatcher=e=>{if(e===true){return()=>true}if(typeof e==="function"){return(t,...i)=>!t.startsWith("\0")&&e(t,...i)||false}if(e){const t=new Set;const i=[];for(const s of ensureArray$1(e)){if(s instanceof RegExp){i.push(s)}else{t.add(s)}}return(e,...s)=>t.has(e)||i.some((t=>t.test(e)))}return()=>false};const getInlineDynamicImports$1=(e,t,i)=>{const s=e.inlineDynamicImports;if(s){warnDeprecationWithOptions('The "inlineDynamicImports" option is deprecated. Use the "output.inlineDynamicImports" option instead.',false,t,i)}return s};const getInput=e=>{const t=e.input;return t==null?[]:typeof t==="string"?[t]:t};const getManualChunks$1=(e,t,i)=>{const s=e.manualChunks;if(s){warnDeprecationWithOptions('The "manualChunks" option is deprecated. Use the "output.manualChunks" option instead.',false,t,i)}return s};const getmaxParallelFileOps=(e,t,i)=>{var s;const n=e.maxParallelFileReads;if(typeof n==="number"){warnDeprecationWithOptions('The "maxParallelFileReads" option is deprecated. Use the "maxParallelFileOps" option instead.',false,t,i)}const r=(s=e.maxParallelFileOps)!==null&&s!==void 0?s:n;if(typeof r==="number"){if(r<=0)return Infinity;return r}return 20};const getModuleContext=(e,t)=>{const i=e.moduleContext;if(typeof i==="function"){return e=>{var s;return(s=i(e))!==null&&s!==void 0?s:t}}if(i){const e=Object.create(null);for(const[t,n]of Object.entries(i)){e[s.resolve(t)]=n}return i=>e[i]||t}return()=>t};const getPreserveEntrySignatures=(e,t)=>{const i=e.preserveEntrySignatures;if(i==null){t.add("preserveEntrySignatures")}return i!==null&&i!==void 0?i:"strict"};const getPreserveModules$1=(e,t,i)=>{const s=e.preserveModules;if(s){warnDeprecationWithOptions('The "preserveModules" option is deprecated. Use the "output.preserveModules" option instead.',false,t,i)}return s};const getTreeshake=(e,t,i)=>{const s=e.treeshake;if(s===false){return false}const n=getOptionWithPreset(e.treeshake,y,"treeshake","false, true, ");if(typeof n.pureExternalModules!=="undefined"){warnDeprecationWithOptions(`The "treeshake.pureExternalModules" option is deprecated. The "treeshake.moduleSideEffects" option should be used instead. "treeshake.pureExternalModules: true" is equivalent to "treeshake.moduleSideEffects: 'no-external'"`,true,t,i)}return{annotations:n.annotations!==false,correctVarValueBeforeDeclaration:n.correctVarValueBeforeDeclaration===true,moduleSideEffects:typeof s==="object"&&s.pureExternalModules?getHasModuleSideEffects(s.moduleSideEffects,s.pureExternalModules):getHasModuleSideEffects(n.moduleSideEffects,undefined),propertyReadSideEffects:n.propertyReadSideEffects==="always"?"always":n.propertyReadSideEffects!==false,tryCatchDeoptimization:n.tryCatchDeoptimization!==false,unknownGlobalSideEffects:n.unknownGlobalSideEffects!==false}};const getHasModuleSideEffects=(e,t)=>{if(typeof e==="boolean"){return()=>e}if(e==="no-external"){return(e,t)=>!t}if(typeof e==="function"){return(t,i)=>!t.startsWith("\0")?e(t,i)!==false:true}if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}if(e){error(errInvalidOption("treeshake.moduleSideEffects","treeshake",'please use one of false, "no-external", a function or an array'))}const i=getIdMatcher(t);return(e,t)=>!(t&&i(e))};const gr=/[\x00-\x1F\x7F<>*#"{}|^[\]`;?:&=+$,]/g;const yr=/^[a-z]:/i;function sanitizeFileName(e){const t=yr.exec(e);const i=t?t[0]:"";return i+e.substr(i.length).replace(gr,"_")}function isValidUrl(e){try{new URL(e)}catch(e){return false}return true}function normalizeOutputOptions(e,t,i){var s,n,r,o,l,c,u;const h=new Set(i);const d=e.compact||false;const p=getFormat(e);const f=getInlineDynamicImports(e,t);const m=getPreserveModules(e,f,t);const g=getFile(e,m,t);const y=getPreferConst(e,t);const E=getGeneratedCode(e,y);const x={amd:getAmd(e),assetFileNames:(s=e.assetFileNames)!==null&&s!==void 0?s:"assets/[name]-[hash][extname]",banner:getAddon(e,"banner"),chunkFileNames:(n=e.chunkFileNames)!==null&&n!==void 0?n:"[name]-[hash].js",compact:d,dir:getDir(e,g),dynamicImportFunction:getDynamicImportFunction(e,t),entryFileNames:getEntryFileNames(e,h),esModule:(r=e.esModule)!==null&&r!==void 0?r:true,exports:getExports(e,h),extend:e.extend||false,externalLiveBindings:(o=e.externalLiveBindings)!==null&&o!==void 0?o:true,file:g,footer:getAddon(e,"footer"),format:p,freeze:(l=e.freeze)!==null&&l!==void 0?l:true,generatedCode:E,globals:e.globals||{},hoistTransitiveImports:(c=e.hoistTransitiveImports)!==null&&c!==void 0?c:true,indent:getIndent(e,d),inlineDynamicImports:f,interop:getInterop(e,t),intro:getAddon(e,"intro"),manualChunks:getManualChunks(e,f,m,t),minifyInternalExports:getMinifyInternalExports(e,p,d),name:e.name,namespaceToStringTag:getNamespaceToStringTag(e,E,t),noConflict:e.noConflict||false,outro:getAddon(e,"outro"),paths:e.paths||{},plugins:ensureArray$1(e.plugins),preferConst:y,preserveModules:m,preserveModulesRoot:getPreserveModulesRoot(e),sanitizeFileName:typeof e.sanitizeFileName==="function"?e.sanitizeFileName:e.sanitizeFileName===false?e=>e:sanitizeFileName,sourcemap:e.sourcemap||false,sourcemapBaseUrl:getSourcemapBaseUrl(e),sourcemapExcludeSources:e.sourcemapExcludeSources||false,sourcemapFile:e.sourcemapFile,sourcemapPathTransform:e.sourcemapPathTransform,strict:(u=e.strict)!==null&&u!==void 0?u:true,systemNullSetters:e.systemNullSetters||false,validate:e.validate||false};warnUnknownOptions(e,Object.keys(x),"output options",t.onwarn);return{options:x,unsetOptions:h}}const getFile=(e,t,i)=>{const{file:s}=e;if(typeof s==="string"){if(t){return error(errInvalidOption("output.file","outputdir",'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'))}if(!Array.isArray(i.input))return error(errInvalidOption("output.file","outputdir",'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s};const getFormat=e=>{const t=e.format;switch(t){case undefined:case"es":case"esm":case"module":return"es";case"cjs":case"commonjs":return"cjs";case"system":case"systemjs":return"system";case"amd":case"iife":case"umd":return t;default:return error({message:`You must specify "output.format", which can be one of "amd", "cjs", "system", "es", "iife" or "umd".`,url:`https://rollupjs.org/guide/en/#outputformat`})}};const getInlineDynamicImports=(e,t)=>{var i;const s=((i=e.inlineDynamicImports)!==null&&i!==void 0?i:t.inlineDynamicImports)||false;const{input:n}=t;if(s&&(Array.isArray(n)?n:Object.keys(n)).length>1){return error(errInvalidOption("output.inlineDynamicImports","outputinlinedynamicimports",'multiple inputs are not supported when "output.inlineDynamicImports" is true'))}return s};const getPreserveModules=(e,t,i)=>{var s;const n=((s=e.preserveModules)!==null&&s!==void 0?s:i.preserveModules)||false;if(n){if(t){return error(errInvalidOption("output.inlineDynamicImports","outputinlinedynamicimports",`this option is not supported for "output.preserveModules"`))}if(i.preserveEntrySignatures===false){return error(errInvalidOption("preserveEntrySignatures","preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}}return n};const getPreferConst=(e,t)=>{const i=e.preferConst;if(i!=null){warnDeprecation(`The "output.preferConst" option is deprecated. Use the "output.generatedCode.constBindings" option instead.`,false,t)}return!!i};const getPreserveModulesRoot=e=>{const{preserveModulesRoot:t}=e;if(t===null||t===undefined){return undefined}return s.resolve(t)};const getAmd=e=>{const t={autoId:false,basePath:"",define:"define",forceJsExtensionForImports:false,...e.amd};if((t.autoId||t.basePath)&&t.id){return error(errInvalidOption("output.amd.id","outputamd",'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"'))}if(t.basePath&&!t.autoId){return error(errInvalidOption("output.amd.basePath","outputamd",'this option only works with "output.amd.autoId"'))}let i;if(t.autoId){i={autoId:true,basePath:t.basePath,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports}}else{i={autoId:false,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports,id:t.id}}return i};const getAddon=(e,t)=>{const i=e[t];if(typeof i==="function"){return i}return()=>i||""};const getDir=(e,t)=>{const{dir:i}=e;if(typeof i==="string"&&typeof t==="string"){return error(errInvalidOption("output.dir","outputdir",'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks'))}return i};const getDynamicImportFunction=(e,t)=>{const i=e.dynamicImportFunction;if(i){warnDeprecation(`The "output.dynamicImportFunction" option is deprecated. Use the "renderDynamicImport" plugin hook instead.`,false,t)}return i};const getEntryFileNames=(e,t)=>{const i=e.entryFileNames;if(i==null){t.add("entryFileNames")}return i!==null&&i!==void 0?i:"[name].js"};function getExports(e,t){const i=e.exports;if(i==null){t.add("exports")}else if(!["default","named","none","auto"].includes(i)){return error(errInvalidExportOptionValue(i))}return i||"auto"}const getGeneratedCode=(e,t)=>{const i=getOptionWithPreset(e.generatedCode,E,"output.generatedCode","");return{arrowFunctions:i.arrowFunctions===true,constBindings:i.constBindings===true||t,objectShorthand:i.objectShorthand===true,reservedNamesAsProps:i.reservedNamesAsProps===true,symbols:i.symbols===true}};const getIndent=(e,t)=>{if(t){return""}const i=e.indent;return i===false?"":i!==null&&i!==void 0?i:true};const Er=new Set(["auto","esModule","default","defaultOnly",true,false]);const getInterop=(e,t)=>{const i=e.interop;const s=new Set;const validateInterop=e=>{if(!s.has(e)){s.add(e);if(!Er.has(e)){return error(errInvalidOption("output.interop","outputinterop",`use one of ${Array.from(Er,(e=>JSON.stringify(e))).join(", ")}`,e))}if(typeof e==="boolean"){warnDeprecation({message:`The boolean value "${e}" for the "output.interop" option is deprecated. Use ${e?'"auto"':'"esModule", "default" or "defaultOnly"'} instead.`,url:"https://rollupjs.org/guide/en/#outputinterop"},false,t)}}return e};if(typeof i==="function"){const e=Object.create(null);let t=null;return s=>s===null?t||validateInterop(t=i(s)):s in e?e[s]:validateInterop(e[s]=i(s))}return i===undefined?()=>true:()=>validateInterop(i)};const getManualChunks=(e,t,i,s)=>{const n=e.manualChunks||s.manualChunks;if(n){if(t){return error(errInvalidOption("output.manualChunks","outputmanualchunks",'this option is not supported for "output.inlineDynamicImports"'))}if(i){return error(errInvalidOption("output.manualChunks","outputmanualchunks",'this option is not supported for "output.preserveModules"'))}}return n||{}};const getMinifyInternalExports=(e,t,i)=>{var s;return(s=e.minifyInternalExports)!==null&&s!==void 0?s:i||t==="es"||t==="system"};const getNamespaceToStringTag=(e,t,i)=>{const s=e.namespaceToStringTag;if(s!=null){warnDeprecation(`The "output.namespaceToStringTag" option is deprecated. Use the "output.generatedCode.symbols" option instead.`,false,i);return s}return t.symbols||false};const getSourcemapBaseUrl=e=>{const{sourcemapBaseUrl:t}=e;if(t){if(isValidUrl(t)){return t}return error(errInvalidOption("output.sourcemapBaseUrl","outputsourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`))}};function rollup(e){return rollupInternal(e,null)}async function rollupInternal(e,t){const{options:i,unsetOptions:s}=await getInputOptions(e,t!==null);initialiseTimers(i);const n=new Graph(i,t);const r=e.cache!==false;delete i.cache;delete e.cache;cs("BUILD",1);await catchUnfinishedHookActions(n.pluginDriver,(async()=>{try{await n.pluginDriver.hookParallel("buildStart",[i]);await n.build()}catch(e){const t=Object.keys(n.watchFiles);if(t.length>0){e.watchFiles=t}await n.pluginDriver.hookParallel("buildEnd",[e]);await n.pluginDriver.hookParallel("closeBundle",[]);throw e}await n.pluginDriver.hookParallel("buildEnd",[])}));us("BUILD",1);const o={cache:r?n.getCache():undefined,async close(){if(o.closed)return;o.closed=true;await n.pluginDriver.hookParallel("closeBundle",[])},closed:false,async generate(e){if(o.closed)return error(errAlreadyClosed());return handleGenerateWrite(false,i,s,e,n)},watchFiles:Object.keys(n.watchFiles),async write(e){if(o.closed)return error(errAlreadyClosed());return handleGenerateWrite(true,i,s,e,n)}};if(i.perf)o.getTimings=getTimings;return o}async function getInputOptions(e,t){if(!e){throw new Error("You must supply an options object to rollup")}const i=getSortedValidatedPlugins("options",ensureArray$1(e.plugins));const{options:s,unsetOptions:n}=normalizeInputOptions(await i.reduce(applyOptionHook(t),Promise.resolve(e)));normalizePlugins(s.plugins,or);return{options:s,unsetOptions:n}}function applyOptionHook(e){return async(t,i)=>{const s="handler"in i.options?i.options.handler:i.options;return await s.call({meta:{rollupVersion:u,watchMode:e}},await t)||t}}function normalizePlugins(e,t){e.forEach(((e,i)=>{if(!e.name){e.name=`${t}${i+1}`}}))}function handleGenerateWrite(e,t,i,s,n){const{options:r,outputPluginDriver:o,unsetOptions:l}=getOutputOptionsAndPluginDriver(s,n.pluginDriver,t,i);return catchUnfinishedHookActions(o,(async()=>{const i=new Bundle(r,l,t,o,n);const s=await i.generate(e);if(e){if(!r.dir&&!r.file){return error({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.'})}await Promise.all(Object.values(s).map((e=>n.fileOperationQueue.run((()=>writeOutputFile(e,r))))));await o.hookParallel("writeBundle",[r,s])}return createOutput(s)}))}function getOutputOptionsAndPluginDriver(e,t,i,s){if(!e){throw new Error("You must supply an options object")}const n=ensureArray$1(e.plugins);normalizePlugins(n,lr);const r=t.createOutputPluginDriver(n);return{...getOutputOptions(i,s,e,r),outputPluginDriver:r}}function getOutputOptions(e,t,i,s){return normalizeOutputOptions(s.hookReduceArg0Sync("outputOptions",[i.output||i],((e,t)=>t||e),(e=>{const emitError=()=>e.error(errCannotEmitFromOptionsHook());return{...e,emitFile:emitError,setAssetSource:emitError}})),e,t)}function createOutput(e){return{output:Object.values(e).filter((e=>Object.keys(e).length>0)).sort(((e,t)=>{const i=getSortingFileType(e);const s=getSortingFileType(t);if(i===s)return 0;return i<s?-1:1}))}}var xr;(function(e){e[e["ENTRY_CHUNK"]=0]="ENTRY_CHUNK";e[e["SECONDARY_CHUNK"]=1]="SECONDARY_CHUNK";e[e["ASSET"]=2]="ASSET"})(xr||(xr={}));function getSortingFileType(e){if(e.type==="asset"){return xr.ASSET}if(e.isEntry){return xr.ENTRY_CHUNK}return xr.SECONDARY_CHUNK}async function writeOutputFile(e,i){const n=s.resolve(i.dir||s.dirname(i.file),e.fileName);await l.promises.mkdir(s.dirname(n),{recursive:true});let r;let o;if(e.type==="asset"){o=e.source}else{o=e.code;if(i.sourcemap&&e.map){let c;if(i.sourcemap==="inline"){c=e.map.toUrl()}else{const{sourcemapBaseUrl:t}=i;const o=`${s.basename(e.fileName)}.map`;c=t?new URL(o,t).toString():o;r=l.promises.writeFile(`${n}.map`,e.map.toString())}if(i.sourcemap!=="hidden"){o+=`//# ${t.SOURCEMAPPING_URL}=${c}\n`}}}return Promise.all([l.promises.writeFile(n,o),r])}function defineConfig(e){return e}class WatchEmitter extends c.EventEmitter{constructor(){super();this.awaitedHandlers=Object.create(null);this.setMaxListeners(Infinity)}async close(){}emitAndAwait(e,...t){this.emit(e,...t);return Promise.all(this.getHandlers(e).map((e=>e(...t))))}onCurrentAwaited(e,t){this.getHandlers(e).push(t);return this}removeAwaited(){this.awaitedHandlers={};return this}getHandlers(e){return this.awaitedHandlers[e]||(this.awaitedHandlers[e]=[])}}function watch(e){const t=new WatchEmitter;const s=ensureArray$1(e);const n=s.filter((e=>e.watch!==false));if(n.length===0){return error(errInvalidOption("watch","watch",'there must be at least one config where "watch" is not set to "false"'))}loadFsEvents().then((()=>Promise.resolve().then((()=>i(652))))).then((({Watcher:e})=>new e(n,t)));return t}t.commonjsGlobal=S;t.createFilter=lt;t.defaultOnWarn=defaultOnWarn;t.defineConfig=defineConfig;t.ensureArray=ensureArray$1;t.error=error;t.fseventsImporter=b;t.generatedCodePresets=E;t.getAliasName=getAliasName;t.getAugmentedNamespace=getAugmentedNamespace;t.getOrCreate=getOrCreate;t.loadFsEvents=loadFsEvents;t.objectifyOption=objectifyOption;t.objectifyOptionWithPresets=objectifyOptionWithPresets;t.picomatch=ie;t.printQuotedStringList=printQuotedStringList;t.relativeId=relativeId;t.rollup=rollup;t.rollupInternal=rollupInternal;t.treeshakePresets=y;t.version=u;t.warnUnknownOptions=warnUnknownOptions;t.watch=watch},652:(e,t,i)=>{"use strict";
|
|
74
|
+
/*
|
|
75
|
+
@license
|
|
76
|
+
Rollup.js v2.79.0
|
|
77
|
+
Wed, 31 Aug 2022 04:52:13 GMT - commit 8477f8ff1fe80086556021542b22942ad27a0a69
|
|
78
|
+
|
|
79
|
+
https://github.com/rollup/rollup
|
|
80
|
+
|
|
81
|
+
Released under the MIT License.
|
|
82
|
+
*/Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=i(822);const n=i(282);const r=i(17);const o=i(173);const l=i(37);const c=i(227);i(74);i(113);i(147);i(361);i(837);i(781);class FileWatcher{constructor(e,t){this.transformWatchers=new Map;this.chokidarOptions=t;this.task=e;this.watcher=this.createWatcher(null)}close(){this.watcher.close();for(const e of this.transformWatchers.values()){e.close()}}unwatch(e){this.watcher.unwatch(e);const t=this.transformWatchers.get(e);if(t){this.transformWatchers.delete(e);t.close()}}watch(e,t){var i;if(t){const t=(i=this.transformWatchers.get(e))!==null&&i!==void 0?i:this.createWatcher(e);t.add(e);this.transformWatchers.set(e,t)}else{this.watcher.add(e)}}createWatcher(e){const t=this.task;const i=l.platform()==="linux";const s=e!==null;const handleChange=(r,o)=>{const l=e||r;if(i){n.unwatch(l);n.add(l)}t.invalidate(l,{event:o,isTransformDependency:s})};const n=c.chokidar.watch([],this.chokidarOptions).on("add",(e=>handleChange(e,"create"))).on("change",(e=>handleChange(e,"update"))).on("unlink",(e=>handleChange(e,"delete")));return n}}const u={create:{create:"buggy",delete:null,update:"create"},delete:{create:"update",delete:"buggy",update:"buggy"},update:{create:"buggy",delete:"delete",update:"update"}};class Watcher{constructor(e,t){this.buildDelay=0;this.buildTimeout=null;this.invalidatedIds=new Map;this.rerun=false;this.running=true;this.emitter=t;t.close=this.close.bind(this);this.tasks=e.map((e=>new Task(this,e)));this.buildDelay=e.reduce(((e,{watch:t})=>t&&typeof t.buildDelay==="number"?Math.max(e,t.buildDelay):e),this.buildDelay);n.nextTick((()=>this.run()))}async close(){if(this.buildTimeout)clearTimeout(this.buildTimeout);for(const e of this.tasks){e.close()}await this.emitter.emitAndAwait("close");this.emitter.removeAllListeners()}invalidate(e){if(e){const t=this.invalidatedIds.get(e.id);const i=t?u[t][e.event]:e.event;if(i==="buggy"){this.invalidatedIds.set(e.id,e.event)}else if(i===null){this.invalidatedIds.delete(e.id)}else{this.invalidatedIds.set(e.id,i)}}if(this.running){this.rerun=true;return}if(this.buildTimeout)clearTimeout(this.buildTimeout);this.buildTimeout=setTimeout((async()=>{this.buildTimeout=null;try{await Promise.all([...this.invalidatedIds].map((([e,t])=>this.emitter.emitAndAwait("change",e,{event:t}))));this.invalidatedIds.clear();this.emitter.emit("restart");this.emitter.removeAwaited();this.run()}catch(e){this.invalidatedIds.clear();this.emitter.emit("event",{code:"ERROR",error:e,result:null});this.emitter.emit("event",{code:"END"})}}),this.buildDelay)}async run(){this.running=true;this.emitter.emit("event",{code:"START"});for(const e of this.tasks){await e.run()}this.running=false;this.emitter.emit("event",{code:"END"});if(this.rerun){this.rerun=false;this.invalidate()}}}class Task{constructor(e,t){this.cache={modules:[]};this.watchFiles=[];this.closed=false;this.invalidated=true;this.watched=new Set;this.watcher=e;this.skipWrite=Boolean(t.watch&&t.watch.skipWrite);this.options=o.mergeOptions(t);this.outputs=this.options.output;this.outputFiles=this.outputs.map((e=>{if(e.file||e.dir)return s.resolve(e.file||e.dir);return undefined}));const i=this.options.watch||{};this.filter=r.createFilter(i.include,i.exclude);this.fileWatcher=new FileWatcher(this,{...i.chokidar,disableGlobbing:true,ignoreInitial:true})}close(){this.closed=true;this.fileWatcher.close()}invalidate(e,t){this.invalidated=true;if(t.isTransformDependency){for(const t of this.cache.modules){if(!t.transformDependencies.includes(e))continue;t.originalCode=null}}this.watcher.invalidate({event:t.event,id:e})}async run(){if(!this.invalidated)return;this.invalidated=false;const e={...this.options,cache:this.cache};const t=Date.now();this.watcher.emitter.emit("event",{code:"BUNDLE_START",input:this.options.input,output:this.outputFiles});let i=null;try{i=await r.rollupInternal(e,this.watcher.emitter);if(this.closed){return}this.updateWatchedFiles(i);this.skipWrite||await Promise.all(this.outputs.map((e=>i.write(e))));this.watcher.emitter.emit("event",{code:"BUNDLE_END",duration:Date.now()-t,input:this.options.input,output:this.outputFiles,result:i})}catch(e){if(!this.closed){if(Array.isArray(e.watchFiles)){for(const t of e.watchFiles){this.watchFile(t)}}if(e.id){this.cache.modules=this.cache.modules.filter((t=>t.id!==e.id))}}this.watcher.emitter.emit("event",{code:"ERROR",error:e,result:i})}}updateWatchedFiles(e){const t=this.watched;this.watched=new Set;this.watchFiles=e.watchFiles;this.cache=e.cache;for(const e of this.watchFiles){this.watchFile(e)}for(const e of this.cache.modules){for(const t of e.transformDependencies){this.watchFile(t,true)}}for(const e of t){if(!this.watched.has(e)){this.fileWatcher.unwatch(e)}}}watchFile(e,t=false){if(!this.filter(e))return;this.watched.add(e);if(this.outputFiles.some((t=>t===e))){throw new Error("Cannot import the generated bundle")}this.fileWatcher.watch(e,t)}}t.Task=Task;t.Watcher=Watcher},653:(e,t,i)=>{e.exports=require(i.ab+"fsevents.node")},113:e=>{"use strict";e.exports=require("crypto")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},37:e=>{"use strict";e.exports=require("os")},822:e=>{"use strict";e.exports=require("path")},74:e=>{"use strict";e.exports=require("perf_hooks")},282:e=>{"use strict";e.exports=require("process")},781:e=>{"use strict";e.exports=require("stream")},837:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(i){var s=t[i];if(s!==undefined){return s.exports}var n=t[i]={exports:{}};var r=true;try{e[i](n,n.exports,__nccwpck_require__);r=false}finally{if(r)delete t[i]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var i=__nccwpck_require__(695);module.exports=i})();
|