bnstooltips 1.6.4 → 2.0.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/index.js CHANGED
@@ -58,8 +58,8 @@ function styleInject(css, ref) {
58
58
  }
59
59
  }
60
60
 
61
- var css_248z$7 = "*[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.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$7);
61
+ var css_248z$6 = "*[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.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$6);
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$6 = ".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_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$6);
164
+ var css_248z$5 = ".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_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$5);
166
166
 
167
167
  function BuildIconPath(iconPath, iconIndex) {
168
168
  if (iconPath == null)
@@ -1308,9 +1308,14 @@ function GetCooldownString(cooldownInMs) {
1308
1308
  }
1309
1309
  }
1310
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
+ }
1311
1316
  function ItemStats(item) {
1312
1317
  return (React__default["default"].createElement("div", { className: "ItemTooltip_stats" },
1313
- item.stats
1318
+ removeDuplicates(item.stats)
1314
1319
  .filter(function (x) { return x.isMainStat; })
1315
1320
  .map(function (mainStat, i) {
1316
1321
  if (mainStat.name.includes("-min"))
@@ -1326,7 +1331,7 @@ function ItemStats(item) {
1326
1331
  "\u00A0",
1327
1332
  ReplaceBossAndPvpAp(mainStat.name).replace("Max.", "").trim()));
1328
1333
  }),
1329
- item.stats
1334
+ removeDuplicates(item.stats)
1330
1335
  .filter(function (x) { return !x.isMainStat; })
1331
1336
  .map(function (subStat, i) {
1332
1337
  if (subStat.name.includes("-min"))
@@ -1443,9 +1448,6 @@ function SetBonus(props) {
1443
1448
  React__default["default"].createElement(SkillModifiers, { jobstyle: jobstyle, isSetBonus: true, skillModifierGroups: setStage.skillModifiers })))); })))));
1444
1449
  }
1445
1450
 
1446
- var css_248z$5 = ".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";
1447
- styleInject(css_248z$5);
1448
-
1449
1451
  var top = 'top';
1450
1452
  var bottom = 'bottom';
1451
1453
  var right = 'right';
@@ -1602,29 +1604,32 @@ function getBasePlacement$1(placement) {
1602
1604
  return placement.split('-')[0];
1603
1605
  }
1604
1606
 
