@alicloud/console-components-search 0.2.29 → 0.2.31
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/dist/index.css +11 -2
- package/dist/index.js +121249 -106562
- package/doc-dist/0.js +262 -96
- package/doc-dist/1.js +4 -4
- package/doc-dist/10.js +1 -1
- package/doc-dist/11.js +1 -1
- package/doc-dist/12.js +1 -1
- package/doc-dist/13.js +1 -1
- package/doc-dist/14.js +1 -1
- package/doc-dist/15.js +1 -1
- package/doc-dist/16.js +1 -1
- package/doc-dist/3.js +48 -63
- package/doc-dist/4.js +1 -1
- package/doc-dist/5.js +4 -4
- package/doc-dist/6.js +1 -1
- package/doc-dist/7.js +1 -1
- package/doc-dist/8.js +1 -1
- package/doc-dist/9.js +1 -1
- package/doc-dist/console-fe-test-rc-search-doc.manifest.json +21 -1
- package/doc-dist/deps/console-fe-test-rc-search-doc-deps.manifest.json +16 -1
- package/doc-dist/deps/main.css +1 -1
- package/doc-dist/deps/main.js +71 -34
- package/doc-dist/deps/main.os.css +1 -1
- package/doc-dist/index.css +1 -1
- package/doc-dist/index.js +3 -3
- package/doc-dist/index.os.css +1 -1
- package/doc-dist/log-deps-build.log +6 -3
- package/es/ComplexSearch/InputPrefix.js +1 -2
- package/es/ComplexSearch/index.js +23 -20
- package/es/search.js +5 -3
- package/es/searchTagList/PureTag.js +1 -2
- package/es/searchTagList/index.js +2 -2
- package/es/style.js +8 -12
- package/es/types/IRcSearchOptions.type.js +0 -1
- package/es/types/IRcSearchProps.type.js +0 -1
- package/es/types/IRcSearchTagItemProps.type.js +0 -1
- package/es/types/IRcSearchTagListProps.type.js +0 -1
- package/lib/ComplexSearch/InputPrefix.d.ts +1 -0
- package/lib/ComplexSearch/InputPrefix.js +1 -3
- package/lib/ComplexSearch/index.d.ts +2 -2
- package/lib/ComplexSearch/index.js +22 -23
- package/lib/constants.js +1 -1
- package/lib/index.js +10 -10
- package/lib/search.js +5 -3
- package/lib/searchTagList/PureTag.js +1 -3
- package/lib/searchTagList/index.js +2 -2
- package/lib/style.js +9 -13
- package/lib/types/IRcSearchOptions.type.js +1 -5
- package/lib/types/IRcSearchProps.type.js +1 -5
- package/lib/types/IRcSearchTagItemProps.type.js +1 -5
- package/lib/types/IRcSearchTagListProps.type.js +1 -5
- package/lib/utils.js +1 -1
- package/package.json +1 -1
package/doc-dist/10.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
if (!window.__CONSOLE_OS_GLOBAL_HOOK__){window.__CONSOLE_OS_GLOBAL_VARS_={};window.__CONSOLE_OS_GLOBAL_HOOK__ = function(id, resolver) {resolver(undefined, undefined, undefined, {window: window,location: location,history: history,document: document})};window.__CONSOLE_OS_GLOBAL_HOOK__.standalone = true}
|
|
3
3
|
window.__CONSOLE_OS_GLOBAL_HOOK__("console-fe-test-rc-search-doc", function(require, module, exports, context){ var window = context.window;var location = context.location;var history = context.history;var document = context.document;with(window.__CONSOLE_OS_GLOBAL_VARS_) {
|
|
4
4
|
|
|
5
|
-
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[10],{
|
|
5
|
+
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[10],{857:function(e,n,a){"use strict";a.r(n),a.d(n,"demo",(function(){return x})),a.d(n,"meta",(function(){return f})),a.d(n,"code",(function(){return b})),a.d(n,"imports",(function(){return m})),a.d(n,"deps",(function(){return v}));var t={};a.r(t),a.d(t,"default",(function(){return p}));var l=a(5),o=a(1),r=a(0),d=a.n(r),c=a(62),u=a(63),s=[{label:"实例名称",dataIndex:"name",template:"input",templateProps:{dataSource:[]},groupName:"test"},{label:"网络类型",dataIndex:"type",template:"select",templateProps:{placeholder:"请选择网络类型",dataSource:[{label:"A",value:"a"},{label:"B",value:"b"},{label:"C",value:"c"},{label:"D",value:"d"}]},groupName:"test"},{label:"付费类型",dataIndex:"pay",template:"multiple",templateProps:{placeholder:"请选择付费类型",dataSource:[{label:"A",value:"a"},{label:"B",value:"b"},{label:"C",value:"c"},{label:"D",value:"d"}]},groupName:"test2"}],i=[{label:"实例名称",dataIndex:"name",template:"input",templateProps:{placeholder:"按实例名称搜索",dataSource:[]}}],p=function(e){var n=Object(r.useState)([{label:"实例名称",value:"xxxxxx",dataIndex:"name"},{value:[{tagKey:"test",tagValue:""}],dataIndex:"tag"}]),a=Object(o.a)(n,2),t=a[0],p=a[1];return d.a.createElement(u.ConfigProvider,null,d.a.createElement("div",null,d.a.createElement("div",null,"默认固定搜索条件"),d.a.createElement(c.Search,{defaultDataIndex:"name",defaultSelectedDataIndex:"name",options:[{label:"实例名称",dataIndex:"name",template:"input",templateProps:{placeholder:"按实例名称搜索"}}],onSearch:function(e,n){console.log(e,n)}}),d.a.createElement("br",null),d.a.createElement("br",null),d.a.createElement(c.Search,{defaultDataIndex:"name",options:i,onSearch:function(e,n){console.log(e,n)},suggestions:[{label:"实例名称",children:["222222"]},"33333333"]}),d.a.createElement("br",null),d.a.createElement("br",null),d.a.createElement("div",null,"搜索条件成组"),d.a.createElement(c.Search,{defaultDataIndex:"name",defaultSelectedDataIndex:"name",options:s,onSearch:function(e,n,a){p([].concat(Object(l.a)(t),[a]))},suggestions:[{label:"实例名称",children:["222222"]},"33333333"]}),d.a.createElement("div",{style:{marginTop:8}},d.a.createElement(c.SearchFilter,{dataSource:t,onChange:function(e,n){p(n)}}))))};const m=["react","@alicloud/console-components-search","@alicloud/console-components","react"],b="/**\n * @title 场景1\n */\n\nimport React from \"react\";\nimport { Search, SearchFilter } from \"@alicloud/console-components-search\";\nimport { ConfigProvider } from \"@alicloud/console-components\";\nimport { useState } from \"react\";\n \n let options = [\n {\n label: '实例名称',\n dataIndex: 'name',\n template: 'input',\n templateProps: {\n // placeholder: '按实例名称搜索',\n dataSource: []\n },\n groupName:\"test\"\n },\n {\n label: '网络类型',\n dataIndex: 'type',\n template: 'select',\n templateProps: {\n placeholder: '请选择网络类型',\n dataSource: [\n {label: 'A', value: 'a'},\n {label: 'B', value: 'b'},\n {label: 'C', value: 'c'},\n {label: 'D', value: 'd'},\n ]\n },\n groupName:\"test\"\n },\n {\n label: '付费类型',\n dataIndex: 'pay',\n template: 'multiple',\n templateProps: {\n placeholder: '请选择付费类型',\n dataSource: [\n {label: 'A', value: 'a'},\n {label: 'B', value: 'b'},\n {label: 'C', value: 'c'},\n {label: 'D', value: 'd'},\n ]\n },\n groupName:\"test2\"\n }\n]\n\nlet options2 = [\n {\n label: '实例名称',\n dataIndex: 'name',\n template: 'input',\n templateProps: {\n placeholder: '按实例名称搜索',\n dataSource: []\n },\n }\n]\n\n\n const Demo1: React.FC<{}> = (props) => {\n const [filters, setFilters] = useState<any>([\n {label: '实例名称', value: 'xxxxxx', dataIndex: 'name'},\n {value: [{tagKey: 'test', tagValue: ''}], dataIndex: 'tag'}\n ]);\n return (\n <ConfigProvider>\n <div>\n <div>默认固定搜索条件</div>\n <Search\n defaultDataIndex=\"name\"\n defaultSelectedDataIndex=\"name\"\n options={[{\n label: '实例名称',\n dataIndex: 'name',\n template: 'input',\n templateProps: {\n placeholder: '按实例名称搜索',\n },\n }]}\n onSearch={(value, dataIndex) => {\n console.log(value, dataIndex)\n }}\n />\n <br/><br/>\n <Search\n defaultDataIndex=\"name\"\n options={options2}\n onSearch={(value, dataIndex) => {\n console.log(value, dataIndex)\n }}\n suggestions={[{label: '实例名称', children: ['222222']}, '33333333']}\n />\n <br/><br/>\n\n <div>搜索条件成组</div>\n <Search\n defaultDataIndex=\"name\"\n defaultSelectedDataIndex=\"name\"\n options={options}\n onSearch={(value, dataIndex, extra) => {\n //@ts-ignore\n setFilters([...filters, extra])\n }}\n suggestions={[{label: '实例名称', children: ['222222']}, '33333333']}\n />\n\n <div style={{marginTop: 8}}>\n <SearchFilter\n dataSource={filters}\n onChange={(deletedFilter, remainFilters)=> {\n setFilters(remainFilters)\n }}\n />\n </div>\n </div>\n </ConfigProvider>\n );\n };\n \n export default Demo1;\n ",v={react:r,"@alicloud/console-components-search":c,"@alicloud/console-components":u,react:r},{default:x,meta:f={}}=t}}]);
|
|
6
6
|
}})
|
package/doc-dist/11.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
if (!window.__CONSOLE_OS_GLOBAL_HOOK__){window.__CONSOLE_OS_GLOBAL_VARS_={};window.__CONSOLE_OS_GLOBAL_HOOK__ = function(id, resolver) {resolver(undefined, undefined, undefined, {window: window,location: location,history: history,document: document})};window.__CONSOLE_OS_GLOBAL_HOOK__.standalone = true}
|
|
3
3
|
window.__CONSOLE_OS_GLOBAL_HOOK__("console-fe-test-rc-search-doc", function(require, module, exports, context){ var window = context.window;var location = context.location;var history = context.history;var document = context.document;with(window.__CONSOLE_OS_GLOBAL_VARS_) {
|
|
4
4
|
|
|
5
|
-
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[11],{
|
|
5
|
+
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[11],{858:function(e,a,n){"use strict";n.r(a),n.d(a,"demo",(function(){return b})),n.d(a,"meta",(function(){return m})),n.d(a,"code",(function(){return i})),n.d(a,"imports",(function(){return x})),n.d(a,"deps",(function(){return p}));var l={};n.r(l),n.d(l,"default",(function(){return d}));var t=n(5),r=n(1),o=n(0),c=n.n(o),u=n(62),s=[{label:"实例名称",dataIndex:"name",template:"input",templateProps:{placeholder:"按实例名称搜索",dataSource:[{label:"slb-xxxxx",value:"slb-xxxxx"}]}},{label:"网络类型",dataIndex:"type",template:"select",templateProps:{placeholder:"请选择网络类型",dataSource:[{label:"A",value:"a"},{label:"B",value:"b"},{label:"C",value:"c"},{label:"D",value:"d"}]}},{label:"付费类型",dataIndex:"pay",template:"multiple",templateProps:{placeholder:"请选择付费类型",dataSource:[{label:"A",value:"a"},{label:"B",value:"b"},{label:"C",value:"c"},{label:"D",value:"d"}]}}],d=function(e){var a=Object(o.useState)([{label:"实例名称",value:"xxxxxx",dataIndex:"name"},{value:[{tagKey:"test",tagValue:""}],dataIndex:"tag"}]),n=Object(r.a)(a,2),l=n[0],d=n[1];return c.a.createElement("div",null,c.a.createElement(u.Search,{fuzzy:!0,options:s,onSearch:function(e,a,n){d([].concat(Object(t.a)(l),a?[n]:[{label:"没有任何条件",value:e}]))},suggestions:[{label:"实例名称",value:"name",children:[{label:"slb-xxxxx",value:"slb-xxxxx"}]}]}),c.a.createElement("div",{style:{marginTop:8}},c.a.createElement(u.SearchFilter,{dataSource:l,onChange:function(e,a){d(a)}})))};const x=["react","@alicloud/console-components-search","react"],i="/**\n * @title 模糊搜索\n * @description 在你设置 `fuzzy=true` 或者 `defaultDataIndex` 被设置的时候,可以通过 suggestion 来做自动提示\n */\n\nimport React from \"react\";\nimport { Search, SearchFilter } from \"@alicloud/console-components-search\";\nimport { useState } from \"react\";\n \n let options = [\n {\n label: '实例名称',\n dataIndex: 'name',\n template: 'input',\n templateProps: {\n placeholder: '按实例名称搜索',\n dataSource: [{\n 'label': \"slb-xxxxx\",\n 'value': \"slb-xxxxx\"\n }]\n },\n },\n {\n label: '网络类型',\n dataIndex: 'type',\n template: 'select',\n templateProps: {\n placeholder: '请选择网络类型',\n dataSource: [\n {label: 'A', value: 'a'},\n {label: 'B', value: 'b'},\n {label: 'C', value: 'c'},\n {label: 'D', value: 'd'},\n ]\n },\n },\n {\n label: '付费类型',\n dataIndex: 'pay',\n template: 'multiple',\n templateProps: {\n placeholder: '请选择付费类型',\n dataSource: [\n {label: 'A', value: 'a'},\n {label: 'B', value: 'b'},\n {label: 'C', value: 'c'},\n {label: 'D', value: 'd'},\n ]\n },\n }\n]\n\n\n const Demo1: React.FC<{}> = (props) => {\n const [filters, setFilters] = useState<any>([\n {label: '实例名称', value: 'xxxxxx', dataIndex: 'name'},\n {value: [{tagKey: 'test', tagValue: ''}], dataIndex: 'tag'}\n ]);\n return (\n <div>\n <Search\n fuzzy\n options={options}\n onSearch={(value, dataIndex, extra) => {\n // 如果没有 dataIndex 表示用户直接按了回车\n if (dataIndex) {\n setFilters([...filters, extra])\n } else {\n // 如果 \n setFilters([...filters, {label: '没有任何条件', value }])\n }\n }}\n suggestions={[\n {\n label: '实例名称',\n value: 'name',\n children: [{\n label: 'slb-xxxxx',\n value: 'slb-xxxxx',\n }]\n }]}\n />\n\n <div style={{marginTop: 8}}>\n <SearchFilter\n dataSource={filters}\n onChange={(deletedFilter, remainFilters)=> {\n setFilters(remainFilters)\n }}\n />\n </div>\n </div>\n );\n };\n \n export default Demo1;\n ",p={react:o,"@alicloud/console-components-search":u,react:o},{default:b,meta:m={}}=l}}]);
|
|
6
6
|
}})
|
package/doc-dist/12.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
if (!window.__CONSOLE_OS_GLOBAL_HOOK__){window.__CONSOLE_OS_GLOBAL_VARS_={};window.__CONSOLE_OS_GLOBAL_HOOK__ = function(id, resolver) {resolver(undefined, undefined, undefined, {window: window,location: location,history: history,document: document})};window.__CONSOLE_OS_GLOBAL_HOOK__.standalone = true}
|
|
3
3
|
window.__CONSOLE_OS_GLOBAL_HOOK__("console-fe-test-rc-search-doc", function(require, module, exports, context){ var window = context.window;var location = context.location;var history = context.history;var document = context.document;with(window.__CONSOLE_OS_GLOBAL_VARS_) {
|
|
4
4
|
|
|
5
|
-
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[12],{
|
|
5
|
+
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[12],{860:function(e,t,n){"use strict";n.r(t),n.d(t,"typeInfo",(function(){return o}));var o={name:"IRcSearchOptionsProps",documentation:"",properties:[{name:"label",typeText:" string",documentation:"字段展示名称"},{name:"dataIndex",typeText:" string",documentation:"字段表单key"},{name:"template",typeText:" string",documentation:"字段,交互组件类型(input/select/multiple)<br />\n - input:搜索框<br />\n - select:单选<br />\n - multiple:多选<br />"},{name:"templateProps",typeText:" any",documentation:"定义传给表单项的属性\ntemplateProps.placeholder\ntemplateProps.dataSource"},{name:"groupName",typeText:" string",documentation:""}]}}}]);
|
|
6
6
|
}})
|
package/doc-dist/13.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
if (!window.__CONSOLE_OS_GLOBAL_HOOK__){window.__CONSOLE_OS_GLOBAL_VARS_={};window.__CONSOLE_OS_GLOBAL_HOOK__ = function(id, resolver) {resolver(undefined, undefined, undefined, {window: window,location: location,history: history,document: document})};window.__CONSOLE_OS_GLOBAL_HOOK__.standalone = true}
|
|
3
3
|
window.__CONSOLE_OS_GLOBAL_HOOK__("console-fe-test-rc-search-doc", function(require, module, exports, context){ var window = context.window;var location = context.location;var history = context.history;var document = context.document;with(window.__CONSOLE_OS_GLOBAL_VARS_) {
|
|
4
4
|
|
|
5
|
-
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[13],{
|
|
5
|
+
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[13],{861:function(e,t,n){"use strict";n.r(t),n.d(t,"typeInfo",(function(){return a}));var a={name:"IRcSearchProps",documentation:"",properties:[{name:"simple",typeText:" boolean",documentation:"是否是简单搜索, 不支持多 filter, 但是支持模糊",defaultValue:"false"},{name:"className",typeText:" string",documentation:"类名"},{name:"style",typeText:" any",documentation:"样式"},{name:"options",typeText:" IRcSearchOptionsProps[]",documentation:"对应不同场景值的类型数组,后面要详细展开列一下",defaultValue:"[]"},{name:"placeholder",typeText:" string",documentation:"默认placeholder"},{name:"defaultDataIndex",typeText:" string",documentation:"默认搜索类别"},{name:"defaultSelectedDataIndex",typeText:" string",documentation:"默认选中的类别"},{name:"onSearch",typeText:" (value: string, dataIndex: string, extra?: any) => void",documentation:"搜索触发"},{name:"onSuggest",typeText:" (value: string, dataIndex: string) => void",documentation:"模糊搜索的回调函数(仅输入框返回),用于构建模糊搜索的联想列表"},{name:"suggestions",typeText:" any[]",documentation:"模糊搜索的 suggestions"},{name:"fuzzy",typeText:" boolean",documentation:"是否是模糊搜索"},{name:"regionId",typeText:" string",documentation:"regionId, 数据上报用"},{name:"resourceType",typeText:" string",documentation:"resourceType, 数据上报用, 格式 ACS::ECS::INSTANCE"},{name:"prefix",typeText:" string",documentation:"样式 class 前缀"}]}}}]);
|
|
6
6
|
}})
|
package/doc-dist/14.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
if (!window.__CONSOLE_OS_GLOBAL_HOOK__){window.__CONSOLE_OS_GLOBAL_VARS_={};window.__CONSOLE_OS_GLOBAL_HOOK__ = function(id, resolver) {resolver(undefined, undefined, undefined, {window: window,location: location,history: history,document: document})};window.__CONSOLE_OS_GLOBAL_HOOK__.standalone = true}
|
|
3
3
|
window.__CONSOLE_OS_GLOBAL_HOOK__("console-fe-test-rc-search-doc", function(require, module, exports, context){ var window = context.window;var location = context.location;var history = context.history;var document = context.document;with(window.__CONSOLE_OS_GLOBAL_VARS_) {
|
|
4
4
|
|
|
5
|
-
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[14],{
|
|
5
|
+
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[14],{862:function(e,t,n){"use strict";n.r(t),n.d(t,"typeInfo",(function(){return o}));var o={name:"IRcSearchTagItemProps",documentation:"这是IRcSearchTagItemProps的说明。breezr-docs支持从源码中提取接口信息并文档化,因此你可以使用接口来定义Props,从而能便捷地将Props的信息通过文档透出。\n\n下面列举的props其实是随便写的,仅仅用来说明breezr-docs的接口提取功能。",properties:[{name:"label",typeText:" string",documentation:"tag的类别展示名称"},{name:"dataIndex",typeText:" string",documentation:"tag的类别的key"},{name:"value",typeText:" any",documentation:"tag的类别的值"},{name:"valueLabel",typeText:" string",documentation:"tag的类别的展示值"}]}}}]);
|
|
6
6
|
}})
|
package/doc-dist/15.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
if (!window.__CONSOLE_OS_GLOBAL_HOOK__){window.__CONSOLE_OS_GLOBAL_VARS_={};window.__CONSOLE_OS_GLOBAL_HOOK__ = function(id, resolver) {resolver(undefined, undefined, undefined, {window: window,location: location,history: history,document: document})};window.__CONSOLE_OS_GLOBAL_HOOK__.standalone = true}
|
|
3
3
|
window.__CONSOLE_OS_GLOBAL_HOOK__("console-fe-test-rc-search-doc", function(require, module, exports, context){ var window = context.window;var location = context.location;var history = context.history;var document = context.document;with(window.__CONSOLE_OS_GLOBAL_VARS_) {
|
|
4
4
|
|
|
5
|
-
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[15],{
|
|
5
|
+
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[15],{863:function(e,t,n){"use strict";n.r(t),n.d(t,"typeInfo",(function(){return o}));var o={name:"IRcSearchTagListProps",documentation:"",properties:[{name:"className",typeText:" string",documentation:"类名"},{name:"style",typeText:" any",documentation:"样式"},{name:"dataSource",typeText:" IRcSearchTagItemProps[]",documentation:"筛选项"},{name:"regionId",typeText:" string",documentation:"regionId"},{name:"resourceType",typeText:" string",documentation:"resourceType"},{name:"onChange",typeText:" (deletedFilter: IRcSearchTagItemProps, remainFilters: IRcSearchTagItemProps[]) => void",documentation:"当删减 tag 时, 返回新的筛选项"},{name:"onClear",typeText:" () => void",documentation:"清除山选项"}]}}}]);
|
|
6
6
|
}})
|
package/doc-dist/16.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
if (!window.__CONSOLE_OS_GLOBAL_HOOK__){window.__CONSOLE_OS_GLOBAL_VARS_={};window.__CONSOLE_OS_GLOBAL_HOOK__ = function(id, resolver) {resolver(undefined, undefined, undefined, {window: window,location: location,history: history,document: document})};window.__CONSOLE_OS_GLOBAL_HOOK__.standalone = true}
|
|
3
3
|
window.__CONSOLE_OS_GLOBAL_HOOK__("console-fe-test-rc-search-doc", function(require, module, exports, context){ var window = context.window;var location = context.location;var history = context.history;var document = context.document;with(window.__CONSOLE_OS_GLOBAL_VARS_) {
|
|
4
4
|
|
|
5
|
-
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[16],{
|
|
5
|
+
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[16],{852:function(e,t,n){"use strict";n.r(t);var l=n(12),r=n(3),a=n(0),c=n.n(a),o=n(336);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s={p:function(e){return c.a.createElement("p",Object(l.a)({style:i({margin:0},e.style)},e))},ul:function(e){return c.a.createElement("ul",e)},ol:function(e){return c.a.createElement("ol",e)},li:function(e){return c.a.createElement("li",e)}};t.default=function(e){var t=e.typeInfo;return c.a.createElement("div",null,c.a.createElement(o.c.table,null,c.a.createElement("colgroup",null,c.a.createElement("col",{span:1,style:{width:"15%"}}),c.a.createElement("col",{span:1,style:{width:"15%"}}),c.a.createElement("col",{span:1,style:{width:"60%"}}),c.a.createElement("col",{span:1,style:{width:"10%"}})),c.a.createElement(o.c.thead,null,c.a.createElement("tr",null,c.a.createElement("th",null,"名称"),c.a.createElement("th",null,"类型"),c.a.createElement("th",null,"说明"),c.a.createElement("th",null,"默认值"))),c.a.createElement(o.c.tbody,null,t.properties.map((function(e,t){return c.a.createElement("tr",{key:t},c.a.createElement("td",null,e.name),c.a.createElement("td",null,c.a.createElement(o.c.inlinecode,null,e.typeText)),c.a.createElement("td",null,c.a.createElement(o.a,{source:e.documentation,components:s})),c.a.createElement("td",null,e.defaultValue&&c.a.createElement(o.c.inlinecode,null,e.defaultValue)))})))))}}}]);
|
|
6
6
|
}})
|
package/doc-dist/3.js
CHANGED
|
@@ -2,103 +2,88 @@
|
|
|
2
2
|
if (!window.__CONSOLE_OS_GLOBAL_HOOK__){window.__CONSOLE_OS_GLOBAL_VARS_={};window.__CONSOLE_OS_GLOBAL_HOOK__ = function(id, resolver) {resolver(undefined, undefined, undefined, {window: window,location: location,history: history,document: document})};window.__CONSOLE_OS_GLOBAL_HOOK__.standalone = true}
|
|
3
3
|
window.__CONSOLE_OS_GLOBAL_HOOK__("console-fe-test-rc-search-doc", function(require, module, exports, context){ var window = context.window;var location = context.location;var history = context.history;var document = context.document;with(window.__CONSOLE_OS_GLOBAL_VARS_) {
|
|
4
4
|
|
|
5
|
-
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[3],{164:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e.node||e;if((({leadingComments:e})=>!!e&&e.some(e=>/[@#]__PURE__/.test(e.value)))(t))return;i(t,"leading","#__PURE__")};var r=s(65);const{addComment:i}=r},279:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,Object.defineProperty(t,"environmentVisitor",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"skipAllButComputedKey",{enumerable:!0,get:function(){return o.skipAllButComputedKey}});var r=s(74),i=s(280),n=s(281),o=s(103),a=s(65);const{assignmentExpression:l,booleanLiteral:d,callExpression:p,cloneNode:c,identifier:u,memberExpression:f,sequenceExpression:m,stringLiteral:h,thisExpression:y}=a;function b(e,t,s,r){e=c(e);const i=t||r?e:f(e,u("prototype"));return p(s.addHelper("getPrototypeOf"),[i])}const g=r.default.visitors.merge([o.default,{Super(e,t){const{node:s,parentPath:r}=e;r.isMemberExpression({object:s})&&t.handle(r)}}]),v=r.default.visitors.merge([o.default,{Scopable(e,{refName:t}){const s=e.scope.getOwnBinding(t);s&&s.identifier.name===t&&e.scope.rename(t)}}]),E={memoise(e,t){const{scope:s,node:r}=e,{computed:i,property:n}=r;if(!i)return;const o=s.maybeGenerateMemoised(n);o&&this.memoiser.set(n,o,t)},prop(e){const{computed:t,property:s}=e.node;return this.memoiser.has(s)?c(this.memoiser.get(s)):t?c(s):h(s.name)},get(e){return this._get(e,this._getThisRefs())},_get(e,t){const s=b(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return p(this.file.addHelper("get"),[t.memo?m([t.memo,s]):s,this.prop(e),t.this])},_getThisRefs(){if(!this.isDerivedConstructor)return{this:y()};const e=this.scope.generateDeclaredUidIdentifier("thisSuper");return{memo:l("=",e,y()),this:c(e)}},set(e,t){const s=this._getThisRefs(),r=b(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return p(this.file.addHelper("set"),[s.memo?m([s.memo,r]):r,this.prop(e),t,s.this,d(e.isInStrictMode())])},destructureSet(e){throw e.buildCodeFrameError("Destructuring to a super field is not supported yet.")},call(e,t){const s=this._getThisRefs();return(0,n.default)(this._get(e,s),c(s.this),t,!1)},optionalCall(e,t){const s=this._getThisRefs();return(0,n.default)(this._get(e,s),c(s.this),t,!0)}},P=Object.assign({},E,{prop(e){const{property:t}=e.node;return this.memoiser.has(t)?c(this.memoiser.get(t)):c(t)},get(e){const{isStatic:t,getSuperRef:s}=this,{computed:r}=e.node,i=this.prop(e);let n;var o,a;t?n=null!=(o=s())?o:f(u("Function"),u("prototype")):n=f(null!=(a=s())?a:u("Object"),u("prototype"));return f(n,i,r)},set(e,t){const{computed:s}=e.node,r=this.prop(e);return l("=",f(y(),r,s),t)},destructureSet(e){const{computed:t}=e.node,s=this.prop(e);return f(y(),s,t)},call(e,t){return(0,n.default)(this.get(e),y(),t,!1)},optionalCall(e,t){return(0,n.default)(this.get(e),y(),t,!0)}});t.default=class{constructor(e){var t;const s=e.methodPath;this.methodPath=s,this.isDerivedConstructor=s.isClassMethod({kind:"constructor"})&&!!e.superRef,this.isStatic=s.isObjectMethod()||s.node.static||(null==s.isStaticBlock?void 0:s.isStaticBlock()),this.isPrivateMethod=s.isPrivate()&&s.isMethod(),this.file=e.file,this.constantSuper=null!=(t=e.constantSuper)?t:e.isLoose,this.opts=e}getObjectRef(){return c(this.opts.objectRef||this.opts.getObjectRef())}getSuperRef(){return this.opts.superRef?c(this.opts.superRef):this.opts.getSuperRef?c(this.opts.getSuperRef()):void 0}replace(){this.opts.refToPreserve&&this.methodPath.traverse(v,{refName:this.opts.refToPreserve.name});const e=this.constantSuper?P:E;(0,i.default)(this.methodPath,g,Object.assign({file:this.file,scope:this.methodPath.scope,isDerivedConstructor:this.isDerivedConstructor,isStatic:this.isStatic,isPrivateMethod:this.isPrivateMethod,getObjectRef:this.getObjectRef.bind(this),getSuperRef:this.getSuperRef.bind(this),boundGet:e.get},e))}}},280:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(65);function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var n=i(r);const{LOGICAL_OPERATORS:o,arrowFunctionExpression:a,assignmentExpression:l,binaryExpression:d,booleanLiteral:p,callExpression:c,cloneNode:u,conditionalExpression:f,identifier:m,isMemberExpression:h,isOptionalCallExpression:y,isOptionalMemberExpression:b,isUpdateExpression:g,logicalExpression:v,memberExpression:E,nullLiteral:P,numericLiteral:x,optionalCallExpression:S,optionalMemberExpression:w,sequenceExpression:N,unaryExpression:C}=n;class k{constructor(){this._map=void 0,this._map=new WeakMap}has(e){return this._map.has(e)}get(e){if(!this.has(e))return;const t=this._map.get(e),{value:s}=t;return t.count--,0===t.count?l("=",s,e):s}set(e,t,s){return this._map.set(e,{count:s,value:t})}}function O(e,t){const{node:s}=e;if(b(s))return E(t,s.property,s.computed);if(e.isOptionalCallExpression()){const s=e.get("callee");if(e.node.optional&&s.isOptionalMemberExpression()){const{object:r}=s.node,i=e.scope.maybeGenerateMemoised(r)||r;return s.get("object").replaceWith(l("=",i,r)),c(E(t,m("call")),[i,...e.node.arguments])}return c(t,e.node.arguments)}return e.node}const j={memoise(){},handle(e,t){const{node:s,parent:r,parentPath:i,scope:n}=e;if(e.isOptionalMemberExpression()){if(function(e){for(;e&&!e.isProgram();){const{parentPath:t,container:s,listKey:r}=e,i=t.node;if(r){if(s!==i[r])return!0}else if(s!==i)return!0;e=t}return!1}(e))return;const o=e.find(({node:t,parent:s})=>b(s)?s.optional||s.object!==t:!y(s)||(t!==e.node&&s.optional||s.callee!==t));if(n.path.isPattern())return void o.replaceWith(c(a([],o.node),[]));const g=function e(t){const s=t,{node:r,parentPath:i}=s;if(i.isLogicalExpression()){const{operator:t,right:s}=i.node;if("&&"===t||"||"===t||"??"===t&&r===s)return e(i)}if(i.isSequenceExpression()){const{expressions:t}=i.node;return t[t.length-1]!==r||e(i)}return i.isConditional({test:r})||i.isUnaryExpression({operator:"!"})||i.isLoop({test:r})}(o),E=o.parentPath;if(E.isUpdateExpression({argument:s})||E.isAssignmentExpression({left:s}))throw e.buildCodeFrameError("can't handle assignment");const x=E.isUnaryExpression({operator:"delete"});if(x&&o.isOptionalMemberExpression()&&o.get("property").isPrivateName())throw e.buildCodeFrameError("can't delete a private class element");let N=e;for(;;)if(N.isOptionalMemberExpression()){if(N.node.optional)break;N=N.get("object")}else{if(!N.isOptionalCallExpression())throw new Error("Internal error: unexpected "+N.node.type);if(N.node.optional)break;N=N.get("callee")}const C=N.isOptionalMemberExpression()?"object":"callee",k=N.node[C],j=n.maybeGenerateMemoised(k),I=null!=j?j:k,M=i.isOptionalCallExpression({callee:s}),D=e=>M,T=i.isCallExpression({callee:s});N.replaceWith(O(N,I)),D()?r.optional?i.replaceWith(this.optionalCall(e,r.arguments)):i.replaceWith(this.call(e,r.arguments)):T?e.replaceWith(this.boundGet(e)):e.replaceWith(this.get(e));let $,F=e.node;for(let t=e;t!==o;){const e=t.parentPath;if(e===o&&D()&&r.optional){F=e.node;break}F=O(e,F),t=e}const _=o.parentPath;if(h(F)&&_.isOptionalCallExpression({callee:o.node,optional:!0})){const{object:t}=F;$=e.scope.maybeGenerateMemoised(t),$&&(F.object=l("=",$,t))}let R=o;x&&(R=_,F=_.node);const A=j?l("=",u(I),u(k)):u(I);if(g){let e;e=t?d("!=",A,P()):v("&&",d("!==",A,P()),d("!==",u(I),n.buildUndefinedNode())),R.replaceWith(v("&&",e,F))}else{let e;e=t?d("==",A,P()):v("||",d("===",A,P()),d("===",u(I),n.buildUndefinedNode())),R.replaceWith(f(e,x?p(!0):n.buildUndefinedNode(),F))}if($){const e=_.node;_.replaceWith(S(w(e.callee,m("call"),!1,!0),[u($),...e.arguments],!1))}}else if(g(r,{argument:s})){if(this.simpleSet)return void e.replaceWith(this.simpleSet(e));const{operator:t,prefix:n}=r;this.memoise(e,2);const o=d(t[0],C("+",this.get(e)),x(1));if(n)i.replaceWith(this.set(e,o));else{const{scope:t}=e,r=t.generateUidIdentifierBasedOnNode(s);t.push({id:r}),o.left=l("=",u(r),o.left),i.replaceWith(N([this.set(e,o),u(r)]))}}else if(i.isAssignmentExpression({left:s})){if(this.simpleSet)return void e.replaceWith(this.simpleSet(e));const{operator:t,right:s}=i.node;if("="===t)i.replaceWith(this.set(e,s));else{const r=t.slice(0,-1);o.includes(r)?(this.memoise(e,1),i.replaceWith(v(r,this.get(e),this.set(e,s)))):(this.memoise(e,2),i.replaceWith(this.set(e,d(r,this.get(e),s))))}}else{if(!i.isCallExpression({callee:s}))return i.isOptionalCallExpression({callee:s})?n.path.isPattern()?void i.replaceWith(c(a([],i.node),[])):void i.replaceWith(this.optionalCall(e,i.node.arguments)):void(i.isForXStatement({left:s})||i.isObjectProperty({value:s})&&i.parentPath.isObjectPattern()||i.isAssignmentPattern({left:s})&&i.parentPath.isObjectProperty({value:r})&&i.parentPath.parentPath.isObjectPattern()||i.isArrayPattern()||i.isAssignmentPattern({left:s})&&i.parentPath.isArrayPattern()||i.isRestElement()?e.replaceWith(this.destructureSet(e)):i.isTaggedTemplateExpression()?e.replaceWith(this.boundGet(e)):e.replaceWith(this.get(e)));i.replaceWith(this.call(e,i.node.arguments))}}};t.default=function(e,t,s){e.traverse(t,Object.assign({},j,s,{memoiser:new k}))}},281:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,s,r){return 1===s.length&&a(s[0])&&o(s[0].argument,{name:"arguments"})?r?d(p(e,n("apply"),!1,!0),[t,s[0].argument],!1):i(l(e,n("apply")),[t,s[0].argument]):r?d(p(e,n("call"),!1,!0),[t,...s],!1):i(l(e,n("call")),[t,...s])};var r=s(65);const{callExpression:i,identifier:n,isIdentifier:o,isSpreadElement:a,memberExpression:l,optionalCallExpression:d,optionalMemberExpression:p}=r},282:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertFieldTransformed=function(e){if(e.node.declare)throw e.buildCodeFrameError("TypeScript 'declare' fields must first be transformed by @babel/plugin-transform-typescript.\nIf you have already enabled that plugin (or '@babel/preset-typescript'), make sure that it runs before any plugin related to additional class features:\n - @babel/plugin-proposal-class-properties\n - @babel/plugin-proposal-private-methods\n - @babel/plugin-proposal-decorators")}},283:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildDecoratedClass=function(e,t,s,i){const{node:n,scope:o}=t,a=o.generateUidIdentifier("initialize"),d=n.id&&t.isDeclaration(),c=t.isInStrictMode(),{superClass:u}=n;n.type="ClassDeclaration",n.id||(n.id=r.types.cloneNode(e));let f;u&&(f=o.generateUidIdentifierBasedOnNode(n.superClass,"super"),n.superClass=f);const m=l(n),h=r.types.arrayExpression(s.filter(e=>!e.node.abstract).map(p.bind(i,n.id,f))),y=r.template.expression.ast`
|
|
6
|
-
${function(e){try{return e.addHelper("decorate")}catch(t){throw"BABEL_HELPER_UNKNOWN"===t.code&&(t.message+="\n '@babel/plugin-transform-decorators' in non-legacy mode requires '@babel/core' version ^7.0.2 and you appear to be using an older version."),t}}(
|
|
7
|
-
${m||
|
|
8
|
-
function (${
|
|
9
|
-
${
|
|
10
|
-
return { F: ${
|
|
5
|
+
(window["webpackJsonpconsole-fe-test-rc-search-doc"]=window["webpackJsonpconsole-fe-test-rc-search-doc"]||[]).push([[3],{335:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasOwnDecorators=o,t.hasDecorators=function(e){return o(e)||e.body.body.some(o)},t.buildDecoratedClass=function(e,t,r,n){const{node:a,scope:i}=t,o=i.generateUidIdentifier("initialize"),l=a.id&&t.isDeclaration(),c=t.isInStrictMode(),{superClass:u}=a;a.type="ClassDeclaration",a.id||(a.id=s.types.cloneNode(e));let f;u&&(f=i.generateUidIdentifierBasedOnNode(a.superClass,"super"),a.superClass=f);const m=d(a),y=s.types.arrayExpression(r.filter(e=>!e.node.abstract).map(p.bind(n,a.id,f)));let b=s.template.expression.ast`
|
|
6
|
+
${function(e){try{return e.addHelper("decorate")}catch(t){throw"BABEL_HELPER_UNKNOWN"===t.code&&(t.message+="\n '@babel/plugin-transform-decorators' in non-legacy mode requires '@babel/core' version ^7.0.2 and you appear to be using an older version."),t}}(n)}(
|
|
7
|
+
${m||s.types.nullLiteral()},
|
|
8
|
+
function (${o}, ${u?s.types.cloneNode(f):null}) {
|
|
9
|
+
${a}
|
|
10
|
+
return { F: ${s.types.cloneNode(a.id)}, d: ${y} };
|
|
11
11
|
},
|
|
12
12
|
${u}
|
|
13
13
|
)
|
|
14
|
-
|
|
15
|
-
this.${n.types.cloneNode(s)} = ${n.types.cloneNode(s)}`});(0,o.injectInitialization)(t,e,r)}}};return{name:"transform-typescript",inherits:i.default,visitor:{Pattern:S,Identifier:S,RestElement:S,Program:{enter(e,t){const{file:r}=t;let i=null,n=null;const o=e.node;if(c.has(o)||c.set(o,new Set),r.ast.comments)for(const d of r.ast.comments){const e=s.exec(d.value);e&&(e[1]?n=e[2]:i=e[2])}let a=i||y;a&&([a]=a.split("."));let l=n||b;l&&([l]=l.split("."));for(let s of e.get("body"))if(s.isImportDeclaration()){if(u.has(t.file.ast.program)||u.set(t.file.ast.program,!0),"type"===s.node.importKind){for(const e of s.node.specifiers)h(o,e.local.name);s.remove();continue}const r=new Set,i=s.node.specifiers.length,n=()=>i>0&&i===r.size;for(const e of s.node.specifiers)if("ImportSpecifier"===e.type&&"type"===e.importKind){h(o,e.local.name);const t=s.scope.getBinding(e.local.name);t&&r.add(t.path)}if(g)u.set(e.node,!1);else{if(0===s.node.specifiers.length){u.set(e.node,!1);continue}for(const t of s.node.specifiers){const i=s.scope.getBinding(t.local.name);i&&!r.has(i.path)&&(w({binding:i,programPath:e,pragmaImportName:a,pragmaFragImportName:l})?r.add(i.path):u.set(e.node,!1))}}if(n())s.remove();else for(const e of r)e.remove()}else if(s.isExportDeclaration()&&(s=s.get("declaration")),s.isVariableDeclaration({declare:!0}))for(const e of Object.keys(s.getBindingIdentifiers()))h(o,e);else(s.isTSTypeAliasDeclaration()||s.isTSDeclareFunction()&&s.get("id").isIdentifier()||s.isTSInterfaceDeclaration()||s.isClassDeclaration({declare:!0})||s.isTSEnumDeclaration({declare:!0})||s.isTSModuleDeclaration({declare:!0})&&s.get("id").isIdentifier())&&h(o,s.node.id.name)},exit(e){"module"===e.node.sourceType&&u.get(e.node)&&e.pushContainer("body",n.types.exportNamedDeclaration())}},ExportNamedDeclaration(e,t){u.has(t.file.ast.program)||u.set(t.file.ast.program,!0),"type"!==e.node.exportKind?e.node.source&&e.node.specifiers.length>0&&e.node.specifiers.every(e=>"ExportSpecifier"===e.type&&"type"===e.exportKind)||!e.node.source&&e.node.specifiers.length>0&&e.node.specifiers.every(t=>n.types.isExportSpecifier(t)&&m(e,t.local.name))?e.remove():u.set(t.file.ast.program,!1):e.remove()},ExportSpecifier(e){const t=e.parent;(!t.source&&m(e,e.node.local.name)||"type"===e.node.exportKind)&&e.remove()},ExportDefaultDeclaration(e,t){u.has(t.file.ast.program)||u.set(t.file.ast.program,!0),n.types.isIdentifier(e.node.declaration)&&m(e,e.node.declaration.name)?e.remove():u.set(t.file.ast.program,!1)},TSDeclareFunction(e){e.remove()},TSDeclareMethod(e){e.remove()},VariableDeclaration(e){e.node.declare&&e.remove()},VariableDeclarator({node:e}){e.definite&&(e.definite=null)},TSIndexSignature(e){e.remove()},ClassDeclaration(e){const{node:t}=e;t.declare&&e.remove()},Class(e){const{node:t}=e;t.typeParameters&&(t.typeParameters=null),t.superTypeParameters&&(t.superTypeParameters=null),t.implements&&(t.implements=null),t.abstract&&(t.abstract=null),e.get("body.body").forEach(t=>{t.isClassMethod()||t.isClassPrivateMethod()?"constructor"===t.node.kind?P.constructor(t,e):P.method(t):(t.isClassProperty()||t.isClassPrivateProperty())&&P.field(t)})},Function(e){const{node:t,scope:s}=e;t.typeParameters&&(t.typeParameters=null),t.returnType&&(t.returnType=null);const r=t.params;r.length>0&&n.types.isIdentifier(r[0],{name:"this"})&&r.shift();const i=e.get("params");for(const n of i)"TSParameterProperty"===n.type&&(n.replaceWith(n.get("parameter")),s.registerBinding("param",n))},TSModuleDeclaration(e){(0,d.default)(e,n.types,r)},TSInterfaceDeclaration(e){e.remove()},TSTypeAliasDeclaration(e){e.remove()},TSEnumDeclaration(e){v&&e.node.const?(0,a.default)(e,n.types):(0,l.default)(e,n.types)},TSImportEqualsDeclaration(e){if(n.types.isTSExternalModuleReference(e.node.moduleReference))throw e.buildCodeFrameError(`\`import ${e.node.id.name} = require('${e.node.moduleReference.expression.value}')\` is not supported by @babel/plugin-transform-typescript\nPlease consider using \`import ${e.node.id.name} from '${e.node.moduleReference.expression.value}';\` alongside Typescript's --allowSyntheticDefaultImports option.`);e.replaceWith(n.types.variableDeclaration("var",[n.types.variableDeclarator(e.node.id,x(e.node.moduleReference))]))},TSExportAssignment(e){throw e.buildCodeFrameError("`export =` is not supported by @babel/plugin-transform-typescript\nPlease consider using `export <value>;`.")},TSTypeAssertion(e){e.replaceWith(e.node.expression)},TSAsExpression(e){let{node:t}=e;do{t=t.expression}while(n.types.isTSAsExpression(t));e.replaceWith(t)},TSNonNullExpression(e){e.replaceWith(e.node.expression)},CallExpression(e){e.node.typeParameters=null},OptionalCallExpression(e){e.node.typeParameters=null},NewExpression(e){e.node.typeParameters=null},JSXOpeningElement(e){e.node.typeParameters=null},TaggedTemplateExpression(e){e.node.typeParameters=null}}};function x(e){return n.types.isTSQualifiedName(e)?n.types.memberExpression(x(e.left),e.right):e}function S({node:e}){e.typeAnnotation&&(e.typeAnnotation=null),n.types.isIdentifier(e)&&e.optional&&(e.optional=null)}function w({binding:e,programPath:t,pragmaImportName:s,pragmaFragImportName:r}){for(const n of e.referencePaths)if(!p(n))return!1;if(e.identifier.name!==s&&e.identifier.name!==r)return!0;let i=!1;return t.traverse({"JSXElement|JSXFragment"(e){i=!0,e.stop()}}),!i}});t.default=y},664:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(86);function i(e,t){const s=[];e.forEach((e,r)=>{const i=Array.isArray(e)?e[0]:e;i===t&&s.unshift(r)});for(const r of s)e.splice(r,1)}var n=(0,r.declare)((e,{isTSX:t,disallowAmbiguousJSXLike:s})=>(e.assertVersion(7),{name:"syntax-typescript",manipulateOptions(e,r){const{plugins:n}=r;i(n,"flow"),i(n,"jsx"),r.plugins.push(["typescript",{disallowAmbiguousJSXLike:s}],"classProperties"),r.plugins.push("objectRestSpread"),t&&r.plugins.push("jsx")}}));t.default=n},665:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"FEATURES",{enumerable:!0,get:function(){return d.FEATURES}}),t.createClassFeaturePlugin=function({name:e,feature:t,loose:s,manipulateOptions:f,api:m={assumption:()=>{}}}){const h=m.assumption("setPublicClassFields"),y=m.assumption("privateFieldsAsProperties"),b=m.assumption("constantSuper"),g=m.assumption("noDocumentAll");if(!0===s){const t=[];void 0!==h&&t.push('"setPublicClassFields"'),void 0!==y&&t.push('"privateFieldsAsProperties"'),0!==t.length&&console.warn(`[${e}]: You are using the "loose: true" option and you are explicitly setting a value for the `+t.join(" and ")+` assumption${t.length>1?"s":""}. The "loose" option can cause incompatibilities with the other class features plugins, so it's recommended that you replace it with the following top-level option:\n\t"assumptions": {\n\t\t"setPublicClassFields": true,\n\t\t"privateFieldsAsProperties": true\n\t}`)}return{name:e,manipulateOptions:f,pre(){(0,d.enableFeature)(this.file,t,s),(!this.file.get(u)||this.file.get(u)<c)&&this.file.set(u,c)},visitor:{Class(e,s){if(this.file.get(u)!==c)return;(0,d.verifyUsedFeatures)(e,this.file),e.isClassDeclaration()&&(0,p.assertFieldTransformed)(e);const n=(0,d.isLoose)(this.file,t);let f;const m=(0,a.hasDecorators)(e.node),v=[],E=[],P=[],x=new Set,S=e.get("body");for(const t of S.get("body")){if((0,d.verifyUsedFeatures)(t,this.file),(t.isClassProperty()||t.isClassMethod())&&t.node.computed&&P.push(t),t.isPrivate()){const{name:e}=t.node.key.id,s="get "+e,r="set "+e;if(t.isClassPrivateMethod()){if("get"===t.node.kind){if(x.has(s)||x.has(e)&&!x.has(r))throw t.buildCodeFrameError("Duplicate private field");x.add(s).add(e)}else if("set"===t.node.kind){if(x.has(r)||x.has(e)&&!x.has(s))throw t.buildCodeFrameError("Duplicate private field");x.add(r).add(e)}}else{if(x.has(e)&&!x.has(s)&&!x.has(r)||x.has(e)&&(x.has(s)||x.has(r)))throw t.buildCodeFrameError("Duplicate private field");x.add(e)}}t.isClassMethod({kind:"constructor"})?f=t:(E.push(t),(t.isProperty()||t.isPrivate()||null!=t.isStaticBlock&&t.isStaticBlock())&&v.push(t))}if(!v.length&&!m)return;const w=e.node.id;let N;!w||e.isClassExpression()?((0,i.default)(e),N=e.scope.generateUidIdentifier("class")):N=r.types.cloneNode(e.node.id);const C=(0,o.buildPrivateNamesMap)(v),k=(0,o.buildPrivateNamesNodes)(C,null!=y?y:n,s);let O,j,I,M,D;(0,o.transformPrivateNamesUsage)(N,e,C,{privateFieldsAsProperties:null!=y?y:n,noDocumentAll:g,innerBinding:w},s),m?(j=M=O=[],({instanceNodes:I,wrapClass:D}=(0,a.buildDecoratedClass)(N,e,E,this.file))):(O=(0,l.extractComputedKeys)(N,e,P,this.file),({staticNodes:j,pureStaticNodes:M,instanceNodes:I,wrapClass:D}=(0,o.buildFieldsInitNodes)(N,e.node.superClass,v,C,s,null!=h?h:n,null!=y?y:n,null!=b?b:n,w))),I.length>0&&(0,l.injectInitialization)(e,f,I,(e,t)=>{if(!m)for(const s of v)s.node.static||s.traverse(e,t)});const T=D(e);T.insertBefore([...k,...O]),j.length>0&&T.insertAfter(j),M.length>0&&T.find(e=>e.isStatement()||e.isDeclaration()).insertAfter(M)},PrivateName(e){if(this.file.get(u)===c&&!e.parentPath.isPrivate({key:e.node}))throw e.buildCodeFrameError(`Unknown PrivateName "${e}"`)},ExportDefaultDeclaration(e){if(this.file.get(u)!==c)return;const t=e.get("declaration");t.isClassDeclaration()&&(0,a.hasDecorators)(t.node)&&(t.node.id?(0,n.default)(e):t.node.type="ClassExpression")}}}},Object.defineProperty(t,"enableFeature",{enumerable:!0,get:function(){return d.enableFeature}}),Object.defineProperty(t,"injectInitialization",{enumerable:!0,get:function(){return l.injectInitialization}});var r=s(76),i=s(158),n=s(156),o=s(666),a=s(283),l=s(667),d=s(668),p=s(282);const c="7.16.5".split(".").reduce((e,t)=>1e5*e+ +t,0),u="@babel/plugin-class-features/version"},666:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildFieldsInitNodes=function(e,t,s,i,n,o,a,l,p){let c,u=!1;const f=[],m=[],h=[],N=r.types.isIdentifier(t)?()=>t:()=>(null!=c||(c=s[0].scope.generateUidIdentifierBasedOnNode(t)),c);for(const C of s){C.isClassProperty()&&d.assertFieldTransformed(C);const t=C.node.static,s=!t,c=C.isPrivate(),O=!c,j=C.isProperty(),I=!j,M=null==C.isStaticBlock?void 0:C.isStaticBlock();if(t||I&&c||M){const t=k(C,e,N,n,M,l,p);u=u||t}switch(!0){case M:f.push(r.template.statement.ast`(() => ${r.types.blockStatement(C.node.body)})()`);break;case t&&c&&j&&a:u=!0,f.push(y(r.types.cloneNode(e),C,i));break;case t&&c&&j&&!a:u=!0,f.push(g(C,i));break;case t&&O&&j&&o:u=!0,f.push(P(r.types.cloneNode(e),C));break;case t&&O&&j&&!o:u=!0,f.push(x(r.types.cloneNode(e),C,n));break;case s&&c&&j&&a:m.push(y(r.types.thisExpression(),C,i));break;case s&&c&&j&&!a:m.push(b(r.types.thisExpression(),C,i,n));break;case s&&c&&I&&a:m.unshift(v(r.types.thisExpression(),C,i)),h.push(w(C,i,a));break;case s&&c&&I&&!a:m.unshift(E(r.types.thisExpression(),C,i,n)),h.push(w(C,i,a));break;case t&&c&&I&&!a:u=!0,f.unshift(g(C,i)),h.push(w(C,i,a));break;case t&&c&&I&&a:u=!0,f.unshift(S(r.types.cloneNode(e),C,n,i)),h.push(w(C,i,a));break;case s&&O&&j&&o:m.push(P(r.types.thisExpression(),C));break;case s&&O&&j&&!o:m.push(x(r.types.thisExpression(),C,n));break;default:throw new Error("Unreachable.")}}return{staticNodes:f.filter(Boolean),instanceNodes:m.filter(Boolean),pureStaticNodes:h.filter(Boolean),wrapClass(t){for(const e of s)e.remove();return c&&(t.scope.push({id:r.types.cloneNode(c)}),t.set("superClass",r.types.assignmentExpression("=",c,t.node.superClass))),u?(t.isClassExpression()?(t.scope.push({id:e}),t.replaceWith(r.types.assignmentExpression("=",r.types.cloneNode(e),t.node))):t.node.id||(t.node.id=e),t):t}}},t.buildPrivateNamesMap=function(e){const t=new Map;for(const s of e)if(s.isPrivate()){const{name:e}=s.node.key.id,r=t.has(e)?t.get(e):{id:s.scope.generateUidIdentifier(e),static:s.node.static,method:!s.isProperty()};s.isClassPrivateMethod()&&("get"===s.node.kind?r.getId=s.scope.generateUidIdentifier("get_"+e):"set"===s.node.kind?r.setId=s.scope.generateUidIdentifier("set_"+e):"method"===s.node.kind&&(r.methodId=s.scope.generateUidIdentifier(e))),t.set(e,r)}return t},t.buildPrivateNamesNodes=function(e,t,s){const i=[];for(const[n,o]of e){const{static:e,method:a,getId:d,setId:p}=o,c=d||p,u=r.types.cloneNode(o.id);let f;t?f=r.types.callExpression(s.addHelper("classPrivateFieldLooseKey"),[r.types.stringLiteral(n)]):e||(f=r.types.newExpression(r.types.identifier(!a||c?"WeakMap":"WeakSet"),[])),f&&((0,l.default)(f),i.push(r.template.statement.ast`var ${u} = ${f}`))}return i},t.transformPrivateNamesUsage=function(e,t,s,{privateFieldsAsProperties:r,noDocumentAll:i,innerBinding:n},a){if(!s.size)return;const l=t.get("body"),d=r?h:m;(0,o.default)(l,c,Object.assign({privateNamesMap:s,classRef:e,file:a},d,{noDocumentAll:i,innerBinding:n})),l.traverse(f,{privateNamesMap:s,classRef:e,file:a,privateFieldsAsProperties:r,innerBinding:n})};var r=s(76),i=s(279),n=s(103),o=s(280),a=s(281),l=s(164),d=s(282);function p(e){const t=Object.assign({},e,{Class(e){const{privateNamesMap:r}=this,i=e.get("body.body"),n=new Map(r),o=[];for(const t of i){if(!t.isPrivate())continue;const{name:e}=t.node.key.id;n.delete(e),o.push(e)}o.length&&(e.get("body").traverse(s,Object.assign({},this,{redeclared:o})),e.traverse(t,Object.assign({},this,{privateNamesMap:n})),e.skipKey("body"))}}),s=r.traverse.visitors.merge([Object.assign({},e),n.default]);return t}const c=p({PrivateName(e,{noDocumentAll:t}){const{privateNamesMap:s,redeclared:r}=this,{node:i,parentPath:n}=e;if(!n.isMemberExpression({property:i})&&!n.isOptionalMemberExpression({property:i}))return;const{name:o}=i.id;s.has(o)&&(r&&r.includes(o)||this.handle(n,t))}});function u(e,t,s){for(;null!=(r=t)&&r.hasBinding(e)&&!t.bindingIdentifierEquals(e,s);){var r;t.rename(e),t=t.parent}}const f=p({BinaryExpression(e){const{operator:t,left:s,right:i}=e.node;if("in"!==t)return;if(!r.types.isPrivateName(s))return;const{privateFieldsAsProperties:n,privateNamesMap:o,redeclared:a}=this,{name:l}=s.id;if(!o.has(l))return;if(a&&a.includes(l))return;if(u(this.classRef.name,e.scope,this.innerBinding),n){const{id:t}=o.get(l);return void e.replaceWith(r.template.expression.ast`
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
`,h="arguments.1.body.body.0";c||b.arguments[1].body.directives.push(s.types.directive(s.types.directiveLiteral("use strict")));l&&(b=s.template.ast`let ${e} = ${b}`,h="declarations.0.init."+h);return{instanceNodes:[s.template.statement.ast`${s.types.cloneNode(o)}(this)`],wrapClass:e=>(e.replaceWith(b),e.get(h))}};var s=r(74),n=i(r(141)),a=i(r(191));function i(e){return e&&e.__esModule?e:{default:e}}function o(e){return!(!e.decorators||!e.decorators.length)}function l(e,t){return t?s.types.objectProperty(s.types.identifier(e),t):null}function d(e){let t;return e.decorators&&e.decorators.length>0&&(t=s.types.arrayExpression(e.decorators.map(e=>e.expression))),e.decorators=void 0,t}function c(e){return e.computed?e.key:s.types.isIdentifier(e.key)?s.types.stringLiteral(e.key.name):s.types.stringLiteral(String(e.key.value))}function p(e,t,r){const{node:i,scope:o}=r,p=r.isClassMethod();if(r.isPrivate())throw r.buildCodeFrameError(`Private ${p?"methods":"fields"} in decorated classes are not supported yet.`);new n.default({methodPath:r,methodNode:i,objectRef:e,isStatic:i.static,superRef:t,scope:o,file:this,refToPreserve:e},!0).replace();const u=[l("kind",s.types.stringLiteral(p?i.kind:"field")),l("decorators",d(i)),l("static",i.static&&s.types.booleanLiteral(!0)),l("key",c(i))].filter(Boolean);if(p){const e=i.computed?null:i.key;s.types.toExpression(i),u.push(l("value",(0,a.default)({node:i,id:e,scope:o})||i))}else i.value?u.push((f="value",m=s.template.statements.ast`return ${i.value}`,s.types.objectMethod("method",s.types.identifier(f),[],s.types.blockStatement(m)))):u.push(l("value",o.buildUndefinedNode()));var f,m;return r.remove(),s.types.objectExpression(u)}},837:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=r(89),n=d(r(838)),a=r(74),i=r(839),o=d(r(844)),l=d(r(845));function d(e){return e&&e.__esModule?e:{default:e}}function c(e){switch(e.parent.type){case"TSTypeReference":case"TSQualifiedName":case"TSExpressionWithTypeArguments":case"TSTypeQuery":return!0;case"ExportSpecifier":return"type"===e.parentPath.parent.exportKind;default:return!1}}const p=new WeakSet,u=new WeakMap;function f(e,t){const r=e.find(e=>e.isProgram()).node;return!e.scope.hasOwnBinding(t)&&(!!u.get(r).has(t)||(console.warn(`The exported identifier "${t}" is not declared in Babel's scope tracker\nas a JavaScript value binding, and "@babel/plugin-transform-typescript"\nnever encountered it as a TypeScript type declaration.\nIt will be treated as a JavaScript value.\n\nThis problem is likely caused by another plugin injecting\n"${t}" without registering it in the scope tracker. If you are the author\n of that plugin, please use "scope.registerDeclaration(declarationPath)".`),!1))}function m(e,t){u.get(e.path.node).add(t)}var y=(0,s.declare)((e,t)=>{e.assertVersion(7);const r=/\*?\s*@jsx((?:Frag)?)\s+([^\s]+)/,{allowNamespaces:s=!0,jsxPragma:d="React.createElement",jsxPragmaFrag:y="React.Fragment",onlyRemoveTypeImports:b=!1}=t;var{allowDeclareFields:h=!1}=t;const g={field(e){const{node:t}=e;if(!h&&t.declare)throw e.buildCodeFrameError("The 'declare' modifier is only allowed when the 'allowDeclareFields' option of @babel/plugin-transform-typescript or @babel/preset-typescript is enabled.");if(t.declare){if(t.value)throw e.buildCodeFrameError("Fields with the 'declare' modifier cannot be initialized here, but only in the constructor");t.decorators||e.remove()}else if(t.definite){if(t.value)throw e.buildCodeFrameError("Definitely assigned fields cannot be initialized here, but only in the constructor");h||t.decorators||e.remove()}else h||t.value||t.decorators||a.types.isClassPrivateProperty(t)||e.remove();t.accessibility&&(t.accessibility=null),t.abstract&&(t.abstract=null),t.readonly&&(t.readonly=null),t.optional&&(t.optional=null),t.typeAnnotation&&(t.typeAnnotation=null),t.definite&&(t.definite=null),t.declare&&(t.declare=null)},method({node:e}){e.accessibility&&(e.accessibility=null),e.abstract&&(e.abstract=null),e.optional&&(e.optional=null)},constructor(e,t){e.node.accessibility&&(e.node.accessibility=null);const r=[];for(const s of e.node.params)"TSParameterProperty"!==s.type||p.has(s.parameter)||(p.add(s.parameter),r.push(s.parameter));if(r.length){const s=r.map(t=>{let r;if(a.types.isIdentifier(t))r=t;else{if(!a.types.isAssignmentPattern(t)||!a.types.isIdentifier(t.left))throw e.buildCodeFrameError("Parameter properties can not be destructuring patterns.");r=t.left}return a.template.statement.ast`
|
|
15
|
+
this.${a.types.cloneNode(r)} = ${a.types.cloneNode(r)}`});(0,i.injectInitialization)(t,e,s)}}};return{name:"transform-typescript",inherits:n.default,visitor:{Pattern:v,Identifier:v,RestElement:v,Program(e,t){const{file:s}=t;let n=null,i=null;if(u.has(e.node)||u.set(e.node,new Set),s.ast.comments)for(const a of s.ast.comments){const e=r.exec(a.value);e&&(e[1]?i=e[2]:n=e[2])}let o=n||d;o&&([o]=o.split("."));let l=i||y;l&&([l]=l.split("."));for(let r of e.get("body"))if(a.types.isImportDeclaration(r)){if("type"===r.node.importKind){r.remove();continue}if(!b){if(0===r.node.specifiers.length)continue;let t=!0;const s=[];for(const n of r.node.specifiers){const a=r.scope.getBinding(n.local.name);a&&E({binding:a,programPath:e,pragmaImportName:o,pragmaFragImportName:l})?s.push(a.path):t=!1}if(t)r.remove();else for(const e of s)e.remove()}}else if(r.isExportDeclaration()&&(r=r.get("declaration")),r.isVariableDeclaration({declare:!0}))for(const t of Object.keys(r.getBindingIdentifiers()))m(e.scope,t);else(r.isTSTypeAliasDeclaration()||r.isTSDeclareFunction()||r.isTSInterfaceDeclaration()||r.isClassDeclaration({declare:!0})||r.isTSEnumDeclaration({declare:!0})||r.isTSModuleDeclaration({declare:!0})&&r.get("id").isIdentifier())&&m(e.scope,r.node.id.name)},ExportNamedDeclaration(e){"type"!==e.node.exportKind?!e.node.source&&e.node.specifiers.length>0&&e.node.specifiers.every(({local:t})=>f(e,t.name))&&e.remove():e.remove()},ExportSpecifier(e){!e.parent.source&&f(e,e.node.local.name)&&e.remove()},ExportDefaultDeclaration(e){a.types.isIdentifier(e.node.declaration)&&f(e,e.node.declaration.name)&&e.remove()},TSDeclareFunction(e){e.remove()},TSDeclareMethod(e){e.remove()},VariableDeclaration(e){e.node.declare&&e.remove()},VariableDeclarator({node:e}){e.definite&&(e.definite=null)},TSIndexSignature(e){e.remove()},ClassDeclaration(e){const{node:t}=e;t.declare&&e.remove()},Class(e){const{node:t}=e;t.typeParameters&&(t.typeParameters=null),t.superTypeParameters&&(t.superTypeParameters=null),t.implements&&(t.implements=null),t.abstract&&(t.abstract=null),e.get("body.body").forEach(t=>{t.isClassMethod()||t.isClassPrivateMethod()?"constructor"===t.node.kind?g.constructor(t,e):g.method(t,e):(t.isClassProperty()||t.isClassPrivateProperty())&&g.field(t,e)})},Function(e){const{node:t,scope:r}=e;t.typeParameters&&(t.typeParameters=null),t.returnType&&(t.returnType=null);const s=t.params;s.length>0&&a.types.isIdentifier(s[0],{name:"this"})&&s.shift();const n=e.get("params");for(const a of n)"TSParameterProperty"===a.type&&(a.replaceWith(a.get("parameter")),r.registerBinding("param",a))},TSModuleDeclaration(e){(0,l.default)(e,a.types,s)},TSInterfaceDeclaration(e){e.remove()},TSTypeAliasDeclaration(e){e.remove()},TSEnumDeclaration(e){(0,o.default)(e,a.types)},TSImportEqualsDeclaration(e){throw e.buildCodeFrameError("`import =` is not supported by @babel/plugin-transform-typescript\nPlease consider using `import <moduleName> from '<moduleName>';` alongside Typescript's --allowSyntheticDefaultImports option.")},TSExportAssignment(e){throw e.buildCodeFrameError("`export =` is not supported by @babel/plugin-transform-typescript\nPlease consider using `export <value>;`.")},TSTypeAssertion(e){e.replaceWith(e.node.expression)},TSAsExpression(e){let{node:t}=e;do{t=t.expression}while(a.types.isTSAsExpression(t));e.replaceWith(t)},TSNonNullExpression(e){e.replaceWith(e.node.expression)},CallExpression(e){e.node.typeParameters=null},OptionalCallExpression(e){e.node.typeParameters=null},NewExpression(e){e.node.typeParameters=null},JSXOpeningElement(e){e.node.typeParameters=null},TaggedTemplateExpression(e){e.node.typeParameters=null}}};function v({node:e}){e.typeAnnotation&&(e.typeAnnotation=null),a.types.isIdentifier(e)&&e.optional&&(e.optional=null)}function E({binding:e,programPath:t,pragmaImportName:r,pragmaFragImportName:s}){for(const a of e.referencePaths)if(!c(a))return!1;if(e.identifier.name!==r&&e.identifier.name!==s)return!0;let n=!1;return t.traverse({"JSXElement|JSXFragment"(e){n=!0,e.stop()}}),!n}});t.default=y},838:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=r(89);function n(e,t){const r=[];e.forEach((e,s)=>{const n=Array.isArray(e)?e[0]:e;n===t&&r.unshift(s)});for(const s of r)e.splice(s,1)}var a=(0,s.declare)((e,{isTSX:t})=>(e.assertVersion(7),{name:"syntax-typescript",manipulateOptions(e,r){const{plugins:s}=r;n(s,"flow"),n(s,"jsx"),r.plugins.push("typescript","classProperties"),r.plugins.push("objectRestSpread"),t&&r.plugins.push("jsx")}}));t.default=a},839:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createClassFeaturePlugin=function({name:e,feature:t,loose:r,manipulateOptions:c,api:f={assumption:()=>{}}}){const m=f.assumption("setPublicClassFields"),y=f.assumption("privateFieldsAsProperties"),b=f.assumption("constantSuper"),h=f.assumption("noDocumentAll");if(!0===r){const t=[];void 0!==m&&t.push('"setPublicClassFields"'),void 0!==y&&t.push('"privateFieldsAsProperties"'),0!==t.length&&console.warn(`[${e}]: You are using the "loose: true" option and you are explicitly setting a value for the `+t.join(" and ")+` assumption${t.length>1?"s":""}. The "loose" option can cause incompatibilities with the other class features plugins, so it's recommended that you replace it with the following top-level option:\n\t"assumptions": {\n\t\t"setPublicClassFields": true,\n\t\t"privateFieldsAsProperties": true\n\t}`)}return{name:e,manipulateOptions:c,pre(){(0,d.enableFeature)(this.file,t,r),(!this.file.get(u)||this.file.get(u)<p)&&this.file.set(u,p)},visitor:{Class(e,r){if(this.file.get(u)!==p)return;(0,d.verifyUsedFeatures)(e,this.file);const a=(0,d.isLoose)(this.file,t);let c,f=(0,o.hasOwnDecorators)(e.node);const g=[],v=[],E=[],P=new Set,w=e.get("body");for(const t of w.get("body")){if((0,d.verifyUsedFeatures)(t,this.file),t.node.computed&&E.push(t),t.isPrivate()){const{name:e}=t.node.key.id,r="get "+e,s="set "+e;if("get"===t.node.kind){if(P.has(r)||P.has(e)&&!P.has(s))throw t.buildCodeFrameError("Duplicate private field");P.add(r).add(e)}else if("set"===t.node.kind){if(P.has(s)||P.has(e)&&!P.has(r))throw t.buildCodeFrameError("Duplicate private field");P.add(s).add(e)}else{if(P.has(e)&&!P.has(r)&&!P.has(s)||P.has(e)&&(P.has(r)||P.has(s)))throw t.buildCodeFrameError("Duplicate private field");P.add(e)}}if(t.isClassMethod({kind:"constructor"})?c=t:(v.push(t),(t.isProperty()||t.isPrivate())&&g.push(t)),f||(f=(0,o.hasOwnDecorators)(t.node)),null!=t.isStaticBlock&&t.isStaticBlock())throw t.buildCodeFrameError('Incorrect plugin order, `@babel/plugin-proposal-class-static-block` should be placed before class features plugins\n{\n "plugins": [\n "@babel/plugin-proposal-class-static-block",\n "@babel/plugin-proposal-private-property-in-object",\n "@babel/plugin-proposal-private-methods",\n "@babel/plugin-proposal-class-properties",\n ]\n}')}if(!g.length&&!f)return;let N;e.isClassExpression()||!e.node.id?((0,n.default)(e),N=e.scope.generateUidIdentifier("class")):N=s.types.cloneNode(e.node.id);const x=(0,i.buildPrivateNamesMap)(g),S=(0,i.buildPrivateNamesNodes)(x,null!=y?y:a,r);let D,k,I,j;(0,i.transformPrivateNamesUsage)(N,e,x,{privateFieldsAsProperties:null!=y?y:a,noDocumentAll:h},r),f?(k=D=[],({instanceNodes:I,wrapClass:j}=(0,o.buildDecoratedClass)(N,e,v,this.file))):(D=(0,l.extractComputedKeys)(N,e,E,this.file),({staticNodes:k,instanceNodes:I,wrapClass:j}=(0,i.buildFieldsInitNodes)(N,e.node.superClass,g,x,r,null!=m?m:a,null!=y?y:a,null!=b?b:a))),I.length>0&&(0,l.injectInitialization)(e,c,I,(e,t)=>{if(!f)for(const r of g)r.node.static||r.traverse(e,t)}),e=j(e),e.insertBefore([...S,...D]),e.insertAfter(k)},PrivateName(e){if(this.file.get(u)===p&&!e.parentPath.isPrivate({key:e.node}))throw e.buildCodeFrameError(`Unknown PrivateName "${e}"`)},ExportDefaultDeclaration(e){if(this.file.get(u)!==p)return;const t=e.get("declaration");t.isClassDeclaration()&&(0,o.hasDecorators)(t.node)&&(t.node.id?(0,a.default)(e):t.node.type="ClassExpression")}}}},Object.defineProperty(t,"injectInitialization",{enumerable:!0,get:function(){return l.injectInitialization}}),Object.defineProperty(t,"FEATURES",{enumerable:!0,get:function(){return d.FEATURES}});var s=r(74),n=c(r(191)),a=c(r(189)),i=r(840),o=r(335),l=r(842),d=r(843);function c(e){return e&&e.__esModule?e:{default:e}}const p="7.13.10".split(".").reduce((e,t)=>1e5*e+ +t,0),u="@babel/plugin-class-features/version"},840:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildPrivateNamesMap=function(e){const t=new Map;for(const r of e){const e=r.isPrivate(),s=!r.isProperty(),n=!r.node.static;if(e){const{name:e}=r.node.key.id,a=t.has(e)?t.get(e):{id:r.scope.generateUidIdentifier(e),static:!n,method:s};"get"===r.node.kind?a.getId=r.scope.generateUidIdentifier("get_"+e):"set"===r.node.kind?a.setId=r.scope.generateUidIdentifier("set_"+e):"method"===r.node.kind&&(a.methodId=r.scope.generateUidIdentifier(e)),t.set(e,a)}}return t},t.buildPrivateNamesNodes=function(e,t,r){const n=[];for(const[a,i]of e){const{static:e,method:o,getId:l,setId:d}=i,c=l||d,p=s.types.cloneNode(i.id);t?n.push(s.template.statement.ast`
|
|
16
|
+
var ${p} = ${r.addHelper("classPrivateFieldLooseKey")}("${a}")
|
|
17
|
+
`):o&&!e?c?n.push(s.template.statement.ast`var ${p} = new WeakMap();`):n.push(s.template.statement.ast`var ${p} = new WeakSet();`):e||n.push(s.template.statement.ast`var ${p} = new WeakMap();`)}return n},t.transformPrivateNamesUsage=function(e,t,r,{privateFieldsAsProperties:s,noDocumentAll:n},i){if(!r.size)return;const o=t.get("body"),l=s?y:m;(0,a.default)(o,u,Object.assign({privateNamesMap:r,classRef:e,file:i},l,{noDocumentAll:n})),o.traverse(f,{privateNamesMap:r,classRef:e,file:i,privateFieldsAsProperties:s})},t.buildFieldsInitNodes=function(e,t,r,n,a,i,l,d){const c=[],p=[];let u=!1;for(const f of r){o.assertFieldTransformed(f);const r=f.node.static,m=!r,y=f.isPrivate(),S=!y,k=f.isProperty(),I=!k;if(r||I&&y){const r=D(f,e,t,a,d);u=u||r}switch(!0){case r&&y&&k&&l:u=!0,c.push(b(s.types.cloneNode(e),f,n));break;case r&&y&&k&&!l:u=!0,c.push(g(f,n));break;case r&&S&&k&&i:u=!0,c.push(P(s.types.cloneNode(e),f));break;case r&&S&&k&&!i:u=!0,c.push(w(s.types.cloneNode(e),f,a));break;case m&&y&&k&&l:p.push(b(s.types.thisExpression(),f,n));break;case m&&y&&k&&!l:p.push(h(s.types.thisExpression(),f,n));break;case m&&y&&I&&l:p.unshift(v(s.types.thisExpression(),f,n)),c.push(x(f,n,l));break;case m&&y&&I&&!l:p.unshift(E(s.types.thisExpression(),f,n)),c.push(x(f,n,l));break;case r&&y&&I&&!l:u=!0,c.unshift(g(f,n)),c.unshift(x(f,n,l));break;case r&&y&&I&&l:u=!0,c.unshift(N(s.types.cloneNode(e),f,a,n)),c.unshift(x(f,n,l));break;case m&&S&&k&&i:p.push(P(s.types.thisExpression(),f));break;case m&&S&&k&&!i:p.push(w(s.types.thisExpression(),f,a));break;default:throw new Error("Unreachable.")}}return{staticNodes:c.filter(Boolean),instanceNodes:p.filter(Boolean),wrapClass(t){for(const e of r)e.remove();return u?(t.isClassExpression()?(t.scope.push({id:e}),t.replaceWith(s.types.assignmentExpression("=",s.types.cloneNode(e),t.node))):t.node.id||(t.node.id=e),t):t}}};var s=r(74),n=c(r(141)),a=l(r(311)),i=l(r(312)),o=c(r(841));function l(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(r,n,a):r[n]=e[n]}return r.default=e,t&&t.set(e,r),r}function p(e){const t=Object.assign({},e,{Class(e){const{privateNamesMap:s}=this,n=e.get("body.body"),a=new Map(s),i=[];for(const t of n){if(!t.isPrivate())continue;const{name:e}=t.node.key.id;a.delete(e),i.push(e)}i.length&&(e.get("body").traverse(r,Object.assign({},this,{redeclared:i})),e.traverse(t,Object.assign({},this,{privateNamesMap:a})),e.skipKey("body"))}}),r=s.traverse.visitors.merge([Object.assign({},e),n.environmentVisitor]);return t}const u=p({PrivateName(e,{noDocumentAll:t}){const{privateNamesMap:r,redeclared:s}=this,{node:n,parentPath:a}=e;if(!a.isMemberExpression({property:n})&&!a.isOptionalMemberExpression({property:n}))return;const{name:i}=n.id;r.has(i)&&(s&&s.includes(i)||this.handle(a,t))}}),f=p({BinaryExpression(e){const{operator:t,left:r,right:n}=e.node;if("in"!==t)return;if(!e.get("left").isPrivateName())return;const{privateFieldsAsProperties:a,privateNamesMap:i,redeclared:o}=this,{name:l}=r.id;if(!i.has(l))return;if(o&&o.includes(l))return;if(a){const{id:t}=i.get(l);return void e.replaceWith(s.template.expression.ast`
|
|
18
|
+
Object.prototype.hasOwnProperty.call(${n}, ${s.types.cloneNode(t)})
|
|
19
|
+
`)}const{id:d,static:c}=i.get(l);c?e.replaceWith(s.template.expression.ast`${n} === ${this.classRef}`):e.replaceWith(s.template.expression.ast`${s.types.cloneNode(d)}.has(${n})`)}}),m={memoise(e,t){const{scope:r}=e,{object:s}=e.node,n=r.maybeGenerateMemoised(s);n&&this.memoiser.set(s,n,t)},receiver(e){const{object:t}=e.node;return this.memoiser.has(t)?s.types.cloneNode(this.memoiser.get(t)):s.types.cloneNode(t)},get(e){const{classRef:t,privateNamesMap:r,file:n}=this,{name:a}=e.node.property.id,{id:i,static:o,method:l,methodId:d,getId:c,setId:p}=r.get(a),u=c||p;if(o){const r=l&&!u?"classStaticPrivateMethodGet":"classStaticPrivateFieldSpecGet";return s.types.callExpression(n.addHelper(r),[this.receiver(e),s.types.cloneNode(t),s.types.cloneNode(i)])}if(l){if(u){if(!c&&p){if(n.availableHelper("writeOnlyError"))return s.types.sequenceExpression([this.receiver(e),s.types.callExpression(n.addHelper("writeOnlyError"),[s.types.stringLiteral("#"+a)])]);console.warn("@babel/helpers is outdated, update it to silence this warning.")}return s.types.callExpression(n.addHelper("classPrivateFieldGet"),[this.receiver(e),s.types.cloneNode(i)])}return s.types.callExpression(n.addHelper("classPrivateMethodGet"),[this.receiver(e),s.types.cloneNode(i),s.types.cloneNode(d)])}return s.types.callExpression(n.addHelper("classPrivateFieldGet"),[this.receiver(e),s.types.cloneNode(i)])},boundGet(e){return this.memoise(e,1),s.types.callExpression(s.types.memberExpression(this.get(e),s.types.identifier("bind")),[this.receiver(e)])},set(e,t){const{classRef:r,privateNamesMap:n,file:a}=this,{name:i}=e.node.property.id,{id:o,static:l,method:d,setId:c,getId:p}=n.get(i),u=p||c;if(l){const n=d&&!u?"classStaticPrivateMethodSet":"classStaticPrivateFieldSpecSet";return s.types.callExpression(a.addHelper(n),[this.receiver(e),s.types.cloneNode(r),s.types.cloneNode(o),t])}return d?c?s.types.callExpression(a.addHelper("classPrivateFieldSet"),[this.receiver(e),s.types.cloneNode(o),t]):s.types.sequenceExpression([this.receiver(e),t,s.types.callExpression(a.addHelper("readOnlyError"),[s.types.stringLiteral("#"+i)])]):s.types.callExpression(a.addHelper("classPrivateFieldSet"),[this.receiver(e),s.types.cloneNode(o),t])},destructureSet(e){const{classRef:t,privateNamesMap:r,file:n}=this,{name:a}=e.node.property.id,{id:i,static:o}=r.get(a);if(o){try{var l=n.addHelper("classStaticPrivateFieldDestructureSet")}catch(d){throw new Error("Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \nplease update @babel/helpers to the latest version.")}return s.types.memberExpression(s.types.callExpression(l,[this.receiver(e),s.types.cloneNode(t),s.types.cloneNode(i)]),s.types.identifier("value"))}return s.types.memberExpression(s.types.callExpression(n.addHelper("classPrivateFieldDestructureSet"),[this.receiver(e),s.types.cloneNode(i)]),s.types.identifier("value"))},call(e,t){return this.memoise(e,1),(0,i.default)(this.get(e),this.receiver(e),t,!1)},optionalCall(e,t){return this.memoise(e,1),(0,i.default)(this.get(e),this.receiver(e),t,!0)}},y={get(e){const{privateNamesMap:t,file:r}=this,{object:n}=e.node,{name:a}=e.node.property.id;return s.template.expression`BASE(REF, PROP)[PROP]`({BASE:r.addHelper("classPrivateFieldLooseBase"),REF:s.types.cloneNode(n),PROP:s.types.cloneNode(t.get(a).id)})},boundGet(e){return s.types.callExpression(s.types.memberExpression(this.get(e),s.types.identifier("bind")),[s.types.cloneNode(e.node.object)])},simpleSet(e){return this.get(e)},destructureSet(e){return this.get(e)},call(e,t){return s.types.callExpression(this.get(e),t)},optionalCall(e,t){return s.types.optionalCallExpression(this.get(e),t,!0)}};function b(e,t,r){const{id:n}=r.get(t.node.key.id.name),a=t.node.value||t.scope.buildUndefinedNode();return s.template.statement.ast`
|
|
20
|
+
Object.defineProperty(${e}, ${s.types.cloneNode(n)}, {
|
|
19
21
|
// configurable is false by default
|
|
20
22
|
// enumerable is false by default
|
|
21
23
|
writable: true,
|
|
22
|
-
value: ${
|
|
24
|
+
value: ${a}
|
|
23
25
|
});
|
|
24
|
-
`}function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
${r.types.cloneNode(n)},
|
|
32
|
-
{
|
|
33
|
-
writable: true,
|
|
34
|
-
value: ${o}
|
|
35
|
-
},
|
|
36
|
-
)`}function g(e,t){const s=t.get(e.node.key.id.name),{id:i,getId:n,setId:o,initAdded:a}=s,l=n||o;if(!e.isProperty()&&(a||!l))return;if(l)return t.set(e.node.key.id.name,Object.assign({},s,{initAdded:!0})),r.template.statement.ast`
|
|
37
|
-
var ${r.types.cloneNode(i)} = {
|
|
26
|
+
`}function h(e,t,r){const{id:n}=r.get(t.node.key.id.name),a=t.node.value||t.scope.buildUndefinedNode();return s.template.statement.ast`${s.types.cloneNode(n)}.set(${e}, {
|
|
27
|
+
// configurable is always false for private elements
|
|
28
|
+
// enumerable is always false for private elements
|
|
29
|
+
writable: true,
|
|
30
|
+
value: ${a},
|
|
31
|
+
})`}function g(e,t){const r=t.get(e.node.key.id.name),{id:n,getId:a,setId:i,initAdded:o}=r,l=a||i;if(!e.isProperty()&&(o||!l))return;if(l)return t.set(e.node.key.id.name,Object.assign({},r,{initAdded:!0})),s.template.statement.ast`
|
|
32
|
+
var ${s.types.cloneNode(n)} = {
|
|
38
33
|
// configurable is false by default
|
|
39
34
|
// enumerable is false by default
|
|
40
35
|
// writable is false by default
|
|
41
|
-
get: ${
|
|
42
|
-
set: ${
|
|
36
|
+
get: ${a?a.name:e.scope.buildUndefinedNode()},
|
|
37
|
+
set: ${i?i.name:e.scope.buildUndefinedNode()}
|
|
43
38
|
}
|
|
44
|
-
`;const d=e.node.value||e.scope.buildUndefinedNode();return
|
|
45
|
-
var ${
|
|
39
|
+
`;const d=e.node.value||e.scope.buildUndefinedNode();return s.template.statement.ast`
|
|
40
|
+
var ${s.types.cloneNode(n)} = {
|
|
46
41
|
// configurable is false by default
|
|
47
42
|
// enumerable is false by default
|
|
48
43
|
writable: true,
|
|
49
44
|
value: ${d}
|
|
50
45
|
};
|
|
51
|
-
`}function v(e,t,
|
|
52
|
-
Object.defineProperty(${e}, ${
|
|
46
|
+
`}function v(e,t,r){const n=r.get(t.node.key.id.name),{methodId:a,id:i,getId:o,setId:l,initAdded:d}=n;if(d)return;if(a)return s.template.statement.ast`
|
|
47
|
+
Object.defineProperty(${e}, ${i}, {
|
|
53
48
|
// configurable is false by default
|
|
54
49
|
// enumerable is false by default
|
|
55
50
|
// writable is false by default
|
|
56
|
-
value: ${
|
|
51
|
+
value: ${a.name}
|
|
57
52
|
});
|
|
58
|
-
`;const
|
|
59
|
-
Object.defineProperty(${e}, ${
|
|
53
|
+
`;const c=o||l;return c?(r.set(t.node.key.id.name,Object.assign({},n,{initAdded:!0})),s.template.statement.ast`
|
|
54
|
+
Object.defineProperty(${e}, ${i}, {
|
|
60
55
|
// configurable is false by default
|
|
61
56
|
// enumerable is false by default
|
|
62
57
|
// writable is false by default
|
|
63
|
-
get: ${
|
|
58
|
+
get: ${o?o.name:t.scope.buildUndefinedNode()},
|
|
64
59
|
set: ${l?l.name:t.scope.buildUndefinedNode()}
|
|
65
60
|
});
|
|
66
|
-
`):void 0}function E(e,t,
|
|
67
|
-
${
|
|
68
|
-
get: ${
|
|
69
|
-
set: ${
|
|
61
|
+
`):void 0}function E(e,t,r){const n=r.get(t.node.key.id.name),{id:a,getId:i,setId:o,initAdded:l}=n;if(l)return;const d=i||o;return d?(r.set(t.node.key.id.name,Object.assign({},n,{initAdded:!0})),s.template.statement.ast`
|
|
62
|
+
${a}.set(${e}, {
|
|
63
|
+
get: ${i?i.name:t.scope.buildUndefinedNode()},
|
|
64
|
+
set: ${o?o.name:t.scope.buildUndefinedNode()}
|
|
70
65
|
});
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
${r.types.cloneNode(o)},
|
|
74
|
-
{
|
|
75
|
-
get: ${a?a.name:t.scope.buildUndefinedNode()},
|
|
76
|
-
set: ${l?l.name:t.scope.buildUndefinedNode()}
|
|
77
|
-
},
|
|
78
|
-
)`}(e,t,s,i):function(e,t,s,i){const n=s.get(t.node.key.id.name),{id:o}=n;if(!i.availableHelper("classPrivateMethodInitSpec"))return r.template.statement.ast`${o}.add(${e})`;const a=i.addHelper("classPrivateMethodInitSpec");return r.template.statement.ast`${a}(
|
|
79
|
-
${r.types.thisExpression()},
|
|
80
|
-
${r.types.cloneNode(o)}
|
|
81
|
-
)`}(e,t,s,i)}function P(e,t){const{key:s,computed:i}=t.node,n=t.node.value||t.scope.buildUndefinedNode();return r.types.expressionStatement(r.types.assignmentExpression("=",r.types.memberExpression(e,s,i||r.types.isLiteral(s)),n))}function x(e,t,s){const{key:i,computed:n}=t.node,o=t.node.value||t.scope.buildUndefinedNode();return r.types.expressionStatement(r.types.callExpression(s.addHelper("defineProperty"),[e,n||r.types.isLiteral(i)?i:r.types.stringLiteral(i.name),o]))}function S(e,t,s,i){const n=i.get(t.node.key.id.name),{id:o,methodId:a,getId:l,setId:d,initAdded:p}=n;if(p)return;const c=l||d;return c?(i.set(t.node.key.id.name,Object.assign({},n,{initAdded:!0})),r.template.statement.ast`
|
|
82
|
-
Object.defineProperty(${e}, ${o}, {
|
|
66
|
+
`):s.template.statement.ast`${a}.add(${e})`}function P(e,t){const{key:r,computed:n}=t.node,a=t.node.value||t.scope.buildUndefinedNode();return s.types.expressionStatement(s.types.assignmentExpression("=",s.types.memberExpression(e,r,n||s.types.isLiteral(r)),a))}function w(e,t,r){const{key:n,computed:a}=t.node,i=t.node.value||t.scope.buildUndefinedNode();return s.types.expressionStatement(s.types.callExpression(r.addHelper("defineProperty"),[e,a||s.types.isLiteral(n)?n:s.types.stringLiteral(n.name),i]))}function N(e,t,r,n){const a=n.get(t.node.key.id.name),{id:i,methodId:o,getId:l,setId:d,initAdded:c}=a;if(c)return;const p=l||d;return p?(n.set(t.node.key.id.name,Object.assign({},a,{initAdded:!0})),s.template.statement.ast`
|
|
67
|
+
Object.defineProperty(${e}, ${i}, {
|
|
83
68
|
// configurable is false by default
|
|
84
69
|
// enumerable is false by default
|
|
85
70
|
// writable is false by default
|
|
86
71
|
get: ${l?l.name:t.scope.buildUndefinedNode()},
|
|
87
72
|
set: ${d?d.name:t.scope.buildUndefinedNode()}
|
|
88
73
|
})
|
|
89
|
-
`):
|
|
90
|
-
Object.defineProperty(${e}, ${
|
|
74
|
+
`):s.template.statement.ast`
|
|
75
|
+
Object.defineProperty(${e}, ${i}, {
|
|
91
76
|
// configurable is false by default
|
|
92
77
|
// enumerable is false by default
|
|
93
78
|
// writable is false by default
|
|
94
|
-
value: ${
|
|
79
|
+
value: ${o.name}
|
|
95
80
|
});
|
|
96
|
-
`}function w(e,t,s=!1){const i=t.get(e.node.key.id.name),{id:n,methodId:o,getId:a,setId:l,getterDeclared:d,setterDeclared:p,static:c}=i,{params:u,body:f,generator:m,async:h}=e.node,y=a&&!d&&0===u.length,b=l&&!p&&u.length>0;let g=o;return y?(t.set(e.node.key.id.name,Object.assign({},i,{getterDeclared:!0})),g=a):b?(t.set(e.node.key.id.name,Object.assign({},i,{setterDeclared:!0})),g=l):c&&!s&&(g=n),r.types.functionDeclaration(r.types.cloneNode(g),u,f,m,h)}const N=r.traverse.visitors.merge([{ThisExpression(e,t){t.needsClassRef=!0,e.replaceWith(r.types.cloneNode(t.classRef))},MetaProperty(e){const t=e.get("meta"),s=e.get("property"),{scope:r}=e;t.isIdentifier({name:"new"})&&s.isIdentifier({name:"target"})&&e.replaceWith(r.buildUndefinedNode())}},n.default]),C={ReferencedIdentifier(e,t){e.scope.bindingIdentifierEquals(e.node.name,t.innerBinding)&&(t.needsClassRef=!0,e.node.name=t.classRef.name)}};function k(e,t,s,n,o,a,l){var d;const p={classRef:t,needsClassRef:!1,innerBinding:l},c=new i.default({methodPath:e,constantSuper:a,file:n,refToPreserve:t,getSuperRef:s,getObjectRef:()=>(p.needsClassRef=!0,o||e.node.static?t:r.types.memberExpression(t,r.types.identifier("prototype")))});return c.replace(),(o||e.isProperty())&&e.traverse(N,p),null!=(d=p.classRef)&&d.name&&p.classRef.name!==(null==l?void 0:l.name)&&e.traverse(C,p),p.needsClassRef}},667:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractComputedKeys=function(e,t,s,i){const n=[],o={classBinding:t.node.id&&t.scope.getBinding(t.node.id.name),file:i};for(const d of s){const e=d.get("key");e.isReferencedIdentifier()?a(e,o):e.traverse(l,o);const s=d.node;if(!e.isConstantExpression()){const e=t.scope.generateUidIdentifierBasedOnNode(s.key);t.scope.push({id:e,kind:"let"}),n.push(r.types.expressionStatement(r.types.assignmentExpression("=",r.types.cloneNode(e),s.key))),s.key=r.types.cloneNode(e)}}return n},t.injectInitialization=function(e,t,s,i){if(!s.length)return;const a=!!e.node.superClass;if(!t){const s=r.types.classMethod("constructor",r.types.identifier("constructor"),[],r.types.blockStatement([]));a&&(s.params=[r.types.restElement(r.types.identifier("args"))],s.body.body.push(r.template.statement.ast`super(...args)`)),[t]=e.get("body").unshiftContainer("body",s)}i&&i(o,{scope:t.scope});if(a){const e=[];t.traverse(n,e);let i=!0;for(const t of e)i?(t.insertAfter(s),i=!1):t.insertAfter(s.map(e=>r.types.cloneNode(e)))}else t.get("body").unshiftContainer("body",s)};var r=s(76),i=s(103);const n=r.traverse.visitors.merge([{Super(e){const{node:t,parentPath:s}=e;s.isCallExpression({callee:t})&&this.push(s)}},i.default]),o={"TSTypeAnnotation|TypeAnnotation"(e){e.skip()},ReferencedIdentifier(e){this.scope.hasOwnBinding(e.node.name)&&(this.scope.rename(e.node.name),e.skip())}};function a(e,t){if(t.classBinding&&t.classBinding===e.scope.getBinding(e.node.name)){const s=t.file.addHelper("classNameTDZError"),i=r.types.callExpression(s,[r.types.stringLiteral(e.node.name)]);e.replaceWith(r.types.sequenceExpression([i,e.node])),e.skip()}}const l={ReferencedIdentifier:a}},668:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FEATURES=void 0,t.enableFeature=function(e,t,s){d(e,t)&&!u(e,t)||(e.set(o,e.get(o)|t),"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error"===s?(c(e,t,!0),e.set(l,e.get(l)|t)):"#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"===s?(c(e,t,!1),e.set(l,e.get(l)|t)):c(e,t,s));let r,i;for(const[o,a]of n){if(!d(e,o))continue;const t=p(e,o);if(!u(e,o)){if(r===!t)throw new Error("'loose' mode configuration must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled).");r=t,i=a}}if(void 0!==r)for(const[o,a]of n)d(e,o)&&p(e,o)!==r&&(c(e,o,r),console.warn(`Though the "loose" option was set to "${!r}" in your @babel/preset-env config, it will not be used for ${a} since the "loose" mode option was set to "${r}" for ${i}.\nThe "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding\n\t["${a}", { "loose": ${r} }]\nto the "plugins" section of your Babel config.`))},t.isLoose=p,t.verifyUsedFeatures=function(e,t){if((0,r.hasOwnDecorators)(e.node)){if(!d(t,i.decorators))throw e.buildCodeFrameError('Decorators are not enabled.\nIf you are using ["@babel/plugin-proposal-decorators", { "legacy": true }], make sure it comes *before* "@babel/plugin-proposal-class-properties" and enable loose mode, like so:\n\t["@babel/plugin-proposal-decorators", { "legacy": true }]\n\t["@babel/plugin-proposal-class-properties", { "loose": true }]');if(e.isPrivate())throw e.buildCodeFrameError(`Private ${e.isClassMethod()?"methods":"fields"} in decorated classes are not supported yet.`)}if(null!=e.isClassPrivateMethod&&e.isClassPrivateMethod()&&!d(t,i.privateMethods))throw e.buildCodeFrameError("Class private methods are not enabled.");if(e.isPrivateName()&&e.parentPath.isBinaryExpression({operator:"in",left:e.node})&&!d(t,i.privateIn))throw e.buildCodeFrameError("Private property in checks are not enabled.");if(e.isProperty()&&!d(t,i.fields))throw e.buildCodeFrameError("Class fields are not enabled.");if(null!=e.isStaticBlock&&e.isStaticBlock()&&!d(t,i.staticBlocks))throw e.buildCodeFrameError("Static class blocks are not enabled. Please add `@babel/plugin-proposal-class-static-block` to your configuration.")};var r=s(283);const i=Object.freeze({fields:2,privateMethods:4,decorators:8,privateIn:16,staticBlocks:32});t.FEATURES=i;const n=new Map([[i.fields,"@babel/plugin-proposal-class-properties"],[i.privateMethods,"@babel/plugin-proposal-private-methods"],[i.privateIn,"@babel/plugin-proposal-private-property-in-object"]]),o="@babel/plugin-class-features/featuresKey",a="@babel/plugin-class-features/looseKey",l="@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing";function d(e,t){return!!(e.get(o)&t)}function p(e,t){return!!(e.get(a)&t)}function c(e,t,s){s?e.set(a,e.get(a)|t):e.set(a,e.get(a)&~t),e.set(l,e.get(l)&~t)}function u(e,t){return!!(e.get(l)&t)}},669:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const{name:s}=e.node.id,i=e.parentPath.isExportNamedDeclaration();let n=i;!n&&t.isProgram(e.parent)&&(n=e.parent.body.some(e=>t.isExportNamedDeclaration(e)&&!e.source&&e.specifiers.some(e=>t.isExportSpecifier(e)&&e.local.name===s)));const o=(0,r.translateEnumValues)(e,t);if(n){const r=t.objectExpression(o.map(([e,s])=>t.objectProperty(t.isValidIdentifier(e)?t.identifier(e):t.stringLiteral(e),s)));return void(e.scope.hasOwnBinding(s)?(i?e.parentPath:e).replaceWith(t.expressionStatement(t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("assign")),[e.node.id,r]))):(e.replaceWith(t.variableDeclaration("var",[t.variableDeclarator(e.node.id,r)])),e.scope.registerDeclaration(e)))}const a=new Map(o);e.scope.path.traverse({Scope(e){e.scope.hasOwnBinding(s)&&e.skip()},MemberExpression(e){if(!t.isIdentifier(e.node.object,{name:s}))return;let r;if(e.node.computed){if(!t.isStringLiteral(e.node.property))return;r=e.node.property.value}else{if(!t.isIdentifier(e.node.property))return;r=e.node.property.name}a.has(r)&&e.replaceWith(t.cloneNode(a.get(r)))}}),e.remove()};var r=s(284)},670:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,s){if(e.node.declare||"StringLiteral"===e.node.id.type)return void e.remove();if(!s)throw e.hub.file.buildCodeFrameError(e.node.id,"Namespace not marked type-only declare. Non-declarative namespaces are only supported experimentally in Babel. To enable and review caveats see: https://babeljs.io/docs/en/babel-plugin-transform-typescript");const l=e.node.id.name,d=function e(t,s,l,d){const p=new Set,c=l.id;s.assertIdentifier(c);const u=t.scope.generateUid(c.name),f=s.isTSModuleBlock(l.body)?l.body.body:[s.exportNamedDeclaration(l.body)];for(let r=0;r<f.length;r++){const l=f[r];switch(l.type){case"TSModuleDeclaration":{if(!s.isIdentifier(l.id))throw a(t,l);const n=e(t,s,l),o=l.id.name;p.has(o)?f[r]=n:(p.add(o),f.splice(r++,1,i(s,o),n));continue}case"TSEnumDeclaration":case"FunctionDeclaration":case"ClassDeclaration":p.add(l.id.name);continue;case"VariableDeclaration":for(const e in s.getBindingIdentifiers(l))p.add(e);continue;default:continue;case"ExportNamedDeclaration":}switch(l.declaration.type){case"TSEnumDeclaration":case"FunctionDeclaration":case"ClassDeclaration":{const e=l.declaration.id.name;p.add(e),f.splice(r++,1,l.declaration,s.expressionStatement(s.assignmentExpression("=",n(s,u,e),s.identifier(e))));break}case"VariableDeclaration":{const e=o(l.declaration,u,t.hub);f.splice(r,e.length,...e),r+=e.length-1;break}case"TSModuleDeclaration":{if(!s.isIdentifier(l.declaration.id))throw a(t,l.declaration);const n=e(t,s,l.declaration,s.identifier(u)),o=l.declaration.id.name;p.has(o)?f[r]=n:(p.add(o),f.splice(r++,1,i(s,o),n))}}}let m=s.objectExpression([]);if(d){const e=s.memberExpression(d,c);m=r.template.expression.ast`
|
|
97
|
-
${
|
|
98
|
-
(${
|
|
99
|
-
`}return
|
|
100
|
-
(function (${
|
|
101
|
-
${
|
|
102
|
-
})(${c} || (${
|
|
103
|
-
`}(e,t,t.cloneDeep(e.node)),
|
|
81
|
+
`}function x(e,t,r=!1){const n=t.get(e.node.key.id.name),{id:a,methodId:i,getId:o,setId:l,getterDeclared:d,setterDeclared:c,static:p}=n,{params:u,body:f,generator:m,async:y}=e.node,b=s.types.functionExpression(i,u,f,m,y),h=o&&!d&&0===u.length,g=l&&!c&&u.length>0;return h?(t.set(e.node.key.id.name,Object.assign({},n,{getterDeclared:!0})),s.types.variableDeclaration("var",[s.types.variableDeclarator(o,b)])):g?(t.set(e.node.key.id.name,Object.assign({},n,{setterDeclared:!0})),s.types.variableDeclaration("var",[s.types.variableDeclarator(l,b)])):p&&!r?s.types.variableDeclaration("var",[s.types.variableDeclarator(s.types.cloneNode(a),s.types.functionExpression(a,u,f,m,y))]):s.types.variableDeclaration("var",[s.types.variableDeclarator(s.types.cloneNode(i),b)])}const S=s.traverse.visitors.merge([{ThisExpression(e,t){t.needsClassRef=!0,e.replaceWith(s.types.cloneNode(t.classRef))}},n.environmentVisitor]);function D(e,t,r,a,i){const o={classRef:t,needsClassRef:!1},l=new n.default({methodPath:e,constantSuper:i,superRef:r,file:a,refToPreserve:t,getObjectRef:()=>(o.needsClassRef=!0,e.node.static?t:s.types.memberExpression(t,s.types.identifier("prototype")))});return l.replace(),e.isProperty()&&e.traverse(S,o),o.needsClassRef}},841:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertFieldTransformed=function(e){if(e.node.declare)throw e.buildCodeFrameError("TypeScript 'declare' fields must first be transformed by @babel/plugin-transform-typescript.\nIf you have already enabled that plugin (or '@babel/preset-typescript'), make sure that it runs before any plugin related to additional class features:\n - @babel/plugin-proposal-class-properties\n - @babel/plugin-proposal-private-methods\n - @babel/plugin-proposal-decorators")}},842:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectInitialization=function(e,t,r,n){if(!r.length)return;const o=!!e.node.superClass;if(!t){const r=s.types.classMethod("constructor",s.types.identifier("constructor"),[],s.types.blockStatement([]));o&&(r.params=[s.types.restElement(s.types.identifier("args"))],r.body.body.push(s.template.statement.ast`super(...args)`)),[t]=e.get("body").unshiftContainer("body",r)}n&&n(i,{scope:t.scope});if(o){const e=[];t.traverse(a,e);let n=!0;for(const t of e)n?(t.insertAfter(r),n=!1):t.insertAfter(r.map(e=>s.types.cloneNode(e)))}else t.get("body").unshiftContainer("body",r)},t.extractComputedKeys=function(e,t,r,n){const a=[],i={classBinding:t.node.id&&t.scope.getBinding(t.node.id.name),file:n};for(const d of r){const e=d.get("key");e.isReferencedIdentifier()?o(e,i):e.traverse(l,i);const r=d.node;if(!e.isConstantExpression()){const e=t.scope.generateUidIdentifierBasedOnNode(r.key);t.scope.push({id:e,kind:"let"}),a.push(s.types.expressionStatement(s.types.assignmentExpression("=",s.types.cloneNode(e),r.key))),r.key=s.types.cloneNode(e)}}return a};var s=r(74),n=r(141);const a=s.traverse.visitors.merge([{Super(e){const{node:t,parentPath:r}=e;r.isCallExpression({callee:t})&&this.push(r)}},n.environmentVisitor]),i={"TSTypeAnnotation|TypeAnnotation"(e){e.skip()},ReferencedIdentifier(e){this.scope.hasOwnBinding(e.node.name)&&(this.scope.rename(e.node.name),e.skip())}};function o(e,t){if(t.classBinding&&t.classBinding===e.scope.getBinding(e.node.name)){const r=t.file.addHelper("classNameTDZError"),n=s.types.callExpression(r,[s.types.stringLiteral(e.node.name)]);e.replaceWith(s.types.sequenceExpression([n,e.node])),e.skip()}}const l={ReferencedIdentifier:o}},843:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enableFeature=function(e,t,r){d(e,t)&&!u(e,t)||(e.set(i,e.get(i)|t),"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error"===r?(p(e,t,!0),e.set(l,e.get(l)|t)):"#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"===r?(p(e,t,!1),e.set(l,e.get(l)|t)):p(e,t,r));let s,n;for(const[i,o]of a){if(!d(e,i))continue;const t=c(e,i);if(!u(e,i)){if(s===!t)throw new Error("'loose' mode configuration must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled).");s=t,n=o}}if(void 0!==s)for(const[i,o]of a)d(e,i)&&c(e,i)!==s&&(p(e,i,s),console.warn(`Though the "loose" option was set to "${!s}" in your @babel/preset-env config, it will not be used for ${o} since the "loose" mode option was set to "${s}" for ${n}.\nThe "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding\n\t["${o}", { "loose": ${s} }]\nto the "plugins" section of your Babel config.`))},t.isLoose=c,t.verifyUsedFeatures=function(e,t){if((0,s.hasOwnDecorators)(e.node)){if(!d(t,n.decorators))throw e.buildCodeFrameError('Decorators are not enabled.\nIf you are using ["@babel/plugin-proposal-decorators", { "legacy": true }], make sure it comes *before* "@babel/plugin-proposal-class-properties" and enable loose mode, like so:\n\t["@babel/plugin-proposal-decorators", { "legacy": true }]\n\t["@babel/plugin-proposal-class-properties", { "loose": true }]');if(e.isPrivate())throw e.buildCodeFrameError(`Private ${e.isClassMethod()?"methods":"fields"} in decorated classes are not supported yet.`)}if(e.isPrivate()&&e.isMethod()&&!d(t,n.privateMethods))throw e.buildCodeFrameError("Class private methods are not enabled.");if(e.isPrivateName()&&e.parentPath.isBinaryExpression({operator:"in",left:e.node})&&!d(t,n.privateIn))throw e.buildCodeFrameError("Private property in checks are not enabled.");if(e.isProperty()&&!d(t,n.fields))throw e.buildCodeFrameError("Class fields are not enabled.")},t.FEATURES=void 0;var s=r(335);const n=Object.freeze({fields:2,privateMethods:4,decorators:8,privateIn:16});t.FEATURES=n;const a=new Map([[n.fields,"@babel/plugin-proposal-class-properties"],[n.privateMethods,"@babel/plugin-proposal-private-methods"],[n.privateIn,"@babel/plugin-proposal-private-private-property-in-object"]]),i="@babel/plugin-class-features/featuresKey",o="@babel/plugin-class-features/looseKey",l="@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing";function d(e,t){return!!(e.get(i)&t)}function c(e,t){return!!(e.get(o)&t)}function p(e,t,r){r?e.set(o,e.get(o)|t):e.set(o,e.get(o)&~t),e.set(l,e.get(l)&~t)}function u(e,t){return!!(e.get(l)&t)}},844:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const{node:r}=e;if(r.const)throw e.buildCodeFrameError("'const' enums are not supported.");if(r.declare)return void e.remove();const s=r.id.name,a=function(e,t,r){const s=function(e,t){const r=Object.create(null);let s=-1;return e.node.members.map(a=>{const i=t.isIdentifier(a.id)?a.id.name:a.id.value,o=a.initializer;let l;if(o){const e=function(e,t){return r(e);function r(e){switch(e.type){case"StringLiteral":return e.value;case"UnaryExpression":return function({argument:e,operator:t}){const s=r(e);if(void 0===s)return;switch(t){case"+":return s;case"-":return-s;case"~":return~s;default:return}}(e);case"BinaryExpression":return function(e){const t=r(e.left);if(void 0===t)return;const s=r(e.right);if(void 0===s)return;switch(e.operator){case"|":return t|s;case"&":return t&s;case">>":return t>>s;case">>>":return t>>>s;case"<<":return t<<s;case"^":return t^s;case"*":return t*s;case"/":return t/s;case"+":return t+s;case"-":return t-s;case"%":return t%s;default:return}}(e);case"NumericLiteral":return e.value;case"ParenthesizedExpression":return r(e.expression);case"Identifier":return t[e.name];case"TemplateLiteral":if(1===e.quasis.length)return e.quasis[0].value.cooked;default:return}}}(o,r);void 0!==e?(r[i]=e,"number"==typeof e?(l=t.numericLiteral(e),s=e):((0,n.default)("string"==typeof e),l=t.stringLiteral(e),s=void 0)):(l=o,s=void 0)}else{if(void 0===s)throw e.buildCodeFrameError("Enum member must have initializer.");s++,l=t.numericLiteral(s),r[i]=s}return[i,l]})}(e,t),a=s.map(([e,s])=>{return n=t.isStringLiteral(s),a={ENUM:t.cloneNode(r),NAME:e,VALUE:s},(n?o:l)(a);var n,a});return i({ID:t.cloneNode(r),ASSIGNMENTS:a})}(e,t,r.id);switch(e.parent.type){case"BlockStatement":case"ExportNamedDeclaration":case"Program":if(e.insertAfter(a),function e(t){if(t.isExportDeclaration())return e(t.parentPath);return!!t.getData(s)||(t.setData(s,!0),!1)}(e.parentPath))e.remove();else{const s=t.isProgram(e.parent);e.scope.registerDeclaration(e.replaceWith(function(e,t,r){return t.variableDeclaration(r,[t.variableDeclarator(e)])}(r.id,t,s?"var":"let"))[0])}break;default:throw new Error("Unexpected enum parent '"+e.parent.type)}};var s,n=(s=r(112),s&&s.__esModule?s:{default:s}),a=r(74);const i=(0,a.template)("\n (function (ID) {\n ASSIGNMENTS;\n })(ID || (ID = {}));\n"),o=(0,a.template)('\n ENUM["NAME"] = VALUE;\n'),l=(0,a.template)('\n ENUM[ENUM["NAME"] = VALUE] = "NAME";\n')},845:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if(e.node.declare||"StringLiteral"===e.node.id.type)return void e.remove();if(!r)throw e.hub.file.buildCodeFrameError(e.node.id,"Namespace not marked type-only declare. Non-declarative namespaces are only supported experimentally in Babel. To enable and review caveats see: https://babeljs.io/docs/en/babel-plugin-transform-typescript");const o=e.node.id.name,l=function e(t,r,o,l){const d=new Set,c=o.id,p=t.scope.generateUid(c.name),u=o.body.body;for(let s=0;s<u.length;s++){const o=u[s];switch(o.type){case"TSModuleDeclaration":{const a=e(t,r,o),i=o.id.name;d.has(i)?u[s]=a:(d.add(i),u.splice(s++,1,n(r,i),a));continue}case"TSEnumDeclaration":case"FunctionDeclaration":case"ClassDeclaration":d.add(o.id.name);continue;case"VariableDeclaration":for(const e in r.getBindingIdentifiers(o))d.add(e);continue;default:continue;case"ExportNamedDeclaration":}switch(o.declaration.type){case"TSEnumDeclaration":case"FunctionDeclaration":case"ClassDeclaration":{const e=o.declaration.id.name;d.add(e),u.splice(s++,1,o.declaration,r.expressionStatement(r.assignmentExpression("=",a(r,p,e),r.identifier(e))));break}case"VariableDeclaration":{const e=i(o.declaration,p,t.hub);u.splice(s,e.length,...e),s+=e.length-1;break}case"TSModuleDeclaration":{const a=e(t,r,o.declaration,r.identifier(p)),i=o.declaration.id.name;d.has(i)?u[s]=a:(d.add(i),u.splice(s++,1,n(r,i),a))}}}let f=r.objectExpression([]);if(l){const e=r.memberExpression(l,c);f=s.template.expression.ast`
|
|
82
|
+
${r.cloneNode(e)} ||
|
|
83
|
+
(${r.cloneNode(e)} = ${f})
|
|
84
|
+
`}return s.template.statement.ast`
|
|
85
|
+
(function (${r.identifier(p)}) {
|
|
86
|
+
${u}
|
|
87
|
+
})(${c} || (${r.cloneNode(c)} = ${f}));
|
|
88
|
+
`}(e,t,t.cloneDeep(e.node)),d=e.scope.hasOwnBinding(o);"ExportNamedDeclaration"===e.parent.type?d?e.parentPath.replaceWith(l):(e.parentPath.insertAfter(l),e.replaceWith(n(t,o)),e.scope.registerDeclaration(e.parentPath)):d?e.replaceWith(l):e.scope.registerDeclaration(e.replaceWithMultiple([n(t,o),l])[0])};var s=r(74);function n(e,t){return e.variableDeclaration("let",[e.variableDeclarator(e.identifier(t))])}function a(e,t,r){return e.memberExpression(e.identifier(t),e.identifier(r))}function i(e,t,r){if("const"!==e.kind)throw r.file.buildCodeFrameError(e,"Namespaces exporting non-const are not supported by Babel. Change to const or see: https://babeljs.io/docs/en/babel-plugin-transform-typescript");const{declarations:n}=e;if(n.every(e=>s.types.isIdentifier(e.id))){for(const r of e.declarations)r.init=s.types.assignmentExpression("=",a(s.types,t,r.id.name),r.init);return[e]}const i=s.types.getBindingIdentifiers(e),o=[];for(const l in i)o.push(s.types.assignmentExpression("=",a(s.types,t,l),s.types.cloneNode(i[l])));return[e,s.types.expressionStatement(s.types.sequenceExpression(o))]}},853:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=r(89),n=r(837),a=r(195);function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(n);const l=new a.OptionValidator("@babel/preset-typescript");var d=s.declare((e,t)=>{e.assertVersion(7);const{allExtensions:r,allowNamespaces:s,isTSX:n,jsxPragma:a,jsxPragmaFrag:i,onlyRemoveTypeImports:d}=function(e={}){let{allowNamespaces:t=!0,jsxPragma:r,onlyRemoveTypeImports:s}=e;const n=l.validateStringOption("jsxPragmaFrag",e.jsxPragmaFrag,"React.Fragment"),a=l.validateBooleanOption("allExtensions",e.allExtensions,!1),i=l.validateBooleanOption("isTSX",e.isTSX,!1);return i&&l.invariant(a,"isTSX:true requires allExtensions:true"),{allExtensions:a,allowNamespaces:t,isTSX:i,jsxPragma:r,jsxPragmaFrag:n,onlyRemoveTypeImports:s}}(t),c=e=>({allowDeclareFields:t.allowDeclareFields,allowNamespaces:s,isTSX:e,jsxPragma:a,jsxPragmaFrag:i,onlyRemoveTypeImports:d});return{overrides:r?[{plugins:[[o.default,c(n)]]}]:[{test:/\.ts$/,plugins:[[o.default,c(!1)]]},{test:/\.tsx$/,plugins:[[o.default,c(!0)]]}]}});t.default=d},89:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.declare=function(e){return(t,r,a)=>{var i;let o;for(const e of Object.keys(s)){var l;t[e]||(o=null!=(l=o)?l:n(t),o[e]=s[e](o))}return e(null!=(i=o)?i:t,r||{},a)}};const s={assertVersion:e=>t=>{!function(e,t){if("number"==typeof e){if(!Number.isInteger(e))throw new Error("Expected string or integer value.");e=`^${e}.0.0-0`}if("string"!=typeof e)throw new Error("Expected string or integer value.");const r=Error.stackTraceLimit;"number"==typeof r&&r<25&&(Error.stackTraceLimit=25);let s;s="7."===t.slice(0,2)?new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". You'll need to update your @babel/core version.`):new Error(`Requires Babel "${e}", but was loaded with "${t}". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.`);"number"==typeof r&&(Error.stackTraceLimit=r);throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function n(e){let t=null;return"string"==typeof e.version&&/^7\./.test(e.version)&&(t=Object.getPrototypeOf(e),!t||a(t,"version")&&a(t,"transform")&&a(t,"template")&&a(t,"types")||(t=null)),Object.assign({},t,e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}}]);
|
|
104
89
|
}})
|