@titaui/pc 1.15.47-beta.2 → 1.15.47
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/lib/components/button/icon-btn/index.css +1 -19
- package/lib/components/button/icon-btn/index.js +2 -4
- package/lib/components/change-okr-modal/index.js +1 -1
- package/lib/components/common-share/publishMblog.js +1 -1
- package/lib/components/create-okr-modal/fields/okr-type-detail.js +1 -1
- package/lib/components/create-okr-modal/fields/okr-visibility-detail.js +1 -1
- package/lib/components/create-okr-modal/fields/okr-visibility.js +3 -0
- package/lib/components/create-okr-modal/index.js +1 -1
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/create-okr-modal/utils/helper.js +1 -1
- package/lib/components/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/dialog-confirm/index.css +0 -8
- package/lib/components/dialog-confirm/index.js +16 -26
- package/lib/components/dialog-qq-docs/index.js +1 -1
- package/lib/components/dialog-qq-docs/utils.js +1 -1
- package/lib/components/dialog-upload/index.js +1 -1
- package/lib/components/drawer-manager/drawerWrapper.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +1 -1
- package/lib/components/eReport/eReportLists/reportList.js +3 -3
- package/lib/components/emotions-selector/selector-pop.js +3 -3
- package/lib/components/ereport-list/index.js +3 -3
- package/lib/components/firework/index.js +1 -1
- package/lib/components/form/form-fields/dropdown/index.css +0 -9
- package/lib/components/form/form-fields/dropdown/index.js +3 -8
- package/lib/components/form/form-fields/input/index.js +1 -4
- package/lib/components/form/form-fields/input-verification-code/index.js +1 -1
- package/lib/components/grid-layout/util/network.js +1 -1
- package/lib/components/import-modal/tree/okr-tree/index.js +1 -1
- package/lib/components/mblog/components/MblogAction.js +3 -3
- package/lib/components/menus/index.js +0 -6
- package/lib/components/nav-top/components/app-center/index.js +33 -17
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -1
- package/lib/components/okr-detail/components/ao-nice/index.js +1 -1
- package/lib/components/okr-detail/components/header/edit-name.js +1 -1
- package/lib/components/okr-detail/components/header/o-avatar.js +1 -1
- package/lib/components/okr-detail/components/header/o-classify.js +1 -1
- package/lib/components/okr-detail/components/o-classify.js +1 -1
- package/lib/components/okr-detail/components/o-progress-update/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +1 -1
- package/lib/components/okr-detail/detail-footer/index.js +1 -1
- package/lib/components/okr-detail/detail-header/index.js +1 -1
- package/lib/components/okr-detail/okr-list/index.js +1 -1
- package/lib/components/okr-detail/request-apis.js +1 -1
- package/lib/components/okr-excel/hooks.js +314 -0
- package/lib/components/okr-excel/index.css +138 -0
- package/lib/components/okr-excel/index.js +195 -0
- package/lib/components/okr-excel/renders.js +339 -0
- package/lib/components/okr-excel/setting.js +21 -0
- package/lib/components/{menus/export-modules/survey-menu/request-api.js → okr-excel/type.js} +0 -0
- package/lib/components/okr-filter-drawer/filter-form.js +6 -2
- package/lib/components/okr-flow/child-node/fields/creator.js +5 -6
- package/lib/components/okr-flow/child-node/work-node.js +1 -1
- package/lib/components/okr-flow/export-modal/index.js +1 -40
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +1 -1
- package/lib/components/okr-flow/request-apis.js +1 -1
- package/lib/components/okr-flow/root-node/index.js +1 -1
- package/lib/components/okr-guide/index.js +0 -4
- package/lib/components/okr-progress/components/o-progress-update/index.js +1 -1
- package/lib/components/okr-progress-modal/index.js +1 -1
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +1 -1
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/okr-share/common-painter/darwAvatar.js +1 -1
- package/lib/components/okr-share/common-painter/openDataPainter.js +1 -1
- package/lib/components/okr-share/common-painter/utils.js +1 -1
- package/lib/components/okr-share/pink-card/drawDepartmentName.js +1 -1
- package/lib/components/okr-share/pink-card/drawKrs.js +1 -1
- package/lib/components/okr-share/pink-card/drawQuote.js +1 -1
- package/lib/components/okr-share/pink-card/drawUserName.js +1 -1
- package/lib/components/okr-share/pink-card/index.js +1 -1
- package/lib/components/okr-share/publishMblog.js +1 -1
- package/lib/components/okr-share/shareCardSelector.js +1 -1
- package/lib/components/okr-type-icon/assets/okr-classify-nuo-copy.svg +71 -0
- package/lib/components/okr-type-icon/assets/okr-classify-yuan-copy.svg +71 -0
- package/lib/components/okr-type-icon/index.css +10 -0
- package/lib/components/okr-type-icon/index.js +49 -0
- package/lib/components/okrcase-library/index.js +2 -1
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +1 -3
- package/lib/components/okrcase-library/server/network.js +1 -1
- package/lib/components/open-data-painter/index.js +1 -1
- package/lib/components/period-selector/helper/index.js +1 -1
- package/lib/components/popup-select/index.css +63 -0
- package/lib/components/popup-select/index.js +144 -0
- package/lib/components/progress/okr-progress/index.css +28 -0
- package/lib/components/progress/okr-progress/index.js +36 -0
- package/lib/components/quick-entrance/index.js +17 -0
- package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
- package/lib/components/rich-editor/models/schema.js +6 -6
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
- package/lib/components/rich-editor/plugins/core/index.js +4 -4
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
- package/lib/components/rich-editor/plugins/inline/color/commond.js +3 -3
- package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
- package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
- package/lib/components/rich-editor/react/uiProvider.js +3 -3
- package/lib/components/rich-editor/ui/Popup/index.js +3 -3
- package/lib/components/select/Option.js +3 -3
- package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +1 -1
- package/lib/components/superset-charts/fetch-assets-and-append/index.js +1 -1
- package/lib/components/survey-model/request-api.js +1 -1
- package/lib/components/table-excel/index.css +62 -0
- package/lib/components/table-excel/index.js +37 -0
- package/lib/components/tag/index.css +14 -0
- package/lib/components/tag/index.js +52 -0
- package/lib/components/task-relation-modal/index.js +1 -1
- package/lib/components/task-relation-modal/tree/category-tree/index.js +1 -1
- package/lib/components/task-relation-modal/tree/okr-tree/index.js +1 -1
- package/lib/components/task-relation-modal/tree/work-tree/index.js +1 -1
- package/lib/components/task-relation-modal/work-relation/index.js +1 -1
- package/lib/components/task-tree/task-item-node/e-project.js +1 -1
- package/lib/components/task-tree/task-item-node/e-task.js +1 -1
- package/lib/components/tita-chart/errorBoundary/index.js +3 -3
- package/lib/components/toast/index.js +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/index2.js +1 -1
- package/lib/components/upvote/index.js +1 -1
- package/lib/components/user-selector/request-apis.js +3 -6
- package/lib/components/version-change-modal/index.js +1 -1
- package/lib/components/version-change-modal/request-api.js +1 -1
- package/lib/components/wechat-btn/index.js +8 -0
- package/lib/components/weekly-report/card.js +1 -11
- package/lib/components/weekly-report/common-painter/darwAvatar.js +1 -1
- package/lib/components/weekly-report/common-painter/drawName.js +1 -1
- package/lib/components/weekly-report/common-painter/openDataPainter.js +1 -1
- package/lib/components/weekly-report/index.js +1 -1
- package/lib/components-v1/animate/AnimateChild.js +3 -3
- package/lib/components-v1/avatar/index.js +3 -3
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
- package/lib/components-v1/progress/CircleProgress.js +3 -3
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
- package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
- package/lib/components-v1/userSelector/components/UserItem.js +3 -3
- package/lib/index.js +16 -0
- package/lib/pages/group-management/groupInterface.js +1 -1
- package/lib/pages/new-okr-list/header/index.css +42 -1
- package/lib/pages/new-okr-list/header/index.js +147 -16
- package/lib/pages/new-okr-list/index.css +5 -0
- package/lib/pages/new-okr-list/index.js +78 -17
- package/lib/pages/new-okr-list/list/index.js +4 -1
- package/lib/pages/new-okr-list/loading.js +2 -3
- package/lib/pages/new-okr-list/request-api.js +1 -1
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +1 -1
- package/lib/pages/okr-map/request-apis.js +1 -1
- package/lib/utils/helpers.js +1 -1
- package/lib/utils/hooks.js +58 -0
- package/lib/utils/open-data.js +17 -66
- package/lib/utils/request-v1.js +1 -1
- package/lib/utils/request.js +1 -1
- package/package.json +7 -2
- package/lib/components/menus/export-modules/survey-menu/index.css +0 -9
- package/lib/components/menus/export-modules/survey-menu/index.js +0 -120
- package/lib/components/menus/export-modules/survey-menu/menu-highlight.js +0 -52
- package/lib/components/menus/export-modules/survey-menu/menus.js +0 -87
- package/lib/components/menus/export-modules/survey-menu/survey-front-menus.js +0 -155
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
.tita-okr-list-v2__view-tyoe-list-item {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.tita-okr-list-v2__view-tyoe-list-item > * + * {
|
|
7
|
+
margin-left: 5px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.tita-okr-list-v2__table-tip {
|
|
11
|
+
color: #fff;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
line-height: 22px;
|
|
14
|
+
}
|
|
15
|
+
|
|
1
16
|
.tita-okr-list-v2__header {
|
|
2
17
|
display: flex;
|
|
3
18
|
margin-bottom: 16px;
|
|
@@ -25,7 +40,7 @@
|
|
|
25
40
|
align-items: center;
|
|
26
41
|
background: #fff;
|
|
27
42
|
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
28
|
-
width: 36px;
|
|
43
|
+
min-width: 36px;
|
|
29
44
|
height: 36px;
|
|
30
45
|
border-radius: 18px;
|
|
31
46
|
font-size: 20px;
|
|
@@ -36,6 +51,32 @@
|
|
|
36
51
|
color: #2879ff;
|
|
37
52
|
}
|
|
38
53
|
|
|
54
|
+
.tita-okr-list-v2__header-icon--view-type {
|
|
55
|
+
padding: 0 14px;
|
|
56
|
+
display: flex;
|
|
57
|
+
box-sizing: border-box;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
align-items: center;
|
|
60
|
+
background: #fff;
|
|
61
|
+
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
62
|
+
min-width: 36px;
|
|
63
|
+
height: 36px;
|
|
64
|
+
border-radius: 18px;
|
|
65
|
+
font-size: 20px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.tita-okr-list-v2__header-icon--view-type:hover {
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
color: #2879ff;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.tita-okr-list-v2__header-down-icon {
|
|
74
|
+
font-size: 16px;
|
|
75
|
+
transform: scale(0.5);
|
|
76
|
+
margin-left: 4px;
|
|
77
|
+
color: #6f7886;
|
|
78
|
+
}
|
|
79
|
+
|
|
39
80
|
.tita-okr-list-v2__header-record {
|
|
40
81
|
display: flex;
|
|
41
82
|
box-sizing: border-box;
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] = void 0;
|
|
8
|
+
exports["default"] = exports.ViewType = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -37,6 +37,10 @@ var _requestApi = require("../request-api");
|
|
|
37
37
|
|
|
38
38
|
var _getLocale = require("../../../utils/getLocale");
|
|
39
39
|
|
|
40
|
+
var _popupSelect = _interopRequireDefault(require("../../../components/popup-select"));
|
|
41
|
+
|
|
42
|
+
var _guideTip = _interopRequireDefault(require("../../../components/guide-tip"));
|
|
43
|
+
|
|
40
44
|
require("./index.css");
|
|
41
45
|
|
|
42
46
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -57,6 +61,82 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
57
61
|
|
|
58
62
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
59
63
|
|
|
64
|
+
var ViewType;
|
|
65
|
+
exports.ViewType = ViewType;
|
|
66
|
+
|
|
67
|
+
(function (ViewType) {
|
|
68
|
+
ViewType["Card"] = "card";
|
|
69
|
+
ViewType["Table"] = "table";
|
|
70
|
+
ViewType["Map"] = "map";
|
|
71
|
+
})(ViewType || (exports.ViewType = ViewType = {}));
|
|
72
|
+
|
|
73
|
+
var viewConfig = function viewConfig() {
|
|
74
|
+
return {
|
|
75
|
+
table: {
|
|
76
|
+
icon: 'tu-icon-pc-table-s',
|
|
77
|
+
title: (0, _getLocale.getLocale)('OKR_MyO_KRP_Table')
|
|
78
|
+
},
|
|
79
|
+
card: {
|
|
80
|
+
icon: 'tu-icon-pc-card-s',
|
|
81
|
+
title: (0, _getLocale.getLocale)('Pro_Butt_Card')
|
|
82
|
+
},
|
|
83
|
+
map: {
|
|
84
|
+
icon: 'tu-icon-yangshi-ditu',
|
|
85
|
+
title: (0, _getLocale.getLocale)('OKR_MyO_Text_Alignment')
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
var getTableTip = function getTableTip() {
|
|
91
|
+
return !localStorage.getItem("OkrTableTypeTip_".concat(window.BSGlobal.loginUserInfo.Id));
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
var setTableTip = function setTableTip() {
|
|
95
|
+
localStorage.setItem("OkrTableTypeTip_".concat(window.BSGlobal.loginUserInfo.Id), 'true');
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
var titaTracker = function titaTracker(type) {
|
|
99
|
+
var name = {
|
|
100
|
+
card: '卡片',
|
|
101
|
+
table: '表格',
|
|
102
|
+
map: '地图'
|
|
103
|
+
}[type];
|
|
104
|
+
|
|
105
|
+
if (window.titaTracker && !localStorage.getItem('titaccc')) {
|
|
106
|
+
window.titaTracker("action").record({
|
|
107
|
+
productName: "OKR展示模式",
|
|
108
|
+
actionGroup: "选择OKR展示模式",
|
|
109
|
+
actionName: "\u9009\u62E9OKR\u5C55\u793A\u6A21\u5F0F\uFF1A".concat(name)
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var getViewTypeMenuData = function getViewTypeMenuData(relationShip) {
|
|
115
|
+
return [{
|
|
116
|
+
label: /*#__PURE__*/_react["default"].createElement("p", {
|
|
117
|
+
className: "".concat(_precls.precls, "__view-tyoe-list-item")
|
|
118
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
119
|
+
className: "tu-icon-pc-card-s"
|
|
120
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('Pro_Butt_Card'))),
|
|
121
|
+
value: 'card'
|
|
122
|
+
}, {
|
|
123
|
+
label: /*#__PURE__*/_react["default"].createElement("p", {
|
|
124
|
+
className: "".concat(_precls.precls, "__view-tyoe-list-item")
|
|
125
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
126
|
+
className: "tu-icon-pc-table-s"
|
|
127
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_KRP_Table'))),
|
|
128
|
+
value: 'table'
|
|
129
|
+
}, {
|
|
130
|
+
label: /*#__PURE__*/_react["default"].createElement("p", {
|
|
131
|
+
className: "".concat(_precls.precls, "__view-tyoe-list-item")
|
|
132
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
133
|
+
className: "tu-icon-yangshi-ditu"
|
|
134
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_Text_Alignment'))),
|
|
135
|
+
value: 'map',
|
|
136
|
+
visible: relationShip === 1
|
|
137
|
+
}];
|
|
138
|
+
};
|
|
139
|
+
|
|
60
140
|
function Header(props, ref) {
|
|
61
141
|
var _useContext = (0, _react.useContext)(_context.Context),
|
|
62
142
|
departmentName = _useContext.departmentName,
|
|
@@ -69,23 +149,44 @@ function Header(props, ref) {
|
|
|
69
149
|
|
|
70
150
|
var relationShip = parseInt(relation, 10);
|
|
71
151
|
var onSearch = props.onSearch,
|
|
72
|
-
onFrontAddOKR = props.onFrontAddOKR
|
|
152
|
+
onFrontAddOKR = props.onFrontAddOKR,
|
|
153
|
+
_props$viewType = props.viewType,
|
|
154
|
+
defaultViewType = _props$viewType === void 0 ? ViewType.Card : _props$viewType,
|
|
155
|
+
onChangeViewType = props.onChangeViewType;
|
|
73
156
|
|
|
74
157
|
var _useState = (0, _react.useState)(false),
|
|
75
158
|
_useState2 = _slicedToArray(_useState, 2),
|
|
76
159
|
onlyThisDept = _useState2[0],
|
|
77
160
|
setOnlyThisDept = _useState2[1];
|
|
78
161
|
|
|
79
|
-
var _useState3 = (0, _react.useState)(
|
|
162
|
+
var _useState3 = (0, _react.useState)(defaultViewType),
|
|
80
163
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
81
|
-
|
|
82
|
-
|
|
164
|
+
viewType = _useState4[0],
|
|
165
|
+
setViewType = _useState4[1];
|
|
83
166
|
|
|
84
|
-
var _useState5 = (0, _react.useState)(),
|
|
167
|
+
var _useState5 = (0, _react.useState)(getViewTypeMenuData(relationShip)),
|
|
85
168
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
86
|
-
|
|
87
|
-
|
|
169
|
+
viewTypeMenuData = _useState6[0],
|
|
170
|
+
setViewTypeMenuData = _useState6[1];
|
|
171
|
+
|
|
172
|
+
var _useState7 = (0, _react.useState)(false),
|
|
173
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
174
|
+
init = _useState8[0],
|
|
175
|
+
setInit = _useState8[1];
|
|
176
|
+
|
|
177
|
+
var _useState9 = (0, _react.useState)(getTableTip()),
|
|
178
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
179
|
+
showTableTip = _useState10[0],
|
|
180
|
+
setShowTableTip = _useState10[1];
|
|
88
181
|
|
|
182
|
+
var _useState11 = (0, _react.useState)(),
|
|
183
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
184
|
+
userInfo = _useState12[0],
|
|
185
|
+
setUserInfo = _useState12[1];
|
|
186
|
+
|
|
187
|
+
(0, _react.useEffect)(function () {
|
|
188
|
+
setViewTypeMenuData(getViewTypeMenuData(relationShip));
|
|
189
|
+
}, [relationShip]);
|
|
89
190
|
(0, _react.useEffect)(function () {
|
|
90
191
|
if (toUserId !== undefined || relationShip === 1) {
|
|
91
192
|
var userId = toUserId;
|
|
@@ -197,6 +298,22 @@ function Header(props, ref) {
|
|
|
197
298
|
return null;
|
|
198
299
|
};
|
|
199
300
|
|
|
301
|
+
var onChangeViewTypeHandler = (0, _react.useCallback)(function (type) {
|
|
302
|
+
titaTracker(type);
|
|
303
|
+
|
|
304
|
+
if (type === ViewType.Map) {
|
|
305
|
+
gotoOkrMap();
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
setViewType(type);
|
|
310
|
+
if (onChangeViewType) onChangeViewType(type);
|
|
311
|
+
}, [onChangeViewType]);
|
|
312
|
+
var viewInfo = viewConfig()[viewType];
|
|
313
|
+
var onHideTableTip = (0, _react.useCallback)(function () {
|
|
314
|
+
setTableTip();
|
|
315
|
+
setShowTableTip(false);
|
|
316
|
+
}, []);
|
|
200
317
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
201
318
|
className: "".concat(_precls.precls, "__header")
|
|
202
319
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -209,25 +326,39 @@ function Header(props, ref) {
|
|
|
209
326
|
className: "".concat(_precls.precls, "__header-item")
|
|
210
327
|
}, /*#__PURE__*/_react["default"].createElement(_keywordSearch["default"], {
|
|
211
328
|
onSearch: onSearch
|
|
212
|
-
})),
|
|
329
|
+
})), ![2, 3].includes(relationShip) &&
|
|
213
330
|
/*#__PURE__*/
|
|
214
331
|
// 我关注的 我参与的 没有创建按钮
|
|
215
|
-
_react["default"].createElement(
|
|
332
|
+
_react["default"].createElement("div", {
|
|
216
333
|
className: "".concat(_precls.precls, "__header-item")
|
|
217
334
|
}, /*#__PURE__*/_react["default"].createElement(_createOkr["default"], {
|
|
218
335
|
ref: createOkrRef,
|
|
219
336
|
onFrontAddOKR: onFrontAddOKR
|
|
220
337
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
221
|
-
className: "".concat(_precls.precls, "__header-item")
|
|
222
|
-
|
|
338
|
+
className: "".concat(_precls.precls, "__header-item")
|
|
339
|
+
}, /*#__PURE__*/_react["default"].createElement(_guideTip["default"], {
|
|
340
|
+
visible: showTableTip,
|
|
341
|
+
content: /*#__PURE__*/_react["default"].createElement("div", {
|
|
342
|
+
className: "".concat(_precls.precls, "__table-tip")
|
|
343
|
+
}, "\u65B0\u589E OKR \u8868\u683C\u67E5\u770B\u6A21\u5F0F\uFF0C\u67E5\u770B\u66F4\u4FBF\u6377\uFF0C\u5207\u6362\u4F53\u9A8C\u4E00\u4E0B"),
|
|
344
|
+
onClickClose: setTableTip,
|
|
345
|
+
popupPlacement: "bottom"
|
|
346
|
+
}, /*#__PURE__*/_react["default"].createElement(_popupSelect["default"], {
|
|
347
|
+
menuData: viewTypeMenuData,
|
|
348
|
+
popupPlacement: "bottom",
|
|
349
|
+
action: "click",
|
|
350
|
+
onChange: onChangeViewTypeHandler,
|
|
351
|
+
onVisableChange: onHideTableTip
|
|
223
352
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
224
|
-
overlay:
|
|
353
|
+
overlay: viewInfo.title,
|
|
225
354
|
placement: "top"
|
|
226
355
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
227
|
-
className: "".concat(_precls.precls, "__header-icon")
|
|
356
|
+
className: "".concat(_precls.precls, "__header-icon--view-type")
|
|
228
357
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
229
|
-
className:
|
|
230
|
-
})
|
|
358
|
+
className: viewInfo.icon
|
|
359
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
360
|
+
className: "tu-icon-caret-down ".concat(_precls.precls, "__header-down-icon")
|
|
361
|
+
})))))), /*#__PURE__*/_react["default"].createElement(_comments["default"], {
|
|
231
362
|
toUserId: toUserId,
|
|
232
363
|
relation: relationShip,
|
|
233
364
|
userInfo: userInfo
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
.tita-okr-list-v2 {
|
|
2
|
+
position: relative;
|
|
2
3
|
height: calc(100% - 20px);
|
|
3
4
|
overflow-y: scroll;
|
|
4
5
|
margin-right: -16px;
|
|
@@ -10,11 +11,15 @@
|
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
.tita-okr-list-v2__loading {
|
|
14
|
+
position: absolute;
|
|
15
|
+
left: 50%;
|
|
16
|
+
transform: translateX(-50%);
|
|
13
17
|
height: 32px;
|
|
14
18
|
width: 80px;
|
|
15
19
|
background: url("./img/loading.gif") no-repeat;
|
|
16
20
|
background-size: contain;
|
|
17
21
|
margin: 200px auto;
|
|
22
|
+
z-index: 3;
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
.tita-okr-list-v2 .okr-list__empty-tip > img {
|
|
@@ -19,9 +19,11 @@ var _pagination = _interopRequireDefault(require("../../components/pagination"))
|
|
|
19
19
|
|
|
20
20
|
var _dialog = _interopRequireDefault(require("../../components/dialog"));
|
|
21
21
|
|
|
22
|
+
var _okrExcel = _interopRequireDefault(require("../../components/okr-excel"));
|
|
23
|
+
|
|
22
24
|
var _errorBoundary = _interopRequireDefault(require("../../components/error-boundary"));
|
|
23
25
|
|
|
24
|
-
var _header =
|
|
26
|
+
var _header = _interopRequireWildcard(require("./header"));
|
|
25
27
|
|
|
26
28
|
var _list = _interopRequireDefault(require("./list"));
|
|
27
29
|
|
|
@@ -61,12 +63,6 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
|
|
|
61
63
|
|
|
62
64
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
63
65
|
|
|
64
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
65
|
-
|
|
66
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
67
|
-
|
|
68
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
69
|
-
|
|
70
66
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
71
67
|
|
|
72
68
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -79,6 +75,42 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
79
75
|
|
|
80
76
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
81
77
|
|
|
78
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
79
|
+
|
|
80
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
81
|
+
|
|
82
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
83
|
+
|
|
84
|
+
var cacheViewType = localStorage.getItem('cacheViewType');
|
|
85
|
+
|
|
86
|
+
function getOkrExcelData(okrData) {
|
|
87
|
+
var okrExcelData = [];
|
|
88
|
+
okrData.forEach(function (okrInfo) {
|
|
89
|
+
if (!okrInfo.Krs || !okrInfo.Krs.length) {
|
|
90
|
+
okrExcelData.push(_objectSpread({}, okrInfo));
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
okrInfo.Krs.forEach(function (kr, i) {
|
|
95
|
+
// 过滤目标下的其他执行(默认分组)
|
|
96
|
+
if (kr.mileStoneId === 0) return;
|
|
97
|
+
|
|
98
|
+
var data = _objectSpread(_objectSpread({}, i === 0 ? okrInfo : {}), {}, {
|
|
99
|
+
feedId: okrInfo.feedId,
|
|
100
|
+
Kr: _objectSpread(_objectSpread({}, kr), {}, {
|
|
101
|
+
index: i
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
if (i === 0) data.rowSpan = okrInfo.Krs.filter(function (kr) {
|
|
106
|
+
return kr.mileStoneId;
|
|
107
|
+
}).length;
|
|
108
|
+
okrExcelData.push(data);
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
return okrExcelData;
|
|
112
|
+
}
|
|
113
|
+
|
|
82
114
|
var NewOkrList = function NewOkrList(props) {
|
|
83
115
|
var OkrListCmp = props.OkrListCmp,
|
|
84
116
|
OkrCommunicationPush = props.OkrCommunicationPush,
|
|
@@ -89,7 +121,10 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
89
121
|
var formFieldValues = useLocalStorage.getItem("okr-filter-values") || {
|
|
90
122
|
targetType: "",
|
|
91
123
|
targetCategory: "",
|
|
92
|
-
targetSort: ""
|
|
124
|
+
targetSort: "",
|
|
125
|
+
okrType: "",
|
|
126
|
+
okrClassify: "",
|
|
127
|
+
orderType: 0
|
|
93
128
|
};
|
|
94
129
|
|
|
95
130
|
var filterCycle = function () {
|
|
@@ -161,12 +196,17 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
161
196
|
isInit = _useState14[0],
|
|
162
197
|
setIsInit = _useState14[1];
|
|
163
198
|
|
|
199
|
+
var _useState15 = (0, _react.useState)(cacheViewType || _header.ViewType.Card),
|
|
200
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
201
|
+
viewType = _useState16[0],
|
|
202
|
+
setViewType = _useState16[1];
|
|
203
|
+
|
|
164
204
|
var headerRef = (0, _react.useRef)();
|
|
165
205
|
|
|
166
|
-
var
|
|
167
|
-
|
|
168
|
-
casesVisible =
|
|
169
|
-
setCasesVisible =
|
|
206
|
+
var _useState17 = (0, _react.useState)(false),
|
|
207
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
208
|
+
casesVisible = _useState18[0],
|
|
209
|
+
setCasesVisible = _useState18[1];
|
|
170
210
|
|
|
171
211
|
var routerData = (0, _tools.getQueryString)();
|
|
172
212
|
var departmentName = routerData.departmentName,
|
|
@@ -233,8 +273,8 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
233
273
|
setLoading(true);
|
|
234
274
|
recordVisitUser();
|
|
235
275
|
(0, _requestApi.okrSearch)(params).then(function (res) {
|
|
236
|
-
setOkrs(res.works || []);
|
|
237
|
-
setTotal(res.total);
|
|
276
|
+
setOkrs(res && res.works || []);
|
|
277
|
+
setTotal(res && res.total || 0);
|
|
238
278
|
setLoading(false);
|
|
239
279
|
});
|
|
240
280
|
};
|
|
@@ -312,6 +352,13 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
312
352
|
(0, _react.useEffect)(function () {
|
|
313
353
|
getOkrs();
|
|
314
354
|
}, [pageNum, pageSize, query]);
|
|
355
|
+
var onChangeViewTypeHandler = (0, _react.useCallback)(function (type) {
|
|
356
|
+
localStorage.setItem('cacheViewType', type);
|
|
357
|
+
setViewType(type);
|
|
358
|
+
}, []);
|
|
359
|
+
var okrExcelData = (0, _react.useMemo)(function () {
|
|
360
|
+
return getOkrExcelData(okrs);
|
|
361
|
+
}, [okrs]);
|
|
315
362
|
return /*#__PURE__*/_react["default"].createElement(_context.Context.Provider, {
|
|
316
363
|
value: _objectSpread({
|
|
317
364
|
OkrCommunicationPush: OkrCommunicationPush,
|
|
@@ -326,10 +373,12 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
326
373
|
}, /*#__PURE__*/_react["default"].createElement(_header["default"], {
|
|
327
374
|
onSearch: handleOnSearch,
|
|
328
375
|
ref: headerRef,
|
|
329
|
-
onFrontAddOKR: onFrontAddOKR
|
|
376
|
+
onFrontAddOKR: onFrontAddOKR,
|
|
377
|
+
onChangeViewType: onChangeViewTypeHandler,
|
|
378
|
+
viewType: viewType
|
|
330
379
|
}), /*#__PURE__*/_react["default"].createElement(_loading["default"], {
|
|
331
380
|
loading: loading
|
|
332
|
-
}, okrs.length > 0 && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_list["default"], {
|
|
381
|
+
}, okrs.length > 0 && viewType === _header.ViewType.Card && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_list["default"], {
|
|
333
382
|
OkrListCmp: OkrListCmp,
|
|
334
383
|
okrs: okrs,
|
|
335
384
|
setOkrs: setOkrs,
|
|
@@ -349,7 +398,19 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
349
398
|
pageSize: pageSize,
|
|
350
399
|
current: pageNum,
|
|
351
400
|
size: "sm"
|
|
352
|
-
}))), okrs.length
|
|
401
|
+
}))), okrs.length > 0 && viewType === _header.ViewType.Table && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_okrExcel["default"], {
|
|
402
|
+
showCycle: query.cycleType === '-1',
|
|
403
|
+
data: okrExcelData,
|
|
404
|
+
onRefresh: getOkrs
|
|
405
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
406
|
+
className: "".concat(_precls.precls, "__pagination")
|
|
407
|
+
}, /*#__PURE__*/_react["default"].createElement(_pagination["default"], {
|
|
408
|
+
total: total,
|
|
409
|
+
onChange: handlePageChange,
|
|
410
|
+
pageSize: pageSize,
|
|
411
|
+
current: pageNum,
|
|
412
|
+
size: "sm"
|
|
413
|
+
}))), !loading && okrs.length === 0 && /*#__PURE__*/_react["default"].createElement(Empty, {
|
|
353
414
|
openCreate: function openCreate() {
|
|
354
415
|
return openCreateModal();
|
|
355
416
|
},
|
|
@@ -41,10 +41,13 @@ function List(props) {
|
|
|
41
41
|
var _useContext = (0, _react.useContext)(_context.Context),
|
|
42
42
|
annualNum = _useContext.annualNum,
|
|
43
43
|
cycleType = _useContext.cycleType,
|
|
44
|
-
yqmNum = _useContext.yqmNum
|
|
44
|
+
yqmNum = _useContext.yqmNum,
|
|
45
|
+
orderType = _useContext.orderType;
|
|
45
46
|
|
|
46
47
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(OkrListCmp, {
|
|
48
|
+
orderType: orderType,
|
|
47
49
|
okrData: okrs,
|
|
50
|
+
setData: setOkrs,
|
|
48
51
|
cycle: {
|
|
49
52
|
annualNum: annualNum,
|
|
50
53
|
cycleType: cycleType,
|
|
@@ -16,10 +16,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
16
16
|
function Loading(_ref) {
|
|
17
17
|
var children = _ref.children,
|
|
18
18
|
loading = _ref.loading;
|
|
19
|
-
|
|
20
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
19
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, children, loading && /*#__PURE__*/_react["default"].createElement("div", {
|
|
21
20
|
className: "".concat(_precls.precls, "__loading")
|
|
22
|
-
});
|
|
21
|
+
}));
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
var _default = Loading;
|
|
@@ -9,7 +9,7 @@ exports.visitOkrCyclePag = exports.okrSearch = exports.okrList = exports.okrCrow
|
|
|
9
9
|
|
|
10
10
|
var _request = require("../../utils/request");
|
|
11
11
|
|
|
12
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
12
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
13
13
|
|
|
14
14
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
15
|
|
|
@@ -45,7 +45,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
45
45
|
|
|
46
46
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
47
47
|
|
|
48
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
48
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
49
49
|
|
|
50
50
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
51
51
|
|