1605
- // import { isHTMLElement } from './instanceOf';
1606
- function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars
1607
- includeScale) {
1607
+ var max = Math.max;
1608
+ var min = Math.min;
1609
+ var round = Math.round;
1610
+
1611
+ function getBoundingClientRect(element, includeScale) {
1612
+ if (includeScale === void 0) {
1613
+ includeScale = false;
1614
+ }
1608
1615
 
1609
1616
  var rect = element.getBoundingClientRect();
1610
1617
  var scaleX = 1;
1611
- var scaleY = 1; // FIXME:
1612
- // `offsetWidth` returns an integer while `getBoundingClientRect`
1613
- // returns a float. This results in `scaleX` or `scaleY` being
1614
- // non-1 when it should be for elements that aren't a full pixel in
1615
- // width or height.
1616
- // if (isHTMLElement(element) && includeScale) {
1617
- // const offsetHeight = element.offsetHeight;
1618
- // const offsetWidth = element.offsetWidth;
1619
- // // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
1620
- // // Fallback to 1 in case both values are `0`
1621
- // if (offsetWidth > 0) {
1622
- // scaleX = rect.width / offsetWidth || 1;
1623
- // }
1624
- // if (offsetHeight > 0) {
1625
- // scaleY = rect.height / offsetHeight || 1;
1626
- // }
1627
- // }
1618
+ var scaleY = 1;
1619
+
1620
+ if (isHTMLElement(element) && includeScale) {
1621
+ var offsetHeight = element.offsetHeight;
1622
+ var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
1623
+ // Fallback to 1 in case both values are `0`
1624
+
1625
+ if (offsetWidth > 0) {
1626
+ scaleX = round(rect.width) / offsetWidth || 1;
1627
+ }
1628
+
1629
+ if (offsetHeight > 0) {
1630
+ scaleY = round(rect.height) / offsetHeight || 1;
1631
+ }
1632
+ }
1628
1633
 
1629
1634
  return {
1630
1635
  width: rect.width / scaleX,
@@ -1743,6 +1748,10 @@ function getContainingBlock(element) {
1743
1748
 
1744
1749
  var currentNode = getParentNode(element);
1745
1750
 
1751
+ if (isShadowRoot(currentNode)) {
1752
+ currentNode = currentNode.host;
1753
+ }
1754
+
1746
1755
  while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
1747
1756
  var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
1748
1757
  // create a containing block.
@@ -1779,13 +1788,13 @@ function getMainAxisFromPlacement(placement) {
1779
1788
  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
1780
1789
  }
1781
1790
 
1782
- var max = Math.max;
1783
- var min = Math.min;
1784
- var round = Math.round;
1785
-
1786
1791
  function within(min$1, value, max$1) {
1787
1792
  return max(min$1, min(value, max$1));
1788
1793
  }
1794
+ function withinMaxClamp(min, value, max) {
1795
+ var v = within(min, value, max);
1796
+ return v > max ? max : v;
1797
+ }
1789
1798
 
1790
1799
  function getFreshSideObject() {
1791
1800
  return {
@@ -1917,8 +1926,8 @@ function roundOffsetsByDPR(_ref) {
1917
1926
  var win = window;
1918
1927
  var dpr = win.devicePixelRatio || 1;
1919
1928
  return {
1920
- x: round(round(x * dpr) / dpr) || 0,
1921
- y: round(round(y * dpr) / dpr) || 0
1929
+ x: round(x * dpr) / dpr || 0,
1930
+ y: round(y * dpr) / dpr || 0
1922
1931
  };
1923
1932
  }
1924
1933
 
@@ -1933,14 +1942,23 @@ function mapToStyles(_ref2) {
1933
1942
  position = _ref2.position,
1934
1943
  gpuAcceleration = _ref2.gpuAcceleration,
1935
1944
  adaptive = _ref2.adaptive,
1936
- roundOffsets = _ref2.roundOffsets;
1937
-
1938
- var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
1939
- _ref3$x = _ref3.x,
1940
- x = _ref3$x === void 0 ? 0 : _ref3$x,
1941
- _ref3$y = _ref3.y,
1942
- y = _ref3$y === void 0 ? 0 : _ref3$y;
1945
+ roundOffsets = _ref2.roundOffsets,
1946
+ isFixed = _ref2.isFixed;
1947
+ var _offsets$x = offsets.x,
1948
+ x = _offsets$x === void 0 ? 0 : _offsets$x,
1949
+ _offsets$y = offsets.y,
1950
+ y = _offsets$y === void 0 ? 0 : _offsets$y;
1951
+
1952
+ var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
1953
+ x: x,
1954
+ y: y
1955
+ }) : {
1956
+ x: x,
1957
+ y: y
1958
+ };
1943
1959
 
1960
+ x = _ref3.x;
1961
+ y = _ref3.y;
1944
1962
  var hasX = offsets.hasOwnProperty('x');
1945
1963
  var hasY = offsets.hasOwnProperty('y');
1946
1964
  var sideX = left;
@@ -1965,16 +1983,18 @@ function mapToStyles(_ref2) {
1965
1983
  offsetParent = offsetParent;
1966
1984
 
1967
1985
  if (placement === top || (placement === left || placement === right) && variation === end) {
1968
- sideY = bottom; // $FlowFixMe[prop-missing]
1969
-
1970
- y -= offsetParent[heightProp] - popperRect.height;
1986
+ sideY = bottom;
1987
+ var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
1988
+ offsetParent[heightProp];
1989
+ y -= offsetY - popperRect.height;
1971
1990
  y *= gpuAcceleration ? 1 : -1;
1972
1991
  }
1973
1992
 
1974
1993
  if (placement === left || (placement === top || placement === bottom) && variation === end) {
1975
- sideX = right; // $FlowFixMe[prop-missing]
1976
-
1977
- x -= offsetParent[widthProp] - popperRect.width;
1994
+ sideX = right;
1995
+ var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
1996
+ offsetParent[widthProp];
1997
+ x -= offsetX - popperRect.width;
1978
1998
  x *= gpuAcceleration ? 1 : -1;
1979
1999
  }
1980
2000
  }
@@ -1983,6 +2003,17 @@ function mapToStyles(_ref2) {
1983
2003
  position: position
1984
2004
  }, adaptive && unsetSides);
1985
2005
 
2006
+ var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
2007
+ x: x,
2008
+ y: y
2009
+ }) : {
2010
+ x: x,
2011
+ y: y
2012
+ };
2013
+
2014
+ x = _ref4.x;
2015
+ y = _ref4.y;
2016
+
1986
2017
  if (gpuAcceleration) {
1987
2018
  var _Object$assign;
1988
2019
 
@@ -1992,9 +2023,9 @@ function mapToStyles(_ref2) {
1992
2023
  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
1993
2024
  }
1994
2025
 
1995
- function computeStyles(_ref4) {
1996
- var state = _ref4.state,
1997
- options = _ref4.options;
2026
+ function computeStyles(_ref5) {
2027
+ var state = _ref5.state,
2028
+ options = _ref5.options;
1998
2029
  var _options$gpuAccelerat = options.gpuAcceleration,
1999
2030
  gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
2000
2031
  _options$adaptive = options.adaptive,
@@ -2017,7 +2048,8 @@ function computeStyles(_ref4) {
2017
2048
  variation: getVariation(state.placement),
2018
2049
  popper: state.elements.popper,
2019
2050
  popperRect: state.rects.popper,
2020
- gpuAcceleration: gpuAcceleration
2051
+ gpuAcceleration: gpuAcceleration,
2052
+ isFixed: state.options.strategy === 'fixed'
2021
2053
  };
2022
2054
 
2023
2055
  if (state.modifiersData.popperOffsets != null) {
@@ -2275,7 +2307,7 @@ function getInnerBoundingClientRect(element) {
2275
2307
  }
2276
2308
 
2277
2309
  function getClientRectFromMixedType(element, clippingParent) {
2278
- return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
2310
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement$1(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
2279
2311
  } // A "clipping parent" is an overflowable container with the characteristic of
2280
2312
  // clipping (or hiding) overflowing elements with a position different from
2281
2313
  // `initial`
@@ -2792,6 +2824,14 @@ function preventOverflow(_ref) {
2792
2824
  var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
2793
2825
  placement: state.placement
2794
2826
  })) : tetherOffset;
2827
+ var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
2828
+ mainAxis: tetherOffsetValue,
2829
+ altAxis: tetherOffsetValue
2830
+ } : Object.assign({
2831
+ mainAxis: 0,
2832
+ altAxis: 0
2833
+ }, tetherOffsetValue);
2834
+ var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
2795
2835
  var data = {
2796
2836
  x: 0,
2797
2837
  y: 0
@@ -2801,13 +2841,15 @@ function preventOverflow(_ref) {
2801
2841
  return;
2802
2842
  }
2803
2843
 
2804
- if (checkMainAxis || checkAltAxis) {
2844
+ if (checkMainAxis) {
2845
+ var _offsetModifierState$;
2846
+
2805
2847
  var mainSide = mainAxis === 'y' ? top : left;
2806
2848
  var altSide = mainAxis === 'y' ? bottom : right;
2807
2849
  var len = mainAxis === 'y' ? 'height' : 'width';
2808
2850
  var offset = popperOffsets[mainAxis];
2809
- var min$1 = popperOffsets[mainAxis] + overflow[mainSide];
2810
- var max$1 = popperOffsets[mainAxis] - overflow[altSide];
2851
+ var min$1 = offset + overflow[mainSide];
2852
+ var max$1 = offset - overflow[altSide];
2811
2853
  var additive = tether ? -popperRect[len] / 2 : 0;
2812
2854
  var minLen = variation === start ? referenceRect[len] : popperRect[len];
2813
2855
  var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
@@ -2827,36 +2869,45 @@ function preventOverflow(_ref) {
2827
2869
  // width or height)
2828
2870
 
2829
2871
  var arrowLen = within(0, referenceRect[len], arrowRect[len]);
2830
- var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
2831
- var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
2872
+ var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
2873
+ var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
2832
2874
  var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
2833
2875
  var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
2834
- var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
2835
- var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
2836
- var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;
2876
+ var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
2877
+ var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
2878
+ var tetherMax = offset + maxOffset - offsetModifierValue;
2879
+ var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
2880
+ popperOffsets[mainAxis] = preventedOffset;
2881
+ data[mainAxis] = preventedOffset - offset;
2882
+ }
2837
2883
 
2838
- if (checkMainAxis) {
2839
- var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
2840
- popperOffsets[mainAxis] = preventedOffset;
2841
- data[mainAxis] = preventedOffset - offset;
2842
- }
2884
+ if (checkAltAxis) {
2885
+ var _offsetModifierState$2;
2843
2886
 
2844
- if (checkAltAxis) {
2845
- var _mainSide = mainAxis === 'x' ? top : left;
2887
+ var _mainSide = mainAxis === 'x' ? top : left;
2846
2888
 
2847
- var _altSide = mainAxis === 'x' ? bottom : right;
2889
+ var _altSide = mainAxis === 'x' ? bottom : right;
2848
2890
 
2849
- var _offset = popperOffsets[altAxis];
2891
+ var _offset = popperOffsets[altAxis];
2850
2892
 
2851
- var _min = _offset + overflow[_mainSide];
2893
+ var _len = altAxis === 'y' ? 'height' : 'width';
2852
2894
 
2853
- var _max = _offset - overflow[_altSide];
2895
+ var _min = _offset + overflow[_mainSide];
2854
2896
 
2855
- var _preventedOffset = within(tether ? min(_min, tetherMin) : _min, _offset, tether ? max(_max, tetherMax) : _max);
2897
+ var _max = _offset - overflow[_altSide];
2856
2898
 
2857
- popperOffsets[altAxis] = _preventedOffset;
2858
- data[altAxis] = _preventedOffset - _offset;
2859
- }
2899
+ var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
2900
+
2901
+ var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
2902
+
2903
+ var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
2904
+
2905
+ var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
2906
+
2907
+ var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
2908
+
2909
+ popperOffsets[altAxis] = _preventedOffset;
2910
+ data[altAxis] = _preventedOffset - _offset;
2860
2911
  }
2861
2912
 
2862
2913
  state.modifiersData[name] = data;
@@ -2888,8 +2939,8 @@ function getNodeScroll(node) {
2888
2939
 
2889
2940
  function isElementScaled(element) {
2890
2941
  var rect = element.getBoundingClientRect();
2891
- var scaleX = rect.width / element.offsetWidth || 1;
2892
- var scaleY = rect.height / element.offsetHeight || 1;
2942
+ var scaleX = round(rect.width) / element.offsetWidth || 1;
2943
+ var scaleY = round(rect.height) / element.offsetHeight || 1;
2893
2944
  return scaleX !== 1 || scaleY !== 1;
2894
2945
  } // Returns the composite rect of an element relative to its offsetParent.
2895
2946
  // Composite means it takes into account transforms as well as layout.
@@ -2901,9 +2952,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
2901
2952
  }
2902
2953
 
2903
2954
  var isOffsetParentAnElement = isHTMLElement(offsetParent);
2904
- isHTMLElement(offsetParent) && isElementScaled(offsetParent);
2955
+ var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
2905
2956
  var documentElement = getDocumentElement(offsetParent);
2906
- var rect = getBoundingClientRect(elementOrVirtualElement);
2957
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
2907
2958
  var scroll = {
2908
2959
  scrollLeft: 0,
2909
2960
  scrollTop: 0
@@ -2920,7 +2971,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
2920
2971
  }
2921
2972
 
2922
2973
  if (isHTMLElement(offsetParent)) {
2923
- offsets = getBoundingClientRect(offsetParent);
2974
+ offsets = getBoundingClientRect(offsetParent, true);
2924
2975
  offsets.x += offsetParent.clientLeft;
2925
2976
  offsets.y += offsetParent.clientTop;
2926
2977
  } else if (documentElement) {
@@ -5571,1019 +5622,1129 @@ var Tippy = index;
5571
5622
  var css_248z$4 = ".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}";
5572
5623
  styleInject(css_248z$4);
5573
5624
 
5574
- var ItemTooltipWrapper = function (_a) {
5575
- 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, jobstyleOverride = _a.jobstyleOverride, _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;
5576
- var spanRef = React.useRef(null);
5577
- var _j = React.useState(null), childRef = _j[0], setChildRef = _j[1];
5578
- /**
5579
- * Mount the temporary span element.
5580
- * retrieve and store the target element's reference.
5581
- */
5582
- React.useEffect(function () {
5583
- if (spanRef.current) {
5584
- setChildRef(spanRef.current.previousElementSibling);
5585
- }
5586
- return function () { return setChildRef(null); };
5587
- }, []);
5588
- var _k = React.useState(true), isOffline = _k[0], setIsOffline = _k[1];
5589
- return (React__default["default"].createElement(React__default["default"].Fragment, null,
5590
- children,
5591
- 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" } }))));
5592
- };
5593
-
5594
- function ItemIconNameDiv(_a) {
5595
- var _this = this;
5596
- var _b;
5597
- var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c;
5598
- var _d = React.useState(), itemData = _d[0], setItemData = _d[1];
5599
- React.useEffect(function () {
5600
- if (client)
5601
- (function () { return __awaiter(_this, void 0, void 0, function () {
5602
- var _a;
5603
- return __generator(this, function (_b) {
5604
- switch (_b.label) {
5605
- case 0:
5606
- _a = setItemData;
5607
- return [4 /*yield*/, client.GetItem(item.itemId, item.itemLevel)];
5608
- case 1:
5609
- _a.apply(void 0, [_b.sent()]);
5610
- return [2 /*return*/];
5611
- }
5612
- });
5613
- }); })();
5614
- }, [item, client]);
5615
- if (itemData) {
5616
- if (itemData.grade != 0)
5617
- return (React__default["default"].createElement("div", { className: "ItemTooltip_itemiconnamediv" },
5618
- React__default["default"].createElement(ItemTooltipWrapper, { region: region, client: client, data: itemData },
5619
- React__default["default"].createElement("img", { className: "ItemTooltip_itemIconSmall", alt: "", src: BuildIconPath((_b = itemData.icon) === null || _b === void 0 ? void 0 : _b.iconPath) })),
5620
- React__default["default"].createElement("div", { className: "ItemTooltip_itemNameRandomDiv" },
5621
- React__default["default"].createElement("span", { className: "TooltipBase_grade-" + itemData.grade, dangerouslySetInnerHTML: { __html: itemData.name } }),
5622
- showRandomIcon ? (React__default["default"].createElement(React__default["default"].Fragment, null,
5623
- "\u00A0",
5624
- React__default["default"].createElement("div", null,
5625
- React__default["default"].createElement("img", { style: {
5626
- width: 36,
5627
- height: 18,
5628
- margin: "0 1px",
5629
- top: 4,
5630
- position: "relative",
5631
- }, alt: "", src: "https://lean.bns.tools/bns/icons/00015590/Tag_Random.png" })))) : null)));
5632
- else
5633
- return null;
5625
+ var TooltipWrapperSettings = /** @class */ (function () {
5626
+ function TooltipWrapperSettings(followCursor, interactive, placement, trigger, showArrow) {
5627
+ if (followCursor === void 0) { followCursor = false; }
5628
+ if (interactive === void 0) { interactive = true; }
5629
+ if (placement === void 0) { placement = "right"; }
5630
+ if (trigger === void 0) { trigger = "mouseenter focus"; }
5631
+ if (showArrow === void 0) { showArrow = true; }
5632
+ this.followCursor = followCursor;
5633
+ this.interactive = interactive;
5634
+ this.placement = placement;
5635
+ this.trigger = trigger;
5636
+ this.showArrow = showArrow;
5634
5637
  }
5635
- else {
5636
- return (React__default["default"].createElement("div", { className: "ItemTooltip_itemIconLoading" },
5637
- React__default["default"].createElement("div", { className: "dot-elastic" })));
5638
- }
5639
- }
5638
+ return TooltipWrapperSettings;
5639
+ }());
5640
5640
 
5641
- function DecomposeResults(props) {
5642
- if (props.client)
5643
- return (React__default["default"].createElement("div", null, props.items
5644
- .filter(function (x) { return x != null; })
5645
- .map(function (item, i) {
5646
- return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: item.itemId + "-" + item.itemLevel + "_" + i },
5647
- React__default["default"].createElement(ItemIconNameDiv, { region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
5648
- item.isRandom ? null : (React__default["default"].createElement(React__default["default"].Fragment, null,
5649
- "\u00A0",
5650
- item.isMinMax ? (React__default["default"].createElement("span", null, GetRangeString(item.min, item.max))) : (React__default["default"].createElement("span", null, GetRangeString(item.min)))))));
5651
- })));
5652
- else
5653
- return null;
5654
- }
5641
+ var css_248z$3 = ".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";
5642
+ styleInject(css_248z$3);
5655
5643
 
5656
- function SetBonusToggle(_a) {
5657
- var jobstyles = _a.jobstyles, jobstyle = _a.jobstyle, setJobstyle = _a.setJobstyle;
5658
- return (React__default["default"].createElement("div", { className: "ItemTooltip_jobstyleToggleContainer" }, jobstyles.map(function (style) { return (React__default["default"].createElement("button", { key: style, className: "ItemTooltip_jobstyleButton" +
5659
- (style === jobstyle ? " ItemTooltip_jobstyleButton-active" : ""), onClick: function (e) {
5660
- e.stopPropagation();
5661
- setJobstyle(style);
5662
- } }, GetJobStyleNameString(style))); })));
5663
- }
5644
+ var css_248z$2 = ".SkillTooltip_skillIconContainer {\n width: 60px;\n height: 60px;\n padding: 0;\n float: left;\n position: relative; }\n\n.SkillTooltip_skillIcon {\n width: 60px;\n height: 60px; }\n\n.SkillTooltip_buttonIcon {\n position: absolute;\n right: 1px;\n bottom: 1px;\n height: 18px;\n opacity: 0.9; }\n\n.SkillTooltip_buttonIconMouse {\n background-color: rgba(0, 0, 0, 0.8); }\n\n.SkillTooltip_mainText {\n font-weight: 500; }\n\n.SkillTooltip_smallText {\n font-size: 12px; }\n\n.SkillTooltip_subTextMargin {\n margin-bottom: 0.3rem; }\n\n.SkillTooltip_boundaryContainer {\n display: flex;\n width: 100%;\n margin-bottom: 0.5rem;\n line-height: 17px; }\n\n.SkillTooltip_boundary {\n flex: 1;\n flex-basis: 0px;\n min-width: 0;\n display: flex;\n flex-direction: column;\n color: black;\n margin: 0.15rem; }\n\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryHead {\n border-radius: 3px 0 0 0; }\n\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryHead {\n border-radius: 0 3px 0 0; }\n\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 0 3px; }\n\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 3px 0; }\n\n.SkillTooltip_boundaryHead {\n color: white;\n font-weight: 500;\n font-size: 12px;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0.3rem;\n text-align: center;\n flex: 1;\n min-height: 26px;\n background-color: rgba(127, 127, 127, 0.4); }\n\n.SkillTooltip_boundaryBody {\n color: white;\n padding: 0.5rem 0.3rem;\n margin-top: 0.15rem;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40px;\n flex: 2;\n background-color: rgba(127, 127, 127, 0.4); }\n\n.SkillTooltip_boundaryBodyModifier {\n min-height: 33px !important; }\n\n.SkillTooltip_boundaryHasIcon {\n min-height: 50px !important; }\n\n.SkillTooltip_conditionRow {\n display: flex;\n align-items: center;\n font-size: 12px; }\n\n.SkillTooltip_conditionRow:not(:last-of-type) {\n margin-bottom: 0.1rem; }\n\n.SkillTooltip_conditionIcon {\n width: 20px;\n height: 20px;\n margin-right: 0.33rem; }\n\n.SkillTooltip_conditionIconSmall {\n width: 12px;\n height: 12px;\n margin-right: 0.22rem; }\n\n.tooltipArg {\n color: #46bee1;\n font-weight: 600; }\n\n.target-360 {\n background-image: url(\"./360.png\");\n background-repeat: no-repeat;\n background-position: 50% 60%;\n background-size: auto 64px; }\n\n.target-front-180 {\n background-image: url(\"./180.png\");\n background-repeat: no-repeat;\n background-position: 50% 70%;\n background-size: auto 64px; }\n\n.laser {\n background-image: url(\"./laser.png\");\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: auto 64px; }\n";
5645
+ styleInject(css_248z$2);
5664
5646
 
5665
- function ItemDescriptionText(_a) {
5666
- var htmlString = _a.htmlString;
5667
- var textSplit = htmlString.replace("<br/>", "<br />").split("<br />");
5668
- return (React__default["default"].createElement("div", { className: "ItemTooltip_descriptions TooltipBase_flex-col" }, textSplit.map(function (htmlText, i) { return (React__default["default"].createElement("span", { key: i, dangerouslySetInnerHTML: {
5669
- __html: ReplaceIconsInHtmlString(htmlText),
5670
- } })); })));
5647
+ function getButtonIconPath(button) {
5648
+ var _a;
5649
+ if (buttonIconMapping.find(function (x) { return x.button === button; }) == null)
5650
+ return null;
5651
+ return ("/00072858" + ((_a = buttonIconMapping.find(function (x) { return x.button === button; })) === null || _a === void 0 ? void 0 : _a.path));
5652
+ }
5653
+ var buttonIconMapping = [
5654
+ {
5655
+ button: "F",
5656
+ path: "/Key_Alphabet_F",
5657
+ },
5658
+ {
5659
+ button: "Q",
5660
+ path: "/Key_Alphabet_Q",
5661
+ },
5662
+ {
5663
+ button: "E",
5664
+ path: "/Key_Alphabet_E",
5665
+ },
5666
+ {
5667
+ button: "S",
5668
+ path: "/Key_Alphabet_S",
5669
+ },
5670
+ {
5671
+ button: "Z",
5672
+ path: "/Key_Alphabet_Z",
5673
+ },
5674
+ {
5675
+ button: "X",
5676
+ path: "/Key_Alphabet_X",
5677
+ },
5678
+ {
5679
+ button: "C",
5680
+ path: "/Key_Alphabet_C",
5681
+ },
5682
+ {
5683
+ button: "V",
5684
+ path: "/Key_Alphabet_V",
5685
+ },
5686
+ {
5687
+ button: "W",
5688
+ path: "/Key_Alphabet_W",
5689
+ },
5690
+ {
5691
+ button: "G",
5692
+ path: "/Key_Alphabet_G",
5693
+ },
5694
+ {
5695
+ button: "B",
5696
+ path: "/Key_Alphabet_B",
5697
+ },
5698
+ {
5699
+ button: "SPACE",
5700
+ path: "/Key_Space_Big",
5701
+ },
5702
+ {
5703
+ button: "TAB",
5704
+ path: "/Key_Tab_Big",
5705
+ },
5706
+ {
5707
+ button: "1",
5708
+ path: "/Key_Num_1",
5709
+ },
5710
+ {
5711
+ button: "2",
5712
+ path: "/Key_Num_2",
5713
+ },
5714
+ {
5715
+ button: "3",
5716
+ path: "/Key_Num_3",
5717
+ },
5718
+ {
5719
+ button: "4",
5720
+ path: "/Key_Num_4",
5721
+ },
5722
+ {
5723
+ button: "LMB",
5724
+ path: "/GameUI_Tag_MouseL",
5725
+ },
5726
+ {
5727
+ button: "RMB",
5728
+ path: "/GameUI_Tag_MouseR",
5729
+ },
5730
+ ];
5731
+
5732
+ function SkillIconWithButton(_a) {
5733
+ var skill = _a.skill;
5734
+ return (React__default["default"].createElement("div", { className: "SkillTooltip_skillIconContainer" },
5735
+ React__default["default"].createElement("img", { className: "SkillTooltip_skillIcon", src: BuildIconPath(skill.IconPath, skill.IconIndex - 1), alt: "" }),
5736
+ getButtonIconPath(getNormalizedButton(skill)) ? (React__default["default"].createElement("img", { className: "SkillTooltip_buttonIcon" +
5737
+ " " +
5738
+ (getNormalizedButton(skill) === "RMB" ||
5739
+ getNormalizedButton(skill) === "LMB"
5740
+ ? "SkillTooltip_buttonIconMouse"
5741
+ : ""), src: BuildIconPath(getButtonIconPath(getNormalizedButton(skill))), alt: "" })) : null));
5671
5742
  }
5672
5743
 
5673
- function RawText(_a) {
5674
- var htmlString = _a.htmlString;
5675
- return (React__default["default"].createElement("div", { className: "ItemTooltip_raw", dangerouslySetInnerHTML: { __html: htmlString } }));
5744
+ function SkillTooltipBoundary(_a) {
5745
+ var head = _a.head, body = _a.body, _b = _a.bodyClass, bodyClass = _b === void 0 ? "" : _b, _c = _a.pvpModifier, pvpModifier = _c === void 0 ? false : _c, _d = _a.hasIcon, hasIcon = _d === void 0 ? false : _d;
5746
+ return (React__default["default"].createElement("div", { className: "SkillTooltip_boundary" },
5747
+ React__default["default"].createElement("div", { className: "SkillTooltip_boundaryHead" }, head),
5748
+ React__default["default"].createElement("div", { className: "SkillTooltip_boundaryBody " +
5749
+ (pvpModifier ? "SkillTooltip_boundaryBodyModifier " : "") +
5750
+ bodyClass +
5751
+ (hasIcon ? " SkillTooltip_boundaryHasIcon " : "") }, body)));
5676
5752
  }
5677
5753
 
5678
- function TextWithNumber(_a) {
5679
- var text = _a.text, number = _a.number;
5680
- return (React__default["default"].createElement("div", null,
5681
- text,
5682
- number));
5754
+ function SkillTooltipBoundaryContainer(_a) {
5755
+ var children = _a.children;
5756
+ return React__default["default"].createElement("div", { className: "SkillTooltip_boundaryContainer" }, children);
5683
5757
  }
5684
5758
 
5685
- function StringEnumerationWithText(_a) {
5686
- var enumeration = _a.enumeration, textBefore = _a.textBefore, textAfter = _a.textAfter;
5687
- return (React__default["default"].createElement("div", null,
5688
- textBefore,
5689
- enumeration.map(function (item, i) { return (React__default["default"].createElement("span", { key: i },
5690
- item,
5691
- i != enumeration.length - 1 ? ", " : null)); }),
5692
- textAfter));
5759
+ function PvpModifiers(_a) {
5760
+ var skill = _a.skill;
5761
+ return (React__default["default"].createElement(SkillTooltipBoundaryContainer, null,
5762
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", null, "Equalized PvP"), body: React__default["default"].createElement("span", null,
5763
+ "x\u00A0",
5764
+ React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: skill.EqualizedPvp } })), pvpModifier: true }),
5765
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", null, "PvP"), body: React__default["default"].createElement("span", null,
5766
+ "x\u00A0",
5767
+ React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: skill.Pvp } })), pvpModifier: true })));
5693
5768
  }
5694
5769
 
5695
- function SealingResult(_a) {
5696
- var item = _a.item, client = _a.client, region = _a.region;
5697
- return (React__default["default"].createElement("div", null, item.sealing.sealConsumeItems
5698
- .filter(function (x) { return x.min != 0; })
5699
- .map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
5700
- React__default["default"].createElement(ItemIconNameDiv, { region: region, item: consumeItem, client: client }),
5701
- "\u00A0",
5702
- GetRangeString(consumeItem.min))); })));
5770
+ function SkillBoundaries(_a) {
5771
+ var skill = _a.skill;
5772
+ var _b = React__default["default"].useState(false), hasIcon = _b[0], setHasIcon = _b[1];
5773
+ React__default["default"].useEffect(function () {
5774
+ setHasIcon(skill.Boundaries.Range.Shape != null && skill.Boundaries.Range.Shape != "");
5775
+ }, [skill]);
5776
+ return (React__default["default"].createElement(SkillTooltipBoundaryContainer, null,
5777
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5778
+ __html: skill.Boundaries.Distance.Name,
5779
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5780
+ __html: skill.Boundaries.Distance.Value,
5781
+ } }), hasIcon: hasIcon }),
5782
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5783
+ __html: skill.Boundaries.Range.Name,
5784
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5785
+ __html: skill.Boundaries.Range.Value,
5786
+ } }), hasIcon: hasIcon, bodyClass: skill.Boundaries.Range.Shape }),
5787
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5788
+ __html: skill.Boundaries.Cast.Name,
5789
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5790
+ __html: skill.Boundaries.Cast.Value,
5791
+ } }), hasIcon: hasIcon }),
5792
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5793
+ __html: skill.Boundaries.Recycle.Name,
5794
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5795
+ __html: skill.Boundaries.Recycle.Value,
5796
+ } }), hasIcon: hasIcon })));
5703
5797
  }
