bnstooltips 1.6.5 → 1.7.2
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/build/ItemImproveTooltip/ItemImproveTooltip.d.ts +5 -0
- package/build/ItemImproveTooltip/ItemImproveTooltip.types.d.ts +11 -0
- package/build/ItemImproveTooltipWrapper/ItemImproveTooltipWrapper.d.ts +6 -0
- package/build/ItemImproveTooltipWrapper/ItemImproveTooltipWrapper.types.d.ts +11 -0
- package/build/ItemTooltip/ItemTooltip.d.ts +1 -1
- package/build/ItemTooltip/ItemTooltip.types.d.ts +1 -0
- package/build/ItemTooltip/SubComponents/DecomposeResults.d.ts +1 -0
- package/build/ItemTooltip/SubComponents/ItemIconNameDiv.d.ts +4 -1
- package/build/ItemTooltipWrapper/ItemTooltipWrapper.types.d.ts +1 -0
- package/build/TooltipWrapper/TooltipWrapper.d.ts +6 -0
- package/build/TooltipWrapper/TooltipWrapper.types.d.ts +17 -0
- package/build/Utilities/INpc.d.ts +1 -1
- package/build/Utilities/TooltipSettingsBase.d.ts +13 -0
- package/build/index.d.ts +4 -0
- package/build/index.es.js +562 -319
- package/build/index.es.js.map +1 -1
- package/build/index.js +563 -318
- package/build/index.js.map +1 -1
- package/build/itemapiclient/api.d.ts +142 -0
- package/package.json +8 -8
package/build/index.js
CHANGED
|
@@ -58,8 +58,8 @@ function styleInject(css, ref) {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
var css_248z$
|
|
62
|
-
styleInject(css_248z$
|
|
61
|
+
var css_248z$9 = "*[class*=\"00008130.UI.Label_LightYellow_12\"] {\n color: #ecd967 !important; }\n\n*[class*=\"00008130.UI.Vital_LightBlue\"] {\n color: #46bee1 !important;\n font-weight: 500 !important; }\n\n*[class*=\"00008130.UI.Label_Green03_12\"] {\n color: #58ff77 !important; }\n\n*[class*=\"00008130.Program.Fontset_Chatting_Color_19\"] {\n color: #58ff77; }\n\n.TooltipBase_grade-none {\n color: #c2cadc; }\n\n.TooltipBase_grade-1 {\n color: #6c6c6c !important; }\n\n.TooltipBase_border-grade-1 {\n border-color: #6c6c6c !important; }\n\n.TooltipBase_border-hover-grade-1:hover {\n border-color: #6c6c6c !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_1\"] {\n color: #6c6c6c !important;\n border-color: #6c6c6c !important; }\n\n.TooltipBase_grade-2 {\n color: #ffffff !important; }\n\n.TooltipBase_border-grade-2 {\n border-color: #ffffff !important; }\n\n.TooltipBase_border-hover-grade-2:hover {\n border-color: #ffffff !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_2\"] {\n color: #ffffff !important;\n border-color: #ffffff !important; }\n\n.TooltipBase_grade-3 {\n color: #58ff77 !important; }\n\n.TooltipBase_border-grade-3 {\n border-color: #58ff77 !important; }\n\n.TooltipBase_border-hover-grade-3:hover {\n border-color: #58ff77 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_3\"] {\n color: #58ff77 !important;\n border-color: #58ff77 !important; }\n\n.TooltipBase_grade-4 {\n color: #46bee1 !important; }\n\n.TooltipBase_border-grade-4 {\n border-color: #46bee1 !important; }\n\n.TooltipBase_border-hover-grade-4:hover {\n border-color: #46bee1 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_4\"] {\n color: #46bee1 !important;\n border-color: #46bee1 !important; }\n\n.TooltipBase_grade-5 {\n color: #d739ff !important; }\n\n.TooltipBase_border-grade-5 {\n border-color: #d739ff !important; }\n\n.TooltipBase_border-hover-grade-5:hover {\n border-color: #d739ff !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_5\"] {\n color: #d739ff !important;\n border-color: #d739ff !important; }\n\n.TooltipBase_grade-6 {\n color: #f1b248 !important; }\n\n.TooltipBase_border-grade-6 {\n border-color: #f1b248 !important; }\n\n.TooltipBase_border-hover-grade-6:hover {\n border-color: #f1b248 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_6\"] {\n color: #f1b248 !important;\n border-color: #f1b248 !important; }\n\n.TooltipBase_grade-7 {\n color: #ff770a !important; }\n\n.TooltipBase_border-grade-7 {\n border-color: #ff770a !important; }\n\n.TooltipBase_border-hover-grade-7:hover {\n border-color: #ff770a !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_7\"] {\n color: #ff770a !important;\n border-color: #ff770a !important; }\n\n.TooltipBase_grade-8 {\n color: #ff0084 !important; }\n\n.TooltipBase_border-grade-8 {\n border-color: #ff0084 !important; }\n\n.TooltipBase_border-hover-grade-8:hover {\n border-color: #ff0084 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_8\"] {\n color: #ff0084 !important;\n border-color: #ff0084 !important; }\n\n.TooltipBase_iconbg-grade-1 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_1.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-2 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_2.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-3 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_3.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-4 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_4.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-5 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_5.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-6 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_6.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-7 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_7.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-8 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_9.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-9 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_9.png\") no-repeat; }\n\n.TooltipBase_container {\n box-sizing: border-box;\n font-family: \"Montserrat\", sans-serif !important;\n scroll-behavior: smooth;\n touch-action: manipulation;\n -webkit-overflow-scrolling: touch;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n position: relative;\n display: inline-flex;\n flex-direction: column;\n background-color: rgba(3, 3, 3, 0.9);\n backdrop-filter: brightness(1.5) blur(5px);\n -webkit-backdrop-filter: brightness(1.5) blur(5px);\n padding: 1rem;\n border: 1px solid;\n border-color: #6c6c6c;\n font-weight: 500;\n font-size: 16px;\n text-decoration: none;\n color: #fff;\n width: 380px;\n max-height: calc(100vh - 50px);\n overflow-y: auto;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */\n border-radius: 3px;\n text-shadow: black 1px 1px 0; }\n\n.TooltipBase_containerFullHeight {\n height: 99%; }\n\n.TooltipBase_container::-webkit-scrollbar {\n display: none; }\n\n@media only screen and (max-width: 380px) {\n .TooltipBase_container {\n width: 100%; } }\n\n@supports not (backdrop-filter: brightness(1.5) blur(5px)) {\n .TooltipBase_container {\n background-color: rgba(0, 0, 0, 0.95); }\n .TooltipBase_container-loading {\n background-color: rgba(0, 0, 0, 0.95); } }\n\n.TooltipBase_container-loading {\n background-color: rgba(3, 3, 3, 0.9);\n backdrop-filter: brightness(1.5) blur(5px);\n -webkit-backdrop-filter: brightness(1.5) blur(5px);\n padding: 1rem; }\n\n.TooltipBase_titlesubtitle {\n display: flex;\n justify-content: space-between;\n margin-bottom: 1rem; }\n\n.TooltipBase_title {\n flex: 1;\n overflow: hidden;\n padding-right: 1rem; }\n\n.TooltipBase_title_text {\n font-size: 18px;\n text-shadow: black 1px 1px 0;\n font-weight: 500; }\n\n.TooltipBase_subtitle {\n text-align: end;\n font-size: 12px; }\n\n.TooltipBase_iconmaininfo {\n display: flex;\n margin-bottom: 0.8rem; }\n\n.TooltipBase_iconcontainer {\n margin-right: 0.5rem;\n margin-bottom: 0.25rem;\n float: left;\n position: relative; }\n\n.TooltipBase_iconBg {\n width: 64px;\n height: 64px;\n background-origin: content-box !important; }\n\n.TooltipBase_icon {\n width: calc(64px - (0px * 2));\n height: calc(64px - (0px * 2));\n padding: 0px; }\n\n.TooltipBase_maininfocontainer {\n font-size: 16px;\n font-weight: 500; }\n\n.TooltipBase_maininfocontainer > div:not(:last-child) {\n margin-bottom: 0.2rem; }\n\n.TooltipBase_fullwidthContainer {\n line-height: 17px; }\n\n.TooltipBase_fullwidthContainer > div:not(:last-child) {\n margin-bottom: 0.5rem; }\n\n.TooltipBase_fullwidthContainer-subContainer {\n font-size: 12px; }\n\n.TooltipBase_fullwidthContainer-subContainer > div:not(:last-child) {\n margin-bottom: 0.1rem; }\n\n.TooltipBase_flex {\n display: flex;\n align-items: center; }\n\n.TooltipBase_flex-col {\n display: flex;\n justify-content: center;\n flex-direction: column; }\n\n.TooltipBase_descriptions-description-title {\n font-weight: 500; }\n";
|
|
62
|
+
styleInject(css_248z$9);
|
|
63
63
|
|
|
64
64
|
function TooltipBase(_a) {
|
|
65
65
|
var title = _a.title, category = _a.subtitle, grade = _a.grade, _b = _a.icon, icon = _b === void 0 ? "" : _b, _c = _a.mainInfos, mainTexts = _c === void 0 ? [] : _c, _d = _a.subInfoGroups, subTexts = _d === void 0 ? [] : _d, id = _a.id, _e = _a.fullHeight, fullHeight = _e === void 0 ? false : _e;
|
|
@@ -161,8 +161,8 @@ function __generator(thisArg, body) {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
var css_248z$
|
|
165
|
-
styleInject(css_248z$
|
|
164
|
+
var css_248z$8 = ".ItemTooltip_itemIconLoading {\n width: 50px;\n padding: 0.22rem 0;\n display: flex;\n justify-content: center;\n align-items: center; }\n\n.ItemTooltip_jobstyleToggleContainer {\n display: flex; }\n\n.ItemTooltip_optionPadding {\n margin: .2rem 0 .5rem 0; }\n\n.ItemTooltip_showButton {\n flex: 1;\n border: none;\n padding: 0.33rem 0.5rem;\n border-radius: 0;\n background-color: rgba(233, 233, 233, 0.2);\n color: #fff;\n opacity: 0.8;\n cursor: pointer;\n transition: background-color 0.1s; }\n .ItemTooltip_showButton:hover {\n background-color: rgba(255, 255, 255, 0.3);\n opacity: 1; }\n .ItemTooltip_showButton-active {\n background-color: rgba(255, 255, 255, 0.4) !important;\n color: #fff;\n opacity: 1; }\n\n.ItemTooltip_jobstyleButton {\n flex: 1;\n border: none;\n padding: 0.33rem 0.5rem;\n border-radius: 0;\n background-color: rgba(233, 233, 233, 0.1);\n color: #fff;\n opacity: 0.8;\n cursor: pointer;\n transition: background-color 0.1s; }\n .ItemTooltip_jobstyleButton:hover {\n background-color: rgba(255, 255, 255, 0.2);\n opacity: 1; }\n .ItemTooltip_jobstyleButton-active {\n background-color: rgba(255, 255, 255, 0.3) !important;\n color: #fff;\n opacity: 1; }\n\n.ItemTooltip_itemiconnamedivspan {\n display: flex;\n justify-content: center;\n align-items: center; }\n\n.ItemTooltip_cooldown {\n font-weight: 400;\n font-size: 12px; }\n\n.ItemTooltip_subInfo {\n font-size: 14px; }\n\n.ItemTooltip_stats_mainstat {\n font-size: 16px;\n margin-bottom: 0.05rem; }\n\n.ItemTooltip_stats_substat {\n font-size: 14px; }\n\n.ItemTooltip_itemIconInline {\n width: 18px !important;\n height: 18px !important;\n margin: 0 1px;\n top: 3px;\n position: relative; }\n\n.ItemTooltip_itemIconRandom {\n width: 36px !important;\n top: 6px;\n margin: 0 1px 0 2px; }\n\n.ItemTooltip_itemIconSmall {\n width: 20px !important;\n height: 20px !important;\n margin-right: 0.33rem; }\n\n.ItemTooltip_setBonus {\n margin-bottom: 0.8rem !important; }\n\n.ItemTooltip_setContainer {\n padding-left: 0.33rem;\n padding-top: 0.22rem; }\n\n.ItemTooltip_setStageContainer {\n display: flex;\n margin: 0.25rem 0 0.35rem 0; }\n\n.ItemTooltip_setStageNumber {\n margin-top: 0.2rem;\n padding-top: 0.1rem;\n line-height: 16px;\n width: 16px;\n height: 16px;\n max-height: 16px;\n font-weight: 500;\n display: flex;\n justify-content: center;\n align-items: center;\n color: rgba(88, 255, 119, 0.8);\n border: 1px solid rgba(88, 255, 119, 0.9);\n border-radius: 3px; }\n\n.ItemTooltip_setStageContent {\n padding-top: 0.2rem;\n flex-grow: 2;\n padding-left: 0.55rem;\n max-width: 90%;\n color: #58ff77; }\n\n.ItemTooltip_itemiconnamediv {\n display: flex;\n align-items: center;\n padding: 0.15rem 0 0.15rem 0.33rem;\n line-height: 20px; }\n\n.ItemTooltip_setItemIconNameDiv {\n display: flex;\n align-items: center;\n padding: 0.11rem 0 0.11rem 0.33rem;\n line-height: 20px; }\n\n.ItemTooltip_setItemsContainer {\n display: flex;\n font-size: 12px; }\n\n.ItemTooltip_setItemsSubContainer {\n flex: 1; }\n\n.ItemTooltip_itemNameRandomDiv {\n display: flex;\n align-items: center; }\n\n@media only screen and (max-width: 380px) {\n .ItemTooltip_jobstyleButton {\n padding: 0.5rem; } }\n\n/**\r\n * ==============================================\r\n * Dot Elastic\r\n * ==============================================\r\n */\n.dot-elastic {\n position: relative;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElastic 1s infinite linear; }\n\n.dot-elastic::before,\n.dot-elastic::after {\n content: \"\";\n display: inline-block;\n position: absolute;\n top: 0; }\n\n.dot-elastic::before {\n left: -15px;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElasticBefore 1s infinite linear; }\n\n.dot-elastic::after {\n left: 15px;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElasticAfter 1s infinite linear; }\n\n@keyframes dotElasticBefore {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1.5); }\n 50% {\n transform: scale(1, 0.67); }\n 75% {\n transform: scale(1, 1); }\n 100% {\n transform: scale(1, 1); } }\n\n@keyframes dotElastic {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1); }\n 50% {\n transform: scale(1, 1.5); }\n 75% {\n transform: scale(1, 1); }\n 100% {\n transform: scale(1, 1); } }\n\n@keyframes dotElasticAfter {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1); }\n 50% {\n transform: scale(1, 0.67); }\n 75% {\n transform: scale(1, 1.5); }\n 100% {\n transform: scale(1, 1); } }\n";
|
|
165
|
+
styleInject(css_248z$8);
|
|
166
166
|
|
|
167
167
|
function BuildIconPath(iconPath, iconIndex) {
|
|
168
168
|
if (iconPath == null)
|
|
@@ -740,6 +740,27 @@ var BnsItemApiFetchParamCreator = function (configuration) {
|
|
|
740
740
|
options: localVarRequestOptions,
|
|
741
741
|
};
|
|
742
742
|
},
|
|
743
|
+
/**
|
|
744
|
+
*
|
|
745
|
+
* @param {*} [options] Override http request option.
|
|
746
|
+
* @throws {RequiredError}
|
|
747
|
+
*/
|
|
748
|
+
bnsItemRegionsGet: function (options) {
|
|
749
|
+
if (options === void 0) { options = {}; }
|
|
750
|
+
var localVarPath = "/BnsItem/Regions";
|
|
751
|
+
var localVarUrlObj = url__namespace.parse(localVarPath, true);
|
|
752
|
+
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
753
|
+
var localVarHeaderParameter = {};
|
|
754
|
+
var localVarQueryParameter = {};
|
|
755
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
756
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
757
|
+
delete localVarUrlObj.search;
|
|
758
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
759
|
+
return {
|
|
760
|
+
url: url__namespace.format(localVarUrlObj),
|
|
761
|
+
options: localVarRequestOptions,
|
|
762
|
+
};
|
|
763
|
+
},
|
|
743
764
|
/**
|
|
744
765
|
*
|
|
745
766
|
* @param {string} region
|
|
@@ -1006,6 +1027,26 @@ var BnsItemApiFp = function (configuration) {
|
|
|
1006
1027
|
});
|
|
1007
1028
|
};
|
|
1008
1029
|
},
|
|
1030
|
+
/**
|
|
1031
|
+
*
|
|
1032
|
+
* @param {*} [options] Override http request option.
|
|
1033
|
+
* @throws {RequiredError}
|
|
1034
|
+
*/
|
|
1035
|
+
bnsItemRegionsGet: function (options) {
|
|
1036
|
+
var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemRegionsGet(options);
|
|
1037
|
+
return function (fetch, basePath) {
|
|
1038
|
+
if (fetch === void 0) { fetch = isomorphicFetch__namespace; }
|
|
1039
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
1040
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
|
|
1041
|
+
if (response.status >= 200 && response.status < 300) {
|
|
1042
|
+
return response.json();
|
|
1043
|
+
}
|
|
1044
|
+
else {
|
|
1045
|
+
throw response;
|
|
1046
|
+
}
|
|
1047
|
+
});
|
|
1048
|
+
};
|
|
1049
|
+
},
|
|
1009
1050
|
/**
|
|
1010
1051
|
*
|
|
1011
1052
|
* @param {string} region
|
|
@@ -1153,6 +1194,15 @@ var BnsItemApi = /** @class */ (function (_super) {
|
|
|
1153
1194
|
BnsItemApi.prototype.bnsItemPingGet = function (options) {
|
|
1154
1195
|
return BnsItemApiFp(this.configuration).bnsItemPingGet(options)(this.fetch, this.basePath);
|
|
1155
1196
|
};
|
|
1197
|
+
/**
|
|
1198
|
+
*
|
|
1199
|
+
* @param {*} [options] Override http request option.
|
|
1200
|
+
* @throws {RequiredError}
|
|
1201
|
+
* @memberof BnsItemApi
|
|
1202
|
+
*/
|
|
1203
|
+
BnsItemApi.prototype.bnsItemRegionsGet = function (options) {
|
|
1204
|
+
return BnsItemApiFp(this.configuration).bnsItemRegionsGet(options)(this.fetch, this.basePath);
|
|
1205
|
+
};
|
|
1156
1206
|
/**
|
|
1157
1207
|
*
|
|
1158
1208
|
* @param {string} region
|
|
@@ -1248,208 +1298,11 @@ var ItemDownloadClient = /** @class */ (function () {
|
|
|
1248
1298
|
return ItemDownloadClient;
|
|
1249
1299
|
}());
|
|
1250
1300
|
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
return React__default["default"].createElement("div", { dangerouslySetInnerHTML: { __html: item.mainInfo } });
|
|
1254
|
-
return null;
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
function ItemSubInfo(item) {
|
|
1258
|
-
if (item.subInfo != null)
|
|
1259
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_subInfo", dangerouslySetInnerHTML: {
|
|
1260
|
-
__html: ReplaceIconsInHtmlString(item.subInfo),
|
|
1261
|
-
} }));
|
|
1262
|
-
return null;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
function ItemSkillTitles(_a) {
|
|
1266
|
-
var item = _a.item, itemCombats = _a.itemCombats, jobstyle = _a.jobstyle;
|
|
1267
|
-
if (item.skills == null || item.skills.length == 0)
|
|
1268
|
-
return null;
|
|
1269
|
-
var computedSkills = item.skills;
|
|
1270
|
-
if (itemCombats) {
|
|
1271
|
-
computedSkills = computedSkills.filter(function (x) { return x.jobstyle === jobstyle; });
|
|
1272
|
-
}
|
|
1273
|
-
computedSkills = computedSkills.filter(function (x) { return x.title != null; });
|
|
1274
|
-
return (React__default["default"].createElement("div", null, computedSkills.map(function (itemSkill, i) { return (React__default["default"].createElement("div", { key: itemSkill.title + "_" + i, dangerouslySetInnerHTML: { __html: itemSkill.title } })); })));
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
function ItemCooldowns(item) {
|
|
1278
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1279
|
-
item.cooldownInMs != 0 ? (React__default["default"].createElement("div", { className: "ItemTooltip_cooldown" },
|
|
1280
|
-
"Cooldown: ",
|
|
1281
|
-
GetCooldownString(item.cooldownInMs))) : null,
|
|
1282
|
-
item.bgCooldownInMs != 0 ? (React__default["default"].createElement("div", { className: "ItemTooltip_cooldown" },
|
|
1283
|
-
"Battleground Reset Time: ",
|
|
1284
|
-
GetCooldownString(item.bgCooldownInMs))) : null));
|
|
1285
|
-
}
|
|
1286
|
-
function GetCooldownString(cooldownInMs) {
|
|
1287
|
-
var cooldownInS = cooldownInMs / 1000;
|
|
1288
|
-
if (cooldownInS >= 60) {
|
|
1289
|
-
var cooldownMins = Math.floor(cooldownInS / 60);
|
|
1290
|
-
var cooldownSecs = cooldownInS - cooldownMins * 60;
|
|
1291
|
-
var result = "";
|
|
1292
|
-
if (cooldownMins > 60) {
|
|
1293
|
-
var cooldownHs = Math.floor(cooldownMins / 60);
|
|
1294
|
-
cooldownMins = cooldownMins - cooldownHs * 60;
|
|
1295
|
-
result += "".concat(cooldownHs, " hr. ");
|
|
1296
|
-
}
|
|
1297
|
-
if (cooldownMins > 0) {
|
|
1298
|
-
result += "".concat(cooldownMins, " min. ");
|
|
1299
|
-
}
|
|
1300
|
-
if (cooldownSecs > 0) {
|
|
1301
|
-
result += "".concat(cooldownSecs, " sec. ");
|
|
1302
|
-
}
|
|
1303
|
-
result = result.trim();
|
|
1304
|
-
return result;
|
|
1305
|
-
}
|
|
1306
|
-
else {
|
|
1307
|
-
return "".concat(cooldownInS, " sec.");
|
|
1308
|
-
}
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
function removeDuplicates(stats) {
|
|
1312
|
-
return stats.filter(function (value, index, self) {
|
|
1313
|
-
return index === self.findIndex(function (t) { return t.name === value.name; });
|
|
1314
|
-
});
|
|
1315
|
-
}
|
|
1316
|
-
function ItemStats(item) {
|
|
1317
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_stats" },
|
|
1318
|
-
removeDuplicates(item.stats)
|
|
1319
|
-
.filter(function (x) { return x.isMainStat; })
|
|
1320
|
-
.map(function (mainStat, i) {
|
|
1321
|
-
if (mainStat.name.includes("-min"))
|
|
1322
|
-
return;
|
|
1323
|
-
var statValue = mainStat.value;
|
|
1324
|
-
//minmax
|
|
1325
|
-
if (mainStat.name.includes("-max")) {
|
|
1326
|
-
var minVal = item.stats.find(function (x) { return x.name === mainStat.name.replace("-max", "-min"); }).value;
|
|
1327
|
-
statValue = (mainStat.value + minVal) / 2;
|
|
1328
|
-
}
|
|
1329
|
-
return (React__default["default"].createElement("div", { key: mainStat.name + "_" + i, className: "ItemTooltip_stats_mainstat" },
|
|
1330
|
-
GetStatDisplayValue(statValue, mainStat.isPercentage),
|
|
1331
|
-
"\u00A0",
|
|
1332
|
-
ReplaceBossAndPvpAp(mainStat.name).replace("Max.", "").trim()));
|
|
1333
|
-
}),
|
|
1334
|
-
removeDuplicates(item.stats)
|
|
1335
|
-
.filter(function (x) { return !x.isMainStat; })
|
|
1336
|
-
.map(function (subStat, i) {
|
|
1337
|
-
if (subStat.name.includes("-min"))
|
|
1338
|
-
return;
|
|
1339
|
-
var statValue = subStat.value;
|
|
1340
|
-
//minmax
|
|
1341
|
-
if (subStat.name.includes("-max")) {
|
|
1342
|
-
var minVal = item.stats.find(function (x) { return x.name === subStat.name.replace("-max", "-min"); }).value;
|
|
1343
|
-
statValue = (subStat.value + minVal) / 2;
|
|
1344
|
-
}
|
|
1345
|
-
return (React__default["default"].createElement("div", { key: subStat.name + "_" + i, className: "ItemTooltip_stats_substat" },
|
|
1346
|
-
GetStatDisplayValue(statValue, subStat.isPercentage),
|
|
1347
|
-
"\u00A0",
|
|
1348
|
-
ReplaceBossAndPvpAp(subStat.name).replace("Max.", "").trim()));
|
|
1349
|
-
})));
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
function ItemRandomStats(item) {
|
|
1353
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_stats" }, item.randomStats.map(function (randomStat, i) {
|
|
1354
|
-
return (React__default["default"].createElement("div", { key: randomStat.name + "_" + i, className: randomStat.isMainStat
|
|
1355
|
-
? "ItemTooltip_stats_mainstat"
|
|
1356
|
-
: "ItemTooltip_stats_substat" },
|
|
1357
|
-
GetStatDisplayValue(randomStat.min, randomStat.isPercentage),
|
|
1358
|
-
"~",
|
|
1359
|
-
GetStatDisplayValue(randomStat.max, randomStat.isPercentage),
|
|
1360
|
-
"\u00A0",
|
|
1361
|
-
ReplaceBossAndPvpAp(randomStat.name),
|
|
1362
|
-
React__default["default"].createElement("img", { alt: "", className: "ItemTooltip_itemIconInline ItemTooltip_itemIconRandom", src: BuildIconPath("00015590/Tag_Random") })));
|
|
1363
|
-
})));
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
function GearScore(item) {
|
|
1367
|
-
return (React__default["default"].createElement("div", null,
|
|
1368
|
-
"debug-gs: ",
|
|
1369
|
-
item.gearScore,
|
|
1370
|
-
React__default["default"].createElement("br", null),
|
|
1371
|
-
"debug-is: ",
|
|
1372
|
-
item.itemScore,
|
|
1373
|
-
React__default["default"].createElement("br", null),
|
|
1374
|
-
"debug-fs: ",
|
|
1375
|
-
item.fusionScore));
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
function TopText(item) {
|
|
1379
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_toptext", dangerouslySetInnerHTML: { __html: item.topText } }));
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
function ItemSkillDescriptions(_a) {
|
|
1383
|
-
var item = _a.item, itemCombats = _a.itemCombats, jobstyle = _a.jobstyle;
|
|
1384
|
-
if (item.skills == null || item.skills.length == 0)
|
|
1385
|
-
return null;
|
|
1386
|
-
var computedSkills = item.skills;
|
|
1387
|
-
if (itemCombats) {
|
|
1388
|
-
computedSkills = computedSkills.filter(function (x) { return x.jobstyle === jobstyle; });
|
|
1389
|
-
}
|
|
1390
|
-
computedSkills = computedSkills.filter(function (x) { return x.description != null; });
|
|
1391
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_skilldescs 00008130.UI.Label_Green03_12" }, computedSkills.map(function (skill, i) { return (React__default["default"].createElement("div", { key: skill.title + "_" + i, dangerouslySetInnerHTML: { __html: skill.description } })); })));
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
function SkillModifierGroup(props) {
|
|
1395
|
-
var modifierGroup = props.modifierGroup;
|
|
1396
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null, modifierGroup.modifiers.map(function (modifier, i) { return (React__default["default"].createElement("div", { key: "modifier_" + i },
|
|
1397
|
-
modifier.skills.map(function (skill, i2) { return (React__default["default"].createElement(React__default["default"].Fragment, { key: skill.item2 + "_" + i + "_" + i2 },
|
|
1398
|
-
React__default["default"].createElement("span", { className: "00008130.UI.Vital_LightBlue", dangerouslySetInnerHTML: { __html: skill.item2 } }),
|
|
1399
|
-
i2 != modifier.skills.length - 1 ? React__default["default"].createElement(React__default["default"].Fragment, null, ",\u00A0") : null)); }),
|
|
1400
|
-
"\u00A0",
|
|
1401
|
-
GetTextForVerb(modifier.verb),
|
|
1402
|
-
"\u00A0",
|
|
1403
|
-
Math.abs(modifier.value) / 10,
|
|
1404
|
-
"%")); })));
|
|
1405
|
-
}
|
|
1406
|
-
function GetTextForVerb(verb) {
|
|
1407
|
-
if (verb === "percentDamage")
|
|
1408
|
-
return "Damage increases by";
|
|
1409
|
-
if (verb === "percentCD")
|
|
1410
|
-
return "Cooldown decreases by";
|
|
1411
|
-
return "";
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
function SkillModifiers(props) {
|
|
1415
|
-
var modifierGroups = props.skillModifierGroups;
|
|
1416
|
-
if (props.isSetBonus) {
|
|
1417
|
-
modifierGroups = modifierGroups.filter(function (x) { return x.jobstyle === props.jobstyle; });
|
|
1418
|
-
}
|
|
1419
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_skilldescs 00008130.UI.Label_Green03_12" }, modifierGroups.map(function (skillModifierGroup, i) { return (React__default["default"].createElement(SkillModifierGroup, { key: "skillModifierGroup_" + i, modifierGroup: skillModifierGroup })); })));
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
function SetBonusItems(setBonus) {
|
|
1423
|
-
var items = setBonus.setItems;
|
|
1424
|
-
if (items.length >= 8)
|
|
1425
|
-
return null;
|
|
1426
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_setItemsContainer" },
|
|
1427
|
-
React__default["default"].createElement("div", { className: "ItemTooltip_setItemsSubContainer" }, items.map(function (item, i) {
|
|
1428
|
-
return (React__default["default"].createElement("div", { key: item.itemName + "_" + i, className: "ItemTooltip_setItemIconNameDiv" },
|
|
1429
|
-
item.itemIcon != null ? (React__default["default"].createElement("img", { alt: "", className: "ItemTooltip_itemIconSmall", src: BuildIconPath(item.itemIcon.iconPath) })) : null,
|
|
1430
|
-
React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: item.itemName } })));
|
|
1431
|
-
}))));
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
function SetBonus(props) {
|
|
1435
|
-
var item = props.item, jobstyle = props.jobstyle;
|
|
1436
|
-
return (React__default["default"].createElement("div", { className: "ItemTooltip_setBonus" },
|
|
1437
|
-
React__default["default"].createElement("div", null,
|
|
1438
|
-
item.setBonus.setName != "" ? (React__default["default"].createElement("div", { className: "00008130.UI.Vital_LightBlue", dangerouslySetInnerHTML: { __html: item.setBonus.setName } })) : null,
|
|
1439
|
-
React__default["default"].createElement(SetBonusItems, __assign({}, item.setBonus)),
|
|
1440
|
-
React__default["default"].createElement("div", { className: "ItemTooltip_setContainer" }, item.setBonus.setBonusStages
|
|
1441
|
-
.sort(function (a, b) { return a.setNumber - b.setNumber; })
|
|
1442
|
-
.map(function (setStage) { return (React__default["default"].createElement("div", { key: setStage.setNumber, className: "ItemTooltip_setStageContainer" },
|
|
1443
|
-
React__default["default"].createElement("div", null,
|
|
1444
|
-
React__default["default"].createElement("div", { className: "ItemTooltip_setStageNumber" },
|
|
1445
|
-
React__default["default"].createElement("span", null, setStage.setNumber))),
|
|
1446
|
-
React__default["default"].createElement("div", { className: "ItemTooltip_setStageContent 00008130.UI.Label_Green03_12" },
|
|
1447
|
-
setStage.effects.map(function (effect, i) { return (React__default["default"].createElement("div", { key: i, dangerouslySetInnerHTML: { __html: effect.description } })); }),
|
|
1448
|
-
React__default["default"].createElement(SkillModifiers, { jobstyle: jobstyle, isSetBonus: true, skillModifierGroups: setStage.skillModifiers })))); })))));
|
|
1449
|
-
}
|
|
1301
|
+
var css_248z$7 = ".tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:\"\";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}";
|
|
1302
|
+
styleInject(css_248z$7);
|
|
1450
1303
|
|
|
1451
|
-
var css_248z$
|
|
1452
|
-
styleInject(css_248z$
|
|
1304
|
+
var css_248z$6 = "";
|
|
1305
|
+
styleInject(css_248z$6);
|
|
1453
1306
|
|
|
1454
1307
|
var top = 'top';
|
|
1455
1308
|
var bottom = 'bottom';
|
|
@@ -1607,33 +1460,36 @@ function getBasePlacement$1(placement) {
|
|
|
1607
1460
|
return placement.split('-')[0];
|
|
1608
1461
|
}
|
|
1609
1462
|
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1463
|
+
var max = Math.max;
|
|
1464
|
+
var min = Math.min;
|
|
1465
|
+
var round = Math.round;
|
|
1466
|
+
|
|
1467
|
+
function getBoundingClientRect(element, includeScale) {
|
|
1468
|
+
if (includeScale === void 0) {
|
|
1469
|
+
includeScale = false;
|
|
1470
|
+
}
|
|
1613
1471
|
|
|
1614
1472
|
var rect = element.getBoundingClientRect();
|
|
1615
1473
|
var scaleX = 1;
|
|
1616
|
-
var scaleY = 1;
|
|
1617
|
-
// `offsetWidth` returns an integer while `getBoundingClientRect`
|
|
1618
|
-
// returns a float. This results in `scaleX` or `scaleY` being
|
|
1619
|
-
// non-1 when it should be for elements that aren't a full pixel in
|
|
1620
|
-
// width or height.
|
|
1621
|
-
// if (isHTMLElement(element) && includeScale) {
|
|
1622
|
-
// const offsetHeight = element.offsetHeight;
|
|
1623
|
-
// const offsetWidth = element.offsetWidth;
|
|
1624
|
-
// // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
1625
|
-
// // Fallback to 1 in case both values are `0`
|
|
1626
|
-
// if (offsetWidth > 0) {
|
|
1627
|
-
// scaleX = rect.width / offsetWidth || 1;
|
|
1628
|
-
// }
|
|
1629
|
-
// if (offsetHeight > 0) {
|
|
1630
|
-
// scaleY = rect.height / offsetHeight || 1;
|
|
1631
|
-
// }
|
|
1632
|
-
// }
|
|
1474
|
+
var scaleY = 1;
|
|
1633
1475
|
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1476
|
+
if (isHTMLElement(element) && includeScale) {
|
|
1477
|
+
var offsetHeight = element.offsetHeight;
|
|
1478
|
+
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
1479
|
+
// Fallback to 1 in case both values are `0`
|
|
1480
|
+
|
|
1481
|
+
if (offsetWidth > 0) {
|
|
1482
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
if (offsetHeight > 0) {
|
|
1486
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
return {
|
|
1491
|
+
width: rect.width / scaleX,
|
|
1492
|
+
height: rect.height / scaleY,
|
|
1637
1493
|
top: rect.top / scaleY,
|
|
1638
1494
|
right: rect.right / scaleX,
|
|
1639
1495
|
bottom: rect.bottom / scaleY,
|
|
@@ -1748,6 +1604,10 @@ function getContainingBlock(element) {
|
|
|
1748
1604
|
|
|
1749
1605
|
var currentNode = getParentNode(element);
|
|
1750
1606
|
|
|
1607
|
+
if (isShadowRoot(currentNode)) {
|
|
1608
|
+
currentNode = currentNode.host;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1751
1611
|
while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
|
|
1752
1612
|
var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
|
|
1753
1613
|
// create a containing block.
|
|
@@ -1784,13 +1644,13 @@ function getMainAxisFromPlacement(placement) {
|
|
|
1784
1644
|
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
1785
1645
|
}
|
|
1786
1646
|
|
|
1787
|
-
var max = Math.max;
|
|
1788
|
-
var min = Math.min;
|
|
1789
|
-
var round = Math.round;
|
|
1790
|
-
|
|
1791
1647
|
function within(min$1, value, max$1) {
|
|
1792
1648
|
return max(min$1, min(value, max$1));
|
|
1793
1649
|
}
|
|
1650
|
+
function withinMaxClamp(min, value, max) {
|
|
1651
|
+
var v = within(min, value, max);
|
|
1652
|
+
return v > max ? max : v;
|
|
1653
|
+
}
|
|
1794
1654
|
|
|
1795
1655
|
function getFreshSideObject() {
|
|
1796
1656
|
return {
|
|
@@ -1922,8 +1782,8 @@ function roundOffsetsByDPR(_ref) {
|
|
|
1922
1782
|
var win = window;
|
|
1923
1783
|
var dpr = win.devicePixelRatio || 1;
|
|
1924
1784
|
return {
|
|
1925
|
-
x: round(
|
|
1926
|
-
y: round(
|
|
1785
|
+
x: round(x * dpr) / dpr || 0,
|
|
1786
|
+
y: round(y * dpr) / dpr || 0
|
|
1927
1787
|
};
|
|
1928
1788
|
}
|
|
1929
1789
|
|
|
@@ -1938,14 +1798,23 @@ function mapToStyles(_ref2) {
|
|
|
1938
1798
|
position = _ref2.position,
|
|
1939
1799
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
1940
1800
|
adaptive = _ref2.adaptive,
|
|
1941
|
-
roundOffsets = _ref2.roundOffsets
|
|
1942
|
-
|
|
1943
|
-
var
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1801
|
+
roundOffsets = _ref2.roundOffsets,
|
|
1802
|
+
isFixed = _ref2.isFixed;
|
|
1803
|
+
var _offsets$x = offsets.x,
|
|
1804
|
+
x = _offsets$x === void 0 ? 0 : _offsets$x,
|
|
1805
|
+
_offsets$y = offsets.y,
|
|
1806
|
+
y = _offsets$y === void 0 ? 0 : _offsets$y;
|
|
1807
|
+
|
|
1808
|
+
var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
|
|
1809
|
+
x: x,
|
|
1810
|
+
y: y
|
|
1811
|
+
}) : {
|
|
1812
|
+
x: x,
|
|
1813
|
+
y: y
|
|
1814
|
+
};
|
|
1948
1815
|
|
|
1816
|
+
x = _ref3.x;
|
|
1817
|
+
y = _ref3.y;
|
|
1949
1818
|
var hasX = offsets.hasOwnProperty('x');
|
|
1950
1819
|
var hasY = offsets.hasOwnProperty('y');
|
|
1951
1820
|
var sideX = left;
|
|
@@ -1970,16 +1839,18 @@ function mapToStyles(_ref2) {
|
|
|
1970
1839
|
offsetParent = offsetParent;
|
|
1971
1840
|
|
|
1972
1841
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
1973
|
-
sideY = bottom;
|
|
1974
|
-
|
|
1975
|
-
|
|
1842
|
+
sideY = bottom;
|
|
1843
|
+
var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
1844
|
+
offsetParent[heightProp];
|
|
1845
|
+
y -= offsetY - popperRect.height;
|
|
1976
1846
|
y *= gpuAcceleration ? 1 : -1;
|
|
1977
1847
|
}
|
|
1978
1848
|
|
|
1979
1849
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
1980
|
-
sideX = right;
|
|
1981
|
-
|
|
1982
|
-
|
|
1850
|
+
sideX = right;
|
|
1851
|
+
var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
1852
|
+
offsetParent[widthProp];
|
|
1853
|
+
x -= offsetX - popperRect.width;
|
|
1983
1854
|
x *= gpuAcceleration ? 1 : -1;
|
|
1984
1855
|
}
|
|
1985
1856
|
}
|
|
@@ -1988,6 +1859,17 @@ function mapToStyles(_ref2) {
|
|
|
1988
1859
|
position: position
|
|
1989
1860
|
}, adaptive && unsetSides);
|
|
1990
1861
|
|
|
1862
|
+
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
1863
|
+
x: x,
|
|
1864
|
+
y: y
|
|
1865
|
+
}) : {
|
|
1866
|
+
x: x,
|
|
1867
|
+
y: y
|
|
1868
|
+
};
|
|
1869
|
+
|
|
1870
|
+
x = _ref4.x;
|
|
1871
|
+
y = _ref4.y;
|
|
1872
|
+
|
|
1991
1873
|
if (gpuAcceleration) {
|
|
1992
1874
|
var _Object$assign;
|
|
1993
1875
|
|
|
@@ -1997,9 +1879,9 @@ function mapToStyles(_ref2) {
|
|
|
1997
1879
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
|
1998
1880
|
}
|
|
1999
1881
|
|
|
2000
|
-
function computeStyles(
|
|
2001
|
-
var state =
|
|
2002
|
-
options =
|
|
1882
|
+
function computeStyles(_ref5) {
|
|
1883
|
+
var state = _ref5.state,
|
|
1884
|
+
options = _ref5.options;
|
|
2003
1885
|
var _options$gpuAccelerat = options.gpuAcceleration,
|
|
2004
1886
|
gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
|
|
2005
1887
|
_options$adaptive = options.adaptive,
|
|
@@ -2022,7 +1904,8 @@ function computeStyles(_ref4) {
|
|
|
2022
1904
|
variation: getVariation(state.placement),
|
|
2023
1905
|
popper: state.elements.popper,
|
|
2024
1906
|
popperRect: state.rects.popper,
|
|
2025
|
-
gpuAcceleration: gpuAcceleration
|
|
1907
|
+
gpuAcceleration: gpuAcceleration,
|
|
1908
|
+
isFixed: state.options.strategy === 'fixed'
|
|
2026
1909
|
};
|
|
2027
1910
|
|
|
2028
1911
|
if (state.modifiersData.popperOffsets != null) {
|
|
@@ -2280,7 +2163,7 @@ function getInnerBoundingClientRect(element) {
|
|
|
2280
2163
|
}
|
|
2281
2164
|
|
|
2282
2165
|
function getClientRectFromMixedType(element, clippingParent) {
|
|
2283
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) :
|
|
2166
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement$1(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
2284
2167
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
2285
2168
|
// clipping (or hiding) overflowing elements with a position different from
|
|
2286
2169
|
// `initial`
|
|
@@ -2797,6 +2680,14 @@ function preventOverflow(_ref) {
|
|
|
2797
2680
|
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
|
2798
2681
|
placement: state.placement
|
|
2799
2682
|
})) : tetherOffset;
|
|
2683
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
|
|
2684
|
+
mainAxis: tetherOffsetValue,
|
|
2685
|
+
altAxis: tetherOffsetValue
|
|
2686
|
+
} : Object.assign({
|
|
2687
|
+
mainAxis: 0,
|
|
2688
|
+
altAxis: 0
|
|
2689
|
+
}, tetherOffsetValue);
|
|
2690
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
2800
2691
|
var data = {
|
|
2801
2692
|
x: 0,
|
|
2802
2693
|
y: 0
|
|
@@ -2806,13 +2697,15 @@ function preventOverflow(_ref) {
|
|
|
2806
2697
|
return;
|
|
2807
2698
|
}
|
|
2808
2699
|
|
|
2809
|
-
if (checkMainAxis
|
|
2700
|
+
if (checkMainAxis) {
|
|
2701
|
+
var _offsetModifierState$;
|
|
2702
|
+
|
|
2810
2703
|
var mainSide = mainAxis === 'y' ? top : left;
|
|
2811
2704
|
var altSide = mainAxis === 'y' ? bottom : right;
|
|
2812
2705
|
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
2813
2706
|
var offset = popperOffsets[mainAxis];
|
|
2814
|
-
var min$1 =
|
|
2815
|
-
var max$1 =
|
|
2707
|
+
var min$1 = offset + overflow[mainSide];
|
|
2708
|
+
var max$1 = offset - overflow[altSide];
|
|
2816
2709
|
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
2817
2710
|
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
2818
2711
|
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
|
|
@@ -2832,36 +2725,45 @@ function preventOverflow(_ref) {
|
|
|
2832
2725
|
// width or height)
|
|
2833
2726
|
|
|
2834
2727
|
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
2835
|
-
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin -
|
|
2836
|
-
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax +
|
|
2728
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
2729
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
2837
2730
|
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
2838
2731
|
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
2839
|
-
var offsetModifierValue =
|
|
2840
|
-
var tetherMin =
|
|
2841
|
-
var tetherMax =
|
|
2732
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
2733
|
+
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
|
|
2734
|
+
var tetherMax = offset + maxOffset - offsetModifierValue;
|
|
2735
|
+
var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
|
|
2736
|
+
popperOffsets[mainAxis] = preventedOffset;
|
|
2737
|
+
data[mainAxis] = preventedOffset - offset;
|
|
2738
|
+
}
|
|
2842
2739
|
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
popperOffsets[mainAxis] = preventedOffset;
|
|
2846
|
-
data[mainAxis] = preventedOffset - offset;
|
|
2847
|
-
}
|
|
2740
|
+
if (checkAltAxis) {
|
|
2741
|
+
var _offsetModifierState$2;
|
|
2848
2742
|
|
|
2849
|
-
|
|
2850
|
-
var _mainSide = mainAxis === 'x' ? top : left;
|
|
2743
|
+
var _mainSide = mainAxis === 'x' ? top : left;
|
|
2851
2744
|
|
|
2852
|
-
|
|
2745
|
+
var _altSide = mainAxis === 'x' ? bottom : right;
|
|
2853
2746
|
|
|
2854
|
-
|
|
2747
|
+
var _offset = popperOffsets[altAxis];
|
|
2855
2748
|
|
|
2856
|
-
|
|
2749
|
+
var _len = altAxis === 'y' ? 'height' : 'width';
|
|
2857
2750
|
|
|
2858
|
-
|
|
2751
|
+
var _min = _offset + overflow[_mainSide];
|
|
2859
2752
|
|
|
2860
|
-
|
|
2753
|
+
var _max = _offset - overflow[_altSide];
|
|
2861
2754
|
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2755
|
+
var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
|
|
2756
|
+
|
|
2757
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
2758
|
+
|
|
2759
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
2760
|
+
|
|
2761
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
2762
|
+
|
|
2763
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
2764
|
+
|
|
2765
|
+
popperOffsets[altAxis] = _preventedOffset;
|
|
2766
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
2865
2767
|
}
|
|
2866
2768
|
|
|
2867
2769
|
state.modifiersData[name] = data;
|
|
@@ -2893,8 +2795,8 @@ function getNodeScroll(node) {
|
|
|
2893
2795
|
|
|
2894
2796
|
function isElementScaled(element) {
|
|
2895
2797
|
var rect = element.getBoundingClientRect();
|
|
2896
|
-
var scaleX = rect.width / element.offsetWidth || 1;
|
|
2897
|
-
var scaleY = rect.height / element.offsetHeight || 1;
|
|
2798
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
2799
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
2898
2800
|
return scaleX !== 1 || scaleY !== 1;
|
|
2899
2801
|
} // Returns the composite rect of an element relative to its offsetParent.
|
|
2900
2802
|
// Composite means it takes into account transforms as well as layout.
|
|
@@ -2906,9 +2808,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
2906
2808
|
}
|
|
2907
2809
|
|
|
2908
2810
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
2909
|
-
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
2811
|
+
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
2910
2812
|
var documentElement = getDocumentElement(offsetParent);
|
|
2911
|
-
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
2813
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
2912
2814
|
var scroll = {
|
|
2913
2815
|
scrollLeft: 0,
|
|
2914
2816
|
scrollTop: 0
|
|
@@ -2925,7 +2827,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
2925
2827
|
}
|
|
2926
2828
|
|
|
2927
2829
|
if (isHTMLElement(offsetParent)) {
|
|
2928
|
-
offsets = getBoundingClientRect(offsetParent);
|
|
2830
|
+
offsets = getBoundingClientRect(offsetParent, true);
|
|
2929
2831
|
offsets.x += offsetParent.clientLeft;
|
|
2930
2832
|
offsets.y += offsetParent.clientTop;
|
|
2931
2833
|
} else if (documentElement) {
|
|
@@ -5573,13 +5475,216 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
|
|
|
5573
5475
|
|
|
5574
5476
|
var Tippy = index;
|
|
5575
5477
|
|
|
5576
|
-
var css_248z$
|
|
5478
|
+
var css_248z$5 = ".ItemImproveTooltip_option {\n margin: .2rem 0; }\n\n.ItemImproveTooltip_moneyContainer {\n padding: 0 0 0.15rem 0.33rem; }\n";
|
|
5479
|
+
styleInject(css_248z$5);
|
|
5480
|
+
|
|
5481
|
+
function ItemMainInfo(item) {
|
|
5482
|
+
if (item.mainInfo != null)
|
|
5483
|
+
return React__default["default"].createElement("div", { dangerouslySetInnerHTML: { __html: item.mainInfo } });
|
|
5484
|
+
return null;
|
|
5485
|
+
}
|
|
5486
|
+
|
|
5487
|
+
function ItemSubInfo(item) {
|
|
5488
|
+
if (item.subInfo != null)
|
|
5489
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_subInfo", dangerouslySetInnerHTML: {
|
|
5490
|
+
__html: ReplaceIconsInHtmlString(item.subInfo),
|
|
5491
|
+
} }));
|
|
5492
|
+
return null;
|
|
5493
|
+
}
|
|
5494
|
+
|
|
5495
|
+
function ItemSkillTitles(_a) {
|
|
5496
|
+
var item = _a.item, itemCombats = _a.itemCombats, jobstyle = _a.jobstyle;
|
|
5497
|
+
if (item.skills == null || item.skills.length == 0)
|
|
5498
|
+
return null;
|
|
5499
|
+
var computedSkills = item.skills;
|
|
5500
|
+
if (itemCombats) {
|
|
5501
|
+
computedSkills = computedSkills.filter(function (x) { return x.jobstyle === jobstyle; });
|
|
5502
|
+
}
|
|
5503
|
+
computedSkills = computedSkills.filter(function (x) { return x.title != null; });
|
|
5504
|
+
return (React__default["default"].createElement("div", null, computedSkills.map(function (itemSkill, i) { return (React__default["default"].createElement("div", { key: itemSkill.title + "_" + i, dangerouslySetInnerHTML: { __html: itemSkill.title } })); })));
|
|
5505
|
+
}
|
|
5506
|
+
|
|
5507
|
+
function ItemCooldowns(item) {
|
|
5508
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
5509
|
+
item.cooldownInMs != 0 ? (React__default["default"].createElement("div", { className: "ItemTooltip_cooldown" },
|
|
5510
|
+
"Cooldown: ",
|
|
5511
|
+
GetCooldownString(item.cooldownInMs))) : null,
|
|
5512
|
+
item.bgCooldownInMs != 0 ? (React__default["default"].createElement("div", { className: "ItemTooltip_cooldown" },
|
|
5513
|
+
"Battleground Reset Time: ",
|
|
5514
|
+
GetCooldownString(item.bgCooldownInMs))) : null));
|
|
5515
|
+
}
|
|
5516
|
+
function GetCooldownString(cooldownInMs) {
|
|
5517
|
+
var cooldownInS = cooldownInMs / 1000;
|
|
5518
|
+
if (cooldownInS >= 60) {
|
|
5519
|
+
var cooldownMins = Math.floor(cooldownInS / 60);
|
|
5520
|
+
var cooldownSecs = cooldownInS - cooldownMins * 60;
|
|
5521
|
+
var result = "";
|
|
5522
|
+
if (cooldownMins > 60) {
|
|
5523
|
+
var cooldownHs = Math.floor(cooldownMins / 60);
|
|
5524
|
+
cooldownMins = cooldownMins - cooldownHs * 60;
|
|
5525
|
+
result += "".concat(cooldownHs, " hr. ");
|
|
5526
|
+
}
|
|
5527
|
+
if (cooldownMins > 0) {
|
|
5528
|
+
result += "".concat(cooldownMins, " min. ");
|
|
5529
|
+
}
|
|
5530
|
+
if (cooldownSecs > 0) {
|
|
5531
|
+
result += "".concat(cooldownSecs, " sec. ");
|
|
5532
|
+
}
|
|
5533
|
+
result = result.trim();
|
|
5534
|
+
return result;
|
|
5535
|
+
}
|
|
5536
|
+
else {
|
|
5537
|
+
return "".concat(cooldownInS, " sec.");
|
|
5538
|
+
}
|
|
5539
|
+
}
|
|
5540
|
+
|
|
5541
|
+
function removeDuplicates(stats) {
|
|
5542
|
+
return stats.filter(function (value, index, self) {
|
|
5543
|
+
return index === self.findIndex(function (t) { return t.name === value.name; });
|
|
5544
|
+
});
|
|
5545
|
+
}
|
|
5546
|
+
function ItemStats(item) {
|
|
5547
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_stats" },
|
|
5548
|
+
removeDuplicates(item.stats)
|
|
5549
|
+
.filter(function (x) { return x.isMainStat; })
|
|
5550
|
+
.map(function (mainStat, i) {
|
|
5551
|
+
if (mainStat.name.includes("-min"))
|
|
5552
|
+
return;
|
|
5553
|
+
var statValue = mainStat.value;
|
|
5554
|
+
//minmax
|
|
5555
|
+
if (mainStat.name.includes("-max")) {
|
|
5556
|
+
var minVal = item.stats.find(function (x) { return x.name === mainStat.name.replace("-max", "-min"); }).value;
|
|
5557
|
+
statValue = (mainStat.value + minVal) / 2;
|
|
5558
|
+
}
|
|
5559
|
+
return (React__default["default"].createElement("div", { key: mainStat.name + "_" + i, className: "ItemTooltip_stats_mainstat" },
|
|
5560
|
+
GetStatDisplayValue(statValue, mainStat.isPercentage),
|
|
5561
|
+
"\u00A0",
|
|
5562
|
+
ReplaceBossAndPvpAp(mainStat.name).replace("Max.", "").trim()));
|
|
5563
|
+
}),
|
|
5564
|
+
removeDuplicates(item.stats)
|
|
5565
|
+
.filter(function (x) { return !x.isMainStat; })
|
|
5566
|
+
.map(function (subStat, i) {
|
|
5567
|
+
if (subStat.name.includes("-min"))
|
|
5568
|
+
return;
|
|
5569
|
+
var statValue = subStat.value;
|
|
5570
|
+
//minmax
|
|
5571
|
+
if (subStat.name.includes("-max")) {
|
|
5572
|
+
var minVal = item.stats.find(function (x) { return x.name === subStat.name.replace("-max", "-min"); }).value;
|
|
5573
|
+
statValue = (subStat.value + minVal) / 2;
|
|
5574
|
+
}
|
|
5575
|
+
return (React__default["default"].createElement("div", { key: subStat.name + "_" + i, className: "ItemTooltip_stats_substat" },
|
|
5576
|
+
GetStatDisplayValue(statValue, subStat.isPercentage),
|
|
5577
|
+
"\u00A0",
|
|
5578
|
+
ReplaceBossAndPvpAp(subStat.name).replace("Max.", "").trim()));
|
|
5579
|
+
})));
|
|
5580
|
+
}
|
|
5581
|
+
|
|
5582
|
+
function ItemRandomStats(item) {
|
|
5583
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_stats" }, item.randomStats.map(function (randomStat, i) {
|
|
5584
|
+
return (React__default["default"].createElement("div", { key: randomStat.name + "_" + i, className: randomStat.isMainStat
|
|
5585
|
+
? "ItemTooltip_stats_mainstat"
|
|
5586
|
+
: "ItemTooltip_stats_substat" },
|
|
5587
|
+
GetStatDisplayValue(randomStat.min, randomStat.isPercentage),
|
|
5588
|
+
"~",
|
|
5589
|
+
GetStatDisplayValue(randomStat.max, randomStat.isPercentage),
|
|
5590
|
+
"\u00A0",
|
|
5591
|
+
ReplaceBossAndPvpAp(randomStat.name),
|
|
5592
|
+
React__default["default"].createElement("img", { alt: "", className: "ItemTooltip_itemIconInline ItemTooltip_itemIconRandom", src: BuildIconPath("00015590/Tag_Random") })));
|
|
5593
|
+
})));
|
|
5594
|
+
}
|
|
5595
|
+
|
|
5596
|
+
function GearScore(item) {
|
|
5597
|
+
return (React__default["default"].createElement("div", null,
|
|
5598
|
+
"debug-gs: ",
|
|
5599
|
+
item.gearScore,
|
|
5600
|
+
React__default["default"].createElement("br", null),
|
|
5601
|
+
"debug-is: ",
|
|
5602
|
+
item.itemScore,
|
|
5603
|
+
React__default["default"].createElement("br", null),
|
|
5604
|
+
"debug-fs: ",
|
|
5605
|
+
item.fusionScore));
|
|
5606
|
+
}
|
|
5607
|
+
|
|
5608
|
+
function TopText(item) {
|
|
5609
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_toptext", dangerouslySetInnerHTML: { __html: item.topText } }));
|
|
5610
|
+
}
|
|
5611
|
+
|
|
5612
|
+
function ItemSkillDescriptions(_a) {
|
|
5613
|
+
var item = _a.item, itemCombats = _a.itemCombats, jobstyle = _a.jobstyle;
|
|
5614
|
+
if (item.skills == null || item.skills.length == 0)
|
|
5615
|
+
return null;
|
|
5616
|
+
var computedSkills = item.skills;
|
|
5617
|
+
if (itemCombats) {
|
|
5618
|
+
computedSkills = computedSkills.filter(function (x) { return x.jobstyle === jobstyle; });
|
|
5619
|
+
}
|
|
5620
|
+
computedSkills = computedSkills.filter(function (x) { return x.description != null; });
|
|
5621
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_skilldescs 00008130.UI.Label_Green03_12" }, computedSkills.map(function (skill, i) { return (React__default["default"].createElement("div", { key: skill.title + "_" + i, dangerouslySetInnerHTML: { __html: skill.description } })); })));
|
|
5622
|
+
}
|
|
5623
|
+
|
|
5624
|
+
function SkillModifierGroup(props) {
|
|
5625
|
+
var modifierGroup = props.modifierGroup;
|
|
5626
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null, modifierGroup.modifiers.map(function (modifier, i) { return (React__default["default"].createElement("div", { key: "modifier_" + i },
|
|
5627
|
+
modifier.skills.map(function (skill, i2) { return (React__default["default"].createElement(React__default["default"].Fragment, { key: skill.item2 + "_" + i + "_" + i2 },
|
|
5628
|
+
React__default["default"].createElement("span", { className: "00008130.UI.Vital_LightBlue", dangerouslySetInnerHTML: { __html: skill.item2 } }),
|
|
5629
|
+
i2 != modifier.skills.length - 1 ? React__default["default"].createElement(React__default["default"].Fragment, null, ",\u00A0") : null)); }),
|
|
5630
|
+
"\u00A0",
|
|
5631
|
+
GetTextForVerb(modifier.verb),
|
|
5632
|
+
"\u00A0",
|
|
5633
|
+
Math.abs(modifier.value) / 10,
|
|
5634
|
+
"%")); })));
|
|
5635
|
+
}
|
|
5636
|
+
function GetTextForVerb(verb) {
|
|
5637
|
+
if (verb === "percentDamage")
|
|
5638
|
+
return "Damage increases by";
|
|
5639
|
+
if (verb === "percentCD")
|
|
5640
|
+
return "Cooldown decreases by";
|
|
5641
|
+
return "";
|
|
5642
|
+
}
|
|
5643
|
+
|
|
5644
|
+
function SkillModifiers(props) {
|
|
5645
|
+
var modifierGroups = props.skillModifierGroups;
|
|
5646
|
+
if (props.isSetBonus) {
|
|
5647
|
+
modifierGroups = modifierGroups.filter(function (x) { return x.jobstyle === props.jobstyle; });
|
|
5648
|
+
}
|
|
5649
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_skilldescs 00008130.UI.Label_Green03_12" }, modifierGroups.map(function (skillModifierGroup, i) { return (React__default["default"].createElement(SkillModifierGroup, { key: "skillModifierGroup_" + i, modifierGroup: skillModifierGroup })); })));
|
|
5650
|
+
}
|
|
5651
|
+
|
|
5652
|
+
function SetBonusItems(setBonus) {
|
|
5653
|
+
var items = setBonus.setItems;
|
|
5654
|
+
if (items.length >= 8)
|
|
5655
|
+
return null;
|
|
5656
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_setItemsContainer" },
|
|
5657
|
+
React__default["default"].createElement("div", { className: "ItemTooltip_setItemsSubContainer" }, items.map(function (item, i) {
|
|
5658
|
+
return (React__default["default"].createElement("div", { key: item.itemName + "_" + i, className: "ItemTooltip_setItemIconNameDiv" },
|
|
5659
|
+
item.itemIcon != null ? (React__default["default"].createElement("img", { alt: "", className: "ItemTooltip_itemIconSmall", src: BuildIconPath(item.itemIcon.iconPath) })) : null,
|
|
5660
|
+
React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: item.itemName } })));
|
|
5661
|
+
}))));
|
|
5662
|
+
}
|
|
5663
|
+
|
|
5664
|
+
function SetBonus(props) {
|
|
5665
|
+
var item = props.item, jobstyle = props.jobstyle;
|
|
5666
|
+
return (React__default["default"].createElement("div", { className: "ItemTooltip_setBonus" },
|
|
5667
|
+
React__default["default"].createElement("div", null,
|
|
5668
|
+
item.setBonus.setName != "" ? (React__default["default"].createElement("div", { className: "00008130.UI.Vital_LightBlue", dangerouslySetInnerHTML: { __html: item.setBonus.setName } })) : null,
|
|
5669
|
+
React__default["default"].createElement(SetBonusItems, __assign({}, item.setBonus)),
|
|
5670
|
+
React__default["default"].createElement("div", { className: "ItemTooltip_setContainer" }, item.setBonus.setBonusStages
|
|
5671
|
+
.sort(function (a, b) { return a.setNumber - b.setNumber; })
|
|
5672
|
+
.map(function (setStage) { return (React__default["default"].createElement("div", { key: setStage.setNumber, className: "ItemTooltip_setStageContainer" },
|
|
5673
|
+
React__default["default"].createElement("div", null,
|
|
5674
|
+
React__default["default"].createElement("div", { className: "ItemTooltip_setStageNumber" },
|
|
5675
|
+
React__default["default"].createElement("span", null, setStage.setNumber))),
|
|
5676
|
+
React__default["default"].createElement("div", { className: "ItemTooltip_setStageContent 00008130.UI.Label_Green03_12" },
|
|
5677
|
+
setStage.effects.map(function (effect, i) { return (React__default["default"].createElement("div", { key: i, dangerouslySetInnerHTML: { __html: effect.description } })); }),
|
|
5678
|
+
React__default["default"].createElement(SkillModifiers, { jobstyle: jobstyle, isSetBonus: true, skillModifierGroups: setStage.skillModifiers })))); })))));
|
|
5679
|
+
}
|
|
5680
|
+
|
|
5681
|
+
var css_248z$4 = ".tippy-box {\n max-width: none !important;\n background-color: transparent !important;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;\n transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important; }\n .tippy-box:hover {\n box-shadow: black 0px 20px 60px 0px !important; }\n\n.tippy-content {\n padding: 0 !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ff0084 !important; }\n";
|
|
5577
5682
|
styleInject(css_248z$4);
|
|
5578
5683
|
|
|
5579
5684
|
var ItemTooltipWrapper = function (_a) {
|
|
5580
|
-
var data = _a.data, region = _a.region, children = _a.children, client = _a.client, _b = _a.
|
|
5685
|
+
var data = _a.data, region = _a.region, children = _a.children, client = _a.client, _b = _a.showUpgrade, showUpgrade = _b === void 0 ? false : _b, _c = _a.offline, offline = _c === void 0 ? false : _c, _d = _a.interactive, interactive = _d === void 0 ? true : _d, _e = _a.placement, placement = _e === void 0 ? "right" : _e, _f = _a.debug, debug = _f === void 0 ? false : _f, jobstyleOverride = _a.jobstyleOverride, _g = _a.followCursor, followCursor$1 = _g === void 0 ? false : _g, _h = _a.trigger, trigger = _h === void 0 ? "mouseenter focus" : _h, _j = _a.showArrow, showArrow = _j === void 0 ? true : _j;
|
|
5581
5686
|
var spanRef = React.useRef(null);
|
|
5582
|
-
var
|
|
5687
|
+
var _k = React.useState(null), childRef = _k[0], setChildRef = _k[1];
|
|
5583
5688
|
/**
|
|
5584
5689
|
* Mount the temporary span element.
|
|
5585
5690
|
* retrieve and store the target element's reference.
|
|
@@ -5590,16 +5695,16 @@ var ItemTooltipWrapper = function (_a) {
|
|
|
5590
5695
|
}
|
|
5591
5696
|
return function () { return setChildRef(null); };
|
|
5592
5697
|
}, []);
|
|
5593
|
-
var
|
|
5698
|
+
var _l = React.useState(true), isOffline = _l[0], setIsOffline = _l[1];
|
|
5594
5699
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
5595
5700
|
children,
|
|
5596
|
-
childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, onMount: function () { return setIsOffline(offline); }, placement: placement, animation: "fade", interactive: interactive, content: React__default["default"].createElement(ItemTooltip, { region: region, jobstyleOverride: jobstyleOverride, data: data, offline: isOffline, client: client, debug: debug }), theme: "grade" + data.grade, reference: childRef })) : (React__default["default"].createElement("span", { ref: spanRef, style: { display: "none" } }))));
|
|
5701
|
+
childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, onMount: function () { return setIsOffline(offline); }, placement: placement, animation: "fade", interactive: interactive, content: React__default["default"].createElement(ItemTooltip, { region: region, jobstyleOverride: jobstyleOverride, data: data, offline: isOffline, client: client, showUpgrade: showUpgrade, debug: debug }), theme: "grade" + data.grade, reference: childRef })) : (React__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
|
|
5597
5702
|
};
|
|
5598
5703
|
|
|
5599
5704
|
function ItemIconNameDiv(_a) {
|
|
5600
5705
|
var _this = this;
|
|
5601
5706
|
var _b;
|
|
5602
|
-
var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c;
|
|
5707
|
+
var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c, trigger = _a.trigger, interactive = _a.interactive, showUpgrade = _a.showUpgrade;
|
|
5603
5708
|
var _d = React.useState(), itemData = _d[0], setItemData = _d[1];
|
|
5604
5709
|
React.useEffect(function () {
|
|
5605
5710
|
if (client)
|
|
@@ -5620,7 +5725,7 @@ function ItemIconNameDiv(_a) {
|
|
|
5620
5725
|
if (itemData) {
|
|
5621
5726
|
if (itemData.grade != 0)
|
|
5622
5727
|
return (React__default["default"].createElement("div", { className: "ItemTooltip_itemiconnamediv" },
|
|
5623
|
-
React__default["default"].createElement(ItemTooltipWrapper, { region: region, client: client, data: itemData },
|
|
5728
|
+
React__default["default"].createElement(ItemTooltipWrapper, { showUpgrade: showUpgrade, region: region, client: client, data: itemData, trigger: trigger, interactive: interactive },
|
|
5624
5729
|
React__default["default"].createElement("img", { className: "ItemTooltip_itemIconSmall", alt: "", src: BuildIconPath((_b = itemData.icon) === null || _b === void 0 ? void 0 : _b.iconPath) })),
|
|
5625
5730
|
React__default["default"].createElement("div", { className: "ItemTooltip_itemNameRandomDiv" },
|
|
5626
5731
|
React__default["default"].createElement("span", { className: "TooltipBase_grade-" + itemData.grade, dangerouslySetInnerHTML: { __html: itemData.name } }),
|
|
@@ -5649,7 +5754,7 @@ function DecomposeResults(props) {
|
|
|
5649
5754
|
.filter(function (x) { return x != null; })
|
|
5650
5755
|
.map(function (item, i) {
|
|
5651
5756
|
return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: item.itemId + "-" + item.itemLevel + "_" + i },
|
|
5652
|
-
React__default["default"].createElement(ItemIconNameDiv, { region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
|
|
5757
|
+
React__default["default"].createElement(ItemIconNameDiv, { showUpgrade: props.showUpgrade, region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
|
|
5653
5758
|
item.isRandom ? null : (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
5654
5759
|
"\u00A0",
|
|
5655
5760
|
item.isMinMax ? (React__default["default"].createElement("span", null, GetRangeString(item.min, item.max))) : (React__default["default"].createElement("span", null, GetRangeString(item.min)))))));
|
|
@@ -5702,7 +5807,7 @@ function SealingResult(_a) {
|
|
|
5702
5807
|
return (React__default["default"].createElement("div", null, item.sealing.sealConsumeItems
|
|
5703
5808
|
.filter(function (x) { return x.min != 0; })
|
|
5704
5809
|
.map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
|
|
5705
|
-
React__default["default"].createElement(ItemIconNameDiv, { region: region, item: consumeItem, client: client }),
|
|
5810
|
+
React__default["default"].createElement(ItemIconNameDiv, { showUpgrade: false, region: region, item: consumeItem, client: client }),
|
|
5706
5811
|
"\u00A0",
|
|
5707
5812
|
GetRangeString(consumeItem.min))); })));
|
|
5708
5813
|
}
|
|
@@ -5711,7 +5816,7 @@ function AccountTransfer(_a) {
|
|
|
5711
5816
|
var item = _a.item, client = _a.client, region = _a.region;
|
|
5712
5817
|
return (React__default["default"].createElement("div", null,
|
|
5713
5818
|
item.accountTransfer.requiredItems.map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
|
|
5714
|
-
React__default["default"].createElement(ItemIconNameDiv, { region: region, client: client, item: consumeItem }),
|
|
5819
|
+
React__default["default"].createElement(ItemIconNameDiv, { showUpgrade: false, region: region, client: client, item: consumeItem }),
|
|
5715
5820
|
"\u00A0",
|
|
5716
5821
|
GetRangeString(consumeItem.min))); }),
|
|
5717
5822
|
item.accountTransfer.moneyCost != null &&
|
|
@@ -5720,12 +5825,148 @@ function AccountTransfer(_a) {
|
|
|
5720
5825
|
"\u00A0copper")) : null));
|
|
5721
5826
|
}
|
|
5722
5827
|
|
|
5828
|
+
function Money(_a) {
|
|
5829
|
+
var money = _a.money;
|
|
5830
|
+
var bnsmoney = getMoneyObj(money);
|
|
5831
|
+
if (bnsmoney == null)
|
|
5832
|
+
return null;
|
|
5833
|
+
return (React__default["default"].createElement("div", { className: "NpcTooltip_moneyContainer" },
|
|
5834
|
+
bnsmoney.Gold > 0 ? (React__default["default"].createElement("span", null,
|
|
5835
|
+
bnsmoney.Gold,
|
|
5836
|
+
React__default["default"].createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
|
|
5837
|
+
bnsmoney.Silver > 0 ? (React__default["default"].createElement("span", null,
|
|
5838
|
+
bnsmoney.Silver,
|
|
5839
|
+
React__default["default"].createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
|
|
5840
|
+
bnsmoney.Copper > 0 ? (React__default["default"].createElement("span", null,
|
|
5841
|
+
bnsmoney.Copper,
|
|
5842
|
+
React__default["default"].createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
|
|
5843
|
+
}
|
|
5844
|
+
|
|
5845
|
+
function ItemImproveTooltip(_a) {
|
|
5846
|
+
var _this = this;
|
|
5847
|
+
var data = _a.data, region = _a.region; _a.debug; var _c = _a.offline, offline = _c === void 0 ? false : _c, clientProp = _a.client, _d = _a.fullHeight, fullHeight = _d === void 0 ? false : _d;
|
|
5848
|
+
var _e = React.useState(), client = _e[0], setClient = _e[1];
|
|
5849
|
+
React.useEffect(function () {
|
|
5850
|
+
if (offline)
|
|
5851
|
+
return;
|
|
5852
|
+
if (clientProp == undefined) {
|
|
5853
|
+
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5854
|
+
return __generator(this, function (_a) {
|
|
5855
|
+
setClient(new ItemDownloadClient(region));
|
|
5856
|
+
return [2 /*return*/];
|
|
5857
|
+
});
|
|
5858
|
+
}); })();
|
|
5859
|
+
}
|
|
5860
|
+
else {
|
|
5861
|
+
setClient(clientProp);
|
|
5862
|
+
}
|
|
5863
|
+
}, [offline]);
|
|
5864
|
+
var tooltipBaseProps = {
|
|
5865
|
+
title: "Item Upgrade",
|
|
5866
|
+
grade: 4,
|
|
5867
|
+
id: "item_upgrade_info",
|
|
5868
|
+
icon: "",
|
|
5869
|
+
subtitle: "Info",
|
|
5870
|
+
mainInfos: [],
|
|
5871
|
+
subInfoGroups: [],
|
|
5872
|
+
fullHeight: fullHeight,
|
|
5873
|
+
};
|
|
5874
|
+
if (!offline) {
|
|
5875
|
+
if (data.itemNext != null && data.upgradeOptions != null && data.upgradeOptions.length > 0) {
|
|
5876
|
+
if (data.useMileageSave != null && data.useMileageSave === true && data.upgradeOptions.find(function (x) { return x.isRandom; }) != null)
|
|
5877
|
+
tooltipBaseProps.mainInfos.push(React__default["default"].createElement("div", null, "The upgrade chance is 100% when the pity meter is filled."));
|
|
5878
|
+
// if (data.itemPrev != null) {
|
|
5879
|
+
// tooltipBaseProps.subInfoGroups.push({
|
|
5880
|
+
// title: "Previous Upgrade:",
|
|
5881
|
+
// texts: [
|
|
5882
|
+
// <ItemIconNameDiv showUpgrade={true} client={client} region={region} item={data.itemPrev} interactive={true} />
|
|
5883
|
+
// ]
|
|
5884
|
+
// });
|
|
5885
|
+
// }
|
|
5886
|
+
tooltipBaseProps.subInfoGroups.push({
|
|
5887
|
+
title: "Next Upgrade:",
|
|
5888
|
+
texts: [
|
|
5889
|
+
React__default["default"].createElement(ItemIconNameDiv, { showUpgrade: true, client: client, region: region, item: data.itemNext, interactive: true })
|
|
5890
|
+
]
|
|
5891
|
+
});
|
|
5892
|
+
data.upgradeOptions.forEach(function (upgradeOption, i, _) {
|
|
5893
|
+
var costGroup = {
|
|
5894
|
+
title: "Upgrade option " + (i + 1) + ":",
|
|
5895
|
+
texts: []
|
|
5896
|
+
};
|
|
5897
|
+
if (upgradeOption.isRandom != null && upgradeOption.isRandom === true) {
|
|
5898
|
+
costGroup.texts.push(React__default["default"].createElement("div", { className: "TooltipBase_flex ItemImproveTooltip_moneyContainer" },
|
|
5899
|
+
React__default["default"].createElement("span", { className: "TooltipBase_grade-8" }, "This option has a chance to fail!")));
|
|
5900
|
+
}
|
|
5901
|
+
if (upgradeOption.mainItemCost != null)
|
|
5902
|
+
var mainItems;
|
|
5903
|
+
mainItems.push(upgradeOption.mainItemCost);
|
|
5904
|
+
costGroup.texts.push(React__default["default"].createElement(DecomposeResults, { client: client, region: region, showUpgrade: false, items: mainItems }));
|
|
5905
|
+
if (upgradeOption.subItemCost != null && upgradeOption.subItemCost.length > 0) {
|
|
5906
|
+
costGroup.texts.push(React__default["default"].createElement(DecomposeResults, { client: client, region: region, showUpgrade: false, items: upgradeOption.subItemCost }));
|
|
5907
|
+
}
|
|
5908
|
+
if (upgradeOption.moneyCost != null && upgradeOption.moneyCost > 0) {
|
|
5909
|
+
costGroup.texts.push(React__default["default"].createElement("div", { className: "TooltipBase_flex ItemImproveTooltip_moneyContainer" },
|
|
5910
|
+
React__default["default"].createElement("span", { className: "TooltipBase_grade-6" }, "Money:\u00A0"),
|
|
5911
|
+
React__default["default"].createElement(Money, { money: upgradeOption.moneyCost })));
|
|
5912
|
+
}
|
|
5913
|
+
tooltipBaseProps.subInfoGroups.push(costGroup);
|
|
5914
|
+
});
|
|
5915
|
+
}
|
|
5916
|
+
}
|
|
5917
|
+
if (data.bonusEffectOptions != null && data.bonusEffectOptions.length > 0) {
|
|
5918
|
+
tooltipBaseProps.mainInfos.push(React__default["default"].createElement("div", null, "Random effects can be obtained when upgrading."));
|
|
5919
|
+
var subInfoGroupStats_1 = {
|
|
5920
|
+
title: "Possible Stats:",
|
|
5921
|
+
texts: []
|
|
5922
|
+
};
|
|
5923
|
+
var subInfoGroupEffects_1 = {
|
|
5924
|
+
title: "Possible Effects:",
|
|
5925
|
+
texts: []
|
|
5926
|
+
};
|
|
5927
|
+
data.bonusEffectOptions.forEach(function (option) {
|
|
5928
|
+
if (option.isEffect) {
|
|
5929
|
+
subInfoGroupEffects_1.texts.push(React__default["default"].createElement("div", { className: "ItemImproveTooltip_option", dangerouslySetInnerHTML: { __html: option.effectDescription } }));
|
|
5930
|
+
}
|
|
5931
|
+
else {
|
|
5932
|
+
subInfoGroupStats_1.texts.push(React__default["default"].createElement("div", { className: "ItemImproveTooltip_option 00008130.Program.Fontset_Chatting_Color_19" },
|
|
5933
|
+
option.statValue,
|
|
5934
|
+
"\u00A0",
|
|
5935
|
+
React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: option.statName } })));
|
|
5936
|
+
}
|
|
5937
|
+
});
|
|
5938
|
+
tooltipBaseProps.subInfoGroups.push(subInfoGroupStats_1);
|
|
5939
|
+
tooltipBaseProps.subInfoGroups.push(subInfoGroupEffects_1);
|
|
5940
|
+
}
|
|
5941
|
+
return (React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps)));
|
|
5942
|
+
}
|
|
5943
|
+
|
|
5944
|
+
var ItemImproveTooltipWrapper = function (_a) {
|
|
5945
|
+
var data = _a.data, region = _a.region, children = _a.children, client = _a.client, _b = _a.offline, offline = _b === void 0 ? false : _b, _c = _a.interactive, interactive = _c === void 0 ? true : _c, _d = _a.placement, placement = _d === void 0 ? "right" : _d, _e = _a.debug, debug = _e === void 0 ? false : _e, _f = _a.followCursor, followCursor$1 = _f === void 0 ? false : _f, _g = _a.trigger, trigger = _g === void 0 ? "mouseenter focus" : _g, _h = _a.showArrow, showArrow = _h === void 0 ? true : _h;
|
|
5946
|
+
var spanRef = React.useRef(null);
|
|
5947
|
+
var _j = React.useState(null), childRef = _j[0], setChildRef = _j[1];
|
|
5948
|
+
/**
|
|
5949
|
+
* Mount the temporary span element.
|
|
5950
|
+
* retrieve and store the target element's reference.
|
|
5951
|
+
*/
|
|
5952
|
+
React.useEffect(function () {
|
|
5953
|
+
if (spanRef.current) {
|
|
5954
|
+
setChildRef(spanRef.current.previousElementSibling);
|
|
5955
|
+
}
|
|
5956
|
+
return function () { return setChildRef(null); };
|
|
5957
|
+
}, []);
|
|
5958
|
+
var _k = React.useState(true), isOffline = _k[0], setIsOffline = _k[1];
|
|
5959
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
5960
|
+
children,
|
|
5961
|
+
childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, onMount: function () { return setIsOffline(offline); }, placement: placement, animation: "fade", interactive: interactive, content: React__default["default"].createElement(ItemImproveTooltip, { region: region, data: data, offline: isOffline, client: client, debug: debug }), theme: "grade4", reference: childRef })) : (React__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
|
|
5962
|
+
};
|
|
5963
|
+
|
|
5723
5964
|
function ItemTooltip(_a) {
|
|
5724
5965
|
var _this = this;
|
|
5725
5966
|
var _b, _c, _d;
|
|
5726
|
-
var data = _a.data, region = _a.region, _e = _a.debug, debug = _e === void 0 ? false : _e, _f = _a.offline, offline = _f === void 0 ? false : _f, clientProp = _a.client, jobstyleOverride = _a.jobstyleOverride, _g = _a.fullHeight, fullHeight =
|
|
5727
|
-
var
|
|
5728
|
-
var
|
|
5967
|
+
var data = _a.data, region = _a.region, _e = _a.debug, debug = _e === void 0 ? false : _e, _f = _a.offline, offline = _f === void 0 ? false : _f, clientProp = _a.client, jobstyleOverride = _a.jobstyleOverride, _g = _a.showUpgrade, showUpgrade = _g === void 0 ? false : _g, _h = _a.fullHeight, fullHeight = _h === void 0 ? false : _h;
|
|
5968
|
+
var _j = React.useState("advanced-1"), jobstyle = _j[0], setJobstyle = _j[1];
|
|
5969
|
+
var _k = React.useState(), client = _k[0], setClient = _k[1];
|
|
5729
5970
|
React.useEffect(function () {
|
|
5730
5971
|
if (offline)
|
|
5731
5972
|
return;
|
|
@@ -5798,6 +6039,8 @@ function ItemTooltip(_a) {
|
|
|
5798
6039
|
AddJobstyleToggles(setHasSkillModifiers, tooltipBaseProps.subInfoGroups, jobstyles, jobstyle, setJobstyle);
|
|
5799
6040
|
AddTopText(tooltipBaseProps.subInfoGroups, item);
|
|
5800
6041
|
AddSkillDescriptions(tooltipBaseProps.subInfoGroups, item, itemCombats, jobstyle);
|
|
6042
|
+
if (showUpgrade)
|
|
6043
|
+
AddItemImprove(tooltipBaseProps.subInfoGroups, item, region, client, offline, debug);
|
|
5801
6044
|
AddSkillModifiers(tooltipBaseProps.subInfoGroups, item, false, jobstyle);
|
|
5802
6045
|
AddSetBonus(tooltipBaseProps.subInfoGroups, item, jobstyle);
|
|
5803
6046
|
if (!offline) {
|
|
@@ -5904,21 +6147,21 @@ function AddDecomposeResults(subInfoGroups, item, client, region) {
|
|
|
5904
6147
|
subInfoGroups.push({
|
|
5905
6148
|
title: "Guaranteed/Salvage:",
|
|
5906
6149
|
texts: [
|
|
5907
|
-
React__default["default"].createElement(DecomposeResults, { region: region, items: fixedItems, client: client }),
|
|
6150
|
+
React__default["default"].createElement(DecomposeResults, { showUpgrade: false, region: region, items: fixedItems, client: client }),
|
|
5908
6151
|
],
|
|
5909
6152
|
});
|
|
5910
6153
|
if (randomItems.length > 0)
|
|
5911
6154
|
subInfoGroups.push({
|
|
5912
6155
|
title: "Random:",
|
|
5913
6156
|
texts: [
|
|
5914
|
-
React__default["default"].createElement(DecomposeResults, { region: region, items: randomItems, client: client }),
|
|
6157
|
+
React__default["default"].createElement(DecomposeResults, { showUpgrade: false, region: region, items: randomItems, client: client }),
|
|
5915
6158
|
],
|
|
5916
6159
|
});
|
|
5917
6160
|
if (selectItems.length > 0)
|
|
5918
6161
|
subInfoGroups.push({
|
|
5919
6162
|
title: "Select:",
|
|
5920
6163
|
texts: [
|
|
5921
|
-
React__default["default"].createElement(DecomposeResults, { region: region, items: selectItems, client: client }),
|
|
6164
|
+
React__default["default"].createElement(DecomposeResults, { showUpgrade: false, region: region, items: selectItems, client: client }),
|
|
5922
6165
|
],
|
|
5923
6166
|
});
|
|
5924
6167
|
}
|
|
@@ -6035,6 +6278,19 @@ function AddUnityPoints(subInfoGroups, item) {
|
|
|
6035
6278
|
item.refinementPoints),
|
|
6036
6279
|
],
|
|
6037
6280
|
});
|
|
6281
|
+
}
|
|
6282
|
+
function AddItemImprove(subInfoGroups, item, region, client, offline, debug) {
|
|
6283
|
+
if (item.itemImprove == null)
|
|
6284
|
+
return;
|
|
6285
|
+
var subInfoGroup = {
|
|
6286
|
+
title: "Upgrade Options:",
|
|
6287
|
+
texts: [
|
|
6288
|
+
React__default["default"].createElement("div", { className: "ItemTooltip_optionPadding" },
|
|
6289
|
+
React__default["default"].createElement(ItemImproveTooltipWrapper, { data: item.itemImprove, region: region, trigger: "click", interactive: true, offline: offline, client: client, debug: debug },
|
|
6290
|
+
React__default["default"].createElement("span", { className: "ItemTooltip_showButton" }, "Click to open")))
|
|
6291
|
+
]
|
|
6292
|
+
};
|
|
6293
|
+
subInfoGroups.push(subInfoGroup);
|
|
6038
6294
|
}
|
|
6039
6295
|
|
|
6040
6296
|
var css_248z$3 = "";
|
|
@@ -6370,7 +6626,7 @@ var SkillTooltipWrapper = function (_a) {
|
|
|
6370
6626
|
}, []);
|
|
6371
6627
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
6372
6628
|
children,
|
|
6373
|
-
childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, placement: placement, animation: "fade", interactive: interactive, content: React__default["default"].createElement(SkillTooltip, { data: data, debug: false }), theme: "grade" + 4, reference: childRef })) : (React__default["default"].createElement("span", { ref: spanRef, style: { display: "none" } }))));
|
|
6629
|
+
childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, placement: placement, animation: "fade", interactive: interactive, content: React__default["default"].createElement(SkillTooltip, { data: data, debug: false }), theme: "grade" + 4, reference: childRef })) : (React__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
|
|
6374
6630
|
};
|
|
6375
6631
|
|
|
6376
6632
|
exports.ServerRegion = void 0;
|
|
@@ -6441,23 +6697,6 @@ function GetStringForBuyLimitReset(reset) {
|
|
|
6441
6697
|
}
|
|
6442
6698
|
}
|
|
6443
6699
|
|
|
6444
|
-
function Money(_a) {
|
|
6445
|
-
var money = _a.money;
|
|
6446
|
-
var bnsmoney = getMoneyObj(money);
|
|
6447
|
-
if (bnsmoney == null)
|
|
6448
|
-
return null;
|
|
6449
|
-
return (React__default["default"].createElement("div", { className: "NpcTooltip_moneyContainer" },
|
|
6450
|
-
bnsmoney.Gold > 0 ? (React__default["default"].createElement("span", null,
|
|
6451
|
-
bnsmoney.Gold,
|
|
6452
|
-
React__default["default"].createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
|
|
6453
|
-
bnsmoney.Silver > 0 ? (React__default["default"].createElement("span", null,
|
|
6454
|
-
bnsmoney.Silver,
|
|
6455
|
-
React__default["default"].createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
|
|
6456
|
-
bnsmoney.Copper > 0 ? (React__default["default"].createElement("span", null,
|
|
6457
|
-
bnsmoney.Copper,
|
|
6458
|
-
React__default["default"].createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
|
|
6459
|
-
}
|
|
6460
|
-
|
|
6461
6700
|
function StoreItemBuyPriceEntry(_a) {
|
|
6462
6701
|
var _this = this;
|
|
6463
6702
|
var itemRef = _a.itemRef, client = _a.client;
|
|
@@ -6562,11 +6801,13 @@ function NpcTooltip(_a) {
|
|
|
6562
6801
|
subInfoGroups: [],
|
|
6563
6802
|
};
|
|
6564
6803
|
//no top part
|
|
6565
|
-
AddStoreToggles(tooltipBaseProps.subInfoGroups,
|
|
6566
|
-
AddStores(tooltipBaseProps.subInfoGroups,
|
|
6804
|
+
AddStoreToggles(tooltipBaseProps.subInfoGroups, activeTab, setActiveTab, npc.Stores);
|
|
6805
|
+
AddStores(tooltipBaseProps.subInfoGroups, activeTab, client, npc.Stores);
|
|
6567
6806
|
return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
|
|
6568
6807
|
}
|
|
6569
|
-
function AddStoreToggles(subInfoGroups,
|
|
6808
|
+
function AddStoreToggles(subInfoGroups, activeTab, setActiveTab, Stores) {
|
|
6809
|
+
if (Stores == null || Stores.length <= 0)
|
|
6810
|
+
return;
|
|
6570
6811
|
subInfoGroups.push({
|
|
6571
6812
|
title: "",
|
|
6572
6813
|
texts: [
|
|
@@ -6574,7 +6815,9 @@ function AddStoreToggles(subInfoGroups, Stores, activeTab, setActiveTab) {
|
|
|
6574
6815
|
],
|
|
6575
6816
|
});
|
|
6576
6817
|
}
|
|
6577
|
-
function AddStores(subInfoGroups,
|
|
6818
|
+
function AddStores(subInfoGroups, activeTab, client, Stores) {
|
|
6819
|
+
if (Stores == null || Stores.length <= 0)
|
|
6820
|
+
return;
|
|
6578
6821
|
subInfoGroups.push({
|
|
6579
6822
|
title: "",
|
|
6580
6823
|
texts: [
|
|
@@ -6584,6 +6827,8 @@ function AddStores(subInfoGroups, Stores, activeTab, client) {
|
|
|
6584
6827
|
}
|
|
6585
6828
|
|
|
6586
6829
|
exports.GetCooldownString = GetCooldownString;
|
|
6830
|
+
exports.ItemImproveTooltip = ItemImproveTooltip;
|
|
6831
|
+
exports.ItemImproveTooltipWrapper = ItemImproveTooltipWrapper;
|
|
6587
6832
|
exports.ItemTooltip = ItemTooltip;
|
|
6588
6833
|
exports.ItemTooltipWrapper = ItemTooltipWrapper;
|
|
6589
6834
|
exports.JsonTooltip = JsonTooltip;
|