@kontur.candy/generator 5.40.0-load-files-rsv.6 → 5.40.0-test-8568.0
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.js +1531 -1245
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58453,8 +58453,7 @@ const AutoValidationMessage = "Значение не равно вычислен
|
|
|
58453
58453
|
__webpack_require__.r(__webpack_exports__);
|
|
58454
58454
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
58455
58455
|
/* harmony export */ CombinatorType: () => (/* binding */ CombinatorType),
|
|
58456
|
-
/* harmony export */ FufCombineMethod: () => (/* binding */ FufCombineMethod)
|
|
58457
|
-
/* harmony export */ SumCombineMethod: () => (/* binding */ SumCombineMethod)
|
|
58456
|
+
/* harmony export */ FufCombineMethod: () => (/* binding */ FufCombineMethod)
|
|
58458
58457
|
/* harmony export */ });
|
|
58459
58458
|
let FufCombineMethod = /*#__PURE__*/function (FufCombineMethod) {
|
|
58460
58459
|
FufCombineMethod["Merge"] = "Merge";
|
|
@@ -58462,12 +58461,6 @@ let FufCombineMethod = /*#__PURE__*/function (FufCombineMethod) {
|
|
|
58462
58461
|
FufCombineMethod["Replace"] = "Replace";
|
|
58463
58462
|
return FufCombineMethod;
|
|
58464
58463
|
}({});
|
|
58465
|
-
let SumCombineMethod = /*#__PURE__*/function (SumCombineMethod) {
|
|
58466
|
-
SumCombineMethod["replaceSum"] = "replaceSum";
|
|
58467
|
-
SumCombineMethod["addSum"] = "addSum";
|
|
58468
|
-
SumCombineMethod["ignoreSum"] = "ignoreSum";
|
|
58469
|
-
return SumCombineMethod;
|
|
58470
|
-
}({});
|
|
58471
58464
|
let CombinatorType = /*#__PURE__*/function (CombinatorType) {
|
|
58472
58465
|
CombinatorType["XmlCombinatorByPath"] = "XmlCombinatorByPath";
|
|
58473
58466
|
CombinatorType["Default"] = "Default";
|
|
@@ -60719,12 +60712,11 @@ let UploadFileStatuses = /*#__PURE__*/function (UploadFileStatuses) {
|
|
|
60719
60712
|
}({});
|
|
60720
60713
|
let PatchFufSteps = /*#__PURE__*/function (PatchFufSteps) {
|
|
60721
60714
|
PatchFufSteps[PatchFufSteps["SelectCombineFufMethod"] = 0] = "SelectCombineFufMethod";
|
|
60722
|
-
PatchFufSteps[PatchFufSteps["
|
|
60723
|
-
PatchFufSteps[PatchFufSteps["
|
|
60724
|
-
PatchFufSteps[PatchFufSteps["
|
|
60725
|
-
PatchFufSteps[PatchFufSteps["
|
|
60726
|
-
PatchFufSteps[PatchFufSteps["
|
|
60727
|
-
PatchFufSteps[PatchFufSteps["ConfirmMerge"] = 6] = "ConfirmMerge";
|
|
60715
|
+
PatchFufSteps[PatchFufSteps["SelectFiles"] = 1] = "SelectFiles";
|
|
60716
|
+
PatchFufSteps[PatchFufSteps["ErrorMessage"] = 2] = "ErrorMessage";
|
|
60717
|
+
PatchFufSteps[PatchFufSteps["LoadToForm"] = 3] = "LoadToForm";
|
|
60718
|
+
PatchFufSteps[PatchFufSteps["ShowCombineResult"] = 4] = "ShowCombineResult";
|
|
60719
|
+
PatchFufSteps[PatchFufSteps["ConfirmMerge"] = 5] = "ConfirmMerge";
|
|
60728
60720
|
return PatchFufSteps;
|
|
60729
60721
|
}({});
|
|
60730
60722
|
let TableType = /*#__PURE__*/function (TableType) {
|
|
@@ -89999,8 +89991,7 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
89999
89991
|
showOnDemand: pageNode.showOnDemand,
|
|
90000
89992
|
onNavigateFromErrorLog: context.generateHelperFunctionExpressionWithoutContext(pageNode, "onNavigateFromErrorLog", pageNode.onNavigateFromErrorLog),
|
|
90001
89993
|
onMount: context.generateHelperFunctionExpression(pageNode, "onMount", pageNode.onMount),
|
|
90002
|
-
onUnmount: context.generateHelperFunctionExpression(pageNode, "onUnmount", pageNode.onUnmount)
|
|
90003
|
-
uploadFilesInPage: context.generateHelperFunctionExpression(pageNode, "uploadFilesInPage", pageNode.uploadFilesInPage)
|
|
89994
|
+
onUnmount: context.generateHelperFunctionExpression(pageNode, "onUnmount", pageNode.onUnmount)
|
|
90004
89995
|
};
|
|
90005
89996
|
return result;
|
|
90006
89997
|
}
|
|
@@ -90087,7 +90078,6 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
90087
90078
|
markupBuilder.prop(x => x.optional).set(pageNode.optional);
|
|
90088
90079
|
markupBuilder.prop(x => x.onMount).set(context.generateHelperFunctionExpression(pageNode, "onMount", pageNode.onMount));
|
|
90089
90080
|
markupBuilder.prop(x => x.onUnmount).set(context.generateHelperFunctionExpression(pageNode, "onUnmount", pageNode.onUnmount));
|
|
90090
|
-
markupBuilder.prop(x => x.uploadFilesInPage).set(context.generateHelperFunctionExpression(pageNode, "uploadFilesInPage", pageNode.uploadFilesInPage));
|
|
90091
90081
|
if (pageNode.pageActions != undefined) {
|
|
90092
90082
|
markupBuilder.prop(x => x.pageActions).set(pageNode.pageActions);
|
|
90093
90083
|
}
|
|
@@ -91024,14 +91014,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
91024
91014
|
|
|
91025
91015
|
|
|
91026
91016
|
|
|
91027
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28,
|
|
91017
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27;
|
|
91028
91018
|
|
|
91029
91019
|
|
|
91030
91020
|
|
|
91031
91021
|
|
|
91032
91022
|
|
|
91033
91023
|
|
|
91034
|
-
let PageNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("page", `Страница (раздел)`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Page sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("id", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Уникальный идентификатор странцы. Все страницы в форме должны иметь уникальный идентификатор.`), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("template", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.enum("default", "title", "multiple", "diadoc"), 'Для множественных разделов необходимо указать `template="multiple"`, для обычных разделов `template="default"`'), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("path", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.bindingPathLink)} данного элемента`), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("headerpanel", [_UnitParts_HeaderPanel_HeaderPanelNode__WEBPACK_IMPORTED_MODULE_3__.HeaderPanelNode]), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.deprecatedAttr)("title", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_4__.DeprecationReason.Removed), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.deprecatedAttr)("formName", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_4__.DeprecationReason.Removed), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("showOnDemand", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.boolean, `Раздел не будет отображаться на странице, пока не будет вызван явно. Например, через механизм отображения раздела в разделе.`), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("onNavigateFromErrorLog", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется перед попыткой навигации в контрол внутри раздела"), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("onMount", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется после загрузки раздела"), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("onUnmount", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется перед выгрузкой раздела"), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("
|
|
91024
|
+
let PageNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("page", `Страница (раздел)`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Page sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("id", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Уникальный идентификатор странцы. Все страницы в форме должны иметь уникальный идентификатор.`), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("template", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.enum("default", "title", "multiple", "diadoc"), 'Для множественных разделов необходимо указать `template="multiple"`, для обычных разделов `template="default"`'), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("path", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.bindingPathLink)} данного элемента`), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("headerpanel", [_UnitParts_HeaderPanel_HeaderPanelNode__WEBPACK_IMPORTED_MODULE_3__.HeaderPanelNode]), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.deprecatedAttr)("title", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_4__.DeprecationReason.Removed), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.deprecatedAttr)("formName", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_4__.DeprecationReason.Removed), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("showOnDemand", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.boolean, `Раздел не будет отображаться на странице, пока не будет вызван явно. Например, через механизм отображения раздела в разделе.`), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("onNavigateFromErrorLog", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется перед попыткой навигации в контрол внутри раздела"), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("onMount", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется после загрузки раздела"), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("onUnmount", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется перед выгрузкой раздела"), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("orientation", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.enum("landscape"), `Ориентация страницы. При значении landscape станницы займёт всю доступную ширину экрана`), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("navigationName", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.localizedString, `Название Раздела в меню, если в сахаре есть отдельное описание навигации (unitList), то указывать не нужно`), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("height", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.number, `Начальная высота раздела`), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("minHeight", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.number, `Минимальная высота раздела`), _dec16 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("multiple", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.boolean, `Обозначение множественного раздела`), _dec17 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("unitsCountForPaging", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.number, `Количество инстансов множественного раздела на котором включается паджинация раздела`), _dec18 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("multipleAppearance", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.enum("nested", "flat"), "Представление множественных разделов: вложенное или плоское"), _dec19 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("optional", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.boolean, `Опциональный раздел`), _dec20 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("pageActions", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.objectLiteral(), `Атрибут для кастомизации действий с разделом.
|
|
91035
91025
|
|
|
91036
91026
|
Объект с опциональным полями: caption: string, disableButton: boolean, hideButton: boolean,
|
|
91037
91027
|
showInsertButtons: boolean, lastButtonName: string, intermediateButtonName: string,
|
|
@@ -91046,10 +91036,10 @@ let PageNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5
|
|
|
91046
91036
|
};
|
|
91047
91037
|
|
|
91048
91038
|
actionName: enableAutoValues, clear, remove, copy
|
|
91049
|
-
`),
|
|
91039
|
+
`), _dec21 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("clearConfirmationSettings", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.objectLiteral(), `Атрибут для кастомизации сообщений лайтбоксов очистки и удаления раздела.
|
|
91050
91040
|
- removeChildrenText: дополнительный (красный) текст про вложенные разделы (если они есть) в лайтбоксе подтверждения удаления. По умолчанию: "Все вложенные разделы также будут удалены."
|
|
91051
91041
|
- keepChildrenCustomText: название вложенных разделов и данных в радио-баттоне _Оставить_ в лайтбоксе очистки. По умолчанию: "вложенные разделы и данные в них"
|
|
91052
|
-
- clearChildrenCustomText: название вложенных разделов в радио-баттоне _Удалить_ в лайтбоксе очистки. По умолчанию: "вложенные разделы"`),
|
|
91042
|
+
- clearChildrenCustomText: название вложенных разделов в радио-баттоне _Удалить_ в лайтбоксе очистки. По умолчанию: "вложенные разделы"`), _dec22 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("hideEnableAutoValues", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.boolean, `Всегда скрывать кнопку "Включить авторасчет", даже при включенной серверной нормализации`), _dec23 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("navigationLimit", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.number, `Количество экземпляров множественного раздела после которого в левом меню будет включаться компактный режим отображения разделов. По умолчанию: 15. Используется только для множественных разделов`), _dec24 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("addingHint", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.localizedString, `Подсказка на кнопке добавления раздела в боковом меню. Используется только для множественных разделов`), _dec25 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.children)("page"), _dec26 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.children)(), _dec27 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("title", [_PageTitleNode__WEBPACK_IMPORTED_MODULE_8__.PageTitleNode]), _dec28 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("visible", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.javaScriptExpressionLink)} для условного скрытия раздела`), _dec(_class = (_class2 = class PageNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.SugarNodeBase {
|
|
91053
91043
|
constructor(...args) {
|
|
91054
91044
|
super(...args);
|
|
91055
91045
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "id", _descriptor, this);
|
|
@@ -91062,24 +91052,23 @@ let PageNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5
|
|
|
91062
91052
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "onNavigateFromErrorLog", _descriptor8, this);
|
|
91063
91053
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "onMount", _descriptor9, this);
|
|
91064
91054
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "onUnmount", _descriptor10, this);
|
|
91065
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91066
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91067
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91068
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91069
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91070
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91071
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91072
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91073
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91074
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91075
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91076
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91077
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91078
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91079
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91080
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91081
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
91082
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "visible", _descriptor28, this);
|
|
91055
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "orientation", _descriptor11, this);
|
|
91056
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "navigationName", _descriptor12, this);
|
|
91057
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "height", _descriptor13, this);
|
|
91058
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "minHeight", _descriptor14, this);
|
|
91059
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "multiple", _descriptor15, this);
|
|
91060
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "unitsCountForPaging", _descriptor16, this);
|
|
91061
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "multipleAppearance", _descriptor17, this);
|
|
91062
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optional", _descriptor18, this);
|
|
91063
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "pageActions", _descriptor19, this);
|
|
91064
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "clearConfirmationSettings", _descriptor20, this);
|
|
91065
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "hideEnableAutoValues", _descriptor21, this);
|
|
91066
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "navigationLimit", _descriptor22, this);
|
|
91067
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "addingHint", _descriptor23, this);
|
|
91068
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "pages", _descriptor24, this);
|
|
91069
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor25, this);
|
|
91070
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "title", _descriptor26, this);
|
|
91071
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "visible", _descriptor27, this);
|
|
91083
91072
|
}
|
|
91084
91073
|
getOwnPath() {
|
|
91085
91074
|
return this.path != undefined ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__.createFromMask)(this.path, "auto", _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__.PathTokens.each) : undefined;
|
|
@@ -91138,92 +91127,87 @@ let PageNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5
|
|
|
91138
91127
|
enumerable: true,
|
|
91139
91128
|
writable: true,
|
|
91140
91129
|
initializer: null
|
|
91141
|
-
}), _descriptor11 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "
|
|
91142
|
-
configurable: true,
|
|
91143
|
-
enumerable: true,
|
|
91144
|
-
writable: true,
|
|
91145
|
-
initializer: null
|
|
91146
|
-
}), _descriptor12 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "orientation", [_dec13], {
|
|
91130
|
+
}), _descriptor11 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "orientation", [_dec12], {
|
|
91147
91131
|
configurable: true,
|
|
91148
91132
|
enumerable: true,
|
|
91149
91133
|
writable: true,
|
|
91150
91134
|
initializer: null
|
|
91151
|
-
}),
|
|
91135
|
+
}), _descriptor12 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "navigationName", [_dec13], {
|
|
91152
91136
|
configurable: true,
|
|
91153
91137
|
enumerable: true,
|
|
91154
91138
|
writable: true,
|
|
91155
91139
|
initializer: null
|
|
91156
|
-
}),
|
|
91140
|
+
}), _descriptor13 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "height", [_dec14], {
|
|
91157
91141
|
configurable: true,
|
|
91158
91142
|
enumerable: true,
|
|
91159
91143
|
writable: true,
|
|
91160
91144
|
initializer: null
|
|
91161
|
-
}),
|
|
91145
|
+
}), _descriptor14 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "minHeight", [_dec15], {
|
|
91162
91146
|
configurable: true,
|
|
91163
91147
|
enumerable: true,
|
|
91164
91148
|
writable: true,
|
|
91165
91149
|
initializer: null
|
|
91166
|
-
}),
|
|
91150
|
+
}), _descriptor15 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "multiple", [_dec16], {
|
|
91167
91151
|
configurable: true,
|
|
91168
91152
|
enumerable: true,
|
|
91169
91153
|
writable: true,
|
|
91170
91154
|
initializer: null
|
|
91171
|
-
}),
|
|
91155
|
+
}), _descriptor16 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "unitsCountForPaging", [_dec17], {
|
|
91172
91156
|
configurable: true,
|
|
91173
91157
|
enumerable: true,
|
|
91174
91158
|
writable: true,
|
|
91175
91159
|
initializer: null
|
|
91176
|
-
}),
|
|
91160
|
+
}), _descriptor17 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "multipleAppearance", [_dec18], {
|
|
91177
91161
|
configurable: true,
|
|
91178
91162
|
enumerable: true,
|
|
91179
91163
|
writable: true,
|
|
91180
91164
|
initializer: null
|
|
91181
|
-
}),
|
|
91165
|
+
}), _descriptor18 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "optional", [_dec19], {
|
|
91182
91166
|
configurable: true,
|
|
91183
91167
|
enumerable: true,
|
|
91184
91168
|
writable: true,
|
|
91185
91169
|
initializer: null
|
|
91186
|
-
}),
|
|
91170
|
+
}), _descriptor19 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "pageActions", [_dec20], {
|
|
91187
91171
|
configurable: true,
|
|
91188
91172
|
enumerable: true,
|
|
91189
91173
|
writable: true,
|
|
91190
91174
|
initializer: null
|
|
91191
|
-
}),
|
|
91175
|
+
}), _descriptor20 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "clearConfirmationSettings", [_dec21], {
|
|
91192
91176
|
configurable: true,
|
|
91193
91177
|
enumerable: true,
|
|
91194
91178
|
writable: true,
|
|
91195
91179
|
initializer: null
|
|
91196
|
-
}),
|
|
91180
|
+
}), _descriptor21 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "hideEnableAutoValues", [_dec22], {
|
|
91197
91181
|
configurable: true,
|
|
91198
91182
|
enumerable: true,
|
|
91199
91183
|
writable: true,
|
|
91200
91184
|
initializer: null
|
|
91201
|
-
}),
|
|
91185
|
+
}), _descriptor22 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "navigationLimit", [_dec23], {
|
|
91202
91186
|
configurable: true,
|
|
91203
91187
|
enumerable: true,
|
|
91204
91188
|
writable: true,
|
|
91205
91189
|
initializer: null
|
|
91206
|
-
}),
|
|
91190
|
+
}), _descriptor23 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "addingHint", [_dec24], {
|
|
91207
91191
|
configurable: true,
|
|
91208
91192
|
enumerable: true,
|
|
91209
91193
|
writable: true,
|
|
91210
91194
|
initializer: null
|
|
91211
|
-
}),
|
|
91195
|
+
}), _descriptor24 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "pages", [_dec25], {
|
|
91212
91196
|
configurable: true,
|
|
91213
91197
|
enumerable: true,
|
|
91214
91198
|
writable: true,
|
|
91215
91199
|
initializer: null
|
|
91216
|
-
}),
|
|
91200
|
+
}), _descriptor25 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "children", [_dec26], {
|
|
91217
91201
|
configurable: true,
|
|
91218
91202
|
enumerable: true,
|
|
91219
91203
|
writable: true,
|
|
91220
91204
|
initializer: null
|
|
91221
|
-
}),
|
|
91205
|
+
}), _descriptor26 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "title", [_dec27], {
|
|
91222
91206
|
configurable: true,
|
|
91223
91207
|
enumerable: true,
|
|
91224
91208
|
writable: true,
|
|
91225
91209
|
initializer: null
|
|
91226
|
-
}),
|
|
91210
|
+
}), _descriptor27 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "visible", [_dec28], {
|
|
91227
91211
|
configurable: true,
|
|
91228
91212
|
enumerable: true,
|
|
91229
91213
|
writable: true,
|
|
@@ -148905,1156 +148889,15 @@ module.exports = readdir;
|
|
|
148905
148889
|
|
|
148906
148890
|
/***/ }),
|
|
148907
148891
|
|
|
148908
|
-
/***/ "./node_modules/
|
|
148909
|
-
|
|
148910
|
-
!*** ./node_modules/
|
|
148911
|
-
|
|
148912
|
-
/***/ (() => {
|
|
148892
|
+
/***/ "./node_modules/regenerate-unicode-properties/Binary_Property/ASCII.js":
|
|
148893
|
+
/*!*****************************************************************************!*\
|
|
148894
|
+
!*** ./node_modules/regenerate-unicode-properties/Binary_Property/ASCII.js ***!
|
|
148895
|
+
\*****************************************************************************/
|
|
148896
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
148913
148897
|
|
|
148914
|
-
/*!
|
|
148915
|
-
|
|
148916
|
-
|
|
148917
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
148918
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
148919
|
-
|
|
148920
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
148921
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
148922
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
148923
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
148924
|
-
|
|
148925
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
148926
|
-
and limitations under the License.
|
|
148927
|
-
***************************************************************************** */
|
|
148928
|
-
var Reflect;
|
|
148929
|
-
(function (Reflect) {
|
|
148930
|
-
// Metadata Proposal
|
|
148931
|
-
// https://rbuckton.github.io/reflect-metadata/
|
|
148932
|
-
(function (factory) {
|
|
148933
|
-
var root = typeof global === "object" ? global :
|
|
148934
|
-
typeof self === "object" ? self :
|
|
148935
|
-
typeof this === "object" ? this :
|
|
148936
|
-
Function("return this;")();
|
|
148937
|
-
var exporter = makeExporter(Reflect);
|
|
148938
|
-
if (typeof root.Reflect === "undefined") {
|
|
148939
|
-
root.Reflect = Reflect;
|
|
148940
|
-
}
|
|
148941
|
-
else {
|
|
148942
|
-
exporter = makeExporter(root.Reflect, exporter);
|
|
148943
|
-
}
|
|
148944
|
-
factory(exporter);
|
|
148945
|
-
function makeExporter(target, previous) {
|
|
148946
|
-
return function (key, value) {
|
|
148947
|
-
if (typeof target[key] !== "function") {
|
|
148948
|
-
Object.defineProperty(target, key, { configurable: true, writable: true, value: value });
|
|
148949
|
-
}
|
|
148950
|
-
if (previous)
|
|
148951
|
-
previous(key, value);
|
|
148952
|
-
};
|
|
148953
|
-
}
|
|
148954
|
-
})(function (exporter) {
|
|
148955
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
148956
|
-
// feature test for Symbol support
|
|
148957
|
-
var supportsSymbol = typeof Symbol === "function";
|
|
148958
|
-
var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
|
|
148959
|
-
var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
|
|
148960
|
-
var supportsCreate = typeof Object.create === "function"; // feature test for Object.create support
|
|
148961
|
-
var supportsProto = { __proto__: [] } instanceof Array; // feature test for __proto__ support
|
|
148962
|
-
var downLevel = !supportsCreate && !supportsProto;
|
|
148963
|
-
var HashMap = {
|
|
148964
|
-
// create an object in dictionary mode (a.k.a. "slow" mode in v8)
|
|
148965
|
-
create: supportsCreate
|
|
148966
|
-
? function () { return MakeDictionary(Object.create(null)); }
|
|
148967
|
-
: supportsProto
|
|
148968
|
-
? function () { return MakeDictionary({ __proto__: null }); }
|
|
148969
|
-
: function () { return MakeDictionary({}); },
|
|
148970
|
-
has: downLevel
|
|
148971
|
-
? function (map, key) { return hasOwn.call(map, key); }
|
|
148972
|
-
: function (map, key) { return key in map; },
|
|
148973
|
-
get: downLevel
|
|
148974
|
-
? function (map, key) { return hasOwn.call(map, key) ? map[key] : undefined; }
|
|
148975
|
-
: function (map, key) { return map[key]; },
|
|
148976
|
-
};
|
|
148977
|
-
// Load global or shim versions of Map, Set, and WeakMap
|
|
148978
|
-
var functionPrototype = Object.getPrototypeOf(Function);
|
|
148979
|
-
var usePolyfill = typeof process === "object" && process.env && process.env["REFLECT_METADATA_USE_MAP_POLYFILL"] === "true";
|
|
148980
|
-
var _Map = !usePolyfill && typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill();
|
|
148981
|
-
var _Set = !usePolyfill && typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill();
|
|
148982
|
-
var _WeakMap = !usePolyfill && typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill();
|
|
148983
|
-
// [[Metadata]] internal slot
|
|
148984
|
-
// https://rbuckton.github.io/reflect-metadata/#ordinary-object-internal-methods-and-internal-slots
|
|
148985
|
-
var Metadata = new _WeakMap();
|
|
148986
|
-
/**
|
|
148987
|
-
* Applies a set of decorators to a property of a target object.
|
|
148988
|
-
* @param decorators An array of decorators.
|
|
148989
|
-
* @param target The target object.
|
|
148990
|
-
* @param propertyKey (Optional) The property key to decorate.
|
|
148991
|
-
* @param attributes (Optional) The property descriptor for the target key.
|
|
148992
|
-
* @remarks Decorators are applied in reverse order.
|
|
148993
|
-
* @example
|
|
148994
|
-
*
|
|
148995
|
-
* class Example {
|
|
148996
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
148997
|
-
* // static staticProperty;
|
|
148998
|
-
* // property;
|
|
148999
|
-
*
|
|
149000
|
-
* constructor(p) { }
|
|
149001
|
-
* static staticMethod(p) { }
|
|
149002
|
-
* method(p) { }
|
|
149003
|
-
* }
|
|
149004
|
-
*
|
|
149005
|
-
* // constructor
|
|
149006
|
-
* Example = Reflect.decorate(decoratorsArray, Example);
|
|
149007
|
-
*
|
|
149008
|
-
* // property (on constructor)
|
|
149009
|
-
* Reflect.decorate(decoratorsArray, Example, "staticProperty");
|
|
149010
|
-
*
|
|
149011
|
-
* // property (on prototype)
|
|
149012
|
-
* Reflect.decorate(decoratorsArray, Example.prototype, "property");
|
|
149013
|
-
*
|
|
149014
|
-
* // method (on constructor)
|
|
149015
|
-
* Object.defineProperty(Example, "staticMethod",
|
|
149016
|
-
* Reflect.decorate(decoratorsArray, Example, "staticMethod",
|
|
149017
|
-
* Object.getOwnPropertyDescriptor(Example, "staticMethod")));
|
|
149018
|
-
*
|
|
149019
|
-
* // method (on prototype)
|
|
149020
|
-
* Object.defineProperty(Example.prototype, "method",
|
|
149021
|
-
* Reflect.decorate(decoratorsArray, Example.prototype, "method",
|
|
149022
|
-
* Object.getOwnPropertyDescriptor(Example.prototype, "method")));
|
|
149023
|
-
*
|
|
149024
|
-
*/
|
|
149025
|
-
function decorate(decorators, target, propertyKey, attributes) {
|
|
149026
|
-
if (!IsUndefined(propertyKey)) {
|
|
149027
|
-
if (!IsArray(decorators))
|
|
149028
|
-
throw new TypeError();
|
|
149029
|
-
if (!IsObject(target))
|
|
149030
|
-
throw new TypeError();
|
|
149031
|
-
if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes))
|
|
149032
|
-
throw new TypeError();
|
|
149033
|
-
if (IsNull(attributes))
|
|
149034
|
-
attributes = undefined;
|
|
149035
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
149036
|
-
return DecorateProperty(decorators, target, propertyKey, attributes);
|
|
149037
|
-
}
|
|
149038
|
-
else {
|
|
149039
|
-
if (!IsArray(decorators))
|
|
149040
|
-
throw new TypeError();
|
|
149041
|
-
if (!IsConstructor(target))
|
|
149042
|
-
throw new TypeError();
|
|
149043
|
-
return DecorateConstructor(decorators, target);
|
|
149044
|
-
}
|
|
149045
|
-
}
|
|
149046
|
-
exporter("decorate", decorate);
|
|
149047
|
-
// 4.1.2 Reflect.metadata(metadataKey, metadataValue)
|
|
149048
|
-
// https://rbuckton.github.io/reflect-metadata/#reflect.metadata
|
|
149049
|
-
/**
|
|
149050
|
-
* A default metadata decorator factory that can be used on a class, class member, or parameter.
|
|
149051
|
-
* @param metadataKey The key for the metadata entry.
|
|
149052
|
-
* @param metadataValue The value for the metadata entry.
|
|
149053
|
-
* @returns A decorator function.
|
|
149054
|
-
* @remarks
|
|
149055
|
-
* If `metadataKey` is already defined for the target and target key, the
|
|
149056
|
-
* metadataValue for that key will be overwritten.
|
|
149057
|
-
* @example
|
|
149058
|
-
*
|
|
149059
|
-
* // constructor
|
|
149060
|
-
* @Reflect.metadata(key, value)
|
|
149061
|
-
* class Example {
|
|
149062
|
-
* }
|
|
149063
|
-
*
|
|
149064
|
-
* // property (on constructor, TypeScript only)
|
|
149065
|
-
* class Example {
|
|
149066
|
-
* @Reflect.metadata(key, value)
|
|
149067
|
-
* static staticProperty;
|
|
149068
|
-
* }
|
|
149069
|
-
*
|
|
149070
|
-
* // property (on prototype, TypeScript only)
|
|
149071
|
-
* class Example {
|
|
149072
|
-
* @Reflect.metadata(key, value)
|
|
149073
|
-
* property;
|
|
149074
|
-
* }
|
|
149075
|
-
*
|
|
149076
|
-
* // method (on constructor)
|
|
149077
|
-
* class Example {
|
|
149078
|
-
* @Reflect.metadata(key, value)
|
|
149079
|
-
* static staticMethod() { }
|
|
149080
|
-
* }
|
|
149081
|
-
*
|
|
149082
|
-
* // method (on prototype)
|
|
149083
|
-
* class Example {
|
|
149084
|
-
* @Reflect.metadata(key, value)
|
|
149085
|
-
* method() { }
|
|
149086
|
-
* }
|
|
149087
|
-
*
|
|
149088
|
-
*/
|
|
149089
|
-
function metadata(metadataKey, metadataValue) {
|
|
149090
|
-
function decorator(target, propertyKey) {
|
|
149091
|
-
if (!IsObject(target))
|
|
149092
|
-
throw new TypeError();
|
|
149093
|
-
if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey))
|
|
149094
|
-
throw new TypeError();
|
|
149095
|
-
OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
149096
|
-
}
|
|
149097
|
-
return decorator;
|
|
149098
|
-
}
|
|
149099
|
-
exporter("metadata", metadata);
|
|
149100
|
-
/**
|
|
149101
|
-
* Define a unique metadata entry on the target.
|
|
149102
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
149103
|
-
* @param metadataValue A value that contains attached metadata.
|
|
149104
|
-
* @param target The target object on which to define metadata.
|
|
149105
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
149106
|
-
* @example
|
|
149107
|
-
*
|
|
149108
|
-
* class Example {
|
|
149109
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
149110
|
-
* // static staticProperty;
|
|
149111
|
-
* // property;
|
|
149112
|
-
*
|
|
149113
|
-
* constructor(p) { }
|
|
149114
|
-
* static staticMethod(p) { }
|
|
149115
|
-
* method(p) { }
|
|
149116
|
-
* }
|
|
149117
|
-
*
|
|
149118
|
-
* // constructor
|
|
149119
|
-
* Reflect.defineMetadata("custom:annotation", options, Example);
|
|
149120
|
-
*
|
|
149121
|
-
* // property (on constructor)
|
|
149122
|
-
* Reflect.defineMetadata("custom:annotation", options, Example, "staticProperty");
|
|
149123
|
-
*
|
|
149124
|
-
* // property (on prototype)
|
|
149125
|
-
* Reflect.defineMetadata("custom:annotation", options, Example.prototype, "property");
|
|
149126
|
-
*
|
|
149127
|
-
* // method (on constructor)
|
|
149128
|
-
* Reflect.defineMetadata("custom:annotation", options, Example, "staticMethod");
|
|
149129
|
-
*
|
|
149130
|
-
* // method (on prototype)
|
|
149131
|
-
* Reflect.defineMetadata("custom:annotation", options, Example.prototype, "method");
|
|
149132
|
-
*
|
|
149133
|
-
* // decorator factory as metadata-producing annotation.
|
|
149134
|
-
* function MyAnnotation(options): Decorator {
|
|
149135
|
-
* return (target, key?) => Reflect.defineMetadata("custom:annotation", options, target, key);
|
|
149136
|
-
* }
|
|
149137
|
-
*
|
|
149138
|
-
*/
|
|
149139
|
-
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
149140
|
-
if (!IsObject(target))
|
|
149141
|
-
throw new TypeError();
|
|
149142
|
-
if (!IsUndefined(propertyKey))
|
|
149143
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
149144
|
-
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
149145
|
-
}
|
|
149146
|
-
exporter("defineMetadata", defineMetadata);
|
|
149147
|
-
/**
|
|
149148
|
-
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
|
|
149149
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
149150
|
-
* @param target The target object on which the metadata is defined.
|
|
149151
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
149152
|
-
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
|
|
149153
|
-
* @example
|
|
149154
|
-
*
|
|
149155
|
-
* class Example {
|
|
149156
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
149157
|
-
* // static staticProperty;
|
|
149158
|
-
* // property;
|
|
149159
|
-
*
|
|
149160
|
-
* constructor(p) { }
|
|
149161
|
-
* static staticMethod(p) { }
|
|
149162
|
-
* method(p) { }
|
|
149163
|
-
* }
|
|
149164
|
-
*
|
|
149165
|
-
* // constructor
|
|
149166
|
-
* result = Reflect.hasMetadata("custom:annotation", Example);
|
|
149167
|
-
*
|
|
149168
|
-
* // property (on constructor)
|
|
149169
|
-
* result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty");
|
|
149170
|
-
*
|
|
149171
|
-
* // property (on prototype)
|
|
149172
|
-
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property");
|
|
149173
|
-
*
|
|
149174
|
-
* // method (on constructor)
|
|
149175
|
-
* result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod");
|
|
149176
|
-
*
|
|
149177
|
-
* // method (on prototype)
|
|
149178
|
-
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method");
|
|
149179
|
-
*
|
|
149180
|
-
*/
|
|
149181
|
-
function hasMetadata(metadataKey, target, propertyKey) {
|
|
149182
|
-
if (!IsObject(target))
|
|
149183
|
-
throw new TypeError();
|
|
149184
|
-
if (!IsUndefined(propertyKey))
|
|
149185
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
149186
|
-
return OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
149187
|
-
}
|
|
149188
|
-
exporter("hasMetadata", hasMetadata);
|
|
149189
|
-
/**
|
|
149190
|
-
* Gets a value indicating whether the target object has the provided metadata key defined.
|
|
149191
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
149192
|
-
* @param target The target object on which the metadata is defined.
|
|
149193
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
149194
|
-
* @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
|
|
149195
|
-
* @example
|
|
149196
|
-
*
|
|
149197
|
-
* class Example {
|
|
149198
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
149199
|
-
* // static staticProperty;
|
|
149200
|
-
* // property;
|
|
149201
|
-
*
|
|
149202
|
-
* constructor(p) { }
|
|
149203
|
-
* static staticMethod(p) { }
|
|
149204
|
-
* method(p) { }
|
|
149205
|
-
* }
|
|
149206
|
-
*
|
|
149207
|
-
* // constructor
|
|
149208
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example);
|
|
149209
|
-
*
|
|
149210
|
-
* // property (on constructor)
|
|
149211
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty");
|
|
149212
|
-
*
|
|
149213
|
-
* // property (on prototype)
|
|
149214
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property");
|
|
149215
|
-
*
|
|
149216
|
-
* // method (on constructor)
|
|
149217
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod");
|
|
149218
|
-
*
|
|
149219
|
-
* // method (on prototype)
|
|
149220
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method");
|
|
149221
|
-
*
|
|
149222
|
-
*/
|
|
149223
|
-
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
149224
|
-
if (!IsObject(target))
|
|
149225
|
-
throw new TypeError();
|
|
149226
|
-
if (!IsUndefined(propertyKey))
|
|
149227
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
149228
|
-
return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
149229
|
-
}
|
|
149230
|
-
exporter("hasOwnMetadata", hasOwnMetadata);
|
|
149231
|
-
/**
|
|
149232
|
-
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
|
|
149233
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
149234
|
-
* @param target The target object on which the metadata is defined.
|
|
149235
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
149236
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
149237
|
-
* @example
|
|
149238
|
-
*
|
|
149239
|
-
* class Example {
|
|
149240
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
149241
|
-
* // static staticProperty;
|
|
149242
|
-
* // property;
|
|
149243
|
-
*
|
|
149244
|
-
* constructor(p) { }
|
|
149245
|
-
* static staticMethod(p) { }
|
|
149246
|
-
* method(p) { }
|
|
149247
|
-
* }
|
|
149248
|
-
*
|
|
149249
|
-
* // constructor
|
|
149250
|
-
* result = Reflect.getMetadata("custom:annotation", Example);
|
|
149251
|
-
*
|
|
149252
|
-
* // property (on constructor)
|
|
149253
|
-
* result = Reflect.getMetadata("custom:annotation", Example, "staticProperty");
|
|
149254
|
-
*
|
|
149255
|
-
* // property (on prototype)
|
|
149256
|
-
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "property");
|
|
149257
|
-
*
|
|
149258
|
-
* // method (on constructor)
|
|
149259
|
-
* result = Reflect.getMetadata("custom:annotation", Example, "staticMethod");
|
|
149260
|
-
*
|
|
149261
|
-
* // method (on prototype)
|
|
149262
|
-
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "method");
|
|
149263
|
-
*
|
|
149264
|
-
*/
|
|
149265
|
-
function getMetadata(metadataKey, target, propertyKey) {
|
|
149266
|
-
if (!IsObject(target))
|
|
149267
|
-
throw new TypeError();
|
|
149268
|
-
if (!IsUndefined(propertyKey))
|
|
149269
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
149270
|
-
return OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
149271
|
-
}
|
|
149272
|
-
exporter("getMetadata", getMetadata);
|
|
149273
|
-
/**
|
|
149274
|
-
* Gets the metadata value for the provided metadata key on the target object.
|
|
149275
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
149276
|
-
* @param target The target object on which the metadata is defined.
|
|
149277
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
149278
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
149279
|
-
* @example
|
|
149280
|
-
*
|
|
149281
|
-
* class Example {
|
|
149282
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
149283
|
-
* // static staticProperty;
|
|
149284
|
-
* // property;
|
|
149285
|
-
*
|
|
149286
|
-
* constructor(p) { }
|
|
149287
|
-
* static staticMethod(p) { }
|
|
149288
|
-
* method(p) { }
|
|
149289
|
-
* }
|
|
149290
|
-
*
|
|
149291
|
-
* // constructor
|
|
149292
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example);
|
|
149293
|
-
*
|
|
149294
|
-
* // property (on constructor)
|
|
149295
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty");
|
|
149296
|
-
*
|
|
149297
|
-
* // property (on prototype)
|
|
149298
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property");
|
|
149299
|
-
*
|
|
149300
|
-
* // method (on constructor)
|
|
149301
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod");
|
|
149302
|
-
*
|
|
149303
|
-
* // method (on prototype)
|
|
149304
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method");
|
|
149305
|
-
*
|
|
149306
|
-
*/
|
|
149307
|
-
function getOwnMetadata(metadataKey, target, propertyKey) {
|
|
149308
|
-
if (!IsObject(target))
|
|
149309
|
-
throw new TypeError();
|
|
149310
|
-
if (!IsUndefined(propertyKey))
|
|
149311
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
149312
|
-
return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
|
|
149313
|
-
}
|
|
149314
|
-
exporter("getOwnMetadata", getOwnMetadata);
|
|
149315
|
-
/**
|
|
149316
|
-
* Gets the metadata keys defined on the target object or its prototype chain.
|
|
149317
|
-
* @param target The target object on which the metadata is defined.
|
|
149318
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
149319
|
-
* @returns An array of unique metadata keys.
|
|
149320
|
-
* @example
|
|
149321
|
-
*
|
|
149322
|
-
* class Example {
|
|
149323
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
149324
|
-
* // static staticProperty;
|
|
149325
|
-
* // property;
|
|
149326
|
-
*
|
|
149327
|
-
* constructor(p) { }
|
|
149328
|
-
* static staticMethod(p) { }
|
|
149329
|
-
* method(p) { }
|
|
149330
|
-
* }
|
|
149331
|
-
*
|
|
149332
|
-
* // constructor
|
|
149333
|
-
* result = Reflect.getMetadataKeys(Example);
|
|
149334
|
-
*
|
|
149335
|
-
* // property (on constructor)
|
|
149336
|
-
* result = Reflect.getMetadataKeys(Example, "staticProperty");
|
|
149337
|
-
*
|
|
149338
|
-
* // property (on prototype)
|
|
149339
|
-
* result = Reflect.getMetadataKeys(Example.prototype, "property");
|
|
149340
|
-
*
|
|
149341
|
-
* // method (on constructor)
|
|
149342
|
-
* result = Reflect.getMetadataKeys(Example, "staticMethod");
|
|
149343
|
-
*
|
|
149344
|
-
* // method (on prototype)
|
|
149345
|
-
* result = Reflect.getMetadataKeys(Example.prototype, "method");
|
|
149346
|
-
*
|
|
149347
|
-
*/
|
|
149348
|
-
function getMetadataKeys(target, propertyKey) {
|
|
149349
|
-
if (!IsObject(target))
|
|
149350
|
-
throw new TypeError();
|
|
149351
|
-
if (!IsUndefined(propertyKey))
|
|
149352
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
149353
|
-
return OrdinaryMetadataKeys(target, propertyKey);
|
|
149354
|
-
}
|
|
149355
|
-
exporter("getMetadataKeys", getMetadataKeys);
|
|
149356
|
-
/**
|
|
149357
|
-
* Gets the unique metadata keys defined on the target object.
|
|
149358
|
-
* @param target The target object on which the metadata is defined.
|
|
149359
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
149360
|
-
* @returns An array of unique metadata keys.
|
|
149361
|
-
* @example
|
|
149362
|
-
*
|
|
149363
|
-
* class Example {
|
|
149364
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
149365
|
-
* // static staticProperty;
|
|
149366
|
-
* // property;
|
|
149367
|
-
*
|
|
149368
|
-
* constructor(p) { }
|
|
149369
|
-
* static staticMethod(p) { }
|
|
149370
|
-
* method(p) { }
|
|
149371
|
-
* }
|
|
149372
|
-
*
|
|
149373
|
-
* // constructor
|
|
149374
|
-
* result = Reflect.getOwnMetadataKeys(Example);
|
|
149375
|
-
*
|
|
149376
|
-
* // property (on constructor)
|
|
149377
|
-
* result = Reflect.getOwnMetadataKeys(Example, "staticProperty");
|
|
149378
|
-
*
|
|
149379
|
-
* // property (on prototype)
|
|
149380
|
-
* result = Reflect.getOwnMetadataKeys(Example.prototype, "property");
|
|
149381
|
-
*
|
|
149382
|
-
* // method (on constructor)
|
|
149383
|
-
* result = Reflect.getOwnMetadataKeys(Example, "staticMethod");
|
|
149384
|
-
*
|
|
149385
|
-
* // method (on prototype)
|
|
149386
|
-
* result = Reflect.getOwnMetadataKeys(Example.prototype, "method");
|
|
149387
|
-
*
|
|
149388
|
-
*/
|
|
149389
|
-
function getOwnMetadataKeys(target, propertyKey) {
|
|
149390
|
-
if (!IsObject(target))
|
|
149391
|
-
throw new TypeError();
|
|
149392
|
-
if (!IsUndefined(propertyKey))
|
|
149393
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
149394
|
-
return OrdinaryOwnMetadataKeys(target, propertyKey);
|
|
149395
|
-
}
|
|
149396
|
-
exporter("getOwnMetadataKeys", getOwnMetadataKeys);
|
|
149397
|
-
/**
|
|
149398
|
-
* Deletes the metadata entry from the target object with the provided key.
|
|
149399
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
149400
|
-
* @param target The target object on which the metadata is defined.
|
|
149401
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
149402
|
-
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
|
|
149403
|
-
* @example
|
|
149404
|
-
*
|
|
149405
|
-
* class Example {
|
|
149406
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
149407
|
-
* // static staticProperty;
|
|
149408
|
-
* // property;
|
|
149409
|
-
*
|
|
149410
|
-
* constructor(p) { }
|
|
149411
|
-
* static staticMethod(p) { }
|
|
149412
|
-
* method(p) { }
|
|
149413
|
-
* }
|
|
149414
|
-
*
|
|
149415
|
-
* // constructor
|
|
149416
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example);
|
|
149417
|
-
*
|
|
149418
|
-
* // property (on constructor)
|
|
149419
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty");
|
|
149420
|
-
*
|
|
149421
|
-
* // property (on prototype)
|
|
149422
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property");
|
|
149423
|
-
*
|
|
149424
|
-
* // method (on constructor)
|
|
149425
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod");
|
|
149426
|
-
*
|
|
149427
|
-
* // method (on prototype)
|
|
149428
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method");
|
|
149429
|
-
*
|
|
149430
|
-
*/
|
|
149431
|
-
function deleteMetadata(metadataKey, target, propertyKey) {
|
|
149432
|
-
if (!IsObject(target))
|
|
149433
|
-
throw new TypeError();
|
|
149434
|
-
if (!IsUndefined(propertyKey))
|
|
149435
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
149436
|
-
var metadataMap = GetOrCreateMetadataMap(target, propertyKey, /*Create*/ false);
|
|
149437
|
-
if (IsUndefined(metadataMap))
|
|
149438
|
-
return false;
|
|
149439
|
-
if (!metadataMap.delete(metadataKey))
|
|
149440
|
-
return false;
|
|
149441
|
-
if (metadataMap.size > 0)
|
|
149442
|
-
return true;
|
|
149443
|
-
var targetMetadata = Metadata.get(target);
|
|
149444
|
-
targetMetadata.delete(propertyKey);
|
|
149445
|
-
if (targetMetadata.size > 0)
|
|
149446
|
-
return true;
|
|
149447
|
-
Metadata.delete(target);
|
|
149448
|
-
return true;
|
|
149449
|
-
}
|
|
149450
|
-
exporter("deleteMetadata", deleteMetadata);
|
|
149451
|
-
function DecorateConstructor(decorators, target) {
|
|
149452
|
-
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
149453
|
-
var decorator = decorators[i];
|
|
149454
|
-
var decorated = decorator(target);
|
|
149455
|
-
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
149456
|
-
if (!IsConstructor(decorated))
|
|
149457
|
-
throw new TypeError();
|
|
149458
|
-
target = decorated;
|
|
149459
|
-
}
|
|
149460
|
-
}
|
|
149461
|
-
return target;
|
|
149462
|
-
}
|
|
149463
|
-
function DecorateProperty(decorators, target, propertyKey, descriptor) {
|
|
149464
|
-
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
149465
|
-
var decorator = decorators[i];
|
|
149466
|
-
var decorated = decorator(target, propertyKey, descriptor);
|
|
149467
|
-
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
149468
|
-
if (!IsObject(decorated))
|
|
149469
|
-
throw new TypeError();
|
|
149470
|
-
descriptor = decorated;
|
|
149471
|
-
}
|
|
149472
|
-
}
|
|
149473
|
-
return descriptor;
|
|
149474
|
-
}
|
|
149475
|
-
function GetOrCreateMetadataMap(O, P, Create) {
|
|
149476
|
-
var targetMetadata = Metadata.get(O);
|
|
149477
|
-
if (IsUndefined(targetMetadata)) {
|
|
149478
|
-
if (!Create)
|
|
149479
|
-
return undefined;
|
|
149480
|
-
targetMetadata = new _Map();
|
|
149481
|
-
Metadata.set(O, targetMetadata);
|
|
149482
|
-
}
|
|
149483
|
-
var metadataMap = targetMetadata.get(P);
|
|
149484
|
-
if (IsUndefined(metadataMap)) {
|
|
149485
|
-
if (!Create)
|
|
149486
|
-
return undefined;
|
|
149487
|
-
metadataMap = new _Map();
|
|
149488
|
-
targetMetadata.set(P, metadataMap);
|
|
149489
|
-
}
|
|
149490
|
-
return metadataMap;
|
|
149491
|
-
}
|
|
149492
|
-
// 3.1.1.1 OrdinaryHasMetadata(MetadataKey, O, P)
|
|
149493
|
-
// https://rbuckton.github.io/reflect-metadata/#ordinaryhasmetadata
|
|
149494
|
-
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
149495
|
-
var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
149496
|
-
if (hasOwn)
|
|
149497
|
-
return true;
|
|
149498
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
149499
|
-
if (!IsNull(parent))
|
|
149500
|
-
return OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
149501
|
-
return false;
|
|
149502
|
-
}
|
|
149503
|
-
// 3.1.2.1 OrdinaryHasOwnMetadata(MetadataKey, O, P)
|
|
149504
|
-
// https://rbuckton.github.io/reflect-metadata/#ordinaryhasownmetadata
|
|
149505
|
-
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
149506
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);
|
|
149507
|
-
if (IsUndefined(metadataMap))
|
|
149508
|
-
return false;
|
|
149509
|
-
return ToBoolean(metadataMap.has(MetadataKey));
|
|
149510
|
-
}
|
|
149511
|
-
// 3.1.3.1 OrdinaryGetMetadata(MetadataKey, O, P)
|
|
149512
|
-
// https://rbuckton.github.io/reflect-metadata/#ordinarygetmetadata
|
|
149513
|
-
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
149514
|
-
var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
149515
|
-
if (hasOwn)
|
|
149516
|
-
return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
149517
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
149518
|
-
if (!IsNull(parent))
|
|
149519
|
-
return OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
149520
|
-
return undefined;
|
|
149521
|
-
}
|
|
149522
|
-
// 3.1.4.1 OrdinaryGetOwnMetadata(MetadataKey, O, P)
|
|
149523
|
-
// https://rbuckton.github.io/reflect-metadata/#ordinarygetownmetadata
|
|
149524
|
-
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
149525
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);
|
|
149526
|
-
if (IsUndefined(metadataMap))
|
|
149527
|
-
return undefined;
|
|
149528
|
-
return metadataMap.get(MetadataKey);
|
|
149529
|
-
}
|
|
149530
|
-
// 3.1.5.1 OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P)
|
|
149531
|
-
// https://rbuckton.github.io/reflect-metadata/#ordinarydefineownmetadata
|
|
149532
|
-
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
149533
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ true);
|
|
149534
|
-
metadataMap.set(MetadataKey, MetadataValue);
|
|
149535
|
-
}
|
|
149536
|
-
// 3.1.6.1 OrdinaryMetadataKeys(O, P)
|
|
149537
|
-
// https://rbuckton.github.io/reflect-metadata/#ordinarymetadatakeys
|
|
149538
|
-
function OrdinaryMetadataKeys(O, P) {
|
|
149539
|
-
var ownKeys = OrdinaryOwnMetadataKeys(O, P);
|
|
149540
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
149541
|
-
if (parent === null)
|
|
149542
|
-
return ownKeys;
|
|
149543
|
-
var parentKeys = OrdinaryMetadataKeys(parent, P);
|
|
149544
|
-
if (parentKeys.length <= 0)
|
|
149545
|
-
return ownKeys;
|
|
149546
|
-
if (ownKeys.length <= 0)
|
|
149547
|
-
return parentKeys;
|
|
149548
|
-
var set = new _Set();
|
|
149549
|
-
var keys = [];
|
|
149550
|
-
for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {
|
|
149551
|
-
var key = ownKeys_1[_i];
|
|
149552
|
-
var hasKey = set.has(key);
|
|
149553
|
-
if (!hasKey) {
|
|
149554
|
-
set.add(key);
|
|
149555
|
-
keys.push(key);
|
|
149556
|
-
}
|
|
149557
|
-
}
|
|
149558
|
-
for (var _a = 0, parentKeys_1 = parentKeys; _a < parentKeys_1.length; _a++) {
|
|
149559
|
-
var key = parentKeys_1[_a];
|
|
149560
|
-
var hasKey = set.has(key);
|
|
149561
|
-
if (!hasKey) {
|
|
149562
|
-
set.add(key);
|
|
149563
|
-
keys.push(key);
|
|
149564
|
-
}
|
|
149565
|
-
}
|
|
149566
|
-
return keys;
|
|
149567
|
-
}
|
|
149568
|
-
// 3.1.7.1 OrdinaryOwnMetadataKeys(O, P)
|
|
149569
|
-
// https://rbuckton.github.io/reflect-metadata/#ordinaryownmetadatakeys
|
|
149570
|
-
function OrdinaryOwnMetadataKeys(O, P) {
|
|
149571
|
-
var keys = [];
|
|
149572
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);
|
|
149573
|
-
if (IsUndefined(metadataMap))
|
|
149574
|
-
return keys;
|
|
149575
|
-
var keysObj = metadataMap.keys();
|
|
149576
|
-
var iterator = GetIterator(keysObj);
|
|
149577
|
-
var k = 0;
|
|
149578
|
-
while (true) {
|
|
149579
|
-
var next = IteratorStep(iterator);
|
|
149580
|
-
if (!next) {
|
|
149581
|
-
keys.length = k;
|
|
149582
|
-
return keys;
|
|
149583
|
-
}
|
|
149584
|
-
var nextValue = IteratorValue(next);
|
|
149585
|
-
try {
|
|
149586
|
-
keys[k] = nextValue;
|
|
149587
|
-
}
|
|
149588
|
-
catch (e) {
|
|
149589
|
-
try {
|
|
149590
|
-
IteratorClose(iterator);
|
|
149591
|
-
}
|
|
149592
|
-
finally {
|
|
149593
|
-
throw e;
|
|
149594
|
-
}
|
|
149595
|
-
}
|
|
149596
|
-
k++;
|
|
149597
|
-
}
|
|
149598
|
-
}
|
|
149599
|
-
// 6 ECMAScript Data Typ0es and Values
|
|
149600
|
-
// https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values
|
|
149601
|
-
function Type(x) {
|
|
149602
|
-
if (x === null)
|
|
149603
|
-
return 1 /* Null */;
|
|
149604
|
-
switch (typeof x) {
|
|
149605
|
-
case "undefined": return 0 /* Undefined */;
|
|
149606
|
-
case "boolean": return 2 /* Boolean */;
|
|
149607
|
-
case "string": return 3 /* String */;
|
|
149608
|
-
case "symbol": return 4 /* Symbol */;
|
|
149609
|
-
case "number": return 5 /* Number */;
|
|
149610
|
-
case "object": return x === null ? 1 /* Null */ : 6 /* Object */;
|
|
149611
|
-
default: return 6 /* Object */;
|
|
149612
|
-
}
|
|
149613
|
-
}
|
|
149614
|
-
// 6.1.1 The Undefined Type
|
|
149615
|
-
// https://tc39.github.io/ecma262/#sec-ecmascript-language-types-undefined-type
|
|
149616
|
-
function IsUndefined(x) {
|
|
149617
|
-
return x === undefined;
|
|
149618
|
-
}
|
|
149619
|
-
// 6.1.2 The Null Type
|
|
149620
|
-
// https://tc39.github.io/ecma262/#sec-ecmascript-language-types-null-type
|
|
149621
|
-
function IsNull(x) {
|
|
149622
|
-
return x === null;
|
|
149623
|
-
}
|
|
149624
|
-
// 6.1.5 The Symbol Type
|
|
149625
|
-
// https://tc39.github.io/ecma262/#sec-ecmascript-language-types-symbol-type
|
|
149626
|
-
function IsSymbol(x) {
|
|
149627
|
-
return typeof x === "symbol";
|
|
149628
|
-
}
|
|
149629
|
-
// 6.1.7 The Object Type
|
|
149630
|
-
// https://tc39.github.io/ecma262/#sec-object-type
|
|
149631
|
-
function IsObject(x) {
|
|
149632
|
-
return typeof x === "object" ? x !== null : typeof x === "function";
|
|
149633
|
-
}
|
|
149634
|
-
// 7.1 Type Conversion
|
|
149635
|
-
// https://tc39.github.io/ecma262/#sec-type-conversion
|
|
149636
|
-
// 7.1.1 ToPrimitive(input [, PreferredType])
|
|
149637
|
-
// https://tc39.github.io/ecma262/#sec-toprimitive
|
|
149638
|
-
function ToPrimitive(input, PreferredType) {
|
|
149639
|
-
switch (Type(input)) {
|
|
149640
|
-
case 0 /* Undefined */: return input;
|
|
149641
|
-
case 1 /* Null */: return input;
|
|
149642
|
-
case 2 /* Boolean */: return input;
|
|
149643
|
-
case 3 /* String */: return input;
|
|
149644
|
-
case 4 /* Symbol */: return input;
|
|
149645
|
-
case 5 /* Number */: return input;
|
|
149646
|
-
}
|
|
149647
|
-
var hint = PreferredType === 3 /* String */ ? "string" : PreferredType === 5 /* Number */ ? "number" : "default";
|
|
149648
|
-
var exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
149649
|
-
if (exoticToPrim !== undefined) {
|
|
149650
|
-
var result = exoticToPrim.call(input, hint);
|
|
149651
|
-
if (IsObject(result))
|
|
149652
|
-
throw new TypeError();
|
|
149653
|
-
return result;
|
|
149654
|
-
}
|
|
149655
|
-
return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
|
|
149656
|
-
}
|
|
149657
|
-
// 7.1.1.1 OrdinaryToPrimitive(O, hint)
|
|
149658
|
-
// https://tc39.github.io/ecma262/#sec-ordinarytoprimitive
|
|
149659
|
-
function OrdinaryToPrimitive(O, hint) {
|
|
149660
|
-
if (hint === "string") {
|
|
149661
|
-
var toString_1 = O.toString;
|
|
149662
|
-
if (IsCallable(toString_1)) {
|
|
149663
|
-
var result = toString_1.call(O);
|
|
149664
|
-
if (!IsObject(result))
|
|
149665
|
-
return result;
|
|
149666
|
-
}
|
|
149667
|
-
var valueOf = O.valueOf;
|
|
149668
|
-
if (IsCallable(valueOf)) {
|
|
149669
|
-
var result = valueOf.call(O);
|
|
149670
|
-
if (!IsObject(result))
|
|
149671
|
-
return result;
|
|
149672
|
-
}
|
|
149673
|
-
}
|
|
149674
|
-
else {
|
|
149675
|
-
var valueOf = O.valueOf;
|
|
149676
|
-
if (IsCallable(valueOf)) {
|
|
149677
|
-
var result = valueOf.call(O);
|
|
149678
|
-
if (!IsObject(result))
|
|
149679
|
-
return result;
|
|
149680
|
-
}
|
|
149681
|
-
var toString_2 = O.toString;
|
|
149682
|
-
if (IsCallable(toString_2)) {
|
|
149683
|
-
var result = toString_2.call(O);
|
|
149684
|
-
if (!IsObject(result))
|
|
149685
|
-
return result;
|
|
149686
|
-
}
|
|
149687
|
-
}
|
|
149688
|
-
throw new TypeError();
|
|
149689
|
-
}
|
|
149690
|
-
// 7.1.2 ToBoolean(argument)
|
|
149691
|
-
// https://tc39.github.io/ecma262/2016/#sec-toboolean
|
|
149692
|
-
function ToBoolean(argument) {
|
|
149693
|
-
return !!argument;
|
|
149694
|
-
}
|
|
149695
|
-
// 7.1.12 ToString(argument)
|
|
149696
|
-
// https://tc39.github.io/ecma262/#sec-tostring
|
|
149697
|
-
function ToString(argument) {
|
|
149698
|
-
return "" + argument;
|
|
149699
|
-
}
|
|
149700
|
-
// 7.1.14 ToPropertyKey(argument)
|
|
149701
|
-
// https://tc39.github.io/ecma262/#sec-topropertykey
|
|
149702
|
-
function ToPropertyKey(argument) {
|
|
149703
|
-
var key = ToPrimitive(argument, 3 /* String */);
|
|
149704
|
-
if (IsSymbol(key))
|
|
149705
|
-
return key;
|
|
149706
|
-
return ToString(key);
|
|
149707
|
-
}
|
|
149708
|
-
// 7.2 Testing and Comparison Operations
|
|
149709
|
-
// https://tc39.github.io/ecma262/#sec-testing-and-comparison-operations
|
|
149710
|
-
// 7.2.2 IsArray(argument)
|
|
149711
|
-
// https://tc39.github.io/ecma262/#sec-isarray
|
|
149712
|
-
function IsArray(argument) {
|
|
149713
|
-
return Array.isArray
|
|
149714
|
-
? Array.isArray(argument)
|
|
149715
|
-
: argument instanceof Object
|
|
149716
|
-
? argument instanceof Array
|
|
149717
|
-
: Object.prototype.toString.call(argument) === "[object Array]";
|
|
149718
|
-
}
|
|
149719
|
-
// 7.2.3 IsCallable(argument)
|
|
149720
|
-
// https://tc39.github.io/ecma262/#sec-iscallable
|
|
149721
|
-
function IsCallable(argument) {
|
|
149722
|
-
// NOTE: This is an approximation as we cannot check for [[Call]] internal method.
|
|
149723
|
-
return typeof argument === "function";
|
|
149724
|
-
}
|
|
149725
|
-
// 7.2.4 IsConstructor(argument)
|
|
149726
|
-
// https://tc39.github.io/ecma262/#sec-isconstructor
|
|
149727
|
-
function IsConstructor(argument) {
|
|
149728
|
-
// NOTE: This is an approximation as we cannot check for [[Construct]] internal method.
|
|
149729
|
-
return typeof argument === "function";
|
|
149730
|
-
}
|
|
149731
|
-
// 7.2.7 IsPropertyKey(argument)
|
|
149732
|
-
// https://tc39.github.io/ecma262/#sec-ispropertykey
|
|
149733
|
-
function IsPropertyKey(argument) {
|
|
149734
|
-
switch (Type(argument)) {
|
|
149735
|
-
case 3 /* String */: return true;
|
|
149736
|
-
case 4 /* Symbol */: return true;
|
|
149737
|
-
default: return false;
|
|
149738
|
-
}
|
|
149739
|
-
}
|
|
149740
|
-
// 7.3 Operations on Objects
|
|
149741
|
-
// https://tc39.github.io/ecma262/#sec-operations-on-objects
|
|
149742
|
-
// 7.3.9 GetMethod(V, P)
|
|
149743
|
-
// https://tc39.github.io/ecma262/#sec-getmethod
|
|
149744
|
-
function GetMethod(V, P) {
|
|
149745
|
-
var func = V[P];
|
|
149746
|
-
if (func === undefined || func === null)
|
|
149747
|
-
return undefined;
|
|
149748
|
-
if (!IsCallable(func))
|
|
149749
|
-
throw new TypeError();
|
|
149750
|
-
return func;
|
|
149751
|
-
}
|
|
149752
|
-
// 7.4 Operations on Iterator Objects
|
|
149753
|
-
// https://tc39.github.io/ecma262/#sec-operations-on-iterator-objects
|
|
149754
|
-
function GetIterator(obj) {
|
|
149755
|
-
var method = GetMethod(obj, iteratorSymbol);
|
|
149756
|
-
if (!IsCallable(method))
|
|
149757
|
-
throw new TypeError(); // from Call
|
|
149758
|
-
var iterator = method.call(obj);
|
|
149759
|
-
if (!IsObject(iterator))
|
|
149760
|
-
throw new TypeError();
|
|
149761
|
-
return iterator;
|
|
149762
|
-
}
|
|
149763
|
-
// 7.4.4 IteratorValue(iterResult)
|
|
149764
|
-
// https://tc39.github.io/ecma262/2016/#sec-iteratorvalue
|
|
149765
|
-
function IteratorValue(iterResult) {
|
|
149766
|
-
return iterResult.value;
|
|
149767
|
-
}
|
|
149768
|
-
// 7.4.5 IteratorStep(iterator)
|
|
149769
|
-
// https://tc39.github.io/ecma262/#sec-iteratorstep
|
|
149770
|
-
function IteratorStep(iterator) {
|
|
149771
|
-
var result = iterator.next();
|
|
149772
|
-
return result.done ? false : result;
|
|
149773
|
-
}
|
|
149774
|
-
// 7.4.6 IteratorClose(iterator, completion)
|
|
149775
|
-
// https://tc39.github.io/ecma262/#sec-iteratorclose
|
|
149776
|
-
function IteratorClose(iterator) {
|
|
149777
|
-
var f = iterator["return"];
|
|
149778
|
-
if (f)
|
|
149779
|
-
f.call(iterator);
|
|
149780
|
-
}
|
|
149781
|
-
// 9.1 Ordinary Object Internal Methods and Internal Slots
|
|
149782
|
-
// https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots
|
|
149783
|
-
// 9.1.1.1 OrdinaryGetPrototypeOf(O)
|
|
149784
|
-
// https://tc39.github.io/ecma262/#sec-ordinarygetprototypeof
|
|
149785
|
-
function OrdinaryGetPrototypeOf(O) {
|
|
149786
|
-
var proto = Object.getPrototypeOf(O);
|
|
149787
|
-
if (typeof O !== "function" || O === functionPrototype)
|
|
149788
|
-
return proto;
|
|
149789
|
-
// TypeScript doesn't set __proto__ in ES5, as it's non-standard.
|
|
149790
|
-
// Try to determine the superclass constructor. Compatible implementations
|
|
149791
|
-
// must either set __proto__ on a subclass constructor to the superclass constructor,
|
|
149792
|
-
// or ensure each class has a valid `constructor` property on its prototype that
|
|
149793
|
-
// points back to the constructor.
|
|
149794
|
-
// If this is not the same as Function.[[Prototype]], then this is definately inherited.
|
|
149795
|
-
// This is the case when in ES6 or when using __proto__ in a compatible browser.
|
|
149796
|
-
if (proto !== functionPrototype)
|
|
149797
|
-
return proto;
|
|
149798
|
-
// If the super prototype is Object.prototype, null, or undefined, then we cannot determine the heritage.
|
|
149799
|
-
var prototype = O.prototype;
|
|
149800
|
-
var prototypeProto = prototype && Object.getPrototypeOf(prototype);
|
|
149801
|
-
if (prototypeProto == null || prototypeProto === Object.prototype)
|
|
149802
|
-
return proto;
|
|
149803
|
-
// If the constructor was not a function, then we cannot determine the heritage.
|
|
149804
|
-
var constructor = prototypeProto.constructor;
|
|
149805
|
-
if (typeof constructor !== "function")
|
|
149806
|
-
return proto;
|
|
149807
|
-
// If we have some kind of self-reference, then we cannot determine the heritage.
|
|
149808
|
-
if (constructor === O)
|
|
149809
|
-
return proto;
|
|
149810
|
-
// we have a pretty good guess at the heritage.
|
|
149811
|
-
return constructor;
|
|
149812
|
-
}
|
|
149813
|
-
// naive Map shim
|
|
149814
|
-
function CreateMapPolyfill() {
|
|
149815
|
-
var cacheSentinel = {};
|
|
149816
|
-
var arraySentinel = [];
|
|
149817
|
-
var MapIterator = /** @class */ (function () {
|
|
149818
|
-
function MapIterator(keys, values, selector) {
|
|
149819
|
-
this._index = 0;
|
|
149820
|
-
this._keys = keys;
|
|
149821
|
-
this._values = values;
|
|
149822
|
-
this._selector = selector;
|
|
149823
|
-
}
|
|
149824
|
-
MapIterator.prototype["@@iterator"] = function () { return this; };
|
|
149825
|
-
MapIterator.prototype[iteratorSymbol] = function () { return this; };
|
|
149826
|
-
MapIterator.prototype.next = function () {
|
|
149827
|
-
var index = this._index;
|
|
149828
|
-
if (index >= 0 && index < this._keys.length) {
|
|
149829
|
-
var result = this._selector(this._keys[index], this._values[index]);
|
|
149830
|
-
if (index + 1 >= this._keys.length) {
|
|
149831
|
-
this._index = -1;
|
|
149832
|
-
this._keys = arraySentinel;
|
|
149833
|
-
this._values = arraySentinel;
|
|
149834
|
-
}
|
|
149835
|
-
else {
|
|
149836
|
-
this._index++;
|
|
149837
|
-
}
|
|
149838
|
-
return { value: result, done: false };
|
|
149839
|
-
}
|
|
149840
|
-
return { value: undefined, done: true };
|
|
149841
|
-
};
|
|
149842
|
-
MapIterator.prototype.throw = function (error) {
|
|
149843
|
-
if (this._index >= 0) {
|
|
149844
|
-
this._index = -1;
|
|
149845
|
-
this._keys = arraySentinel;
|
|
149846
|
-
this._values = arraySentinel;
|
|
149847
|
-
}
|
|
149848
|
-
throw error;
|
|
149849
|
-
};
|
|
149850
|
-
MapIterator.prototype.return = function (value) {
|
|
149851
|
-
if (this._index >= 0) {
|
|
149852
|
-
this._index = -1;
|
|
149853
|
-
this._keys = arraySentinel;
|
|
149854
|
-
this._values = arraySentinel;
|
|
149855
|
-
}
|
|
149856
|
-
return { value: value, done: true };
|
|
149857
|
-
};
|
|
149858
|
-
return MapIterator;
|
|
149859
|
-
}());
|
|
149860
|
-
return /** @class */ (function () {
|
|
149861
|
-
function Map() {
|
|
149862
|
-
this._keys = [];
|
|
149863
|
-
this._values = [];
|
|
149864
|
-
this._cacheKey = cacheSentinel;
|
|
149865
|
-
this._cacheIndex = -2;
|
|
149866
|
-
}
|
|
149867
|
-
Object.defineProperty(Map.prototype, "size", {
|
|
149868
|
-
get: function () { return this._keys.length; },
|
|
149869
|
-
enumerable: true,
|
|
149870
|
-
configurable: true
|
|
149871
|
-
});
|
|
149872
|
-
Map.prototype.has = function (key) { return this._find(key, /*insert*/ false) >= 0; };
|
|
149873
|
-
Map.prototype.get = function (key) {
|
|
149874
|
-
var index = this._find(key, /*insert*/ false);
|
|
149875
|
-
return index >= 0 ? this._values[index] : undefined;
|
|
149876
|
-
};
|
|
149877
|
-
Map.prototype.set = function (key, value) {
|
|
149878
|
-
var index = this._find(key, /*insert*/ true);
|
|
149879
|
-
this._values[index] = value;
|
|
149880
|
-
return this;
|
|
149881
|
-
};
|
|
149882
|
-
Map.prototype.delete = function (key) {
|
|
149883
|
-
var index = this._find(key, /*insert*/ false);
|
|
149884
|
-
if (index >= 0) {
|
|
149885
|
-
var size = this._keys.length;
|
|
149886
|
-
for (var i = index + 1; i < size; i++) {
|
|
149887
|
-
this._keys[i - 1] = this._keys[i];
|
|
149888
|
-
this._values[i - 1] = this._values[i];
|
|
149889
|
-
}
|
|
149890
|
-
this._keys.length--;
|
|
149891
|
-
this._values.length--;
|
|
149892
|
-
if (key === this._cacheKey) {
|
|
149893
|
-
this._cacheKey = cacheSentinel;
|
|
149894
|
-
this._cacheIndex = -2;
|
|
149895
|
-
}
|
|
149896
|
-
return true;
|
|
149897
|
-
}
|
|
149898
|
-
return false;
|
|
149899
|
-
};
|
|
149900
|
-
Map.prototype.clear = function () {
|
|
149901
|
-
this._keys.length = 0;
|
|
149902
|
-
this._values.length = 0;
|
|
149903
|
-
this._cacheKey = cacheSentinel;
|
|
149904
|
-
this._cacheIndex = -2;
|
|
149905
|
-
};
|
|
149906
|
-
Map.prototype.keys = function () { return new MapIterator(this._keys, this._values, getKey); };
|
|
149907
|
-
Map.prototype.values = function () { return new MapIterator(this._keys, this._values, getValue); };
|
|
149908
|
-
Map.prototype.entries = function () { return new MapIterator(this._keys, this._values, getEntry); };
|
|
149909
|
-
Map.prototype["@@iterator"] = function () { return this.entries(); };
|
|
149910
|
-
Map.prototype[iteratorSymbol] = function () { return this.entries(); };
|
|
149911
|
-
Map.prototype._find = function (key, insert) {
|
|
149912
|
-
if (this._cacheKey !== key) {
|
|
149913
|
-
this._cacheIndex = this._keys.indexOf(this._cacheKey = key);
|
|
149914
|
-
}
|
|
149915
|
-
if (this._cacheIndex < 0 && insert) {
|
|
149916
|
-
this._cacheIndex = this._keys.length;
|
|
149917
|
-
this._keys.push(key);
|
|
149918
|
-
this._values.push(undefined);
|
|
149919
|
-
}
|
|
149920
|
-
return this._cacheIndex;
|
|
149921
|
-
};
|
|
149922
|
-
return Map;
|
|
149923
|
-
}());
|
|
149924
|
-
function getKey(key, _) {
|
|
149925
|
-
return key;
|
|
149926
|
-
}
|
|
149927
|
-
function getValue(_, value) {
|
|
149928
|
-
return value;
|
|
149929
|
-
}
|
|
149930
|
-
function getEntry(key, value) {
|
|
149931
|
-
return [key, value];
|
|
149932
|
-
}
|
|
149933
|
-
}
|
|
149934
|
-
// naive Set shim
|
|
149935
|
-
function CreateSetPolyfill() {
|
|
149936
|
-
return /** @class */ (function () {
|
|
149937
|
-
function Set() {
|
|
149938
|
-
this._map = new _Map();
|
|
149939
|
-
}
|
|
149940
|
-
Object.defineProperty(Set.prototype, "size", {
|
|
149941
|
-
get: function () { return this._map.size; },
|
|
149942
|
-
enumerable: true,
|
|
149943
|
-
configurable: true
|
|
149944
|
-
});
|
|
149945
|
-
Set.prototype.has = function (value) { return this._map.has(value); };
|
|
149946
|
-
Set.prototype.add = function (value) { return this._map.set(value, value), this; };
|
|
149947
|
-
Set.prototype.delete = function (value) { return this._map.delete(value); };
|
|
149948
|
-
Set.prototype.clear = function () { this._map.clear(); };
|
|
149949
|
-
Set.prototype.keys = function () { return this._map.keys(); };
|
|
149950
|
-
Set.prototype.values = function () { return this._map.values(); };
|
|
149951
|
-
Set.prototype.entries = function () { return this._map.entries(); };
|
|
149952
|
-
Set.prototype["@@iterator"] = function () { return this.keys(); };
|
|
149953
|
-
Set.prototype[iteratorSymbol] = function () { return this.keys(); };
|
|
149954
|
-
return Set;
|
|
149955
|
-
}());
|
|
149956
|
-
}
|
|
149957
|
-
// naive WeakMap shim
|
|
149958
|
-
function CreateWeakMapPolyfill() {
|
|
149959
|
-
var UUID_SIZE = 16;
|
|
149960
|
-
var keys = HashMap.create();
|
|
149961
|
-
var rootKey = CreateUniqueKey();
|
|
149962
|
-
return /** @class */ (function () {
|
|
149963
|
-
function WeakMap() {
|
|
149964
|
-
this._key = CreateUniqueKey();
|
|
149965
|
-
}
|
|
149966
|
-
WeakMap.prototype.has = function (target) {
|
|
149967
|
-
var table = GetOrCreateWeakMapTable(target, /*create*/ false);
|
|
149968
|
-
return table !== undefined ? HashMap.has(table, this._key) : false;
|
|
149969
|
-
};
|
|
149970
|
-
WeakMap.prototype.get = function (target) {
|
|
149971
|
-
var table = GetOrCreateWeakMapTable(target, /*create*/ false);
|
|
149972
|
-
return table !== undefined ? HashMap.get(table, this._key) : undefined;
|
|
149973
|
-
};
|
|
149974
|
-
WeakMap.prototype.set = function (target, value) {
|
|
149975
|
-
var table = GetOrCreateWeakMapTable(target, /*create*/ true);
|
|
149976
|
-
table[this._key] = value;
|
|
149977
|
-
return this;
|
|
149978
|
-
};
|
|
149979
|
-
WeakMap.prototype.delete = function (target) {
|
|
149980
|
-
var table = GetOrCreateWeakMapTable(target, /*create*/ false);
|
|
149981
|
-
return table !== undefined ? delete table[this._key] : false;
|
|
149982
|
-
};
|
|
149983
|
-
WeakMap.prototype.clear = function () {
|
|
149984
|
-
// NOTE: not a real clear, just makes the previous data unreachable
|
|
149985
|
-
this._key = CreateUniqueKey();
|
|
149986
|
-
};
|
|
149987
|
-
return WeakMap;
|
|
149988
|
-
}());
|
|
149989
|
-
function CreateUniqueKey() {
|
|
149990
|
-
var key;
|
|
149991
|
-
do
|
|
149992
|
-
key = "@@WeakMap@@" + CreateUUID();
|
|
149993
|
-
while (HashMap.has(keys, key));
|
|
149994
|
-
keys[key] = true;
|
|
149995
|
-
return key;
|
|
149996
|
-
}
|
|
149997
|
-
function GetOrCreateWeakMapTable(target, create) {
|
|
149998
|
-
if (!hasOwn.call(target, rootKey)) {
|
|
149999
|
-
if (!create)
|
|
150000
|
-
return undefined;
|
|
150001
|
-
Object.defineProperty(target, rootKey, { value: HashMap.create() });
|
|
150002
|
-
}
|
|
150003
|
-
return target[rootKey];
|
|
150004
|
-
}
|
|
150005
|
-
function FillRandomBytes(buffer, size) {
|
|
150006
|
-
for (var i = 0; i < size; ++i)
|
|
150007
|
-
buffer[i] = Math.random() * 0xff | 0;
|
|
150008
|
-
return buffer;
|
|
150009
|
-
}
|
|
150010
|
-
function GenRandomBytes(size) {
|
|
150011
|
-
if (typeof Uint8Array === "function") {
|
|
150012
|
-
if (typeof crypto !== "undefined")
|
|
150013
|
-
return crypto.getRandomValues(new Uint8Array(size));
|
|
150014
|
-
if (typeof msCrypto !== "undefined")
|
|
150015
|
-
return msCrypto.getRandomValues(new Uint8Array(size));
|
|
150016
|
-
return FillRandomBytes(new Uint8Array(size), size);
|
|
150017
|
-
}
|
|
150018
|
-
return FillRandomBytes(new Array(size), size);
|
|
150019
|
-
}
|
|
150020
|
-
function CreateUUID() {
|
|
150021
|
-
var data = GenRandomBytes(UUID_SIZE);
|
|
150022
|
-
// mark as random - RFC 4122 § 4.4
|
|
150023
|
-
data[6] = data[6] & 0x4f | 0x40;
|
|
150024
|
-
data[8] = data[8] & 0xbf | 0x80;
|
|
150025
|
-
var result = "";
|
|
150026
|
-
for (var offset = 0; offset < UUID_SIZE; ++offset) {
|
|
150027
|
-
var byte = data[offset];
|
|
150028
|
-
if (offset === 4 || offset === 6 || offset === 8)
|
|
150029
|
-
result += "-";
|
|
150030
|
-
if (byte < 16)
|
|
150031
|
-
result += "0";
|
|
150032
|
-
result += byte.toString(16).toLowerCase();
|
|
150033
|
-
}
|
|
150034
|
-
return result;
|
|
150035
|
-
}
|
|
150036
|
-
}
|
|
150037
|
-
// uses a heuristic used by v8 and chakra to force an object into dictionary mode.
|
|
150038
|
-
function MakeDictionary(obj) {
|
|
150039
|
-
obj.__ = undefined;
|
|
150040
|
-
delete obj.__;
|
|
150041
|
-
return obj;
|
|
150042
|
-
}
|
|
150043
|
-
});
|
|
150044
|
-
})(Reflect || (Reflect = {}));
|
|
150045
|
-
|
|
150046
|
-
|
|
150047
|
-
/***/ }),
|
|
150048
|
-
|
|
150049
|
-
/***/ "./node_modules/regenerate-unicode-properties/Binary_Property/ASCII.js":
|
|
150050
|
-
/*!*****************************************************************************!*\
|
|
150051
|
-
!*** ./node_modules/regenerate-unicode-properties/Binary_Property/ASCII.js ***!
|
|
150052
|
-
\*****************************************************************************/
|
|
150053
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
150054
|
-
|
|
150055
|
-
const set = __webpack_require__(/*! regenerate */ "./node_modules/regenerate/regenerate.js")();
|
|
150056
|
-
set.addRange(0x0, 0x7F);
|
|
150057
|
-
exports.characters = set;
|
|
148898
|
+
const set = __webpack_require__(/*! regenerate */ "./node_modules/regenerate/regenerate.js")();
|
|
148899
|
+
set.addRange(0x0, 0x7F);
|
|
148900
|
+
exports.characters = set;
|
|
150058
148901
|
|
|
150059
148902
|
|
|
150060
148903
|
/***/ }),
|
|
@@ -157887,6 +156730,7 @@ var runtime = (function (exports) {
|
|
|
157887
156730
|
|
|
157888
156731
|
var Op = Object.prototype;
|
|
157889
156732
|
var hasOwn = Op.hasOwnProperty;
|
|
156733
|
+
var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; };
|
|
157890
156734
|
var undefined; // More compressible than void 0.
|
|
157891
156735
|
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
157892
156736
|
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
@@ -157919,7 +156763,7 @@ var runtime = (function (exports) {
|
|
|
157919
156763
|
|
|
157920
156764
|
// The ._invoke method unifies the implementations of the .next,
|
|
157921
156765
|
// .throw, and .return methods.
|
|
157922
|
-
generator
|
|
156766
|
+
defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) });
|
|
157923
156767
|
|
|
157924
156768
|
return generator;
|
|
157925
156769
|
}
|
|
@@ -157980,8 +156824,12 @@ var runtime = (function (exports) {
|
|
|
157980
156824
|
var Gp = GeneratorFunctionPrototype.prototype =
|
|
157981
156825
|
Generator.prototype = Object.create(IteratorPrototype);
|
|
157982
156826
|
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
157983
|
-
|
|
157984
|
-
|
|
156827
|
+
defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: true });
|
|
156828
|
+
defineProperty(
|
|
156829
|
+
GeneratorFunctionPrototype,
|
|
156830
|
+
"constructor",
|
|
156831
|
+
{ value: GeneratorFunction, configurable: true }
|
|
156832
|
+
);
|
|
157985
156833
|
GeneratorFunction.displayName = define(
|
|
157986
156834
|
GeneratorFunctionPrototype,
|
|
157987
156835
|
toStringTagSymbol,
|
|
@@ -158091,7 +156939,7 @@ var runtime = (function (exports) {
|
|
|
158091
156939
|
|
|
158092
156940
|
// Define the unified helper method that is used to implement .next,
|
|
158093
156941
|
// .throw, and .return (see defineIteratorMethods).
|
|
158094
|
-
this
|
|
156942
|
+
defineProperty(this, "_invoke", { value: enqueue });
|
|
158095
156943
|
}
|
|
158096
156944
|
|
|
158097
156945
|
defineIteratorMethods(AsyncIterator.prototype);
|
|
@@ -158131,8 +156979,9 @@ var runtime = (function (exports) {
|
|
|
158131
156979
|
throw arg;
|
|
158132
156980
|
}
|
|
158133
156981
|
|
|
158134
|
-
// Be forgiving, per
|
|
158135
|
-
// https://
|
|
156982
|
+
// Be forgiving, per GeneratorResume behavior specified since ES2015:
|
|
156983
|
+
// ES2015 spec, step 3: https://262.ecma-international.org/6.0/#sec-generatorresume
|
|
156984
|
+
// Latest spec, step 2: https://tc39.es/ecma262/#sec-generatorresume
|
|
158136
156985
|
return doneResult();
|
|
158137
156986
|
}
|
|
158138
156987
|
|
|
@@ -158201,31 +157050,32 @@ var runtime = (function (exports) {
|
|
|
158201
157050
|
// delegate iterator, or by modifying context.method and context.arg,
|
|
158202
157051
|
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
158203
157052
|
function maybeInvokeDelegate(delegate, context) {
|
|
158204
|
-
var
|
|
157053
|
+
var methodName = context.method;
|
|
157054
|
+
var method = delegate.iterator[methodName];
|
|
158205
157055
|
if (method === undefined) {
|
|
158206
157056
|
// A .throw or .return when the delegate iterator has no .throw
|
|
158207
|
-
// method always
|
|
157057
|
+
// method, or a missing .next method, always terminate the
|
|
157058
|
+
// yield* loop.
|
|
158208
157059
|
context.delegate = null;
|
|
158209
157060
|
|
|
158210
|
-
|
|
158211
|
-
|
|
158212
|
-
|
|
158213
|
-
|
|
158214
|
-
|
|
158215
|
-
|
|
158216
|
-
|
|
158217
|
-
maybeInvokeDelegate(delegate, context);
|
|
157061
|
+
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
157062
|
+
if (methodName === "throw" && delegate.iterator["return"]) {
|
|
157063
|
+
// If the delegate iterator has a return method, give it a
|
|
157064
|
+
// chance to clean up.
|
|
157065
|
+
context.method = "return";
|
|
157066
|
+
context.arg = undefined;
|
|
157067
|
+
maybeInvokeDelegate(delegate, context);
|
|
158218
157068
|
|
|
158219
|
-
|
|
158220
|
-
|
|
158221
|
-
|
|
158222
|
-
|
|
158223
|
-
}
|
|
157069
|
+
if (context.method === "throw") {
|
|
157070
|
+
// If maybeInvokeDelegate(context) changed context.method from
|
|
157071
|
+
// "return" to "throw", let that override the TypeError below.
|
|
157072
|
+
return ContinueSentinel;
|
|
158224
157073
|
}
|
|
158225
|
-
|
|
157074
|
+
}
|
|
157075
|
+
if (methodName !== "return") {
|
|
158226
157076
|
context.method = "throw";
|
|
158227
157077
|
context.arg = new TypeError(
|
|
158228
|
-
"The iterator does not provide a '
|
|
157078
|
+
"The iterator does not provide a '" + methodName + "' method");
|
|
158229
157079
|
}
|
|
158230
157080
|
|
|
158231
157081
|
return ContinueSentinel;
|
|
@@ -158329,7 +157179,8 @@ var runtime = (function (exports) {
|
|
|
158329
157179
|
this.reset(true);
|
|
158330
157180
|
}
|
|
158331
157181
|
|
|
158332
|
-
exports.keys = function(
|
|
157182
|
+
exports.keys = function(val) {
|
|
157183
|
+
var object = Object(val);
|
|
158333
157184
|
var keys = [];
|
|
158334
157185
|
for (var key in object) {
|
|
158335
157186
|
keys.push(key);
|
|
@@ -158357,7 +157208,7 @@ var runtime = (function (exports) {
|
|
|
158357
157208
|
};
|
|
158358
157209
|
|
|
158359
157210
|
function values(iterable) {
|
|
158360
|
-
if (iterable) {
|
|
157211
|
+
if (iterable != null) {
|
|
158361
157212
|
var iteratorMethod = iterable[iteratorSymbol];
|
|
158362
157213
|
if (iteratorMethod) {
|
|
158363
157214
|
return iteratorMethod.call(iterable);
|
|
@@ -158387,8 +157238,7 @@ var runtime = (function (exports) {
|
|
|
158387
157238
|
}
|
|
158388
157239
|
}
|
|
158389
157240
|
|
|
158390
|
-
|
|
158391
|
-
return { next: doneResult };
|
|
157241
|
+
throw new TypeError(typeof iterable + " is not iterable");
|
|
158392
157242
|
}
|
|
158393
157243
|
exports.values = values;
|
|
158394
157244
|
|
|
@@ -232190,6 +231040,1431 @@ function validateChild(node, key, val) {
|
|
|
232190
231040
|
//# sourceMappingURL=validate.js.map
|
|
232191
231041
|
|
|
232192
231042
|
|
|
231043
|
+
/***/ }),
|
|
231044
|
+
|
|
231045
|
+
/***/ "./node_modules/reflect-metadata/Reflect.js":
|
|
231046
|
+
/*!**************************************************!*\
|
|
231047
|
+
!*** ./node_modules/reflect-metadata/Reflect.js ***!
|
|
231048
|
+
\**************************************************/
|
|
231049
|
+
/***/ (() => {
|
|
231050
|
+
|
|
231051
|
+
/*! *****************************************************************************
|
|
231052
|
+
Copyright (C) Microsoft. All rights reserved.
|
|
231053
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
231054
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
231055
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
231056
|
+
|
|
231057
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
231058
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
231059
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
231060
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
231061
|
+
|
|
231062
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
231063
|
+
and limitations under the License.
|
|
231064
|
+
***************************************************************************** */
|
|
231065
|
+
var Reflect;
|
|
231066
|
+
(function (Reflect) {
|
|
231067
|
+
// Metadata Proposal
|
|
231068
|
+
// https://rbuckton.github.io/reflect-metadata/
|
|
231069
|
+
(function (factory) {
|
|
231070
|
+
var root = typeof globalThis === "object" ? globalThis :
|
|
231071
|
+
typeof global === "object" ? global :
|
|
231072
|
+
typeof self === "object" ? self :
|
|
231073
|
+
typeof this === "object" ? this :
|
|
231074
|
+
sloppyModeThis();
|
|
231075
|
+
var exporter = makeExporter(Reflect);
|
|
231076
|
+
if (typeof root.Reflect !== "undefined") {
|
|
231077
|
+
exporter = makeExporter(root.Reflect, exporter);
|
|
231078
|
+
}
|
|
231079
|
+
factory(exporter, root);
|
|
231080
|
+
if (typeof root.Reflect === "undefined") {
|
|
231081
|
+
root.Reflect = Reflect;
|
|
231082
|
+
}
|
|
231083
|
+
function makeExporter(target, previous) {
|
|
231084
|
+
return function (key, value) {
|
|
231085
|
+
Object.defineProperty(target, key, { configurable: true, writable: true, value: value });
|
|
231086
|
+
if (previous)
|
|
231087
|
+
previous(key, value);
|
|
231088
|
+
};
|
|
231089
|
+
}
|
|
231090
|
+
function functionThis() {
|
|
231091
|
+
try {
|
|
231092
|
+
return Function("return this;")();
|
|
231093
|
+
}
|
|
231094
|
+
catch (_) { }
|
|
231095
|
+
}
|
|
231096
|
+
function indirectEvalThis() {
|
|
231097
|
+
try {
|
|
231098
|
+
return (void 0, eval)("(function() { return this; })()");
|
|
231099
|
+
}
|
|
231100
|
+
catch (_) { }
|
|
231101
|
+
}
|
|
231102
|
+
function sloppyModeThis() {
|
|
231103
|
+
return functionThis() || indirectEvalThis();
|
|
231104
|
+
}
|
|
231105
|
+
})(function (exporter, root) {
|
|
231106
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
|
231107
|
+
// feature test for Symbol support
|
|
231108
|
+
var supportsSymbol = typeof Symbol === "function";
|
|
231109
|
+
var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
|
|
231110
|
+
var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
|
|
231111
|
+
var supportsCreate = typeof Object.create === "function"; // feature test for Object.create support
|
|
231112
|
+
var supportsProto = { __proto__: [] } instanceof Array; // feature test for __proto__ support
|
|
231113
|
+
var downLevel = !supportsCreate && !supportsProto;
|
|
231114
|
+
var HashMap = {
|
|
231115
|
+
// create an object in dictionary mode (a.k.a. "slow" mode in v8)
|
|
231116
|
+
create: supportsCreate
|
|
231117
|
+
? function () { return MakeDictionary(Object.create(null)); }
|
|
231118
|
+
: supportsProto
|
|
231119
|
+
? function () { return MakeDictionary({ __proto__: null }); }
|
|
231120
|
+
: function () { return MakeDictionary({}); },
|
|
231121
|
+
has: downLevel
|
|
231122
|
+
? function (map, key) { return hasOwn.call(map, key); }
|
|
231123
|
+
: function (map, key) { return key in map; },
|
|
231124
|
+
get: downLevel
|
|
231125
|
+
? function (map, key) { return hasOwn.call(map, key) ? map[key] : undefined; }
|
|
231126
|
+
: function (map, key) { return map[key]; },
|
|
231127
|
+
};
|
|
231128
|
+
// Load global or shim versions of Map, Set, and WeakMap
|
|
231129
|
+
var functionPrototype = Object.getPrototypeOf(Function);
|
|
231130
|
+
var _Map = typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill();
|
|
231131
|
+
var _Set = typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill();
|
|
231132
|
+
var _WeakMap = typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill();
|
|
231133
|
+
var registrySymbol = supportsSymbol ? Symbol.for("@reflect-metadata:registry") : undefined;
|
|
231134
|
+
var metadataRegistry = GetOrCreateMetadataRegistry();
|
|
231135
|
+
var metadataProvider = CreateMetadataProvider(metadataRegistry);
|
|
231136
|
+
/**
|
|
231137
|
+
* Applies a set of decorators to a property of a target object.
|
|
231138
|
+
* @param decorators An array of decorators.
|
|
231139
|
+
* @param target The target object.
|
|
231140
|
+
* @param propertyKey (Optional) The property key to decorate.
|
|
231141
|
+
* @param attributes (Optional) The property descriptor for the target key.
|
|
231142
|
+
* @remarks Decorators are applied in reverse order.
|
|
231143
|
+
* @example
|
|
231144
|
+
*
|
|
231145
|
+
* class Example {
|
|
231146
|
+
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
231147
|
+
* // static staticProperty;
|
|
231148
|
+
* // property;
|
|
231149
|
+
*
|
|
231150
|
+
* constructor(p) { }
|
|
231151
|
+
* static staticMethod(p) { }
|
|
231152
|
+
* method(p) { }
|
|
231153
|
+
* }
|
|
231154
|
+
*
|
|
231155
|
+
* // constructor
|
|
231156
|
+
* Example = Reflect.decorate(decoratorsArray, Example);
|
|
231157
|
+
*
|
|
231158
|
+
* // property (on constructor)
|
|
231159
|
+
* Reflect.decorate(decoratorsArray, Example, "staticProperty");
|
|
231160
|
+
*
|
|
231161
|
+
* // property (on prototype)
|
|
231162
|
+
* Reflect.decorate(decoratorsArray, Example.prototype, "property");
|
|
231163
|
+
*
|
|
231164
|
+
* // method (on constructor)
|
|
231165
|
+
* Object.defineProperty(Example, "staticMethod",
|
|
231166
|
+
* Reflect.decorate(decoratorsArray, Example, "staticMethod",
|
|
231167
|
+
* Object.getOwnPropertyDescriptor(Example, "staticMethod")));
|
|
231168
|
+
*
|
|
231169
|
+
* // method (on prototype)
|
|
231170
|
+
* Object.defineProperty(Example.prototype, "method",
|
|
231171
|
+
* Reflect.decorate(decoratorsArray, Example.prototype, "method",
|
|
231172
|
+
* Object.getOwnPropertyDescriptor(Example.prototype, "method")));
|
|
231173
|
+
*
|
|
231174
|
+
*/
|
|
231175
|
+
function decorate(decorators, target, propertyKey, attributes) {
|
|
231176
|
+
if (!IsUndefined(propertyKey)) {
|
|
231177
|
+
if (!IsArray(decorators))
|
|
231178
|
+
throw new TypeError();
|
|
231179
|
+
if (!IsObject(target))
|
|
231180
|
+
throw new TypeError();
|
|
231181
|
+
if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes))
|
|
231182
|
+
throw new TypeError();
|
|
231183
|
+
if (IsNull(attributes))
|
|
231184
|
+
attributes = undefined;
|
|
231185
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
231186
|
+
return DecorateProperty(decorators, target, propertyKey, attributes);
|
|
231187
|
+
}
|
|
231188
|
+
else {
|
|
231189
|
+
if (!IsArray(decorators))
|
|
231190
|
+
throw new TypeError();
|
|
231191
|
+
if (!IsConstructor(target))
|
|
231192
|
+
throw new TypeError();
|
|
231193
|
+
return DecorateConstructor(decorators, target);
|
|
231194
|
+
}
|
|
231195
|
+
}
|
|
231196
|
+
exporter("decorate", decorate);
|
|
231197
|
+
// 4.1.2 Reflect.metadata(metadataKey, metadataValue)
|
|
231198
|
+
// https://rbuckton.github.io/reflect-metadata/#reflect.metadata
|
|
231199
|
+
/**
|
|
231200
|
+
* A default metadata decorator factory that can be used on a class, class member, or parameter.
|
|
231201
|
+
* @param metadataKey The key for the metadata entry.
|
|
231202
|
+
* @param metadataValue The value for the metadata entry.
|
|
231203
|
+
* @returns A decorator function.
|
|
231204
|
+
* @remarks
|
|
231205
|
+
* If `metadataKey` is already defined for the target and target key, the
|
|
231206
|
+
* metadataValue for that key will be overwritten.
|
|
231207
|
+
* @example
|
|
231208
|
+
*
|
|
231209
|
+
* // constructor
|
|
231210
|
+
* @Reflect.metadata(key, value)
|
|
231211
|
+
* class Example {
|
|
231212
|
+
* }
|
|
231213
|
+
*
|
|
231214
|
+
* // property (on constructor, TypeScript only)
|
|
231215
|
+
* class Example {
|
|
231216
|
+
* @Reflect.metadata(key, value)
|
|
231217
|
+
* static staticProperty;
|
|
231218
|
+
* }
|
|
231219
|
+
*
|
|
231220
|
+
* // property (on prototype, TypeScript only)
|
|
231221
|
+
* class Example {
|
|
231222
|
+
* @Reflect.metadata(key, value)
|
|
231223
|
+
* property;
|
|
231224
|
+
* }
|
|
231225
|
+
*
|
|
231226
|
+
* // method (on constructor)
|
|
231227
|
+
* class Example {
|
|
231228
|
+
* @Reflect.metadata(key, value)
|
|
231229
|
+
* static staticMethod() { }
|
|
231230
|
+
* }
|
|
231231
|
+
*
|
|
231232
|
+
* // method (on prototype)
|
|
231233
|
+
* class Example {
|
|
231234
|
+
* @Reflect.metadata(key, value)
|
|
231235
|
+
* method() { }
|
|
231236
|
+
* }
|
|
231237
|
+
*
|
|
231238
|
+
*/
|
|
231239
|
+
function metadata(metadataKey, metadataValue) {
|
|
231240
|
+
function decorator(target, propertyKey) {
|
|
231241
|
+
if (!IsObject(target))
|
|
231242
|
+
throw new TypeError();
|
|
231243
|
+
if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey))
|
|
231244
|
+
throw new TypeError();
|
|
231245
|
+
OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
231246
|
+
}
|
|
231247
|
+
return decorator;
|
|
231248
|
+
}
|
|
231249
|
+
exporter("metadata", metadata);
|
|
231250
|
+
/**
|
|
231251
|
+
* Define a unique metadata entry on the target.
|
|
231252
|
+
* @param metadataKey A key used to store and retrieve metadata.
|
|
231253
|
+
* @param metadataValue A value that contains attached metadata.
|
|
231254
|
+
* @param target The target object on which to define metadata.
|
|
231255
|
+
* @param propertyKey (Optional) The property key for the target.
|
|
231256
|
+
* @example
|
|
231257
|
+
*
|
|
231258
|
+
* class Example {
|
|
231259
|
+
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
231260
|
+
* // static staticProperty;
|
|
231261
|
+
* // property;
|
|
231262
|
+
*
|
|
231263
|
+
* constructor(p) { }
|
|
231264
|
+
* static staticMethod(p) { }
|
|
231265
|
+
* method(p) { }
|
|
231266
|
+
* }
|
|
231267
|
+
*
|
|
231268
|
+
* // constructor
|
|
231269
|
+
* Reflect.defineMetadata("custom:annotation", options, Example);
|
|
231270
|
+
*
|
|
231271
|
+
* // property (on constructor)
|
|
231272
|
+
* Reflect.defineMetadata("custom:annotation", options, Example, "staticProperty");
|
|
231273
|
+
*
|
|
231274
|
+
* // property (on prototype)
|
|
231275
|
+
* Reflect.defineMetadata("custom:annotation", options, Example.prototype, "property");
|
|
231276
|
+
*
|
|
231277
|
+
* // method (on constructor)
|
|
231278
|
+
* Reflect.defineMetadata("custom:annotation", options, Example, "staticMethod");
|
|
231279
|
+
*
|
|
231280
|
+
* // method (on prototype)
|
|
231281
|
+
* Reflect.defineMetadata("custom:annotation", options, Example.prototype, "method");
|
|
231282
|
+
*
|
|
231283
|
+
* // decorator factory as metadata-producing annotation.
|
|
231284
|
+
* function MyAnnotation(options): Decorator {
|
|
231285
|
+
* return (target, key?) => Reflect.defineMetadata("custom:annotation", options, target, key);
|
|
231286
|
+
* }
|
|
231287
|
+
*
|
|
231288
|
+
*/
|
|
231289
|
+
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
231290
|
+
if (!IsObject(target))
|
|
231291
|
+
throw new TypeError();
|
|
231292
|
+
if (!IsUndefined(propertyKey))
|
|
231293
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
231294
|
+
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
231295
|
+
}
|
|
231296
|
+
exporter("defineMetadata", defineMetadata);
|
|
231297
|
+
/**
|
|
231298
|
+
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
|
|
231299
|
+
* @param metadataKey A key used to store and retrieve metadata.
|
|
231300
|
+
* @param target The target object on which the metadata is defined.
|
|
231301
|
+
* @param propertyKey (Optional) The property key for the target.
|
|
231302
|
+
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
|
|
231303
|
+
* @example
|
|
231304
|
+
*
|
|
231305
|
+
* class Example {
|
|
231306
|
+
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
231307
|
+
* // static staticProperty;
|
|
231308
|
+
* // property;
|
|
231309
|
+
*
|
|
231310
|
+
* constructor(p) { }
|
|
231311
|
+
* static staticMethod(p) { }
|
|
231312
|
+
* method(p) { }
|
|
231313
|
+
* }
|
|
231314
|
+
*
|
|
231315
|
+
* // constructor
|
|
231316
|
+
* result = Reflect.hasMetadata("custom:annotation", Example);
|
|
231317
|
+
*
|
|
231318
|
+
* // property (on constructor)
|
|
231319
|
+
* result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty");
|
|
231320
|
+
*
|
|
231321
|
+
* // property (on prototype)
|
|
231322
|
+
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property");
|
|
231323
|
+
*
|
|
231324
|
+
* // method (on constructor)
|
|
231325
|
+
* result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod");
|
|
231326
|
+
*
|
|
231327
|
+
* // method (on prototype)
|
|
231328
|
+
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method");
|
|
231329
|
+
*
|
|
231330
|
+
*/
|
|
231331
|
+
function hasMetadata(metadataKey, target, propertyKey) {
|
|
231332
|
+
if (!IsObject(target))
|
|
231333
|
+
throw new TypeError();
|
|
231334
|
+
if (!IsUndefined(propertyKey))
|
|
231335
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
231336
|
+
return OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
231337
|
+
}
|
|
231338
|
+
exporter("hasMetadata", hasMetadata);
|
|
231339
|
+
/**
|
|
231340
|
+
* Gets a value indicating whether the target object has the provided metadata key defined.
|
|
231341
|
+
* @param metadataKey A key used to store and retrieve metadata.
|
|
231342
|
+
* @param target The target object on which the metadata is defined.
|
|
231343
|
+
* @param propertyKey (Optional) The property key for the target.
|
|
231344
|
+
* @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
|
|
231345
|
+
* @example
|
|
231346
|
+
*
|
|
231347
|
+
* class Example {
|
|
231348
|
+
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
231349
|
+
* // static staticProperty;
|
|
231350
|
+
* // property;
|
|
231351
|
+
*
|
|
231352
|
+
* constructor(p) { }
|
|
231353
|
+
* static staticMethod(p) { }
|
|
231354
|
+
* method(p) { }
|
|
231355
|
+
* }
|
|
231356
|
+
*
|
|
231357
|
+
* // constructor
|
|
231358
|
+
* result = Reflect.hasOwnMetadata("custom:annotation", Example);
|
|
231359
|
+
*
|
|
231360
|
+
* // property (on constructor)
|
|
231361
|
+
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty");
|
|
231362
|
+
*
|
|
231363
|
+
* // property (on prototype)
|
|
231364
|
+
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property");
|
|
231365
|
+
*
|
|
231366
|
+
* // method (on constructor)
|
|
231367
|
+
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod");
|
|
231368
|
+
*
|
|
231369
|
+
* // method (on prototype)
|
|
231370
|
+
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method");
|
|
231371
|
+
*
|
|
231372
|
+
*/
|
|
231373
|
+
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
231374
|
+
if (!IsObject(target))
|
|
231375
|
+
throw new TypeError();
|
|
231376
|
+
if (!IsUndefined(propertyKey))
|
|
231377
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
231378
|
+
return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
231379
|
+
}
|
|
231380
|
+
exporter("hasOwnMetadata", hasOwnMetadata);
|
|
231381
|
+
/**
|
|
231382
|
+
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
|
|
231383
|
+
* @param metadataKey A key used to store and retrieve metadata.
|
|
231384
|
+
* @param target The target object on which the metadata is defined.
|
|
231385
|
+
* @param propertyKey (Optional) The property key for the target.
|
|
231386
|
+
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
231387
|
+
* @example
|
|
231388
|
+
*
|
|
231389
|
+
* class Example {
|
|
231390
|
+
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
231391
|
+
* // static staticProperty;
|
|
231392
|
+
* // property;
|
|
231393
|
+
*
|
|
231394
|
+
* constructor(p) { }
|
|
231395
|
+
* static staticMethod(p) { }
|
|
231396
|
+
* method(p) { }
|
|
231397
|
+
* }
|
|
231398
|
+
*
|
|
231399
|
+
* // constructor
|
|
231400
|
+
* result = Reflect.getMetadata("custom:annotation", Example);
|
|
231401
|
+
*
|
|
231402
|
+
* // property (on constructor)
|
|
231403
|
+
* result = Reflect.getMetadata("custom:annotation", Example, "staticProperty");
|
|
231404
|
+
*
|
|
231405
|
+
* // property (on prototype)
|
|
231406
|
+
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "property");
|
|
231407
|
+
*
|
|
231408
|
+
* // method (on constructor)
|
|
231409
|
+
* result = Reflect.getMetadata("custom:annotation", Example, "staticMethod");
|
|
231410
|
+
*
|
|
231411
|
+
* // method (on prototype)
|
|
231412
|
+
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "method");
|
|
231413
|
+
*
|
|
231414
|
+
*/
|
|
231415
|
+
function getMetadata(metadataKey, target, propertyKey) {
|
|
231416
|
+
if (!IsObject(target))
|
|
231417
|
+
throw new TypeError();
|
|
231418
|
+
if (!IsUndefined(propertyKey))
|
|
231419
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
231420
|
+
return OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
231421
|
+
}
|
|
231422
|
+
exporter("getMetadata", getMetadata);
|
|
231423
|
+
/**
|
|
231424
|
+
* Gets the metadata value for the provided metadata key on the target object.
|
|
231425
|
+
* @param metadataKey A key used to store and retrieve metadata.
|
|
231426
|
+
* @param target The target object on which the metadata is defined.
|
|
231427
|
+
* @param propertyKey (Optional) The property key for the target.
|
|
231428
|
+
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
231429
|
+
* @example
|
|
231430
|
+
*
|
|
231431
|
+
* class Example {
|
|
231432
|
+
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
231433
|
+
* // static staticProperty;
|
|
231434
|
+
* // property;
|
|
231435
|
+
*
|
|
231436
|
+
* constructor(p) { }
|
|
231437
|
+
* static staticMethod(p) { }
|
|
231438
|
+
* method(p) { }
|
|
231439
|
+
* }
|
|
231440
|
+
*
|
|
231441
|
+
* // constructor
|
|
231442
|
+
* result = Reflect.getOwnMetadata("custom:annotation", Example);
|
|
231443
|
+
*
|
|
231444
|
+
* // property (on constructor)
|
|
231445
|
+
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty");
|
|
231446
|
+
*
|
|
231447
|
+
* // property (on prototype)
|
|
231448
|
+
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property");
|
|
231449
|
+
*
|
|
231450
|
+
* // method (on constructor)
|
|
231451
|
+
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod");
|
|
231452
|
+
*
|
|
231453
|
+
* // method (on prototype)
|
|
231454
|
+
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method");
|
|
231455
|
+
*
|
|
231456
|
+
*/
|
|
231457
|
+
function getOwnMetadata(metadataKey, target, propertyKey) {
|
|
231458
|
+
if (!IsObject(target))
|
|
231459
|
+
throw new TypeError();
|
|
231460
|
+
if (!IsUndefined(propertyKey))
|
|
231461
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
231462
|
+
return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
|
|
231463
|
+
}
|
|
231464
|
+
exporter("getOwnMetadata", getOwnMetadata);
|
|
231465
|
+
/**
|
|
231466
|
+
* Gets the metadata keys defined on the target object or its prototype chain.
|
|
231467
|
+
* @param target The target object on which the metadata is defined.
|
|
231468
|
+
* @param propertyKey (Optional) The property key for the target.
|
|
231469
|
+
* @returns An array of unique metadata keys.
|
|
231470
|
+
* @example
|
|
231471
|
+
*
|
|
231472
|
+
* class Example {
|
|
231473
|
+
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
231474
|
+
* // static staticProperty;
|
|
231475
|
+
* // property;
|
|
231476
|
+
*
|
|
231477
|
+
* constructor(p) { }
|
|
231478
|
+
* static staticMethod(p) { }
|
|
231479
|
+
* method(p) { }
|
|
231480
|
+
* }
|
|
231481
|
+
*
|
|
231482
|
+
* // constructor
|
|
231483
|
+
* result = Reflect.getMetadataKeys(Example);
|
|
231484
|
+
*
|
|
231485
|
+
* // property (on constructor)
|
|
231486
|
+
* result = Reflect.getMetadataKeys(Example, "staticProperty");
|
|
231487
|
+
*
|
|
231488
|
+
* // property (on prototype)
|
|
231489
|
+
* result = Reflect.getMetadataKeys(Example.prototype, "property");
|
|
231490
|
+
*
|
|
231491
|
+
* // method (on constructor)
|
|
231492
|
+
* result = Reflect.getMetadataKeys(Example, "staticMethod");
|
|
231493
|
+
*
|
|
231494
|
+
* // method (on prototype)
|
|
231495
|
+
* result = Reflect.getMetadataKeys(Example.prototype, "method");
|
|
231496
|
+
*
|
|
231497
|
+
*/
|
|
231498
|
+
function getMetadataKeys(target, propertyKey) {
|
|
231499
|
+
if (!IsObject(target))
|
|
231500
|
+
throw new TypeError();
|
|
231501
|
+
if (!IsUndefined(propertyKey))
|
|
231502
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
231503
|
+
return OrdinaryMetadataKeys(target, propertyKey);
|
|
231504
|
+
}
|
|
231505
|
+
exporter("getMetadataKeys", getMetadataKeys);
|
|
231506
|
+
/**
|
|
231507
|
+
* Gets the unique metadata keys defined on the target object.
|
|
231508
|
+
* @param target The target object on which the metadata is defined.
|
|
231509
|
+
* @param propertyKey (Optional) The property key for the target.
|
|
231510
|
+
* @returns An array of unique metadata keys.
|
|
231511
|
+
* @example
|
|
231512
|
+
*
|
|
231513
|
+
* class Example {
|
|
231514
|
+
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
231515
|
+
* // static staticProperty;
|
|
231516
|
+
* // property;
|
|
231517
|
+
*
|
|
231518
|
+
* constructor(p) { }
|
|
231519
|
+
* static staticMethod(p) { }
|
|
231520
|
+
* method(p) { }
|
|
231521
|
+
* }
|
|
231522
|
+
*
|
|
231523
|
+
* // constructor
|
|
231524
|
+
* result = Reflect.getOwnMetadataKeys(Example);
|
|
231525
|
+
*
|
|
231526
|
+
* // property (on constructor)
|
|
231527
|
+
* result = Reflect.getOwnMetadataKeys(Example, "staticProperty");
|
|
231528
|
+
*
|
|
231529
|
+
* // property (on prototype)
|
|
231530
|
+
* result = Reflect.getOwnMetadataKeys(Example.prototype, "property");
|
|
231531
|
+
*
|
|
231532
|
+
* // method (on constructor)
|
|
231533
|
+
* result = Reflect.getOwnMetadataKeys(Example, "staticMethod");
|
|
231534
|
+
*
|
|
231535
|
+
* // method (on prototype)
|
|
231536
|
+
* result = Reflect.getOwnMetadataKeys(Example.prototype, "method");
|
|
231537
|
+
*
|
|
231538
|
+
*/
|
|
231539
|
+
function getOwnMetadataKeys(target, propertyKey) {
|
|
231540
|
+
if (!IsObject(target))
|
|
231541
|
+
throw new TypeError();
|
|
231542
|
+
if (!IsUndefined(propertyKey))
|
|
231543
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
231544
|
+
return OrdinaryOwnMetadataKeys(target, propertyKey);
|
|
231545
|
+
}
|
|
231546
|
+
exporter("getOwnMetadataKeys", getOwnMetadataKeys);
|
|
231547
|
+
/**
|
|
231548
|
+
* Deletes the metadata entry from the target object with the provided key.
|
|
231549
|
+
* @param metadataKey A key used to store and retrieve metadata.
|
|
231550
|
+
* @param target The target object on which the metadata is defined.
|
|
231551
|
+
* @param propertyKey (Optional) The property key for the target.
|
|
231552
|
+
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
|
|
231553
|
+
* @example
|
|
231554
|
+
*
|
|
231555
|
+
* class Example {
|
|
231556
|
+
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
231557
|
+
* // static staticProperty;
|
|
231558
|
+
* // property;
|
|
231559
|
+
*
|
|
231560
|
+
* constructor(p) { }
|
|
231561
|
+
* static staticMethod(p) { }
|
|
231562
|
+
* method(p) { }
|
|
231563
|
+
* }
|
|
231564
|
+
*
|
|
231565
|
+
* // constructor
|
|
231566
|
+
* result = Reflect.deleteMetadata("custom:annotation", Example);
|
|
231567
|
+
*
|
|
231568
|
+
* // property (on constructor)
|
|
231569
|
+
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty");
|
|
231570
|
+
*
|
|
231571
|
+
* // property (on prototype)
|
|
231572
|
+
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property");
|
|
231573
|
+
*
|
|
231574
|
+
* // method (on constructor)
|
|
231575
|
+
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod");
|
|
231576
|
+
*
|
|
231577
|
+
* // method (on prototype)
|
|
231578
|
+
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method");
|
|
231579
|
+
*
|
|
231580
|
+
*/
|
|
231581
|
+
function deleteMetadata(metadataKey, target, propertyKey) {
|
|
231582
|
+
if (!IsObject(target))
|
|
231583
|
+
throw new TypeError();
|
|
231584
|
+
if (!IsUndefined(propertyKey))
|
|
231585
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
231586
|
+
if (!IsObject(target))
|
|
231587
|
+
throw new TypeError();
|
|
231588
|
+
if (!IsUndefined(propertyKey))
|
|
231589
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
231590
|
+
var provider = GetMetadataProvider(target, propertyKey, /*Create*/ false);
|
|
231591
|
+
if (IsUndefined(provider))
|
|
231592
|
+
return false;
|
|
231593
|
+
return provider.OrdinaryDeleteMetadata(metadataKey, target, propertyKey);
|
|
231594
|
+
}
|
|
231595
|
+
exporter("deleteMetadata", deleteMetadata);
|
|
231596
|
+
function DecorateConstructor(decorators, target) {
|
|
231597
|
+
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
231598
|
+
var decorator = decorators[i];
|
|
231599
|
+
var decorated = decorator(target);
|
|
231600
|
+
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
231601
|
+
if (!IsConstructor(decorated))
|
|
231602
|
+
throw new TypeError();
|
|
231603
|
+
target = decorated;
|
|
231604
|
+
}
|
|
231605
|
+
}
|
|
231606
|
+
return target;
|
|
231607
|
+
}
|
|
231608
|
+
function DecorateProperty(decorators, target, propertyKey, descriptor) {
|
|
231609
|
+
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
231610
|
+
var decorator = decorators[i];
|
|
231611
|
+
var decorated = decorator(target, propertyKey, descriptor);
|
|
231612
|
+
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
231613
|
+
if (!IsObject(decorated))
|
|
231614
|
+
throw new TypeError();
|
|
231615
|
+
descriptor = decorated;
|
|
231616
|
+
}
|
|
231617
|
+
}
|
|
231618
|
+
return descriptor;
|
|
231619
|
+
}
|
|
231620
|
+
// 3.1.1.1 OrdinaryHasMetadata(MetadataKey, O, P)
|
|
231621
|
+
// https://rbuckton.github.io/reflect-metadata/#ordinaryhasmetadata
|
|
231622
|
+
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
231623
|
+
var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
231624
|
+
if (hasOwn)
|
|
231625
|
+
return true;
|
|
231626
|
+
var parent = OrdinaryGetPrototypeOf(O);
|
|
231627
|
+
if (!IsNull(parent))
|
|
231628
|
+
return OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
231629
|
+
return false;
|
|
231630
|
+
}
|
|
231631
|
+
// 3.1.2.1 OrdinaryHasOwnMetadata(MetadataKey, O, P)
|
|
231632
|
+
// https://rbuckton.github.io/reflect-metadata/#ordinaryhasownmetadata
|
|
231633
|
+
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
231634
|
+
var provider = GetMetadataProvider(O, P, /*Create*/ false);
|
|
231635
|
+
if (IsUndefined(provider))
|
|
231636
|
+
return false;
|
|
231637
|
+
return ToBoolean(provider.OrdinaryHasOwnMetadata(MetadataKey, O, P));
|
|
231638
|
+
}
|
|
231639
|
+
// 3.1.3.1 OrdinaryGetMetadata(MetadataKey, O, P)
|
|
231640
|
+
// https://rbuckton.github.io/reflect-metadata/#ordinarygetmetadata
|
|
231641
|
+
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
231642
|
+
var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
231643
|
+
if (hasOwn)
|
|
231644
|
+
return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
231645
|
+
var parent = OrdinaryGetPrototypeOf(O);
|
|
231646
|
+
if (!IsNull(parent))
|
|
231647
|
+
return OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
231648
|
+
return undefined;
|
|
231649
|
+
}
|
|
231650
|
+
// 3.1.4.1 OrdinaryGetOwnMetadata(MetadataKey, O, P)
|
|
231651
|
+
// https://rbuckton.github.io/reflect-metadata/#ordinarygetownmetadata
|
|
231652
|
+
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
231653
|
+
var provider = GetMetadataProvider(O, P, /*Create*/ false);
|
|
231654
|
+
if (IsUndefined(provider))
|
|
231655
|
+
return;
|
|
231656
|
+
return provider.OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
231657
|
+
}
|
|
231658
|
+
// 3.1.5.1 OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P)
|
|
231659
|
+
// https://rbuckton.github.io/reflect-metadata/#ordinarydefineownmetadata
|
|
231660
|
+
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
231661
|
+
var provider = GetMetadataProvider(O, P, /*Create*/ true);
|
|
231662
|
+
provider.OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P);
|
|
231663
|
+
}
|
|
231664
|
+
// 3.1.6.1 OrdinaryMetadataKeys(O, P)
|
|
231665
|
+
// https://rbuckton.github.io/reflect-metadata/#ordinarymetadatakeys
|
|
231666
|
+
function OrdinaryMetadataKeys(O, P) {
|
|
231667
|
+
var ownKeys = OrdinaryOwnMetadataKeys(O, P);
|
|
231668
|
+
var parent = OrdinaryGetPrototypeOf(O);
|
|
231669
|
+
if (parent === null)
|
|
231670
|
+
return ownKeys;
|
|
231671
|
+
var parentKeys = OrdinaryMetadataKeys(parent, P);
|
|
231672
|
+
if (parentKeys.length <= 0)
|
|
231673
|
+
return ownKeys;
|
|
231674
|
+
if (ownKeys.length <= 0)
|
|
231675
|
+
return parentKeys;
|
|
231676
|
+
var set = new _Set();
|
|
231677
|
+
var keys = [];
|
|
231678
|
+
for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {
|
|
231679
|
+
var key = ownKeys_1[_i];
|
|
231680
|
+
var hasKey = set.has(key);
|
|
231681
|
+
if (!hasKey) {
|
|
231682
|
+
set.add(key);
|
|
231683
|
+
keys.push(key);
|
|
231684
|
+
}
|
|
231685
|
+
}
|
|
231686
|
+
for (var _a = 0, parentKeys_1 = parentKeys; _a < parentKeys_1.length; _a++) {
|
|
231687
|
+
var key = parentKeys_1[_a];
|
|
231688
|
+
var hasKey = set.has(key);
|
|
231689
|
+
if (!hasKey) {
|
|
231690
|
+
set.add(key);
|
|
231691
|
+
keys.push(key);
|
|
231692
|
+
}
|
|
231693
|
+
}
|
|
231694
|
+
return keys;
|
|
231695
|
+
}
|
|
231696
|
+
// 3.1.7.1 OrdinaryOwnMetadataKeys(O, P)
|
|
231697
|
+
// https://rbuckton.github.io/reflect-metadata/#ordinaryownmetadatakeys
|
|
231698
|
+
function OrdinaryOwnMetadataKeys(O, P) {
|
|
231699
|
+
var provider = GetMetadataProvider(O, P, /*create*/ false);
|
|
231700
|
+
if (!provider) {
|
|
231701
|
+
return [];
|
|
231702
|
+
}
|
|
231703
|
+
return provider.OrdinaryOwnMetadataKeys(O, P);
|
|
231704
|
+
}
|
|
231705
|
+
// 6 ECMAScript Data Types and Values
|
|
231706
|
+
// https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values
|
|
231707
|
+
function Type(x) {
|
|
231708
|
+
if (x === null)
|
|
231709
|
+
return 1 /* Null */;
|
|
231710
|
+
switch (typeof x) {
|
|
231711
|
+
case "undefined": return 0 /* Undefined */;
|
|
231712
|
+
case "boolean": return 2 /* Boolean */;
|
|
231713
|
+
case "string": return 3 /* String */;
|
|
231714
|
+
case "symbol": return 4 /* Symbol */;
|
|
231715
|
+
case "number": return 5 /* Number */;
|
|
231716
|
+
case "object": return x === null ? 1 /* Null */ : 6 /* Object */;
|
|
231717
|
+
default: return 6 /* Object */;
|
|
231718
|
+
}
|
|
231719
|
+
}
|
|
231720
|
+
// 6.1.1 The Undefined Type
|
|
231721
|
+
// https://tc39.github.io/ecma262/#sec-ecmascript-language-types-undefined-type
|
|
231722
|
+
function IsUndefined(x) {
|
|
231723
|
+
return x === undefined;
|
|
231724
|
+
}
|
|
231725
|
+
// 6.1.2 The Null Type
|
|
231726
|
+
// https://tc39.github.io/ecma262/#sec-ecmascript-language-types-null-type
|
|
231727
|
+
function IsNull(x) {
|
|
231728
|
+
return x === null;
|
|
231729
|
+
}
|
|
231730
|
+
// 6.1.5 The Symbol Type
|
|
231731
|
+
// https://tc39.github.io/ecma262/#sec-ecmascript-language-types-symbol-type
|
|
231732
|
+
function IsSymbol(x) {
|
|
231733
|
+
return typeof x === "symbol";
|
|
231734
|
+
}
|
|
231735
|
+
// 6.1.7 The Object Type
|
|
231736
|
+
// https://tc39.github.io/ecma262/#sec-object-type
|
|
231737
|
+
function IsObject(x) {
|
|
231738
|
+
return typeof x === "object" ? x !== null : typeof x === "function";
|
|
231739
|
+
}
|
|
231740
|
+
// 7.1 Type Conversion
|
|
231741
|
+
// https://tc39.github.io/ecma262/#sec-type-conversion
|
|
231742
|
+
// 7.1.1 ToPrimitive(input [, PreferredType])
|
|
231743
|
+
// https://tc39.github.io/ecma262/#sec-toprimitive
|
|
231744
|
+
function ToPrimitive(input, PreferredType) {
|
|
231745
|
+
switch (Type(input)) {
|
|
231746
|
+
case 0 /* Undefined */: return input;
|
|
231747
|
+
case 1 /* Null */: return input;
|
|
231748
|
+
case 2 /* Boolean */: return input;
|
|
231749
|
+
case 3 /* String */: return input;
|
|
231750
|
+
case 4 /* Symbol */: return input;
|
|
231751
|
+
case 5 /* Number */: return input;
|
|
231752
|
+
}
|
|
231753
|
+
var hint = PreferredType === 3 /* String */ ? "string" : PreferredType === 5 /* Number */ ? "number" : "default";
|
|
231754
|
+
var exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
231755
|
+
if (exoticToPrim !== undefined) {
|
|
231756
|
+
var result = exoticToPrim.call(input, hint);
|
|
231757
|
+
if (IsObject(result))
|
|
231758
|
+
throw new TypeError();
|
|
231759
|
+
return result;
|
|
231760
|
+
}
|
|
231761
|
+
return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
|
|
231762
|
+
}
|
|
231763
|
+
// 7.1.1.1 OrdinaryToPrimitive(O, hint)
|
|
231764
|
+
// https://tc39.github.io/ecma262/#sec-ordinarytoprimitive
|
|
231765
|
+
function OrdinaryToPrimitive(O, hint) {
|
|
231766
|
+
if (hint === "string") {
|
|
231767
|
+
var toString_1 = O.toString;
|
|
231768
|
+
if (IsCallable(toString_1)) {
|
|
231769
|
+
var result = toString_1.call(O);
|
|
231770
|
+
if (!IsObject(result))
|
|
231771
|
+
return result;
|
|
231772
|
+
}
|
|
231773
|
+
var valueOf = O.valueOf;
|
|
231774
|
+
if (IsCallable(valueOf)) {
|
|
231775
|
+
var result = valueOf.call(O);
|
|
231776
|
+
if (!IsObject(result))
|
|
231777
|
+
return result;
|
|
231778
|
+
}
|
|
231779
|
+
}
|
|
231780
|
+
else {
|
|
231781
|
+
var valueOf = O.valueOf;
|
|
231782
|
+
if (IsCallable(valueOf)) {
|
|
231783
|
+
var result = valueOf.call(O);
|
|
231784
|
+
if (!IsObject(result))
|
|
231785
|
+
return result;
|
|
231786
|
+
}
|
|
231787
|
+
var toString_2 = O.toString;
|
|
231788
|
+
if (IsCallable(toString_2)) {
|
|
231789
|
+
var result = toString_2.call(O);
|
|
231790
|
+
if (!IsObject(result))
|
|
231791
|
+
return result;
|
|
231792
|
+
}
|
|
231793
|
+
}
|
|
231794
|
+
throw new TypeError();
|
|
231795
|
+
}
|
|
231796
|
+
// 7.1.2 ToBoolean(argument)
|
|
231797
|
+
// https://tc39.github.io/ecma262/2016/#sec-toboolean
|
|
231798
|
+
function ToBoolean(argument) {
|
|
231799
|
+
return !!argument;
|
|
231800
|
+
}
|
|
231801
|
+
// 7.1.12 ToString(argument)
|
|
231802
|
+
// https://tc39.github.io/ecma262/#sec-tostring
|
|
231803
|
+
function ToString(argument) {
|
|
231804
|
+
return "" + argument;
|
|
231805
|
+
}
|
|
231806
|
+
// 7.1.14 ToPropertyKey(argument)
|
|
231807
|
+
// https://tc39.github.io/ecma262/#sec-topropertykey
|
|
231808
|
+
function ToPropertyKey(argument) {
|
|
231809
|
+
var key = ToPrimitive(argument, 3 /* String */);
|
|
231810
|
+
if (IsSymbol(key))
|
|
231811
|
+
return key;
|
|
231812
|
+
return ToString(key);
|
|
231813
|
+
}
|
|
231814
|
+
// 7.2 Testing and Comparison Operations
|
|
231815
|
+
// https://tc39.github.io/ecma262/#sec-testing-and-comparison-operations
|
|
231816
|
+
// 7.2.2 IsArray(argument)
|
|
231817
|
+
// https://tc39.github.io/ecma262/#sec-isarray
|
|
231818
|
+
function IsArray(argument) {
|
|
231819
|
+
return Array.isArray
|
|
231820
|
+
? Array.isArray(argument)
|
|
231821
|
+
: argument instanceof Object
|
|
231822
|
+
? argument instanceof Array
|
|
231823
|
+
: Object.prototype.toString.call(argument) === "[object Array]";
|
|
231824
|
+
}
|
|
231825
|
+
// 7.2.3 IsCallable(argument)
|
|
231826
|
+
// https://tc39.github.io/ecma262/#sec-iscallable
|
|
231827
|
+
function IsCallable(argument) {
|
|
231828
|
+
// NOTE: This is an approximation as we cannot check for [[Call]] internal method.
|
|
231829
|
+
return typeof argument === "function";
|
|
231830
|
+
}
|
|
231831
|
+
// 7.2.4 IsConstructor(argument)
|
|
231832
|
+
// https://tc39.github.io/ecma262/#sec-isconstructor
|
|
231833
|
+
function IsConstructor(argument) {
|
|
231834
|
+
// NOTE: This is an approximation as we cannot check for [[Construct]] internal method.
|
|
231835
|
+
return typeof argument === "function";
|
|
231836
|
+
}
|
|
231837
|
+
// 7.2.7 IsPropertyKey(argument)
|
|
231838
|
+
// https://tc39.github.io/ecma262/#sec-ispropertykey
|
|
231839
|
+
function IsPropertyKey(argument) {
|
|
231840
|
+
switch (Type(argument)) {
|
|
231841
|
+
case 3 /* String */: return true;
|
|
231842
|
+
case 4 /* Symbol */: return true;
|
|
231843
|
+
default: return false;
|
|
231844
|
+
}
|
|
231845
|
+
}
|
|
231846
|
+
function SameValueZero(x, y) {
|
|
231847
|
+
return x === y || x !== x && y !== y;
|
|
231848
|
+
}
|
|
231849
|
+
// 7.3 Operations on Objects
|
|
231850
|
+
// https://tc39.github.io/ecma262/#sec-operations-on-objects
|
|
231851
|
+
// 7.3.9 GetMethod(V, P)
|
|
231852
|
+
// https://tc39.github.io/ecma262/#sec-getmethod
|
|
231853
|
+
function GetMethod(V, P) {
|
|
231854
|
+
var func = V[P];
|
|
231855
|
+
if (func === undefined || func === null)
|
|
231856
|
+
return undefined;
|
|
231857
|
+
if (!IsCallable(func))
|
|
231858
|
+
throw new TypeError();
|
|
231859
|
+
return func;
|
|
231860
|
+
}
|
|
231861
|
+
// 7.4 Operations on Iterator Objects
|
|
231862
|
+
// https://tc39.github.io/ecma262/#sec-operations-on-iterator-objects
|
|
231863
|
+
function GetIterator(obj) {
|
|
231864
|
+
var method = GetMethod(obj, iteratorSymbol);
|
|
231865
|
+
if (!IsCallable(method))
|
|
231866
|
+
throw new TypeError(); // from Call
|
|
231867
|
+
var iterator = method.call(obj);
|
|
231868
|
+
if (!IsObject(iterator))
|
|
231869
|
+
throw new TypeError();
|
|
231870
|
+
return iterator;
|
|
231871
|
+
}
|
|
231872
|
+
// 7.4.4 IteratorValue(iterResult)
|
|
231873
|
+
// https://tc39.github.io/ecma262/2016/#sec-iteratorvalue
|
|
231874
|
+
function IteratorValue(iterResult) {
|
|
231875
|
+
return iterResult.value;
|
|
231876
|
+
}
|
|
231877
|
+
// 7.4.5 IteratorStep(iterator)
|
|
231878
|
+
// https://tc39.github.io/ecma262/#sec-iteratorstep
|
|
231879
|
+
function IteratorStep(iterator) {
|
|
231880
|
+
var result = iterator.next();
|
|
231881
|
+
return result.done ? false : result;
|
|
231882
|
+
}
|
|
231883
|
+
// 7.4.6 IteratorClose(iterator, completion)
|
|
231884
|
+
// https://tc39.github.io/ecma262/#sec-iteratorclose
|
|
231885
|
+
function IteratorClose(iterator) {
|
|
231886
|
+
var f = iterator["return"];
|
|
231887
|
+
if (f)
|
|
231888
|
+
f.call(iterator);
|
|
231889
|
+
}
|
|
231890
|
+
// 9.1 Ordinary Object Internal Methods and Internal Slots
|
|
231891
|
+
// https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots
|
|
231892
|
+
// 9.1.1.1 OrdinaryGetPrototypeOf(O)
|
|
231893
|
+
// https://tc39.github.io/ecma262/#sec-ordinarygetprototypeof
|
|
231894
|
+
function OrdinaryGetPrototypeOf(O) {
|
|
231895
|
+
var proto = Object.getPrototypeOf(O);
|
|
231896
|
+
if (typeof O !== "function" || O === functionPrototype)
|
|
231897
|
+
return proto;
|
|
231898
|
+
// TypeScript doesn't set __proto__ in ES5, as it's non-standard.
|
|
231899
|
+
// Try to determine the superclass constructor. Compatible implementations
|
|
231900
|
+
// must either set __proto__ on a subclass constructor to the superclass constructor,
|
|
231901
|
+
// or ensure each class has a valid `constructor` property on its prototype that
|
|
231902
|
+
// points back to the constructor.
|
|
231903
|
+
// If this is not the same as Function.[[Prototype]], then this is definately inherited.
|
|
231904
|
+
// This is the case when in ES6 or when using __proto__ in a compatible browser.
|
|
231905
|
+
if (proto !== functionPrototype)
|
|
231906
|
+
return proto;
|
|
231907
|
+
// If the super prototype is Object.prototype, null, or undefined, then we cannot determine the heritage.
|
|
231908
|
+
var prototype = O.prototype;
|
|
231909
|
+
var prototypeProto = prototype && Object.getPrototypeOf(prototype);
|
|
231910
|
+
if (prototypeProto == null || prototypeProto === Object.prototype)
|
|
231911
|
+
return proto;
|
|
231912
|
+
// If the constructor was not a function, then we cannot determine the heritage.
|
|
231913
|
+
var constructor = prototypeProto.constructor;
|
|
231914
|
+
if (typeof constructor !== "function")
|
|
231915
|
+
return proto;
|
|
231916
|
+
// If we have some kind of self-reference, then we cannot determine the heritage.
|
|
231917
|
+
if (constructor === O)
|
|
231918
|
+
return proto;
|
|
231919
|
+
// we have a pretty good guess at the heritage.
|
|
231920
|
+
return constructor;
|
|
231921
|
+
}
|
|
231922
|
+
// Global metadata registry
|
|
231923
|
+
// - Allows `import "reflect-metadata"` and `import "reflect-metadata/no-conflict"` to interoperate.
|
|
231924
|
+
// - Uses isolated metadata if `Reflect` is frozen before the registry can be installed.
|
|
231925
|
+
/**
|
|
231926
|
+
* Creates a registry used to allow multiple `reflect-metadata` providers.
|
|
231927
|
+
*/
|
|
231928
|
+
function CreateMetadataRegistry() {
|
|
231929
|
+
var fallback;
|
|
231930
|
+
if (!IsUndefined(registrySymbol) &&
|
|
231931
|
+
typeof root.Reflect !== "undefined" &&
|
|
231932
|
+
!(registrySymbol in root.Reflect) &&
|
|
231933
|
+
typeof root.Reflect.defineMetadata === "function") {
|
|
231934
|
+
// interoperate with older version of `reflect-metadata` that did not support a registry.
|
|
231935
|
+
fallback = CreateFallbackProvider(root.Reflect);
|
|
231936
|
+
}
|
|
231937
|
+
var first;
|
|
231938
|
+
var second;
|
|
231939
|
+
var rest;
|
|
231940
|
+
var targetProviderMap = new _WeakMap();
|
|
231941
|
+
var registry = {
|
|
231942
|
+
registerProvider: registerProvider,
|
|
231943
|
+
getProvider: getProvider,
|
|
231944
|
+
setProvider: setProvider,
|
|
231945
|
+
};
|
|
231946
|
+
return registry;
|
|
231947
|
+
function registerProvider(provider) {
|
|
231948
|
+
if (!Object.isExtensible(registry)) {
|
|
231949
|
+
throw new Error("Cannot add provider to a frozen registry.");
|
|
231950
|
+
}
|
|
231951
|
+
switch (true) {
|
|
231952
|
+
case fallback === provider: break;
|
|
231953
|
+
case IsUndefined(first):
|
|
231954
|
+
first = provider;
|
|
231955
|
+
break;
|
|
231956
|
+
case first === provider: break;
|
|
231957
|
+
case IsUndefined(second):
|
|
231958
|
+
second = provider;
|
|
231959
|
+
break;
|
|
231960
|
+
case second === provider: break;
|
|
231961
|
+
default:
|
|
231962
|
+
if (rest === undefined)
|
|
231963
|
+
rest = new _Set();
|
|
231964
|
+
rest.add(provider);
|
|
231965
|
+
break;
|
|
231966
|
+
}
|
|
231967
|
+
}
|
|
231968
|
+
function getProviderNoCache(O, P) {
|
|
231969
|
+
if (!IsUndefined(first)) {
|
|
231970
|
+
if (first.isProviderFor(O, P))
|
|
231971
|
+
return first;
|
|
231972
|
+
if (!IsUndefined(second)) {
|
|
231973
|
+
if (second.isProviderFor(O, P))
|
|
231974
|
+
return first;
|
|
231975
|
+
if (!IsUndefined(rest)) {
|
|
231976
|
+
var iterator = GetIterator(rest);
|
|
231977
|
+
while (true) {
|
|
231978
|
+
var next = IteratorStep(iterator);
|
|
231979
|
+
if (!next) {
|
|
231980
|
+
return undefined;
|
|
231981
|
+
}
|
|
231982
|
+
var provider = IteratorValue(next);
|
|
231983
|
+
if (provider.isProviderFor(O, P)) {
|
|
231984
|
+
IteratorClose(iterator);
|
|
231985
|
+
return provider;
|
|
231986
|
+
}
|
|
231987
|
+
}
|
|
231988
|
+
}
|
|
231989
|
+
}
|
|
231990
|
+
}
|
|
231991
|
+
if (!IsUndefined(fallback) && fallback.isProviderFor(O, P)) {
|
|
231992
|
+
return fallback;
|
|
231993
|
+
}
|
|
231994
|
+
return undefined;
|
|
231995
|
+
}
|
|
231996
|
+
function getProvider(O, P) {
|
|
231997
|
+
var providerMap = targetProviderMap.get(O);
|
|
231998
|
+
var provider;
|
|
231999
|
+
if (!IsUndefined(providerMap)) {
|
|
232000
|
+
provider = providerMap.get(P);
|
|
232001
|
+
}
|
|
232002
|
+
if (!IsUndefined(provider)) {
|
|
232003
|
+
return provider;
|
|
232004
|
+
}
|
|
232005
|
+
provider = getProviderNoCache(O, P);
|
|
232006
|
+
if (!IsUndefined(provider)) {
|
|
232007
|
+
if (IsUndefined(providerMap)) {
|
|
232008
|
+
providerMap = new _Map();
|
|
232009
|
+
targetProviderMap.set(O, providerMap);
|
|
232010
|
+
}
|
|
232011
|
+
providerMap.set(P, provider);
|
|
232012
|
+
}
|
|
232013
|
+
return provider;
|
|
232014
|
+
}
|
|
232015
|
+
function hasProvider(provider) {
|
|
232016
|
+
if (IsUndefined(provider))
|
|
232017
|
+
throw new TypeError();
|
|
232018
|
+
return first === provider || second === provider || !IsUndefined(rest) && rest.has(provider);
|
|
232019
|
+
}
|
|
232020
|
+
function setProvider(O, P, provider) {
|
|
232021
|
+
if (!hasProvider(provider)) {
|
|
232022
|
+
throw new Error("Metadata provider not registered.");
|
|
232023
|
+
}
|
|
232024
|
+
var existingProvider = getProvider(O, P);
|
|
232025
|
+
if (existingProvider !== provider) {
|
|
232026
|
+
if (!IsUndefined(existingProvider)) {
|
|
232027
|
+
return false;
|
|
232028
|
+
}
|
|
232029
|
+
var providerMap = targetProviderMap.get(O);
|
|
232030
|
+
if (IsUndefined(providerMap)) {
|
|
232031
|
+
providerMap = new _Map();
|
|
232032
|
+
targetProviderMap.set(O, providerMap);
|
|
232033
|
+
}
|
|
232034
|
+
providerMap.set(P, provider);
|
|
232035
|
+
}
|
|
232036
|
+
return true;
|
|
232037
|
+
}
|
|
232038
|
+
}
|
|
232039
|
+
/**
|
|
232040
|
+
* Gets or creates the shared registry of metadata providers.
|
|
232041
|
+
*/
|
|
232042
|
+
function GetOrCreateMetadataRegistry() {
|
|
232043
|
+
var metadataRegistry;
|
|
232044
|
+
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) {
|
|
232045
|
+
metadataRegistry = root.Reflect[registrySymbol];
|
|
232046
|
+
}
|
|
232047
|
+
if (IsUndefined(metadataRegistry)) {
|
|
232048
|
+
metadataRegistry = CreateMetadataRegistry();
|
|
232049
|
+
}
|
|
232050
|
+
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) {
|
|
232051
|
+
Object.defineProperty(root.Reflect, registrySymbol, {
|
|
232052
|
+
enumerable: false,
|
|
232053
|
+
configurable: false,
|
|
232054
|
+
writable: false,
|
|
232055
|
+
value: metadataRegistry
|
|
232056
|
+
});
|
|
232057
|
+
}
|
|
232058
|
+
return metadataRegistry;
|
|
232059
|
+
}
|
|
232060
|
+
function CreateMetadataProvider(registry) {
|
|
232061
|
+
// [[Metadata]] internal slot
|
|
232062
|
+
// https://rbuckton.github.io/reflect-metadata/#ordinary-object-internal-methods-and-internal-slots
|
|
232063
|
+
var metadata = new _WeakMap();
|
|
232064
|
+
var provider = {
|
|
232065
|
+
isProviderFor: function (O, P) {
|
|
232066
|
+
var targetMetadata = metadata.get(O);
|
|
232067
|
+
if (IsUndefined(targetMetadata))
|
|
232068
|
+
return false;
|
|
232069
|
+
return targetMetadata.has(P);
|
|
232070
|
+
},
|
|
232071
|
+
OrdinaryDefineOwnMetadata: OrdinaryDefineOwnMetadata,
|
|
232072
|
+
OrdinaryHasOwnMetadata: OrdinaryHasOwnMetadata,
|
|
232073
|
+
OrdinaryGetOwnMetadata: OrdinaryGetOwnMetadata,
|
|
232074
|
+
OrdinaryOwnMetadataKeys: OrdinaryOwnMetadataKeys,
|
|
232075
|
+
OrdinaryDeleteMetadata: OrdinaryDeleteMetadata,
|
|
232076
|
+
};
|
|
232077
|
+
metadataRegistry.registerProvider(provider);
|
|
232078
|
+
return provider;
|
|
232079
|
+
function GetOrCreateMetadataMap(O, P, Create) {
|
|
232080
|
+
var targetMetadata = metadata.get(O);
|
|
232081
|
+
var createdTargetMetadata = false;
|
|
232082
|
+
if (IsUndefined(targetMetadata)) {
|
|
232083
|
+
if (!Create)
|
|
232084
|
+
return undefined;
|
|
232085
|
+
targetMetadata = new _Map();
|
|
232086
|
+
metadata.set(O, targetMetadata);
|
|
232087
|
+
createdTargetMetadata = true;
|
|
232088
|
+
}
|
|
232089
|
+
var metadataMap = targetMetadata.get(P);
|
|
232090
|
+
if (IsUndefined(metadataMap)) {
|
|
232091
|
+
if (!Create)
|
|
232092
|
+
return undefined;
|
|
232093
|
+
metadataMap = new _Map();
|
|
232094
|
+
targetMetadata.set(P, metadataMap);
|
|
232095
|
+
if (!registry.setProvider(O, P, provider)) {
|
|
232096
|
+
targetMetadata.delete(P);
|
|
232097
|
+
if (createdTargetMetadata) {
|
|
232098
|
+
metadata.delete(O);
|
|
232099
|
+
}
|
|
232100
|
+
throw new Error("Wrong provider for target.");
|
|
232101
|
+
}
|
|
232102
|
+
}
|
|
232103
|
+
return metadataMap;
|
|
232104
|
+
}
|
|
232105
|
+
// 3.1.2.1 OrdinaryHasOwnMetadata(MetadataKey, O, P)
|
|
232106
|
+
// https://rbuckton.github.io/reflect-metadata/#ordinaryhasownmetadata
|
|
232107
|
+
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
232108
|
+
var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);
|
|
232109
|
+
if (IsUndefined(metadataMap))
|
|
232110
|
+
return false;
|
|
232111
|
+
return ToBoolean(metadataMap.has(MetadataKey));
|
|
232112
|
+
}
|
|
232113
|
+
// 3.1.4.1 OrdinaryGetOwnMetadata(MetadataKey, O, P)
|
|
232114
|
+
// https://rbuckton.github.io/reflect-metadata/#ordinarygetownmetadata
|
|
232115
|
+
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
232116
|
+
var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);
|
|
232117
|
+
if (IsUndefined(metadataMap))
|
|
232118
|
+
return undefined;
|
|
232119
|
+
return metadataMap.get(MetadataKey);
|
|
232120
|
+
}
|
|
232121
|
+
// 3.1.5.1 OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P)
|
|
232122
|
+
// https://rbuckton.github.io/reflect-metadata/#ordinarydefineownmetadata
|
|
232123
|
+
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
232124
|
+
var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ true);
|
|
232125
|
+
metadataMap.set(MetadataKey, MetadataValue);
|
|
232126
|
+
}
|
|
232127
|
+
// 3.1.7.1 OrdinaryOwnMetadataKeys(O, P)
|
|
232128
|
+
// https://rbuckton.github.io/reflect-metadata/#ordinaryownmetadatakeys
|
|
232129
|
+
function OrdinaryOwnMetadataKeys(O, P) {
|
|
232130
|
+
var keys = [];
|
|
232131
|
+
var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);
|
|
232132
|
+
if (IsUndefined(metadataMap))
|
|
232133
|
+
return keys;
|
|
232134
|
+
var keysObj = metadataMap.keys();
|
|
232135
|
+
var iterator = GetIterator(keysObj);
|
|
232136
|
+
var k = 0;
|
|
232137
|
+
while (true) {
|
|
232138
|
+
var next = IteratorStep(iterator);
|
|
232139
|
+
if (!next) {
|
|
232140
|
+
keys.length = k;
|
|
232141
|
+
return keys;
|
|
232142
|
+
}
|
|
232143
|
+
var nextValue = IteratorValue(next);
|
|
232144
|
+
try {
|
|
232145
|
+
keys[k] = nextValue;
|
|
232146
|
+
}
|
|
232147
|
+
catch (e) {
|
|
232148
|
+
try {
|
|
232149
|
+
IteratorClose(iterator);
|
|
232150
|
+
}
|
|
232151
|
+
finally {
|
|
232152
|
+
throw e;
|
|
232153
|
+
}
|
|
232154
|
+
}
|
|
232155
|
+
k++;
|
|
232156
|
+
}
|
|
232157
|
+
}
|
|
232158
|
+
function OrdinaryDeleteMetadata(MetadataKey, O, P) {
|
|
232159
|
+
var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);
|
|
232160
|
+
if (IsUndefined(metadataMap))
|
|
232161
|
+
return false;
|
|
232162
|
+
if (!metadataMap.delete(MetadataKey))
|
|
232163
|
+
return false;
|
|
232164
|
+
if (metadataMap.size === 0) {
|
|
232165
|
+
var targetMetadata = metadata.get(O);
|
|
232166
|
+
if (!IsUndefined(targetMetadata)) {
|
|
232167
|
+
targetMetadata.delete(P);
|
|
232168
|
+
if (targetMetadata.size === 0) {
|
|
232169
|
+
metadata.delete(targetMetadata);
|
|
232170
|
+
}
|
|
232171
|
+
}
|
|
232172
|
+
}
|
|
232173
|
+
return true;
|
|
232174
|
+
}
|
|
232175
|
+
}
|
|
232176
|
+
function CreateFallbackProvider(reflect) {
|
|
232177
|
+
var defineMetadata = reflect.defineMetadata, hasOwnMetadata = reflect.hasOwnMetadata, getOwnMetadata = reflect.getOwnMetadata, getOwnMetadataKeys = reflect.getOwnMetadataKeys, deleteMetadata = reflect.deleteMetadata;
|
|
232178
|
+
var metadataOwner = new _WeakMap();
|
|
232179
|
+
var provider = {
|
|
232180
|
+
isProviderFor: function (O, P) {
|
|
232181
|
+
var metadataPropertySet = metadataOwner.get(O);
|
|
232182
|
+
if (!IsUndefined(metadataPropertySet) && metadataPropertySet.has(P)) {
|
|
232183
|
+
return true;
|
|
232184
|
+
}
|
|
232185
|
+
if (getOwnMetadataKeys(O, P).length) {
|
|
232186
|
+
if (IsUndefined(metadataPropertySet)) {
|
|
232187
|
+
metadataPropertySet = new _Set();
|
|
232188
|
+
metadataOwner.set(O, metadataPropertySet);
|
|
232189
|
+
}
|
|
232190
|
+
metadataPropertySet.add(P);
|
|
232191
|
+
return true;
|
|
232192
|
+
}
|
|
232193
|
+
return false;
|
|
232194
|
+
},
|
|
232195
|
+
OrdinaryDefineOwnMetadata: defineMetadata,
|
|
232196
|
+
OrdinaryHasOwnMetadata: hasOwnMetadata,
|
|
232197
|
+
OrdinaryGetOwnMetadata: getOwnMetadata,
|
|
232198
|
+
OrdinaryOwnMetadataKeys: getOwnMetadataKeys,
|
|
232199
|
+
OrdinaryDeleteMetadata: deleteMetadata,
|
|
232200
|
+
};
|
|
232201
|
+
return provider;
|
|
232202
|
+
}
|
|
232203
|
+
/**
|
|
232204
|
+
* Gets the metadata provider for an object. If the object has no metadata provider and this is for a create operation,
|
|
232205
|
+
* then this module's metadata provider is assigned to the object.
|
|
232206
|
+
*/
|
|
232207
|
+
function GetMetadataProvider(O, P, Create) {
|
|
232208
|
+
var registeredProvider = metadataRegistry.getProvider(O, P);
|
|
232209
|
+
if (!IsUndefined(registeredProvider)) {
|
|
232210
|
+
return registeredProvider;
|
|
232211
|
+
}
|
|
232212
|
+
if (Create) {
|
|
232213
|
+
if (metadataRegistry.setProvider(O, P, metadataProvider)) {
|
|
232214
|
+
return metadataProvider;
|
|
232215
|
+
}
|
|
232216
|
+
throw new Error("Illegal state.");
|
|
232217
|
+
}
|
|
232218
|
+
return undefined;
|
|
232219
|
+
}
|
|
232220
|
+
// naive Map shim
|
|
232221
|
+
function CreateMapPolyfill() {
|
|
232222
|
+
var cacheSentinel = {};
|
|
232223
|
+
var arraySentinel = [];
|
|
232224
|
+
var MapIterator = /** @class */ (function () {
|
|
232225
|
+
function MapIterator(keys, values, selector) {
|
|
232226
|
+
this._index = 0;
|
|
232227
|
+
this._keys = keys;
|
|
232228
|
+
this._values = values;
|
|
232229
|
+
this._selector = selector;
|
|
232230
|
+
}
|
|
232231
|
+
MapIterator.prototype["@@iterator"] = function () { return this; };
|
|
232232
|
+
MapIterator.prototype[iteratorSymbol] = function () { return this; };
|
|
232233
|
+
MapIterator.prototype.next = function () {
|
|
232234
|
+
var index = this._index;
|
|
232235
|
+
if (index >= 0 && index < this._keys.length) {
|
|
232236
|
+
var result = this._selector(this._keys[index], this._values[index]);
|
|
232237
|
+
if (index + 1 >= this._keys.length) {
|
|
232238
|
+
this._index = -1;
|
|
232239
|
+
this._keys = arraySentinel;
|
|
232240
|
+
this._values = arraySentinel;
|
|
232241
|
+
}
|
|
232242
|
+
else {
|
|
232243
|
+
this._index++;
|
|
232244
|
+
}
|
|
232245
|
+
return { value: result, done: false };
|
|
232246
|
+
}
|
|
232247
|
+
return { value: undefined, done: true };
|
|
232248
|
+
};
|
|
232249
|
+
MapIterator.prototype.throw = function (error) {
|
|
232250
|
+
if (this._index >= 0) {
|
|
232251
|
+
this._index = -1;
|
|
232252
|
+
this._keys = arraySentinel;
|
|
232253
|
+
this._values = arraySentinel;
|
|
232254
|
+
}
|
|
232255
|
+
throw error;
|
|
232256
|
+
};
|
|
232257
|
+
MapIterator.prototype.return = function (value) {
|
|
232258
|
+
if (this._index >= 0) {
|
|
232259
|
+
this._index = -1;
|
|
232260
|
+
this._keys = arraySentinel;
|
|
232261
|
+
this._values = arraySentinel;
|
|
232262
|
+
}
|
|
232263
|
+
return { value: value, done: true };
|
|
232264
|
+
};
|
|
232265
|
+
return MapIterator;
|
|
232266
|
+
}());
|
|
232267
|
+
var Map = /** @class */ (function () {
|
|
232268
|
+
function Map() {
|
|
232269
|
+
this._keys = [];
|
|
232270
|
+
this._values = [];
|
|
232271
|
+
this._cacheKey = cacheSentinel;
|
|
232272
|
+
this._cacheIndex = -2;
|
|
232273
|
+
}
|
|
232274
|
+
Object.defineProperty(Map.prototype, "size", {
|
|
232275
|
+
get: function () { return this._keys.length; },
|
|
232276
|
+
enumerable: true,
|
|
232277
|
+
configurable: true
|
|
232278
|
+
});
|
|
232279
|
+
Map.prototype.has = function (key) { return this._find(key, /*insert*/ false) >= 0; };
|
|
232280
|
+
Map.prototype.get = function (key) {
|
|
232281
|
+
var index = this._find(key, /*insert*/ false);
|
|
232282
|
+
return index >= 0 ? this._values[index] : undefined;
|
|
232283
|
+
};
|
|
232284
|
+
Map.prototype.set = function (key, value) {
|
|
232285
|
+
var index = this._find(key, /*insert*/ true);
|
|
232286
|
+
this._values[index] = value;
|
|
232287
|
+
return this;
|
|
232288
|
+
};
|
|
232289
|
+
Map.prototype.delete = function (key) {
|
|
232290
|
+
var index = this._find(key, /*insert*/ false);
|
|
232291
|
+
if (index >= 0) {
|
|
232292
|
+
var size = this._keys.length;
|
|
232293
|
+
for (var i = index + 1; i < size; i++) {
|
|
232294
|
+
this._keys[i - 1] = this._keys[i];
|
|
232295
|
+
this._values[i - 1] = this._values[i];
|
|
232296
|
+
}
|
|
232297
|
+
this._keys.length--;
|
|
232298
|
+
this._values.length--;
|
|
232299
|
+
if (SameValueZero(key, this._cacheKey)) {
|
|
232300
|
+
this._cacheKey = cacheSentinel;
|
|
232301
|
+
this._cacheIndex = -2;
|
|
232302
|
+
}
|
|
232303
|
+
return true;
|
|
232304
|
+
}
|
|
232305
|
+
return false;
|
|
232306
|
+
};
|
|
232307
|
+
Map.prototype.clear = function () {
|
|
232308
|
+
this._keys.length = 0;
|
|
232309
|
+
this._values.length = 0;
|
|
232310
|
+
this._cacheKey = cacheSentinel;
|
|
232311
|
+
this._cacheIndex = -2;
|
|
232312
|
+
};
|
|
232313
|
+
Map.prototype.keys = function () { return new MapIterator(this._keys, this._values, getKey); };
|
|
232314
|
+
Map.prototype.values = function () { return new MapIterator(this._keys, this._values, getValue); };
|
|
232315
|
+
Map.prototype.entries = function () { return new MapIterator(this._keys, this._values, getEntry); };
|
|
232316
|
+
Map.prototype["@@iterator"] = function () { return this.entries(); };
|
|
232317
|
+
Map.prototype[iteratorSymbol] = function () { return this.entries(); };
|
|
232318
|
+
Map.prototype._find = function (key, insert) {
|
|
232319
|
+
if (!SameValueZero(this._cacheKey, key)) {
|
|
232320
|
+
this._cacheIndex = -1;
|
|
232321
|
+
for (var i = 0; i < this._keys.length; i++) {
|
|
232322
|
+
if (SameValueZero(this._keys[i], key)) {
|
|
232323
|
+
this._cacheIndex = i;
|
|
232324
|
+
break;
|
|
232325
|
+
}
|
|
232326
|
+
}
|
|
232327
|
+
}
|
|
232328
|
+
if (this._cacheIndex < 0 && insert) {
|
|
232329
|
+
this._cacheIndex = this._keys.length;
|
|
232330
|
+
this._keys.push(key);
|
|
232331
|
+
this._values.push(undefined);
|
|
232332
|
+
}
|
|
232333
|
+
return this._cacheIndex;
|
|
232334
|
+
};
|
|
232335
|
+
return Map;
|
|
232336
|
+
}());
|
|
232337
|
+
return Map;
|
|
232338
|
+
function getKey(key, _) {
|
|
232339
|
+
return key;
|
|
232340
|
+
}
|
|
232341
|
+
function getValue(_, value) {
|
|
232342
|
+
return value;
|
|
232343
|
+
}
|
|
232344
|
+
function getEntry(key, value) {
|
|
232345
|
+
return [key, value];
|
|
232346
|
+
}
|
|
232347
|
+
}
|
|
232348
|
+
// naive Set shim
|
|
232349
|
+
function CreateSetPolyfill() {
|
|
232350
|
+
var Set = /** @class */ (function () {
|
|
232351
|
+
function Set() {
|
|
232352
|
+
this._map = new _Map();
|
|
232353
|
+
}
|
|
232354
|
+
Object.defineProperty(Set.prototype, "size", {
|
|
232355
|
+
get: function () { return this._map.size; },
|
|
232356
|
+
enumerable: true,
|
|
232357
|
+
configurable: true
|
|
232358
|
+
});
|
|
232359
|
+
Set.prototype.has = function (value) { return this._map.has(value); };
|
|
232360
|
+
Set.prototype.add = function (value) { return this._map.set(value, value), this; };
|
|
232361
|
+
Set.prototype.delete = function (value) { return this._map.delete(value); };
|
|
232362
|
+
Set.prototype.clear = function () { this._map.clear(); };
|
|
232363
|
+
Set.prototype.keys = function () { return this._map.keys(); };
|
|
232364
|
+
Set.prototype.values = function () { return this._map.keys(); };
|
|
232365
|
+
Set.prototype.entries = function () { return this._map.entries(); };
|
|
232366
|
+
Set.prototype["@@iterator"] = function () { return this.keys(); };
|
|
232367
|
+
Set.prototype[iteratorSymbol] = function () { return this.keys(); };
|
|
232368
|
+
return Set;
|
|
232369
|
+
}());
|
|
232370
|
+
return Set;
|
|
232371
|
+
}
|
|
232372
|
+
// naive WeakMap shim
|
|
232373
|
+
function CreateWeakMapPolyfill() {
|
|
232374
|
+
var UUID_SIZE = 16;
|
|
232375
|
+
var keys = HashMap.create();
|
|
232376
|
+
var rootKey = CreateUniqueKey();
|
|
232377
|
+
return /** @class */ (function () {
|
|
232378
|
+
function WeakMap() {
|
|
232379
|
+
this._key = CreateUniqueKey();
|
|
232380
|
+
}
|
|
232381
|
+
WeakMap.prototype.has = function (target) {
|
|
232382
|
+
var table = GetOrCreateWeakMapTable(target, /*create*/ false);
|
|
232383
|
+
return table !== undefined ? HashMap.has(table, this._key) : false;
|
|
232384
|
+
};
|
|
232385
|
+
WeakMap.prototype.get = function (target) {
|
|
232386
|
+
var table = GetOrCreateWeakMapTable(target, /*create*/ false);
|
|
232387
|
+
return table !== undefined ? HashMap.get(table, this._key) : undefined;
|
|
232388
|
+
};
|
|
232389
|
+
WeakMap.prototype.set = function (target, value) {
|
|
232390
|
+
var table = GetOrCreateWeakMapTable(target, /*create*/ true);
|
|
232391
|
+
table[this._key] = value;
|
|
232392
|
+
return this;
|
|
232393
|
+
};
|
|
232394
|
+
WeakMap.prototype.delete = function (target) {
|
|
232395
|
+
var table = GetOrCreateWeakMapTable(target, /*create*/ false);
|
|
232396
|
+
return table !== undefined ? delete table[this._key] : false;
|
|
232397
|
+
};
|
|
232398
|
+
WeakMap.prototype.clear = function () {
|
|
232399
|
+
// NOTE: not a real clear, just makes the previous data unreachable
|
|
232400
|
+
this._key = CreateUniqueKey();
|
|
232401
|
+
};
|
|
232402
|
+
return WeakMap;
|
|
232403
|
+
}());
|
|
232404
|
+
function CreateUniqueKey() {
|
|
232405
|
+
var key;
|
|
232406
|
+
do
|
|
232407
|
+
key = "@@WeakMap@@" + CreateUUID();
|
|
232408
|
+
while (HashMap.has(keys, key));
|
|
232409
|
+
keys[key] = true;
|
|
232410
|
+
return key;
|
|
232411
|
+
}
|
|
232412
|
+
function GetOrCreateWeakMapTable(target, create) {
|
|
232413
|
+
if (!hasOwn.call(target, rootKey)) {
|
|
232414
|
+
if (!create)
|
|
232415
|
+
return undefined;
|
|
232416
|
+
Object.defineProperty(target, rootKey, { value: HashMap.create() });
|
|
232417
|
+
}
|
|
232418
|
+
return target[rootKey];
|
|
232419
|
+
}
|
|
232420
|
+
function FillRandomBytes(buffer, size) {
|
|
232421
|
+
for (var i = 0; i < size; ++i)
|
|
232422
|
+
buffer[i] = Math.random() * 0xff | 0;
|
|
232423
|
+
return buffer;
|
|
232424
|
+
}
|
|
232425
|
+
function GenRandomBytes(size) {
|
|
232426
|
+
if (typeof Uint8Array === "function") {
|
|
232427
|
+
var array = new Uint8Array(size);
|
|
232428
|
+
if (typeof crypto !== "undefined") {
|
|
232429
|
+
crypto.getRandomValues(array);
|
|
232430
|
+
}
|
|
232431
|
+
else if (typeof msCrypto !== "undefined") {
|
|
232432
|
+
msCrypto.getRandomValues(array);
|
|
232433
|
+
}
|
|
232434
|
+
else {
|
|
232435
|
+
FillRandomBytes(array, size);
|
|
232436
|
+
}
|
|
232437
|
+
return array;
|
|
232438
|
+
}
|
|
232439
|
+
return FillRandomBytes(new Array(size), size);
|
|
232440
|
+
}
|
|
232441
|
+
function CreateUUID() {
|
|
232442
|
+
var data = GenRandomBytes(UUID_SIZE);
|
|
232443
|
+
// mark as random - RFC 4122 § 4.4
|
|
232444
|
+
data[6] = data[6] & 0x4f | 0x40;
|
|
232445
|
+
data[8] = data[8] & 0xbf | 0x80;
|
|
232446
|
+
var result = "";
|
|
232447
|
+
for (var offset = 0; offset < UUID_SIZE; ++offset) {
|
|
232448
|
+
var byte = data[offset];
|
|
232449
|
+
if (offset === 4 || offset === 6 || offset === 8)
|
|
232450
|
+
result += "-";
|
|
232451
|
+
if (byte < 16)
|
|
232452
|
+
result += "0";
|
|
232453
|
+
result += byte.toString(16).toLowerCase();
|
|
232454
|
+
}
|
|
232455
|
+
return result;
|
|
232456
|
+
}
|
|
232457
|
+
}
|
|
232458
|
+
// uses a heuristic used by v8 and chakra to force an object into dictionary mode.
|
|
232459
|
+
function MakeDictionary(obj) {
|
|
232460
|
+
obj.__ = undefined;
|
|
232461
|
+
delete obj.__;
|
|
232462
|
+
return obj;
|
|
232463
|
+
}
|
|
232464
|
+
});
|
|
232465
|
+
})(Reflect || (Reflect = {}));
|
|
232466
|
+
|
|
232467
|
+
|
|
232193
232468
|
/***/ }),
|
|
232194
232469
|
|
|
232195
232470
|
/***/ "./node_modules/regenerator-transform/node_modules/@babel/runtime/helpers/interopRequireDefault.js":
|
|
@@ -233661,9 +233936,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
233661
233936
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
233662
233937
|
/* harmony export */ });
|
|
233663
233938
|
/*
|
|
233664
|
-
* big.js v6.
|
|
233939
|
+
* big.js v6.2.1
|
|
233665
233940
|
* A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.
|
|
233666
|
-
* Copyright (c)
|
|
233941
|
+
* Copyright (c) 2022 Michael Mclaughlin
|
|
233667
233942
|
* https://github.com/MikeMcl/big.js/LICENCE.md
|
|
233668
233943
|
*/
|
|
233669
233944
|
|
|
@@ -233757,8 +234032,8 @@ function _Big_() {
|
|
|
233757
234032
|
x.c = n.c.slice();
|
|
233758
234033
|
} else {
|
|
233759
234034
|
if (typeof n !== 'string') {
|
|
233760
|
-
if (Big.strict === true) {
|
|
233761
|
-
throw TypeError(INVALID + '
|
|
234035
|
+
if (Big.strict === true && typeof n !== 'bigint') {
|
|
234036
|
+
throw TypeError(INVALID + 'value');
|
|
233762
234037
|
}
|
|
233763
234038
|
|
|
233764
234039
|
// Minus zero?
|
|
@@ -233889,17 +234164,18 @@ function round(x, sd, rm, more) {
|
|
|
233889
234164
|
rm === 3 && (more || !!xc[0]);
|
|
233890
234165
|
|
|
233891
234166
|
// Remove any digits after the required precision.
|
|
233892
|
-
xc.length = sd
|
|
234167
|
+
xc.length = sd;
|
|
233893
234168
|
|
|
233894
234169
|
// Round up?
|
|
233895
234170
|
if (more) {
|
|
233896
234171
|
|
|
233897
234172
|
// Rounding up may mean the previous digit has to be rounded up.
|
|
233898
|
-
for (; ++xc[sd] > 9;) {
|
|
234173
|
+
for (; ++xc[--sd] > 9;) {
|
|
233899
234174
|
xc[sd] = 0;
|
|
233900
|
-
if (
|
|
234175
|
+
if (sd === 0) {
|
|
233901
234176
|
++x.e;
|
|
233902
234177
|
xc.unshift(1);
|
|
234178
|
+
break;
|
|
233903
234179
|
}
|
|
233904
234180
|
}
|
|
233905
234181
|
}
|
|
@@ -234290,6 +234566,16 @@ P.mod = function (y) {
|
|
|
234290
234566
|
};
|
|
234291
234567
|
|
|
234292
234568
|
|
|
234569
|
+
/*
|
|
234570
|
+
* Return a new Big whose value is the value of this Big negated.
|
|
234571
|
+
*/
|
|
234572
|
+
P.neg = function () {
|
|
234573
|
+
var x = new this.constructor(this);
|
|
234574
|
+
x.s = -x.s;
|
|
234575
|
+
return x;
|
|
234576
|
+
};
|
|
234577
|
+
|
|
234578
|
+
|
|
234293
234579
|
/*
|
|
234294
234580
|
* Return a new Big whose value is the value of this Big plus the value of Big y.
|
|
234295
234581
|
*/
|
|
@@ -234608,7 +234894,7 @@ P.toFixed = function (dp, rm) {
|
|
|
234608
234894
|
* Big.PE, or a negative exponent equal to or less than Big.NE.
|
|
234609
234895
|
* Omit the sign for negative zero.
|
|
234610
234896
|
*/
|
|
234611
|
-
P.toJSON = P.toString = function () {
|
|
234897
|
+
P[Symbol.for('nodejs.util.inspect.custom')] = P.toJSON = P.toString = function () {
|
|
234612
234898
|
var x = this,
|
|
234613
234899
|
Big = x.constructor;
|
|
234614
234900
|
return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);
|