5704
5798
 
5705
- function AccountTransfer(_a) {
5706
- var item = _a.item, client = _a.client, region = _a.region;
5707
- return (React__default["default"].createElement("div", null,
5708
- item.accountTransfer.requiredItems.map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
5709
- React__default["default"].createElement(ItemIconNameDiv, { region: region, client: client, item: consumeItem }),
5710
- "\u00A0",
5711
- GetRangeString(consumeItem.min))); }),
5712
- item.accountTransfer.moneyCost != null &&
5713
- item.accountTransfer.moneyCost > 0 ? (React__default["default"].createElement("span", null,
5714
- item.accountTransfer.moneyCost,
5715
- "\u00A0copper")) : null));
5799
+ function SkillConditions(_a) {
5800
+ var tooltipItems = _a.tooltipItems;
5801
+ return (React__default["default"].createElement(React__default["default"].Fragment, null, tooltipItems.map(function (sub, i) { return (React__default["default"].createElement("div", { key: i, className: "SkillTooltip_conditionRow" },
5802
+ sub.IconPath != null ? (React__default["default"].createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
5803
+ ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
5804
+ : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIcon" })) : null,
5805
+ React__default["default"].createElement("div", { key: i, dangerouslySetInnerHTML: { __html: sub.Text } }))); })));
5716
5806
  }
5717
5807
 
5718
- function ItemTooltip(_a) {
5719
- var _this = this;
5720
- var _b, _c, _d;
5721
- 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 = _g === void 0 ? false : _g;
5722
- var _h = React.useState("advanced-1"), jobstyle = _h[0], setJobstyle = _h[1];
5723
- var _j = React.useState(), client = _j[0], setClient = _j[1];
5724
- React.useEffect(function () {
5725
- if (offline)
5726
- return;
5727
- if (clientProp == undefined) {
5728
- (function () { return __awaiter(_this, void 0, void 0, function () {
5729
- return __generator(this, function (_a) {
5730
- setClient(new ItemDownloadClient(region));
5731
- return [2 /*return*/];
5732
- });
5733
- }); })();
5734
- }
5735
- else {
5736
- setClient(clientProp);
5737
- }
5738
- }, [offline]);
5739
- React.useEffect(function () {
5740
- if (jobstyleOverride != undefined) {
5741
- setJobstyle(jobstyleOverride);
5742
- }
5743
- }, [jobstyleOverride]);
5744
- var item = data;
5745
- var itemCategory = (_c = (_b = item.categories) === null || _b === void 0 ? void 0 : _b.sort(function (a, b) { return b.index - a.index; })[0].localizedName) !== null && _c !== void 0 ? _c : "";
5746
- if (itemCategory == "none")
5747
- itemCategory = "";
5808
+ function SkillTooltip(_a) {
5809
+ var settings = _a.settings;
5810
+ var debug = settings.debug;
5811
+ var skill = settings.data;
5748
5812
  var tooltipBaseProps = {
5749
- title: item.name,
5750
- grade: item.grade,
5751
- id: item.id + "-" + item.level,
5752
- icon: item.icon ? BuildIconPath(item.icon.iconPath) : "",
5753
- subtitle: itemCategory,
5813
+ title: skill.Name,
5814
+ id: skill.ID + "-" + skill.Variation,
5815
+ grade: 4,
5816
+ icon: skill.IconPath ? React__default["default"].createElement(SkillIconWithButton, { skill: skill }) : "",
5817
+ subtitle: skill.AdditionalInfo
5818
+ ? "<div style=\"font-size: 12px;\">".concat(skill.AdditionalInfo, "</div>")
5819
+ : "",
5754
5820
  mainInfos: [],
5755
5821
  subInfoGroups: [],
5756
- fullHeight: fullHeight,
5757
5822
  };
5758
- var setHasSkillModifiers = false;
5759
- var jobstyles = [];
5760
- var itemCombats = false;
5761
- if (item.skills != null && item.skills.length > 0) {
5762
- item.skills.forEach(function (itemSkill) {
5763
- if (itemSkill.jobstyle != null) {
5764
- setHasSkillModifiers = true;
5765
- itemCombats = true;
5766
- if (!jobstyles.includes(itemSkill.jobstyle)) {
5767
- jobstyles.push(itemSkill.jobstyle);
5768
- }
5769
- }
5770
- });
5771
- }
5772
- if (((_d = item.setBonus) === null || _d === void 0 ? void 0 : _d.setBonusStages) != null) {
5773
- item.setBonus.setBonusStages.forEach(function (stage) {
5774
- if (stage.skillModifiers != null && stage.skillModifiers.length > 0) {
5775
- setHasSkillModifiers = true;
5776
- stage.skillModifiers.forEach(function (modifier) {
5777
- if (!jobstyles.includes(modifier.jobstyle)) {
5778
- jobstyles.push(modifier.jobstyle);
5779
- }
5780
- });
5781
- }
5782
- });
5783
- }
5784
- //top part
5785
- AddMainInfo(tooltipBaseProps.mainInfos, item);
5786
- AddSubInfo(tooltipBaseProps.mainInfos, item);
5787
- AddSkillTitles(tooltipBaseProps.mainInfos, item, itemCombats, jobstyle);
5788
- AddCooldowns(tooltipBaseProps.mainInfos, item);
5789
- AddItemStats(tooltipBaseProps.mainInfos, item);
5790
- AddItemRandomStats(tooltipBaseProps.mainInfos, item);
5791
- //bottom part
5792
- AddGearScore(tooltipBaseProps.subInfoGroups, item, debug);
5793
- AddJobstyleToggles(setHasSkillModifiers, tooltipBaseProps.subInfoGroups, jobstyles, jobstyle, setJobstyle);
5794
- AddTopText(tooltipBaseProps.subInfoGroups, item);
5795
- AddSkillDescriptions(tooltipBaseProps.subInfoGroups, item, itemCombats, jobstyle);
5796
- AddSkillModifiers(tooltipBaseProps.subInfoGroups, item, false, jobstyle);
5797
- AddSetBonus(tooltipBaseProps.subInfoGroups, item, jobstyle);
5798
- if (!offline) {
5799
- AddDecomposeResults(tooltipBaseProps.subInfoGroups, item, client, region);
5800
- }
5801
- AddUnityPoints(tooltipBaseProps.subInfoGroups, item);
5802
- AddDescriptions(tooltipBaseProps.subInfoGroups, item);
5803
- AddFlavorText(tooltipBaseProps.subInfoGroups, item);
5804
- AddItemUsableGroup(tooltipBaseProps.subInfoGroups, item);
5805
- AddRequiredLevel(tooltipBaseProps.subInfoGroups, item);
5806
- AddRequiredJobs(tooltipBaseProps.subInfoGroups, item);
5807
- AddBoundToAccount(tooltipBaseProps.subInfoGroups, item);
5808
- AddAbleToTrade(tooltipBaseProps.subInfoGroups, item);
5809
- if (!offline) {
5810
- AddSealingResult(tooltipBaseProps.subInfoGroups, item, client, region);
5811
- AddAccountTransferResult(tooltipBaseProps.subInfoGroups, item, client, region);
5823
+ if (skill.Tooltip != null) {
5824
+ //topPart
5825
+ AddMainText1s(tooltipBaseProps.mainInfos, skill);
5826
+ AddMainText2s(tooltipBaseProps.mainInfos, skill);
5827
+ //bottomPart
5828
+ AddSubTexts(tooltipBaseProps.subInfoGroups, skill);
5829
+ AddBreakValue(tooltipBaseProps.subInfoGroups, skill);
5830
+ AddPvpModifiers(tooltipBaseProps.subInfoGroups, skill);
5831
+ AddBoundaries(tooltipBaseProps.subInfoGroups, skill);
5832
+ AddConditions(tooltipBaseProps.subInfoGroups, skill);
5833
+ AddStances(tooltipBaseProps.subInfoGroups, skill);
5834
+ if (debug) {
5835
+ AddIds(tooltipBaseProps.subInfoGroups, skill);
5836
+ }
5812
5837
  }
5813
5838
  return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
5814
5839
  }
5815
- function AddMainInfo(mainInfos, item) {
5816
- if (item.mainInfo != null)
5817
- mainInfos.push(React__default["default"].createElement(ItemMainInfo, __assign({}, item)));
5818
- }
5819
- function AddSubInfo(mainInfos, item) {
5820
- if (item.subInfo != null)
5821
- mainInfos.push(React__default["default"].createElement(ItemSubInfo, __assign({}, item)));
5822
- }
5823
- function AddSkillTitles(mainInfos, item, itemCombats, jobstyle) {
5824
- var itemSkills = item.skills;
5825
- if (itemSkills == null || itemSkills.length == 0)
5826
- return;
5827
- mainInfos.push(React__default["default"].createElement(ItemSkillTitles, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }));
5828
- }
5829
- function AddCooldowns(mainInfos, item) {
5830
- if ((item.cooldownInMs == null || item.cooldownInMs == 0) &&
5831
- (item.bgCooldownInMs == null || item.bgCooldownInMs == 0))
5832
- return;
5833
- mainInfos.push(React__default["default"].createElement(ItemCooldowns, __assign({}, item)));
5834
- }
5835
- function AddItemStats(mainInfos, item) {
5836
- if (item.stats == null || item.stats.length == 0)
5837
- return;
5838
- mainInfos.push(React__default["default"].createElement(ItemStats, __assign({}, item)));
5840
+ function AddMainText1s(mainInfos, skill) {
5841
+ skill.Tooltip.Main1.forEach(function (main) {
5842
+ mainInfos.push(React__default["default"].createElement("div", { className: "SkillTooltip_mainText", dangerouslySetInnerHTML: { __html: main.Text } }));
5843
+ });
5839
5844
  }
5840
- function AddItemRandomStats(mainInfos, item) {
5841
- if (item.randomStats == null || item.randomStats.length === 0)
5842
- return;
5843
- mainInfos.push(React__default["default"].createElement(ItemRandomStats, __assign({}, item)));
5845
+ function AddMainText2s(mainInfos, skill) {
5846
+ skill.Tooltip.Main2.forEach(function (main) {
5847
+ mainInfos.push(React__default["default"].createElement("div", { className: "SkillTooltip_smallText", dangerouslySetInnerHTML: { __html: main.Text } }));
5848
+ });
5844
5849
  }
5845
- function AddGearScore(subInfoGroups, item, debugMode) {
5846
- if (!debugMode)
5847
- return;
5850
+ function AddSubTexts(subInfoGroups, skill) {
5851
+ var texts = [];
5852
+ skill.Tooltip.Sub.forEach(function (sub, i) {
5853
+ texts.push(React__default["default"].createElement("div", { className: "SkillTooltip_subText" +
5854
+ (i != skill.Tooltip.Sub.length - 1
5855
+ ? " SkillTooltip_subTextMargin"
5856
+ : "") },
5857
+ sub.IconPath != null && sub.IconPath != "" ? (React__default["default"].createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
5858
+ ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
5859
+ : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIconSmall" })) : null,
5860
+ React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: sub.Text } })));
5861
+ });
5848
5862
  subInfoGroups.push({
5849
5863
  title: "",
5850
- texts: [React__default["default"].createElement(GearScore, __assign({}, item))],
5864
+ texts: texts,
5851
5865
  });
5852
5866
  }
5853
- function AddTopText(subInfoGroups, item) {
5854
- if (item.topText == null)
5867
+ function AddBreakValue(subInfoGroups, skill) {
5868
+ if (skill.BreakValue != null && skill.BreakValue !== "0") {
5869
+ subInfoGroups.push({
5870
+ title: "",
5871
+ texts: [
5872
+ React__default["default"].createElement("div", null,
5873
+ "Breaker value:\u00A0",
5874
+ React__default["default"].createElement("span", { className: "tooltipArg", dangerouslySetInnerHTML: { __html: skill.BreakValue } })),
5875
+ ],
5876
+ });
5877
+ }
5878
+ }
5879
+ function AddPvpModifiers(subInfoGroups, skill) {
5880
+ if (skill.Pvp == null || skill.EqualizedPvp == null)
5855
5881
  return;
5856
5882
  subInfoGroups.push({
5857
5883
  title: "",
5858
- texts: [React__default["default"].createElement(TopText, __assign({}, item))],
5884
+ texts: [React__default["default"].createElement(PvpModifiers, { skill: skill })],
5859
5885
  });
5860
5886
  }
5861
- function AddSkillDescriptions(subInfoGroups, item, itemCombats, jobstyle) {
5862
- if (item.skills == null || item.skills.length == 0)
5887
+ function AddBoundaries(subInfoGroups, skill) {
5888
+ if (skill.Boundaries == null)
5863
5889
  return;
5864
5890
  subInfoGroups.push({
5865
5891
  title: "",
5866
- texts: [
5867
- React__default["default"].createElement(ItemSkillDescriptions, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }),
5868
- ],
5892
+ texts: [React__default["default"].createElement(SkillBoundaries, { skill: skill })],
5869
5893
  });
5870
5894
  }
5871
- function AddSkillModifiers(subInfoGroups, item, isSetBonus, jobstyle) {
5872
- if (item.skillModifierGroups == null || item.skillModifierGroups.length == 0)
5895
+ function AddConditions(subInfoGroups, skill) {
5896
+ if (skill.Tooltip.Condition.length == 0)
5873
5897
  return;
5874
5898
  subInfoGroups.push({
5875
- title: "",
5876
- texts: [
5877
- React__default["default"].createElement(SkillModifiers, { skillModifierGroups: item.skillModifierGroups, isSetBonus: isSetBonus, jobstyle: jobstyle }),
5878
- ],
5899
+ title: "Terms of Use",
5900
+ texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Condition })],
5879
5901
  });
5880
5902
  }
5881
- function AddSetBonus(subInfoGroups, item, jobstyle) {
5882
- if (item.setBonus == null)
5903
+ function AddStances(subInfoGroups, skill) {
5904
+ if (skill.Tooltip.Stance.length == 0)
5883
5905
  return;
5884
5906
  subInfoGroups.push({
5885
- title: "Set Effect:",
5886
- texts: [React__default["default"].createElement(SetBonus, { item: item, jobstyle: jobstyle })],
5907
+ title: "Switch Position",
5908
+ texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Stance })],
5887
5909
  });
5888
5910
  }
5889
- function AddDecomposeResults(subInfoGroups, item, client, region) {
5890
- if (item.decomposeRewards == null || item.decomposeRewards.length == 0)
5891
- return;
5892
- var fixedItems = []
5893
- .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.fixedItems; })).filter(function (x) { return x != null; });
5894
- var randomItems = []
5895
- .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.randomItems; })).filter(function (x) { return x != null; });
5896
- var selectItems = []
5897
- .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.selectItems; })).filter(function (x) { return x != null; });
5898
- if (fixedItems.length > 0)
5899
- subInfoGroups.push({
5900
- title: "Guaranteed/Salvage:",
5901
- texts: [
5902
- React__default["default"].createElement(DecomposeResults, { region: region, items: fixedItems, client: client }),
5903
- ],
5904
- });
5905
- if (randomItems.length > 0)
5906
- subInfoGroups.push({
5907
- title: "Random:",
5908
- texts: [
5909
- React__default["default"].createElement(DecomposeResults, { region: region, items: randomItems, client: client }),
5910
- ],
5911
- });
5912
- if (selectItems.length > 0)
5913
- subInfoGroups.push({
5914
- title: "Select:",
5915
- texts: [
5916
- React__default["default"].createElement(DecomposeResults, { region: region, items: selectItems, client: client }),
5917
- ],
5918
- });
5919
- }
5920
- function AddJobstyleToggles(setHasSkillModifiers, subInfoGroups, jobstyles, jobstyle, setJobstyle) {
5921
- if (!setHasSkillModifiers)
5922
- return;
5911
+ function AddIds(subInfoGroups, skill) {
5923
5912
  subInfoGroups.push({
5924
- title: "",
5925
- texts: [
5926
- React__default["default"].createElement(SetBonusToggle, { jobstyles: jobstyles, jobstyle: jobstyle, setJobstyle: setJobstyle }),
5927
- ],
5913
+ title: "Debug info",
5914
+ texts: [React__default["default"].createElement("div", null,
5915
+ "ID: ",
5916
+ skill.ID), React__default["default"].createElement("div", null,
5917
+ "Variation: ",
5918
+ skill.Variation)],
5928
5919
  });
5920
+ }
5921
+
5922
+ var css_248z$1 = ".NpcTooltip_toggleBarContainer {\n display: flex; }\n\n.NpcTooltip_toggleButton {\n border: none;\n padding: 0.33rem;\n margin: 0 0.1rem;\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 .NpcTooltip_toggleButton:hover {\n background-color: rgba(255, 255, 255, 0.2);\n opacity: 1; }\n .NpcTooltip_toggleButton-active {\n background-color: rgba(255, 255, 255, 0.3) !important;\n color: #fff;\n opacity: 1; }\n .NpcTooltip_toggleButton img {\n width: 32px;\n height: 32px; }\n\n.NpcTooltip_storeEntry {\n display: flex;\n align-items: stretch;\n background-color: rgba(233, 233, 233, 0.1);\n padding: 0.33rem;\n font-size: 14px; }\n .NpcTooltip_storeEntry:not(:last-child) {\n margin-bottom: 0.2rem; }\n\n.NpcTooltip_storeEntryItemNameLimit {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center; }\n\n.NpcTooltip_storeEntryItemLimit {\n font-size: 12px; }\n\n.NpcTooltip_storeEntryItemName {\n flex: 1;\n display: flex;\n align-items: center; }\n\n.NpcTooltip_storeEntryItemIconName {\n display: flex;\n align-items: center; }\n .NpcTooltip_storeEntryItemIconName img {\n width: 48px;\n height: 48px;\n margin-right: 0.33rem; }\n\n.NpcTooltip_itemBuyPriceEntriesContainer {\n display: flex;\n flex-direction: column;\n flex: 1;\n align-items: flex-end;\n justify-content: center;\n padding-left: 2rem; }\n\n.NpcTooltip_itemBuyPriceEntries {\n display: flex; }\n .NpcTooltip_itemBuyPriceEntries-moneyMargin {\n margin-bottom: 0.2rem; }\n\n.NpcTooltip_itemBuyPriceEntry:not(:first-child) {\n margin-left: 0.33rem; }\n\n.NpcTooltip_itemBuyPriceEntryContainer {\n position: relative;\n height: 32px; }\n .NpcTooltip_itemBuyPriceEntryContainer img {\n width: 32px;\n height: 32px; }\n .NpcTooltip_itemBuyPriceEntryContainer-shadow {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n box-shadow: inset 0 0 2px 0px #000000; }\n\n.NpcTooltip_itemBuyPriceEntryCount {\n position: absolute;\n bottom: 0;\n left: 0;\n color: #ffffff;\n background-color: rgba(0, 0, 0, 0.4);\n width: 32px;\n line-height: 12px;\n text-align: center; }\n\n.NpcTooltip_moneyContainer {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .NpcTooltip_moneyContainer > span {\n display: flex;\n align-items: center; }\n .NpcTooltip_moneyContainer > span:not(:first-child) {\n margin-left: 0.1rem; }\n .NpcTooltip_moneyContainer > span > img {\n width: 16px;\n height: 16px; }\n";
5923
+ styleInject(css_248z$1);
5924
+
5925
+ function StoreToggle(_a) {
5926
+ var store = _a.store, isActive = _a.isActive, setActive = _a.setActive;
5927
+ return (React__default["default"].createElement("button", { className: "NpcTooltip_toggleButton " +
5928
+ (isActive ? "NpcTooltip_toggleButton-active" : ""), onClick: setActive }, store.Icon != null && store.Icon != "" ? (React__default["default"].createElement("img", { src: store.Icon, alt: store.Name })) : (React__default["default"].createElement("span", null, store.Name))));
5929
+ }
5930
+
5931
+ function StoreToggleBar(_a) {
5932
+ var stores = _a.stores, activeTab = _a.activeTab, setActiveTab = _a.setActiveTab;
5933
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_toggleBarContainer" }, stores.map(function (store, i) { return (React__default["default"].createElement(StoreToggle, { key: i, store: store, isActive: activeTab === i, setActive: function () { return setActiveTab(i); } })); })));
5934
+ }
5935
+
5936
+ exports.ServerRegion = void 0;
5937
+ (function (ServerRegion) {
5938
+ ServerRegion["EUNA"] = "EUNA";
5939
+ ServerRegion["Korea"] = "Korea";
5940
+ ServerRegion["KoreaTest"] = "KoreaTest";
5941
+ })(exports.ServerRegion || (exports.ServerRegion = {}));
5942
+ var TooltipType;
5943
+ (function (TooltipType) {
5944
+ TooltipType[TooltipType["Item"] = 0] = "Item";
5945
+ TooltipType[TooltipType["Skill"] = 1] = "Skill";
5946
+ TooltipType[TooltipType["Npc"] = 2] = "Npc";
5947
+ })(TooltipType || (TooltipType = {}));
5948
+ var TooltipSettingsBase = /** @class */ (function () {
5949
+ function TooltipSettingsBase(offline) {
5950
+ if (offline === void 0) { offline = false; }
5951
+ this.debug = false;
5952
+ this.fullHeight = false;
5953
+ this.offline = offline;
5954
+ }
5955
+ return TooltipSettingsBase;
5956
+ }());
5957
+ var TooltipWithNetworkSettings = /** @class */ (function (_super) {
5958
+ __extends(TooltipWithNetworkSettings, _super);
5959
+ function TooltipWithNetworkSettings(region, client, offline) {
5960
+ if (offline === void 0) { offline = false; }
5961
+ var _this = this;
5962
+ var l_offline = offline;
5963
+ if (region == null)
5964
+ l_offline = true;
5965
+ _this = _super.call(this, l_offline) || this;
5966
+ _this.region = region;
5967
+ _this.client = client;
5968
+ return _this;
5969
+ }
5970
+ return TooltipWithNetworkSettings;
5971
+ }(TooltipSettingsBase));
5972
+
5973
+ var ItemTooltipSettings = /** @class */ (function (_super) {
5974
+ __extends(ItemTooltipSettings, _super);
5975
+ function ItemTooltipSettings(data, region, client, offline) {
5976
+ var _this = _super.call(this, region, client, offline) || this;
5977
+ _this.data = data;
5978
+ _this.type = TooltipType.Item;
5979
+ return _this;
5980
+ }
5981
+ return ItemTooltipSettings;
5982
+ }(TooltipWithNetworkSettings));
5983
+
5984
+ var BuyLimitReset;
5985
+ (function (BuyLimitReset) {
5986
+ BuyLimitReset[BuyLimitReset["Day"] = 0] = "Day";
5987
+ BuyLimitReset[BuyLimitReset["Week"] = 1] = "Week";
5988
+ BuyLimitReset[BuyLimitReset["Month"] = 2] = "Month";
5989
+ BuyLimitReset[BuyLimitReset["Absolute"] = 3] = "Absolute";
5990
+ })(BuyLimitReset || (BuyLimitReset = {}));
5991
+ var BuyLimitType;
5992
+ (function (BuyLimitType) {
5993
+ BuyLimitType[BuyLimitType["Character"] = 0] = "Character";
5994
+ BuyLimitType[BuyLimitType["Account"] = 1] = "Account";
5995
+ })(BuyLimitType || (BuyLimitType = {}));
5996
+
5997
+ function ItemBuyLimit(_a) {
5998
+ var limit = _a.limit;
5999
+ if (limit == null)
6000
+ return null;
6001
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemLimit" }, GetStringForBuyLimitType(limit.LimitType) +
6002
+ "Limit: " +
6003
+ limit.Amount +
6004
+ "/" +
6005
+ GetStringForBuyLimitReset(limit.LimitReset)));
5929
6006
  }
5930
- function AddDescriptions(subInfoGroups, item) {
5931
- if (item.descriptions == null || item.descriptions.length == 0)
5932
- return;
5933
- item.descriptions
5934
- .filter(function (x) { return x.text != null && x.text != ""; })
5935
- .forEach(function (description) {
5936
- subInfoGroups.push({
5937
- title: description.title,
5938
- texts: [React__default["default"].createElement(ItemDescriptionText, { htmlString: description.text })],
5939
- });
5940
- });
6007
+ function GetStringForBuyLimitType(type) {
6008
+ switch (type) {
6009
+ case BuyLimitType.Account:
6010
+ return "Account ";
6011
+ case BuyLimitType.Character:
6012
+ return "Character ";
6013
+ default:
6014
+ return "";
6015
+ }
5941
6016
  }
5942
- function AddFlavorText(subInfoGroups, item) {
5943
- if (item.flavorText == null || item.flavorText == "")
5944
- return;
5945
- subInfoGroups.push({
5946
- title: "",
5947
- texts: [React__default["default"].createElement(ItemDescriptionText, { htmlString: item.flavorText })],
5948
- });
6017
+ function GetStringForBuyLimitReset(reset) {
6018
+ switch (reset) {
6019
+ case BuyLimitReset.Day:
6020
+ return "Day";
6021
+ case BuyLimitReset.Week:
6022
+ return "Week ";
6023
+ case BuyLimitReset.Month:
6024
+ return "Month";
6025
+ default:
6026
+ return "";
6027
+ }
6028
+ }
6029
+
6030
+ function Money(_a) {
6031
+ var money = _a.money;
6032
+ var bnsmoney = getMoneyObj(money);
6033
+ if (bnsmoney == null)
6034
+ return null;
6035
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_moneyContainer" },
6036
+ bnsmoney.Gold > 0 ? (React__default["default"].createElement("span", null,
6037
+ bnsmoney.Gold,
6038
+ React__default["default"].createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
6039
+ bnsmoney.Silver > 0 ? (React__default["default"].createElement("span", null,
6040
+ bnsmoney.Silver,
6041
+ React__default["default"].createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
6042
+ bnsmoney.Copper > 0 ? (React__default["default"].createElement("span", null,
6043
+ bnsmoney.Copper,
6044
+ React__default["default"].createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
6045
+ }
6046
+
6047
+ function StoreItemBuyPriceEntry(_a) {
6048
+ var _this = this;
6049
+ var itemRef = _a.itemRef, client = _a.client;
6050
+ var _b = React.useState(), item = _b[0], setItem = _b[1];
6051
+ React.useEffect(function () {
6052
+ if (client == null)
6053
+ return;
6054
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6055
+ var _a;
6056
+ return __generator(this, function (_b) {
6057
+ switch (_b.label) {
6058
+ case 0:
6059
+ _a = setItem;
6060
+ return [4 /*yield*/, client.GetItem(itemRef.itemId, itemRef.itemLevel)];
6061
+ case 1:
6062
+ _a.apply(void 0, [_b.sent()]);
6063
+ return [2 /*return*/];
6064
+ }
6065
+ });
6066
+ }); })();
6067
+ }, [itemRef, client]);
6068
+ var tooltipItemSettings = new ItemTooltipSettings(item, client.region, client);
6069
+ var wrapperSettings = new TooltipWrapperSettings(undefined, undefined, undefined, "click", undefined);
6070
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntry" }, item ? (React__default["default"].createElement(TooltipWrapper, { settings: wrapperSettings, tooltipSettings: tooltipItemSettings },
6071
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer" },
6072
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer-shadow" }),
6073
+ React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" }),
6074
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryCount" },
6075
+ React__default["default"].createElement("span", null, itemRef.min))))) : null));
6076
+ }
6077
+
6078
+ function NpcStoreEntry(_a) {
6079
+ var _this = this;
6080
+ var _b, _c;
6081
+ var data = _a.data, client = _a.client;
6082
+ var _d = React.useState(), item = _d[0], setItem = _d[1];
6083
+ React.useEffect(function () {
6084
+ if (client == null)
6085
+ return;
6086
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6087
+ var res;
6088
+ return __generator(this, function (_a) {
6089
+ switch (_a.label) {
6090
+ case 0: return [4 /*yield*/, client.GetItem(data.Item.itemId, data.Item.itemLevel)];
6091
+ case 1:
6092
+ res = _a.sent();
6093
+ setItem(res);
6094
+ return [2 /*return*/];
6095
+ }
6096
+ });
6097
+ }); })();
6098
+ }, [data, client]);
6099
+ if (item != undefined) {
6100
+ var tooltipItemSettings = new ItemTooltipSettings(item, client.region, client);
6101
+ var wrapperSettings = new TooltipWrapperSettings(undefined, undefined, undefined, "click", undefined);
6102
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntry" },
6103
+ React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemIconName" },
6104
+ React__default["default"].createElement(TooltipWrapper, { settings: wrapperSettings, tooltipSettings: tooltipItemSettings },
6105
+ React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" })),
6106
+ React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemNameLimit" },
6107
+ React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemName TooltipBase_grade-" + item.grade, dangerouslySetInnerHTML: { __html: item.name } }),
6108
+ React__default["default"].createElement(ItemBuyLimit, { limit: data.Limit }))),
6109
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntriesContainer" },
6110
+ ((_b = data.BuyPrice.Items) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntries " +
6111
+ (data.BuyPrice.Money > 0
6112
+ ? "NpcTooltip_itemBuyPriceEntries-moneyMargin"
6113
+ : "") }, (_c = data.BuyPrice.Items) === null || _c === void 0 ? void 0 : _c.map(function (itemCountRef, i) { return (React__default["default"].createElement(StoreItemBuyPriceEntry, { itemRef: itemCountRef, client: client, key: i })); }))) : null,
6114
+ React__default["default"].createElement(Money, { money: data.BuyPrice.Money }))));
6115
+ }
6116
+ else {
6117
+ return null;
6118
+ }
6119
+ }
6120
+
6121
+ function NpcStores(_a) {
6122
+ var stores = _a.stores, activeTab = _a.activeTab, client = _a.client;
6123
+ var activeStore = stores[activeTab];
6124
+ return (React__default["default"].createElement("div", null, activeStore.Entries.map(function (entry, i) { return (React__default["default"].createElement(NpcStoreEntry, { key: i, data: entry, client: client })); })));
6125
+ }
6126
+
6127
+ function NpcTooltip(_a) {
6128
+ var _this = this;
6129
+ var _b, _c;
6130
+ var settings = _a.settings;
6131
+ var npc = settings.npc;
6132
+ var _d = React.useState(0), activeTab = _d[0], setActiveTab = _d[1];
6133
+ var _e = React.useState(), client = _e[0], setClient = _e[1];
6134
+ React.useEffect(function () {
6135
+ if (!settings.offline) {
6136
+ if (settings.client == undefined) {
6137
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6138
+ return __generator(this, function (_a) {
6139
+ setClient(new ItemDownloadClient(settings.region));
6140
+ return [2 /*return*/];
6141
+ });
6142
+ }); })();
6143
+ }
6144
+ else {
6145
+ setClient(settings.client);
6146
+ }
6147
+ }
6148
+ }, [settings.offline]);
6149
+ var tooltipBaseProps = {
6150
+ title: npc.Name,
6151
+ grade: (_b = settings.grade) !== null && _b !== void 0 ? _b : 4,
6152
+ id: npc.Alias,
6153
+ subtitle: (_c = npc.Title) !== null && _c !== void 0 ? _c : "",
6154
+ fullHeight: settings.fullHeight,
6155
+ subInfoGroups: [],
6156
+ };
6157
+ //no top part
6158
+ AddStoreToggles(tooltipBaseProps.subInfoGroups, activeTab, setActiveTab, npc.Stores);
6159
+ AddStores(tooltipBaseProps.subInfoGroups, activeTab, client, npc.Stores);
6160
+ return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
5949
6161
  }
5950
- function AddItemUsableGroup(subInfoGroups, item) {
5951
- if (IsNullOrEmpty(item.usableGroup))
6162
+ function AddStoreToggles(subInfoGroups, activeTab, setActiveTab, Stores) {
6163
+ if (Stores == null || Stores.length <= 0)
5952
6164
  return;
5953
6165
  subInfoGroups.push({
5954
6166
  title: "",
5955
- texts: [React__default["default"].createElement(RawText, { htmlString: item.usableGroup })],
6167
+ texts: [
6168
+ React__default["default"].createElement(StoreToggleBar, { stores: Stores, activeTab: activeTab, setActiveTab: setActiveTab }),
6169
+ ],
5956
6170
  });
5957
6171
  }
5958
- function AddRequiredLevel(subInfoGroups, item) {
5959
- if (item.levelRequired == null || item.levelRequired <= 1)
6172
+ function AddStores(subInfoGroups, activeTab, client, Stores) {
6173
+ if (Stores == null || Stores.length <= 0)
5960
6174
  return;
5961
6175
  subInfoGroups.push({
5962
6176
  title: "",
5963
6177
  texts: [
5964
- React__default["default"].createElement(TextWithNumber, { text: "Requires Level ", number: item.levelRequired }),
5965
- ],
5966
- });
5967
- }
5968
- function AddRequiredJobs(subInfoGroups, item) {
5969
- if (item.classRequired == null || item.classRequired.length == 0)
5970
- return;
5971
- var enJobNames = item.classRequired.map(function (x) { return x.enName; });
5972
- subInfoGroups.push({
5973
- title: "",
5974
- texts: [
5975
- React__default["default"].createElement(StringEnumerationWithText, { enumeration: enJobNames, textAfter: " Only", textBefore: "" }),
5976
- ],
5977
- });
5978
- }
5979
- function AddBoundToAccount(subInfoGroups, item) {
5980
- if (item.boundToAccount == null || item.boundToAccount == false)
5981
- return;
5982
- subInfoGroups.push({
5983
- title: "",
5984
- texts: [React__default["default"].createElement("div", null, "Bound to Account")],
5985
- });
5986
- }
5987
- function AddAbleToTrade(subInfoGroups, item) {
5988
- if (item.unableToTrade == null || item.unableToTrade == false)
5989
- return;
5990
- subInfoGroups.push({
5991
- title: "",
5992
- texts: [React__default["default"].createElement("div", null, "Unable to Trade")],
5993
- });
5994
- }
5995
- function AddSealingResult(subInfoGroups, item, client, region) {
5996
- if (item.sealing == null ||
5997
- item.sealing.sealAcquireItemId == null ||
5998
- item.sealing.sealConsumeItems.filter(function (x) { return x.min != 0; }).length == 0)
5999
- return;
6000
- subInfoGroups.push({
6001
- title: "Can be resealed with:",
6002
- texts: [React__default["default"].createElement(SealingResult, { region: region, item: item, client: client })],
6003
- });
6004
- }
6005
- function AddAccountTransferResult(subInfoGroups, item, client, region) {
6006
- if (item.accountTransfer == null ||
6007
- item.accountTransfer.requiredItems == null ||
6008
- item.accountTransfer.requiredItems.length == 0)
6009
- return;
6010
- subInfoGroups.push({
6011
- title: "Can be transferred with:",
6012
- texts: [React__default["default"].createElement(AccountTransfer, { region: region, item: item, client: client })],
6013
- });
6014
- }
6015
- function AddUnityPoints(subInfoGroups, item) {
6016
- if (item.setPoints == null || item.refinementPoints == null)
6017
- return;
6018
- if (item.setPoints === 0)
6019
- return;
6020
- if (item.refinementPoints === 0)
6021
- return;
6022
- subInfoGroups.push({
6023
- title: "",
6024
- texts: [
6025
- React__default["default"].createElement("span", null,
6026
- "Splendor Stone Set Points: ",
6027
- item.setPoints),
6028
- React__default["default"].createElement("span", null,
6029
- "Splendor Stone Refinement Points: ",
6030
- item.refinementPoints),
6178
+ React__default["default"].createElement(NpcStores, { stores: Stores, activeTab: activeTab, client: client }),
6031
6179
  ],
6032
6180
  });
6033
6181
  }
6034
6182
 
6035
- var css_248z$3 = "";
6036
- styleInject(css_248z$3);
6037
-
6038
- function JsonTooltip(props) {
6039
- var tooltipProps = {
6040
- title: props.title,
6041
- grade: props.grade,
6042
- icon: props.icon,
6043
- mainInfos: JsonArrayToJsxArray(props.mainInfos),
6044
- subtitle: props.subtitle,
6045
- subInfoGroups: JsonSubInfoToJsxSubInfo(props.subInfoGroups),
6046
- };
6047
- return React__default["default"].createElement(TooltipBase, __assign({}, tooltipProps));
6048
- }
6049
- function JsonSubInfoToJsxSubInfo(subInfoGroups) {
6050
- if (subInfoGroups == undefined)
6051
- return undefined;
6052
- var result = [];
6053
- subInfoGroups.forEach(function (subInfoGroup) {
6054
- var jsxSubInfoGroup = {
6055
- title: subInfoGroup.title,
6056
- texts: JsonArrayToJsxArray(subInfoGroup.texts),
6057
- };
6058
- result.push(jsxSubInfoGroup);
6059
- });
6060
- return result;
6061
- }
6062
- function JsonArrayToJsxArray(stringArray) {
6063
- if (stringArray == undefined)
6064
- return undefined;
6065
- var jsxArray = [];
6066
- stringArray.forEach(function (mainInfo) {
6067
- jsxArray.push(React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: mainInfo } }));
6068
- });
6069
- return jsxArray;
6183
+ function TooltipWrapper(_a) {
6184
+ var settings = _a.settings, tooltipSettings = _a.tooltipSettings, children = _a.children, jobstyleOverride = _a.jobstyleOverride;
6185
+ if (settings == undefined) {
6186
+ settings = new TooltipWrapperSettings();
6187
+ }
6188
+ if (settings == null || tooltipSettings == null)
6189
+ return null;
6190
+ var spanRef = React.useRef(null);
6191
+ var _b = React.useState(null), childRef = _b[0], setChildRef = _b[1];
6192
+ /**
6193
+ * Mount the temporary span element.
6194
+ * retrieve and store the target element's reference.
6195
+ */
6196
+ React.useEffect(function () {
6197
+ if (spanRef.current) {
6198
+ setChildRef(spanRef.current.previousElementSibling);
6199
+ }
6200
+ return function () { return setChildRef(null); };
6201
+ }, []);
6202
+ var _c = React.useState(true), isOffline = _c[0], setIsOffline = _c[1];
6203
+ var _d = React.useState(4), grade = _d[0], setGrade = _d[1];
6204
+ var _e = React.useState(null), content = _e[0], setContent = _e[1];
6205
+ React.useEffect(function () {
6206
+ var _a;
6207
+ if (tooltipSettings.type == TooltipType.Item) {
6208
+ setContent(React__default["default"].createElement(ItemTooltip, { jobstyleOverride: jobstyleOverride, settings: tooltipSettings }));
6209
+ setGrade(tooltipSettings.data.grade);
6210
+ }
6211
+ else if (tooltipSettings.type == TooltipType.Skill) {
6212
+ setContent(React__default["default"].createElement(SkillTooltip, { settings: tooltipSettings }));
6213
+ setGrade(4);
6214
+ }
6215
+ else if (tooltipSettings.type == TooltipType.Npc) {
6216
+ setContent(React__default["default"].createElement(NpcTooltip, { settings: tooltipSettings }));
6217
+ setGrade((_a = tooltipSettings.grade) !== null && _a !== void 0 ? _a : 4);
6218
+ }
6219
+ }, [tooltipSettings]);
6220
+ React.useEffect(function () {
6221
+ if (content != null)
6222
+ setContent(function (prev) {
6223
+ var newSettings = JSON.parse(JSON.stringify(tooltipSettings));
6224
+ newSettings.offline = isOffline;
6225
+ return React__default["default"].cloneElement(prev, { tooltipSettings: newSettings });
6226
+ });
6227
+ }, [isOffline]);
6228
+ return (React__default["default"].createElement(React__default["default"].Fragment, null,
6229
+ children,
6230
+ childRef && content ? (React__default["default"].createElement(Tippy, { arrow: settings.showArrow, trigger: settings.trigger, plugins: [followCursor], followCursor: settings.followCursor && !settings.interactive, appendTo: document.body, onMount: function () { return setIsOffline(tooltipSettings.offline); }, placement: settings.placement, animation: "fade", interactive: settings.interactive, content: content, theme: "grade" + grade, reference: childRef })) : (React__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
6070
6231
  }
6071
6232
 
6072
- var css_248z$2 = ".SkillTooltip_skillIconContainer {\n width: 60px;\n height: 60px;\n padding: 0;\n float: left;\n position: relative; }\n\n.SkillTooltip_skillIcon {\n width: 60px;\n height: 60px; }\n\n.SkillTooltip_buttonIcon {\n position: absolute;\n right: 1px;\n bottom: 1px;\n height: 18px;\n opacity: 0.9; }\n\n.SkillTooltip_buttonIconMouse {\n background-color: rgba(0, 0, 0, 0.8); }\n\n.SkillTooltip_mainText {\n font-weight: 500; }\n\n.SkillTooltip_smallText {\n font-size: 12px; }\n\n.SkillTooltip_subTextMargin {\n margin-bottom: 0.3rem; }\n\n.SkillTooltip_boundaryContainer {\n display: flex;\n width: 100%;\n margin-bottom: 0.5rem;\n line-height: 17px; }\n\n.SkillTooltip_boundary {\n flex: 1;\n flex-basis: 0px;\n min-width: 0;\n display: flex;\n flex-direction: column;\n color: black;\n margin: 0.15rem; }\n\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryHead {\n border-radius: 3px 0 0 0; }\n\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryHead {\n border-radius: 0 3px 0 0; }\n\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 0 3px; }\n\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 3px 0; }\n\n.SkillTooltip_boundaryHead {\n color: white;\n font-weight: 500;\n font-size: 12px;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0.3rem;\n text-align: center;\n flex: 1;\n min-height: 26px;\n background-color: rgba(127, 127, 127, 0.4); }\n\n.SkillTooltip_boundaryBody {\n color: white;\n padding: 0.5rem 0.3rem;\n margin-top: 0.15rem;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40px;\n flex: 2;\n background-color: rgba(127, 127, 127, 0.4); }\n\n.SkillTooltip_boundaryBodyModifier {\n min-height: 33px !important; }\n\n.SkillTooltip_boundaryHasIcon {\n min-height: 50px !important; }\n\n.SkillTooltip_conditionRow {\n display: flex;\n align-items: center;\n font-size: 12px; }\n\n.SkillTooltip_conditionRow:not(:last-of-type) {\n margin-bottom: 0.1rem; }\n\n.SkillTooltip_conditionIcon {\n width: 20px;\n height: 20px;\n margin-right: 0.33rem; }\n\n.SkillTooltip_conditionIconSmall {\n width: 12px;\n height: 12px;\n margin-right: 0.22rem; }\n\n.tooltipArg {\n color: #46bee1;\n font-weight: 600; }\n\n.target-360 {\n background-image: url(\"./360.png\");\n background-repeat: no-repeat;\n background-position: 50% 60%;\n background-size: auto 64px; }\n\n.target-front-180 {\n background-image: url(\"./180.png\");\n background-repeat: no-repeat;\n background-position: 50% 70%;\n background-size: auto 64px; }\n\n.laser {\n background-image: url(\"./laser.png\");\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: auto 64px; }\n";
6073
- styleInject(css_248z$2);
6233
+ function ItemIconNameDiv(_a) {
6234
+ var _this = this;
6235
+ var _b;
6236
+ var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c;
6237
+ var _d = React.useState(), itemData = _d[0], setItemData = _d[1];
6238
+ React.useEffect(function () {
6239
+ if (client)
6240
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6241
+ var _a;
6242
+ return __generator(this, function (_b) {
6243
+ switch (_b.label) {
6244
+ case 0:
6245
+ _a = setItemData;
6246
+ return [4 /*yield*/, client.GetItem(item.itemId, item.itemLevel)];
6247
+ case 1:
6248
+ _a.apply(void 0, [_b.sent()]);
6249
+ return [2 /*return*/];
6250
+ }
6251
+ });
6252
+ }); })();
6253
+ }, [item, client]);
6254
+ if (itemData) {
6255
+ if (itemData.grade != 0) {
6256
+ var itemSettings = new ItemTooltipSettings(itemData);
6257
+ itemSettings.client = client;
6258
+ itemSettings.region = region;
6259
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_itemiconnamediv" },
6260
+ React__default["default"].createElement(TooltipWrapper, { settings: new TooltipWrapperSettings(), tooltipSettings: itemSettings },
6261
+ React__default["default"].createElement("img", { className: "ItemTooltip_itemIconSmall", alt: "", src: BuildIconPath((_b = itemData.icon) === null || _b === void 0 ? void 0 : _b.iconPath) })),
6262
+ React__default["default"].createElement("div", { className: "ItemTooltip_itemNameRandomDiv" },
6263
+ React__default["default"].createElement("span", { className: "TooltipBase_grade-" + itemData.grade, dangerouslySetInnerHTML: { __html: itemData.name } }),
6264
+ showRandomIcon ? (React__default["default"].createElement(React__default["default"].Fragment, null,
6265
+ "\u00A0",
6266
+ React__default["default"].createElement("div", null,
6267
+ React__default["default"].createElement("img", { style: {
6268
+ width: 36,
6269
+ height: 18,
6270
+ margin: "0 1px",
6271
+ top: 4,
6272
+ position: "relative",
6273
+ }, alt: "", src: "https://lean.bns.tools/bns/icons/00015590/Tag_Random.png" })))) : null)));
6274
+ }
6275
+ else
6276
+ return null;
6277
+ }
6278
+ else {
6279
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_itemIconLoading" },
6280
+ React__default["default"].createElement("div", { className: "dot-elastic" })));
6281
+ }
6282
+ }
6074
6283
 
6075
- function getButtonIconPath(button) {
6076
- var _a;
6077
- if (buttonIconMapping.find(function (x) { return x.button === button; }) == null)
6284
+ function DecomposeResults(props) {
6285
+ if (props.client)
6286
+ return (React__default["default"].createElement("div", null, props.items
6287
+ .filter(function (x) { return x != null; })
6288
+ .map(function (item, i) {
6289
+ return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: item.itemId + "-" + item.itemLevel + "_" + i },
6290
+ React__default["default"].createElement(ItemIconNameDiv, { region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
6291
+ item.isRandom ? null : (React__default["default"].createElement(React__default["default"].Fragment, null,
6292
+ "\u00A0",
6293
+ item.isMinMax ? (React__default["default"].createElement("span", null, GetRangeString(item.min, item.max))) : (React__default["default"].createElement("span", null, GetRangeString(item.min)))))));
6294
+ })));
6295
+ else
6078
6296
  return null;
6079
- return ("/00072858" + ((_a = buttonIconMapping.find(function (x) { return x.button === button; })) === null || _a === void 0 ? void 0 : _a.path));
6080
- }
6081
- var buttonIconMapping = [
6082
- {
6083
- button: "F",
6084
- path: "/Key_Alphabet_F",
6085
- },
6086
- {
6087
- button: "Q",
6088
- path: "/Key_Alphabet_Q",
6089
- },
6090
- {
6091
- button: "E",
6092
- path: "/Key_Alphabet_E",
6093
- },
6094
- {
6095
- button: "S",
6096
- path: "/Key_Alphabet_S",
6097
- },
6098
- {
6099
- button: "Z",
6100
- path: "/Key_Alphabet_Z",
6101
- },
6102
- {
6103
- button: "X",
6104
- path: "/Key_Alphabet_X",
6105
- },
6106
- {
6107
- button: "C",
6108
- path: "/Key_Alphabet_C",
6109
- },
6110
- {
6111
- button: "V",
6112
- path: "/Key_Alphabet_V",
6113
- },
6114
- {
6115
- button: "W",
6116
- path: "/Key_Alphabet_W",
6117
- },
6118
- {
6119
- button: "G",
6120
- path: "/Key_Alphabet_G",
6121
- },
6122
- {
6123
- button: "B",
6124
- path: "/Key_Alphabet_B",
6125
- },
6126
- {
6127
- button: "SPACE",
6128
- path: "/Key_Space_Big",
6129
- },
6130
- {
6131
- button: "TAB",
6132
- path: "/Key_Tab_Big",
6133
- },
6134
- {
6135
- button: "1",
6136
- path: "/Key_Num_1",
6137
- },
6138
- {
6139
- button: "2",
6140
- path: "/Key_Num_2",
6141
- },
6142
- {
6143
- button: "3",
6144
- path: "/Key_Num_3",
6145
- },
6146
- {
6147
- button: "4",
6148
- path: "/Key_Num_4",
6149
- },
6150
- {
6151
- button: "LMB",
6152
- path: "/GameUI_Tag_MouseL",
6153
- },
6154
- {
6155
- button: "RMB",
6156
- path: "/GameUI_Tag_MouseR",
6157
- },
6158
- ];
6297
+ }
6159
6298
 
6160
- function SkillIconWithButton(_a) {
6161
- var skill = _a.skill;
6162
- return (React__default["default"].createElement("div", { className: "SkillTooltip_skillIconContainer" },
6163
- React__default["default"].createElement("img", { className: "SkillTooltip_skillIcon", src: BuildIconPath(skill.IconPath, skill.IconIndex - 1), alt: "" }),
6164
- getButtonIconPath(getNormalizedButton(skill)) ? (React__default["default"].createElement("img", { className: "SkillTooltip_buttonIcon" +
6165
- " " +
6166
- (getNormalizedButton(skill) === "RMB" ||
6167
- getNormalizedButton(skill) === "LMB"
6168
- ? "SkillTooltip_buttonIconMouse"
6169
- : ""), src: BuildIconPath(getButtonIconPath(getNormalizedButton(skill))), alt: "" })) : null));
6299
+ function SetBonusToggle(_a) {
6300
+ var jobstyles = _a.jobstyles, jobstyle = _a.jobstyle, setJobstyle = _a.setJobstyle;
6301
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_jobstyleToggleContainer" }, jobstyles.map(function (style) { return (React__default["default"].createElement("button", { key: style, className: "ItemTooltip_jobstyleButton" +
6302
+ (style === jobstyle ? " ItemTooltip_jobstyleButton-active" : ""), onClick: function (e) {
6303
+ e.stopPropagation();
6304
+ setJobstyle(style);
6305
+ } }, GetJobStyleNameString(style))); })));
6170
6306
  }
6171
6307
 
6172
- function SkillTooltipBoundary(_a) {
6173
- var head = _a.head, body = _a.body, _b = _a.bodyClass, bodyClass = _b === void 0 ? "" : _b, _c = _a.pvpModifier, pvpModifier = _c === void 0 ? false : _c, _d = _a.hasIcon, hasIcon = _d === void 0 ? false : _d;
6174
- return (React__default["default"].createElement("div", { className: "SkillTooltip_boundary" },
6175
- React__default["default"].createElement("div", { className: "SkillTooltip_boundaryHead" }, head),
6176
- React__default["default"].createElement("div", { className: "SkillTooltip_boundaryBody " +
6177
- (pvpModifier ? "SkillTooltip_boundaryBodyModifier " : "") +
6178
- bodyClass +
6179
- (hasIcon ? " SkillTooltip_boundaryHasIcon " : "") }, body)));
6308
+ function ItemDescriptionText(_a) {
6309
+ var htmlString = _a.htmlString;
6310
+ var textSplit = htmlString.replace("<br/>", "<br />").split("<br />");
6311
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_descriptions TooltipBase_flex-col" }, textSplit.map(function (htmlText, i) { return (React__default["default"].createElement("span", { key: i, dangerouslySetInnerHTML: {
6312
+ __html: ReplaceIconsInHtmlString(htmlText),
6313
+ } })); })));
6180
6314
  }
6181
6315
 
6182
- function SkillTooltipBoundaryContainer(_a) {
6183
- var children = _a.children;
6184
- return React__default["default"].createElement("div", { className: "SkillTooltip_boundaryContainer" }, children);
6316
+ function RawText(_a) {
6317
+ var htmlString = _a.htmlString;
6318
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_raw", dangerouslySetInnerHTML: { __html: htmlString } }));
6185
6319
  }
6186
6320
 
6187
- function PvpModifiers(_a) {
6188
- var skill = _a.skill;
6189
- return (React__default["default"].createElement(SkillTooltipBoundaryContainer, null,
6190
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", null, "Equalized PvP"), body: React__default["default"].createElement("span", null,
6191
- "x\u00A0",
6192
- React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: skill.EqualizedPvp } })), pvpModifier: true }),
6193
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", null, "PvP"), body: React__default["default"].createElement("span", null,
6194
- "x\u00A0",
6195
- React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: skill.Pvp } })), pvpModifier: true })));
6321
+ function TextWithNumber(_a) {
6322
+ var text = _a.text, number = _a.number;
6323
+ return (React__default["default"].createElement("div", null,
6324
+ text,
6325
+ number));
6196
6326
  }
6197
6327
 
6198
- function SkillBoundaries(_a) {
6199
- var skill = _a.skill;
6200
- var _b = React__default["default"].useState(false), hasIcon = _b[0], setHasIcon = _b[1];
6201
- React__default["default"].useEffect(function () {
6202
- setHasIcon(skill.Boundaries.Range.Shape != null && skill.Boundaries.Range.Shape != "");
6203
- }, [skill]);
6204
- return (React__default["default"].createElement(SkillTooltipBoundaryContainer, null,
6205
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6206
- __html: skill.Boundaries.Distance.Name,
6207
- } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6208
- __html: skill.Boundaries.Distance.Value,
6209
- } }), hasIcon: hasIcon }),
6210
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6211
- __html: skill.Boundaries.Range.Name,
6212
- } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6213
- __html: skill.Boundaries.Range.Value,
6214
- } }), hasIcon: hasIcon, bodyClass: skill.Boundaries.Range.Shape }),
6215
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6216
- __html: skill.Boundaries.Cast.Name,
6217
- } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6218
- __html: skill.Boundaries.Cast.Value,
6219
- } }), hasIcon: hasIcon }),
6220
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6221
- __html: skill.Boundaries.Recycle.Name,
6222
- } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6223
- __html: skill.Boundaries.Recycle.Value,
6224
- } }), hasIcon: hasIcon })));
6328
+ function StringEnumerationWithText(_a) {
6329
+ var enumeration = _a.enumeration, textBefore = _a.textBefore, textAfter = _a.textAfter;
6330
+ return (React__default["default"].createElement("div", null,
6331
+ textBefore,
6332
+ enumeration.map(function (item, i) { return (React__default["default"].createElement("span", { key: i },
6333
+ item,
6334
+ i != enumeration.length - 1 ? ", " : null)); }),
6335
+ textAfter));
6225
6336
  }
6226
6337
 
6227
- function SkillConditions(_a) {
6228
- var tooltipItems = _a.tooltipItems;
6229
- return (React__default["default"].createElement(React__default["default"].Fragment, null, tooltipItems.map(function (sub, i) { return (React__default["default"].createElement("div", { key: i, className: "SkillTooltip_conditionRow" },
6230
- sub.IconPath != null ? (React__default["default"].createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
6231
- ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
6232
- : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIcon" })) : null,
6233
- React__default["default"].createElement("div", { key: i, dangerouslySetInnerHTML: { __html: sub.Text } }))); })));
6338
+ function SealingResult(_a) {
6339
+ var item = _a.item, client = _a.client, region = _a.region;
6340
+ return (React__default["default"].createElement("div", null, item.sealing.sealConsumeItems
6341
+ .filter(function (x) { return x.min != 0; })
6342
+ .map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
6343
+ React__default["default"].createElement(ItemIconNameDiv, { region: region, item: consumeItem, client: client }),
6344
+ "\u00A0",
6345
+ GetRangeString(consumeItem.min))); })));
6234
6346
  }
6235
6347
 
6236
- function SkillTooltip(_a) {
6237
- var data = _a.data, _b = _a.debug, debug = _b === void 0 ? false : _b;
6238
- var skill = data;
6348
+ function AccountTransfer(_a) {
6349
+ var item = _a.item, client = _a.client, region = _a.region;
6350
+ return (React__default["default"].createElement("div", null,
6351
+ item.accountTransfer.requiredItems.map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
6352
+ React__default["default"].createElement(ItemIconNameDiv, { region: region, client: client, item: consumeItem }),
6353
+ "\u00A0",
6354
+ GetRangeString(consumeItem.min))); }),
6355
+ item.accountTransfer.moneyCost != null &&
6356
+ item.accountTransfer.moneyCost > 0 ? (React__default["default"].createElement("span", null,
6357
+ item.accountTransfer.moneyCost,
6358
+ "\u00A0copper")) : null));
6359
+ }
6360
+
6361
+ function ItemTooltip(_a) {
6362
+ var _this = this;
6363
+ var _b, _c, _d;
6364
+ var settings = _a.settings, jobstyleOverride = _a.jobstyleOverride;
6365
+ var _e = React.useState("advanced-1"), jobstyle = _e[0], setJobstyle = _e[1];
6366
+ var _f = React.useState(), client = _f[0], setClient = _f[1];
6367
+ React.useEffect(function () {
6368
+ if (settings.offline)
6369
+ return;
6370
+ if (settings.client == undefined) {
6371
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6372
+ return __generator(this, function (_a) {
6373
+ setClient(new ItemDownloadClient(settings.region));
6374
+ return [2 /*return*/];
6375
+ });
6376
+ }); })();
6377
+ }
6378
+ else {
6379
+ setClient(settings.client);
6380
+ }
6381
+ }, [settings.offline]);
6382
+ React.useEffect(function () {
6383
+ if (jobstyleOverride != undefined) {
6384
+ setJobstyle(jobstyleOverride);
6385
+ }
6386
+ }, [jobstyleOverride]);
6387
+ var item = settings.data;
6388
+ var itemCategory = (_c = (_b = item.categories) === null || _b === void 0 ? void 0 : _b.sort(function (a, b) { return b.index - a.index; })[0].localizedName) !== null && _c !== void 0 ? _c : "";
6389
+ if (itemCategory == "none")
6390
+ itemCategory = "";
6239
6391
  var tooltipBaseProps = {
6240
- title: skill.Name,
6241
- id: skill.ID + "-" + skill.Variation,
6242
- grade: 4,
6243
- icon: skill.IconPath ? React__default["default"].createElement(SkillIconWithButton, { skill: skill }) : "",
6244
- subtitle: skill.AdditionalInfo
6245
- ? "<div style=\"font-size: 12px;\">".concat(skill.AdditionalInfo, "</div>")
6246
- : "",
6392
+ title: item.name,
6393
+ grade: item.grade,
6394
+ id: item.id + "-" + item.level,
6395
+ icon: item.icon ? BuildIconPath(item.icon.iconPath) : "",
6396
+ subtitle: itemCategory,
6247
6397
  mainInfos: [],
6248
6398
  subInfoGroups: [],
6399
+ fullHeight: settings.fullHeight,
6249
6400
  };
6250
- if (skill.Tooltip != null) {
6251
- //topPart
6252
- AddMainText1s(tooltipBaseProps.mainInfos, skill);
6253
- AddMainText2s(tooltipBaseProps.mainInfos, skill);
6254
- //bottomPart
6255
- AddSubTexts(tooltipBaseProps.subInfoGroups, skill);
6256
- AddBreakValue(tooltipBaseProps.subInfoGroups, skill);
6257
- AddPvpModifiers(tooltipBaseProps.subInfoGroups, skill);
6258
- AddBoundaries(tooltipBaseProps.subInfoGroups, skill);
6259
- AddConditions(tooltipBaseProps.subInfoGroups, skill);
6260
- AddStances(tooltipBaseProps.subInfoGroups, skill);
6261
- if (debug) {
6262
- AddIds(tooltipBaseProps.subInfoGroups, skill);
6263
- }
6401
+ var setHasSkillModifiers = false;
6402
+ var jobstyles = [];
6403
+ var itemCombats = false;
6404
+ if (item.skills != null && item.skills.length > 0) {
6405
+ item.skills.forEach(function (itemSkill) {
6406
+ if (itemSkill.jobstyle != null) {
6407
+ setHasSkillModifiers = true;
6408
+ itemCombats = true;
6409
+ if (!jobstyles.includes(itemSkill.jobstyle)) {
6410
+ jobstyles.push(itemSkill.jobstyle);
6411
+ }
6412
+ }
6413
+ });
6414
+ }
6415
+ if (((_d = item.setBonus) === null || _d === void 0 ? void 0 : _d.setBonusStages) != null) {
6416
+ item.setBonus.setBonusStages.forEach(function (stage) {
6417
+ if (stage.skillModifiers != null && stage.skillModifiers.length > 0) {
6418
+ setHasSkillModifiers = true;
6419
+ stage.skillModifiers.forEach(function (modifier) {
6420
+ if (!jobstyles.includes(modifier.jobstyle)) {
6421
+ jobstyles.push(modifier.jobstyle);
6422
+ }
6423
+ });
6424
+ }
6425
+ });
6426
+ }
6427
+ //top part
6428
+ AddMainInfo(tooltipBaseProps.mainInfos, item);
6429
+ AddSubInfo(tooltipBaseProps.mainInfos, item);
6430
+ AddSkillTitles(tooltipBaseProps.mainInfos, item, itemCombats, jobstyle);
6431
+ AddCooldowns(tooltipBaseProps.mainInfos, item);
6432
+ AddItemStats(tooltipBaseProps.mainInfos, item);
6433
+ AddItemRandomStats(tooltipBaseProps.mainInfos, item);
6434
+ //bottom part
6435
+ AddGearScore(tooltipBaseProps.subInfoGroups, item, settings.debug);
6436
+ AddJobstyleToggles(setHasSkillModifiers, tooltipBaseProps.subInfoGroups, jobstyles, jobstyle, setJobstyle);
6437
+ AddTopText(tooltipBaseProps.subInfoGroups, item);
6438
+ AddSkillDescriptions(tooltipBaseProps.subInfoGroups, item, itemCombats, jobstyle);
6439
+ AddSkillModifiers(tooltipBaseProps.subInfoGroups, item, false, jobstyle);
6440
+ AddSetBonus(tooltipBaseProps.subInfoGroups, item, jobstyle);
6441
+ if (!settings.offline) {
6442
+ AddDecomposeResults(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6443
+ }
6444
+ AddUnityPoints(tooltipBaseProps.subInfoGroups, item);
6445
+ AddDescriptions(tooltipBaseProps.subInfoGroups, item);
6446
+ AddFlavorText(tooltipBaseProps.subInfoGroups, item);
6447
+ AddItemUsableGroup(tooltipBaseProps.subInfoGroups, item);
6448
+ AddRequiredLevel(tooltipBaseProps.subInfoGroups, item);
6449
+ AddRequiredJobs(tooltipBaseProps.subInfoGroups, item);
6450
+ AddBoundToAccount(tooltipBaseProps.subInfoGroups, item);
6451
+ AddAbleToTrade(tooltipBaseProps.subInfoGroups, item);
6452
+ if (!settings.offline) {
6453
+ AddSealingResult(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6454
+ AddAccountTransferResult(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6264
6455
  }
6265
6456
  return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
6266
6457
  }
6267
- function AddMainText1s(mainInfos, skill) {
6268
- skill.Tooltip.Main1.forEach(function (main) {
6269
- mainInfos.push(React__default["default"].createElement("div", { className: "SkillTooltip_mainText", dangerouslySetInnerHTML: { __html: main.Text } }));
6270
- });
6458
+ function AddMainInfo(mainInfos, item) {
6459
+ if (item.mainInfo != null)
6460
+ mainInfos.push(React__default["default"].createElement(ItemMainInfo, __assign({}, item)));
6271
6461
  }
6272
- function AddMainText2s(mainInfos, skill) {
6273
- skill.Tooltip.Main2.forEach(function (main) {
6274
- mainInfos.push(React__default["default"].createElement("div", { className: "SkillTooltip_smallText", dangerouslySetInnerHTML: { __html: main.Text } }));
6275
- });
6462
+ function AddSubInfo(mainInfos, item) {
6463
+ if (item.subInfo != null)
6464
+ mainInfos.push(React__default["default"].createElement(ItemSubInfo, __assign({}, item)));
6276
6465
  }
6277
- function AddSubTexts(subInfoGroups, skill) {
6278
- var texts = [];
6279
- skill.Tooltip.Sub.forEach(function (sub, i) {
6280
- texts.push(React__default["default"].createElement("div", { className: "SkillTooltip_subText" +
6281
- (i != skill.Tooltip.Sub.length - 1
6282
- ? " SkillTooltip_subTextMargin"
6283
- : "") },
6284
- sub.IconPath != null && sub.IconPath != "" ? (React__default["default"].createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
6285
- ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
6286
- : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIconSmall" })) : null,
6287
- React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: sub.Text } })));
6288
- });
6466
+ function AddSkillTitles(mainInfos, item, itemCombats, jobstyle) {
6467
+ var itemSkills = item.skills;
6468
+ if (itemSkills == null || itemSkills.length == 0)
6469
+ return;
6470
+ mainInfos.push(React__default["default"].createElement(ItemSkillTitles, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }));
6471
+ }
6472
+ function AddCooldowns(mainInfos, item) {
6473
+ if ((item.cooldownInMs == null || item.cooldownInMs == 0) &&
6474
+ (item.bgCooldownInMs == null || item.bgCooldownInMs == 0))
6475
+ return;
6476
+ mainInfos.push(React__default["default"].createElement(ItemCooldowns, __assign({}, item)));
6477
+ }
6478
+ function AddItemStats(mainInfos, item) {
6479
+ if (item.stats == null || item.stats.length == 0)
6480
+ return;
6481
+ mainInfos.push(React__default["default"].createElement(ItemStats, __assign({}, item)));
6482
+ }
6483
+ function AddItemRandomStats(mainInfos, item) {
6484
+ if (item.randomStats == null || item.randomStats.length === 0)
6485
+ return;
6486
+ mainInfos.push(React__default["default"].createElement(ItemRandomStats, __assign({}, item)));
6487
+ }
6488
+ function AddGearScore(subInfoGroups, item, debugMode) {
6489
+ if (!debugMode)
6490
+ return;
6289
6491
  subInfoGroups.push({
6290
6492
  title: "",
6291
- texts: texts,
6493
+ texts: [React__default["default"].createElement(GearScore, __assign({}, item))],
6292
6494
  });
6293
6495
  }
6294
- function AddBreakValue(subInfoGroups, skill) {
6295
- if (skill.BreakValue != null && skill.BreakValue !== "0") {
6296
- subInfoGroups.push({
6297
- title: "",
6298
- texts: [
6299
- React__default["default"].createElement("div", null,
6300
- "Breaker value:\u00A0",
6301
- React__default["default"].createElement("span", { className: "tooltipArg", dangerouslySetInnerHTML: { __html: skill.BreakValue } })),
6302
- ],
6303
- });
6304
- }
6305
- }
6306
- function AddPvpModifiers(subInfoGroups, skill) {
6307
- if (skill.Pvp == null || skill.EqualizedPvp == null)
6496
+ function AddTopText(subInfoGroups, item) {
6497
+ if (item.topText == null)
6308
6498
  return;
6309
6499
  subInfoGroups.push({
6310
6500
  title: "",
6311
- texts: [React__default["default"].createElement(PvpModifiers, { skill: skill })],
6501
+ texts: [React__default["default"].createElement(TopText, __assign({}, item))],
6312
6502
  });
6313
6503
  }
6314
- function AddBoundaries(subInfoGroups, skill) {
6315
- if (skill.Boundaries == null)
6504
+ function AddSkillDescriptions(subInfoGroups, item, itemCombats, jobstyle) {
6505
+ if (item.skills == null || item.skills.length == 0)
6316
6506
  return;
6317
6507
  subInfoGroups.push({
6318
6508
  title: "",
6319
- texts: [React__default["default"].createElement(SkillBoundaries, { skill: skill })],
6509
+ texts: [
6510
+ React__default["default"].createElement(ItemSkillDescriptions, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }),
6511
+ ],
6320
6512
  });
6321
6513
  }
6322
- function AddConditions(subInfoGroups, skill) {
6323
- if (skill.Tooltip.Condition.length == 0)
6514
+ function AddSkillModifiers(subInfoGroups, item, isSetBonus, jobstyle) {
6515
+ if (item.skillModifierGroups == null || item.skillModifierGroups.length == 0)
6324
6516
  return;
6325
6517
  subInfoGroups.push({
6326
- title: "Terms of Use",
6327
- texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Condition })],
6518
+ title: "",
6519
+ texts: [
6520
+ React__default["default"].createElement(SkillModifiers, { skillModifierGroups: item.skillModifierGroups, isSetBonus: isSetBonus, jobstyle: jobstyle }),
6521
+ ],
6328
6522
  });
6329
6523
  }
6330
- function AddStances(subInfoGroups, skill) {
6331
- if (skill.Tooltip.Stance.length == 0)
6524
+ function AddSetBonus(subInfoGroups, item, jobstyle) {
6525
+ if (item.setBonus == null)
6332
6526
  return;
6333
6527
  subInfoGroups.push({
6334
- title: "Switch Position",
6335
- texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Stance })],
6528
+ title: "Set Effect:",
6529
+ texts: [React__default["default"].createElement(SetBonus, { item: item, jobstyle: jobstyle })],
6336
6530
  });
6337
6531
  }
6338
- function AddIds(subInfoGroups, skill) {
6532
+ function AddDecomposeResults(subInfoGroups, item, client, region) {
6533
+ if (item.decomposeRewards == null || item.decomposeRewards.length == 0)
6534
+ return;
6535
+ var fixedItems = []
6536
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.fixedItems; })).filter(function (x) { return x != null; });
6537
+ var randomItems = []
6538
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.randomItems; })).filter(function (x) { return x != null; });
6539
+ var selectItems = []
6540
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.selectItems; })).filter(function (x) { return x != null; });
6541
+ if (fixedItems.length > 0)
6542
+ subInfoGroups.push({
6543
+ title: "Guaranteed/Salvage:",
6544
+ texts: [
6545
+ React__default["default"].createElement(DecomposeResults, { region: region, items: fixedItems, client: client }),
6546
+ ],
6547
+ });
6548
+ if (randomItems.length > 0)
6549
+ subInfoGroups.push({
6550
+ title: "Random:",
6551
+ texts: [
6552
+ React__default["default"].createElement(DecomposeResults, { region: region, items: randomItems, client: client }),
6553
+ ],
6554
+ });
6555
+ if (selectItems.length > 0)
6556
+ subInfoGroups.push({
6557
+ title: "Select:",
6558
+ texts: [
6559
+ React__default["default"].createElement(DecomposeResults, { region: region, items: selectItems, client: client }),
6560
+ ],
6561
+ });
6562
+ }
6563
+ function AddJobstyleToggles(setHasSkillModifiers, subInfoGroups, jobstyles, jobstyle, setJobstyle) {
6564
+ if (!setHasSkillModifiers)
6565
+ return;
6339
6566
  subInfoGroups.push({
6340
- title: "Debug info",
6341
- texts: [React__default["default"].createElement("div", null,
6342
- "ID: ",
6343
- skill.ID), React__default["default"].createElement("div", null,
6344
- "Variation: ",
6345
- skill.Variation)],
6567
+ title: "",
6568
+ texts: [
6569
+ React__default["default"].createElement(SetBonusToggle, { jobstyles: jobstyles, jobstyle: jobstyle, setJobstyle: setJobstyle }),
6570
+ ],
6571
+ });
6572
+ }
6573
+ function AddDescriptions(subInfoGroups, item) {
6574
+ if (item.descriptions == null || item.descriptions.length == 0)
6575
+ return;
6576
+ item.descriptions
6577
+ .filter(function (x) { return x.text != null && x.text != ""; })
6578
+ .forEach(function (description) {
6579
+ subInfoGroups.push({
6580
+ title: description.title,
6581
+ texts: [React__default["default"].createElement(ItemDescriptionText, { htmlString: description.text })],
6582
+ });
6346
6583
  });
6347
- }
6348
-
6349
- var css_248z$1 = ".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";
6350
- styleInject(css_248z$1);
6351
-
6352
- var SkillTooltipWrapper = function (_a) {
6353
- var data = _a.data, children = _a.children, _b = _a.interactive, interactive = _b === void 0 ? false : _b, _c = _a.placement, placement = _c === void 0 ? "right" : _c, _d = _a.followCursor, followCursor$1 = _d === void 0 ? false : _d, _e = _a.trigger, trigger = _e === void 0 ? "mouseenter focus" : _e, _f = _a.showArrow, showArrow = _f === void 0 ? true : _f;
6354
- var spanRef = React.useRef(null);
6355
- var _g = React.useState(null), childRef = _g[0], setChildRef = _g[1];
6356
- /**
6357
- * Mount the temporary span element.
6358
- * retrieve and store the target element's reference.
6359
- */
6360
- React.useEffect(function () {
6361
- if (spanRef.current) {
6362
- setChildRef(spanRef.current.previousElementSibling);
6363
- }
6364
- return function () { return setChildRef(null); };
6365
- }, []);
6366
- return (React__default["default"].createElement(React__default["default"].Fragment, null,
6367
- children,
6368
- 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" } }))));
6369
- };
6370
-
6371
- exports.ServerRegion = void 0;
6372
- (function (ServerRegion) {
6373
- ServerRegion["EUNA"] = "EUNA";
6374
- ServerRegion["Korea"] = "Korea";
6375
- ServerRegion["KoreaTest"] = "KoreaTest";
6376
- })(exports.ServerRegion || (exports.ServerRegion = {}));
6377
-
6378
- var css_248z = ".NpcTooltip_toggleBarContainer {\n display: flex; }\n\n.NpcTooltip_toggleButton {\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 .NpcTooltip_toggleButton:hover {\n background-color: rgba(255, 255, 255, 0.2);\n opacity: 1; }\n .NpcTooltip_toggleButton-active {\n background-color: rgba(255, 255, 255, 0.3) !important;\n color: #fff;\n opacity: 1; }\n\n.NpcTooltip_storeEntry {\n display: flex;\n align-items: stretch;\n background-color: rgba(233, 233, 233, 0.1);\n padding: 0.33rem;\n font-size: 14px; }\n .NpcTooltip_storeEntry:not(:last-child) {\n margin-bottom: 0.2rem; }\n\n.NpcTooltip_storeEntryItemNameLimit {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center; }\n\n.NpcTooltip_storeEntryItemLimit {\n font-size: 12px; }\n\n.NpcTooltip_storeEntryItemName {\n flex: 1;\n display: flex;\n align-items: center; }\n\n.NpcTooltip_storeEntryItemIconName {\n display: flex;\n align-items: center; }\n .NpcTooltip_storeEntryItemIconName img {\n width: 48px;\n height: 48px;\n margin-right: 0.33rem; }\n\n.NpcTooltip_itemBuyPriceEntriesContainer {\n display: flex;\n flex-direction: column;\n flex: 1;\n align-items: flex-end;\n justify-content: center;\n padding-left: 2rem; }\n\n.NpcTooltip_itemBuyPriceEntries {\n display: flex; }\n .NpcTooltip_itemBuyPriceEntries-moneyMargin {\n margin-bottom: 0.2rem; }\n\n.NpcTooltip_itemBuyPriceEntry:not(:first-child) {\n margin-left: 0.33rem; }\n\n.NpcTooltip_itemBuyPriceEntryContainer {\n position: relative;\n height: 32px; }\n .NpcTooltip_itemBuyPriceEntryContainer img {\n width: 32px;\n height: 32px; }\n .NpcTooltip_itemBuyPriceEntryContainer-shadow {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n box-shadow: inset 0 0 2px 0px #000000; }\n\n.NpcTooltip_itemBuyPriceEntryCount {\n position: absolute;\n bottom: 0;\n left: 0;\n color: #ffffff;\n background-color: rgba(0, 0, 0, 0.4);\n width: 32px;\n line-height: 12px;\n text-align: center; }\n\n.NpcTooltip_moneyContainer {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .NpcTooltip_moneyContainer > span {\n display: flex;\n align-items: center; }\n .NpcTooltip_moneyContainer > span:not(:first-child) {\n margin-left: 0.1rem; }\n .NpcTooltip_moneyContainer > span > img {\n width: 16px;\n height: 16px; }\n";
6379
- styleInject(css_248z);
6380
-
6381
- function StoreToggle(_a) {
6382
- var store = _a.store, isActive = _a.isActive, setActive = _a.setActive;
6383
- return (React__default["default"].createElement("button", { className: "NpcTooltip_toggleButton " +
6384
- (isActive ? "NpcTooltip_toggleButton-active" : ""), onClick: setActive },
6385
- React__default["default"].createElement("span", null, store.Name)));
6386
- }
6387
-
6388
- function StoreToggleBar(_a) {
6389
- var stores = _a.stores, activeTab = _a.activeTab, setActiveTab = _a.setActiveTab;
6390
- return (React__default["default"].createElement("div", { className: "NpcTooltip_toggleBarContainer" }, stores.map(function (store, i) { return (React__default["default"].createElement(StoreToggle, { key: i, store: store, isActive: activeTab === i, setActive: function () { return setActiveTab(i); } })); })));
6391
- }
6392
-
6393
- var BuyLimitReset;
6394
- (function (BuyLimitReset) {
6395
- BuyLimitReset[BuyLimitReset["Day"] = 0] = "Day";
6396
- BuyLimitReset[BuyLimitReset["Week"] = 1] = "Week";
6397
- BuyLimitReset[BuyLimitReset["Month"] = 2] = "Month";
6398
- BuyLimitReset[BuyLimitReset["Absolute"] = 3] = "Absolute";
6399
- })(BuyLimitReset || (BuyLimitReset = {}));
6400
- var BuyLimitType;
6401
- (function (BuyLimitType) {
6402
- BuyLimitType[BuyLimitType["Character"] = 0] = "Character";
6403
- BuyLimitType[BuyLimitType["Account"] = 1] = "Account";
6404
- })(BuyLimitType || (BuyLimitType = {}));
6405
-
6406
- function ItemBuyLimit(_a) {
6407
- var limit = _a.limit;
6408
- if (limit == null)
6409
- return null;
6410
- return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemLimit" }, GetStringForBuyLimitType(limit.LimitType) +
6411
- "Limit: " +
6412
- limit.Amount +
6413
- "/" +
6414
- GetStringForBuyLimitReset(limit.LimitReset)));
6415
6584
  }
6416
- function GetStringForBuyLimitType(type) {
6417
- switch (type) {
6418
- case BuyLimitType.Account:
6419
- return "Account ";
6420
- case BuyLimitType.Character:
6421
- return "Character ";
6422
- default:
6423
- return "";
6424
- }
6585
+ function AddFlavorText(subInfoGroups, item) {
6586
+ if (item.flavorText == null || item.flavorText == "")
6587
+ return;
6588
+ subInfoGroups.push({
6589
+ title: "",
6590
+ texts: [React__default["default"].createElement(ItemDescriptionText, { htmlString: item.flavorText })],
6591
+ });
6425
6592
  }
6426
- function GetStringForBuyLimitReset(reset) {
6427
- switch (reset) {
6428
- case BuyLimitReset.Day:
6429
- return "Day";
6430
- case BuyLimitReset.Week:
6431
- return "Week ";
6432
- case BuyLimitReset.Month:
6433
- return "Month";
6434
- default:
6435
- return "";
6436
- }
6437
- }
6438
-
6439
- function Money(_a) {
6440
- var money = _a.money;
6441
- var bnsmoney = getMoneyObj(money);
6442
- if (bnsmoney == null)
6443
- return null;
6444
- return (React__default["default"].createElement("div", { className: "NpcTooltip_moneyContainer" },
6445
- bnsmoney.Gold > 0 ? (React__default["default"].createElement("span", null,
6446
- bnsmoney.Gold,
6447
- React__default["default"].createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
6448
- bnsmoney.Silver > 0 ? (React__default["default"].createElement("span", null,
6449
- bnsmoney.Silver,
6450
- React__default["default"].createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
6451
- bnsmoney.Copper > 0 ? (React__default["default"].createElement("span", null,
6452
- bnsmoney.Copper,
6453
- React__default["default"].createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
6454
- }
6455
-
6456
- function StoreItemBuyPriceEntry(_a) {
6457
- var _this = this;
6458
- var itemRef = _a.itemRef, client = _a.client;
6459
- var _b = React.useState(), item = _b[0], setItem = _b[1];
6460
- React.useEffect(function () {
6461
- if (client == null)
6462
- return;
6463
- (function () { return __awaiter(_this, void 0, void 0, function () {
6464
- var _a;
6465
- return __generator(this, function (_b) {
6466
- switch (_b.label) {
6467
- case 0:
6468
- _a = setItem;
6469
- return [4 /*yield*/, client.GetItem(itemRef.itemId, itemRef.itemLevel)];
6470
- case 1:
6471
- _a.apply(void 0, [_b.sent()]);
6472
- return [2 /*return*/];
6473
- }
6474
- });
6475
- }); })();
6476
- }, [itemRef, client]);
6477
- return (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntry" }, item ? (React__default["default"].createElement(ItemTooltipWrapper, { trigger: "click", data: item, region: client.region, client: client },
6478
- React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer" },
6479
- React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer-shadow" }),
6480
- React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" }),
6481
- React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryCount" },
6482
- React__default["default"].createElement("span", null, itemRef.min))))) : null));
6483
- }
6484
-
6485
- function NpcStoreEntry(_a) {
6486
- var _this = this;
6487
- var _b, _c;
6488
- var data = _a.data, client = _a.client;
6489
- var _d = React.useState(), item = _d[0], setItem = _d[1];
6490
- React.useEffect(function () {
6491
- if (client == null)
6492
- return;
6493
- (function () { return __awaiter(_this, void 0, void 0, function () {
6494
- var res;
6495
- return __generator(this, function (_a) {
6496
- switch (_a.label) {
6497
- case 0: return [4 /*yield*/, client.GetItem(data.Item.itemId, data.Item.itemLevel)];
6498
- case 1:
6499
- res = _a.sent();
6500
- setItem(res);
6501
- return [2 /*return*/];
6502
- }
6503
- });
6504
- }); })();
6505
- }, [data, client]);
6506
- if (item != undefined) {
6507
- return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntry" },
6508
- React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemIconName" },
6509
- React__default["default"].createElement(ItemTooltipWrapper, { data: item, client: client, region: client.region, trigger: "click" },
6510
- React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" })),
6511
- React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemNameLimit" },
6512
- React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemName TooltipBase_grade-" + item.grade, dangerouslySetInnerHTML: { __html: item.name } }),
6513
- React__default["default"].createElement(ItemBuyLimit, { limit: data.Limit }))),
6514
- React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntriesContainer" },
6515
- ((_b = data.BuyPrice.Items) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntries " +
6516
- (data.BuyPrice.Money > 0
6517
- ? "NpcTooltip_itemBuyPriceEntries-moneyMargin"
6518
- : "") }, (_c = data.BuyPrice.Items) === null || _c === void 0 ? void 0 : _c.map(function (itemCountRef, i) { return (React__default["default"].createElement(StoreItemBuyPriceEntry, { itemRef: itemCountRef, client: client, key: i })); }))) : null,
6519
- React__default["default"].createElement(Money, { money: data.BuyPrice.Money }))));
6520
- }
6521
- else {
6522
- return null;
6523
- }
6524
- }
6525
-
6526
- function NpcStores(_a) {
6527
- var stores = _a.stores, activeTab = _a.activeTab, client = _a.client;
6528
- var activeStore = stores[activeTab];
6529
- return (React__default["default"].createElement("div", null, activeStore.Entries.map(function (entry, i) { return (React__default["default"].createElement(NpcStoreEntry, { key: i, data: entry, client: client })); })));
6530
- }
6531
-
6532
- function NpcTooltip(_a) {
6533
- var _this = this;
6534
- var _b;
6535
- var clientProp = _a.client, npc = _a.npc; _a.debug; var region = _a.region, _c = _a.grade, grade = _c === void 0 ? 4 : _c, _d = _a.fullHeight, fullHeight = _d === void 0 ? false : _d;
6536
- var _e = React.useState(0), activeTab = _e[0], setActiveTab = _e[1];
6537
- var _f = React.useState(), client = _f[0], setClient = _f[1];
6538
- React.useEffect(function () {
6539
- if (clientProp == undefined) {
6540
- (function () { return __awaiter(_this, void 0, void 0, function () {
6541
- return __generator(this, function (_a) {
6542
- setClient(new ItemDownloadClient(region));
6543
- return [2 /*return*/];
6544
- });
6545
- }); })();
6546
- }
6547
- else {
6548
- setClient(clientProp);
6549
- }
6550
- }, []);
6551
- var tooltipBaseProps = {
6552
- title: npc.Name,
6553
- grade: grade,
6554
- id: npc.Alias,
6555
- subtitle: (_b = npc.Title) !== null && _b !== void 0 ? _b : "",
6556
- fullHeight: fullHeight,
6557
- subInfoGroups: [],
6558
- };
6559
- //no top part
6560
- AddStoreToggles(tooltipBaseProps.subInfoGroups, npc.Stores, activeTab, setActiveTab);
6561
- AddStores(tooltipBaseProps.subInfoGroups, npc.Stores, activeTab, client);
6562
- return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
6593
+ function AddItemUsableGroup(subInfoGroups, item) {
6594
+ if (IsNullOrEmpty(item.usableGroup))
6595
+ return;
6596
+ subInfoGroups.push({
6597
+ title: "",
6598
+ texts: [React__default["default"].createElement(RawText, { htmlString: item.usableGroup })],
6599
+ });
6563
6600
  }
6564
- function AddStoreToggles(subInfoGroups, Stores, activeTab, setActiveTab) {
6601
+ function AddRequiredLevel(subInfoGroups, item) {
6602
+ if (item.levelRequired == null || item.levelRequired <= 1)
6603
+ return;
6565
6604
  subInfoGroups.push({
6566
6605
  title: "",
6567
6606
  texts: [
6568
- React__default["default"].createElement(StoreToggleBar, { stores: Stores, activeTab: activeTab, setActiveTab: setActiveTab }),
6607
+ React__default["default"].createElement(TextWithNumber, { text: "Requires Level ", number: item.levelRequired }),
6569
6608
  ],
6570
6609
  });
6571
6610
  }
6572
- function AddStores(subInfoGroups, Stores, activeTab, client) {
6611
+ function AddRequiredJobs(subInfoGroups, item) {
6612
+ if (item.classRequired == null || item.classRequired.length == 0)
6613
+ return;
6614
+ var enJobNames = item.classRequired.map(function (x) { return x.enName; });
6573
6615
  subInfoGroups.push({
6574
6616
  title: "",
6575
6617
  texts: [
6576
- React__default["default"].createElement(NpcStores, { stores: Stores, activeTab: activeTab, client: client }),
6618
+ React__default["default"].createElement(StringEnumerationWithText, { enumeration: enJobNames, textAfter: " Only", textBefore: "" }),
6619
+ ],
6620
+ });
6621
+ }
6622
+ function AddBoundToAccount(subInfoGroups, item) {
6623
+ if (item.boundToAccount == null || item.boundToAccount == false)
6624
+ return;
6625
+ subInfoGroups.push({
6626
+ title: "",
6627
+ texts: [React__default["default"].createElement("div", null, "Bound to Account")],
6628
+ });
6629
+ }
6630
+ function AddAbleToTrade(subInfoGroups, item) {
6631
+ if (item.unableToTrade == null || item.unableToTrade == false)
6632
+ return;
6633
+ subInfoGroups.push({
6634
+ title: "",
6635
+ texts: [React__default["default"].createElement("div", null, "Unable to Trade")],
6636
+ });
6637
+ }
6638
+ function AddSealingResult(subInfoGroups, item, client, region) {
6639
+ if (item.sealing == null ||
6640
+ item.sealing.sealAcquireItemId == null ||
6641
+ item.sealing.sealConsumeItems.filter(function (x) { return x.min != 0; }).length == 0)
6642
+ return;
6643
+ subInfoGroups.push({
6644
+ title: "Can be resealed with:",
6645
+ texts: [React__default["default"].createElement(SealingResult, { region: region, item: item, client: client })],
6646
+ });
6647
+ }
6648
+ function AddAccountTransferResult(subInfoGroups, item, client, region) {
6649
+ if (item.accountTransfer == null ||
6650
+ item.accountTransfer.requiredItems == null ||
6651
+ item.accountTransfer.requiredItems.length == 0)
6652
+ return;
6653
+ subInfoGroups.push({
6654
+ title: "Can be transferred with:",
6655
+ texts: [React__default["default"].createElement(AccountTransfer, { region: region, item: item, client: client })],
6656
+ });
6657
+ }
6658
+ function AddUnityPoints(subInfoGroups, item) {
6659
+ if (item.setPoints == null || item.refinementPoints == null)
6660
+ return;
6661
+ if (item.setPoints === 0)
6662
+ return;
6663
+ if (item.refinementPoints === 0)
6664
+ return;
6665
+ subInfoGroups.push({
6666
+ title: "",
6667
+ texts: [
6668
+ React__default["default"].createElement("span", null,
6669
+ "Splendor Stone Set Points: ",
6670
+ item.setPoints),
6671
+ React__default["default"].createElement("span", null,
6672
+ "Splendor Stone Refinement Points: ",
6673
+ item.refinementPoints),
6577
6674
  ],
6578
6675
  });
6579
6676
  }
6580
6677
 
6678
+ var css_248z = "";
6679
+ styleInject(css_248z);
6680
+
6681
+ function JsonTooltip(props) {
6682
+ var tooltipProps = {
6683
+ title: props.title,
6684
+ grade: props.grade,
6685
+ icon: props.icon,
6686
+ mainInfos: JsonArrayToJsxArray(props.mainInfos),
6687
+ subtitle: props.subtitle,
6688
+ subInfoGroups: JsonSubInfoToJsxSubInfo(props.subInfoGroups),
6689
+ };
6690
+ return React__default["default"].createElement(TooltipBase, __assign({}, tooltipProps));
6691
+ }
6692
+ function JsonSubInfoToJsxSubInfo(subInfoGroups) {
6693
+ if (subInfoGroups == undefined)
6694
+ return undefined;
6695
+ var result = [];
6696
+ subInfoGroups.forEach(function (subInfoGroup) {
6697
+ var jsxSubInfoGroup = {
6698
+ title: subInfoGroup.title,
6699
+ texts: JsonArrayToJsxArray(subInfoGroup.texts),
6700
+ };
6701
+ result.push(jsxSubInfoGroup);
6702
+ });
6703
+ return result;
6704
+ }
6705
+ function JsonArrayToJsxArray(stringArray) {
6706
+ if (stringArray == undefined)
6707
+ return undefined;
6708
+ var jsxArray = [];
6709
+ stringArray.forEach(function (mainInfo) {
6710
+ jsxArray.push(React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: mainInfo } }));
6711
+ });
6712
+ return jsxArray;
6713
+ }
6714
+
6715
+ var NpcTooltipSettings = /** @class */ (function (_super) {
6716
+ __extends(NpcTooltipSettings, _super);
6717
+ function NpcTooltipSettings(npc, region, grade, client, offline) {
6718
+ if (grade === void 0) { grade = 4; }
6719
+ var _this = _super.call(this, region, client, offline) || this;
6720
+ _this.npc = npc;
6721
+ _this.grade = grade;
6722
+ _this.type = TooltipType.Npc;
6723
+ return _this;
6724
+ }
6725
+ return NpcTooltipSettings;
6726
+ }(TooltipWithNetworkSettings));
6727
+
6728
+ var SkillTooltipSettings = /** @class */ (function (_super) {
6729
+ __extends(SkillTooltipSettings, _super);
6730
+ function SkillTooltipSettings(data) {
6731
+ var _this = _super.call(this) || this;
6732
+ _this.data = data;
6733
+ _this.type = TooltipType.Skill;
6734
+ return _this;
6735
+ }
6736
+ return SkillTooltipSettings;
6737
+ }(TooltipSettingsBase));
6738
+
6581
6739
  exports.GetCooldownString = GetCooldownString;
6582
6740
  exports.ItemTooltip = ItemTooltip;
6583
- exports.ItemTooltipWrapper = ItemTooltipWrapper;
6741
+ exports.ItemTooltipSettings = ItemTooltipSettings;
6584
6742
  exports.JsonTooltip = JsonTooltip;
6585
6743
  exports.NpcTooltip = NpcTooltip;
6744
+ exports.NpcTooltipSettings = NpcTooltipSettings;
6586
6745
  exports.SkillTooltip = SkillTooltip;
6587
- exports.SkillTooltipWrapper = SkillTooltipWrapper;
6746
+ exports.SkillTooltipSettings = SkillTooltipSettings;
6588
6747
  exports.TooltipBase = TooltipBase;
6748
+ exports.TooltipWrapper = TooltipWrapper;
6749
+ exports.TooltipWrapperSettings = TooltipWrapperSettings;
6589
6750
  //# sourceMappingURL=index.js.map