| 1 |
/******/ (() => { // webpackBootstrap |
| 2 |
/******/ "use strict"; |
| 3 |
/******/ var __webpack_modules__ = ({ |
| 4 |
|
| 5 |
/***/ "./resources/img/logo-give.svg" |
| 6 |
/*!*************************************!*\ |
| 7 |
!*** ./resources/img/logo-give.svg ***! |
| 8 |
\*************************************/ |
| 9 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 10 |
|
| 11 |
__webpack_require__.r(__webpack_exports__); |
| 12 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 13 |
/* harmony export */ ReactComponent: () => (/* binding */ SvgLogoGive), |
| 14 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 15 |
/* harmony export */ }); |
| 16 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 17 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 18 |
var _path, _path2; |
| 19 |
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } |
| 20 |
|
| 21 |
var SvgLogoGive = function SvgLogoGive(props) { |
| 22 |
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ |
| 23 |
xmlns: "http://www.w3.org/2000/svg", |
| 24 |
width: 46, |
| 25 |
height: 46, |
| 26 |
fill: "none", |
| 27 |
"aria-labelledby": "give-title" |
| 28 |
}, props), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 29 |
fill: "#3D7BF5", |
| 30 |
d: "M0 9.857C0 4.413 4.413 0 9.857 0h26.286C41.587 0 46 4.413 46 9.857v26.286C46 41.587 41.587 46 36.143 46H9.857C4.413 46 0 41.587 0 36.143z" |
| 31 |
})), _path2 || (_path2 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 32 |
fill: "#FEFBF2", |
| 33 |
d: "M41.071 22.372c-4.885.202-4.245.147-18.419.22-.133 0-.399.056-.399.32 0 .226.013 1.895.02 2.38 0 .079-.033.159.17.159.171 0 6.995-.068 11.754-.454-.843 5.09-5.399 8.98-10.892 8.98-5.494 0-10.385-4.183-10.974-9.544 0-.031-.006-.056-.006-.086a9.6 9.6 0 0 1-.007-2.037c.165-1.594.71-3.19 1.603-4.612l.038-.056c.133-.208.279-.41.425-.607.101-.135.202-.276.316-.405q.088-.11.184-.22a11.12 11.12 0 0 1 7.274-3.73 10.488 10.488 0 0 1 2.23.006c.102.013.197.019.298.031q.465.056.913.147c.164.037.316.074.475.117a11.564 11.564 0 0 1 1.375.442c.038.012.07.03.107.042q.419.167.799.362c.221.11.45.221.665.35a10.873 10.873 0 0 1 2.68 2.202l3.003-2.208c-2.87-3.638-7.375-5.956-12.437-5.956-7.477 0-13.73 5.066-15.308 11.844q-.02.08-.038.172c-.032.147-.057.294-.089.441q-.039.184-.07.369c-.019.104-.031.214-.044.319-.019.153-.044.306-.063.466-.013.116-.02.233-.032.355q-.02.211-.032.43-.018.398-.019.803c0 8.391 7.027 15.194 15.695 15.194 8.173 0 14.877-6.048 15.625-13.764q.039-.148.07-.295c2.863-.178 2.984 0 2.984 0" |
| 34 |
}))); |
| 35 |
}; |
| 36 |
|
| 37 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iNDYiIHZpZXdCb3g9IjAgMCA0NiA0NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiByb2xlPSJpbWciIGFyaWEtbGFiZWxsZWRieT0iZ2l2ZS10aXRsZSI+Cjx0aXRsZSBpZD0iZ2l2ZS10aXRsZSI+R2l2ZVdQIGxvZ288L3RpdGxlPgo8cGF0aCBkPSJNMCA5Ljg1NzE0QzAgNC40MTMxOSA0LjQxMzE5IDAgOS44NTcxNCAwSDM2LjE0MjlDNDEuNTg2OCAwIDQ2IDQuNDEzMTkgNDYgOS44NTcxNFYzNi4xNDI5QzQ2IDQxLjU4NjggNDEuNTg2OCA0NiAzNi4xNDI5IDQ2SDkuODU3MTRDNC40MTMxOSA0NiAwIDQxLjU4NjggMCAzNi4xNDI5VjkuODU3MTRaIiBmaWxsPSIjM0Q3QkY1Ii8+CjxwYXRoIGQ9Ik00MS4wNzEzIDIyLjM3MTZDMzYuMTg2MiAyMi41NzQgMzYuODI2MSAyMi41MTg4IDIyLjY1MjMgMjIuNTkyNEMyMi41MTkyIDIyLjU5MjQgMjIuMjUzMSAyMi42NDc2IDIyLjI1MzEgMjIuOTExNEMyMi4yNTMxIDIzLjEzODMgMjIuMjY1OCAyNC44MDY3IDIyLjI3MjEgMjUuMjkxM0MyMi4yNzIxIDI1LjM3MSAyMi4yNDA0IDI1LjQ1MDggMjIuNDQzMiAyNS40NTA4QzIyLjYxNDMgMjUuNDUwOCAyOS40MzgyIDI1LjM4MzMgMzQuMTk2NiAyNC45OTY5QzMzLjM1MzkgMzAuMDg3OSAyOC43OTgzIDMzLjk3NjcgMjMuMzA0OSAzMy45NzY3QzE3LjgxMTUgMzMuOTc2NyAxMi45MiAyOS43OTM1IDEyLjMzMDggMjQuNDMyNkMxMi4zMzA4IDI0LjQwMTkgMTIuMzI0NSAyNC4zNzczIDEyLjMyNDUgMjQuMzQ2N0MxMi4yODY0IDI0LjAwMzIgMTIuMjY3NCAyMy42NDc0IDEyLjI2NzQgMjMuMjk3OEMxMi4yNjc0IDIyLjk2NjYgMTIuMjg2NCAyMi42MzU0IDEyLjMxODEgMjIuMzEwM0MxMi40ODI5IDIwLjcxNTUgMTMuMDI3OCAxOS4xMjA3IDEzLjkyMTIgMTcuNjk3N0MxMy45MzM4IDE3LjY3OTMgMTMuOTQ2NSAxNy42NjA5IDEzLjk1OTIgMTcuNjQyNUMxNC4wOTIyIDE3LjQzMzkgMTQuMjM4IDE3LjIzMTUgMTQuMzgzNyAxNy4wMzUyQzE0LjQ4NTEgMTYuOTAwMyAxNC41ODY0IDE2Ljc1OTIgMTQuNzAwNSAxNi42MzA0QzE0Ljc1NzUgMTYuNTU2OCAxNC44MjA5IDE2LjQ4MzIgMTQuODg0MiAxNi40MDk2QzE2LjY3NzMgMTQuMzYwOSAxOS4yNDk4IDEyLjk2ODUgMjIuMTU4MSAxMi42ODAyQzIyLjUzMTkgMTIuNjQzNCAyMi45MTIxIDEyLjYyNSAyMy4zMDQ5IDEyLjYyNUMyMy42NzI0IDEyLjYyNSAyNC4wMzM1IDEyLjY0OTYgMjQuMzg4NCAxMi42ODY0QzI0LjQ4OTcgMTIuNjk4NiAyNC41ODQ4IDEyLjcwNDggMjQuNjg2MiAxMi43MTdDMjQuOTk2NiAxMi43NTM4IDI1LjMwMDggMTIuODAyOSAyNS41OTg2IDEyLjg2NDJDMjUuNzYzMyAxMi45MDEgMjUuOTE1NCAxMi45Mzc5IDI2LjA3MzggMTIuOTgwOEMyNi4yMDA1IDEzLjAxMTUgMjYuMzMzNSAxMy4wNDgzIDI2LjQ2MDMgMTMuMDg1MUMyNi44MDI0IDEzLjE4MzIgMjcuMTMxOSAxMy4yOTk3IDI3LjQ0ODcgMTMuNDIyNEMyNy40ODY3IDEzLjQzNDcgMjcuNTE4NCAxMy40NTMxIDI3LjU1NjQgMTMuNDY1NEMyNy44MzUyIDEzLjU3NTggMjguMTAxMyAxMy42OTg0IDI4LjM1NDggMTMuODI3MkMyOC41NzY1IDEzLjkzNzcgMjguODA0NiAxNC4wNDgxIDI5LjAyIDE0LjE3NjlDMjkuMDI2NCAxNC4xNzY5IDI5LjAzOTEgMTQuMTgzIDI5LjA0NTQgMTQuMTg5MUMzMC4wNDY1IDE0Ljc3OCAzMC45NDYyIDE1LjUyMDIgMzEuNzAwMiAxNi4zNzg5TDM0LjcwMzUgMTQuMTcwN0MzMS44MzMzIDEwLjUzMzQgMjcuMzI4MyA4LjIxNDg0IDIyLjI2NTggOC4yMTQ4NEMxNC43ODkyIDguMjE0ODQgOC41MzU0OCAxMy4yODEzIDYuOTU3NzkgMjAuMDU5MkM2Ljk0NTEyIDIwLjExNDQgNi45MzI0NSAyMC4xNjk2IDYuOTE5NzcgMjAuMjMwOUM2Ljg4ODA5IDIwLjM3ODEgNi44NjI3NSAyMC41MjUzIDYuODMxMDcgMjAuNjcyNUM2LjgwNTcyIDIwLjc5NTIgNi43ODAzOCAyMC45MTc5IDYuNzYxMzcgMjEuMDQwNkM2Ljc0MjM2IDIxLjE0NDggNi43Mjk2OSAyMS4yNTUzIDYuNzE3MDIgMjEuMzU5NUM2LjY5ODAxIDIxLjUxMjkgNi42NzI2NyAyMS42NjYyIDYuNjUzNjYgMjEuODI1N0M2LjY0MDk5IDIxLjk0MjIgNi42MzQ2NSAyMi4wNTg4IDYuNjIxOTggMjIuMTgxNUM2LjYwOTMxIDIyLjMyMjUgNi41OTY2MyAyMi40NjM2IDYuNTkwMyAyMi42MTA4QzYuNTc3NjMgMjIuODc0NiA2LjU3MTI5IDIzLjE0NDUgNi41NzEyOSAyMy40MTQzQzYuNTcxMjkgMzEuODA1MyAxMy41OTggMzguNjA3NyAyMi4yNjU4IDM4LjYwNzdDMzAuNDM5MyAzOC42MDc3IDM3LjE0MjkgMzIuNTU5OCAzNy44OTA2IDI0Ljg0MzVDMzcuOTE1OSAyNC43NDU0IDM3Ljk0MTMgMjQuNjQ3MiAzNy45NjAzIDI0LjU0OTFDNDAuODI0MiAyNC4zNzEyIDQwLjk0NDYgMjQuNTQ5MSA0MC45NDQ2IDI0LjU0OTEiIGZpbGw9IiNGRUZCRjIiLz4KPC9zdmc+Cg=="); |
| 38 |
|
| 39 |
/***/ }, |
| 40 |
|
| 41 |
/***/ "./resources/img/logo-givewp-nobg.svg" |
| 42 |
/*!********************************************!*\ |
| 43 |
!*** ./resources/img/logo-givewp-nobg.svg ***! |
| 44 |
\********************************************/ |
| 45 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 46 |
|
| 47 |
__webpack_require__.r(__webpack_exports__); |
| 48 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 49 |
/* harmony export */ ReactComponent: () => (/* binding */ SvgLogoGivewpNobg), |
| 50 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 51 |
/* harmony export */ }); |
| 52 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 53 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 54 |
var _path, _path2; |
| 55 |
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } |
| 56 |
|
| 57 |
var SvgLogoGivewpNobg = function SvgLogoGivewpNobg(props) { |
| 58 |
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ |
| 59 |
xmlns: "http://www.w3.org/2000/svg", |
| 60 |
width: 32, |
| 61 |
height: 32, |
| 62 |
fill: "none" |
| 63 |
}, props), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 64 |
fill: "#000", |
| 65 |
d: "M16 5c5.658 0 10.32 4.278 10.93 9.773-2.24.837-5.56 1.749-9.433 1.749 0 0 .013.137.066.26.044.096.132.178.136.182 1.946.24 4.7-.026 6.802-.313-1.204 2.584-3.352 4.316-5.337 4.316-3.697 0-6.562-4.491-6.562-4.491 1.146-1.016 3.04-4.316 5.774-4.316 2.723 0 3.91 1.486 3.919 1.497l.306-.481c-.01-.034-1.29-4.465-4.89-4.465-3.611 0-7.445 5.916-9.69 7.283 0 0 3.085 7.31 9.822 7.31 5.662 0 7.08-5.41 7.347-6.75.755-.11 1.38-.222 1.797-.293q.004-.007.006-.016C26.863 22.205 21.991 27 16 27 9.927 27 5 22.073 5 16S9.927 5 16 5" |
| 66 |
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("mask", { |
| 67 |
id: "logo-givewp-nobg_svg__a", |
| 68 |
width: 22, |
| 69 |
height: 22, |
| 70 |
x: 5, |
| 71 |
y: 5, |
| 72 |
maskUnits: "userSpaceOnUse", |
| 73 |
style: { |
| 74 |
maskType: "alpha" |
| 75 |
} |
| 76 |
}, _path2 || (_path2 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 77 |
fill: "#000", |
| 78 |
d: "M27 16c0-6.073-4.927-11-11-11S5 9.927 5 16s4.927 11 11 11 11-4.927 11-11" |
| 79 |
})))); |
| 80 |
}; |
| 81 |
|
| 82 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2IDVDMjEuNjU4MiA1IDI2LjMxOTIgOS4yNzc1NSAyNi45Mjk3IDE0Ljc3MzRDMjQuNjkgMTUuNjA5OCAyMS4zNjk4IDE2LjUyMTUgMTcuNDk3MSAxNi41MjE1QzE3LjQ5NzEgMTYuNTIxNSAxNy41MTA0IDE2LjY1ODYgMTcuNTYyNSAxNi43ODIyQzE3LjYwNyAxNi44Nzc1IDE3LjY5NTIgMTYuOTYwMSAxNy42OTkyIDE2Ljk2MzlDMTkuNjQ1NCAxNy4yMDQ3IDIyLjM5ODYgMTYuOTM3OCAyNC41MDEgMTYuNjUxNEMyMy4yOTcgMTkuMjM1MiAyMS4xNDkyIDIwLjk2NjYgMTkuMTY0MSAyMC45NjY4QzE1LjQ2NyAyMC45NjY4IDEyLjYwMjUgMTYuNDc1NiAxMi42MDI1IDE2LjQ3NTZDMTMuNzQ4MSAxNS40NjAxIDE1LjY0MjQgMTIuMTYwMyAxOC4zNzYgMTIuMTYwMkMyMS4wOTkzIDEyLjE2MDIgMjIuMjg2IDEzLjY0NTkgMjIuMjk0OSAxMy42NTcyTDIyLjYwMDYgMTMuMTc1OEMyMi41OTA5IDEzLjE0MjIgMjEuMzEwNiA4LjcxMDk0IDE3LjcxMTkgOC43MTA5NEMxNC4wOTk2IDguNzExMjcgMTAuMjY2IDE0LjYyNzIgOC4wMjA1MSAxNS45OTQxQzguMDIwNTEgMTUuOTk0MSAxMS4xMDYxIDIzLjMwMzcgMTcuODQyOCAyMy4zMDM3QzIzLjUwNTIgMjMuMzAzNSAyNC45MjM2IDE3Ljg5NDUgMjUuMTkwNCAxNi41NTM3QzI1Ljk0NTUgMTYuNDQzMSAyNi41NzA3IDE2LjMzMjMgMjYuOTg3MyAxNi4yNjA3QzI2Ljk4OTUgMTYuMjU1NyAyNi45OTEgMTYuMjUwMyAyNi45OTMyIDE2LjI0NTFDMjYuODYyNiAyMi4yMDQ3IDIxLjk5MDkgMjcgMTYgMjdDOS45MjcyNCAyNyA1LjAwMDAyIDIyLjA3MjcgNSAxNkM1IDkuOTI3MjQgOS45MjcyMiA1IDE2IDVaIiBmaWxsPSJibGFjayIvPgo8bWFzayBpZD0ibWFzazBfNjVfMjQzOTUiIHN0eWxlPSJtYXNrLXR5cGU6YWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjUiIHk9IjUiIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiI+CjxwYXRoIGQ9Ik0yNyAxNkMyNyA5LjkyNzIgMjIuMDcyOCA1IDE2IDVDOS45MjcyMiA1IDUgOS45MjcyIDUgMTZDNSAyMi4wNzI3IDkuOTI3MjIgMjcgMTYgMjdDMjIuMDcyOCAyNyAyNyAyMi4wNzI3IDI3IDE2WiIgZmlsbD0iYmxhY2siLz4KPC9tYXNrPgo8ZyBtYXNrPSJ1cmwoI21hc2swXzY1XzI0Mzk1KSI+CjwvZz4KPC9zdmc+Cg=="); |
| 83 |
|
| 84 |
/***/ }, |
| 85 |
|
| 86 |
/***/ "./resources/img/logo-kadence-nobg.svg" |
| 87 |
/*!*********************************************!*\ |
| 88 |
!*** ./resources/img/logo-kadence-nobg.svg ***! |
| 89 |
\*********************************************/ |
| 90 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 91 |
|
| 92 |
__webpack_require__.r(__webpack_exports__); |
| 93 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 94 |
/* harmony export */ ReactComponent: () => (/* binding */ SvgLogoKadenceNobg), |
| 95 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 96 |
/* harmony export */ }); |
| 97 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 98 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 99 |
var _path; |
| 100 |
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } |
| 101 |
|
| 102 |
var SvgLogoKadenceNobg = function SvgLogoKadenceNobg(props) { |
| 103 |
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ |
| 104 |
xmlns: "http://www.w3.org/2000/svg", |
| 105 |
width: 32, |
| 106 |
height: 32, |
| 107 |
fill: "none" |
| 108 |
}, props), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 109 |
fill: "#000", |
| 110 |
fillRule: "evenodd", |
| 111 |
d: "M21.858 25.098h-5.273a1.035 1.035 0 0 1 0-2.069h3.444a1.035 1.035 0 0 0-.071-2.066h-5.39a1.034 1.034 0 0 1 0-2.066h.65v-.001h.966a1.033 1.033 0 0 0 0-2.065h-2.432v-.001H8.65a1.033 1.033 0 0 1 0-2.065h5.102v-.003h1.997a1.032 1.032 0 0 0 0-2.064h-2.576a1.033 1.033 0 0 1 0-2.066h4.898l.072.003h1.752a1.035 1.035 0 0 0 0-2.069H17.32a1.035 1.035 0 0 1 .075-2.066h8.848l-8.375 9.148L28 25.099h-6.115l-.001-.001zm-9.925-2.069a1.031 1.031 0 0 1 0 2.062H8.151a1.031 1.031 0 0 1 0-2.062zm-1.497-4.132a1.034 1.034 0 1 1-.002 2.069 1.034 1.034 0 0 1 .002-2.069m-5.402-4.132a1.034 1.034 0 1 1-.001 2.068 1.034 1.034 0 0 1 0-2.068m4.006-4.133a1.034 1.034 0 1 1 0 2.07 1.034 1.034 0 0 1 0-2.07M12.748 6.5a1.031 1.031 0 0 1 0 2.062h-2.391a1.031 1.031 0 0 1 0-2.062z", |
| 112 |
clipRule: "evenodd" |
| 113 |
}))); |
| 114 |
}; |
| 115 |
|
| 116 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMS44NTc5IDI1LjA5ODRIMTYuNTg1QzE2LjAxNDEgMjUuMDk4NCAxNS41NTA2IDI0LjYzNDggMTUuNTUwNiAyNC4wNjM4QzE1LjU1MDYgMjMuNDkzIDE2LjAxNDEgMjMuMDI5NCAxNi41ODUgMjMuMDI5NEgyMC4wMjk0QzIwLjU2NjkgMjIuOTkyNSAyMC45OTIgMjIuNTQ0MyAyMC45OTIgMjEuOTk3NkMyMC45OTIgMjEuNDI2NiAyMC41Mjg2IDIwLjk2MzIgMTkuOTU3NiAyMC45NjMySDE3LjQzOTRWMjAuOTYzMUgxNC41Njc5QzEzLjk5NzggMjAuOTYzMSAxMy41MzQ5IDIwLjUwMDIgMTMuNTM0OSAxOS45MzAyQzEzLjUzNDkgMTkuMzYgMTMuOTk3OCAxOC44OTcgMTQuNTY3OSAxOC44OTdIMTUuMjE4NUwxNS4yMTcxIDE4Ljg5NThIMTYuMTg0NEMxNi43NTQzIDE4Ljg5NTggMTcuMjE2OSAxOC40MzMyIDE3LjIxNjkgMTcuODYzM0MxNy4yMTY5IDE3LjI5MzUgMTYuNzU0MyAxNi44MzA5IDE2LjE4NDQgMTYuODMwOUgxMy43NTE2VjE2LjgyOTlIOC42NDk5MkM4LjA4MDA5IDE2LjgyOTkgNy42MTczNCAxNi4zNjcyIDcuNjE3MzQgMTUuNzk3M0M3LjYxNzM0IDE1LjIyNzQgOC4wODAwOSAxNC43NjQ3IDguNjQ5OTIgMTQuNzY0N0gxMy43NTE2VjE0Ljc2MThIMTUuNzQ5MUMxNi4zMTg0IDE0Ljc2MTggMTYuNzgwNyAxNC4yOTk2IDE2Ljc4MDcgMTMuNzMwMkMxNi43ODA3IDEzLjE2MDggMTYuMzE4NCAxMi42OTg1IDE1Ljc0OTEgMTIuNjk4NUgxNS4yOTM4TDE1LjI5MzkgMTIuNjk4NEgxMy4xNzI2QzEyLjYwMjQgMTIuNjk4NCAxMi4xMzk2IDEyLjIzNTUgMTIuMTM5NiAxMS42NjU0QzEyLjEzOTYgMTEuMDk1MyAxMi42MDI0IDEwLjYzMjMgMTMuMTcyNiAxMC42MzIzSDE4LjA3MUMxOC4wOTU0IDEwLjYzMjMgMTguMTE5NSAxMC42MzMyIDE4LjE0MzUgMTAuNjM0OEgxOS44OTQ1QzIwLjQ2NTMgMTAuNjM0OCAyMC45Mjg3IDEwLjE3MTQgMjAuOTI4NyA5LjYwMDUxQzIwLjkyODcgOS4wMjk2MiAyMC40NjUzIDguNTY2MTggMTkuODk0NSA4LjU2NjE4SDE3LjMyMDZDMTYuNzg1IDguNTI3MzMgMTYuMzYxOSA4LjA3OTg4IDE2LjM2MTkgNy41MzQ0NEMxNi4zNjE5IDYuOTYzNTUgMTYuODI1NCA2LjUgMTcuMzk2NCA2LjVIMjEuNDUwN0MyMS40NTUyIDYuNSAyMS40NTk2IDYuNSAyMS40NjQ0IDYuNTAwMTFIMjYuMjQ0OUwxNy44Njg2IDE1LjY0NzdMMjggMjUuMDk5M0gyMS44ODUzTDIxLjg4MzkgMjUuMDk3OUMyMS44NzUzIDI1LjA5ODIgMjEuODY2NyAyNS4wOTg0IDIxLjg1NzkgMjUuMDk4NFpNMTEuOTMzMSAyMy4wMjk0QzEyLjUwMiAyMy4wMjk0IDEyLjk2MzkgMjMuNDkxMyAxMi45NjM5IDI0LjA2MDFDMTIuOTYzOSAyNC42MjkxIDEyLjUwMiAyNS4wOTA4IDExLjkzMzEgMjUuMDkwOEg4LjE1MDUyQzcuNTgxNjkgMjUuMDkwOCA3LjExOTgxIDI0LjYyOTEgNy4xMTk4MSAyNC4wNjAxQzcuMTE5ODEgMjMuNDkxMyA3LjU4MTY5IDIzLjAyOTQgOC4xNTA1MiAyMy4wMjk0SDExLjkzMzFaTTEwLjQzNTYgMTguODk3QzExLjAwNjIgMTguODk3IDExLjQ2OTQgMTkuMzYwMyAxMS40Njk0IDE5LjkzMUMxMS40Njk0IDIwLjUwMTQgMTEuMDA2MiAyMC45NjQ4IDEwLjQzNTYgMjAuOTY0OEM5Ljg2NDk0IDIwLjk2NDggOS40MDE2OSAyMC41MDE0IDkuNDAxNjkgMTkuOTMxQzkuNDAxNjkgMTkuMzYwMyA5Ljg2NDk0IDE4Ljg5NyAxMC40MzU2IDE4Ljg5N1pNNS4wMzM4IDE0Ljc2NDdDNS42MDQ0NyAxNC43NjQ3IDYuMDY3NzEgMTUuMjI3OSA2LjA2NzcxIDE1Ljc5ODZDNi4wNjc3MSAxNi4zNjkyIDUuNjA0NDcgMTYuODMyNCA1LjAzMzggMTYuODMyNEM0LjQ2MzI1IDE2LjgzMjQgNCAxNi4zNjkyIDQgMTUuNzk4NkM0IDE1LjIyNzkgNC40NjMyNSAxNC43NjQ3IDUuMDMzOCAxNC43NjQ3Wk05LjA0MDMxIDEwLjYzMjNDOS42MTA4OSAxMC42MzIzIDEwLjA3NDIgMTEuMDk1NiAxMC4wNzQyIDExLjY2NjJDMTAuMDc0MiAxMi4yMzY4IDkuNjEwODkgMTIuNzAwMSA5LjA0MDMxIDEyLjcwMDFDOC40Njk3NSAxMi43MDAxIDguMDA2NCAxMi4yMzY4IDguMDA2NCAxMS42NjYyQzguMDA2NCAxMS4wOTU2IDguNDY5NzUgMTAuNjMyMyA5LjA0MDMxIDEwLjYzMjNaTTEyLjc0OCA2LjVDMTMuMzE2OSA2LjUgMTMuNzc4NyA2Ljk2MTg4IDEzLjc3ODcgNy41MzA3MUMxMy43Nzg3IDguMDk5NjMgMTMuMzE2OSA4LjU2MTUxIDEyLjc0OCA4LjU2MTUxSDEwLjM1N0M5Ljc4ODE5IDguNTYxNTEgOS4zMjYyOCA4LjA5OTYzIDkuMzI2MjggNy41MzA3MUM5LjMyNjI4IDYuOTYxODggOS43ODgwOCA2LjUgMTAuMzU3IDYuNUgxMi43NDhaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"); |
| 117 |
|
| 118 |
/***/ }, |
| 119 |
|
| 120 |
/***/ "./resources/img/logo-kadence.svg" |
| 121 |
/*!****************************************!*\ |
| 122 |
!*** ./resources/img/logo-kadence.svg ***! |
| 123 |
\****************************************/ |
| 124 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 125 |
|
| 126 |
__webpack_require__.r(__webpack_exports__); |
| 127 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 128 |
/* harmony export */ ReactComponent: () => (/* binding */ SvgLogoKadence), |
| 129 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 130 |
/* harmony export */ }); |
| 131 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 132 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 133 |
var _path, _path2; |
| 134 |
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } |
| 135 |
|
| 136 |
var SvgLogoKadence = function SvgLogoKadence(props) { |
| 137 |
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ |
| 138 |
xmlns: "http://www.w3.org/2000/svg", |
| 139 |
width: 46, |
| 140 |
height: 46, |
| 141 |
fill: "none", |
| 142 |
"aria-labelledby": "kadence-title" |
| 143 |
}, props), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 144 |
fill: "#3D7BF5", |
| 145 |
d: "M0 9.857C0 4.413 4.413 0 9.857 0H36.14C41.585 0 46 4.413 46 9.857v26.286C46 41.587 41.585 46 36.141 46H9.857C4.413 46 0 41.587 0 36.143z" |
| 146 |
})), _path2 || (_path2 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 147 |
fill: "#FEFBF2", |
| 148 |
fillRule: "evenodd", |
| 149 |
d: "M30.808 36.142H23.41a1.457 1.457 0 0 1-1.451-1.462c0-.807.65-1.462 1.451-1.462h4.833a1.46 1.46 0 0 0 1.351-1.458c0-.807-.65-1.462-1.451-1.462h-7.564c-.8 0-1.449-.654-1.449-1.46s.65-1.46 1.45-1.46h.913l-.002-.002h1.357c.8 0 1.449-.654 1.449-1.46s-.65-1.458-1.449-1.458h-3.414v-.002h-7.158c-.8 0-1.45-.654-1.45-1.459s.65-1.46 1.45-1.46h7.158v-.003h2.803c.8 0 1.448-.654 1.448-1.458 0-.805-.649-1.458-1.448-1.458h-3.615c-.8 0-1.45-.655-1.45-1.46 0-.806.65-1.46 1.45-1.46h6.873q.052 0 .102.003h2.457c.801 0 1.451-.655 1.451-1.462s-.65-1.462-1.45-1.462H24.44a1.46 1.46 0 0 1-1.345-1.458c0-.807.65-1.462 1.452-1.462h12.416L25.21 22.787l14.217 13.357h-8.58l-.002-.002zm-13.926-2.924c.798 0 1.446.653 1.446 1.457s-.648 1.456-1.447 1.456h-5.307a1.45 1.45 0 0 1-1.446-1.456c0-.804.648-1.457 1.446-1.457zm-2.102-5.84c.8 0 1.451.654 1.451 1.461 0 .806-.65 1.461-1.45 1.461-.802 0-1.452-.655-1.452-1.461 0-.807.65-1.461 1.451-1.461m-7.58-5.84c.801 0 1.451.654 1.451 1.46 0 .807-.65 1.462-1.45 1.462-.801 0-1.451-.655-1.451-1.461 0-.807.65-1.461 1.45-1.461m5.622-5.84c.801 0 1.451.654 1.451 1.46 0 .807-.65 1.462-1.45 1.462-.801 0-1.451-.655-1.451-1.461 0-.807.65-1.461 1.45-1.461m5.203-5.84c.798 0 1.446.652 1.446 1.456s-.648 1.457-1.446 1.457H14.67a1.45 1.45 0 0 1-1.446-1.457c0-.804.648-1.457 1.446-1.457z", |
| 150 |
clipRule: "evenodd" |
| 151 |
}))); |
| 152 |
}; |
| 153 |
|
| 154 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iNDYiIHZpZXdCb3g9IjAgMCA0NiA0NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiByb2xlPSJpbWciIGFyaWEtbGFiZWxsZWRieT0ia2FkZW5jZS10aXRsZSI+Cjx0aXRsZSBpZD0ia2FkZW5jZS10aXRsZSI+S2FkZW5jZSBsb2dvPC90aXRsZT4KPHBhdGggZD0iTTAgOS44NTcxNEMwIDQuNDEzMTkgNC40MTI5OSAwIDkuODU2NyAwSDM2LjE0MTJDNDEuNTg0OSAwIDQ2IDQuNDEzMTkgNDYgOS44NTcxNFYzNi4xNDI5QzQ2IDQxLjU4NjggNDEuNTg0OSA0NiAzNi4xNDEyIDQ2SDkuODU2N0M0LjQxMjk5IDQ2IDAgNDEuNTg2OCAwIDM2LjE0MjlWOS44NTcxNFoiIGZpbGw9IiMzRDdCRjUiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMC44MDgyIDM2LjE0MTlIMjMuNDA5MkMyMi42MDggMzYuMTQxOSAyMS45NTc3IDM1LjQ4NjcgMjEuOTU3NyAzNC42Nzk4QzIxLjk1NzcgMzMuODczMSAyMi42MDggMzMuMjE3OSAyMy40MDkyIDMzLjIxNzlIMjguMjQyM0MyOC45OTY2IDMzLjE2NTggMjkuNTkzMiAzMi41MzI0IDI5LjU5MzIgMzEuNzU5N0MyOS41OTMyIDMwLjk1MjggMjguOTQyOCAzMC4yOTc4IDI4LjE0MTYgMzAuMjk3OEgyNC42MDhWMzAuMjk3NkgyMC41Nzg3QzE5Ljc3ODcgMzAuMjk3NiAxOS4xMjkyIDI5LjY0MzUgMTkuMTI5MiAyOC44Mzc4QzE5LjEyOTIgMjguMDMyMSAxOS43Nzg3IDI3LjM3NzggMjAuNTc4NyAyNy4zNzc4SDIxLjQ5MTdMMjEuNDg5OCAyNy4zNzZIMjIuODQ3MUMyMy42NDY3IDI3LjM3NiAyNC4yOTU5IDI2LjcyMjIgMjQuMjk1OSAyNS45MTY4QzI0LjI5NTkgMjUuMTExNSAyMy42NDY3IDI0LjQ1NzcgMjIuODQ3MSAyNC40NTc3SDE5LjQzMzNWMjQuNDU2NEgxMi4yNzQ2QzExLjQ3NSAyNC40NTY0IDEwLjgyNTcgMjMuODAyNSAxMC44MjU3IDIyLjk5N0MxMC44MjU3IDIyLjE5MTYgMTEuNDc1IDIxLjUzNzYgMTIuMjc0NiAyMS41Mzc2SDE5LjQzMzNWMjEuNTMzNkgyMi4yMzYzQzIzLjAzNTEgMjEuNTMzNiAyMy42ODM3IDIwLjg4MDMgMjMuNjgzNyAyMC4wNzU2QzIzLjY4MzcgMTkuMjcwOSAyMy4wMzUxIDE4LjYxNzcgMjIuMjM2MyAxOC42MTc3SDIxLjU5NzNMMjEuNTk3NSAxOC42MTc0SDE4LjYyMDhDMTcuODIwOCAxOC42MTc0IDE3LjE3MTQgMTcuOTYzMiAxNy4xNzE0IDE3LjE1NzZDMTcuMTcxNCAxNi4zNTE3IDE3LjgyMDggMTUuNjk3NiAxOC42MjA4IDE1LjY5NzZIMjUuNDk0M0MyNS41Mjg2IDE1LjY5NzYgMjUuNTYyNSAxNS42OTg3IDI1LjU5NjEgMTUuNzAxMUgyOC4wNTMxQzI4Ljg1NCAxNS43MDExIDI5LjUwNDQgMTUuMDQ2MSAyOS41MDQ0IDE0LjIzOTJDMjkuNTA0NCAxMy40MzI0IDI4Ljg1NCAxMi43Nzc1IDI4LjA1MzEgMTIuNzc3NUgyNC40NDE0QzIzLjY4OTcgMTIuNzIyNiAyMy4wOTYyIDEyLjA5MDMgMjMuMDk2MiAxMS4zMTk0QzIzLjA5NjIgMTAuNTEyNSAyMy43NDY1IDkuODU3NDIgMjQuNTQ3NiA5Ljg1NzQySDMwLjIzNjhDMzAuMjQzMSA5Ljg1NzQyIDMwLjI0OTIgOS44NTc0MiAzMC4yNTYgOS44NTc1NUgzNi45NjM5TDI1LjIxMDMgMjIuNzg1NkwzOS40MjY4IDM2LjE0MzFIMzAuODQ2NkwzMC44NDQ2IDM2LjE0MTJDMzAuODMyNiAzNi4xNDE3IDMwLjgyMDQgMzYuMTQxOSAzMC44MDgyIDM2LjE0MTlaTTE2Ljg4MTUgMzMuMjE3OUMxNy42Nzk4IDMzLjIxNzkgMTguMzI3OSAzMy44NzA3IDE4LjMyNzkgMzQuNjc0NkMxOC4zMjc5IDM1LjQ3ODcgMTcuNjc5OCAzNi4xMzEzIDE2Ljg4MTUgMzYuMTMxM0gxMS41NzM5QzEwLjc3NTcgMzYuMTMxMyAxMC4xMjc2IDM1LjQ3ODcgMTAuMTI3NiAzNC42NzQ2QzEwLjEyNzYgMzMuODcwNyAxMC43NzU3IDMzLjIxNzkgMTEuNTczOSAzMy4yMTc5SDE2Ljg4MTVaTTE0Ljc4MDMgMjcuMzc3OEMxNS41ODA5IDI3LjM3NzggMTYuMjMxIDI4LjAzMjQgMTYuMjMxIDI4LjgzOUMxNi4yMzEgMjkuNjQ1MiAxNS41ODA5IDMwLjMgMTQuNzgwMyAzMC4zQzEzLjk3OTUgMzAuMyAxMy4zMjk1IDI5LjY0NTIgMTMuMzI5NSAyOC44MzlDMTMuMzI5NSAyOC4wMzI0IDEzLjk3OTUgMjcuMzc3OCAxNC43ODAzIDI3LjM3NzhaTTcuMjAwNDIgMjEuNTM3NkM4LjAwMTIgMjEuNTM3NiA4LjY1MTIyIDIyLjE5MjMgOC42NTEyMiAyMi45OTg4QzguNjUxMjIgMjMuODA1MiA4LjAwMTIgMjQuNDU5OSA3LjIwMDQyIDI0LjQ1OTlDNi4zOTk3OCAyNC40NTk5IDUuNzQ5NzYgMjMuODA1MiA1Ljc0OTc2IDIyLjk5ODhDNS43NDk3NiAyMi4xOTIzIDYuMzk5NzggMjEuNTM3NiA3LjIwMDQyIDIxLjUzNzZaTTEyLjgyMjQgMTUuNjk3NkMxMy42MjMxIDE1LjY5NzYgMTQuMjczMiAxNi4zNTIzIDE0LjI3MzIgMTcuMTU4OEMxNC4yNzMyIDE3Ljk2NTIgMTMuNjIzMSAxOC42MTk3IDEyLjgyMjQgMTguNjE5N0MxMi4wMjE4IDE4LjYxOTcgMTEuMzcxNiAxNy45NjUyIDExLjM3MTYgMTcuMTU4OEMxMS4zNzE2IDE2LjM1MjMgMTIuMDIxOCAxNS42OTc2IDEyLjgyMjQgMTUuNjk3NlpNMTguMDI1IDkuODU3NDJDMTguODIzNCA5Ljg1NzQyIDE5LjQ3MTQgMTAuNTEwMiAxOS40NzE0IDExLjMxNDFDMTkuNDcxNCAxMi4xMTgyIDE4LjgyMzQgMTIuNzcwOSAxOC4wMjUgMTIuNzcwOUgxNC42N0MxMy44NzE4IDEyLjc3MDkgMTMuMjIzNyAxMi4xMTgyIDEzLjIyMzcgMTEuMzE0MUMxMy4yMjM3IDEwLjUxMDIgMTMuODcxNyA5Ljg1NzQyIDE0LjY3IDkuODU3NDJIMTguMDI1WiIgZmlsbD0iI0ZFRkJGMiIvPgo8L3N2Zz4K"); |
| 155 |
|
| 156 |
/***/ }, |
| 157 |
|
| 158 |
/***/ "./resources/img/logo-learndash-nobg.svg" |
| 159 |
/*!***********************************************!*\ |
| 160 |
!*** ./resources/img/logo-learndash-nobg.svg ***! |
| 161 |
\***********************************************/ |
| 162 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 163 |
|
| 164 |
__webpack_require__.r(__webpack_exports__); |
| 165 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 166 |
/* harmony export */ ReactComponent: () => (/* binding */ SvgLogoLearndashNobg), |
| 167 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 168 |
/* harmony export */ }); |
| 169 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 170 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 171 |
var _path; |
| 172 |
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } |
| 173 |
|
| 174 |
var SvgLogoLearndashNobg = function SvgLogoLearndashNobg(props) { |
| 175 |
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ |
| 176 |
xmlns: "http://www.w3.org/2000/svg", |
| 177 |
width: 32, |
| 178 |
height: 32, |
| 179 |
fill: "none" |
| 180 |
}, props), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 181 |
fill: "#1E1E1E", |
| 182 |
d: "M16 9.83c-.303-.002-.604.06-.884.182s-.534.3-.749.526a2.4 2.4 0 0 0-.5.788 2.5 2.5 0 0 0-.174.93v14.032c.004.118.05.23.129.313.079.084.186.132.298.135a4.1 4.1 0 0 0 2.958-1.292 4.53 4.53 0 0 0 1.228-3.113V12.256a2.5 2.5 0 0 0-.174-.93 2.4 2.4 0 0 0-.5-.788 2.3 2.3 0 0 0-.749-.526A2.2 2.2 0 0 0 16 9.83M9.306 16.687c-.303-.001-.603.061-.883.183-.28.121-.535.3-.749.526a2.4 2.4 0 0 0-.5.788c-.115.294-.175.61-.174.93v7.437c.003.118.05.23.128.314.08.083.186.131.298.135a4.1 4.1 0 0 0 2.958-1.293 4.53 4.53 0 0 0 1.229-3.112v-3.482c0-.319-.059-.635-.175-.93a2.4 2.4 0 0 0-.5-.787 2.3 2.3 0 0 0-.748-.526 2.2 2.2 0 0 0-.884-.184M22.694 4c-.303 0-.604.062-.884.183-.28.122-.534.3-.749.526a2.4 2.4 0 0 0-.5.788c-.115.295-.174.61-.174.93v20.02c.003.117.05.23.128.313.08.083.186.131.298.134a4.1 4.1 0 0 0 2.959-1.292A4.53 4.53 0 0 0 25 22.49V6.427c0-.32-.059-.635-.174-.93a2.4 2.4 0 0 0-.5-.788 2.3 2.3 0 0 0-.749-.526A2.2 2.2 0 0 0 22.694 4" |
| 183 |
}))); |
| 184 |
}; |
| 185 |
|
| 186 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1Ljk5OTcgOS44MjkxMUMxNS42OTY3IDkuODI4NDEgMTUuMzk2NSA5Ljg5MDcgMTUuMTE2MyAxMC4wMTI0QzE0LjgzNjIgMTAuMTM0MSAxNC41ODE3IDEwLjMxMjggMTQuMzY3NCAxMC41MzgzQzE0LjE1MzEgMTAuNzYzOCAxMy45ODMzIDExLjAzMTUgMTMuODY3NiAxMS4zMjYzQzEzLjc1MTkgMTEuNjIxIDEzLjY5MjcgMTEuOTM2OSAxMy42OTM0IDEyLjI1NTdWMjYuMjg3OEMxMy42OTY1IDI2LjQwNTcgMTMuNzQyNCAyNi41MTc4IDEzLjgyMTcgMjYuNjAxMkMxMy45MDA5IDI2LjY4NDYgMTQuMDA3NSAyNi43MzI5IDE0LjExOTUgMjYuNzM2MkMxNS4yMjkzIDI2LjczNDEgMTYuMjkzIDI2LjI2OTQgMTcuMDc3NyAyNS40NDM4QzE3Ljg2MjQgMjQuNjE4MiAxOC4zMDQxIDIzLjQ5OSAxOC4zMDYxIDIyLjMzMTRWMTIuMjU1N0MxOC4zMDY4IDExLjkzNjkgMTguMjQ3NiAxMS42MjEgMTguMTMxOSAxMS4zMjYzQzE4LjAxNjIgMTEuMDMxNSAxNy44NDY0IDEwLjc2MzggMTcuNjMyMSAxMC41MzgzQzE3LjQxNzggMTAuMzEyOCAxNy4xNjMzIDEwLjEzNDEgMTYuODgzMSAxMC4wMTI0QzE2LjYwMyA5Ljg5MDcgMTYuMzAyOCA5LjgyODQxIDE1Ljk5OTcgOS44MjkxMVoiIGZpbGw9IiMxRTFFMUUiLz4KPHBhdGggZD0iTTkuMzA2MzggMTYuNjg2NUM5LjAwMzMyIDE2LjY4NTggOC43MDMxMSAxNi43NDgxIDguNDIyOTkgMTYuODY5OEM4LjE0Mjg3IDE2Ljk5MTUgNy44ODgzNSAxNy4xNzAyIDcuNjc0MDUgMTcuMzk1N0M3LjQ1OTc2IDE3LjYyMTIgNy4yODk4OSAxNy44ODkgNy4xNzQyMiAxOC4xODM3QzcuMDU4NTUgMTguNDc4NCA2Ljk5OTM0IDE4Ljc5NDMgNy4wMDAwMSAxOS4xMTMxVjI2LjU1MTJDNy4wMDMxNiAyNi42NjkxIDcuMDQ5MDggMjYuNzgxMiA3LjEyODMzIDI2Ljg2NDZDNy4yMDc1OCAyNi45NDggNy4zMTQxNSAyNi45OTYzIDcuNDI2MTggMjYuOTk5NkM4LjUzNTkyIDI2Ljk5NzUgOS41OTk2NCAyNi41MzI4IDEwLjM4NDMgMjUuNzA3MkMxMS4xNjkxIDI0Ljg4MTYgMTEuNjEwOCAyMy43NjI0IDExLjYxMjggMjIuNTk0OFYxOS4xMTMxQzExLjYxMzQgMTguNzk0MyAxMS41NTQyIDE4LjQ3ODQgMTEuNDM4NSAxOC4xODM3QzExLjMyMjkgMTcuODg5IDExLjE1MyAxNy42MjEyIDEwLjkzODcgMTcuMzk1N0MxMC43MjQ0IDE3LjE3MDIgMTAuNDY5OSAxNi45OTE1IDEwLjE4OTggMTYuODY5OEM5LjkwOTY2IDE2Ljc0ODEgOS42MDk0NSAxNi42ODU4IDkuMzA2MzggMTYuNjg2NVoiIGZpbGw9IiMxRTFFMUUiLz4KPHBhdGggZD0iTTIyLjY5MzYgNC4wMDAwMUMyMi4zOTA1IDMuOTk5MzEgMjIuMDkwMyA0LjA2MTYgMjEuODEwMiA0LjE4MzNDMjEuNTMwMSA0LjMwNTAxIDIxLjI3NTYgNC40ODM3MiAyMS4wNjEzIDQuNzA5MTlDMjAuODQ3IDQuOTM0NjYgMjAuNjc3MSA1LjIwMjQ1IDIwLjU2MTQgNS40OTcxN0MyMC40NDU4IDUuNzkxODkgMjAuMzg2NiA2LjEwNzc1IDIwLjM4NzIgNi40MjY2MVYyNi40NDYxQzIwLjM5MDQgMjYuNTY0IDIwLjQzNjMgMjYuNjc2MSAyMC41MTU1IDI2Ljc1OTVDMjAuNTk0OCAyNi44NDI5IDIwLjcwMTQgMjYuODkxMiAyMC44MTM0IDI2Ljg5NDVDMjEuOTIzMSAyNi44OTI0IDIyLjk4NjggMjYuNDI3NyAyMy43NzE2IDI1LjYwMjFDMjQuNTU2MyAyNC43NzY1IDI0Ljk5OCAyMy42NTczIDI1IDIyLjQ4OTdWNi40MjY2MUMyNS4wMDA2IDYuMTA3NzUgMjQuOTQxNCA1Ljc5MTg5IDI0LjgyNTggNS40OTcxN0MyNC43MTAxIDUuMjAyNDUgMjQuNTQwMiA0LjkzNDY2IDI0LjMyNTkgNC43MDkxOUMyNC4xMTE2IDQuNDgzNzIgMjMuODU3MSA0LjMwNTAxIDIzLjU3NyA0LjE4MzNDMjMuMjk2OSA0LjA2MTYgMjIuOTk2NyAzLjk5OTMxIDIyLjY5MzYgNC4wMDAwMVoiIGZpbGw9IiMxRTFFMUUiLz4KPC9zdmc+Cg=="); |
| 187 |
|
| 188 |
/***/ }, |
| 189 |
|
| 190 |
/***/ "./resources/img/logo-learndash.svg" |
| 191 |
/*!******************************************!*\ |
| 192 |
!*** ./resources/img/logo-learndash.svg ***! |
| 193 |
\******************************************/ |
| 194 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 195 |
|
| 196 |
__webpack_require__.r(__webpack_exports__); |
| 197 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 198 |
/* harmony export */ ReactComponent: () => (/* binding */ SvgLogoLearndash), |
| 199 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 200 |
/* harmony export */ }); |
| 201 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 202 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 203 |
var _path, _path2; |
| 204 |
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } |
| 205 |
|
| 206 |
var SvgLogoLearndash = function SvgLogoLearndash(props) { |
| 207 |
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ |
| 208 |
xmlns: "http://www.w3.org/2000/svg", |
| 209 |
width: 46, |
| 210 |
height: 46, |
| 211 |
fill: "none", |
| 212 |
"aria-labelledby": "learndash-title" |
| 213 |
}, props), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 214 |
fill: "#3D7BF5", |
| 215 |
d: "M0 9.857C0 4.413 4.413 0 9.857 0H36.14C41.585 0 46 4.413 46 9.857v26.286C46 41.587 41.585 46 36.141 46H9.857C4.413 46 0 41.587 0 36.143z" |
| 216 |
})), _path2 || (_path2 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 217 |
fill: "#FEFBF2", |
| 218 |
d: "M22.67 16.099c-.388-.001-.773.079-1.133.235-.359.156-.685.385-.96.674s-.492.633-.64 1.01a3.3 3.3 0 0 0-.224 1.193V37.21a.6.6 0 0 0 .165.402.55.55 0 0 0 .381.173c1.423-.002 2.787-.599 3.793-1.657a5.81 5.81 0 0 0 1.575-3.992V19.21c.001-.409-.075-.814-.223-1.192a3.1 3.1 0 0 0-.641-1.01 2.9 2.9 0 0 0-.96-.675 2.8 2.8 0 0 0-1.133-.235M12.814 23.984c-.389 0-.774.083-1.133.246s-.685.402-.96.703c-.275.302-.493.66-.64 1.055a3.5 3.5 0 0 0-.224 1.243v9.953a.65.65 0 0 0 .164.42.54.54 0 0 0 .382.18c1.423-.002 2.787-.624 3.793-1.73 1.006-1.104 1.572-2.601 1.575-4.164v-4.659c0-.426-.075-.849-.224-1.243a3.3 3.3 0 0 0-.64-1.055 2.95 2.95 0 0 0-.96-.703 2.7 2.7 0 0 0-1.133-.246M32.527 8.214c-.389-.001-.773.08-1.133.237-.359.157-.685.388-.96.679a3.2 3.2 0 0 0-.64 1.018 3.3 3.3 0 0 0-.224 1.2v25.858a.61.61 0 0 0 .165.405c.101.108.238.17.381.174 1.423-.003 2.787-.603 3.793-1.67s1.572-2.511 1.575-4.02V11.349c0-.412-.075-.82-.223-1.2a3.2 3.2 0 0 0-.641-1.018 2.95 2.95 0 0 0-.96-.68 2.8 2.8 0 0 0-1.133-.236" |
| 219 |
}))); |
| 220 |
}; |
| 221 |
|
| 222 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iNDYiIHZpZXdCb3g9IjAgMCA0NiA0NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiByb2xlPSJpbWciIGFyaWEtbGFiZWxsZWRieT0ibGVhcm5kYXNoLXRpdGxlIj4KPHRpdGxlIGlkPSJsZWFybmRhc2gtdGl0bGUiPkxlYXJuRGFzaCBsb2dvPC90aXRsZT4KPHBhdGggZD0iTTAgOS44NTcxNEMwIDQuNDEzMTkgNC40MTMwMSAwIDkuODU2NzQgMEgzNi4xNDE0QzQxLjU4NTEgMCA0NiA0LjQxMzE5IDQ2IDkuODU3MTRWMzYuMTQyOUM0NiA0MS41ODY4IDQxLjU4NTEgNDYgMzYuMTQxNCA0Nkg5Ljg1Njc0QzQuNDEzMDEgNDYgMCA0MS41ODY4IDAgMzYuMTQyOVY5Ljg1NzE0WiIgZmlsbD0iIzNEN0JGNSIvPgo8cGF0aCBkPSJNMjIuNjcwMSAxNi4wOTg2QzIyLjI4MTYgMTYuMDk3NyAyMS44OTY3IDE2LjE3NzYgMjEuNTM3NSAxNi4zMzM3QzIxLjE3ODQgMTYuNDg5OCAyMC44NTIxIDE2LjcxOTEgMjAuNTc3MyAxNy4wMDgzQzIwLjMwMjYgMTcuMjk3NSAyMC4wODQ4IDE3LjY0MDkgMTkuOTM2NSAxOC4wMTg5QzE5Ljc4ODIgMTguMzk3IDE5LjcxMjMgMTguODAyMSAxOS43MTMxIDE5LjIxMTFWMzcuMjA5MUMxOS43MTcyIDM3LjM2MDMgMTkuNzc2MSAzNy41MDQxIDE5Ljg3NzcgMzcuNjExMUMxOS45NzkzIDM3LjcxOCAyMC4xMTU5IDM3Ljc4IDIwLjI1OTUgMzcuNzg0MlYzNy43ODQyQzIxLjY4MjMgMzcuNzgxNiAyMy4wNDYxIDM3LjE4NTUgMjQuMDUyMiAzNi4xMjY1QzI1LjA1ODIgMzUuMDY3NSAyNS42MjQ2IDMzLjYzMjEgMjUuNjI3MSAzMi4xMzQ1VjE5LjIxMTFDMjUuNjI4IDE4LjgwMjEgMjUuNTUyMSAxOC4zOTcgMjUuNDAzOCAxOC4wMTg5QzI1LjI1NTUgMTcuNjQwOSAyNS4wMzc3IDE3LjI5NzUgMjQuNzYyOSAxNy4wMDgzQzI0LjQ4ODIgMTYuNzE5MSAyNC4xNjE5IDE2LjQ4OTggMjMuODAyNyAxNi4zMzM3QzIzLjQ0MzYgMTYuMTc3NiAyMy4wNTg3IDE2LjA5NzcgMjIuNjcwMSAxNi4wOTg2VjE2LjA5ODZaIiBmaWxsPSIjRkVGQkYyIi8+CjxwYXRoIGQ9Ik0xMi44MTM3IDIzLjk4NDRDMTIuNDI1MSAyMy45ODM1IDEyLjA0MDIgMjQuMDY2OCAxMS42ODExIDI0LjIyOTdDMTEuMzIyIDI0LjM5MjUgMTAuOTk1NiAyNC42MzE2IDEwLjcyMDkgMjQuOTMzM0MxMC40NDYxIDI1LjIzNSAxMC4yMjg0IDI1LjU5MzQgMTAuMDgwMSAyNS45ODc3QzkuOTMxNzYgMjYuMzgyMSA5Ljg1NTg1IDI2LjgwNDggOS44NTY3IDI3LjIzMTRWMzcuMTg0M0M5Ljg2MDc0IDM3LjM0MiA5LjkxOTYxIDM3LjQ5MjEgMTAuMDIxMiAzNy42MDM3QzEwLjEyMjggMzcuNzE1MiAxMC4yNTk1IDM3Ljc3OTkgMTAuNDAzMSAzNy43ODQzVjM3Ljc4NDNDMTEuODI1OSAzNy43ODE1IDEzLjE4OTcgMzcuMTU5NiAxNC4xOTU3IDM2LjA1NDlDMTUuMjAxOCAzNC45NTAxIDE1Ljc2ODEgMzMuNDUyNiAxNS43NzA3IDMxLjg5MDJWMjcuMjMxNEMxNS43NzE1IDI2LjgwNDggMTUuNjk1NiAyNi4zODIxIDE1LjU0NzMgMjUuOTg3N0MxNS4zOTkgMjUuNTkzNCAxNS4xODEyIDI1LjIzNSAxNC45MDY1IDI0LjkzMzNDMTQuNjMxNyAyNC42MzE2IDE0LjMwNTQgMjQuMzkyNSAxMy45NDYzIDI0LjIyOTdDMTMuNTg3MSAyNC4wNjY4IDEzLjIwMjIgMjMuOTgzNSAxMi44MTM3IDIzLjk4NDRWMjMuOTg0NFoiIGZpbGw9IiNGRUZCRjIiLz4KPHBhdGggZD0iTTMyLjUyNzEgOC4yMTM4N0MzMi4xMzg1IDguMjEyOTggMzEuNzUzNiA4LjI5MzQzIDMxLjM5NDUgOC40NTA2M0MzMS4wMzUzIDguNjA3ODIgMzAuNzA5IDguODM4NjYgMzAuNDM0MyA5LjEyOTg4QzMwLjE1OTUgOS40MjExMSAyOS45NDE3IDkuNzY2OTggMjkuNzkzNCAxMC4xNDc3QzI5LjY0NTEgMTAuNTI4MyAyOS41NjkyIDEwLjkzNjMgMjkuNTcwMSAxMS4zNDgyVjM3LjIwNkMyOS41NzQxIDM3LjM1ODIgMjkuNjMzIDM3LjUwMzEgMjkuNzM0NiAzNy42MTA4QzI5LjgzNjIgMzcuNzE4NSAyOS45NzI4IDM3Ljc4MDkgMzAuMTE2NSAzNy43ODUyQzMxLjUzOTMgMzcuNzgyNCAzMi45MDMxIDM3LjE4MjIgMzMuOTA5MSAzNi4xMTU4QzM0LjkxNTIgMzUuMDQ5NCAzNS40ODE1IDMzLjYwMzggMzUuNDg0MSAzMi4wOTU3VjExLjM0ODJDMzUuNDg0OSAxMC45MzYzIDM1LjQwOSAxMC41MjgzIDM1LjI2MDcgMTAuMTQ3N0MzNS4xMTI0IDkuNzY2OTggMzQuODk0NiA5LjQyMTExIDM0LjYxOTkgOS4xMjk4OEMzNC4zNDUxIDguODM4NjYgMzQuMDE4OCA4LjYwNzgyIDMzLjY1OTcgOC40NTA2M0MzMy4zMDA1IDguMjkzNDMgMzIuOTE1NiA4LjIxMjk4IDMyLjUyNzEgOC4yMTM4N1Y4LjIxMzg3WiIgZmlsbD0iI0ZFRkJGMiIvPgo8L3N2Zz4K"); |
| 223 |
|
| 224 |
/***/ }, |
| 225 |
|
| 226 |
/***/ "./resources/img/logo-lw.svg" |
| 227 |
/*!***********************************!*\ |
| 228 |
!*** ./resources/img/logo-lw.svg ***! |
| 229 |
\***********************************/ |
| 230 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 231 |
|
| 232 |
__webpack_require__.r(__webpack_exports__); |
| 233 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 234 |
/* harmony export */ ReactComponent: () => (/* binding */ SvgLogoLw), |
| 235 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 236 |
/* harmony export */ }); |
| 237 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 238 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 239 |
var _g; |
| 240 |
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } |
| 241 |
|
| 242 |
var SvgLogoLw = function SvgLogoLw(props) { |
| 243 |
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ |
| 244 |
xmlns: "http://www.w3.org/2000/svg", |
| 245 |
width: 103, |
| 246 |
height: 23 |
| 247 |
}, props), _g || (_g = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("g", { |
| 248 |
fill: "#041C1E", |
| 249 |
fillRule: "evenodd" |
| 250 |
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 251 |
d: "M0 14.754c0 .138.111.25.249.25h9.63a.25.25 0 0 0 .248-.25V13.27a.25.25 0 0 0-.248-.25H2.337V.25A.25.25 0 0 0 2.09 0H.249A.25.25 0 0 0 0 .25zM11.554 2.63c0 .138.111.25.249.25h1.806a.25.25 0 0 0 .249-.25V.508a.25.25 0 0 0-.249-.25h-1.806a.25.25 0 0 0-.249.25zm.037 12.124c0 .138.11.25.248.25h1.763a.25.25 0 0 0 .249-.25V4.494a.25.25 0 0 0-.25-.252H11.84a.25.25 0 0 0-.248.251zm14.575-10.26a.25.25 0 0 0-.25-.252h-1.711a.25.25 0 0 0-.249.251v.939c-.591-.759-1.644-1.423-3.363-1.423s-2.62.474-3.519 1.43c-.89.956-1.412 2.362-1.412 4.192s.521 3.225 1.412 4.181 2.133 1.43 3.519 1.43 2.738-.654 3.313-1.361v4.913c0 .14.11.25.248.25h1.763a.25.25 0 0 0 .249-.25zm11.701 0a.25.25 0 0 0-.248-.252h-1.763a.25.25 0 0 0-.249.251v5.923c0 1.01-.326 1.733-.82 2.207-.498.474-1.174.725-1.928.725-.753 0-1.19-.173-1.54-.492-.35-.318-.573-.827-.573-1.578V4.49a.25.25 0 0 0-.248-.25h-1.763a.25.25 0 0 0-.249.25v6.899c0 1.233.387 2.206 1.096 2.863.703.654 1.696.982 2.85.982s1.85-.267 2.405-.637c.35-.233.608-.501.804-.75v.906c0 .138.111.25.249.25h1.712a.25.25 0 0 0 .248-.25V4.494zm2.405-1.864c0 .138.111.25.249.25h1.806a.25.25 0 0 0 .249-.25V.508a.25.25 0 0 0-.249-.25h-1.806a.25.25 0 0 0-.249.25zm.024 12.124c0 .138.112.25.25.25h1.762a.25.25 0 0 0 .249-.25V4.494a.25.25 0 0 0-.25-.252h-1.762a.25.25 0 0 0-.249.251zM54.874.25A.25.25 0 0 0 54.625 0h-1.762a.25.25 0 0 0-.25.25v5.124c-.571-.708-1.59-1.363-3.312-1.363s-2.62.475-3.518 1.43c-.891.957-1.413 2.363-1.413 4.192s.522 3.226 1.413 4.182c.89.956 2.132 1.43 3.518 1.43s2.765-.664 3.364-1.423v.94c0 .138.11.25.248.25h1.712a.25.25 0 0 0 .249-.25zm6.788.301v.061l3.45 14.202c.027.112.128.19.24.19h2.267a.25.25 0 0 0 .239-.18l3.149-11.298 3.148 11.297c.034.112.128.18.24.18h2.276a.246.246 0 0 0 .24-.19L80.36.614V.251A.246.246 0 0 0 80.115 0h-1.763a.24.24 0 0 0-.239.19L75.416 11.7 72.24.18a.24.24 0 0 0-.239-.18h-1.943a.25.25 0 0 0-.24.18L66.627 11.7 63.93.19A.246.246 0 0 0 63.69 0h-1.772a.25.25 0 0 0-.25.25v.302h-.009zm28.493 9.701a.25.25 0 0 0 .249-.25v-.827c0-1.552-.42-2.854-1.258-3.768-.838-.915-2.072-1.414-3.63-1.414s-2.842.492-3.74 1.458c-.898.965-1.386 2.379-1.386 4.164 0 1.786.488 3.209 1.396 4.175s2.2 1.457 3.75 1.457 2.687-.492 3.431-1.173a3.93 3.93 0 0 0 1.224-2.19v-.345a.25.25 0 0 0-.248-.25h-1.575a.256.256 0 0 0-.248.207c-.068.44-.293.914-.703 1.277s-1.02.63-1.9.63c-.882 0-1.626-.329-2.116-.898-.454-.525-.736-1.294-.797-2.26h7.549v.01zm2.072 4.5c0 .14.111.251.249.251h1.712a.25.25 0 0 0 .248-.25v-.94c.592.76 1.645 1.424 3.357 1.424s2.62-.474 3.509-1.43 1.412-2.363 1.412-4.182-.521-3.233-1.412-4.192c-.891-.956-2.133-1.43-3.51-1.43s-2.737.654-3.312 1.362V.251A.25.25 0 0 0 94.23 0h-1.763a.25.25 0 0 0-.248.25v14.504h.01zM20.952 5.907c.908 0 1.652.329 2.166.94.522.612.838 1.544.838 2.775s-.316 2.155-.838 2.768c-.521.613-1.258.94-2.166.94s-1.651-.33-2.166-.94c-.521-.613-.838-1.535-.838-2.768s.317-2.165.838-2.776c.522-.613 1.258-.939 2.166-.939m28.709 0c.908 0 1.651.329 2.166.94.521.612.838 1.544.838 2.775s-.317 2.155-.838 2.768c-.522.613-1.258.94-2.166.94s-1.652-.33-2.166-.94c-.522-.613-.838-1.535-.838-2.768s.316-2.165.838-2.776c.521-.613 1.258-.939 2.166-.939m38.553 2.552h-5.557c.104-.759.377-1.389.797-1.827.471-.491 1.147-.793 2.055-.793s1.584.295 2.021.776c.404.44.633 1.07.676 1.847h.01zm9.226 4.882c-.915 0-1.651-.328-2.173-.939-.522-.613-.838-1.534-.838-2.768s.316-2.165.838-2.775c.522-.613 1.268-.94 2.173-.94.906 0 1.652.329 2.166.94.522.613.839 1.544.839 2.775s-.317 2.155-.839 2.768c-.521.614-1.258.94-2.166.94" |
| 252 |
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 253 |
fillRule: "nonzero", |
| 254 |
d: "m77.008 18.646 1.618 2.708h.12v-2.708h.66v3.657h-1.002l-1.618-2.708h-.12v2.708h-.667v-3.657zM83.076 18.646v.587h-2.19v.922h1.927v.569h-1.927v.992h2.217v.587h-2.936v-3.657zM84.369 18.646l.932 1.302h.222l.915-1.302h.76l-1.257 1.803 1.335 1.854h-.83l-.986-1.355h-.232l-.949 1.355h-.76l1.301-1.854-1.292-1.803h.838zM89.36 18.595c1.026 0 1.702.492 1.702 1.43v.052h-.72v-.051c0-.536-.36-.803-.985-.803h-.128c-.615 0-.992.294-.992.914v.665c0 .647.377.931.992.931h.128c.626 0 .993-.267.993-.81v-.034h.72v.034c0 .956-.694 1.44-1.72 1.44h-.128c-1.002 0-1.72-.491-1.72-1.552v-.664c0-1.034.71-1.544 1.72-1.544h.128l.01-.01zM94.691 18.646v.587h-2.19v.922h1.927v.569h-1.927v.992h2.217v.587h-2.936v-3.657zM96.968 18.604c.915 0 1.54.397 1.54 1.122v.233h-.702v-.233c0-.37-.326-.552-.848-.552h-.094c-.531 0-.838.18-.838.457v.051c0 .312.266.38 1.13.535.969.18 1.413.458 1.413 1.07v.061c0 .604-.538 1.027-1.591 1.027h-.094c-1.063 0-1.609-.43-1.609-1.165v-.234h.703v.234c0 .44.316.603.915.603h.085c.582 0 .89-.156.89-.447v-.052c0-.294-.282-.406-1.137-.552-.898-.155-1.395-.396-1.395-1.034v-.068c0-.647.591-1.034 1.54-1.034h.095v-.017zM100.81 18.596c.916 0 1.54.396 1.54 1.121v.234h-.702v-.234c0-.37-.326-.552-.847-.552h-.094c-.532 0-.839.18-.839.457v.051c0 .312.266.38 1.13.536.969.18 1.413.457 1.413 1.07v.06c0 .604-.538 1.027-1.591 1.027h-.094c-1.063 0-1.609-.43-1.609-1.165v-.233h.703v.233c0 .44.317.603.915.603h.085c.582 0 .89-.155.89-.447v-.051c0-.295-.281-.407-1.136-.553-.9-.155-1.396-.396-1.396-1.033v-.069c0-.647.591-1.033 1.54-1.033h.095V18.6zM68.327 22.356v-3.708h1.318q.668-.002 1.002.241t.333.76c0 .345-.033.294-.094.413a.62.62 0 0 1-.292.275.9.9 0 0 1-.444.104v-.017c.309 0 .555.095.727.258s.265.38.265.647c0 .268-.11.596-.333.76-.222.172-.548.257-.959.257h-1.514zm.565-2.121h.753c.249 0 .437-.044.572-.14a.46.46 0 0 0 .206-.396.47.47 0 0 0-.198-.406q-.196-.13-.582-.129h-.754v1.078-.01zm0 1.612h.941q.347-.001.539-.146a.5.5 0 0 0 .198-.423.5.5 0 0 0-.198-.423q-.195-.157-.539-.156h-.941v1.148M72.48 22.356v-1.491l-1.291-2.217h.642l.925 1.657.932-1.657h.642l-1.291 2.217v1.49h-.556z" |
| 255 |
})))); |
| 256 |
}; |
| 257 |
|
| 258 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTAzcHgiIGhlaWdodD0iMjNweCIgdmlld0JveD0iMCAwIDEwMyAyMyIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT5Hcm91cDwvdGl0bGU+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iQXJ0Ym9hcmQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xNzEuMDAwMDAwLCAtMTgxLjAwMDAwMCkiIGZpbGw9IiMwNDFDMUUiPgogICAgICAgICAgICA8ZyBpZD0iR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE3MS4wMDAwMDAsIDE4MS4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0tNy4xMDU0MjczNmUtMTUsMTQuNzUzODUgQy03LjEwNTQyNzM2ZS0xNSwxNC44OTI0NSAwLjExMTA3NjE2LDE1LjAwNDM1IDAuMjQ4NzE0MTYsMTUuMDA0MzUgTDkuODc4NTI1MTYsMTUuMDA0MzUgQzEwLjAxNjEzNTIsMTUuMDA0MzUgMTAuMTI3MjM1MiwxNC44OTI0NSAxMC4xMjcyMzUyLDE0Ljc1Mzg1IEwxMC4xMjcyMzUyLDEzLjI2OTk1IEMxMC4xMjcyMzUyLDEzLjEzMTI1IDEwLjAxNjEzNTIsMTMuMDE5MzUgOS44Nzg1MjUxNiwxMy4wMTkzNSBMMi4zMzc0MjUxNiwxMy4wMTkzNSBMMi4zMzc0MjUxNiwwLjI1MDU2IEMyLjMzNzQyNTE2LDAuMTExOSAyLjIyNjM0NTE2LDAgMi4wODg3MTUxNiwwIEwwLjI0ODcxNDE2LDAgQzAuMTExMDc2MTYsMCAtNy4xMDU0MjczNmUtMTUsMC4xMTE5IC03LjEwNTQyNzM2ZS0xNSwwLjI1MDU2IEwtNy4xMDU0MjczNmUtMTUsMTQuNzUzODUgWiBNMTEuNTU0MzM1MiwyLjYyOTY2IEMxMS41NTQzMzUyLDIuNzY4MzIgMTEuNjY1NDM1MiwyLjg4MDIyIDExLjgwMzAzNTIsMi44ODAyMiBMMTMuNjA5MjM1MiwyLjg4MDIyIEMxMy43NDY4MzUyLDIuODgwMjIgMTMuODU3OTM1MiwyLjc2ODMyIDEzLjg1NzkzNTIsMi42Mjk2NiBMMTMuODU3OTM1MiwwLjUwODQyIEMxMy44NTc5MzUyLDAuMzY5NzYgMTMuNzQ2ODM1MiwwLjI1Nzg2IDEzLjYwOTIzNTIsMC4yNTc4NiBMMTEuODAzMDM1MiwwLjI1Nzg2IEMxMS42NjU0MzUyLDAuMjU3ODYgMTEuNTU0MzM1MiwwLjM2OTc2IDExLjU1NDMzNTIsMC41MDg0MiBMMTEuNTU0MzM1MiwyLjYyOTY2IFogTTExLjU5MDUzNTIsMTQuNzUzODUgQzExLjU5MDUzNTIsMTQuODkyNDUgMTEuNzAxNjM1MiwxNS4wMDQzNSAxMS44MzkyMzUyLDE1LjAwNDM1IEwxMy42MDE5MzUyLDE1LjAwNDM1IEMxMy43Mzk2MzUyLDE1LjAwNDM1IDEzLjg1MDczNTIsMTQuODkyNDUgMTMuODUwNzM1MiwxNC43NTM4NSBMMTMuODUwNzM1Miw0LjQ5MzA1IEMxMy44NTA3MzUyLDQuMzU0MzkgMTMuNzM5NjM1Miw0LjI0MjQ5IDEzLjYwMTkzNTIsNC4yNDI0OSBMMTEuODM5MjM1Miw0LjI0MjQ5IEMxMS43MDE2MzUyLDQuMjQyNDkgMTEuNTkwNTM1Miw0LjM1NDM5IDExLjU5MDUzNTIsNC40OTMwNSBMMTEuNTkwNTM1MiwxNC43NTM4NSBaIE0yNi4xNjU2MzUyLDQuNDkzMDUgQzI2LjE2NTYzNTIsNC4zNTQzOSAyNi4wNTQ1MzUyLDQuMjQyNDkgMjUuOTE2OTM1Miw0LjI0MjQ5IEwyNC4yMDQ5MzUyLDQuMjQyNDkgQzI0LjA2NzIzNTIsNC4yNDI0OSAyMy45NTYyMzUyLDQuMzU0MzkgMjMuOTU2MjM1Miw0LjQ5MzA1IEwyMy45NTYyMzUyLDUuNDMyMDQgQzIzLjM2NDYzNTIsNC42NzMwNiAyMi4zMTE4MzUyLDQuMDA4OTYgMjAuNTkyNTM1Miw0LjAwODk2IEMxOC44NzMyMzUyLDQuMDA4OTYgMTcuOTcyNjM1Miw0LjQ4MzMyIDE3LjA3NDMzNTIsNS40MzkzNCBDMTYuMTgzMzM1Miw2LjM5NTM2IDE1LjY2MTczNTIsNy44MDE0NSAxNS42NjE3MzUyLDkuNjMwNzUgQzE1LjY2MTczNTIsMTEuNDYwMDUgMTYuMTgzMzM1MiwxMi44NTYzNSAxNy4wNzQzMzUyLDEzLjgxMjQ1IEMxNy45NjUzMzUyLDE0Ljc2ODQ1IDE5LjIwNjUzNTIsMTUuMjQyNzUgMjAuNTkyNTM1MiwxNS4yNDI3NSBDMjEuOTc4NTM1MiwxNS4yNDI3NSAyMy4zMzA4MzUyLDE0LjU4ODQ1IDIzLjkwNTUzNTIsMTMuODgwNTUgTDIzLjkwNTUzNTIsMTguNzk0NDUgQzIzLjkwNTUzNTIsMTguOTMzMDUgMjQuMDE2NTM1MiwxOS4wNDQ5NSAyNC4xNTQyMzUyLDE5LjA0NDk1IEwyNS45MTY5MzUyLDE5LjA0NDk1IEMyNi4wNTQ1MzUyLDE5LjA0NDk1IDI2LjE2NTYzNTIsMTguOTMzMDUgMjYuMTY1NjM1MiwxOC43OTQ0NSBMMjYuMTY1NjM1Miw0LjQ5MzA1IFogTTM3Ljg2NzIzNTIsNC40OTMwNSBDMzcuODY3MjM1Miw0LjM1NDM5IDM3Ljc1NjIzNTIsNC4yNDI0OSAzNy42MTg1MzUyLDQuMjQyNDkgTDM1Ljg1NTgzNTIsNC4yNDI0OSBDMzUuNzE4MjM1Miw0LjI0MjQ5IDM1LjYwNzEzNTIsNC4zNTQzOSAzNS42MDcxMzUyLDQuNDkzMDUgTDM1LjYwNzEzNTIsMTAuNDE2NDUgQzM1LjYwNzEzNTIsMTEuNDI2MDUgMzUuMjgxMTM1MiwxMi4xNDg1NSAzNC43ODYxMzUyLDEyLjYyMjg1IEMzNC4yODg3MzUyLDEzLjA5NzI1IDMzLjYxMjUzNTIsMTMuMzQ3NzUgMzIuODU5MjM1MiwxMy4zNDc3NSBDMzIuMTA1ODM1MiwxMy4zNDc3NSAzMS42Njg3MzUyLDEzLjE3NTA1IDMxLjMxODYzNTIsMTIuODU2MzUgQzMwLjk2ODQzNTIsMTIuNTM3NzUgMzAuNzQ2MzM1MiwxMi4wMjkzNSAzMC43NDYzMzUyLDExLjI3NzY1IEwzMC43NDYzMzUyLDQuNDkwNjEgQzMwLjc0NjMzNTIsNC4zNTE5NSAzMC42MzUyMzUyLDQuMjQwMDUgMzAuNDk3NjM1Miw0LjI0MDA1IEwyOC43MzQ5MzUyLDQuMjQwMDUgQzI4LjU5NzIzNTIsNC4yNDAwNSAyOC40ODYxMzUyLDQuMzUxOTUgMjguNDg2MTM1Miw0LjQ5MDYxIEwyOC40ODYxMzUyLDExLjM4OTU1IEMyOC40ODYxMzUyLDEyLjYyMjg1IDI4Ljg3MjUzNTIsMTMuNTk1OTUgMjkuNTgyNDM1MiwxNC4yNTI3NSBDMzAuMjg1MTM1MiwxNC45MDcwNSAzMS4yNzc1MzUyLDE1LjIzNTQ1IDMyLjQzMTgzNTIsMTUuMjM1NDUgQzMzLjU4NjAzNTIsMTUuMjM1NDUgMzQuMjgxNDM1MiwxNC45Njc5NSAzNC44MzY4MzUyLDE0LjU5ODE1IEMzNS4xODY5MzUyLDE0LjM2NDY1IDM1LjQ0NTMzNTIsMTQuMDk3MDUgMzUuNjQwOTM1MiwxMy44NDg5NSBMMzUuNjQwOTM1MiwxNC43NTM4NSBDMzUuNjQwOTM1MiwxNC44OTI0NSAzNS43NTIwMzUyLDE1LjAwNDM1IDM1Ljg4OTYzNTIsMTUuMDA0MzUgTDM3LjYwMTYzNTIsMTUuMDA0MzUgQzM3LjczOTMzNTIsMTUuMDA0MzUgMzcuODUwMzM1MiwxNC44OTI0NSAzNy44NTAzMzUyLDE0Ljc1Mzg1IEwzNy44NTAzMzUyLDQuNDkzMDUgTDM3Ljg2NzIzNTIsNC40OTMwNSBaIE00MC4yNzIzMzUyLDIuNjI5NjYgQzQwLjI3MjMzNTIsMi43NjgzMiA0MC4zODMzMzUyLDIuODgwMjIgNDAuNTIxMDM1MiwyLjg4MDIyIEw0Mi4zMjcyMzUyLDIuODgwMjIgQzQyLjQ2NDgzNTIsMi44ODAyMiA0Mi41NzU5MzUyLDIuNzY4MzIgNDIuNTc1OTM1MiwyLjYyOTY2IEw0Mi41NzU5MzUyLDAuNTA4NDIgQzQyLjU3NTkzNTIsMC4zNjk3NiA0Mi40NjQ4MzUyLDAuMjU3ODYgNDIuMzI3MjM1MiwwLjI1Nzg2IEw0MC41MjEwMzUyLDAuMjU3ODYgQzQwLjM4MzMzNTIsMC4yNTc4NiA0MC4yNzIzMzUyLDAuMzY5NzYgNDAuMjcyMzM1MiwwLjUwODQyIEw0MC4yNzIzMzUyLDIuNjI5NjYgWiBNNDAuMjk2NDM1MiwxNC43NTM4NSBDNDAuMjk2NDM1MiwxNC44OTI0NSA0MC40MDc1MzUyLDE1LjAwNDM1IDQwLjU0NTEzNTIsMTUuMDA0MzUgTDQyLjMwNzkzNTIsMTUuMDA0MzUgQzQyLjQ0NTUzNTIsMTUuMDA0MzUgNDIuNTU2NjM1MiwxNC44OTI0NSA0Mi41NTY2MzUyLDE0Ljc1Mzg1IEw0Mi41NTY2MzUyLDQuNDkzMDUgQzQyLjU1NjYzNTIsNC4zNTQzOSA0Mi40NDU1MzUyLDQuMjQyNDkgNDIuMzA3OTM1Miw0LjI0MjQ5IEw0MC41NDUxMzUyLDQuMjQyNDkgQzQwLjQwNzUzNTIsNC4yNDI0OSA0MC4yOTY0MzUyLDQuMzU0MzkgNDAuMjk2NDM1Miw0LjQ5MzA1IEw0MC4yOTY0MzUyLDE0Ljc1Mzg1IFogTTU0Ljg3MzkzNTIsMC4yNTA1NiBDNTQuODczOTM1MiwwLjExMTkgNTQuNzYyOTM1MiwwIDU0LjYyNTIzNTIsMCBMNTIuODYyNTM1MiwwIEM1Mi43MjQ5MzUyLDAgNTIuNjEzODM1MiwwLjExMTkgNTIuNjEzODM1MiwwLjI1MDU2IEw1Mi42MTM4MzUyLDUuMzczNjYgQzUyLjA0MTUzNTIsNC42NjU3NiA1MS4wMjI1MzUyLDQuMDExMzkgNDkuMzAwODM1Miw0LjAxMTM5IEM0Ny41NzkxMzUyLDQuMDExMzkgNDYuNjgwOTM1Miw0LjQ4NTc1IDQ1Ljc4MjYzNTIsNS40NDE3NyBDNDQuODkxNjM1Miw2LjM5Nzc5IDQ0LjM3MDAzNTIsNy44MDM4NSA0NC4zNzAwMzUyLDkuNjMzMTUgQzQ0LjM3MDAzNTIsMTEuNDYyNTUgNDQuODkxNjM1MiwxMi44NTg4NSA0NS43ODI2MzUyLDEzLjgxNDg1IEM0Ni42NzM2MzUyLDE0Ljc3MDg1IDQ3LjkxNDgzNTIsMTUuMjQ1MjUgNDkuMzAwODM1MiwxNS4yNDUyNSBDNTAuNjg2OTM1MiwxNS4yNDUyNSA1Mi4wNjU3MzUyLDE0LjU4MTE1IDUyLjY2NDUzNTIsMTMuODIyMTUgTDUyLjY2NDUzNTIsMTQuNzYxMTUgQzUyLjY2NDUzNTIsMTQuODk5NzUgNTIuNzc1NjM1MiwxNS4wMTE2NSA1Mi45MTMyMzUyLDE1LjAxMTY1IEw1NC42MjUyMzUyLDE1LjAxMTY1IEM1NC43NjI5MzUyLDE1LjAxMTY1IDU0Ljg3MzkzNTIsMTQuODk5NzUgNTQuODczOTM1MiwxNC43NjExNSBMNTQuODczOTM1MiwwLjI1MDU2IFogTTYxLjY2MTczNTIsMC41NTIyIEw2MS42NjE3MzUyLDAuNjEzMDIgTDY1LjExMjMzNTIsMTQuODE0NjUgQzY1LjEzODgzNTIsMTQuOTI2NTUgNjUuMjQwMjM1MiwxNS4wMDQzNSA2NS4zNTEzMzUyLDE1LjAwNDM1IEw2Ny42MTg3MzUyLDE1LjAwNDM1IEM2Ny43Mjk4MzUyLDE1LjAwNDM1IDY3LjgzMzYzNTIsMTQuOTI2NTUgNjcuODU3ODM1MiwxNC44MjQzNSBMNzEuMDA2NTM1MiwzLjUyNzMgTDc0LjE1NTMzNTIsMTQuODI0MzUgQzc0LjE4OTEzNTIsMTQuOTM2MjUgNzQuMjgzMzM1MiwxNS4wMDQzNSA3NC4zOTQzMzUyLDE1LjAwNDM1IEw3Ni42NzE0MzUyLDE1LjAwNDM1IEM3Ni43ODI1MzUyLDE1LjAwNDM1IDc2Ljg4NjMzNTIsMTQuOTI2NTUgNzYuOTEwNTM1MiwxNC44MTQ2NSBMODAuMzYxMTczMywwLjYxMzAyIEw4MC4zNjExNzMzLDAuMjUwNTYgQzgwLjM2MzUzNTIsMC4xMTE5IDgwLjI1MjQzNTIsMCA4MC4xMTQ4MzUyLDAgTDc4LjM1MjAzNTIsMCBDNzguMjMxMzM1MiwwIDc4LjEzNzEzNTIsMC4wNzc4NCA3OC4xMTMwMzUyLDAuMTg5NzQgTDc1LjQxNTgzNTIsMTEuNzAwODUgTDcyLjI0MDQzNTIsMC4xODAwMSBDNzIuMjEzOTM1MiwwLjA2ODExIDcyLjExMjUzNTIsMCA3Mi4wMDE0MzUyLDAgTDcwLjA1NzYzNTIsMCBDNjkuOTQ2NTM1MiwwIDY5Ljg0MjYzNTIsMC4wNzc4NCA2OS44MTg1MzUyLDAuMTgwMDEgTDY2LjYyNjMzNTIsMTEuNzAwODUgTDYzLjkyOTAzNTIsMC4xODk3NCBDNjMuOTA0OTM1MiwwLjA3Nzg0IDYzLjgwMTEzNTIsMCA2My42OTAwMzUyLDAgTDYxLjkxNzYzNTIsMCBDNjEuNzgwMDM1MiwwIDYxLjY2ODkzNTIsMC4xMTE5IDYxLjY2ODkzNTIsMC4yNTA1NiBMNjEuNjY4OTM1MiwwLjU1MjIgTDYxLjY1OTIzNTIsMC41NTIyIEw2MS42NjE3MzUyLDAuNTUyMiBaIE05MC4xNTUxMzUyLDEwLjI1MzQ1IEM5MC4yOTI3MzUyLDEwLjI1MzQ1IDkwLjQwMzgzNTIsMTAuMTQxNTUgOTAuNDAzODM1MiwxMC4wMDI5NSBMOTAuNDAzODM1Miw5LjE3NTg1IEM5MC40MDM4MzUyLDcuNjIzODUgODkuOTgzNjM1Miw2LjMyMjM4IDg5LjE0NTczNTIsNS40MDc3MSBDODguMzA3ODM1Miw0LjQ5MzA1IDg3LjA3MzkzNTIsMy45OTQzNiA4NS41MTY0MzUyLDMuOTk0MzYgQzgzLjk1OTAzNTIsMy45OTQzNiA4Mi42NzQzMzUyLDQuNDg1NzUgODEuNzc2MTM1Miw1LjQ1MTUgQzgwLjg3NzgzNTIsNi40MTcyNSA4MC4zOTAwMzUyLDcuODMwNjUgODAuMzkwMDM1Miw5LjYxNjE1IEM4MC4zOTAwMzUyLDExLjQwMTY1IDgwLjg3NzgzNTIsMTIuODI0NzUgODEuNzg1NzM1MiwxMy43OTA1NSBDODIuNjkzNzM1MiwxNC43NTYyNSA4My45ODU1MzUyLDE1LjI0NzY1IDg1LjUzNTgzNTIsMTUuMjQ3NjUgQzg3LjA4NjAzNTIsMTUuMjQ3NjUgODguMjIzMzM1MiwxNC43NTYyNSA4OC45NjcwMzUyLDE0LjA3NTE1IEM4OS43MTA4MzUyLDEzLjQwMzc1IDkwLjA3MDYzNTIsMTIuNTU3MTUgOTAuMTkxMzM1MiwxMS44ODU3NSBMOTAuMTkxMzM1MiwxMS41NDAzNSBDOTAuMTkxMzM1MiwxMS40MDE2NSA5MC4wODAyMzUyLDExLjI4OTc1IDg5Ljk0MjYzNTIsMTEuMjg5NzUgTDg4LjM2ODIzNTIsMTEuMjg5NzUgQzg4LjI0NzUzNTIsMTEuMjg5NzUgODguMTQ2MDM1MiwxMS4zNzQ5NSA4OC4xMTk1MzUyLDExLjQ5NjU1IEM4OC4wNTE5MzUyLDExLjkzNjg1IDg3LjgyNzMzNTIsMTIuNDExMjUgODcuNDE2ODM1MiwxMi43NzM2NSBDODcuMDA2MzM1MiwxMy4xMzYxNSA4Ni4zOTc4MzUyLDEzLjQwMzc1IDg1LjUxNjQzNTIsMTMuNDAzNzUgQzg0LjYzNTEzNTIsMTMuNDAzNzUgODMuODkxNDM1MiwxMy4wNzUzNSA4My40MDEyMzUyLDEyLjUwNjA1IEM4Mi45NDcyMzUyLDExLjk4MDY1IDgyLjY2NDczNTIsMTEuMjExOTUgODIuNjA0MzM1MiwxMC4yNDYxNSBMOTAuMTUyNzM1MiwxMC4yNDYxNSBMOTAuMTUyNzM1MiwxMC4yNTU5NSBMOTAuMTU1MTM1MiwxMC4yNTM0NSBaIE05Mi4yMjY5MzUyLDE0Ljc1Mzg1IEM5Mi4yMjY5MzUyLDE0Ljg5MjQ1IDkyLjMzODAzNTIsMTUuMDA0MzUgOTIuNDc1NjM1MiwxNS4wMDQzNSBMOTQuMTg3NjM1MiwxNS4wMDQzNSBDOTQuMzI1MzM1MiwxNS4wMDQzNSA5NC40MzYzMzUyLDE0Ljg5MjQ1IDk0LjQzNjMzNTIsMTQuNzUzODUgTDk0LjQzNjMzNTIsMTMuODE0ODUgQzk1LjAyNzkzNTIsMTQuNTczODUgOTYuMDgwNzM1MiwxNS4yMzc5NSA5Ny43OTI4MzUyLDE1LjIzNzk1IEM5OS41MDQ4MzUyLDE1LjIzNzk1IDEwMC40MTI1MzUsMTQuNzYzNTUgMTAxLjMwMTUzNSwxMy44MDc1NSBDMTAyLjE4OTUzNSwxMi44NTE1NSAxMDIuNzEzNTM1LDExLjQ0NTQ1IDEwMi43MTM1MzUsOS42MjU4NSBDMTAyLjcxMzUzNSw3LjgwNjI1IDEwMi4xOTI1MzUsNi4zOTI5MiAxMDEuMzAxNTM1LDUuNDM0NDcgQzEwMC40MTA1MzUsNC40Nzg0NSA5OS4xNjkxMzUyLDQuMDA0MDkgOTcuNzkyODM1Miw0LjAwNDA5IEM5Ni40MTY0MzUyLDQuMDA0MDkgOTUuMDU0NTM1Miw0LjY1ODQ3IDk0LjQ3OTgzNTIsNS4zNjYzNiBMOTQuNDc5ODM1MiwwLjI1MDU2IEM5NC40Nzk4MzUyLDAuMTExOSA5NC4zNjg3MzUyLDAgOTQuMjMxMTM1MiwwIEw5Mi40NjgzMzUyLDAgQzkyLjMzMDczNTIsMCA5Mi4yMTk2MzUyLDAuMTExOSA5Mi4yMTk2MzUyLDAuMjUwNTYgTDkyLjIxOTYzNTIsMTQuNzUzODUgTDkyLjIyOTMzNTIsMTQuNzUzODUgTDkyLjIyNjkzNTIsMTQuNzUzODUgWiBNMjAuOTUyMzM1Miw1LjkwNjQgQzIxLjg2MDIzNTIsNS45MDY0IDIyLjYwMzkzNTIsNi4yMzQ4IDIzLjExODMzNTIsNi44NDUzOSBDMjMuNjM5ODM1Miw3LjQ1ODQxIDIzLjk1NjIzNTIsOC4zOTAxNSAyMy45NTYyMzUyLDkuNjIxMDUgQzIzLjk1NjIzNTIsMTAuODUxOTUgMjMuNjM5ODM1MiwxMS43NzYzNSAyMy4xMTgzMzUyLDEyLjM4OTM1IEMyMi41OTY3MzUyLDEzLjAwMjM1IDIxLjg2MDIzNTIsMTMuMzI4MzUgMjAuOTUyMzM1MiwxMy4zMjgzNSBDMjAuMDQ0NDM1MiwxMy4zMjgzNSAxOS4zMDA2MzUyLDEyLjk5OTk1IDE4Ljc4NjMzNTIsMTIuMzg5MzUgQzE4LjI2NDczNTIsMTEuNzc2MzUgMTcuOTQ4NDM1MiwxMC44NTQzNSAxNy45NDg0MzUyLDkuNjIxMDUgQzE3Ljk0ODQzNTIsOC4zODc2NSAxOC4yNjQ3MzUyLDcuNDU1OTggMTguNzg2MzM1Miw2Ljg0NTM5IEMxOS4zMDc5MzUyLDYuMjMyMzcgMjAuMDQ0NDM1Miw1LjkwNjQgMjAuOTUyMzM1Miw1LjkwNjQgWiBNNDkuNjYwNjM1Miw1LjkwNjQgQzUwLjU2ODUzNTIsNS45MDY0IDUxLjMxMjMzNTIsNi4yMzQ4IDUxLjgyNjYzNTIsNi44NDUzOSBDNTIuMzQ4MjM1Miw3LjQ1ODQxIDUyLjY2NDUzNTIsOC4zOTAxNSA1Mi42NjQ1MzUyLDkuNjIxMDUgQzUyLjY2NDUzNTIsMTAuODUxOTUgNTIuMzQ4MjM1MiwxMS43NzYzNSA1MS44MjY2MzUyLDEyLjM4OTM1IEM1MS4zMDUwMzUyLDEzLjAwMjM1IDUwLjU2ODUzNTIsMTMuMzI4MzUgNDkuNjYwNjM1MiwxMy4zMjgzNSBDNDguNzUyNzM1MiwxMy4zMjgzNSA0OC4wMDkwMzUyLDEyLjk5OTk1IDQ3LjQ5NDYzNTIsMTIuMzg5MzUgQzQ2Ljk3MzEzNTIsMTEuNzc2MzUgNDYuNjU2NzM1MiwxMC44NTQzNSA0Ni42NTY3MzUyLDkuNjIxMDUgQzQ2LjY1NjczNTIsOC4zODc2NSA0Ni45NzMxMzUyLDcuNDU1OTggNDcuNDk0NjM1Miw2Ljg0NTM5IEM0OC4wMTYyMzUyLDYuMjMyMzcgNDguNzUyNzM1Miw1LjkwNjQgNDkuNjYwNjM1Miw1LjkwNjQgWiBNODguMjEzNzM1Miw4LjQ1ODI1IEw4Mi42NTc0MzUyLDguNDU4MjUgQzgyLjc2MTMzNTIsNy42OTkyNSA4My4wMzQxMzUyLDcuMDY5MTkgODMuNDU0MzM1Miw2LjYzMTMyIEM4My45MjUyMzUyLDYuMTM5OTMgODQuNjAxMzM1Miw1LjgzODI5IDg1LjUwOTIzNTIsNS44MzgyOSBDODYuNDE3MTM1Miw1LjgzODI5IDg3LjA5MzIzNTIsNi4xMzI2MyA4Ny41MzAzMzUyLDYuNjE0MjkgQzg3LjkzMzUzNTIsNy4wNTQ2IDg4LjE2MjkzNTIsNy42ODQ2NSA4OC4yMDY0MzUyLDguNDYwNjUgTDg4LjIxNjEzNTIsOC40NjA2NSBMODguMjEzNzM1Miw4LjQ1ODI1IFogTTk3LjQ0MDIzNTIsMTMuMzQwNDUgQzk2LjUyNTAzNTIsMTMuMzQwNDUgOTUuNzg4NjM1MiwxMy4wMTIwNSA5NS4yNjcwMzUyLDEyLjQwMTQ1IEM5NC43NDU0MzUyLDExLjc4ODQ1IDk0LjQyOTEzNTIsMTAuODY2NTUgOTQuNDI5MTM1Miw5LjYzMzE1IEM5NC40MjkxMzUyLDguMzk5ODUgOTQuNzQ1NDM1Miw3LjQ2ODE0IDk1LjI2NzAzNTIsNi44NTc1NSBDOTUuNzg4NjM1Miw2LjI0NDUzIDk2LjUzNDczNTIsNS45MTg1NiA5Ny40NDAyMzUyLDUuOTE4NTYgQzk4LjM0NTczNTIsNS45MTg1NiA5OS4wOTE5MzUyLDYuMjQ2OTcgOTkuNjA2MjM1Miw2Ljg1NzU1IEMxMDAuMTI3NTM1LDcuNDcwNTcgMTAwLjQ0NDUzNSw4LjQwMjI1IDEwMC40NDQ1MzUsOS42MzMxNSBDMTAwLjQ0NDUzNSwxMC44NjQwNSAxMDAuMTI3NTM1LDExLjc4ODQ1IDk5LjYwNjIzNTIsMTIuNDAxNDUgQzk5LjA4NDYzNTIsMTMuMDE0NTUgOTguMzQ4MTM1MiwxMy4zNDA0NSA5Ny40NDAyMzUyLDEzLjM0MDQ1IFoiIGlkPSJTaGFwZSI+PC9wYXRoPgogICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9IlBhdGgiIGZpbGwtcnVsZT0ibm9uemVybyIgcG9pbnRzPSI3Ny4wMDgzMzUyIDE4LjY0NjQ1IDc4LjYyNjIzNTIgMjEuMzUzOTUgNzguNzQ2OTM1MiAyMS4zNTM5NSA3OC43NDY5MzUyIDE4LjY0NjQ1IDc5LjQwNjEzNTIgMTguNjQ2NDUgNzkuNDA2MTM1MiAyMi4zMDI3NSA3OC40MDQwMzUyIDIyLjMwMjc1IDc2Ljc4NjIzNTIgMTkuNTk1MjUgNzYuNjY1NDM1MiAxOS41OTUyNSA3Ni42NjU0MzUyIDIyLjMwMjc1IDc1Ljk5OTAzNTIgMjIuMzAyNzUgNzUuOTk5MDM1MiAxOC42NDY0NSI+PC9wb2x5Z29uPgogICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9IlBhdGgiIGZpbGwtcnVsZT0ibm9uemVybyIgcG9pbnRzPSI4My4wNzYyMzUyIDE4LjY0NjQ1IDgzLjA3NjIzNTIgMTkuMjMyNzUgODAuODg2MTM1MiAxOS4yMzI3NSA4MC44ODYxMzUyIDIwLjE1NDc1IDgyLjgxMzAzNTIgMjAuMTU0NzUgODIuODEzMDM1MiAyMC43MjM5NSA4MC44ODYxMzUyIDIwLjcyMzk1IDgwLjg4NjEzNTIgMjEuNzE2NDUgODMuMTAyNzM1MiAyMS43MTY0NSA4My4xMDI3MzUyIDIyLjMwMjc1IDgwLjE2NjUzNTIgMjIuMzAyNzUgODAuMTY2NTM1MiAxOC42NDY0NSI+PC9wb2x5Z29uPgogICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9IlBhdGgiIGZpbGwtcnVsZT0ibm9uemVybyIgcG9pbnRzPSI4NC4zNjg1MzUyIDE4LjY0NjQ1IDg1LjMwMDYzNTIgMTkuOTQ3OTUgODUuNTIyNzM1MiAxOS45NDc5NSA4Ni40Mzc5MzUyIDE4LjY0NjQ1IDg3LjE5ODUzNTIgMTguNjQ2NDUgODUuOTQwNTM1MiAyMC40NDkwNSA4Ny4yNzU4MzUyIDIyLjMwMjc1IDg2LjQ0NTEzNTIgMjIuMzAyNzUgODUuNDU5OTM1MiAyMC45NDc3NSA4NS4yMjgxMzUyIDIwLjk0Nzc1IDg0LjI3OTEzNTIgMjIuMzAyNzUgODMuNTE4NTM1MiAyMi4zMDI3NSA4NC44MjAwMzUyIDIwLjQ0OTA1IDgzLjUyODIzNTIgMTguNjQ2NDUgODQuMzY2MTM1MiAxOC42NDY0NSI+PC9wb2x5Z29uPgogICAgICAgICAgICAgICAgPHBhdGggZD0iTTg5LjM1OTgzNTIsMTguNTk1MjUgQzkwLjM4NjAzNTIsMTguNTk1MjUgOTEuMDYyMjM1MiwxOS4wODY1NSA5MS4wNjIyMzUyLDIwLjAyNTU1IEw5MS4wNjIyMzUyLDIwLjA3NjY1IEw5MC4zNDI2MzUyLDIwLjA3NjY1IEw5MC4zNDI2MzUyLDIwLjAyNTU1IEM5MC4zNDI2MzUyLDE5LjQ5MDQ1IDg5Ljk4MjgzNTIsMTkuMjIyODUgODkuMzU3NDM1MiwxOS4yMjI4NSBMODkuMjI5NDM1MiwxOS4yMjI4NSBDODguNjEzNzM1MiwxOS4yMjI4NSA4OC4yMzcwMzUyLDE5LjUxNzE1IDg4LjIzNzAzNTIsMjAuMTM3NDUgTDg4LjIzNzAzNTIsMjAuODAxNTUgQzg4LjIzNzAzNTIsMjEuNDQ4NjUgODguNjEzNzM1MiwyMS43MzMyNSA4OS4yMjk0MzUyLDIxLjczMzI1IEw4OS4zNTc0MzUyLDIxLjczMzI1IEM4OS45ODI4MzUyLDIxLjczMzI1IDkwLjM0OTgzNTIsMjEuNDY1NjUgOTAuMzQ5ODM1MiwyMC45MjMyNSBMOTAuMzQ5ODM1MiwyMC44ODkxNSBMOTEuMDY5NDM1MiwyMC44ODkxNSBMOTEuMDY5NDM1MiwyMC45MjMyNSBDOTEuMDY5NDM1MiwyMS44NzkyNSA5MC4zNzY0MzUyLDIyLjM2MzM1IDg5LjM1MDEzNTIsMjIuMzYzMzUgTDg5LjIyMjIzNTIsMjIuMzYzMzUgQzg4LjIyMDEzNTIsMjIuMzYzMzUgODcuNTAyOTM1MiwyMS44NzE5NSA4Ny41MDI5MzUyLDIwLjgxMTM1IEw4Ny41MDI5MzUyLDIwLjE0NzI1IEM4Ny41MDI5MzUyLDE5LjExMzM1IDg4LjIxMjgzNTIsMTguNjAyNTUgODkuMjIyMjM1MiwxOC42MDI1NSBMODkuMzUwMTM1MiwxOC42MDI1NSBMODkuMzU5ODM1MiwxOC41OTI3NSBMODkuMzU5ODM1MiwxOC41OTUyNSBaIiBpZD0iUGF0aCIgZmlsbC1ydWxlPSJub256ZXJvIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUGF0aCIgZmlsbC1ydWxlPSJub256ZXJvIiBwb2ludHM9Ijk0LjY5MTQzNTIgMTguNjQ2NDUgOTQuNjkxNDM1MiAxOS4yMzI3NSA5Mi41MDEzMzUyIDE5LjIzMjc1IDkyLjUwMTMzNTIgMjAuMTU0NzUgOTQuNDI4MjM1MiAyMC4xNTQ3NSA5NC40MjgyMzUyIDIwLjcyMzk1IDkyLjUwMTMzNTIgMjAuNzIzOTUgOTIuNTAxMzM1MiAyMS43MTY0NSA5NC43MTgwMzUyIDIxLjcxNjQ1IDk0LjcxODAzNTIgMjIuMzAyNzUgOTEuNzgxNzM1MiAyMi4zMDI3NSA5MS43ODE3MzUyIDE4LjY0NjQ1Ij48L3BvbHlnb24+CiAgICAgICAgICAgICAgICA8cGF0aCBkPSJNOTYuOTY4MTM1MiwxOC42MDQ0NSBDOTcuODgzMjM1MiwxOC42MDQ0NSA5OC41MDg2MzUyLDE5LjAwMTA1IDk4LjUwODYzNTIsMTkuNzI1OTUgTDk4LjUwODYzNTIsMTkuOTU5NDUgTDk3LjgwNjAzNTIsMTkuOTU5NDUgTDk3LjgwNjAzNTIsMTkuNzI1OTUgQzk3LjgwNjAzNTIsMTkuMzU2MTUgOTcuNDgwMDM1MiwxOS4xNzM3NSA5Ni45NTg0MzUyLDE5LjE3Mzc1IEw5Ni44NjQyMzUyLDE5LjE3Mzc1IEM5Ni4zMzMwMzUyLDE5LjE3Mzc1IDk2LjAyNjMzNTIsMTkuMzUzNzUgOTYuMDI2MzM1MiwxOS42MzEwNSBMOTYuMDI2MzM1MiwxOS42ODIxNSBDOTYuMDI2MzM1MiwxOS45OTM1NSA5Ni4yOTE5MzUyLDIwLjA2MTY1IDk3LjE1NjQzNTIsMjAuMjE3MzUgQzk4LjEyNDczNTIsMjAuMzk3MzUgOTguNTY5MDM1MiwyMC42NzQ2NSA5OC41NjkwMzUyLDIxLjI4NzY1IEw5OC41NjkwMzUyLDIxLjM0ODQ1IEM5OC41NjkwMzUyLDIxLjk1MTc1IDk4LjAzMDUzNTIsMjIuMzc1MDUgOTYuOTc3NzM1MiwyMi4zNzUwNSBMOTYuODgzNTM1MiwyMi4zNzUwNSBDOTUuODIxMTM1MiwyMi4zNzUwNSA5NS4yNzU0MzUyLDIxLjk0NDQ1IDk1LjI3NTQzNTIsMjEuMjA5ODUgTDk1LjI3NTQzNTIsMjAuOTc2MjUgTDk1Ljk3ODAzNTIsMjAuOTc2MjUgTDk1Ljk3ODAzNTIsMjEuMjA5ODUgQzk1Ljk3ODAzNTIsMjEuNjUwMTUgOTYuMjk0NDM1MiwyMS44MTMxNSA5Ni44OTMyMzUyLDIxLjgxMzE1IEw5Ni45Nzc3MzUyLDIxLjgxMzE1IEM5Ny41NTk3MzUyLDIxLjgxMzE1IDk3Ljg2ODczNTIsMjEuNjU3NDUgOTcuODY4NzM1MiwyMS4zNjU1NSBMOTcuODY4NzM1MiwyMS4zMTQ0NSBDOTcuODY4NzM1MiwyMS4wMjAwNSA5Ny41ODYyMzUyLDIwLjkwODE1IDk2LjczMTQzNTIsMjAuNzYyMjUgQzk1LjgzMzEzNTIsMjAuNjA2NTUgOTUuMzM1NzM1MiwyMC4zNjU3NSA5NS4zMzU3MzUyLDE5LjcyODM1IEw5NS4zMzU3MzUyLDE5LjY2MDI1IEM5NS4zMzU3MzUyLDE5LjAxMzE1IDk1LjkyNzMzNTIsMTguNjI2MzUgOTYuODc2MzM1MiwxOC42MjYzNSBMOTYuOTcwNTM1MiwxOC42MjYzNSBMOTYuOTcwNTM1MiwxOC42MDkzNSBMOTYuOTY4MTM1MiwxOC42MDQ0NSBaIiBpZD0iUGF0aCIgZmlsbC1ydWxlPSJub256ZXJvIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTAwLjgwOTUzNSwxOC41OTU3NSBDMTAxLjcyNTUzNSwxOC41OTU3NSAxMDIuMzUwNTM1LDE4Ljk5MjI1IDEwMi4zNTA1MzUsMTkuNzE3MTUgTDEwMi4zNTA1MzUsMTkuOTUwNjUgTDEwMS42NDc1MzUsMTkuOTUwNjUgTDEwMS42NDc1MzUsMTkuNzE3MTUgQzEwMS42NDc1MzUsMTkuMzQ3MzUgMTAxLjMyMTUzNSwxOS4xNjQ5NSAxMDAuODAwNTM1LDE5LjE2NDk1IEwxMDAuNzA2NTM1LDE5LjE2NDk1IEMxMDAuMTc0NTM1LDE5LjE2NDk1IDk5Ljg2ODEzNTIsMTkuMzQ0OTUgOTkuODY4MTM1MiwxOS42MjIyNSBMOTkuODY4MTM1MiwxOS42NzMzNSBDOTkuODY4MTM1MiwxOS45ODQ3NSAxMDAuMTMzNTM1LDIwLjA1Mjg1IDEwMC45OTg1MzUsMjAuMjA4NTUgQzEwMS45NjY1MzUsMjAuMzg4NTUgMTAyLjQxMDUzNSwyMC42NjU4NSAxMDIuNDEwNTM1LDIxLjI3ODg1IEwxMDIuNDEwNTM1LDIxLjMzOTY1IEMxMDIuNDEwNTM1LDIxLjk0Mjk1IDEwMS44NzI1MzUsMjIuMzY2MjUgMTAwLjgxOTUzNSwyMi4zNjYyNSBMMTAwLjcyNTUzNSwyMi4zNjYyNSBDOTkuNjYyOTM1MiwyMi4zNjYyNSA5OS4xMTcyMzUyLDIxLjkzNTY1IDk5LjExNzIzNTIsMjEuMjAxMDUgTDk5LjExNzIzNTIsMjAuOTY3NTUgTDk5LjgxOTgzNTIsMjAuOTY3NTUgTDk5LjgxOTgzNTIsMjEuMjAxMDUgQzk5LjgxOTgzNTIsMjEuNjQxMzUgMTAwLjEzNjUzNSwyMS44MDQzNSAxMDAuNzM0NTM1LDIxLjgwNDM1IEwxMDAuODE5NTM1LDIxLjgwNDM1IEMxMDEuNDAxNTM1LDIxLjgwNDM1IDEwMS43MTA1MzUsMjEuNjQ4NjUgMTAxLjcxMDUzNSwyMS4zNTY3NSBMMTAxLjcxMDUzNSwyMS4zMDU2NSBDMTAxLjcxMDUzNSwyMS4wMTEyNSAxMDEuNDI4NTM1LDIwLjg5OTM1IDEwMC41NzM1MzUsMjAuNzUzNDUgQzk5LjY3NDkzNTIsMjAuNTk3NzUgOTkuMTc3NTM1MiwyMC4zNTY5NSA5OS4xNzc1MzUyLDE5LjcxOTU1IEw5OS4xNzc1MzUyLDE5LjY1MTQ1IEM5OS4xNzc1MzUyLDE5LjAwNDM1IDk5Ljc2OTEzNTIsMTguNjE3NTUgMTAwLjcxODUzNSwxOC42MTc1NSBMMTAwLjgxMjUzNSwxOC42MTc1NSBMMTAwLjgxMjUzNSwxOC42MDA1NSBMMTAwLjgwOTUzNSwxOC41OTU3NSBaIiBpZD0iUGF0aCIgZmlsbC1ydWxlPSJub256ZXJvIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNjguMzI2NjM1MiwyMi4zNTU3NSBMNjguMzI2NjM1MiwxOC42NDg0NSBMNjkuNjQ1MDM1MiwxOC42NDg0NSBDNzAuMDg5NDM1MiwxOC42NDg0NSA3MC40MjUwMzUyLDE4LjcyNjI1IDcwLjY0NzEzNTIsMTguODg5MjUgQzcwLjg2OTMzNTIsMTkuMDUyMjUgNzAuOTgwNDM1MiwxOS4zMDI4NSA3MC45ODA0MzUyLDE5LjY0ODI1IEM3MC45ODA0MzUyLDE5Ljk5MzY1IDcwLjk0NjYzNTIsMTkuOTQyNTUgNzAuODg2MjM1MiwyMC4wNjE3NSBDNzAuODE4NjM1MiwyMC4xODM0NSA3MC43MjQ0MzUyLDIwLjI3ODI1IDcwLjU5NDAzNTIsMjAuMzM2NjUgQzcwLjQ2NjAzNTIsMjAuNDA0NzUgNzAuMzIxMjM1MiwyMC40NDEyNSA3MC4xNDk3MzUyLDIwLjQ0MTI1IEw3MC4xNDk3MzUyLDIwLjQyNDI1IEM3MC40NTg4MzUyLDIwLjQyNDI1IDcwLjcwNTEzNTIsMjAuNTE5MTUgNzAuODc2NTM1MiwyMC42ODIxNSBDNzEuMDQ4MDM1MiwyMC44NDUwNSA3MS4xNDIyMzUyLDIxLjA2MTU1IDcxLjE0MjIzNTIsMjEuMzI5MTUgQzcxLjE0MjIzNTIsMjEuNTk2NzUgNzEuMDMxMTM1MiwyMS45MjUxNSA3MC44MDg5MzUyLDIyLjA4ODE1IEM3MC41ODY4MzUyLDIyLjI2MDg1IDcwLjI2MDgzNTIsMjIuMzQ2MDUgNjkuODUwMzM1MiwyMi4zNDYwNSBMNjguMzM2MzM1MiwyMi4zNDYwNSBMNjguMzI2NjM1MiwyMi4zNTU3NSBaIE02OC44OTE3MzUyLDIwLjIzNDU1IEw2OS42NDUwMzUyLDIwLjIzNDU1IEM2OS44OTM4MzUyLDIwLjIzNDU1IDcwLjA4MjEzNTIsMjAuMTkwNzUgNzAuMjE3MzM1MiwyMC4wOTU4NSBDNzAuMzUyNjM1MiwyMC4wMDA5NSA3MC40MjI2MzUyLDE5Ljg3MjA1IDcwLjQyMjYzNTIsMTkuNjk5MzUgQzcwLjQyMjYzNTIsMTkuNTI2NjUgNzAuMzU1MDM1MiwxOS4zODA2NSA3MC4yMjQ2MzUyLDE5LjI5MzA1IEM3MC4wOTQyMzUyLDE5LjIwNTU1IDY5Ljg5ODYzNTIsMTkuMTY0MTUgNjkuNjQyNjM1MiwxOS4xNjQxNSBMNjguODg5MjM1MiwxOS4xNjQxNSBMNjguODg5MjM1MiwyMC4yNDE4NSBMNjguODg5MjM1MiwyMC4yMzIwNSBMNjguODkxNzM1MiwyMC4yMzQ1NSBaIE02OC44OTE3MzUyLDIxLjg0NzM1IEw2OS44MzM0MzUyLDIxLjg0NzM1IEM3MC4wNjUyMzUyLDIxLjg0NzM1IDcwLjI0MzkzNTIsMjEuNzk2MjUgNzAuMzcxOTM1MiwyMS43MDEzNSBDNzAuNDk5OTM1MiwyMS42MDY1NSA3MC41Njk5MzUyLDIxLjQ2Nzg1IDcwLjU2OTkzNTIsMjEuMjc4MDUgQzcwLjU2OTkzNTIsMjEuMDg4MzUgNzAuNTAyMzM1MiwyMC45NTk0NSA3MC4zNzE5MzUyLDIwLjg1NDg1IEM3MC4yNDE1MzUyLDIwLjc1MDI1IDcwLjA2MjgzNTIsMjAuNjk5MTUgNjkuODMzNDM1MiwyMC42OTkxNSBMNjguODkxNzM1MiwyMC42OTkxNSBMNjguODkxNzM1MiwyMS44NDQ4NSBMNjguODkxNzM1MiwyMS44NDczNSBaIiBpZD0iU2hhcGUiIGZpbGwtcnVsZT0ibm9uemVybyI+PC9wYXRoPgogICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9IlBhdGgiIGZpbGwtcnVsZT0ibm9uemVybyIgcG9pbnRzPSI3Mi40ODA4MzUyIDIyLjM1NTc1IDcyLjQ4MDgzNTIgMjAuODY0NTUgNzEuMTg4OTM1MiAxOC42NDg0NSA3MS44MzEyMzUyIDE4LjY0ODQ1IDcyLjc1NjEzNTIgMjAuMzA1MDUgNzMuNjg4MTM1MiAxOC42NDg0NSA3NC4zMzA0MzUyIDE4LjY0ODQ1IDczLjAzODYzNTIgMjAuODY0NTUgNzMuMDM4NjM1MiAyMi4zNTU3NSA3Mi40ODMyMzUyIDIyLjM1NTc1Ij48L3BvbHlnb24+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="); |
| 259 |
|
| 260 |
/***/ }, |
| 261 |
|
| 262 |
/***/ "./resources/img/logo-nexcess.svg" |
| 263 |
/*!****************************************!*\ |
| 264 |
!*** ./resources/img/logo-nexcess.svg ***! |
| 265 |
\****************************************/ |
| 266 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 267 |
|
| 268 |
__webpack_require__.r(__webpack_exports__); |
| 269 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 270 |
/* harmony export */ ReactComponent: () => (/* binding */ SvgLogoNexcess), |
| 271 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 272 |
/* harmony export */ }); |
| 273 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 274 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 275 |
var _path, _g, _defs; |
| 276 |
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } |
| 277 |
|
| 278 |
var SvgLogoNexcess = function SvgLogoNexcess(props) { |
| 279 |
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ |
| 280 |
xmlns: "http://www.w3.org/2000/svg", |
| 281 |
width: 72, |
| 282 |
height: 72, |
| 283 |
fill: "none" |
| 284 |
}, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("g", { |
| 285 |
clipPath: "url(#logo-nexcess_svg__a)" |
| 286 |
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("g", { |
| 287 |
clipPath: "url(#logo-nexcess_svg__b)" |
| 288 |
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("mask", { |
| 289 |
id: "logo-nexcess_svg__c", |
| 290 |
width: 72, |
| 291 |
height: 72, |
| 292 |
x: 0, |
| 293 |
y: 0, |
| 294 |
maskUnits: "userSpaceOnUse", |
| 295 |
style: { |
| 296 |
maskType: "luminance" |
| 297 |
} |
| 298 |
}, _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 299 |
fill: "#fff", |
| 300 |
d: "M72 0H0v72h72z" |
| 301 |
}))), _g || (_g = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("g", { |
| 302 |
mask: "url(#logo-nexcess_svg__c)" |
| 303 |
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 304 |
fill: "#3D7BF5", |
| 305 |
d: "m19.807 52.542-.015.03-.084.13c-.075.105-.151.196-.227.294.114-.144.235-.287.348-.431h-.015v-.015zm-.015.03-.084.13c-.075.105-.151.196-.227.294.114-.144.235-.287.348-.431h-.015l-.015.015h-.008zm45.576-35.086c-3.958-3.02-9.581-2.384-12.745 1.362a4.33 4.33 0 0 1 3.164-1.377c2.353 0 3.45 1.611 3.814 2.308s1.052 2.52-.318 4.427l-.113.167L43.01 46.979l-1.513-8.416-.583-3.254-2.468-13.66-.794-4.42-.946-5.23H26.058L5.124 41.303l-.53.742c-.053.083-.113.159-.174.242A9.16 9.16 0 0 0 6.774 54.23c3.852 2.944 9.286 2.422 12.503-1.052a4.25 4.25 0 0 1-3.088 1.302c-2.369 0-3.466-1.62-3.822-2.316-.363-.689-1.052-2.513.318-4.428l.287-.393.016-.03 15.961-22.335 1.521 8.424.583 3.254 3.27 18.081h-.008l.946 5.222H45.91l21.123-29.562.34-.484c.076-.114.152-.212.228-.333a9.19 9.19 0 0 0-2.24-12.11zM19.807 52.542l-.015.03-.084.13c-.075.105-.151.196-.227.294.114-.144.235-.287.348-.431h-.015v-.015z" |
| 306 |
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 307 |
fill: "#0A55CC", |
| 308 |
d: "m30.834 54.124-3.02 4.269a14.3 14.3 0 0 1-11.61 5.97c-5.35 0-10.202-2.936-12.647-7.65a14.04 14.04 0 0 1 .87-14.426A9.16 9.16 0 0 0 6.783 54.23c3.852 2.944 9.286 2.422 12.503-1.052.052-.045.105-.106.158-.159q-.002-.024.03-.038c.114-.144.235-.287.349-.431h-.015l8.567-12.087 2.467 13.661zM67.616 29.587a9.19 9.19 0 0 0-2.24-12.109c-3.958-3.02-9.582-2.384-12.745 1.362-.084.106-.174.205-.25.31-.03.038-.053.069-.083.114l-8.666 12.238-2.467-13.668 3.02-4.269a14.27 14.27 0 0 1 11.617-5.971c5.343 0 10.187 2.936 12.64 7.651a14.04 14.04 0 0 1-.81 14.342z" |
| 309 |
}))))), _defs || (_defs = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("clipPath", { |
| 310 |
id: "logo-nexcess_svg__a" |
| 311 |
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 312 |
fill: "#fff", |
| 313 |
d: "M0 0h72v72H0z" |
| 314 |
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("clipPath", { |
| 315 |
id: "logo-nexcess_svg__b" |
| 316 |
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 317 |
fill: "#fff", |
| 318 |
d: "M0 0h72v72H0z" |
| 319 |
}))))); |
| 320 |
}; |
| 321 |
|
| 322 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzIiIGhlaWdodD0iNzIiIHZpZXdCb3g9IjAgMCA3MiA3MiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE2ODZfMjk2KSI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMV8xNjg2XzI5NikiPgo8bWFzayBpZD0ibWFzazBfMTY4Nl8yOTYiIHN0eWxlPSJtYXNrLXR5cGU6bHVtaW5hbmNlIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSIwIiB5PSIwIiB3aWR0aD0iNzIiIGhlaWdodD0iNzIiPgo8cGF0aCBkPSJNNzIgMEgwVjcySDcyVjBaIiBmaWxsPSJ3aGl0ZSIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazBfMTY4Nl8yOTYpIj4KPHBhdGggZD0iTTE5LjgwNjcgNTIuNTQyM0wxOS43OTE1IDUyLjU3MjVMMTkuNzA4MyA1Mi43MDEyQzE5LjYzMjYgNTIuODA3MSAxOS41NTcgNTIuODk3OSAxOS40ODEyIDUyLjk5NjRDMTkuNTk0OCA1Mi44NTI1IDE5LjcxNTkgNTIuNzA4OCAxOS44Mjk0IDUyLjU2NDlIMTkuODE0M1Y1Mi41NDk3TDE5LjgwNjcgNTIuNTQyM1pNMTkuNzkxNSA1Mi41NzI1TDE5LjcwODMgNTIuNzAxMkMxOS42MzI2IDUyLjgwNzEgMTkuNTU3IDUyLjg5NzkgMTkuNDgxMiA1Mi45OTY0QzE5LjU5NDggNTIuODUyNSAxOS43MTU5IDUyLjcwODggMTkuODI5NCA1Mi41NjQ5SDE5LjgxNDNMMTkuNzk5MSA1Mi41ODAxSDE5Ljc5MTVWNTIuNTcyNVpNNjUuMzY4MSAxNy40ODU2QzYxLjQwOTkgMTQuNDY1OCA1NS43ODY2IDE1LjEwMTYgNTIuNjIzMSAxOC44NDhDNTMuNDMyOCAxNy45Nzc1IDU0LjU4MzMgMTcuNDcwNiA1NS43ODY2IDE3LjQ3MDZDNTguMTQwNCAxNy40NzA2IDU5LjIzNzggMTkuMDgyNSA1OS42MDExIDE5Ljc3ODhDNTkuOTY0MyAyMC40NzUxIDYwLjY1MzEgMjIuMjk5MSA1OS4yODMyIDI0LjIwNjNMNTkuMTY5NiAyNC4zNzI4TDQzLjAxMTIgNDYuOTc5NEw0MS40OTc2IDM4LjU2MzVMNDAuOTE0OCAzNS4zMDkxTDM4LjQ0NzUgMjEuNjQ4MkwzNy42NTI5IDE3LjIyODNMMzYuNzA2NyAxMS45OTg2SDI2LjA1ODJMNS4xMjQwNyA0MS4zMDMzTDQuNTk0MyA0Mi4wNDQ5QzQuNTQxMzEgNDIuMTI4MiA0LjQ4MDc3IDQyLjIwMzggNC40MjAyMiA0Mi4yODcxQzIuMDg5MTYgNDYuMjQ1NCAzLjAzNTIxIDUxLjM4NDIgNi43NzM5NyA1NC4yMjk5QzEwLjYyNjMgNTcuMTc0MSAxNi4wNjAzIDU2LjY1MTggMTkuMjc2OCA1My4xNzc5QzE4LjQ3NDcgNTQuMDE4IDE3LjM2MjEgNTQuNDc5NyAxNi4xODkgNTQuNDc5N0MxMy44MjAxIDU0LjQ3OTcgMTIuNzIyNyA1Mi44NjAxIDEyLjM2NyA1Mi4xNjM5QzEyLjAwMzcgNTEuNDc1MSAxMS4zMTUgNDkuNjUxMiAxMi42ODQ5IDQ3LjczNjNMMTIuOTcyNSA0Ny4zNDI4TDEyLjk4NzYgNDcuMzEyNEwyOC45NDkzIDI0Ljk3ODJMMzAuNDcwNCAzMy40MDE4TDMxLjA1MzIgMzYuNjU2M0wzNC4zMjI3IDU0LjczN0gzNC4zMTUxTDM1LjI2MTMgNTkuOTU5M0g0NS45MUw2Ny4wMzMyIDMwLjM5NzJMNjcuMzczNyAyOS45MTI5QzY3LjQ0OTUgMjkuNzk5MyA2Ny41MjUxIDI5LjcwMSA2Ny42MDA4IDI5LjU3OTlDNzAuMDQ1NCAyNS42MDY0IDY5LjEzNzEgMjAuMzY5MSA2NS4zNjA2IDE3LjQ3MDZMNjUuMzY4MSAxNy40ODU2Wk0xOS44MDY3IDUyLjU0MjNMMTkuNzkxNSA1Mi41NzI1TDE5LjcwODMgNTIuNzAxMkMxOS42MzI2IDUyLjgwNzEgMTkuNTU3IDUyLjg5NzkgMTkuNDgxMiA1Mi45OTY0QzE5LjU5NDggNTIuODUyNSAxOS43MTU5IDUyLjcwODggMTkuODI5NCA1Mi41NjQ5SDE5LjgxNDNWNTIuNTQ5N0wxOS44MDY3IDUyLjU0MjNaIiBmaWxsPSIjM0Q3QkY1Ii8+CjxwYXRoIGQ9Ik0zMC44MzM3IDU0LjEyNEwyNy44MTM5IDU4LjM5MjZDMjUuMTM0NyA2Mi4xMzEyIDIwLjgwNTYgNjQuMzYzOSAxNi4yMDQxIDY0LjM2MzlDMTAuODUzMyA2NC4zNjM5IDYuMDAxOTYgNjEuNDI3NCAzLjU1NzM5IDU2LjcxMjRDMS4xNTgyMiA1Mi4wODA1IDEuNDk4OCA0Ni41NzA4IDQuNDI3NzUgNDIuMjg3MUMyLjA5NjY5IDQ2LjI0NTQgMy4wNDI3NSA1MS4zODQyIDYuNzgxNSA1NC4yMjk5QzEwLjYzMzggNTcuMTc0MSAxNi4wNjc4IDU2LjY1MTggMTkuMjg0NSA1My4xNzc5QzE5LjMzNzMgNTMuMTMyNSAxOS4zOTA0IDUzLjA3MiAxOS40NDM0IDUzLjAxOUMxOS40NDM0IDUzLjAwMzggMTkuNDUxIDUyLjk4ODggMTkuNDczNiA1Mi45ODEyQzE5LjU4NzEgNTIuODM3MyAxOS43MDgzIDUyLjY5MzYgMTkuODIxOCA1Mi41NDk3SDE5LjgwNjZMMjguMzc0IDQwLjQ2MzJMMzAuODQxMyA1NC4xMjRIMzAuODMzN1oiIGZpbGw9IiMwQTU1Q0MiLz4KPHBhdGggZD0iTTY3LjYxNjEgMjkuNTg3NEM3MC4wNjA3IDI1LjYxNCA2OS4xNTI1IDIwLjM3NjcgNjUuMzc1OSAxNy40NzhDNjEuNDE3NiAxNC40NTgyIDU1Ljc5NDMgMTUuMDk0IDUyLjYzMDggMTguODQwNEM1Mi41NDc1IDE4Ljk0NjMgNTIuNDU2NyAxOS4wNDQ3IDUyLjM4MSAxOS4xNTA2QzUyLjM1MDggMTkuMTg4NCA1Mi4zMjggMTkuMjE4OCA1Mi4yOTc4IDE5LjI2NDFMNDMuNjMyMSAzMS41MDIxTDQxLjE2NDggMTcuODMzOEw0NC4xODQ2IDEzLjU2NTJDNDYuODYzOCA5LjgxMTI4IDUxLjE5MjggNy41OTM3NSA1NS44MDE5IDcuNTkzNzVDNjEuMTQ1MiA3LjU5Mzc1IDY1Ljk4ODkgMTAuNTMwMyA2OC40NDExIDE1LjI0NTNDNzAuODI1MSAxOS44Mzk0IDcwLjUwNzIgMjUuMzAzNiA2Ny42MzEzIDI5LjU4NzRINjcuNjE2MVoiIGZpbGw9IiMwQTU1Q0MiLz4KPC9nPgo8L2c+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMTY4Nl8yOTYiPgo8cmVjdCB3aWR0aD0iNzIiIGhlaWdodD0iNzIiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjxjbGlwUGF0aCBpZD0iY2xpcDFfMTY4Nl8yOTYiPgo8cmVjdCB3aWR0aD0iNzIiIGhlaWdodD0iNzIiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="); |
| 323 |
|
| 324 |
/***/ }, |
| 325 |
|
| 326 |
/***/ "./resources/img/logo-tec-nobg.svg" |
| 327 |
/*!*****************************************!*\ |
| 328 |
!*** ./resources/img/logo-tec-nobg.svg ***! |
| 329 |
\*****************************************/ |
| 330 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 331 |
|
| 332 |
__webpack_require__.r(__webpack_exports__); |
| 333 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 334 |
/* harmony export */ ReactComponent: () => (/* binding */ SvgLogoTecNobg), |
| 335 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 336 |
/* harmony export */ }); |
| 337 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 338 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 339 |
var _path; |
| 340 |
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } |
| 341 |
|
| 342 |
var SvgLogoTecNobg = function SvgLogoTecNobg(props) { |
| 343 |
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ |
| 344 |
xmlns: "http://www.w3.org/2000/svg", |
| 345 |
width: 32, |
| 346 |
height: 32, |
| 347 |
fill: "none" |
| 348 |
}, props), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 349 |
fill: "#000", |
| 350 |
fillRule: "evenodd", |
| 351 |
d: "M16.57 19.647c-.781.317-1.505.488-2.03.46-.681-.038-.972-.338-.973-.451 0-.08.253-.333 1.037-.39q.186-.013.386-.014c.536 0 1.132.088 1.58.395m1.463 6.907c-2.866.79-5.893.061-7.715-1.859-1.289-1.358-1.721-3.058-1.186-4.664 1.077-3.23 6.237-5.17 9.534-5.17l.106.001c1.229.016 2.08.313 2.22.775.08.26-.107.713-.5 1.213-.691.882-1.743 1.682-2.812 2.268-.678-.743-1.766-1.082-3.157-.982-1.548.113-2.094.864-2.089 1.53.006.726.71 1.5 2.044 1.574.807.044 1.771-.205 2.74-.629.142.558.098 1.29-.134 2.162a.567.567 0 0 0 1.095.292c.316-1.185.34-2.18.071-2.97 1.265-.71 2.434-1.652 3.135-2.545.657-.84.89-1.594.692-2.243-.144-.472-.483-.846-.993-1.112.039-4.26.794-7.202 1.474-7.206h.004c.1 0 .235.023.4.187.553.55 1.211 2.351 1.211 7.82 0 5.396-.462 9.99-6.14 11.558m-5.411-12.586v-.043l-.008-.063c-.082-1.163.058-2.08.412-2.571a.95.95 0 0 1 .696-.412c.416-.05.755.058 1.039.33.55.53.872 1.674.841 2.926-.944.233-1.91.565-2.828.992a12 12 0 0 1-.152-1.159m4.884-1.975c.209-.227.475-.338.815-.338.54 0 .774.177.904.31.31.318.478.934.5 1.831a7.6 7.6 0 0 0-1.055-.069c-.511 0-1.069.045-1.651.13-.025-.823.147-1.493.487-1.864m6.255-5.621c-.34-.339-.755-.517-1.2-.517h-.01c-1.494.009-2.01 2.237-2.268 3.913-.075.491-.134.993-.179 1.479l-.067-.075c-.422-.431-1-.65-1.716-.65-.656 0-1.227.243-1.65.704-.12.131-.224.283-.318.447-.187-.492-.448-.937-.805-1.28-.531-.51-1.21-.732-1.963-.64a2.1 2.1 0 0 0-1.477.874l-.004.007c-.621-3.098-1.802-6.84-3.863-6.625-.507.053-.955.326-1.296.789-1.59 2.16-.843 8.587-.152 12.043a.567.567 0 0 0 1.112-.223c-1.158-5.787-.9-9.989-.046-11.148.2-.273.382-.321.5-.334 1.138-.118 2.54 3.856 3.131 8.872.047.622.141 1.203.232 1.656l.002.006c-1.703.981-3.11 2.324-3.668 4.002-.672 2.016-.148 4.131 1.439 5.803C11.044 27.108 13.329 28 15.729 28c.863 0 1.74-.116 2.604-.354 6.44-1.777 6.973-6.998 6.973-12.65 0-4.837-.491-7.577-1.545-8.624", |
| 352 |
clipRule: "evenodd" |
| 353 |
}))); |
| 354 |
}; |
| 355 |
|
| 356 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi41Njk4IDE5LjY0NzNDMTUuNzg4NSAxOS45NjQzIDE1LjA2NTQgMjAuMTM1MyAxNC41Mzk2IDIwLjEwN0MxMy44NTg2IDIwLjA2OTEgMTMuNTY3OSAxOS43Njg3IDEzLjU2NjggMTkuNjU1N0MxMy41NjYzIDE5LjU3NTMgMTMuODIwMiAxOS4zMjM0IDE0LjYwNCAxOS4yNjY0QzE0LjcyNjkgMTkuMjU3NiAxNC44NTY2IDE5LjI1MiAxNC45OTAyIDE5LjI1MkMxNS41MjU3IDE5LjI1MiAxNi4xMjE3IDE5LjM0MDIgMTYuNTY5OCAxOS42NDczWk0xOC4wMzI2IDI2LjU1MzhDMTUuMTY3NSAyNy4zNDQxIDEyLjEzOTkgMjYuNjE1MiAxMC4zMTgzIDI0LjY5NTNDOS4wMjkxOSAyMy4zMzY4IDguNTk2OTkgMjEuNjM2NyA5LjEzMjE2IDIwLjAzMUMxMC4yMDg4IDE2LjgwMDQgMTUuMzY4NiAxNC44NjEzIDE4LjY2NjIgMTQuODYxM0MxOC43MDE3IDE0Ljg2MTMgMTguNzM3IDE0Ljg2MTQgMTguNzcxOSAxNC44NjJDMjAuMDAwNyAxNC44Nzc3IDIwLjg1MTYgMTUuMTc0NyAyMC45OTI3IDE1LjYzNzVDMjEuMDcxNyAxNS44OTY1IDIwLjg4NDggMTYuMzQ5OCAyMC40OTI3IDE2Ljg0OTlDMTkuODAwNyAxNy43MzIzIDE4Ljc0OTIgMTguNTMyIDE3LjY3OTcgMTkuMTE4NUMxNy4wMDE3IDE4LjM3NDYgMTUuOTE0MSAxOC4wMzYxIDE0LjUyMzEgMTguMTM2M0MxMi45NzQ1IDE4LjI0ODcgMTIuNDI4NyAxOS4wMDAyIDEyLjQzNDMgMTkuNjY1OUMxMi40NDA0IDIwLjM5MTkgMTMuMTQ0MyAyMS4xNjU1IDE0LjQ3NzggMjEuMjM5NkMxNS4yODQ4IDIxLjI4MzcgMTYuMjQ5NCAyMS4wMzUxIDE3LjIxOCAyMC42MTEzQzE3LjM2MDEgMjEuMTY5IDE3LjMxNjEgMjEuOTAwNyAxNy4wODM1IDIyLjc3MzFDMTcuMDAyOSAyMy4wNzU0IDE3LjE4MjcgMjMuMzg2MyAxNy40ODUxIDIzLjQ2NjlDMTcuNzg3MyAyMy41NDc1IDE4LjA5ODEgMjMuMzY3OCAxOC4xNzg5IDIzLjA2NTFDMTguNDk1IDIxLjg3OTcgMTguNTE4NCAyMC44ODU0IDE4LjI1MDIgMjAuMDk1NUMxOS41MTQ4IDE5LjM4NTkgMjAuNjgzOCAxOC40NDMxIDIxLjM4NDcgMTcuNTQ5NkMyMi4wNDI0IDE2LjcxMDkgMjIuMjc1MyAxNS45NTYzIDIyLjA3NzIgMTUuMzA2NkMyMS45MzMzIDE0LjgzNDkgMjEuNTk0NSAxNC40NjA3IDIxLjA4NCAxNC4xOTUzQzIxLjEyMyA5LjkzNTYgMjEuODc4MSA2Ljk5MzI4IDIyLjU1NzkgNi45ODkyNkgyMi41NjJDMjIuNjYxOSA2Ljk4OTI2IDIyLjc5NyA3LjAxMTY0IDIyLjk2MjYgNy4xNzYxNkMyMy41MTQ5IDcuNzI1MTQgMjQuMTczIDkuNTI3MzYgMjQuMTczIDE0Ljk5NjFDMjQuMTczIDIwLjM5MiAyMy43MTExIDI0Ljk4NjIgMTguMDMyNiAyNi41NTM4Wk0xMi42MjE5IDEzLjk2OEMxMi42MjEyIDEzLjk1MzggMTIuNjIzIDEzLjkzOTggMTIuNjIxMiAxMy45MjU1QzEyLjYxODggMTMuOTA1MSAxMi42MTYzIDEzLjg4MzQgMTIuNjEzNyAxMy44NjI0QzEyLjUzMjIgMTIuNjk5MiAxMi42NzE4IDExLjc4MjUgMTMuMDI2NSAxMS4yOTA5QzEzLjIwMjcgMTEuMDQ2OCAxMy40MjM3IDEwLjkxNiAxMy43MjIyIDEwLjg3OTNDMTQuMTM4MyAxMC44MjkyIDE0LjQ3NjggMTAuOTM2NSAxNC43NjEgMTEuMjA5NkMxNS4zMTE2IDExLjczODggMTUuNjMzIDEyLjg4MzEgMTUuNjAyNCAxNC4xMzVDMTQuNjU4NCAxNC4zNjc4IDEzLjY5MTkgMTQuNjk5NSAxMi43NzM3IDE1LjEyNjVDMTIuNzAxMyAxNC43MjAxIDEyLjY1MTMgMTQuMzMzIDEyLjYyMTkgMTMuOTY4Wk0xNy41MDYzIDExLjk5MzFDMTcuNzE1IDExLjc2NTkgMTcuOTgxMyAxMS42NTU0IDE4LjMyMSAxMS42NTU0QzE4Ljg2MDkgMTEuNjU1NCAxOS4wOTU1IDExLjgzMiAxOS4yMjUzIDExLjk2NDlDMTkuNTM1NCAxMi4yODI2IDE5LjcwMjYgMTIuODk4NyAxOS43MjU1IDEzLjc5NkMxOS40MzUxIDEzLjc1NTggMTkuMTIxOSAxMy43MzIzIDE4Ljc4NTUgMTMuNzI4MUMxOC43NDczIDEzLjcyNzYgMTguNzA5MSAxMy43Mjc0IDE4LjY3MDUgMTMuNzI3NEMxOC4xNTg4IDEzLjcyNzQgMTcuNjAxIDEzLjc3MTggMTcuMDE4OCAxMy44NTY1QzE2Ljk5MzcgMTMuMDM0MiAxNy4xNjU1IDEyLjM2NDIgMTcuNTA2MyAxMS45OTMxWk0yMy43NjExIDYuMzcxNTJDMjMuNDIxIDYuMDMzMzggMjMuMDA1OSA1Ljg1NDg4IDIyLjU2MDEgNS44NTQ4OEgyMi41NTAxQzIxLjA1NjUgNS44NjM3OSAyMC41NDEzIDguMDkyMjYgMjAuMjgzNCA5Ljc2NzcxQzIwLjIwNzkgMTAuMjU5NCAyMC4xNDk1IDEwLjc2MTEgMjAuMTA0IDExLjI0NjhDMjAuMDgxOCAxMS4yMjIgMjAuMDU5OSAxMS4xOTYzIDIwLjAzNjcgMTEuMTcyNUMxOS42MTUgMTAuNzQwNSAxOS4wMzc3IDEwLjUyMTQgMTguMzIxIDEwLjUyMTRDMTcuNjY0OSAxMC41MjE0IDE3LjA5NDQgMTAuNzY0OCAxNi42NzEzIDExLjIyNTdDMTYuNTUwNiAxMS4zNTcyIDE2LjQ0NjkgMTEuNTA5NCAxNi4zNTMyIDExLjY3MjdDMTYuMTY2MyAxMS4xODA5IDE1LjkwNSAxMC43MzU2IDE1LjU0NzggMTAuMzkyMUMxNS4wMTcgOS44ODIwNiAxNC4zMzg4IDkuNjYxMjQgMTMuNTg0OSA5Ljc1MzlDMTIuOTc3MyA5LjgyODU2IDEyLjQ2NjYgMTAuMTMwMyAxMi4xMDggMTAuNjI3MkMxMi4xMDY2IDEwLjYyOTUgMTIuMTA1NCAxMC42MzE5IDEyLjEwMzggMTAuNjMzOUMxMS40ODI2IDcuNTM1NzUgMTAuMzAxNiAzLjc5NDc4IDguMjQxIDQuMDA4NzhDNy43MzM5NyA0LjA2MjEgNy4yODU4NyA0LjMzNTAyIDYuOTQ1NDYgNC43OTc2NEM1LjM1NTg1IDYuOTU4NjIgNi4xMDE3IDEzLjM4NDYgNi43OTI4MyAxNi44NDA3QzYuODQ2ODUgMTcuMTEwMSA3LjA4MzQxIDE3LjI5NjcgNy4zNDgxMSAxNy4yOTY3QzcuMzg1IDE3LjI5NjcgNy40MjI0MiAxNy4yOTMgNy40NiAxNy4yODU1QzcuNzY2ODQgMTcuMjI0MSA3Ljk2NTk4IDE2LjkyNTUgNy45MDQ2MSAxNi42MTg1QzYuNzQ3MiAxMC44MzE0IDcuMDA1NDMgNi42Mjk0IDcuODU4ODEgNS40Njk1NEM4LjA1OTM0IDUuMTk2OTcgOC4yNDA2NSA1LjE0ODcxIDguMzU5NzEgNS4xMzYzQzkuNDk3MiA1LjAxNzkzIDEwLjg5ODUgOC45OTIzMSAxMS40OSAxNC4wMDg1QzExLjUzNzQgMTQuNjI5NyAxMS42MzE0IDE1LjIxMTQgMTEuNzIyMiAxNS42NjM1QzExLjcyMjUgMTUuNjY1NiAxMS43MjM2IDE1LjY2NzYgMTEuNzIzOSAxNS42Njk3QzEwLjAyMDUgMTYuNjUxNSA4LjYxNDggMTcuOTk0MSA4LjA1NTY3IDE5LjY3MkM3LjM4MzYgMjEuNjg3NyA3LjkwODI5IDIzLjgwMzEgOS40OTQ5MyAyNS40NzUyQzExLjA0NCAyNy4xMDc1IDEzLjMyOTQgMjggMTUuNzI4NSAyOEMxNi41OTE3IDI3Ljk5OTggMTcuNDY5OSAyNy44ODQzIDE4LjMzMzMgMjcuNjQ2QzI0Ljc3MjcgMjUuODY4NiAyNS4zMDU5IDIwLjY0NzggMjUuMzA1OSAxNC45OTU1QzI1LjMwNTkgMTAuMTU5NSAyNC44MTUgNy40MTkzMSAyMy43NjExIDYuMzcxNTJaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"); |
| 357 |
|
| 358 |
/***/ }, |
| 359 |
|
| 360 |
/***/ "./resources/img/logo-tec.svg" |
| 361 |
/*!************************************!*\ |
| 362 |
!*** ./resources/img/logo-tec.svg ***! |
| 363 |
\************************************/ |
| 364 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 365 |
|
| 366 |
__webpack_require__.r(__webpack_exports__); |
| 367 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 368 |
/* harmony export */ ReactComponent: () => (/* binding */ SvgLogoTec), |
| 369 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 370 |
/* harmony export */ }); |
| 371 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 372 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 373 |
var _path, _path2; |
| 374 |
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } |
| 375 |
|
| 376 |
var SvgLogoTec = function SvgLogoTec(props) { |
| 377 |
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ |
| 378 |
xmlns: "http://www.w3.org/2000/svg", |
| 379 |
width: 46, |
| 380 |
height: 46, |
| 381 |
fill: "none", |
| 382 |
"aria-labelledby": "events-calendar-title" |
| 383 |
}, props), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 384 |
fill: "#3D7BF5", |
| 385 |
d: "M0 9.857C0 4.413 4.413 0 9.857 0h26.286C41.587 0 46 4.413 46 9.857v26.286C46 41.587 41.587 46 36.143 46H9.857C4.413 46 0 41.587 0 36.143z" |
| 386 |
})), _path2 || (_path2 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { |
| 387 |
fill: "#FEFBF2", |
| 388 |
fillRule: "evenodd", |
| 389 |
d: "M12.262 5.513c.834-.086 1.57.232 2.203.802.629.566 1.17 1.388 1.634 2.343.86 1.767 1.485 4.046 1.932 6.163a3.28 3.28 0 0 1 1.98-.97c1.167-.143 2.227.2 3.053.994.44.423.78.941 1.041 1.507q.11-.15.232-.286c.664-.723 1.56-1.103 2.578-1.103.95 0 1.759.254 2.393.769.057-.547.124-1.103.208-1.65l.075-.467c.187-1.109.462-2.341.917-3.345.516-1.14 1.308-2.071 2.543-2.08h.017c.718 0 1.382.29 1.918.824.822.817 1.393 2.256 1.764 4.33.373 2.082.552 4.848.552 8.362 0 4.1-.191 8.091-1.574 11.384-1.393 3.315-3.985 5.906-8.728 7.215a14.5 14.5 0 0 1-3.847.523c-3.54 0-6.926-1.317-9.227-3.742-2.36-2.486-3.152-5.651-2.145-8.672.821-2.464 2.85-4.422 5.282-5.855a20 20 0 0 1-.309-2.256l-.084-.676c-.434-3.353-1.115-6.338-1.878-8.502-.408-1.156-.835-2.065-1.253-2.669q-.315-.452-.592-.65c-.182-.132-.334-.172-.462-.16a.6.6 0 0 0-.222.071 1.1 1.1 0 0 0-.33.313c-.276.376-.523 1.03-.703 1.957-.18.92-.289 2.088-.308 3.47-.038 2.764.285 6.37 1.122 10.555a1.073 1.073 0 1 1-2.104.421c-.503-2.517-1.026-6.117-1.134-9.484-.054-1.684-.005-3.317.205-4.73.21-1.408.583-2.627 1.195-3.46.53-.72 1.241-1.16 2.056-1.246M13.818 33.6c.343.77.84 1.505 1.483 2.183 1.817 1.915 4.462 3.013 7.288 3.14a12 12 0 0 1-1.89-.235c-2.095-.433-3.994-1.425-5.398-2.905a8 8 0 0 1-1.28-1.768 7 7 0 0 1-.202-.416zm19.246-23.263c-.03 0-.094.018-.194.121-.099.104-.21.27-.325.506-.23.473-.456 1.179-.656 2.09-.394 1.791-.677 4.333-.713 7.348.713.405 1.21.967 1.428 1.682.322 1.058-.072 2.24-1.047 3.483-1.01 1.287-2.66 2.628-4.448 3.657.342 1.174.281 2.604-.16 4.257a1.073 1.073 0 0 1-2.072-.552c.292-1.094.367-2.01.252-2.726-1.33.55-2.66.876-3.806.814-2.017-.112-3.191-1.302-3.202-2.531-.004-.556.223-1.14.756-1.602.53-.459 1.349-.785 2.508-.869 1.974-.142 3.582.31 4.64 1.361 1.475-.83 2.902-1.931 3.844-3.132.275-.35.47-.678.584-.953.117-.284.13-.475.099-.58-.066-.216-.325-.455-.863-.643-.523-.183-1.249-.295-2.123-.306h-.15c-2.352 0-5.384.693-8.018 1.968-2.642 1.278-4.832 3.114-5.581 5.363-.744 2.232-.15 4.605 1.665 6.518 2.57 2.71 6.865 3.753 10.947 2.628 4.048-1.118 6.213-3.301 7.38-6.157 1.177-2.878 1.347-6.457 1.347-10.375 0-3.96-.238-6.58-.573-8.303-.336-1.732-.764-2.524-1.11-2.867a.7.7 0 0 0-.24-.17.4.4 0 0 0-.165-.03zM13.289 31.66q.036.33.108.656l-.043-.218a6 6 0 0 1-.065-.438m6.728-3.19c.001.163.42.594 1.398.652-.854-.05-1.281-.386-1.377-.579a.2.2 0 0 1-.021-.073m2.065-.336q-.282 0-.543.02c-.545.04-.888.146-1.086.244a1 1 0 0 0-.146.09.8.8 0 0 0 .173.136c.19.112.502.226.962.251.6.033 1.414-.131 2.33-.458-.514-.21-1.115-.283-1.69-.283m4.482-.778-.58.334c.387-.213.774-.445 1.15-.694zm-2.483-.838q.723.226 1.287.627l-.231-.154a4.6 4.6 0 0 0-1.056-.473m-1.59-.27a9 9 0 0 0-1.089.016c-.702.051-1.262.193-1.7.393l.278-.113c.39-.14.86-.24 1.422-.28a8.6 8.6 0 0 1 1.43.01zm-8.433-1.038a10 10 0 0 0 .354-.357zm16.008-.813c-.503.64-1.135 1.25-1.835 1.807l.258-.21a10.8 10.8 0 0 0 1.576-1.597m-12.84-2.34q.056.331.113.62l.003.008-.002-.008q-.057-.288-.113-.62m14.618-.817q.363.404.521.918l-.09-.25a2.4 2.4 0 0 0-.431-.668m-12.977.657v-.001m1.406-5.915a1.13 1.13 0 0 0-.836.495c-.226.313-.397.781-.494 1.393-.095.606-.117 1.337-.06 2.162l.01.091.004.067v.014q.05.635.163 1.332a23 23 0 0 1 3.663-1.272 8.2 8.2 0 0 0-.286-2.253c-.205-.715-.504-1.276-.86-1.618a1.46 1.46 0 0 0-1.11-.426zM10.98 18.9q.079.685.178 1.4l-.095-.708a55 55 0 0 1-.083-.691m15.874.976a16 16 0 0 0 .568-.011zm.061-2.768c-.43 0-.747.136-.998.409-.394.43-.633 1.218-.642 2.25a17 17 0 0 1 2.318-.151q.577.007 1.096.064c-.06-1.126-.291-1.84-.64-2.198a1.1 1.1 0 0 0-.353-.242c-.17-.073-.417-.132-.78-.132m-.688-1.83a3 3 0 0 0-.482.133 3 3 0 0 0 .649-.162zm-8.327.088-.007.007v.002q.005-.004.006-.01.05-.067.101-.131zm11.863-1.248a30 30 0 0 0-.077.538zm-7.489.43c-.652-.396-1.412-.55-2.232-.45-.44.054-.846.191-1.206.404l.137-.076q.49-.256 1.07-.327c.82-.1 1.579.053 2.232.45m8.283-3.745c-.282.739-.483 1.571-.634 2.374l.098-.484c.137-.648.31-1.3.536-1.89m4.91-.718a7 7 0 0 1 .339.715l-.109-.254a6 6 0 0 0-.23-.46m-2.414-1.645c-1.084.006-1.813.818-2.318 1.932l.098-.205c.5-1.007 1.204-1.721 2.22-1.727M9.846 7.943a9.4 9.4 0 0 0-.502 1.8l.1-.488c.109-.477.242-.918.402-1.312M34.95 9.34q.14.158.268.344l-.132-.18a4 4 0 0 0-.136-.164m-20.879-.497q.034.06.066.122a8 8 0 0 0-.229-.4zm-.848-2.985c1.049.334 1.915 1.415 2.625 2.858-.74-1.502-1.647-2.611-2.753-2.895z", |
| 390 |
clipRule: "evenodd" |
| 391 |
}))); |
| 392 |
}; |
| 393 |
|
| 394 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iNDYiIHZpZXdCb3g9IjAgMCA0NiA0NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiByb2xlPSJpbWciIGFyaWEtbGFiZWxsZWRieT0iZXZlbnRzLWNhbGVuZGFyLXRpdGxlIj4KPHRpdGxlIGlkPSJldmVudHMtY2FsZW5kYXItdGl0bGUiPlRoZSBFdmVudHMgQ2FsZW5kYXIgbG9nbzwvdGl0bGU+CjxwYXRoIGQ9Ik0wIDkuODU3MTRDMCA0LjQxMzE5IDQuNDEzMTkgMCA5Ljg1NzE0IDBIMzYuMTQyOEM0MS41ODY4IDAgNDYgNC40MTMxOSA0NiA5Ljg1NzE0VjM2LjE0MjlDNDYgNDEuNTg2OCA0MS41ODY4IDQ2IDM2LjE0MjggNDZIOS44NTcxNEM0LjQxMzE5IDQ2IDAgNDEuNTg2OCAwIDM2LjE0MjlWOS44NTcxNFoiIGZpbGw9IiMzRDdCRjUiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMi4yNjE4IDUuNTEzMDlDMTMuMDk2MyA1LjQyNjUzIDEzLjgzMTQgNS43NDUwNiAxNC40NjQ5IDYuMzE0ODVDMTUuMDk0IDYuODgwNzUgMTUuNjM0NCA3LjcwMzMzIDE2LjA5ODcgOC42NTc2MkMxNi45NTg2IDEwLjQyNSAxNy41ODQyIDEyLjcwNDMgMTguMDMxMyAxNC44MjA3QzE4LjU1OTEgMTQuMjc5NiAxOS4yMzY4IDEzLjk0NjMgMjAuMDExOCAxMy44NTFDMjEuMTc3OCAxMy43MDc3IDIyLjIzODEgMTQuMDUxMiAyMy4wNjQ1IDE0Ljg0NTFDMjMuNTAzOCAxNS4yNjc3IDIzLjg0MzIgMTUuNzg2MiAyNC4xMDU1IDE2LjM1MkMyNC4xNzc3IDE2LjI1MjYgMjQuMjU0MyAxNi4xNTU5IDI0LjMzNyAxNi4wNjU4QzI1LjAwMDggMTUuMzQyOSAyNS44OTcxIDE0Ljk2MzQgMjYuOTE1MSAxNC45NjMzQzI3Ljg2NDggMTQuOTYzMyAyOC42NzM5IDE1LjIxNzIgMjkuMzA3NyAxNS43MzE4QzI5LjM2NTMgMTUuMTg1MiAyOS40MzE2IDE0LjYyOSAyOS41MTU3IDE0LjA4MTRMMjkuNTkwOSAxMy42MTQ3QzI5Ljc3OCAxMi41MDY0IDMwLjA1MzIgMTEuMjczOCAzMC41MDc5IDEwLjI2OTlDMzEuMDIzOSA5LjEzMDkgMzEuODE1NSA4LjE5ODUzIDMzLjA1MDkgOC4xOTA4MkgzMy4wNjc1QzMzLjc4NTYgOC4xOTA5MiAzNC40NTAxIDguNDgwODEgMzQuOTg2NCA5LjAxNDA3QzM1LjgwNzggOS44MzA5NyAzNi4zNzg4IDExLjI3MDQgMzYuNzUwMSAxMy4zNDMyQzM3LjEyMzEgMTUuNDI1OCAzNy4zMDE4IDE4LjE5MTcgMzcuMzAxOCAyMS43MDY0QzM3LjMwMTggMjUuODA1OCAzNy4xMTA2IDI5Ljc5NzEgMzUuNzI3NiAzMy4wOTAyQzM0LjMzNTMgMzYuNDA1IDMxLjc0MzIgMzguOTk1OCAyNy4wMDAxIDQwLjMwNTFDMjUuNzI1NSA0MC42NTY4IDI0LjQyOCA0MC44MjczIDIzLjE1MzQgNDAuODI3NUMxOS42MTI2IDQwLjgyNzQgMTYuMjI2OCAzOS41MTA4IDEzLjkyNTkgMzcuMDg2M0MxMS41NjY2IDM0LjU5OTkgMTAuNzc0IDMxLjQzNDkgMTEuNzgxMyAyOC40MTM1QzEyLjYwMjIgMjUuOTUgMTQuNjMxNSAyMy45OTIyIDE3LjA2MjYgMjIuNTU5QzE2Ljk0MDUgMjEuOTI0NSAxNi44MTgyIDIxLjEzODkgMTYuNzU0IDIwLjMwMzFMMTYuNjcgMTkuNjI3M0MxNi4yMzU2IDE2LjI3NDQgMTUuNTU1NCAxMy4yODk0IDE0Ljc5MjEgMTEuMTI1NEMxNC4zODQzIDkuOTY5MzMgMTMuOTU3MSA5LjA2MDQzIDEzLjUzOTEgOC40NTY0NUMxMy4zMyA4LjE1NDMzIDEzLjEzMTIgNy45Mzg4NSAxMi45NDczIDcuODA2MDZDMTIuNzY0OSA3LjY3NDM0IDEyLjYxMjUgNy42MzM2NiAxMi40ODU0IDcuNjQ2ODhDMTIuNDIyNSA3LjY1MzQ4IDEyLjM0ODcgNy42NjkxNSAxMi4yNjI4IDcuNzE3MTlDMTIuMTc1MyA3Ljc2NjE4IDEyLjA2MTUgNy44NTU5MiAxMS45MzM3IDguMDI5NjlDMTEuNjU3MiA4LjQwNTY5IDExLjQxMDIgOS4wNTkzNSAxMS4yMjk2IDkuOTg2NzJDMTEuMDUwMiAxMC45MDc2IDEwLjk0MTEgMTIuMDc1NCAxMC45MjE5IDEzLjQ1NzRDMTAuODgzOCAxNi4yMjExIDExLjIwNzEgMTkuODI3MyAxMi4wNDQgMjQuMDEyMUMxMi4xNiAyNC41OTI5IDExLjc4MzggMjUuMTU4NiAxMS4yMDMyIDI1LjI3NDhDMTEuMTMyOCAyNS4yODg5IDExLjA2MTMgMjUuMjk1MyAxMC45OTEzIDI1LjI5NTNDMTAuNDkwNCAyNS4yOTUgMTAuMDQyOCAyNC45NDI1IDkuOTQwNSAyNC40MzNDOS40MzcxMyAyMS45MTU4IDguOTEzOTMgMTguMzE2MSA4LjgwNTc0IDE0Ljk0ODZDOC43NTE2NiAxMy4yNjUxIDguODAwNjEgMTEuNjMxOCA5LjAxMDgyIDEwLjIxODJDOS4yMjAxNSA4LjgxMDggOS41OTM2NCA3LjU5MjA5IDEwLjIwNjEgNi43NTkxOEMxMC43MzU4IDYuMDM5MzkgMTEuNDQ3MSA1LjU5ODk5IDEyLjI2MTggNS41MTMwOVpNMTMuODE4NCAzMy41OTlDMTQuMTYxMSAzNC4zNjgxIDE0LjY1NzggMzUuMTA0IDE1LjMwMDkgMzUuNzgxNkMxNy4xMTgyIDM3LjY5NyAxOS43NjI2IDM4Ljc5NTMgMjIuNTg4OSAzOC45MjIzQzIyLjA3NTEgMzguODk5MiAyMS41NjczIDM4Ljg0MzYgMjEuMDY5NCAzOC43NTcyQzIwLjk0NTEgMzguNzM1NyAyMC44MjE0IDM4LjcxMjQgMjAuNjk4MyAzOC42ODY5QzE4LjYwMzkgMzguMjUzNyAxNi43MDUyIDM3LjI2MTcgMTUuMzAwOSAzNS43ODE2QzE0Ljc3NDcgMzUuMjI3MSAxNC4zNDc0IDM0LjYzMyAxNC4wMjE2IDM0LjAxNDFDMTMuOTQ5MiAzMy44NzY1IDEzLjg4MTcgMzMuNzM3OSAxMy44MTk0IDMzLjU5ODFMMTMuODE4NCAzMy41OTlaTTMzLjA2MzUgMTAuMzM2M0MzMy4wMzQ2IDEwLjMzNjggMzIuOTY5OSAxMC4zNTM5IDMyLjg3MDIgMTAuNDU3NEMzMi43NzExIDEwLjU2MDYgMzIuNjYwMiAxMC43MjY3IDMyLjU0NSAxMC45NjMzQzMyLjMxNTEgMTEuNDM1NSAzMi4wODkgMTIuMTQxNiAzMS44ODg3IDEzLjA1MzFDMzEuNDk1NCAxNC44NDQyIDMxLjIxMTYgMTcuMzg2MyAzMS4xNzU5IDIwLjQwMDhDMzEuODg5IDIwLjgwNjIgMzIuMzg1MiAyMS4zNjgxIDMyLjYwMzYgMjIuMDgzNEMzMi45MjYgMjMuMTQwOSAzMi41MzIgMjQuMzIyMiAzMS41NTY3IDI1LjU2NThDMzAuNTQ2OSAyNi44NTMxIDI4Ljg5NjMgMjguMTk0MSAyNy4xMDg1IDI5LjIyMzFDMjcuNDUxNCAzMC4zOTczIDI3LjM5MDEgMzEuODI2NyAyNi45NDkzIDMzLjQ3OTlDMjYuNzk2NCAzNC4wNTIxIDI2LjIwODUgMzQuMzkzIDI1LjYzNjggMzQuMjQwNkMyNS4wNjQ2IDM0LjA4OCAyNC43MjQ5IDMzLjQ5OTggMjQuODc3IDMyLjkyODFDMjUuMTY4NyAzMS44MzM3IDI1LjI0NDUgMzAuOTE3NCAyNS4xMjkgMzAuMjAxNkMyMy43OTk1IDMwLjc1MTQgMjIuNDY4MiAzMS4wNzg1IDIxLjMyMzMgMzEuMDE2QzE5LjMwNjEgMzAuOTAzNiAxOC4xMzE3IDI5LjcxMzggMTguMTIxMiAyOC40ODQ4QzE4LjExNjYgMjcuOTI5NCAxOC4zNDM4IDI3LjM0NTIgMTguODc3IDI2Ljg4MzJDMTkuNDA3NCAyNi40MjQgMjAuMjI1NyAyNi4wOTgzIDIxLjM4NDggMjYuMDE0MUMyMy4zNTg4IDI1Ljg3MiAyNC45NjczIDI2LjMyNDQgMjYuMDI1NSAyNy4zNzU0QzI3LjUwMDMgMjYuNTQ0MyAyOC45MjcgMjUuNDQzOSAyOS44NjkyIDI0LjI0MjZDMzAuMTQ0IDIzLjg5MjIgMzAuMzM5NyAyMy41NjU0IDMwLjQ1MzIgMjMuMjkwNEMzMC41NzAzIDIzLjAwNjUgMzAuNTgzNiAyMi44MTQ5IDMwLjU1MTggMjIuNzEwNEMzMC40ODU4IDIyLjQ5MzkgMzAuMjI3NSAyMi4yNTQ3IDI5LjY4OTUgMjIuMDY2OEMyOS4xNjYzIDIxLjg4NDIgMjguNDQwNCAyMS43NzI0IDI3LjU2NTUgMjEuNzYxMUMyNy41MTY2IDIxLjc2MDQgMjcuNDY1NiAyMS43NjAyIDI3LjQxNTEgMjEuNzYwMkMyNS4wNjM5IDIxLjc2MDIgMjIuMDMyMyAyMi40NTQyIDE5LjM5NzUgMjMuNzI4OUMxNi43NTU2IDI1LjAwNzIgMTQuNTY2IDI2Ljg0MzEgMTMuODE2NSAyOS4wOTIyQzEzLjA3MyAzMS4zMjM3IDEzLjY2NjMgMzMuNjk2OCAxNS40ODE1IDM1LjYwOThDMTguMDUyMyAzOC4zMTkyIDIyLjM0NjggMzkuMzYzNCAyNi40Mjg4IDM4LjIzNzdDMzAuNDc3IDM3LjEyMDIgMzIuNjQyNCAzNC45MzY3IDMzLjgwOTYgMzIuMDgxNEMzNC45ODY0IDI5LjIwMjcgMzUuMTU2MyAyNS42MjQ1IDM1LjE1NjMgMjEuNzA2NEMzNS4xNTYzIDE3Ljc0NjYgMzQuOTE3NyAxNS4xMjYxIDM0LjU4MzEgMTMuNDAyN0MzNC4yNDY3IDExLjY3MDYgMzMuODE5NSAxMC44Nzk0IDMzLjQ3MzcgMTAuNTM1NkMzMy4zNzQzIDEwLjQzNjcgMzMuMjkzMiAxMC4zODk0IDMzLjIzMjUgMTAuMzY1NkMzMy4xNzI3IDEwLjM0MjMgMzMuMTE5OSAxMC4zMzYzIDMzLjA2ODQgMTAuMzM2M0gzMy4wNjM1Wk0xMy4yODkxIDMxLjY1ODZDMTMuMzEyOSAzMS44Nzg0IDEzLjM0OTMgMzIuMDk3MyAxMy4zOTY2IDMyLjMxNDhMMTMuMzUzNiAzMi4wOTcxQzEzLjMyNzIgMzEuOTUxNCAxMy4zMDUgMzEuODA1MiAxMy4yODkxIDMxLjY1ODZaTTIwLjAxNjcgMjguNDY5MUMyMC4wMTgzIDI4LjYzMjQgMjAuNDM2NiAyOS4wNjMzIDIxLjQxNTEgMjkuMTIxNUMyMC41NjA4IDI5LjA3MDcgMjAuMTMzOSAyOC43MzU1IDIwLjAzODIgMjguNTQyNEMyMC4wMzExIDI4LjUyODIgMjAuMDI2IDI4LjUxNDggMjAuMDIyNSAyOC41MDIzQzIwLjAxOTIgMjguNDkwMyAyMC4wMTY4IDI4LjQ3OTMgMjAuMDE2NyAyOC40NjkxWk0yMi4wODIxIDI4LjEzMzJDMjEuODk1MyAyOC4xMzMyIDIxLjcxMjYgMjguMTQwNCAyMS41MzkxIDI4LjE1MjdDMjAuOTkzOSAyOC4xOTI1IDIwLjY1MDggMjguMjk4NyAyMC40NTMyIDI4LjM5NjlDMjAuMzg2OSAyOC40Mjk4IDIwLjMzOTYgMjguNDYyMyAyMC4zMDY3IDI4LjQ4NzdDMjAuMzQyOCAyOC41MjU0IDIwLjM5ODEgMjguNTc0IDIwLjQ3OTYgMjguNjIyNUMyMC42NjkyIDI4LjczNTMgMjAuOTgyIDI4Ljg0ODcgMjEuNDQxNSAyOC44NzQ0QzIyLjA0MTIgMjguOTA2NyAyMi44NTU3IDI4Ljc0MjUgMjMuNzcxNiAyOC40MTY0QzIzLjI1ODMgMjguMjA1NyAyMi42NTcyIDI4LjEzMzIgMjIuMDgyMSAyOC4xMzMyWk0yNi41NjM1IDI3LjM1NDlMMjUuOTgzNSAyNy42ODg5QzI2LjM3MTQgMjcuNDc2MSAyNi43NTc5IDI3LjI0NCAyNy4xMzQ4IDI2Ljk5NTVMMjYuNTYzNSAyNy4zNTQ5Wk0yNC4wODExIDI2LjUxN0MyNC41NjIyIDI2LjY2NjcgMjQuOTkyOCAyNi44NzYxIDI1LjM2ODIgMjcuMTQzOUwyNS4xMzY4IDI2Ljk4OTdDMjQuODE4OSAyNi43OTQxIDI0LjQ2NiAyNi42MzY4IDI0LjA4MTEgMjYuNTE3Wk0yMi40OTEzIDI2LjI0NzVDMjIuMTQ0NiAyNi4yMzAyIDIxLjc4MTEgMjYuMjM1OCAyMS40MDI0IDI2LjI2MzFDMjAuNzAwMyAyNi4zMTQxIDIwLjE0MDIgMjYuNDU1NiAxOS43MDIyIDI2LjY1NTdMMTkuOTc5NiAyNi41NDM0QzIwLjM2OTcgMjYuNDAzMSAyMC44NDA2IDI2LjMwMzkgMjEuNDAyNCAyNi4yNjMxQzIxLjkwNzIgMjYuMjI2NyAyMi4zODQ4IDI2LjIzMDQgMjIuODMyMSAyNi4yNzI5TDIyLjQ5MTMgMjYuMjQ3NVpNMTQuMDU3NyAyNS4yMDk0QzEzLjcxMjcgMjUuNTcyOSAxMy4zOTY4IDI1Ljk1NDIgMTMuMTE1MyAyNi4zNTI5QzEzLjQ5MDYgMjUuODIxMyAxMy45MjcgMjUuMzIwNyAxNC40MTIyIDI0Ljg1MkwxNC4wNTc3IDI1LjIwOTRaTTMwLjA2NTUgMjQuMzk1OUMyOS41NjM0IDI1LjAzNjEgMjguOTMxNCAyNS42NDY4IDI4LjIzMDUgMjYuMjAzNUwyOC40ODkzIDI1Ljk5MjZDMjkuMDg2OSAyNS40OTQyIDI5LjYyNjEgMjQuOTU2MSAzMC4wNjU1IDI0LjM5NTlaTTE3LjIyNjYgMjIuMDU2MUMxNy4yNjQgMjIuMjc2MSAxNy4zMDA2IDIyLjQ4MzkgMTcuMzM4OSAyMi42NzUyQzE3LjMzOTUgMjIuNjc4MSAxNy4zNDEzIDIyLjY4MTEgMTcuMzQxOSAyMi42ODRDMTcuMzQxNCAyMi42ODExIDE3LjM0MDUgMjIuNjc5MSAxNy4zMzk5IDIyLjY3NjJDMTcuMzAxNSAyMi40ODQ2IDE3LjI2NDEgMjIuMjc2NCAxNy4yMjY2IDIyLjA1NjFaTTMxLjg0MzggMjEuMjM4N0MzMi4wODU0IDIxLjUwOCAzMi4yNjA5IDIxLjgxNDUgMzIuMzY1MyAyMi4xNTY2TDMyLjI3NDUgMjEuOTA2NkMzMi4xNjk4IDIxLjY2MzMgMzIuMDI1MSAyMS40NDA4IDMxLjg0MzggMjEuMjM4N1pNMTguODY3MyAyMS44OTU5QzE5LjM2NjggMjEuNjYzNyAxOS44NzU5IDIxLjQ1MDMgMjAuMzg5NyAyMS4yNTcyQzE5Ljg3NTcgMjEuNDUwMyAxOS4zNjU5IDIxLjY2MjYgMTguODY2MyAyMS44OTQ5TDE4Ljg2NzMgMjEuODk1OVpNMjAuMjczNSAxNS45ODA5QzE5LjkxIDE2LjAyNTcgMTkuNjUxNSAxNi4xNzg0IDE5LjQzNjYgMTYuNDc2QzE5LjIxMSAxNi43ODg3IDE5LjA0MDMgMTcuMjU3NCAxOC45NDM0IDE3Ljg2OTVDMTguODQ3NiAxOC40NzU0IDE4LjgyNTkgMTkuMjA1NyAxOC44ODI5IDIwLjAzMDdMMTguODkzNiAyMC4xMjI1TDE4Ljg5NjYgMjAuMTg4OUMxOC44OTY0IDIwLjE5NzEgMTguODk2NiAyMC4xOTg1IDE4Ljg5NjYgMjAuMjAyNUMxOC45MzA4IDIwLjYyNTggMTguOTg1IDIxLjA3MDYgMTkuMDU5NiAyMS41MzQ2QzIwLjI1NTggMjEuMDAwNSAyMS41MDA1IDIwLjU3NTYgMjIuNzIyNyAyMC4yNjMxQzIyLjcyNjUgMTkuNDQ1NyAyMi42MjUzIDE4LjY3MDcgMjIuNDM2NiAxOC4wMTAyQzIyLjIzMjMgMTcuMjk1MiAyMS45MzMgMTYuNzM0IDIxLjU3NzIgMTYuMzkyQzIxLjI2NyAxNi4wOTQxIDIwLjkxMDUgMTUuOTUzNSAyMC40Njc4IDE1Ljk2NjJMMjAuMjczNSAxNS45ODA5Wk0xMC45Nzk2IDE4LjkwMThDMTEuMDMxOSAxOS4zNTc2IDExLjA5MTYgMTkuODI0MiAxMS4xNTgzIDIwLjMwMTJMMTEuMDYzNSAxOS41OTMyQzExLjAzMzggMTkuMzYgMTEuMDA1NyAxOS4xMjk2IDEwLjk3OTYgMTguOTAxOFpNMjYuODUzNiAxOS44NzczQzI2LjY2MDIgMTkuODg1MyAyNi40NjMxIDE5Ljg5NzcgMjYuMjYyOCAxOS45MTM1QzI2LjY2MzIgMTkuODgyIDI3LjA1MDkgMTkuODY1NyAyNy40MjE5IDE5Ljg2NTZMMjYuODUzNiAxOS44NzczWk0yNi45MTUxIDE3LjEwODhDMjYuNDg0NiAxNy4xMDg5IDI2LjE2NzYgMTcuMjQ1NCAyNS45MTcxIDE3LjUxOEMyNS41MjMxIDE3Ljk0NzUgMjUuMjg0MSAxOC43MzU2IDI1LjI3NTUgMTkuNzY4QzI2LjAyNzIgMTkuNjY5NCAyNi43NTAyIDE5LjYxNTcgMjcuNDIxOSAxOS42MTU2QzI3LjQ3ODYgMTkuNjE1NiAyNy41MzU5IDE5LjYxNTggMjcuNTkyOCAxOS42MTY2QzI3Ljk3NzkgMTkuNjIxNCAyOC4zNDM2IDE5LjY0MzcgMjguNjg5NSAxOS42ODExQzI4LjYyOTYgMTguNTU1NSAyOC4zOTggMTcuODQwNyAyOC4wNDg5IDE3LjQ4MjhDMjcuOTcxMSAxNy40MDMyIDI3Ljg2NDkgMTcuMzEyNiAyNy42OTY0IDE3LjI0MDZDMjcuNTI2IDE3LjE2OCAyNy4yNzkgMTcuMTA4OCAyNi45MTUxIDE3LjEwODhaTTI2LjIyNjYgMTUuMjc4N0MyNi4xMTU5IDE1LjMwMDUgMjYuMDA3NCAxNS4zMjczIDI1LjkwMTQgMTUuMzU5OEMyNS44NDg3IDE1LjM3NTkgMjUuNzk2NyAxNS4zOTM3IDI1Ljc0NTIgMTUuNDEyNUMyNS41MTMzIDE1LjQ5NzIgMjUuMjk1MSAxNS42MDk2IDI1LjA5MDkgMTUuNzQ2NUMyNS40NzY3IDE1LjQ4NzkgMjUuOTE1MSAxNS4zMTk5IDI2LjM5MzYgMTUuMjUwNEwyNi4yMjY2IDE1LjI3ODdaTTE3Ljg5OTUgMTUuMzY2NkMxNy44OTc3IDE1LjM2OTUgMTcuODk0NyAxNS4zNzE5IDE3Ljg5MjcgMTUuMzc0NEwxNy44OTM2IDE1LjM3NjRDMTcuODk1NyAxNS4zNzM3IDE3Ljg5NzYgMTUuMzY5NyAxNy44OTk1IDE1LjM2NjZDMTcuOTMyMSAxNS4zMjE0IDE3Ljk2NTcgMTUuMjc3OCAxOC4wMDAxIDE1LjIzNDhMMTcuODk5NSAxNS4zNjY2Wk0yOS43NjI4IDE0LjExOTVDMjkuNzM1NCAxNC4yOTc4IDI5LjcwOTkgMTQuNDc3MSAyOS42ODU2IDE0LjY1NjZMMjkuNzYyOCAxNC4xMTk1Wk0yMi4yNzQ1IDE0LjU0OTJDMjEuNjIxNSAxNC4xNTMyIDIwLjg2MjQgMTMuOTk4MiAyMC4wNDIxIDE0LjA5OUMxOS42MDE1IDE0LjE1MzIgMTkuMTk2MyAxNC4yOTAyIDE4LjgzNiAxNC41MDMzTDE4Ljk3MjcgMTQuNDI3MkMxOS4yOTc5IDE0LjI1NzUgMTkuNjU3MyAxNC4xNDc0IDIwLjA0MyAxNC4xQzIwLjg2MzEgMTMuOTk5MyAyMS42MjE3IDE0LjE1MzUgMjIuMjc0NSAxNC41NDkyWk0zMC41NTY3IDEwLjgwNDFDMzAuMjc0OSAxMS41NDI5IDMwLjA3NDIgMTIuMzc1MSAyOS45MjI5IDEzLjE3ODFMMzAuMDIwNiAxMi42OTM4QzMwLjE1ODMgMTIuMDQ2MyAzMC4zMzE1IDExLjM5NDggMzAuNTU2NyAxMC44MDQxWk0zNS40Njc4IDEwLjA4NjNDMzUuNTg3NSAxMC4zMDIxIDM1LjcwMDEgMTAuNTQwMiAzNS44MDU3IDEwLjgwMTJMMzUuNjk3MyAxMC41NDczQzM1LjYyMzkgMTAuMzgzNiAzNS41NDc1IDEwLjIzIDM1LjQ2NzggMTAuMDg2M1pNMzMuMDUyOCA4LjQ0MDgyQzMxLjk2OTEgOC40NDc0OSAzMS4yNDAyIDkuMjU5MjEgMzAuNzM1NCAxMC4zNzM0TDMwLjgzMzEgMTAuMTY4NEMzMS4zMzI5IDkuMTYxMzcgMzIuMDM2OSA4LjQ0Njk1IDMzLjA1MjggOC40NDA4MlpNOS44NDU3OCA3Ljk0Mjc4QzkuNjMyOTMgOC40Njg1MSA5LjQ2NzYyIDkuMDc1NTMgOS4zNDM4MiA5Ljc0MzU2TDkuNDQ0NDEgOS4yNTUyOEM5LjU1MyA4Ljc3ODAzIDkuNjg2MTQgOC4zMzcxIDkuODQ1NzggNy45NDI3OFpNMzQuOTUxMiA5LjM0MDI0QzM1LjA0MzcgOS40NDQ5NyAzNS4xMzI3IDkuNTU5NzQgMzUuMjE4OCA5LjY4Mzk5TDM1LjA4NyA5LjUwNDNDMzUuMDQyNSA5LjQ0NzI1IDM0Ljk5NzMgOS4zOTI0NiAzNC45NTEyIDkuMzQwMjRaTTE0LjA3MjMgOC44NDMxN0MxNC4wOTQ2IDguODgyOTEgMTQuMTE1NiA4LjkyNDAyIDE0LjEzNzggOC45NjUyNEMxNC4wNjEzIDguODIzMTcgMTMuOTg2IDguNjg5MDcgMTMuOTA5MyA4LjU2NDg1TDE0LjA3MjMgOC44NDMxN1pNMTMuMjIzNyA1Ljg1NzgyQzE0LjI3MjYgNi4xOTE4NCAxNS4xMzg1IDcuMjcyNzIgMTUuODQ4NyA4LjcxNjIyQzE1LjEwOTkgNy4yMTQyMiAxNC4yMDI0IDYuMTA0OTQgMTMuMDk1OCA1LjgyMDcxTDEzLjIyMzcgNS44NTc4MloiIGZpbGw9IiNGRUZCRjIiLz4KPC9zdmc+Cg=="); |
| 395 |
|
| 396 |
/***/ }, |
| 397 |
|
| 398 |
/***/ "./node_modules/aria-hidden/dist/es2015/index.js" |
| 399 |
/*!*******************************************************!*\ |
| 400 |
!*** ./node_modules/aria-hidden/dist/es2015/index.js ***! |
| 401 |
\*******************************************************/ |
| 402 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 403 |
|
| 404 |
__webpack_require__.r(__webpack_exports__); |
| 405 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 406 |
/* harmony export */ hideOthers: () => (/* binding */ hideOthers), |
| 407 |
/* harmony export */ inertOthers: () => (/* binding */ inertOthers), |
| 408 |
/* harmony export */ supportsInert: () => (/* binding */ supportsInert), |
| 409 |
/* harmony export */ suppressOthers: () => (/* binding */ suppressOthers) |
| 410 |
/* harmony export */ }); |
| 411 |
var getDefaultParent = function (originalTarget) { |
| 412 |
if (typeof document === 'undefined') { |
| 413 |
return null; |
| 414 |
} |
| 415 |
var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget; |
| 416 |
return sampleTarget.ownerDocument.body; |
| 417 |
}; |
| 418 |
var counterMap = new WeakMap(); |
| 419 |
var uncontrolledNodes = new WeakMap(); |
| 420 |
var markerMap = {}; |
| 421 |
var lockCount = 0; |
| 422 |
var unwrapHost = function (node) { |
| 423 |
return node && (node.host || unwrapHost(node.parentNode)); |
| 424 |
}; |
| 425 |
var correctTargets = function (parent, targets) { |
| 426 |
return targets |
| 427 |
.map(function (target) { |
| 428 |
if (parent.contains(target)) { |
| 429 |
return target; |
| 430 |
} |
| 431 |
var correctedTarget = unwrapHost(target); |
| 432 |
if (correctedTarget && parent.contains(correctedTarget)) { |
| 433 |
return correctedTarget; |
| 434 |
} |
| 435 |
console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing'); |
| 436 |
return null; |
| 437 |
}) |
| 438 |
.filter(function (x) { return Boolean(x); }); |
| 439 |
}; |
| 440 |
/** |
| 441 |
* Marks everything except given node(or nodes) as aria-hidden |
| 442 |
* @param {Element | Element[]} originalTarget - elements to keep on the page |
| 443 |
* @param [parentNode] - top element, defaults to document.body |
| 444 |
* @param {String} [markerName] - a special attribute to mark every node |
| 445 |
* @param {String} [controlAttribute] - html Attribute to control |
| 446 |
* @return {Undo} undo command |
| 447 |
*/ |
| 448 |
var applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) { |
| 449 |
var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]); |
| 450 |
if (!markerMap[markerName]) { |
| 451 |
markerMap[markerName] = new WeakMap(); |
| 452 |
} |
| 453 |
var markerCounter = markerMap[markerName]; |
| 454 |
var hiddenNodes = []; |
| 455 |
var elementsToKeep = new Set(); |
| 456 |
var elementsToStop = new Set(targets); |
| 457 |
var keep = function (el) { |
| 458 |
if (!el || elementsToKeep.has(el)) { |
| 459 |
return; |
| 460 |
} |
| 461 |
elementsToKeep.add(el); |
| 462 |
keep(el.parentNode); |
| 463 |
}; |
| 464 |
targets.forEach(keep); |
| 465 |
var deep = function (parent) { |
| 466 |
if (!parent || elementsToStop.has(parent)) { |
| 467 |
return; |
| 468 |
} |
| 469 |
Array.prototype.forEach.call(parent.children, function (node) { |
| 470 |
if (elementsToKeep.has(node)) { |
| 471 |
deep(node); |
| 472 |
} |
| 473 |
else { |
| 474 |
try { |
| 475 |
var attr = node.getAttribute(controlAttribute); |
| 476 |
var alreadyHidden = attr !== null && attr !== 'false'; |
| 477 |
var counterValue = (counterMap.get(node) || 0) + 1; |
| 478 |
var markerValue = (markerCounter.get(node) || 0) + 1; |
| 479 |
counterMap.set(node, counterValue); |
| 480 |
markerCounter.set(node, markerValue); |
| 481 |
hiddenNodes.push(node); |
| 482 |
if (counterValue === 1 && alreadyHidden) { |
| 483 |
uncontrolledNodes.set(node, true); |
| 484 |
} |
| 485 |
if (markerValue === 1) { |
| 486 |
node.setAttribute(markerName, 'true'); |
| 487 |
} |
| 488 |
if (!alreadyHidden) { |
| 489 |
node.setAttribute(controlAttribute, 'true'); |
| 490 |
} |
| 491 |
} |
| 492 |
catch (e) { |
| 493 |
console.error('aria-hidden: cannot operate on ', node, e); |
| 494 |
} |
| 495 |
} |
| 496 |
}); |
| 497 |
}; |
| 498 |
deep(parentNode); |
| 499 |
elementsToKeep.clear(); |
| 500 |
lockCount++; |
| 501 |
return function () { |
| 502 |
hiddenNodes.forEach(function (node) { |
| 503 |
var counterValue = counterMap.get(node) - 1; |
| 504 |
var markerValue = markerCounter.get(node) - 1; |
| 505 |
counterMap.set(node, counterValue); |
| 506 |
markerCounter.set(node, markerValue); |
| 507 |
if (!counterValue) { |
| 508 |
if (!uncontrolledNodes.has(node)) { |
| 509 |
node.removeAttribute(controlAttribute); |
| 510 |
} |
| 511 |
uncontrolledNodes.delete(node); |
| 512 |
} |
| 513 |
if (!markerValue) { |
| 514 |
node.removeAttribute(markerName); |
| 515 |
} |
| 516 |
}); |
| 517 |
lockCount--; |
| 518 |
if (!lockCount) { |
| 519 |
// clear |
| 520 |
counterMap = new WeakMap(); |
| 521 |
counterMap = new WeakMap(); |
| 522 |
uncontrolledNodes = new WeakMap(); |
| 523 |
markerMap = {}; |
| 524 |
} |
| 525 |
}; |
| 526 |
}; |
| 527 |
/** |
| 528 |
* Marks everything except given node(or nodes) as aria-hidden |
| 529 |
* @param {Element | Element[]} originalTarget - elements to keep on the page |
| 530 |
* @param [parentNode] - top element, defaults to document.body |
| 531 |
* @param {String} [markerName] - a special attribute to mark every node |
| 532 |
* @return {Undo} undo command |
| 533 |
*/ |
| 534 |
var hideOthers = function (originalTarget, parentNode, markerName) { |
| 535 |
if (markerName === void 0) { markerName = 'data-aria-hidden'; } |
| 536 |
var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]); |
| 537 |
var activeParentNode = parentNode || getDefaultParent(originalTarget); |
| 538 |
if (!activeParentNode) { |
| 539 |
return function () { return null; }; |
| 540 |
} |
| 541 |
// we should not hide aria-live elements - https://github.com/theKashey/aria-hidden/issues/10 |
| 542 |
// and script elements, as they have no impact on accessibility. |
| 543 |
targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live], script'))); |
| 544 |
return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden'); |
| 545 |
}; |
| 546 |
/** |
| 547 |
* Marks everything except given node(or nodes) as inert |
| 548 |
* @param {Element | Element[]} originalTarget - elements to keep on the page |
| 549 |
* @param [parentNode] - top element, defaults to document.body |
| 550 |
* @param {String} [markerName] - a special attribute to mark every node |
| 551 |
* @return {Undo} undo command |
| 552 |
*/ |
| 553 |
var inertOthers = function (originalTarget, parentNode, markerName) { |
| 554 |
if (markerName === void 0) { markerName = 'data-inert-ed'; } |
| 555 |
var activeParentNode = parentNode || getDefaultParent(originalTarget); |
| 556 |
if (!activeParentNode) { |
| 557 |
return function () { return null; }; |
| 558 |
} |
| 559 |
return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert'); |
| 560 |
}; |
| 561 |
/** |
| 562 |
* @returns if current browser supports inert |
| 563 |
*/ |
| 564 |
var supportsInert = function () { |
| 565 |
return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert'); |
| 566 |
}; |
| 567 |
/** |
| 568 |
* Automatic function to "suppress" DOM elements - _hide_ or _inert_ in the best possible way |
| 569 |
* @param {Element | Element[]} originalTarget - elements to keep on the page |
| 570 |
* @param [parentNode] - top element, defaults to document.body |
| 571 |
* @param {String} [markerName] - a special attribute to mark every node |
| 572 |
* @return {Undo} undo command |
| 573 |
*/ |
| 574 |
var suppressOthers = function (originalTarget, parentNode, markerName) { |
| 575 |
if (markerName === void 0) { markerName = 'data-suppressed'; } |
| 576 |
return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName); |
| 577 |
}; |
| 578 |
|
| 579 |
|
| 580 |
/***/ }, |
| 581 |
|
| 582 |
/***/ "./resources/js/App.tsx" |
| 583 |
/*!******************************!*\ |
| 584 |
!*** ./resources/js/App.tsx ***! |
| 585 |
\******************************/ |
| 586 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 587 |
|
| 588 |
__webpack_require__.r(__webpack_exports__); |
| 589 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 590 |
/* harmony export */ App: () => (/* binding */ App) |
| 591 |
/* harmony export */ }); |
| 592 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 593 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 594 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 595 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); |
| 596 |
/* harmony import */ var _components_templates_AppShell__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/templates/AppShell */ "./resources/js/components/templates/AppShell.tsx"); |
| 597 |
/* harmony import */ var _components_organisms_AppLoader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/organisms/AppLoader */ "./resources/js/components/organisms/AppLoader.tsx"); |
| 598 |
/* harmony import */ var _components_organisms_WelcomeScreen__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/organisms/WelcomeScreen */ "./resources/js/components/organisms/WelcomeScreen.tsx"); |
| 599 |
/* harmony import */ var _components_ui_toast__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/ui/toast */ "./resources/js/components/ui/toast.tsx"); |
| 600 |
/* harmony import */ var _components_atoms_ErrorBoundary__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/atoms/ErrorBoundary */ "./resources/js/components/atoms/ErrorBoundary.tsx"); |
| 601 |
/* harmony import */ var _components_organisms_ErrorModal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/organisms/ErrorModal */ "./resources/js/components/organisms/ErrorModal.tsx"); |
| 602 |
/* harmony import */ var _context_toast_context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/context/toast-context */ "./resources/js/context/toast-context.tsx"); |
| 603 |
/* harmony import */ var _context_filter_context__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/context/filter-context */ "./resources/js/context/filter-context.tsx"); |
| 604 |
/* harmony import */ var _context_error_modal_context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/context/error-modal-context */ "./resources/js/context/error-modal-context.tsx"); |
| 605 |
/* harmony import */ var _context_harbor_data_context__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/context/harbor-data-context */ "./resources/js/context/harbor-data-context.tsx"); |
| 606 |
/* harmony import */ var _context_reload_banner_context__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/context/reload-banner-context */ "./resources/js/context/reload-banner-context.tsx"); |
| 607 |
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/store */ "./resources/js/store/index.ts"); |
| 608 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 609 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__); |
| 610 |
/** |
| 611 |
* @package LiquidWeb\Harbor |
| 612 |
*/ |
| 613 |
|
| 614 |
|
| 615 |
|
| 616 |
|
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
|
| 624 |
|
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
function AppContent() { |
| 630 |
const { |
| 631 |
isLicenseLoading |
| 632 |
} = (0,_context_harbor_data_context__WEBPACK_IMPORTED_MODULE_11__.useHarborData)(); |
| 633 |
const hasLicense = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => select(_store__WEBPACK_IMPORTED_MODULE_13__.store).hasLicense(), []); |
| 634 |
|
| 635 |
// Latch: once we've ever seen a license during this mount, stay in |
| 636 |
// AppShell. Guards against license removal and transient refresh |
| 637 |
// failures bouncing the user back to the welcome screen. Mirrors the |
| 638 |
// hasEverResolvedRef pattern in harbor-data-context.tsx. |
| 639 |
const hasEverHadLicenseRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false); |
| 640 |
if (hasLicense) { |
| 641 |
hasEverHadLicenseRef.current = true; |
| 642 |
} |
| 643 |
if (hasEverHadLicenseRef.current) return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_templates_AppShell__WEBPACK_IMPORTED_MODULE_2__.AppShell, {}); |
| 644 |
if (isLicenseLoading) return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_organisms_AppLoader__WEBPACK_IMPORTED_MODULE_3__.AppLoader, {}); |
| 645 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_organisms_WelcomeScreen__WEBPACK_IMPORTED_MODULE_4__.WelcomeScreen, {}); |
| 646 |
} |
| 647 |
const App = () => { |
| 648 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_context_toast_context__WEBPACK_IMPORTED_MODULE_8__.ToastProvider, { |
| 649 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_context_reload_banner_context__WEBPACK_IMPORTED_MODULE_12__.ReloadBannerProvider, { |
| 650 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_context_filter_context__WEBPACK_IMPORTED_MODULE_9__.FilterProvider, { |
| 651 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_context_error_modal_context__WEBPACK_IMPORTED_MODULE_10__.ErrorModalProvider, { |
| 652 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(_context_harbor_data_context__WEBPACK_IMPORTED_MODULE_11__.HarborDataProvider, { |
| 653 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(_components_atoms_ErrorBoundary__WEBPACK_IMPORTED_MODULE_6__.ErrorBoundary, { |
| 654 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(AppContent, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_ui_toast__WEBPACK_IMPORTED_MODULE_5__.Toaster, {})] |
| 655 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_organisms_ErrorModal__WEBPACK_IMPORTED_MODULE_7__.ErrorModal, {})] |
| 656 |
}) |
| 657 |
}) |
| 658 |
}) |
| 659 |
}) |
| 660 |
}); |
| 661 |
}; |
| 662 |
|
| 663 |
/***/ }, |
| 664 |
|
| 665 |
/***/ "./resources/js/components/atoms/ErrorBoundary.tsx" |
| 666 |
/*!*********************************************************!*\ |
| 667 |
!*** ./resources/js/components/atoms/ErrorBoundary.tsx ***! |
| 668 |
\*********************************************************/ |
| 669 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 670 |
|
| 671 |
__webpack_require__.r(__webpack_exports__); |
| 672 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 673 |
/* harmony export */ ErrorBoundary: () => (/* binding */ ErrorBoundary) |
| 674 |
/* harmony export */ }); |
| 675 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 676 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 677 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 678 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 679 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 680 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__); |
| 681 |
/** |
| 682 |
* React error boundary. |
| 683 |
* |
| 684 |
* Wrap any subtree to prevent a render crash from taking down the whole page. |
| 685 |
* Used in App.tsx and around each tab panel in AppShell.tsx. |
| 686 |
* |
| 687 |
* @package LiquidWeb\Harbor |
| 688 |
*/ |
| 689 |
|
| 690 |
|
| 691 |
|
| 692 |
/** |
| 693 |
* @since 1.0.0 |
| 694 |
*/ |
| 695 |
class ErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_0__.Component { |
| 696 |
state = { |
| 697 |
hasError: false |
| 698 |
}; |
| 699 |
static getDerivedStateFromError() { |
| 700 |
return { |
| 701 |
hasError: true |
| 702 |
}; |
| 703 |
} |
| 704 |
render() { |
| 705 |
if (this.state.hasError) { |
| 706 |
return this.props.fallback ?? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("p", { |
| 707 |
className: "px-4 py-6 text-sm text-muted-foreground text-center", |
| 708 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('An unexpected error occurred. Please reload the page.', '%TEXTDOMAIN%') |
| 709 |
}); |
| 710 |
} |
| 711 |
return this.props.children; |
| 712 |
} |
| 713 |
} |
| 714 |
|
| 715 |
/***/ }, |
| 716 |
|
| 717 |
/***/ "./resources/js/components/atoms/ErrorItem.tsx" |
| 718 |
/*!*****************************************************!*\ |
| 719 |
!*** ./resources/js/components/atoms/ErrorItem.tsx ***! |
| 720 |
\*****************************************************/ |
| 721 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 722 |
|
| 723 |
__webpack_require__.r(__webpack_exports__); |
| 724 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 725 |
/* harmony export */ ErrorItem: () => (/* binding */ ErrorItem) |
| 726 |
/* harmony export */ }); |
| 727 |
/* harmony import */ var _errors_harbor_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/errors/harbor-error */ "./resources/js/errors/harbor-error.ts"); |
| 728 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 729 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__); |
| 730 |
/** |
| 731 |
* Displays a HarborError as a bullet item, recursively nesting the cause |
| 732 |
* chain beneath the top-level message. |
| 733 |
* |
| 734 |
* @package LiquidWeb\Harbor |
| 735 |
*/ |
| 736 |
|
| 737 |
|
| 738 |
/** |
| 739 |
* @since 1.0.0 |
| 740 |
*/ |
| 741 |
function ErrorItem({ |
| 742 |
error, |
| 743 |
nested = false |
| 744 |
}) { |
| 745 |
const cause = error.cause instanceof _errors_harbor_error__WEBPACK_IMPORTED_MODULE_0__["default"] ? error.cause : null; |
| 746 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li", { |
| 747 |
className: "flex flex-col gap-2 m-0", |
| 748 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span", { |
| 749 |
className: `flex items-start gap-2 text-sm ${nested ? 'text-muted-foreground' : 'font-medium text-foreground'}`, |
| 750 |
children: [!nested && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", { |
| 751 |
className: "mt-1.5 shrink-0 w-1.5 h-1.5 rounded-full bg-destructive", |
| 752 |
"aria-hidden": "true" |
| 753 |
}), error.message] |
| 754 |
}), cause && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul", { |
| 755 |
className: "ml-4 space-y-1 border-l-2 border-border pl-4", |
| 756 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(ErrorItem, { |
| 757 |
error: cause, |
| 758 |
nested: true |
| 759 |
}) |
| 760 |
})] |
| 761 |
}); |
| 762 |
} |
| 763 |
|
| 764 |
/***/ }, |
| 765 |
|
| 766 |
/***/ "./resources/js/components/atoms/FeatureIcon.tsx" |
| 767 |
/*!*******************************************************!*\ |
| 768 |
!*** ./resources/js/components/atoms/FeatureIcon.tsx ***! |
| 769 |
\*******************************************************/ |
| 770 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 771 |
|
| 772 |
__webpack_require__.r(__webpack_exports__); |
| 773 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 774 |
/* harmony export */ FeatureIcon: () => (/* binding */ FeatureIcon) |
| 775 |
/* harmony export */ }); |
| 776 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 777 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); |
| 778 |
|
| 779 |
/** |
| 780 |
* Feature icon resolved from a slug-based SVG asset. |
| 781 |
* |
| 782 |
* Renders a 32×32 placeholder box until per-feature SVG assets are |
| 783 |
* provided by the design team and added to resources/js/img/. |
| 784 |
* |
| 785 |
* @package LiquidWeb\Harbor |
| 786 |
*/ |
| 787 |
|
| 788 |
// Feature logo assets are added here as they are delivered by design. |
| 789 |
// Key: feature slug. Value: imported SVG URL. |
| 790 |
const FEATURE_LOGOS = {}; |
| 791 |
/** |
| 792 |
* @since 1.0.0 |
| 793 |
*/ |
| 794 |
function FeatureIcon({ |
| 795 |
slug |
| 796 |
}) { |
| 797 |
const src = FEATURE_LOGOS[slug]; |
| 798 |
if (!src) { |
| 799 |
return null; |
| 800 |
} |
| 801 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { |
| 802 |
src: src, |
| 803 |
alt: "", |
| 804 |
className: "shrink-0 rounded w-8 h-8" |
| 805 |
}); |
| 806 |
} |
| 807 |
|
| 808 |
/***/ }, |
| 809 |
|
| 810 |
/***/ "./resources/js/components/atoms/LicenseBadge.tsx" |
| 811 |
/*!********************************************************!*\ |
| 812 |
!*** ./resources/js/components/atoms/LicenseBadge.tsx ***! |
| 813 |
\********************************************************/ |
| 814 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 815 |
|
| 816 |
__webpack_require__.r(__webpack_exports__); |
| 817 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 818 |
/* harmony export */ LicenseBadge: () => (/* binding */ LicenseBadge) |
| 819 |
/* harmony export */ }); |
| 820 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 821 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 822 |
/* harmony import */ var _components_ui_badge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/ui/badge */ "./resources/js/components/ui/badge.tsx"); |
| 823 |
/* harmony import */ var _lib_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/lib/utils */ "./resources/js/lib/utils.ts"); |
| 824 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 825 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); |
| 826 |
/** |
| 827 |
* Unified badge for all license-related states. |
| 828 |
* |
| 829 |
* Covers tier name, unlicensed, legacy, and free indicators so that |
| 830 |
* all license badge rendering flows through a single atom. |
| 831 |
* |
| 832 |
* @package LiquidWeb\Harbor |
| 833 |
*/ |
| 834 |
|
| 835 |
|
| 836 |
|
| 837 |
|
| 838 |
const variantMap = { |
| 839 |
licensed: 'gradient', |
| 840 |
unlicensed: 'outline', |
| 841 |
legacy: 'warning', |
| 842 |
free: 'secondary', |
| 843 |
bonus: 'warning', |
| 844 |
revoked: 'destructive', |
| 845 |
unactivated: 'warning', |
| 846 |
expired: 'destructive', |
| 847 |
cancelled: 'outline', |
| 848 |
suspended: 'destructive', |
| 849 |
over_limit: 'warning' |
| 850 |
}; |
| 851 |
const labelMap = { |
| 852 |
unlicensed: () => (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Unlicensed', '%TEXTDOMAIN%'), |
| 853 |
legacy: () => (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Legacy', '%TEXTDOMAIN%'), |
| 854 |
free: () => (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Free', '%TEXTDOMAIN%'), |
| 855 |
bonus: () => (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Bonus', '%TEXTDOMAIN%'), |
| 856 |
revoked: () => (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Unavailable', '%TEXTDOMAIN%'), |
| 857 |
unactivated: () => (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Unactivated', '%TEXTDOMAIN%'), |
| 858 |
expired: () => (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Expired', '%TEXTDOMAIN%'), |
| 859 |
cancelled: () => (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Cancelled', '%TEXTDOMAIN%'), |
| 860 |
suspended: () => (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Suspended', '%TEXTDOMAIN%'), |
| 861 |
over_limit: () => (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Over limit', '%TEXTDOMAIN%') |
| 862 |
}; |
| 863 |
|
| 864 |
/** |
| 865 |
* @since 1.0.0 |
| 866 |
*/ |
| 867 |
function LicenseBadge({ |
| 868 |
type, |
| 869 |
tierName, |
| 870 |
className |
| 871 |
}) { |
| 872 |
const label = type === 'licensed' ? tierName : labelMap[type](); |
| 873 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_components_ui_badge__WEBPACK_IMPORTED_MODULE_1__.Badge, { |
| 874 |
variant: variantMap[type], |
| 875 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_2__.cn)(className), |
| 876 |
children: label |
| 877 |
}); |
| 878 |
} |
| 879 |
|
| 880 |
/***/ }, |
| 881 |
|
| 882 |
/***/ "./resources/js/components/atoms/LicenseKeyInputSkeleton.tsx" |
| 883 |
/*!*******************************************************************!*\ |
| 884 |
!*** ./resources/js/components/atoms/LicenseKeyInputSkeleton.tsx ***! |
| 885 |
\*******************************************************************/ |
| 886 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 887 |
|
| 888 |
__webpack_require__.r(__webpack_exports__); |
| 889 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 890 |
/* harmony export */ LicenseKeyInputSkeleton: () => (/* binding */ LicenseKeyInputSkeleton) |
| 891 |
/* harmony export */ }); |
| 892 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 893 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); |
| 894 |
|
| 895 |
/** |
| 896 |
* Pulse-skeleton that mirrors the LicenseKeyInput locked state while the |
| 897 |
* license resolver is still in flight. |
| 898 |
* |
| 899 |
* @package LiquidWeb\Harbor |
| 900 |
*/ |
| 901 |
|
| 902 |
/** |
| 903 |
* @since 1.0.0 |
| 904 |
*/ |
| 905 |
function LicenseKeyInputSkeleton() { |
| 906 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { |
| 907 |
className: "flex items-center gap-2 animate-pulse", |
| 908 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { |
| 909 |
className: "h-9 flex-1 rounded-md bg-muted" |
| 910 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { |
| 911 |
className: "h-3.5 w-8 rounded bg-muted shrink-0" |
| 912 |
})] |
| 913 |
}); |
| 914 |
} |
| 915 |
|
| 916 |
/***/ }, |
| 917 |
|
| 918 |
/***/ "./resources/js/components/atoms/NexcessLogo.tsx" |
| 919 |
/*!*******************************************************!*\ |
| 920 |
!*** ./resources/js/components/atoms/NexcessLogo.tsx ***! |
| 921 |
\*******************************************************/ |
| 922 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 923 |
|
| 924 |
__webpack_require__.r(__webpack_exports__); |
| 925 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 926 |
/* harmony export */ NexcessLogo: () => (/* binding */ NexcessLogo) |
| 927 |
/* harmony export */ }); |
| 928 |
/* harmony import */ var _img_logo_nexcess_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @img/logo-nexcess.svg */ "./resources/img/logo-nexcess.svg"); |
| 929 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 930 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__); |
| 931 |
/** |
| 932 |
* Nexcess brand mark used in the welcome flow. |
| 933 |
* |
| 934 |
* Decorative — the visible "Software License Manager" heading carries the |
| 935 |
* accessible name. Uses the default URL-string export from the SVG loader, |
| 936 |
* matching ProductLogo and FilterBar. |
| 937 |
* |
| 938 |
* @package LiquidWeb\Harbor |
| 939 |
*/ |
| 940 |
|
| 941 |
|
| 942 |
/** |
| 943 |
* @since 1.3.0 |
| 944 |
*/ |
| 945 |
function NexcessLogo({ |
| 946 |
className |
| 947 |
}) { |
| 948 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("img", { |
| 949 |
src: _img_logo_nexcess_svg__WEBPACK_IMPORTED_MODULE_0__["default"], |
| 950 |
alt: "", |
| 951 |
"aria-hidden": "true", |
| 952 |
className: className |
| 953 |
}); |
| 954 |
} |
| 955 |
|
| 956 |
/***/ }, |
| 957 |
|
| 958 |
/***/ "./resources/js/components/atoms/ProductLogo.tsx" |
| 959 |
/*!*******************************************************!*\ |
| 960 |
!*** ./resources/js/components/atoms/ProductLogo.tsx ***! |
| 961 |
\*******************************************************/ |
| 962 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 963 |
|
| 964 |
__webpack_require__.r(__webpack_exports__); |
| 965 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 966 |
/* harmony export */ ProductLogo: () => (/* binding */ ProductLogo) |
| 967 |
/* harmony export */ }); |
| 968 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 969 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 970 |
/* harmony import */ var _img_logo_give_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @img/logo-give.svg */ "./resources/img/logo-give.svg"); |
| 971 |
/* harmony import */ var _img_logo_tec_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @img/logo-tec.svg */ "./resources/img/logo-tec.svg"); |
| 972 |
/* harmony import */ var _img_logo_learndash_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @img/logo-learndash.svg */ "./resources/img/logo-learndash.svg"); |
| 973 |
/* harmony import */ var _img_logo_kadence_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @img/logo-kadence.svg */ "./resources/img/logo-kadence.svg"); |
| 974 |
/* harmony import */ var _img_logo_givewp_nobg_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @img/logo-givewp-nobg.svg */ "./resources/img/logo-givewp-nobg.svg"); |
| 975 |
/* harmony import */ var _img_logo_learndash_nobg_svg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @img/logo-learndash-nobg.svg */ "./resources/img/logo-learndash-nobg.svg"); |
| 976 |
/* harmony import */ var _img_logo_tec_nobg_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @img/logo-tec-nobg.svg */ "./resources/img/logo-tec-nobg.svg"); |
| 977 |
/* harmony import */ var _img_logo_kadence_nobg_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @img/logo-kadence-nobg.svg */ "./resources/img/logo-kadence-nobg.svg"); |
| 978 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 979 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__); |
| 980 |
/** |
| 981 |
* Product logo resolved from a slug-based SVG asset. |
| 982 |
* |
| 983 |
* Falls back to a neutral placeholder box when no asset is found. |
| 984 |
* Use variant="nobg" for the transparent (no background) logo variants. |
| 985 |
* |
| 986 |
* @package LiquidWeb\Harbor |
| 987 |
*/ |
| 988 |
|
| 989 |
|
| 990 |
|
| 991 |
|
| 992 |
|
| 993 |
|
| 994 |
|
| 995 |
|
| 996 |
|
| 997 |
|
| 998 |
const LOGOS = { |
| 999 |
give: _img_logo_give_svg__WEBPACK_IMPORTED_MODULE_1__["default"], |
| 1000 |
'the-events-calendar': _img_logo_tec_svg__WEBPACK_IMPORTED_MODULE_2__["default"], |
| 1001 |
learndash: _img_logo_learndash_svg__WEBPACK_IMPORTED_MODULE_3__["default"], |
| 1002 |
kadence: _img_logo_kadence_svg__WEBPACK_IMPORTED_MODULE_4__["default"] |
| 1003 |
}; |
| 1004 |
const LOGOS_NOBG = { |
| 1005 |
give: _img_logo_givewp_nobg_svg__WEBPACK_IMPORTED_MODULE_5__["default"], |
| 1006 |
'the-events-calendar': _img_logo_tec_nobg_svg__WEBPACK_IMPORTED_MODULE_7__["default"], |
| 1007 |
learndash: _img_logo_learndash_nobg_svg__WEBPACK_IMPORTED_MODULE_6__["default"], |
| 1008 |
kadence: _img_logo_kadence_nobg_svg__WEBPACK_IMPORTED_MODULE_8__["default"] |
| 1009 |
}; |
| 1010 |
/** |
| 1011 |
* @since 1.0.0 |
| 1012 |
*/ |
| 1013 |
function ProductLogo({ |
| 1014 |
slug, |
| 1015 |
size, |
| 1016 |
productName, |
| 1017 |
variant = 'default' |
| 1018 |
}) { |
| 1019 |
const src = (variant === 'nobg' ? LOGOS_NOBG : LOGOS)[slug]; |
| 1020 |
|
| 1021 |
/* translators: %s: product name (e.g. "Kadence", "GiveWP") */ |
| 1022 |
const alt = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('%s logo', '%TEXTDOMAIN%'), productName); |
| 1023 |
if (!src) { |
| 1024 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("div", { |
| 1025 |
className: "rounded bg-muted shrink-0", |
| 1026 |
role: "img", |
| 1027 |
"aria-label": alt, |
| 1028 |
style: { |
| 1029 |
width: size, |
| 1030 |
height: size |
| 1031 |
} |
| 1032 |
}); |
| 1033 |
} |
| 1034 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)("img", { |
| 1035 |
src: src, |
| 1036 |
alt: alt, |
| 1037 |
className: "shrink-0 rounded", |
| 1038 |
style: { |
| 1039 |
width: size, |
| 1040 |
height: size |
| 1041 |
} |
| 1042 |
}); |
| 1043 |
} |
| 1044 |
|
| 1045 |
/***/ }, |
| 1046 |
|
| 1047 |
/***/ "./resources/js/components/atoms/PurchaseLink.tsx" |
| 1048 |
/*!********************************************************!*\ |
| 1049 |
!*** ./resources/js/components/atoms/PurchaseLink.tsx ***! |
| 1050 |
\********************************************************/ |
| 1051 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 1052 |
|
| 1053 |
__webpack_require__.r(__webpack_exports__); |
| 1054 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1055 |
/* harmony export */ PurchaseLink: () => (/* binding */ PurchaseLink) |
| 1056 |
/* harmony export */ }); |
| 1057 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1058 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 1059 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/external-link.js"); |
| 1060 |
/* harmony import */ var _components_ui_button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/ui/button */ "./resources/js/components/ui/button.tsx"); |
| 1061 |
/* harmony import */ var _lib_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/lib/utils */ "./resources/js/lib/utils.ts"); |
| 1062 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1063 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__); |
| 1064 |
|
| 1065 |
|
| 1066 |
|
| 1067 |
|
| 1068 |
|
| 1069 |
/** |
| 1070 |
* @since 1.0.0 |
| 1071 |
*/ |
| 1072 |
function PurchaseLink({ |
| 1073 |
tierName, |
| 1074 |
upgradeUrl, |
| 1075 |
mode = 'upgrade', |
| 1076 |
className |
| 1077 |
}) { |
| 1078 |
const label = mode === 'upgrade' ? /* translators: %s is the name of the license tier to upgrade to */ |
| 1079 |
(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Upgrade to %s', '%TEXTDOMAIN%'), tierName) : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Learn more', '%TEXTDOMAIN%'); |
| 1080 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("a", { |
| 1081 |
href: upgradeUrl, |
| 1082 |
target: "_blank", |
| 1083 |
rel: "noopener noreferrer", |
| 1084 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_3__.cn)((0,_components_ui_button__WEBPACK_IMPORTED_MODULE_2__.buttonVariants)({ |
| 1085 |
variant: 'outline', |
| 1086 |
size: 'sm' |
| 1087 |
}), 'h-7 gap-1 text-xs', className), |
| 1088 |
children: [label, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_1__["default"], { |
| 1089 |
className: "w-3 h-3 -translate-y-px" |
| 1090 |
})] |
| 1091 |
}); |
| 1092 |
} |
| 1093 |
|
| 1094 |
/***/ }, |
| 1095 |
|
| 1096 |
/***/ "./resources/js/components/atoms/SectionHeader.tsx" |
| 1097 |
/*!*********************************************************!*\ |
| 1098 |
!*** ./resources/js/components/atoms/SectionHeader.tsx ***! |
| 1099 |
\*********************************************************/ |
| 1100 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 1101 |
|
| 1102 |
__webpack_require__.r(__webpack_exports__); |
| 1103 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1104 |
/* harmony export */ SectionHeader: () => (/* binding */ SectionHeader) |
| 1105 |
/* harmony export */ }); |
| 1106 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1107 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); |
| 1108 |
|
| 1109 |
/** |
| 1110 |
* Sidebar section header: icon + uppercase label + optional trailing action. |
| 1111 |
* |
| 1112 |
* @package LiquidWeb\Harbor |
| 1113 |
*/ |
| 1114 |
|
| 1115 |
/** |
| 1116 |
* @since 1.0.0 |
| 1117 |
*/ |
| 1118 |
function SectionHeader({ |
| 1119 |
icon, |
| 1120 |
label, |
| 1121 |
action |
| 1122 |
}) { |
| 1123 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { |
| 1124 |
className: "flex items-center gap-2.5", |
| 1125 |
children: [icon, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { |
| 1126 |
className: "flex-1 text-xs font-semibold text-muted-foreground uppercase tracking-wider", |
| 1127 |
children: label |
| 1128 |
}), action] |
| 1129 |
}); |
| 1130 |
} |
| 1131 |
|
| 1132 |
/***/ }, |
| 1133 |
|
| 1134 |
/***/ "./resources/js/components/atoms/StatusBadge.tsx" |
| 1135 |
/*!*******************************************************!*\ |
| 1136 |
!*** ./resources/js/components/atoms/StatusBadge.tsx ***! |
| 1137 |
\*******************************************************/ |
| 1138 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 1139 |
|
| 1140 |
__webpack_require__.r(__webpack_exports__); |
| 1141 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1142 |
/* harmony export */ StatusBadge: () => (/* binding */ StatusBadge) |
| 1143 |
/* harmony export */ }); |
| 1144 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1145 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 1146 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 1147 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); |
| 1148 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/loader-circle.js"); |
| 1149 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/download.js"); |
| 1150 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/lock.js"); |
| 1151 |
/* harmony import */ var _components_ui_badge__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/ui/badge */ "./resources/js/components/ui/badge.tsx"); |
| 1152 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1153 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__); |
| 1154 |
|
| 1155 |
|
| 1156 |
|
| 1157 |
|
| 1158 |
|
| 1159 |
const SPAN_CONFIG = { |
| 1160 |
enabling: { |
| 1161 |
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Activating\u2026', '%TEXTDOMAIN%'), |
| 1162 |
color: 'text-primary' |
| 1163 |
}, |
| 1164 |
disabling: { |
| 1165 |
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Deactivating\u2026', '%TEXTDOMAIN%'), |
| 1166 |
color: 'text-muted-foreground' |
| 1167 |
}, |
| 1168 |
enabled: { |
| 1169 |
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Activated', '%TEXTDOMAIN%'), |
| 1170 |
color: 'text-green-600' |
| 1171 |
}, |
| 1172 |
available: { |
| 1173 |
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Deactivated', '%TEXTDOMAIN%'), |
| 1174 |
color: 'text-muted-foreground' |
| 1175 |
} |
| 1176 |
}; |
| 1177 |
|
| 1178 |
/** |
| 1179 |
* @since 1.0.0 |
| 1180 |
*/ |
| 1181 |
function StatusBadge({ |
| 1182 |
status, |
| 1183 |
requiredTier |
| 1184 |
}) { |
| 1185 |
if (status === 'installing' || status === 'updating') { |
| 1186 |
const label = status === 'installing' ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Installing\u2026', '%TEXTDOMAIN%') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Updating\u2026', '%TEXTDOMAIN%'); |
| 1187 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("div", { |
| 1188 |
className: "flex flex-col items-end gap-0.5 w-36", |
| 1189 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("div", { |
| 1190 |
className: "flex items-center gap-2 w-full", |
| 1191 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_3__["default"], { |
| 1192 |
className: "w-3.5 h-3.5 text-muted-foreground animate-pulse shrink-0" |
| 1193 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ProgressBar, { |
| 1194 |
className: "h-1.5 rounded-full bg-muted [&>div]:bg-primary" |
| 1195 |
})] |
| 1196 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("span", { |
| 1197 |
className: "text-[10px] text-muted-foreground", |
| 1198 |
children: label |
| 1199 |
})] |
| 1200 |
}); |
| 1201 |
} |
| 1202 |
if (status === 'included') { |
| 1203 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_components_ui_badge__WEBPACK_IMPORTED_MODULE_5__.Badge, { |
| 1204 |
variant: "success", |
| 1205 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Included', '%TEXTDOMAIN%') |
| 1206 |
}); |
| 1207 |
} |
| 1208 |
const config = SPAN_CONFIG[status]; |
| 1209 |
if (config) { |
| 1210 |
const showSpinner = status === 'enabling' || status === 'disabling'; |
| 1211 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("span", { |
| 1212 |
className: `text-xs w-25 text-right ${config.color} flex items-center gap-1 justify-end`, |
| 1213 |
children: [showSpinner && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_2__["default"], { |
| 1214 |
className: "w-3 h-3 animate-spin" |
| 1215 |
}), config.label] |
| 1216 |
}); |
| 1217 |
} |
| 1218 |
if (status === 'locked' && requiredTier) { |
| 1219 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_components_ui_badge__WEBPACK_IMPORTED_MODULE_5__.Badge, { |
| 1220 |
variant: "warning", |
| 1221 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_4__["default"], { |
| 1222 |
className: "w-3 h-3" |
| 1223 |
}), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Requires %s', '%TEXTDOMAIN%'), requiredTier)] |
| 1224 |
}); |
| 1225 |
} |
| 1226 |
|
| 1227 |
// unlicensed or locked without tier label — lock icon prepended to "Deactivated" |
| 1228 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("span", { |
| 1229 |
className: "text-xs w-25 text-right text-muted-foreground flex items-center gap-1 justify-end", |
| 1230 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_4__["default"], { |
| 1231 |
className: "w-3 h-3" |
| 1232 |
}), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Deactivated', '%TEXTDOMAIN%')] |
| 1233 |
}); |
| 1234 |
} |
| 1235 |
|
| 1236 |
/***/ }, |
| 1237 |
|
| 1238 |
/***/ "./resources/js/components/atoms/UpdateButton.tsx" |
| 1239 |
/*!********************************************************!*\ |
| 1240 |
!*** ./resources/js/components/atoms/UpdateButton.tsx ***! |
| 1241 |
\********************************************************/ |
| 1242 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 1243 |
|
| 1244 |
__webpack_require__.r(__webpack_exports__); |
| 1245 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1246 |
/* harmony export */ UpdateButton: () => (/* binding */ UpdateButton) |
| 1247 |
/* harmony export */ }); |
| 1248 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1249 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 1250 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/download.js"); |
| 1251 |
/* harmony import */ var _components_ui_button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/ui/button */ "./resources/js/components/ui/button.tsx"); |
| 1252 |
/* harmony import */ var _components_ui_tooltip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/ui/tooltip */ "./resources/js/components/ui/tooltip.tsx"); |
| 1253 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1254 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__); |
| 1255 |
/** |
| 1256 |
* Icon button that triggers a feature update. |
| 1257 |
* |
| 1258 |
* When upgradeLabel is provided the button is rendered disabled with an |
| 1259 |
* upsell tooltip. The Tooltip component handles the span wrapper needed to |
| 1260 |
* keep hover events working when pointer-events are disabled on the button. |
| 1261 |
* |
| 1262 |
* @package LiquidWeb\Harbor |
| 1263 |
*/ |
| 1264 |
|
| 1265 |
|
| 1266 |
|
| 1267 |
|
| 1268 |
|
| 1269 |
/** |
| 1270 |
* @since 1.0.0 |
| 1271 |
*/ |
| 1272 |
function UpdateButton({ |
| 1273 |
featureName, |
| 1274 |
disabled = false, |
| 1275 |
onClick, |
| 1276 |
upgradeLabel |
| 1277 |
}) { |
| 1278 |
const button = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_components_ui_button__WEBPACK_IMPORTED_MODULE_2__.Button, { |
| 1279 |
variant: "default", |
| 1280 |
size: "icon-xs", |
| 1281 |
className: "rounded-full", |
| 1282 |
disabled: !!upgradeLabel || disabled, |
| 1283 |
onClick: onClick, |
| 1284 |
"aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Update %s', '%TEXTDOMAIN%'), featureName), |
| 1285 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_1__["default"], { |
| 1286 |
className: "w-3.5 h-3.5" |
| 1287 |
}) |
| 1288 |
}); |
| 1289 |
return upgradeLabel ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_components_ui_tooltip__WEBPACK_IMPORTED_MODULE_3__.Tooltip, { |
| 1290 |
label: upgradeLabel, |
| 1291 |
children: button |
| 1292 |
}) : button; |
| 1293 |
} |
| 1294 |
|
| 1295 |
/***/ }, |
| 1296 |
|
| 1297 |
/***/ "./resources/js/components/molecules/FeatureRow.tsx" |
| 1298 |
/*!**********************************************************!*\ |
| 1299 |
!*** ./resources/js/components/molecules/FeatureRow.tsx ***! |
| 1300 |
\**********************************************************/ |
| 1301 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 1302 |
|
| 1303 |
__webpack_require__.r(__webpack_exports__); |
| 1304 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1305 |
/* harmony export */ FeatureRow: () => (/* binding */ FeatureRow) |
| 1306 |
/* harmony export */ }); |
| 1307 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 1308 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 1309 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1310 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 1311 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/chevron-down.js"); |
| 1312 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/chevron-right.js"); |
| 1313 |
/* harmony import */ var _lib_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/lib/utils */ "./resources/js/lib/utils.ts"); |
| 1314 |
/* harmony import */ var _components_atoms_FeatureIcon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/atoms/FeatureIcon */ "./resources/js/components/atoms/FeatureIcon.tsx"); |
| 1315 |
/* harmony import */ var _components_atoms_LicenseBadge__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/atoms/LicenseBadge */ "./resources/js/components/atoms/LicenseBadge.tsx"); |
| 1316 |
/* harmony import */ var _components_atoms_StatusBadge__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/atoms/StatusBadge */ "./resources/js/components/atoms/StatusBadge.tsx"); |
| 1317 |
/* harmony import */ var _components_molecules_VersionDisplay__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/molecules/VersionDisplay */ "./resources/js/components/molecules/VersionDisplay.tsx"); |
| 1318 |
/* harmony import */ var _components_ui_switch__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/ui/switch */ "./resources/js/components/ui/switch.tsx"); |
| 1319 |
/* harmony import */ var _components_ui_button__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/components/ui/button */ "./resources/js/components/ui/button.tsx"); |
| 1320 |
/* harmony import */ var _components_ui_dialog__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/components/ui/dialog */ "./resources/js/components/ui/dialog.tsx"); |
| 1321 |
/* harmony import */ var _hooks_useFeatureRow__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/hooks/useFeatureRow */ "./resources/js/hooks/useFeatureRow.ts"); |
| 1322 |
/* harmony import */ var _types_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/types/utils */ "./resources/js/types/utils.ts"); |
| 1323 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1324 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__); |
| 1325 |
/** |
| 1326 |
* A single feature row in the product feature list. |
| 1327 |
* |
| 1328 |
* Clicking the row header expands/collapses the feature description. |
| 1329 |
* The toggle switch remains independently clickable. |
| 1330 |
* |
| 1331 |
* @package LiquidWeb\Harbor |
| 1332 |
*/ |
| 1333 |
|
| 1334 |
|
| 1335 |
|
| 1336 |
|
| 1337 |
|
| 1338 |
|
| 1339 |
|
| 1340 |
|
| 1341 |
|
| 1342 |
|
| 1343 |
|
| 1344 |
|
| 1345 |
|
| 1346 |
|
| 1347 |
/** |
| 1348 |
* @since 1.0.0 |
| 1349 |
*/ |
| 1350 |
function FeatureRow({ |
| 1351 |
feature, |
| 1352 |
upgradeTierName |
| 1353 |
}) { |
| 1354 |
const [expanded, setExpanded] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false); |
| 1355 |
const { |
| 1356 |
pendingAction, |
| 1357 |
installableBusy, |
| 1358 |
badgeStatus, |
| 1359 |
showSwitch, |
| 1360 |
switchChecked, |
| 1361 |
licenseBadgeType, |
| 1362 |
showDeactivateConfirm, |
| 1363 |
handleToggle, |
| 1364 |
handleUpdate, |
| 1365 |
handleConfirmDeactivate, |
| 1366 |
handleCancelDeactivate |
| 1367 |
} = (0,_hooks_useFeatureRow__WEBPACK_IMPORTED_MODULE_12__.useFeatureRow)(feature); |
| 1368 |
const Chevron = expanded ? lucide_react__WEBPACK_IMPORTED_MODULE_2__["default"] : lucide_react__WEBPACK_IMPORTED_MODULE_3__["default"]; |
| 1369 |
|
| 1370 |
// Legacy-licensed and revoked features are not marked available by the API |
| 1371 |
// but should render with the full available layout — controls visible, no muted style. |
| 1372 |
// This override only applies to installable features (plugins/themes) since |
| 1373 |
// non-installable features (services) have no controls to show. |
| 1374 |
const isVisuallyAvailable = feature.is_available || (0,_types_utils__WEBPACK_IMPORTED_MODULE_13__.isInstallableFeature)(feature) && (licenseBadgeType === 'legacy' || licenseBadgeType === 'revoked'); |
| 1375 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)("div", { |
| 1376 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.cn)('border-b last:border-b-0', isVisuallyAvailable ? (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.cn)('bg-white', pendingAction && 'opacity-75') : 'bg-muted/30'), |
| 1377 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)("div", { |
| 1378 |
className: "flex items-center gap-3 py-3 px-4", |
| 1379 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)("div", { |
| 1380 |
onClick: () => setExpanded(!expanded), |
| 1381 |
className: "flex items-center gap-2 min-w-0 cursor-pointer", |
| 1382 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(Chevron, { |
| 1383 |
className: "w-4 h-4 text-muted-foreground shrink-0" |
| 1384 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_atoms_FeatureIcon__WEBPACK_IMPORTED_MODULE_5__.FeatureIcon, { |
| 1385 |
slug: feature.slug |
| 1386 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("span", { |
| 1387 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.cn)('font-medium min-w-0 text-sm truncate', !isVisuallyAvailable && 'text-muted-foreground'), |
| 1388 |
children: feature.name |
| 1389 |
}), licenseBadgeType && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_atoms_LicenseBadge__WEBPACK_IMPORTED_MODULE_6__.LicenseBadge, { |
| 1390 |
type: licenseBadgeType |
| 1391 |
})] |
| 1392 |
}), isVisuallyAvailable ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("div", { |
| 1393 |
className: "flex items-center gap-3 ml-auto shrink-0", |
| 1394 |
children: (0,_types_utils__WEBPACK_IMPORTED_MODULE_13__.isInstallableFeature)(feature) ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.Fragment, { |
| 1395 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_molecules_VersionDisplay__WEBPACK_IMPORTED_MODULE_8__.VersionDisplay, { |
| 1396 |
feature: feature, |
| 1397 |
pendingAction: pendingAction, |
| 1398 |
installableBusy: installableBusy, |
| 1399 |
upgradeLabel: licenseBadgeType === 'legacy' ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Upgrade your license to manage updates from the Software License Manager.', '%TEXTDOMAIN%') : undefined, |
| 1400 |
onUpdate: licenseBadgeType === 'legacy' || licenseBadgeType === 'revoked' ? undefined : handleUpdate |
| 1401 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_atoms_StatusBadge__WEBPACK_IMPORTED_MODULE_7__.StatusBadge, { |
| 1402 |
status: badgeStatus |
| 1403 |
}), showSwitch && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_ui_switch__WEBPACK_IMPORTED_MODULE_9__.Switch, { |
| 1404 |
checked: switchChecked, |
| 1405 |
onCheckedChange: handleToggle, |
| 1406 |
disabled: !!pendingAction || installableBusy || licenseBadgeType === 'revoked' && !switchChecked, |
| 1407 |
"aria-label": switchChecked ? /* translators: %s is the name of the feature to disable */ |
| 1408 |
(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Disable %s', '%TEXTDOMAIN%'), feature.name) : /* translators: %s is the name of the feature to enable */ |
| 1409 |
(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Enable %s', '%TEXTDOMAIN%'), feature.name) |
| 1410 |
})] |
| 1411 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_atoms_StatusBadge__WEBPACK_IMPORTED_MODULE_7__.StatusBadge, { |
| 1412 |
status: badgeStatus |
| 1413 |
}) |
| 1414 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("div", { |
| 1415 |
className: "ml-auto shrink-0", |
| 1416 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_molecules_VersionDisplay__WEBPACK_IMPORTED_MODULE_8__.VersionDisplay, { |
| 1417 |
feature: feature, |
| 1418 |
upgradeLabel: upgradeTierName ? /* translators: %s is the name of the tier required to receive updates */ |
| 1419 |
(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Upgrade to %s to receive updates and support.', '%TEXTDOMAIN%'), upgradeTierName) : undefined |
| 1420 |
}) |
| 1421 |
})] |
| 1422 |
}), expanded && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("div", { |
| 1423 |
className: "px-4 pb-3 pl-11", |
| 1424 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("p", { |
| 1425 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.cn)('text-sm text-muted-foreground leading-relaxed', isVisuallyAvailable ? 'mt-[0.75em]! mb-0!' : 'mt-2 mb-0'), |
| 1426 |
children: feature.description |
| 1427 |
}) |
| 1428 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(_components_ui_dialog__WEBPACK_IMPORTED_MODULE_11__.Dialog, { |
| 1429 |
open: showDeactivateConfirm, |
| 1430 |
onClose: handleCancelDeactivate, |
| 1431 |
maxWidth: "max-w-md", |
| 1432 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_ui_dialog__WEBPACK_IMPORTED_MODULE_11__.DialogHeader, { |
| 1433 |
title: /* translators: %s is the name of the feature being deactivated */ |
| 1434 |
(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Deactivate %s?', '%TEXTDOMAIN%'), feature.name), |
| 1435 |
description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('This plugin powers this page. Deactivating it will make this page unavailable until it is reactivated from the WordPress Plugins page.', '%TEXTDOMAIN%'), |
| 1436 |
onClose: handleCancelDeactivate |
| 1437 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(_components_ui_dialog__WEBPACK_IMPORTED_MODULE_11__.DialogFooter, { |
| 1438 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_ui_button__WEBPACK_IMPORTED_MODULE_10__.Button, { |
| 1439 |
variant: "outline", |
| 1440 |
onClick: handleCancelDeactivate, |
| 1441 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Cancel', '%TEXTDOMAIN%') |
| 1442 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_ui_button__WEBPACK_IMPORTED_MODULE_10__.Button, { |
| 1443 |
variant: "destructive", |
| 1444 |
onClick: handleConfirmDeactivate, |
| 1445 |
disabled: pendingAction === 'disabling', |
| 1446 |
children: pendingAction === 'disabling' ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Deactivating…', '%TEXTDOMAIN%') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Deactivate', '%TEXTDOMAIN%') |
| 1447 |
})] |
| 1448 |
})] |
| 1449 |
})] |
| 1450 |
}); |
| 1451 |
} |
| 1452 |
|
| 1453 |
/***/ }, |
| 1454 |
|
| 1455 |
/***/ "./resources/js/components/molecules/FilterBar.tsx" |
| 1456 |
/*!*********************************************************!*\ |
| 1457 |
!*** ./resources/js/components/molecules/FilterBar.tsx ***! |
| 1458 |
\*********************************************************/ |
| 1459 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 1460 |
|
| 1461 |
__webpack_require__.r(__webpack_exports__); |
| 1462 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1463 |
/* harmony export */ FilterBar: () => (/* binding */ FilterBar) |
| 1464 |
/* harmony export */ }); |
| 1465 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1466 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 1467 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/search.js"); |
| 1468 |
/* harmony import */ var _components_ui_input__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/ui/input */ "./resources/js/components/ui/input.tsx"); |
| 1469 |
/* harmony import */ var _components_ui_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/ui/select */ "./resources/js/components/ui/select.tsx"); |
| 1470 |
/* harmony import */ var _data_products__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/data/products */ "./resources/js/data/products.ts"); |
| 1471 |
/* harmony import */ var _context_filter_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/context/filter-context */ "./resources/js/context/filter-context.tsx"); |
| 1472 |
/* harmony import */ var _img_logo_lw_svg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @img/logo-lw.svg */ "./resources/img/logo-lw.svg"); |
| 1473 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1474 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__); |
| 1475 |
/** |
| 1476 |
* Page header filter bar. |
| 1477 |
* |
| 1478 |
* Displays the product logo, a feature search input, and a product filter |
| 1479 |
* dropdown. Both inputs are wired to FilterContext via useFilter(). |
| 1480 |
* |
| 1481 |
* @package LiquidWeb\Harbor |
| 1482 |
*/ |
| 1483 |
|
| 1484 |
|
| 1485 |
|
| 1486 |
|
| 1487 |
|
| 1488 |
|
| 1489 |
|
| 1490 |
|
| 1491 |
/** |
| 1492 |
* @since 1.0.0 |
| 1493 |
*/ |
| 1494 |
|
| 1495 |
function FilterBar() { |
| 1496 |
const { |
| 1497 |
searchQuery, |
| 1498 |
setSearchQuery, |
| 1499 |
productFilter, |
| 1500 |
setProductFilter |
| 1501 |
} = (0,_context_filter_context__WEBPACK_IMPORTED_MODULE_5__.useFilter)(); |
| 1502 |
const handleProductChange = slug => { |
| 1503 |
setProductFilter(slug); |
| 1504 |
if (slug !== 'all') { |
| 1505 |
setSearchQuery(''); |
| 1506 |
} |
| 1507 |
}; |
| 1508 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", { |
| 1509 |
className: "flex flex-wrap items-center gap-3", |
| 1510 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("img", { |
| 1511 |
src: _img_logo_lw_svg__WEBPACK_IMPORTED_MODULE_6__["default"], |
| 1512 |
alt: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Liquid Web Software Manager', '%TEXTDOMAIN%'), |
| 1513 |
className: "w-[130px] shrink-0" |
| 1514 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", { |
| 1515 |
className: "relative w-[260px]", |
| 1516 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_1__["default"], { |
| 1517 |
className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none" |
| 1518 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_ui_input__WEBPACK_IMPORTED_MODULE_2__.Input, { |
| 1519 |
value: searchQuery, |
| 1520 |
onChange: e => setSearchQuery(e.target.value), |
| 1521 |
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Search features…', '%TEXTDOMAIN%'), |
| 1522 |
className: "pl-10 text-sm" |
| 1523 |
})] |
| 1524 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_components_ui_select__WEBPACK_IMPORTED_MODULE_3__.Select, { |
| 1525 |
value: productFilter, |
| 1526 |
onValueChange: handleProductChange, |
| 1527 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_ui_select__WEBPACK_IMPORTED_MODULE_3__.SelectTrigger, { |
| 1528 |
className: "w-[168px]", |
| 1529 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_ui_select__WEBPACK_IMPORTED_MODULE_3__.SelectValue, { |
| 1530 |
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('All Products', '%TEXTDOMAIN%') |
| 1531 |
}) |
| 1532 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_components_ui_select__WEBPACK_IMPORTED_MODULE_3__.SelectContent, { |
| 1533 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_ui_select__WEBPACK_IMPORTED_MODULE_3__.SelectItem, { |
| 1534 |
value: "all", |
| 1535 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('All Products', '%TEXTDOMAIN%') |
| 1536 |
}), _data_products__WEBPACK_IMPORTED_MODULE_4__.PRODUCTS.map(p => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_ui_select__WEBPACK_IMPORTED_MODULE_3__.SelectItem, { |
| 1537 |
value: p.slug, |
| 1538 |
children: p.name |
| 1539 |
}, p.slug))] |
| 1540 |
})] |
| 1541 |
})] |
| 1542 |
}); |
| 1543 |
} |
| 1544 |
|
| 1545 |
/***/ }, |
| 1546 |
|
| 1547 |
/***/ "./resources/js/components/molecules/LegacyLicenseBanner.tsx" |
| 1548 |
/*!*******************************************************************!*\ |
| 1549 |
!*** ./resources/js/components/molecules/LegacyLicenseBanner.tsx ***! |
| 1550 |
\*******************************************************************/ |
| 1551 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 1552 |
|
| 1553 |
__webpack_require__.r(__webpack_exports__); |
| 1554 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1555 |
/* harmony export */ LegacyLicenseBanner: () => (/* binding */ LegacyLicenseBanner) |
| 1556 |
/* harmony export */ }); |
| 1557 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1558 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 1559 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 1560 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 1561 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 1562 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); |
| 1563 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/triangle-alert.js"); |
| 1564 |
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/store */ "./resources/js/store/index.ts"); |
| 1565 |
/* harmony import */ var _lib_harbor_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/lib/harbor-data */ "./resources/js/lib/harbor-data.ts"); |
| 1566 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1567 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__); |
| 1568 |
/** |
| 1569 |
* Amber warning banner shown when one or more legacy licenses are active. |
| 1570 |
* |
| 1571 |
* Legacy license data is fetched from the REST API via the store's |
| 1572 |
* getLegacyLicenses resolver. |
| 1573 |
* |
| 1574 |
* @package LiquidWeb\Harbor |
| 1575 |
*/ |
| 1576 |
|
| 1577 |
|
| 1578 |
|
| 1579 |
|
| 1580 |
|
| 1581 |
|
| 1582 |
|
| 1583 |
/** |
| 1584 |
* @since 1.3.0 Read subscriptionsUrl through the getHarborDataValue helper. |
| 1585 |
* @since 1.0.0 |
| 1586 |
*/ |
| 1587 |
|
| 1588 |
function LegacyLicenseBanner() { |
| 1589 |
const hasLegacy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => select(_store__WEBPACK_IMPORTED_MODULE_4__.store).hasUncoveredLegacyLicenses(), []); |
| 1590 |
const portalUrl = (0,_lib_harbor_data__WEBPACK_IMPORTED_MODULE_5__.getHarborDataValue)('subscriptionsUrl'); |
| 1591 |
if (!hasLegacy || !portalUrl) { |
| 1592 |
return null; |
| 1593 |
} |
| 1594 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("div", { |
| 1595 |
role: "alert", |
| 1596 |
className: "flex items-start gap-3 rounded-lg border border-amber-200 bg-amber-50 mt-8 mb-0 px-4 py-3 text-sm text-amber-800", |
| 1597 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_3__["default"], { |
| 1598 |
className: "w-4 h-4 shrink-0 mt-0.5" |
| 1599 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("p", { |
| 1600 |
className: "m-0", |
| 1601 |
children: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createInterpolateElement)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('You have one or more legacy licenses active. They continue to receive product updates while valid. Consider <a>switching to a unified license</a> to manage all your products with a single key.', '%TEXTDOMAIN%'), { |
| 1602 |
a: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("a", { |
| 1603 |
href: portalUrl, |
| 1604 |
target: "_blank", |
| 1605 |
rel: "noopener noreferrer", |
| 1606 |
className: "underline font-medium" |
| 1607 |
}) |
| 1608 |
}) |
| 1609 |
})] |
| 1610 |
}); |
| 1611 |
} |
| 1612 |
|
| 1613 |
/***/ }, |
| 1614 |
|
| 1615 |
/***/ "./resources/js/components/molecules/LicenseKeyInput.tsx" |
| 1616 |
/*!***************************************************************!*\ |
| 1617 |
!*** ./resources/js/components/molecules/LicenseKeyInput.tsx ***! |
| 1618 |
\***************************************************************/ |
| 1619 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 1620 |
|
| 1621 |
__webpack_require__.r(__webpack_exports__); |
| 1622 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1623 |
/* harmony export */ LicenseKeyInput: () => (/* binding */ LicenseKeyInput) |
| 1624 |
/* harmony export */ }); |
| 1625 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 1626 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 1627 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1628 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 1629 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 1630 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); |
| 1631 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/loader-circle.js"); |
| 1632 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/pencil.js"); |
| 1633 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/trash-2.js"); |
| 1634 |
/* harmony import */ var _components_ui_input__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/ui/input */ "./resources/js/components/ui/input.tsx"); |
| 1635 |
/* harmony import */ var _components_ui_button__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/ui/button */ "./resources/js/components/ui/button.tsx"); |
| 1636 |
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/store */ "./resources/js/store/index.ts"); |
| 1637 |
/* harmony import */ var _context_toast_context__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/context/toast-context */ "./resources/js/context/toast-context.tsx"); |
| 1638 |
/* harmony import */ var _context_error_modal_context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/context/error-modal-context */ "./resources/js/context/error-modal-context.tsx"); |
| 1639 |
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/errors */ "./resources/js/errors/index.ts"); |
| 1640 |
/* harmony import */ var _lib_harbor_data__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/lib/harbor-data */ "./resources/js/lib/harbor-data.ts"); |
| 1641 |
/* harmony import */ var _lib_license_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/lib/license-utils */ "./resources/js/lib/license-utils.ts"); |
| 1642 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1643 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__); |
| 1644 |
/** |
| 1645 |
* License key input. |
| 1646 |
* |
| 1647 |
* Renders in three states controlled by the parent: |
| 1648 |
* - Empty (currentKey === null): editable input with Activate button. |
| 1649 |
* - Locked (currentKey set, !isEditing): read-only display with inline Edit button. |
| 1650 |
* - Editing (currentKey set, isEditing): editable input pre-filled with the stored key, |
| 1651 |
* plus Activate, Cancel, and Remove buttons. |
| 1652 |
* |
| 1653 |
* Wires activation to the @wordpress/data store. |
| 1654 |
* |
| 1655 |
* @package LiquidWeb\Harbor |
| 1656 |
*/ |
| 1657 |
|
| 1658 |
|
| 1659 |
|
| 1660 |
|
| 1661 |
|
| 1662 |
|
| 1663 |
|
| 1664 |
|
| 1665 |
|
| 1666 |
|
| 1667 |
|
| 1668 |
|
| 1669 |
|
| 1670 |
/** |
| 1671 |
* @since 1.3.0 Use the shared getLicenseKeyPlaceholder helper for the placeholder. |
| 1672 |
* @since 1.0.0 |
| 1673 |
*/ |
| 1674 |
function LicenseKeyInput({ |
| 1675 |
currentKey, |
| 1676 |
isEditing, |
| 1677 |
onEdit, |
| 1678 |
onCancel, |
| 1679 |
onRemove, |
| 1680 |
onSuccess |
| 1681 |
}) { |
| 1682 |
const [key, setKey] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(currentKey || ''); |
| 1683 |
const [localError, setLocalError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null); |
| 1684 |
const { |
| 1685 |
storeLicense |
| 1686 |
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useDispatch)(_store__WEBPACK_IMPORTED_MODULE_8__.store); |
| 1687 |
const { |
| 1688 |
addToast |
| 1689 |
} = (0,_context_toast_context__WEBPACK_IMPORTED_MODULE_9__.useToast)(); |
| 1690 |
const { |
| 1691 |
addError |
| 1692 |
} = (0,_context_error_modal_context__WEBPACK_IMPORTED_MODULE_10__.useErrorModal)(); |
| 1693 |
const { |
| 1694 |
isStoring, |
| 1695 |
canModifyLicense |
| 1696 |
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => ({ |
| 1697 |
isStoring: select(_store__WEBPACK_IMPORTED_MODULE_8__.store).isLicenseStoring(), |
| 1698 |
canModifyLicense: select(_store__WEBPACK_IMPORTED_MODULE_8__.store).canModifyLicense() |
| 1699 |
}), []); |
| 1700 |
|
| 1701 |
// Seed the editable value from the stored key when entering edit mode. |
| 1702 |
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { |
| 1703 |
if (isEditing && currentKey) { |
| 1704 |
setKey(currentKey); |
| 1705 |
} |
| 1706 |
if (!isEditing) { |
| 1707 |
setKey(currentKey || ''); |
| 1708 |
setLocalError(null); |
| 1709 |
} |
| 1710 |
}, [isEditing, currentKey]); |
| 1711 |
const handleActivate = async () => { |
| 1712 |
const trimmedKey = key.trim(); |
| 1713 |
if (!trimmedKey) { |
| 1714 |
setLocalError((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Please enter a license key.', '%TEXTDOMAIN%')); |
| 1715 |
return; |
| 1716 |
} |
| 1717 |
setLocalError(null); |
| 1718 |
const result = await storeLicense(trimmedKey); |
| 1719 |
if (result instanceof _errors__WEBPACK_IMPORTED_MODULE_11__.HarborError) { |
| 1720 |
addError(result); |
| 1721 |
} else { |
| 1722 |
addToast((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('License activated successfully.', '%TEXTDOMAIN%'), 'success'); |
| 1723 |
setKey(''); |
| 1724 |
onSuccess(); |
| 1725 |
} |
| 1726 |
}; |
| 1727 |
const handleRemove = async () => { |
| 1728 |
const error = await onRemove(); |
| 1729 |
if (!error) { |
| 1730 |
setKey(''); |
| 1731 |
setLocalError(null); |
| 1732 |
} |
| 1733 |
}; |
| 1734 |
const inputWithActivate = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)("div", { |
| 1735 |
className: "flex gap-2", |
| 1736 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_ui_input__WEBPACK_IMPORTED_MODULE_6__.Input, { |
| 1737 |
id: "license-key-input", |
| 1738 |
placeholder: (0,_lib_harbor_data__WEBPACK_IMPORTED_MODULE_12__.getLicenseKeyPlaceholder)(), |
| 1739 |
value: key, |
| 1740 |
onChange: e => { |
| 1741 |
setKey(e.target.value.toUpperCase()); |
| 1742 |
if (localError) setLocalError(null); |
| 1743 |
}, |
| 1744 |
onKeyDown: e => e.key === 'Enter' && canModifyLicense && handleActivate(), |
| 1745 |
className: "flex-1 text-xs font-mono uppercase", |
| 1746 |
"aria-invalid": !!localError, |
| 1747 |
"aria-describedby": localError ? 'license-key-error' : undefined, |
| 1748 |
disabled: !canModifyLicense |
| 1749 |
// eslint-disable-next-line jsx-a11y/no-autofocus |
| 1750 |
, |
| 1751 |
autoFocus: isEditing |
| 1752 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_ui_button__WEBPACK_IMPORTED_MODULE_7__.Button, { |
| 1753 |
onClick: handleActivate, |
| 1754 |
disabled: !canModifyLicense || !key.trim(), |
| 1755 |
children: isStoring ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.Fragment, { |
| 1756 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_3__["default"], { |
| 1757 |
className: "w-4 h-4 animate-spin" |
| 1758 |
}), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Verifying\u2026', '%TEXTDOMAIN%')] |
| 1759 |
}) : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Save', '%TEXTDOMAIN%') |
| 1760 |
})] |
| 1761 |
}); |
| 1762 |
|
| 1763 |
// ----- Locked state ----- |
| 1764 |
// Display a masked key so the full value is never exposed on screen; the |
| 1765 |
// real key is revealed only when the field is unlocked for editing. |
| 1766 |
if (currentKey !== null && !isEditing) { |
| 1767 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)("div", { |
| 1768 |
className: "flex items-center gap-2", |
| 1769 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(_components_ui_input__WEBPACK_IMPORTED_MODULE_6__.Input, { |
| 1770 |
readOnly: true, |
| 1771 |
value: (0,_lib_license_utils__WEBPACK_IMPORTED_MODULE_13__.maskLicenseKey)(currentKey), |
| 1772 |
"aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('License key (masked)', '%TEXTDOMAIN%'), |
| 1773 |
className: "flex-1 text-xs font-mono uppercase bg-neutral-100 cursor-default select-none", |
| 1774 |
tabIndex: -1 |
| 1775 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)("button", { |
| 1776 |
type: "button", |
| 1777 |
onClick: onEdit, |
| 1778 |
className: "flex shrink-0 items-center gap-1 text-[11px] text-muted-foreground transition-colors hover:opacity-75", |
| 1779 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_4__["default"], { |
| 1780 |
className: "w-3 h-3" |
| 1781 |
}), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Edit', '%TEXTDOMAIN%')] |
| 1782 |
})] |
| 1783 |
}); |
| 1784 |
} |
| 1785 |
|
| 1786 |
// ----- Editing state ----- |
| 1787 |
if (currentKey !== null && isEditing) { |
| 1788 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)("div", { |
| 1789 |
className: "space-y-2", |
| 1790 |
children: [inputWithActivate, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)("div", { |
| 1791 |
className: "flex items-center justify-between", |
| 1792 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)("button", { |
| 1793 |
type: "button", |
| 1794 |
onClick: handleRemove, |
| 1795 |
disabled: !canModifyLicense, |
| 1796 |
className: "flex items-center gap-1 text-[11px] text-destructive transition-colors hover:opacity-75 disabled:opacity-50", |
| 1797 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_5__["default"], { |
| 1798 |
className: "w-3 h-3" |
| 1799 |
}), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Remove license', '%TEXTDOMAIN%')] |
| 1800 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("button", { |
| 1801 |
type: "button", |
| 1802 |
onClick: onCancel, |
| 1803 |
disabled: !canModifyLicense, |
| 1804 |
className: "text-[11px] text-muted-foreground transition-colors hover:opacity-75 disabled:opacity-50", |
| 1805 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Cancel', '%TEXTDOMAIN%') |
| 1806 |
})] |
| 1807 |
}), localError && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("p", { |
| 1808 |
id: "license-key-error", |
| 1809 |
className: "text-sm text-destructive", |
| 1810 |
role: "alert", |
| 1811 |
children: localError |
| 1812 |
})] |
| 1813 |
}); |
| 1814 |
} |
| 1815 |
|
| 1816 |
// ----- Empty state ----- |
| 1817 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)("div", { |
| 1818 |
className: "space-y-3", |
| 1819 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("label", { |
| 1820 |
className: "text-sm font-medium", |
| 1821 |
htmlFor: "license-key-input", |
| 1822 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Enter License Key', '%TEXTDOMAIN%') |
| 1823 |
}), inputWithActivate, isStoring && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)("p", { |
| 1824 |
className: "text-sm text-muted-foreground flex items-center gap-1.5", |
| 1825 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_3__["default"], { |
| 1826 |
className: "w-3.5 h-3.5 animate-spin" |
| 1827 |
}), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Checking license with server\u2026', '%TEXTDOMAIN%')] |
| 1828 |
}), localError && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("p", { |
| 1829 |
id: "license-key-error", |
| 1830 |
className: "text-sm text-destructive", |
| 1831 |
role: "alert", |
| 1832 |
children: localError |
| 1833 |
})] |
| 1834 |
}); |
| 1835 |
} |
| 1836 |
|
| 1837 |
/***/ }, |
| 1838 |
|
| 1839 |
/***/ "./resources/js/components/molecules/LicenseProductCard.tsx" |
| 1840 |
/*!******************************************************************!*\ |
| 1841 |
!*** ./resources/js/components/molecules/LicenseProductCard.tsx ***! |
| 1842 |
\******************************************************************/ |
| 1843 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 1844 |
|
| 1845 |
__webpack_require__.r(__webpack_exports__); |
| 1846 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1847 |
/* harmony export */ LicenseProductCard: () => (/* binding */ LicenseProductCard) |
| 1848 |
/* harmony export */ }); |
| 1849 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 1850 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 1851 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1852 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 1853 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/chevron-down.js"); |
| 1854 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/chevron-up.js"); |
| 1855 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/external-link.js"); |
| 1856 |
/* harmony import */ var _components_atoms_LicenseBadge__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/atoms/LicenseBadge */ "./resources/js/components/atoms/LicenseBadge.tsx"); |
| 1857 |
/* harmony import */ var _components_ui_button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/ui/button */ "./resources/js/components/ui/button.tsx"); |
| 1858 |
/* harmony import */ var _components_ui_tooltip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/ui/tooltip */ "./resources/js/components/ui/tooltip.tsx"); |
| 1859 |
/* harmony import */ var _components_atoms_ProductLogo__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/atoms/ProductLogo */ "./resources/js/components/atoms/ProductLogo.tsx"); |
| 1860 |
/* harmony import */ var _lib_activation_url__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/lib/activation-url */ "./resources/js/lib/activation-url.ts"); |
| 1861 |
/* harmony import */ var _lib_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/lib/utils */ "./resources/js/lib/utils.ts"); |
| 1862 |
/* harmony import */ var _lib_license_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/lib/license-utils */ "./resources/js/lib/license-utils.ts"); |
| 1863 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1864 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__); |
| 1865 |
/** |
| 1866 |
* Card showing a single licensed product: logo, name, tier badge, and an |
| 1867 |
* expandable list of per-tier rows with expiry dates and Activate buttons. |
| 1868 |
* |
| 1869 |
* @package LiquidWeb\Harbor |
| 1870 |
*/ |
| 1871 |
|
| 1872 |
|
| 1873 |
|
| 1874 |
|
| 1875 |
|
| 1876 |
|
| 1877 |
|
| 1878 |
|
| 1879 |
|
| 1880 |
|
| 1881 |
|
| 1882 |
function getStatusBadgeType(lp) { |
| 1883 |
switch (lp.validation_status) { |
| 1884 |
case 'not_activated': |
| 1885 |
case 'activation_required': |
| 1886 |
return 'unactivated'; |
| 1887 |
case 'expired': |
| 1888 |
return 'expired'; |
| 1889 |
case 'cancelled': |
| 1890 |
return 'cancelled'; |
| 1891 |
case 'suspended': |
| 1892 |
case 'license_suspended': |
| 1893 |
case 'license_banned': |
| 1894 |
return 'suspended'; |
| 1895 |
case 'out_of_activations': |
| 1896 |
return 'over_limit'; |
| 1897 |
default: |
| 1898 |
return 'unlicensed'; |
| 1899 |
} |
| 1900 |
} |
| 1901 |
|
| 1902 |
/** |
| 1903 |
* @since 1.0.0 |
| 1904 |
*/ |
| 1905 |
function LicenseProductCard({ |
| 1906 |
productSlug, |
| 1907 |
productName, |
| 1908 |
tiers, |
| 1909 |
tierNameMap, |
| 1910 |
activationUrl |
| 1911 |
}) { |
| 1912 |
const activatedTiers = tiers.filter(lp => lp.is_valid && lp.activated_here === true); |
| 1913 |
const hasActivatedTier = activatedTiers.length > 0; |
| 1914 |
const [isOpen, setIsOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!hasActivatedTier); |
| 1915 |
const Chevron = isOpen ? lucide_react__WEBPACK_IMPORTED_MODULE_3__["default"] : lucide_react__WEBPACK_IMPORTED_MODULE_2__["default"]; |
| 1916 |
const topActivatedTier = activatedTiers[activatedTiers.length - 1]; |
| 1917 |
const headerBadge = hasActivatedTier && topActivatedTier ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_components_atoms_LicenseBadge__WEBPACK_IMPORTED_MODULE_5__.LicenseBadge, { |
| 1918 |
type: "licensed", |
| 1919 |
tierName: tierNameMap[topActivatedTier.tier] ?? topActivatedTier.tier, |
| 1920 |
className: "text-[10px] shrink-0" |
| 1921 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_components_atoms_LicenseBadge__WEBPACK_IMPORTED_MODULE_5__.LicenseBadge, { |
| 1922 |
type: getStatusBadgeType(tiers[0]), |
| 1923 |
className: "text-[10px] shrink-0" |
| 1924 |
}); |
| 1925 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("div", { |
| 1926 |
className: "rounded-lg border bg-card overflow-hidden", |
| 1927 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("button", { |
| 1928 |
type: "button", |
| 1929 |
"aria-expanded": isOpen, |
| 1930 |
onClick: () => setIsOpen(v => !v), |
| 1931 |
className: "w-full flex items-center gap-2 px-3 py-2.5 text-left cursor-pointer", |
| 1932 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_components_atoms_ProductLogo__WEBPACK_IMPORTED_MODULE_8__.ProductLogo, { |
| 1933 |
slug: productSlug, |
| 1934 |
size: 24, |
| 1935 |
variant: "nobg", |
| 1936 |
productName: productName |
| 1937 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("span", { |
| 1938 |
className: "text-sm font-medium text-foreground flex-1 min-w-0 truncate text-left", |
| 1939 |
children: productName |
| 1940 |
}), headerBadge, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(Chevron, { |
| 1941 |
className: "w-3.5 h-3.5 text-muted-foreground shrink-0 transition-transform duration-150" |
| 1942 |
})] |
| 1943 |
}), isOpen && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("div", { |
| 1944 |
className: "border-t", |
| 1945 |
children: tiers.map(lp => { |
| 1946 |
const expiryStatus = (0,_lib_license_utils__WEBPACK_IMPORTED_MODULE_11__.getExpiryStatus)(lp.expires); |
| 1947 |
const isActivatedHere = lp.is_valid && lp.activated_here === true; |
| 1948 |
const showActivate = !isActivatedHere && !!activationUrl; |
| 1949 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("div", { |
| 1950 |
className: "flex items-center justify-between px-3 py-2 bg-muted/50 border-b last:border-b-0", |
| 1951 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("div", { |
| 1952 |
className: "flex flex-col gap-0.5 min-w-0", |
| 1953 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)(_components_ui_tooltip__WEBPACK_IMPORTED_MODULE_7__.Tooltip, { |
| 1954 |
label: isActivatedHere ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Activated', '%TEXTDOMAIN%') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Not activated', '%TEXTDOMAIN%'), |
| 1955 |
className: "flex items-center gap-2", |
| 1956 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("span", { |
| 1957 |
className: "font-bold text-[11px] w-fit whitespace-nowrap", |
| 1958 |
children: tierNameMap[lp.tier] ?? lp.tier |
| 1959 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("span", { |
| 1960 |
"aria-hidden": "true", |
| 1961 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_10__.cn)('size-1.5 rounded-full shrink-0', isActivatedHere ? 'bg-green-500' : 'bg-amber-500') |
| 1962 |
})] |
| 1963 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("span", { |
| 1964 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_10__.cn)('text-[11px]', _lib_license_utils__WEBPACK_IMPORTED_MODULE_11__.expiryTextClass[expiryStatus]), |
| 1965 |
children: [expiryStatus === 'expired' ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Expired', '%TEXTDOMAIN%') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Expires', '%TEXTDOMAIN%'), ' ', (0,_lib_license_utils__WEBPACK_IMPORTED_MODULE_11__.formatDate)(lp.expires)] |
| 1966 |
})] |
| 1967 |
}), showActivate && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_components_ui_button__WEBPACK_IMPORTED_MODULE_6__.Button, { |
| 1968 |
variant: "outline", |
| 1969 |
size: "xs", |
| 1970 |
asChild: true, |
| 1971 |
className: "shrink-0 ml-2", |
| 1972 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("a", { |
| 1973 |
href: (0,_lib_activation_url__WEBPACK_IMPORTED_MODULE_9__.buildActivationUrl)(activationUrl, lp.product_slug, lp.tier), |
| 1974 |
target: "_blank", |
| 1975 |
rel: "noopener noreferrer", |
| 1976 |
children: [(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Activate', '%TEXTDOMAIN%'), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_4__["default"], { |
| 1977 |
className: "w-3 h-3 -translate-y-px" |
| 1978 |
})] |
| 1979 |
}) |
| 1980 |
})] |
| 1981 |
}, `${lp.product_slug}:${lp.tier}`); |
| 1982 |
}) |
| 1983 |
})] |
| 1984 |
}); |
| 1985 |
} |
| 1986 |
|
| 1987 |
/***/ }, |
| 1988 |
|
| 1989 |
/***/ "./resources/js/components/molecules/NotActivatedBanner.tsx" |
| 1990 |
/*!******************************************************************!*\ |
| 1991 |
!*** ./resources/js/components/molecules/NotActivatedBanner.tsx ***! |
| 1992 |
\******************************************************************/ |
| 1993 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 1994 |
|
| 1995 |
__webpack_require__.r(__webpack_exports__); |
| 1996 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1997 |
/* harmony export */ NotActivatedBanner: () => (/* binding */ NotActivatedBanner) |
| 1998 |
/* harmony export */ }); |
| 1999 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 2000 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 2001 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 2002 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); |
| 2003 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/info.js"); |
| 2004 |
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/store */ "./resources/js/store/index.ts"); |
| 2005 |
/* harmony import */ var _lib_harbor_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/lib/harbor-data */ "./resources/js/lib/harbor-data.ts"); |
| 2006 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2007 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__); |
| 2008 |
/** |
| 2009 |
* Info banner shown when all licensed products are unactivated on this domain. |
| 2010 |
* |
| 2011 |
* Fires when every product's validation_status is 'not_activated' or |
| 2012 |
* 'activation_required'. Links to the Liquid Web portal so the user can |
| 2013 |
* activate their license for this domain. |
| 2014 |
* |
| 2015 |
* @package LiquidWeb\Harbor |
| 2016 |
*/ |
| 2017 |
|
| 2018 |
|
| 2019 |
|
| 2020 |
|
| 2021 |
|
| 2022 |
|
| 2023 |
/** |
| 2024 |
* @since 1.3.0 Read activationUrl through the getHarborDataValue helper. |
| 2025 |
* @since 1.0.0 |
| 2026 |
*/ |
| 2027 |
|
| 2028 |
function NotActivatedBanner() { |
| 2029 |
const allNotActivated = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => select(_store__WEBPACK_IMPORTED_MODULE_3__.store).areAllProductsNotActivated(), []); |
| 2030 |
const licenseKey = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => select(_store__WEBPACK_IMPORTED_MODULE_3__.store).getLicenseKey(), []); |
| 2031 |
const activationUrl = (0,_lib_harbor_data__WEBPACK_IMPORTED_MODULE_4__.getHarborDataValue)('activationUrl'); |
| 2032 |
if (!allNotActivated || !licenseKey || !activationUrl) return null; |
| 2033 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", { |
| 2034 |
role: "alert", |
| 2035 |
className: "flex items-start gap-3 rounded-lg border border-blue-200 bg-blue-50 mt-8 mb-0 px-4 py-3 text-sm text-blue-800", |
| 2036 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_2__["default"], { |
| 2037 |
className: "w-4 h-4 shrink-0 mt-0.5" |
| 2038 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("p", { |
| 2039 |
className: "m-0", |
| 2040 |
children: [(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('None of your products are activated for this domain. Activate your license to download and activate premium products.', '%TEXTDOMAIN%'), ' ', /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("a", { |
| 2041 |
href: activationUrl, |
| 2042 |
target: "_blank", |
| 2043 |
rel: "noopener noreferrer", |
| 2044 |
className: "underline font-medium", |
| 2045 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Activate now', '%TEXTDOMAIN%') |
| 2046 |
})] |
| 2047 |
})] |
| 2048 |
}); |
| 2049 |
} |
| 2050 |
|
| 2051 |
/***/ }, |
| 2052 |
|
| 2053 |
/***/ "./resources/js/components/molecules/ReloadBanner.tsx" |
| 2054 |
/*!************************************************************!*\ |
| 2055 |
!*** ./resources/js/components/molecules/ReloadBanner.tsx ***! |
| 2056 |
\************************************************************/ |
| 2057 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 2058 |
|
| 2059 |
__webpack_require__.r(__webpack_exports__); |
| 2060 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2061 |
/* harmony export */ ReloadBanner: () => (/* binding */ ReloadBanner) |
| 2062 |
/* harmony export */ }); |
| 2063 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 2064 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 2065 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/refresh-cw.js"); |
| 2066 |
/* harmony import */ var _context_reload_banner_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/context/reload-banner-context */ "./resources/js/context/reload-banner-context.tsx"); |
| 2067 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2068 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); |
| 2069 |
/** |
| 2070 |
* Persistent banner shown when feature toggles require a page reload. |
| 2071 |
* |
| 2072 |
* Uses role="status" + aria-live="polite" so screen readers announce it once |
| 2073 |
* when it appears, without interrupting the current focus. |
| 2074 |
* |
| 2075 |
* @package LiquidWeb\Harbor |
| 2076 |
*/ |
| 2077 |
|
| 2078 |
|
| 2079 |
|
| 2080 |
|
| 2081 |
/** |
| 2082 |
* @since 1.0.0 |
| 2083 |
*/ |
| 2084 |
|
| 2085 |
function ReloadBanner() { |
| 2086 |
const { |
| 2087 |
needsReload |
| 2088 |
} = (0,_context_reload_banner_context__WEBPACK_IMPORTED_MODULE_2__.useReloadBanner)(); |
| 2089 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { |
| 2090 |
role: "status", |
| 2091 |
"aria-live": "polite", |
| 2092 |
"aria-atomic": "true", |
| 2093 |
className: "ml-auto", |
| 2094 |
children: needsReload && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("button", { |
| 2095 |
type: "button", |
| 2096 |
onClick: () => window.location.reload(), |
| 2097 |
className: "flex items-center gap-2 rounded-md border border-amber-200 bg-amber-50 px-3 py-1.5 text-xs text-amber-800 hover:bg-amber-100 transition-colors", |
| 2098 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_1__["default"], { |
| 2099 |
className: "w-3.5 h-3.5 shrink-0", |
| 2100 |
"aria-hidden": "true" |
| 2101 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("span", { |
| 2102 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Reload page to see changes', '%TEXTDOMAIN%') |
| 2103 |
})] |
| 2104 |
}) |
| 2105 |
}); |
| 2106 |
} |
| 2107 |
|
| 2108 |
/***/ }, |
| 2109 |
|
| 2110 |
/***/ "./resources/js/components/molecules/TierGroup.tsx" |
| 2111 |
/*!*********************************************************!*\ |
| 2112 |
!*** ./resources/js/components/molecules/TierGroup.tsx ***! |
| 2113 |
\*********************************************************/ |
| 2114 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 2115 |
|
| 2116 |
__webpack_require__.r(__webpack_exports__); |
| 2117 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2118 |
/* harmony export */ TierGroup: () => (/* binding */ TierGroup) |
| 2119 |
/* harmony export */ }); |
| 2120 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 2121 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 2122 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 2123 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 2124 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/chevron-down.js"); |
| 2125 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/chevron-right.js"); |
| 2126 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/lock.js"); |
| 2127 |
/* harmony import */ var _components_ui_badge__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/ui/badge */ "./resources/js/components/ui/badge.tsx"); |
| 2128 |
/* harmony import */ var _components_atoms_LicenseBadge__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/atoms/LicenseBadge */ "./resources/js/components/atoms/LicenseBadge.tsx"); |
| 2129 |
/* harmony import */ var _components_atoms_PurchaseLink__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/atoms/PurchaseLink */ "./resources/js/components/atoms/PurchaseLink.tsx"); |
| 2130 |
/* harmony import */ var _components_molecules_FeatureRow__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/molecules/FeatureRow */ "./resources/js/components/molecules/FeatureRow.tsx"); |
| 2131 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2132 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__); |
| 2133 |
/** |
| 2134 |
* Collapsible accordion grouping locked features under a tier header. |
| 2135 |
* |
| 2136 |
* Shows the tier name, feature count, a lock indicator, and an upgrade |
| 2137 |
* button. Expanding the accordion reveals the locked FeatureRow entries. |
| 2138 |
* |
| 2139 |
* @package LiquidWeb\Harbor |
| 2140 |
*/ |
| 2141 |
|
| 2142 |
|
| 2143 |
|
| 2144 |
|
| 2145 |
|
| 2146 |
|
| 2147 |
|
| 2148 |
|
| 2149 |
/** |
| 2150 |
* @since 1.0.1 Added showUnactivated prop to render an Unactivated badge in place of the upgrade button. |
| 2151 |
* @since 1.0.0 |
| 2152 |
*/ |
| 2153 |
function TierGroup({ |
| 2154 |
tier, |
| 2155 |
features, |
| 2156 |
forceOpen = false, |
| 2157 |
showUpgrade = true, |
| 2158 |
showUnactivated = false, |
| 2159 |
buttonHref |
| 2160 |
}) { |
| 2161 |
const [expanded, setExpanded] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false); |
| 2162 |
const isOpen = expanded || forceOpen; |
| 2163 |
const Chevron = isOpen ? lucide_react__WEBPACK_IMPORTED_MODULE_2__["default"] : lucide_react__WEBPACK_IMPORTED_MODULE_3__["default"]; |
| 2164 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.Fragment, { |
| 2165 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)("div", { |
| 2166 |
className: "w-full flex items-center gap-2 px-4 py-3 bg-muted/50 border-b", |
| 2167 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)("div", { |
| 2168 |
onClick: () => setExpanded(!expanded), |
| 2169 |
className: "flex items-center gap-2 cursor-pointer hover:opacity-80 transition-opacity", |
| 2170 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(Chevron, { |
| 2171 |
className: "w-4 h-4 shrink-0 text-muted-foreground" |
| 2172 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)("span", { |
| 2173 |
className: "font-medium text-sm", |
| 2174 |
children: [tier.name, " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Features', '%TEXTDOMAIN%')] |
| 2175 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_components_ui_badge__WEBPACK_IMPORTED_MODULE_5__.Badge, { |
| 2176 |
variant: "secondary", |
| 2177 |
className: "text-xs", |
| 2178 |
children: features.length |
| 2179 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_4__["default"], { |
| 2180 |
className: "w-3.5 h-3.5 text-muted-foreground ml-1" |
| 2181 |
})] |
| 2182 |
}), showUpgrade && buttonHref && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_components_atoms_PurchaseLink__WEBPACK_IMPORTED_MODULE_7__.PurchaseLink, { |
| 2183 |
tierName: tier.name, |
| 2184 |
upgradeUrl: buttonHref, |
| 2185 |
className: "ml-auto shrink-0" |
| 2186 |
}), showUnactivated && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_components_atoms_LicenseBadge__WEBPACK_IMPORTED_MODULE_6__.LicenseBadge, { |
| 2187 |
type: "unactivated", |
| 2188 |
className: "ml-auto shrink-0 text-xs" |
| 2189 |
})] |
| 2190 |
}), isOpen && features.map(feature => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_components_molecules_FeatureRow__WEBPACK_IMPORTED_MODULE_8__.FeatureRow, { |
| 2191 |
feature: feature, |
| 2192 |
upgradeTierName: tier.name |
| 2193 |
}, feature.slug))] |
| 2194 |
}); |
| 2195 |
} |
| 2196 |
|
| 2197 |
/***/ }, |
| 2198 |
|
| 2199 |
/***/ "./resources/js/components/molecules/UpsellCard.tsx" |
| 2200 |
/*!**********************************************************!*\ |
| 2201 |
!*** ./resources/js/components/molecules/UpsellCard.tsx ***! |
| 2202 |
\**********************************************************/ |
| 2203 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 2204 |
|
| 2205 |
__webpack_require__.r(__webpack_exports__); |
| 2206 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2207 |
/* harmony export */ UpsellCard: () => (/* binding */ UpsellCard) |
| 2208 |
/* harmony export */ }); |
| 2209 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 2210 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 2211 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/external-link.js"); |
| 2212 |
/* harmony import */ var _components_atoms_ProductLogo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/atoms/ProductLogo */ "./resources/js/components/atoms/ProductLogo.tsx"); |
| 2213 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2214 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); |
| 2215 |
/** |
| 2216 |
* Upsell card for a product not covered by the current license. |
| 2217 |
* |
| 2218 |
* @package LiquidWeb\Harbor |
| 2219 |
*/ |
| 2220 |
|
| 2221 |
|
| 2222 |
|
| 2223 |
|
| 2224 |
const UPSELL_TAGLINES = { |
| 2225 |
give: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Beautiful donation forms & fundraising', '%TEXTDOMAIN%'), |
| 2226 |
'the-events-calendar': (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Tickets, RSVPs & event management', '%TEXTDOMAIN%'), |
| 2227 |
learndash: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Sell courses & manage learners', '%TEXTDOMAIN%'), |
| 2228 |
kadence: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Themes, blocks & design tools', '%TEXTDOMAIN%') |
| 2229 |
}; |
| 2230 |
/** |
| 2231 |
* @since 1.0.0 |
| 2232 |
*/ |
| 2233 |
function UpsellCard({ |
| 2234 |
product, |
| 2235 |
href |
| 2236 |
}) { |
| 2237 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("a", { |
| 2238 |
href: href, |
| 2239 |
target: "_blank", |
| 2240 |
rel: "noopener noreferrer", |
| 2241 |
className: "flex items-center gap-2.5 rounded-xl border bg-card px-4 py-3 hover:bg-muted/50 transition-colors", |
| 2242 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_components_atoms_ProductLogo__WEBPACK_IMPORTED_MODULE_2__.ProductLogo, { |
| 2243 |
slug: product.slug, |
| 2244 |
size: 32, |
| 2245 |
variant: "nobg", |
| 2246 |
productName: product.name |
| 2247 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", { |
| 2248 |
className: "flex-1 min-w-0", |
| 2249 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("span", { |
| 2250 |
className: "text-sm font-medium text-foreground block", |
| 2251 |
children: product.name |
| 2252 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("span", { |
| 2253 |
className: "text-xs text-muted-foreground", |
| 2254 |
children: UPSELL_TAGLINES[product.slug] ?? product.tagline |
| 2255 |
})] |
| 2256 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_1__["default"], { |
| 2257 |
className: "w-3.5 h-3.5 text-muted-foreground shrink-0" |
| 2258 |
})] |
| 2259 |
}); |
| 2260 |
} |
| 2261 |
|
| 2262 |
/***/ }, |
| 2263 |
|
| 2264 |
/***/ "./resources/js/components/molecules/VersionDisplay.tsx" |
| 2265 |
/*!**************************************************************!*\ |
| 2266 |
!*** ./resources/js/components/molecules/VersionDisplay.tsx ***! |
| 2267 |
\**************************************************************/ |
| 2268 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 2269 |
|
| 2270 |
__webpack_require__.r(__webpack_exports__); |
| 2271 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2272 |
/* harmony export */ VersionDisplay: () => (/* binding */ VersionDisplay) |
| 2273 |
/* harmony export */ }); |
| 2274 |
/* harmony import */ var _components_atoms_UpdateButton__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/atoms/UpdateButton */ "./resources/js/components/atoms/UpdateButton.tsx"); |
| 2275 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2276 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__); |
| 2277 |
/** |
| 2278 |
* Displays the installed/available version of a feature, with an update |
| 2279 |
* button when a newer version is available. |
| 2280 |
* |
| 2281 |
* When upgradeLabel is provided the update button is rendered fully disabled |
| 2282 |
* (no onClick handler) with an upsell tooltip. |
| 2283 |
* |
| 2284 |
* @package LiquidWeb\Harbor |
| 2285 |
*/ |
| 2286 |
|
| 2287 |
|
| 2288 |
|
| 2289 |
/** |
| 2290 |
* @since 1.0.0 |
| 2291 |
*/ |
| 2292 |
function VersionDisplay({ |
| 2293 |
feature, |
| 2294 |
upgradeLabel, |
| 2295 |
pendingAction = null, |
| 2296 |
installableBusy = false, |
| 2297 |
onUpdate |
| 2298 |
}) { |
| 2299 |
if (feature.update_version) { |
| 2300 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", { |
| 2301 |
className: "flex items-center gap-1.5", |
| 2302 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span", { |
| 2303 |
className: "text-xs font-mono text-muted-foreground line-through", |
| 2304 |
children: ["v", feature.installed_version] |
| 2305 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", { |
| 2306 |
className: "text-muted-foreground text-xs", |
| 2307 |
children: "\u2192" |
| 2308 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span", { |
| 2309 |
className: "text-xs font-mono font-bold", |
| 2310 |
children: ["v", feature.update_version] |
| 2311 |
}), (upgradeLabel || onUpdate) && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components_atoms_UpdateButton__WEBPACK_IMPORTED_MODULE_0__.UpdateButton, { |
| 2312 |
featureName: feature.name, |
| 2313 |
disabled: !!pendingAction || installableBusy, |
| 2314 |
onClick: onUpdate, |
| 2315 |
upgradeLabel: upgradeLabel |
| 2316 |
})] |
| 2317 |
}); |
| 2318 |
} |
| 2319 |
if (!feature.version && !feature.installed_version) { |
| 2320 |
return null; |
| 2321 |
} |
| 2322 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", { |
| 2323 |
className: "text-xs font-mono text-muted-foreground text-right", |
| 2324 |
children: `v${feature.installed_version ?? feature.version}` |
| 2325 |
}); |
| 2326 |
} |
| 2327 |
|
| 2328 |
/***/ }, |
| 2329 |
|
| 2330 |
/***/ "./resources/js/components/molecules/WelcomeLicenseForm.tsx" |
| 2331 |
/*!******************************************************************!*\ |
| 2332 |
!*** ./resources/js/components/molecules/WelcomeLicenseForm.tsx ***! |
| 2333 |
\******************************************************************/ |
| 2334 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 2335 |
|
| 2336 |
__webpack_require__.r(__webpack_exports__); |
| 2337 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2338 |
/* harmony export */ WelcomeLicenseForm: () => (/* binding */ WelcomeLicenseForm) |
| 2339 |
/* harmony export */ }); |
| 2340 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 2341 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 2342 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/loader-circle.js"); |
| 2343 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/key-round.js"); |
| 2344 |
/* harmony import */ var _components_ui_input__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/ui/input */ "./resources/js/components/ui/input.tsx"); |
| 2345 |
/* harmony import */ var _components_ui_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/ui/button */ "./resources/js/components/ui/button.tsx"); |
| 2346 |
/* harmony import */ var _components_atoms_SectionHeader__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/atoms/SectionHeader */ "./resources/js/components/atoms/SectionHeader.tsx"); |
| 2347 |
/* harmony import */ var _hooks_useWelcomeLicenseForm__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/hooks/useWelcomeLicenseForm */ "./resources/js/hooks/useWelcomeLicenseForm.ts"); |
| 2348 |
/* harmony import */ var _lib_harbor_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/lib/harbor-data */ "./resources/js/lib/harbor-data.ts"); |
| 2349 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2350 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__); |
| 2351 |
/** |
| 2352 |
* License input + Activate button used on the welcome screen. |
| 2353 |
* |
| 2354 |
* Pure composition of UI primitives wired to useWelcomeLicenseForm. |
| 2355 |
* No useState, no derived values, no async logic — the component file |
| 2356 |
* is for layout and JSX wiring only. |
| 2357 |
* |
| 2358 |
* @package LiquidWeb\Harbor |
| 2359 |
*/ |
| 2360 |
|
| 2361 |
|
| 2362 |
|
| 2363 |
|
| 2364 |
|
| 2365 |
|
| 2366 |
|
| 2367 |
|
| 2368 |
/** |
| 2369 |
* @since 1.3.0 |
| 2370 |
*/ |
| 2371 |
|
| 2372 |
function WelcomeLicenseForm() { |
| 2373 |
const { |
| 2374 |
key, |
| 2375 |
serverError, |
| 2376 |
isStoring, |
| 2377 |
canModifyLicense, |
| 2378 |
showFormatHint, |
| 2379 |
canSubmit, |
| 2380 |
onKeyChange, |
| 2381 |
onActivate |
| 2382 |
} = (0,_hooks_useWelcomeLicenseForm__WEBPACK_IMPORTED_MODULE_6__.useWelcomeLicenseForm)(); |
| 2383 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("form", { |
| 2384 |
className: "rounded-lg border border-neutral-200 bg-white p-4 space-y-3", |
| 2385 |
onSubmit: e => { |
| 2386 |
e.preventDefault(); |
| 2387 |
if (canSubmit) { |
| 2388 |
onActivate(); |
| 2389 |
} |
| 2390 |
}, |
| 2391 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_components_atoms_SectionHeader__WEBPACK_IMPORTED_MODULE_5__.SectionHeader, { |
| 2392 |
icon: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_2__["default"], { |
| 2393 |
className: "w-4 h-4 text-muted-foreground" |
| 2394 |
}), |
| 2395 |
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Unified License', '%TEXTDOMAIN%') |
| 2396 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_components_ui_input__WEBPACK_IMPORTED_MODULE_3__.Input, { |
| 2397 |
id: "welcome-license-key-input", |
| 2398 |
placeholder: (0,_lib_harbor_data__WEBPACK_IMPORTED_MODULE_7__.getLicenseKeyPlaceholder)(), |
| 2399 |
value: key, |
| 2400 |
onChange: e => onKeyChange(e.target.value), |
| 2401 |
className: "font-mono text-sm uppercase", |
| 2402 |
"aria-invalid": !!serverError, |
| 2403 |
"aria-describedby": serverError ? 'welcome-license-error' : showFormatHint ? 'welcome-license-hint' : undefined, |
| 2404 |
disabled: !canModifyLicense |
| 2405 |
// eslint-disable-next-line jsx-a11y/no-autofocus |
| 2406 |
, |
| 2407 |
autoFocus: true |
| 2408 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_components_ui_button__WEBPACK_IMPORTED_MODULE_4__.Button, { |
| 2409 |
type: "submit", |
| 2410 |
className: "w-full", |
| 2411 |
disabled: !canSubmit, |
| 2412 |
children: isStoring ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment, { |
| 2413 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_1__["default"], { |
| 2414 |
className: "w-4 h-4 animate-spin" |
| 2415 |
}), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Verifying…', '%TEXTDOMAIN%')] |
| 2416 |
}) : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Activate', '%TEXTDOMAIN%') |
| 2417 |
}), showFormatHint && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("p", { |
| 2418 |
id: "welcome-license-hint", |
| 2419 |
className: "text-[13px] leading-6 text-muted-foreground tracking-[-0.08px] m-0", |
| 2420 |
children: [(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("This doesn't look like a unified license key.", '%TEXTDOMAIN%'), ' ', (0,_hooks_useWelcomeLicenseForm__WEBPACK_IMPORTED_MODULE_6__.getNonUnifiedLicenseAdvice)()] |
| 2421 |
}), serverError && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("p", { |
| 2422 |
id: "welcome-license-error", |
| 2423 |
className: "text-[13px] leading-6 text-destructive tracking-[-0.08px] m-0", |
| 2424 |
role: "alert", |
| 2425 |
children: serverError |
| 2426 |
})] |
| 2427 |
}); |
| 2428 |
} |
| 2429 |
|
| 2430 |
/***/ }, |
| 2431 |
|
| 2432 |
/***/ "./resources/js/components/molecules/WelcomeNoticeBanner.tsx" |
| 2433 |
/*!*******************************************************************!*\ |
| 2434 |
!*** ./resources/js/components/molecules/WelcomeNoticeBanner.tsx ***! |
| 2435 |
\*******************************************************************/ |
| 2436 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 2437 |
|
| 2438 |
__webpack_require__.r(__webpack_exports__); |
| 2439 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2440 |
/* harmony export */ WelcomeNoticeBanner: () => (/* binding */ WelcomeNoticeBanner) |
| 2441 |
/* harmony export */ }); |
| 2442 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/info.js"); |
| 2443 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2444 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__); |
| 2445 |
/** |
| 2446 |
* Generic info callout used by the welcome flow. |
| 2447 |
* |
| 2448 |
* The molecule is a pure passthrough — the caller composes the message |
| 2449 |
* (with createInterpolateElement, plain JSX, or a string) and passes |
| 2450 |
* it as children. Reusable for any future welcome-screen message |
| 2451 |
* without coupling to a specific copy block. |
| 2452 |
* |
| 2453 |
* @package LiquidWeb\Harbor |
| 2454 |
*/ |
| 2455 |
|
| 2456 |
|
| 2457 |
|
| 2458 |
/** |
| 2459 |
* @since 1.3.0 |
| 2460 |
*/ |
| 2461 |
function WelcomeNoticeBanner({ |
| 2462 |
children |
| 2463 |
}) { |
| 2464 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", { |
| 2465 |
className: "flex gap-3 rounded-lg border border-neutral-200 bg-blue-50 pl-4 pr-11 py-4 text-sm text-blue-900", |
| 2466 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_0__["default"], { |
| 2467 |
className: "color-blue-600 mt-0.5 h-4 w-4 shrink-0" |
| 2468 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p", { |
| 2469 |
className: "text-[13px] leading-6 m-0", |
| 2470 |
children: children |
| 2471 |
})] |
| 2472 |
}); |
| 2473 |
} |
| 2474 |
|
| 2475 |
/***/ }, |
| 2476 |
|
| 2477 |
/***/ "./resources/js/components/organisms/AppLoader.tsx" |
| 2478 |
/*!*********************************************************!*\ |
| 2479 |
!*** ./resources/js/components/organisms/AppLoader.tsx ***! |
| 2480 |
\*********************************************************/ |
| 2481 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 2482 |
|
| 2483 |
__webpack_require__.r(__webpack_exports__); |
| 2484 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2485 |
/* harmony export */ AppLoader: () => (/* binding */ AppLoader) |
| 2486 |
/* harmony export */ }); |
| 2487 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 2488 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 2489 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/loader-circle.js"); |
| 2490 |
/* harmony import */ var _components_templates_WelcomeShell__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/templates/WelcomeShell */ "./resources/js/components/templates/WelcomeShell.tsx"); |
| 2491 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2492 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); |
| 2493 |
/** |
| 2494 |
* Boot-time loader. |
| 2495 |
* |
| 2496 |
* Mounted by AppContent while the license resolver is on its first |
| 2497 |
* resolve. Borrows WelcomeShell chrome because that is the only chrome |
| 2498 |
* available before license resolution decides which screen to show. |
| 2499 |
* |
| 2500 |
* @package LiquidWeb\Harbor |
| 2501 |
*/ |
| 2502 |
|
| 2503 |
|
| 2504 |
|
| 2505 |
|
| 2506 |
/** |
| 2507 |
* @since 1.3.0 |
| 2508 |
*/ |
| 2509 |
|
| 2510 |
function AppLoader() { |
| 2511 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_components_templates_WelcomeShell__WEBPACK_IMPORTED_MODULE_2__.WelcomeShell, { |
| 2512 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", { |
| 2513 |
className: "flex flex-col items-center gap-2 text-sm text-muted-foreground", |
| 2514 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_1__["default"], { |
| 2515 |
className: "w-5 h-5 animate-spin" |
| 2516 |
}), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Loading…', '%TEXTDOMAIN%')] |
| 2517 |
}) |
| 2518 |
}); |
| 2519 |
} |
| 2520 |
|
| 2521 |
/***/ }, |
| 2522 |
|
| 2523 |
/***/ "./resources/js/components/organisms/ErrorModal.tsx" |
| 2524 |
/*!**********************************************************!*\ |
| 2525 |
!*** ./resources/js/components/organisms/ErrorModal.tsx ***! |
| 2526 |
\**********************************************************/ |
| 2527 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 2528 |
|
| 2529 |
__webpack_require__.r(__webpack_exports__); |
| 2530 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2531 |
/* harmony export */ ErrorModal: () => (/* binding */ ErrorModal) |
| 2532 |
/* harmony export */ }); |
| 2533 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 2534 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 2535 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/external-link.js"); |
| 2536 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/mail.js"); |
| 2537 |
/* harmony import */ var _context_error_modal_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/context/error-modal-context */ "./resources/js/context/error-modal-context.tsx"); |
| 2538 |
/* harmony import */ var _components_ui_dialog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/ui/dialog */ "./resources/js/components/ui/dialog.tsx"); |
| 2539 |
/* harmony import */ var _components_atoms_ErrorItem__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/atoms/ErrorItem */ "./resources/js/components/atoms/ErrorItem.tsx"); |
| 2540 |
/* harmony import */ var _components_ui_button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/ui/button */ "./resources/js/components/ui/button.tsx"); |
| 2541 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2542 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__); |
| 2543 |
/** |
| 2544 |
* Error modal organism. |
| 2545 |
* |
| 2546 |
* Renders when the ErrorModalContext holds active errors. Lists each error |
| 2547 |
* and provides a Dismiss button so the user can close the modal and interact |
| 2548 |
* with the UI (e.g. to update the license key). |
| 2549 |
* |
| 2550 |
* @package LiquidWeb\Harbor |
| 2551 |
*/ |
| 2552 |
|
| 2553 |
|
| 2554 |
|
| 2555 |
|
| 2556 |
|
| 2557 |
|
| 2558 |
|
| 2559 |
const DOCS_URL = 'https://www.liquidweb.com/help-docs/software/'; |
| 2560 |
const SUPPORT_URL = 'https://software.liquidweb.com/support/'; |
| 2561 |
|
| 2562 |
/** |
| 2563 |
* @since 1.0.0 |
| 2564 |
*/ |
| 2565 |
function ErrorModal() { |
| 2566 |
const { |
| 2567 |
errors, |
| 2568 |
clearAll |
| 2569 |
} = (0,_context_error_modal_context__WEBPACK_IMPORTED_MODULE_3__.useErrorModal)(); |
| 2570 |
if (errors.length === 0) return null; |
| 2571 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_components_ui_dialog__WEBPACK_IMPORTED_MODULE_4__.Dialog, { |
| 2572 |
open: true, |
| 2573 |
onClose: clearAll, |
| 2574 |
maxWidth: "max-w-xl", |
| 2575 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_ui_dialog__WEBPACK_IMPORTED_MODULE_4__.DialogHeader, { |
| 2576 |
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('There are issues that need your attention', '%TEXTDOMAIN%'), |
| 2577 |
onClose: clearAll |
| 2578 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_ui_dialog__WEBPACK_IMPORTED_MODULE_4__.DialogContent, { |
| 2579 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("ul", { |
| 2580 |
className: "flex flex-col gap-6", |
| 2581 |
children: errors.map(error => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_atoms_ErrorItem__WEBPACK_IMPORTED_MODULE_5__.ErrorItem, { |
| 2582 |
error: error |
| 2583 |
}, error.code)) |
| 2584 |
}) |
| 2585 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_components_ui_dialog__WEBPACK_IMPORTED_MODULE_4__.DialogFooter, { |
| 2586 |
className: "justify-between items-center bg-gray-100 rounded-b-lg py-4", |
| 2587 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", { |
| 2588 |
className: "flex flex-col gap-1", |
| 2589 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("p", { |
| 2590 |
className: "text-xs text-muted-foreground m-0", |
| 2591 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Need help resolving this?', '%TEXTDOMAIN%') |
| 2592 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", { |
| 2593 |
className: "flex gap-8", |
| 2594 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("a", { |
| 2595 |
href: DOCS_URL, |
| 2596 |
target: "_blank", |
| 2597 |
rel: "noreferrer", |
| 2598 |
className: "flex items-center gap-1 text-xs font-bold uppercase text-muted-foreground hover:text-foreground transition-colors", |
| 2599 |
children: [(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('View documentation', '%TEXTDOMAIN%'), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_1__["default"], { |
| 2600 |
className: "w-3 h-3 -translate-y-px" |
| 2601 |
})] |
| 2602 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("a", { |
| 2603 |
href: SUPPORT_URL, |
| 2604 |
target: "_blank", |
| 2605 |
rel: "noreferrer", |
| 2606 |
className: "flex items-center gap-1 text-xs font-bold uppercase text-muted-foreground hover:text-foreground transition-colors", |
| 2607 |
children: [(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Contact support', '%TEXTDOMAIN%'), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_2__["default"], { |
| 2608 |
className: "w-3 h-3 -translate-y-px" |
| 2609 |
})] |
| 2610 |
})] |
| 2611 |
})] |
| 2612 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_ui_button__WEBPACK_IMPORTED_MODULE_6__.Button, { |
| 2613 |
size: "lg", |
| 2614 |
onClick: clearAll, |
| 2615 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Dismiss', '%TEXTDOMAIN%') |
| 2616 |
})] |
| 2617 |
})] |
| 2618 |
}); |
| 2619 |
} |
| 2620 |
|
| 2621 |
/***/ }, |
| 2622 |
|
| 2623 |
/***/ "./resources/js/components/organisms/LicensePanel.tsx" |
| 2624 |
/*!************************************************************!*\ |
| 2625 |
!*** ./resources/js/components/organisms/LicensePanel.tsx ***! |
| 2626 |
\************************************************************/ |
| 2627 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 2628 |
|
| 2629 |
__webpack_require__.r(__webpack_exports__); |
| 2630 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2631 |
/* harmony export */ LicensePanel: () => (/* binding */ LicensePanel) |
| 2632 |
/* harmony export */ }); |
| 2633 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 2634 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 2635 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 2636 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 2637 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 2638 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); |
| 2639 |
/* harmony import */ var _components_organisms_LicenseSection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/organisms/LicenseSection */ "./resources/js/components/organisms/LicenseSection.tsx"); |
| 2640 |
/* harmony import */ var _components_organisms_UpsellSection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/organisms/UpsellSection */ "./resources/js/components/organisms/UpsellSection.tsx"); |
| 2641 |
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/store */ "./resources/js/store/index.ts"); |
| 2642 |
/* harmony import */ var _data_products__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/data/products */ "./resources/js/data/products.ts"); |
| 2643 |
/* harmony import */ var _context_toast_context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/context/toast-context */ "./resources/js/context/toast-context.tsx"); |
| 2644 |
/* harmony import */ var _context_error_modal_context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/context/error-modal-context */ "./resources/js/context/error-modal-context.tsx"); |
| 2645 |
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/errors */ "./resources/js/errors/index.ts"); |
| 2646 |
/* harmony import */ var _lib_harbor_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/lib/harbor-data */ "./resources/js/lib/harbor-data.ts"); |
| 2647 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2648 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__); |
| 2649 |
/** |
| 2650 |
* License sidebar panel. |
| 2651 |
* |
| 2652 |
* Always visible. Fetches license and catalog data from the store and passes |
| 2653 |
* it to LicenseSection and UpsellSection. |
| 2654 |
* |
| 2655 |
* @package LiquidWeb\Harbor |
| 2656 |
*/ |
| 2657 |
|
| 2658 |
|
| 2659 |
|
| 2660 |
|
| 2661 |
|
| 2662 |
|
| 2663 |
|
| 2664 |
|
| 2665 |
|
| 2666 |
|
| 2667 |
|
| 2668 |
|
| 2669 |
/** |
| 2670 |
* @since 1.3.0 Read activationUrl through the getHarborDataValue helper. |
| 2671 |
* @since 1.0.0 |
| 2672 |
*/ |
| 2673 |
|
| 2674 |
function LicensePanel() { |
| 2675 |
const { |
| 2676 |
addToast |
| 2677 |
} = (0,_context_toast_context__WEBPACK_IMPORTED_MODULE_7__.useToast)(); |
| 2678 |
const { |
| 2679 |
addError |
| 2680 |
} = (0,_context_error_modal_context__WEBPACK_IMPORTED_MODULE_8__.useErrorModal)(); |
| 2681 |
const { |
| 2682 |
deleteLicense, |
| 2683 |
refreshLicense, |
| 2684 |
refreshCatalog |
| 2685 |
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useDispatch)(_store__WEBPACK_IMPORTED_MODULE_5__.store); |
| 2686 |
const { |
| 2687 |
licenseKey, |
| 2688 |
licenseProducts, |
| 2689 |
catalogs, |
| 2690 |
isRefreshing, |
| 2691 |
isLicenseLoading |
| 2692 |
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => ({ |
| 2693 |
licenseKey: select(_store__WEBPACK_IMPORTED_MODULE_5__.store).getLicenseKey(), |
| 2694 |
licenseProducts: select(_store__WEBPACK_IMPORTED_MODULE_5__.store).getLicenseProducts(), |
| 2695 |
catalogs: select(_store__WEBPACK_IMPORTED_MODULE_5__.store).getCatalog(), |
| 2696 |
isRefreshing: select(_store__WEBPACK_IMPORTED_MODULE_5__.store).isLicenseRefreshing(), |
| 2697 |
// @ts-expect-error -- hasFinishedResolution is injected at runtime by @wordpress/data but absent from the store's TypeScript surface. |
| 2698 |
isLicenseLoading: !select(_store__WEBPACK_IMPORTED_MODULE_5__.store).hasFinishedResolution('getLicenseKey', []) |
| 2699 |
}), []); |
| 2700 |
|
| 2701 |
// Flat tier slug → display name and rank lookups from all catalog tiers. |
| 2702 |
const { |
| 2703 |
tierNameMap, |
| 2704 |
tierRankMap |
| 2705 |
} = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => { |
| 2706 |
const names = {}; |
| 2707 |
const ranks = {}; |
| 2708 |
catalogs.forEach(catalog => { |
| 2709 |
catalog.tiers.forEach(t => { |
| 2710 |
names[t.tier_slug] = t.name; |
| 2711 |
ranks[t.tier_slug] = t.rank; |
| 2712 |
}); |
| 2713 |
}); |
| 2714 |
return { |
| 2715 |
tierNameMap: names, |
| 2716 |
tierRankMap: ranks |
| 2717 |
}; |
| 2718 |
}, [catalogs]); |
| 2719 |
const activationUrl = licenseKey ? (0,_lib_harbor_data__WEBPACK_IMPORTED_MODULE_10__.getHarborDataValue)('activationUrl') : null; |
| 2720 |
|
| 2721 |
// Product slug → lowest paid-tier purchase URL map from the catalog. |
| 2722 |
const upsellUrlMap = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => { |
| 2723 |
const map = {}; |
| 2724 |
catalogs.forEach(catalog => { |
| 2725 |
const sorted = catalog.tiers.slice().sort((a, b) => a.rank - b.rank); |
| 2726 |
const paidTier = sorted.find(t => t.rank > 0); |
| 2727 |
if (paidTier?.purchase_url) { |
| 2728 |
map[catalog.product_slug] = paidTier.purchase_url; |
| 2729 |
} |
| 2730 |
}); |
| 2731 |
return map; |
| 2732 |
}, [catalogs]); |
| 2733 |
const licensedSlugs = new Set(licenseProducts.map(lp => lp.product_slug)); |
| 2734 |
const upsellProducts = _data_products__WEBPACK_IMPORTED_MODULE_6__.PRODUCTS.filter(p => !licensedSlugs.has(p.slug)); |
| 2735 |
const handleRemove = async () => { |
| 2736 |
const result = await deleteLicense(); |
| 2737 |
if (result instanceof _errors__WEBPACK_IMPORTED_MODULE_9__.HarborError) { |
| 2738 |
addError(result); |
| 2739 |
return result; |
| 2740 |
} |
| 2741 |
addToast((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('License removed.', '%TEXTDOMAIN%'), 'default'); |
| 2742 |
return null; |
| 2743 |
}; |
| 2744 |
const handleRefresh = async () => { |
| 2745 |
const [licenseResult, catalogResult] = await Promise.all([refreshLicense(), refreshCatalog()]); |
| 2746 |
if (licenseResult instanceof _errors__WEBPACK_IMPORTED_MODULE_9__.HarborError) { |
| 2747 |
addError(licenseResult); |
| 2748 |
} |
| 2749 |
if (catalogResult instanceof _errors__WEBPACK_IMPORTED_MODULE_9__.HarborError) { |
| 2750 |
addError(catalogResult); |
| 2751 |
} |
| 2752 |
if (!(licenseResult instanceof _errors__WEBPACK_IMPORTED_MODULE_9__.HarborError) && !(catalogResult instanceof _errors__WEBPACK_IMPORTED_MODULE_9__.HarborError)) { |
| 2753 |
addToast((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('License refreshed.', '%TEXTDOMAIN%'), 'success'); |
| 2754 |
} |
| 2755 |
}; |
| 2756 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("div", { |
| 2757 |
className: "sticky top-4 w-[285px] shrink-0 space-y-6", |
| 2758 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_organisms_LicenseSection__WEBPACK_IMPORTED_MODULE_3__.LicenseSection, { |
| 2759 |
licenseKey: licenseKey, |
| 2760 |
licenseProducts: licenseProducts, |
| 2761 |
tierNameMap: tierNameMap, |
| 2762 |
tierRankMap: tierRankMap, |
| 2763 |
onRemove: handleRemove, |
| 2764 |
onRefresh: handleRefresh, |
| 2765 |
isRefreshing: isRefreshing, |
| 2766 |
isLoading: isLicenseLoading, |
| 2767 |
activationUrl: activationUrl |
| 2768 |
}), !isLicenseLoading && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_organisms_UpsellSection__WEBPACK_IMPORTED_MODULE_4__.UpsellSection, { |
| 2769 |
products: upsellProducts, |
| 2770 |
upsellUrlMap: upsellUrlMap |
| 2771 |
})] |
| 2772 |
}); |
| 2773 |
} |
| 2774 |
|
| 2775 |
/***/ }, |
| 2776 |
|
| 2777 |
/***/ "./resources/js/components/organisms/LicenseSection.tsx" |
| 2778 |
/*!**************************************************************!*\ |
| 2779 |
!*** ./resources/js/components/organisms/LicenseSection.tsx ***! |
| 2780 |
\**************************************************************/ |
| 2781 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 2782 |
|
| 2783 |
__webpack_require__.r(__webpack_exports__); |
| 2784 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2785 |
/* harmony export */ LicenseSection: () => (/* binding */ LicenseSection) |
| 2786 |
/* harmony export */ }); |
| 2787 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 2788 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 2789 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 2790 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 2791 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/loader-circle.js"); |
| 2792 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/key-round.js"); |
| 2793 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/refresh-cw.js"); |
| 2794 |
/* harmony import */ var _components_atoms_SectionHeader__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/atoms/SectionHeader */ "./resources/js/components/atoms/SectionHeader.tsx"); |
| 2795 |
/* harmony import */ var _components_atoms_LicenseKeyInputSkeleton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/atoms/LicenseKeyInputSkeleton */ "./resources/js/components/atoms/LicenseKeyInputSkeleton.tsx"); |
| 2796 |
/* harmony import */ var _components_molecules_LicenseKeyInput__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/molecules/LicenseKeyInput */ "./resources/js/components/molecules/LicenseKeyInput.tsx"); |
| 2797 |
/* harmony import */ var _components_molecules_LicenseProductCard__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/molecules/LicenseProductCard */ "./resources/js/components/molecules/LicenseProductCard.tsx"); |
| 2798 |
/* harmony import */ var _data_products__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/data/products */ "./resources/js/data/products.ts"); |
| 2799 |
/* harmony import */ var _lib_group_license_products__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/lib/group-license-products */ "./resources/js/lib/group-license-products.ts"); |
| 2800 |
/* harmony import */ var _lib_harbor_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/lib/harbor-data */ "./resources/js/lib/harbor-data.ts"); |
| 2801 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2802 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__); |
| 2803 |
/** |
| 2804 |
* License section: header, key input, and licensed-product cards. |
| 2805 |
* |
| 2806 |
* @package LiquidWeb\Harbor |
| 2807 |
*/ |
| 2808 |
|
| 2809 |
|
| 2810 |
|
| 2811 |
|
| 2812 |
|
| 2813 |
|
| 2814 |
|
| 2815 |
|
| 2816 |
|
| 2817 |
|
| 2818 |
|
| 2819 |
/** |
| 2820 |
* Pulse-skeleton that mirrors LicenseProductCard's layout while the license |
| 2821 |
* resolver is still in flight. |
| 2822 |
*/ |
| 2823 |
function LicenseSectionSkeleton() { |
| 2824 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("div", { |
| 2825 |
className: "space-y-3", |
| 2826 |
children: _data_products__WEBPACK_IMPORTED_MODULE_9__.PRODUCTS.map(p => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("div", { |
| 2827 |
className: "rounded-lg border bg-card px-3 py-2.5 animate-pulse", |
| 2828 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("div", { |
| 2829 |
className: "flex items-center gap-2", |
| 2830 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("div", { |
| 2831 |
className: "w-6 h-6 rounded shrink-0 bg-muted" |
| 2832 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("div", { |
| 2833 |
className: "h-3.5 flex-1 rounded bg-muted" |
| 2834 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("div", { |
| 2835 |
className: "h-4 w-14 rounded-full shrink-0 bg-muted" |
| 2836 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("div", { |
| 2837 |
className: "w-3.5 h-3.5 rounded shrink-0 bg-muted" |
| 2838 |
})] |
| 2839 |
}) |
| 2840 |
}, p.slug)) |
| 2841 |
}); |
| 2842 |
} |
| 2843 |
|
| 2844 |
/** |
| 2845 |
* @since 1.3.0 Read subscriptionsUrl through the getHarborDataValue helper. |
| 2846 |
* @since 1.0.0 |
| 2847 |
*/ |
| 2848 |
function LicenseSection({ |
| 2849 |
licenseKey, |
| 2850 |
licenseProducts, |
| 2851 |
tierNameMap, |
| 2852 |
tierRankMap, |
| 2853 |
onRemove, |
| 2854 |
onRefresh, |
| 2855 |
isRefreshing, |
| 2856 |
isLoading, |
| 2857 |
activationUrl |
| 2858 |
}) { |
| 2859 |
const [isEditing, setIsEditing] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false); |
| 2860 |
const hasLicense = licenseKey !== null; |
| 2861 |
const manageUrl = (0,_lib_harbor_data__WEBPACK_IMPORTED_MODULE_11__.getHarborDataValue)('subscriptionsUrl'); |
| 2862 |
const handleRemove = async () => { |
| 2863 |
const error = await onRemove(); |
| 2864 |
if (!error) { |
| 2865 |
setIsEditing(false); |
| 2866 |
} |
| 2867 |
return error; |
| 2868 |
}; |
| 2869 |
const groupedProducts = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => (0,_lib_group_license_products__WEBPACK_IMPORTED_MODULE_10__.groupLicenseProducts)(licenseProducts, tierRankMap), [licenseProducts, tierRankMap]); |
| 2870 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("div", { |
| 2871 |
className: "space-y-3", |
| 2872 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_components_atoms_SectionHeader__WEBPACK_IMPORTED_MODULE_5__.SectionHeader, { |
| 2873 |
icon: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_3__["default"], { |
| 2874 |
className: "w-4 h-4 text-muted-foreground" |
| 2875 |
}), |
| 2876 |
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('License', '%TEXTDOMAIN%'), |
| 2877 |
action: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("button", { |
| 2878 |
type: "button", |
| 2879 |
onClick: onRefresh, |
| 2880 |
disabled: isRefreshing, |
| 2881 |
className: "flex cursor-pointer items-center gap-1 text-[11px] text-muted-foreground transition-colors hover:opacity-75 disabled:opacity-50 disabled:cursor-not-allowed", |
| 2882 |
children: [isRefreshing ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_2__["default"], { |
| 2883 |
className: "w-3 h-3 animate-spin" |
| 2884 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_4__["default"], { |
| 2885 |
className: "w-3 h-3" |
| 2886 |
}), isRefreshing ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Refreshing...', '%TEXTDOMAIN%') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Refresh', '%TEXTDOMAIN%')] |
| 2887 |
}) |
| 2888 |
}), isLoading ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.Fragment, { |
| 2889 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_components_atoms_LicenseKeyInputSkeleton__WEBPACK_IMPORTED_MODULE_6__.LicenseKeyInputSkeleton, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(LicenseSectionSkeleton, {})] |
| 2890 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.Fragment, { |
| 2891 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_components_molecules_LicenseKeyInput__WEBPACK_IMPORTED_MODULE_7__.LicenseKeyInput, { |
| 2892 |
currentKey: licenseKey, |
| 2893 |
isEditing: isEditing, |
| 2894 |
onEdit: () => setIsEditing(true), |
| 2895 |
onCancel: () => setIsEditing(false), |
| 2896 |
onRemove: handleRemove, |
| 2897 |
onSuccess: () => setIsEditing(false) |
| 2898 |
}), !hasLicense && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("p", { |
| 2899 |
className: "text-xs text-muted-foreground leading-relaxed mt-0 mb-0", |
| 2900 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Enter your license key to download and activate premium products.', '%TEXTDOMAIN%') |
| 2901 |
})] |
| 2902 |
}), !isLoading && hasLicense && groupedProducts.length > 0 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("div", { |
| 2903 |
className: "space-y-3", |
| 2904 |
children: [groupedProducts.map(g => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_components_molecules_LicenseProductCard__WEBPACK_IMPORTED_MODULE_8__.LicenseProductCard, { |
| 2905 |
productSlug: g.productSlug, |
| 2906 |
productName: g.productName, |
| 2907 |
tiers: g.tiers, |
| 2908 |
tierNameMap: tierNameMap, |
| 2909 |
activationUrl: activationUrl |
| 2910 |
}, `${g.productSlug}:${g.tiers.some(t => t.is_valid && t.activated_here)}`)), manageUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("p", { |
| 2911 |
className: "text-xs text-muted-foreground text-center mt-1 mb-0", |
| 2912 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("a", { |
| 2913 |
href: manageUrl, |
| 2914 |
target: "_blank", |
| 2915 |
rel: "noopener noreferrer", |
| 2916 |
className: "underline hover:opacity-75", |
| 2917 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Manage license in Liquid Web', '%TEXTDOMAIN%') |
| 2918 |
}) |
| 2919 |
})] |
| 2920 |
})] |
| 2921 |
}); |
| 2922 |
} |
| 2923 |
|
| 2924 |
/***/ }, |
| 2925 |
|
| 2926 |
/***/ "./resources/js/components/organisms/ProductSection.tsx" |
| 2927 |
/*!**************************************************************!*\ |
| 2928 |
!*** ./resources/js/components/organisms/ProductSection.tsx ***! |
| 2929 |
\**************************************************************/ |
| 2930 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 2931 |
|
| 2932 |
__webpack_require__.r(__webpack_exports__); |
| 2933 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2934 |
/* harmony export */ ProductSection: () => (/* binding */ ProductSection) |
| 2935 |
/* harmony export */ }); |
| 2936 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 2937 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 2938 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 2939 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 2940 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 2941 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); |
| 2942 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/chevron-down.js"); |
| 2943 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/chevron-up.js"); |
| 2944 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/external-link.js"); |
| 2945 |
/* harmony import */ var _components_atoms_LicenseBadge__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/atoms/LicenseBadge */ "./resources/js/components/atoms/LicenseBadge.tsx"); |
| 2946 |
/* harmony import */ var _components_atoms_ProductLogo__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/atoms/ProductLogo */ "./resources/js/components/atoms/ProductLogo.tsx"); |
| 2947 |
/* harmony import */ var _components_ui_button__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/ui/button */ "./resources/js/components/ui/button.tsx"); |
| 2948 |
/* harmony import */ var _components_ui_dropdown_menu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/ui/dropdown-menu */ "./resources/js/components/ui/dropdown-menu.tsx"); |
| 2949 |
/* harmony import */ var _components_molecules_FeatureRow__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/components/molecules/FeatureRow */ "./resources/js/components/molecules/FeatureRow.tsx"); |
| 2950 |
/* harmony import */ var _components_molecules_TierGroup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/components/molecules/TierGroup */ "./resources/js/components/molecules/TierGroup.tsx"); |
| 2951 |
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/store */ "./resources/js/store/index.ts"); |
| 2952 |
/* harmony import */ var _context_filter_context__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/context/filter-context */ "./resources/js/context/filter-context.tsx"); |
| 2953 |
/* harmony import */ var _hooks_useProductFeatureGroups__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @/hooks/useProductFeatureGroups */ "./resources/js/hooks/useProductFeatureGroups.ts"); |
| 2954 |
/* harmony import */ var _lib_upgrade_url__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @/lib/upgrade-url */ "./resources/js/lib/upgrade-url.ts"); |
| 2955 |
/* harmony import */ var _lib_activation_url__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @/lib/activation-url */ "./resources/js/lib/activation-url.ts"); |
| 2956 |
/* harmony import */ var _lib_harbor_data__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @/lib/harbor-data */ "./resources/js/lib/harbor-data.ts"); |
| 2957 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2958 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__); |
| 2959 |
/** |
| 2960 |
* Product section: sticky dark header + feature list + tier group accordions. |
| 2961 |
* |
| 2962 |
* Available features render as FeatureRow entries. Locked features are |
| 2963 |
* grouped by tier and rendered inside collapsible TierGroup accordions. |
| 2964 |
* |
| 2965 |
* Header counts (active / deactivated) always reflect the full unfiltered |
| 2966 |
* feature set so they remain stable while the user searches. |
| 2967 |
* |
| 2968 |
* @package LiquidWeb\Harbor |
| 2969 |
*/ |
| 2970 |
|
| 2971 |
|
| 2972 |
|
| 2973 |
|
| 2974 |
|
| 2975 |
|
| 2976 |
|
| 2977 |
|
| 2978 |
|
| 2979 |
|
| 2980 |
|
| 2981 |
|
| 2982 |
|
| 2983 |
|
| 2984 |
|
| 2985 |
|
| 2986 |
|
| 2987 |
/** |
| 2988 |
* @since 1.6.0 Add hideLicenseBadge prop to suppress the header license badge for Available cards. |
| 2989 |
* @since 1.3.0 Read domain through the getHarborDataValue helper for upgrade URLs. |
| 2990 |
* @since 1.0.2 Route upgrade CTA to catalog upgrade_url for existing subscribers, purchase_url for new subscribers. |
| 2991 |
* @since 1.0.1 Show Unactivated badge on tier groups and product header for unactivated licenses. |
| 2992 |
* @since 1.0.0 |
| 2993 |
*/ |
| 2994 |
function ProductSection({ |
| 2995 |
product, |
| 2996 |
hideLicenseBadge = false |
| 2997 |
}) { |
| 2998 |
const { |
| 2999 |
searchQuery |
| 3000 |
} = (0,_context_filter_context__WEBPACK_IMPORTED_MODULE_13__.useFilter)(); |
| 3001 |
const isSearching = searchQuery.trim().length > 0; |
| 3002 |
|
| 3003 |
// Tracks the header tier-picker's open state so its chevron can flip. |
| 3004 |
const [tierMenuOpen, setTierMenuOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false); |
| 3005 |
|
| 3006 |
// Full unfiltered set — used only for header counts so they stay stable. |
| 3007 |
const { |
| 3008 |
licenseProduct, |
| 3009 |
hasActiveLegacy, |
| 3010 |
unactivatedLicenseProduct, |
| 3011 |
unactivatedLicenseProducts |
| 3012 |
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => { |
| 3013 |
const licenseProducts = select(_store__WEBPACK_IMPORTED_MODULE_12__.store).getLicenseProducts(); |
| 3014 |
const forProduct = licenseProducts.filter(lp => lp.product_slug === product.slug); |
| 3015 |
return { |
| 3016 |
licenseProduct: forProduct.find(lp => lp.activated_here === true) ?? null, |
| 3017 |
hasActiveLegacy: select(_store__WEBPACK_IMPORTED_MODULE_12__.store).hasActiveLegacyLicenseForProduct(product.slug), |
| 3018 |
unactivatedLicenseProduct: select(_store__WEBPACK_IMPORTED_MODULE_12__.store).getUnactivatedLicenseProduct(product.slug), |
| 3019 |
unactivatedLicenseProducts: select(_store__WEBPACK_IMPORTED_MODULE_12__.store).getUnactivatedLicenseProducts(product.slug) |
| 3020 |
}; |
| 3021 |
}, [product.slug]); |
| 3022 |
const { |
| 3023 |
availableFeatures, |
| 3024 |
lockedByTier, |
| 3025 |
sortedCatalogTiers, |
| 3026 |
upgradeCatalogTiers, |
| 3027 |
activationCatalogTiers, |
| 3028 |
isUnactivatedLicense |
| 3029 |
} = (0,_hooks_useProductFeatureGroups__WEBPACK_IMPORTED_MODULE_14__.useProductFeatureGroups)(product.slug); |
| 3030 |
const activeCount = availableFeatures.filter(f => f.is_enabled).length; |
| 3031 |
const deactivatedCount = availableFeatures.filter(f => !f.is_enabled).length; |
| 3032 |
|
| 3033 |
// Show "Unactivated" in the header only when there is no activated product at all. |
| 3034 |
// An unactivated upgrade tier alongside an active lower tier (e.g. pro active + elite |
| 3035 |
// unactivated) should still show the active tier's name — not "Unactivated". |
| 3036 |
const isNotActivated = licenseProduct === null && isUnactivatedLicense || licenseProduct !== null && (licenseProduct.validation_status === 'not_activated' || licenseProduct.validation_status === 'activation_required'); |
| 3037 |
|
| 3038 |
// Owned-but-unactivated products get an Activate CTA beside the header badge, |
| 3039 |
// falling back to the unactivated product record when no tier is active here. |
| 3040 |
const activationUrl = (0,_lib_harbor_data__WEBPACK_IMPORTED_MODULE_17__.getHarborDataValue)('activationUrl'); |
| 3041 |
const effectiveLicenseProduct = licenseProduct ?? unactivatedLicenseProduct; |
| 3042 |
const showHeaderActivate = isNotActivated && !!activationUrl && !!effectiveLicenseProduct; |
| 3043 |
|
| 3044 |
// A unified key can cover multiple unactivated tiers of one product (each a |
| 3045 |
// distinct SKU). When it does, offer a picker defaulting to the highest tier |
| 3046 |
// instead of silently activating an arbitrary one. |
| 3047 |
const activatableTiers = unactivatedLicenseProducts.map(lp => { |
| 3048 |
const catalogTier = sortedCatalogTiers.find(t => t.tier_slug === lp.tier); |
| 3049 |
return { |
| 3050 |
lp, |
| 3051 |
rank: catalogTier?.rank ?? -1, |
| 3052 |
name: catalogTier?.name ?? lp.tier |
| 3053 |
}; |
| 3054 |
}).sort((a, b) => b.rank - a.rank); |
| 3055 |
const defaultActivateTier = activatableTiers[0]?.lp.tier ?? effectiveLicenseProduct?.tier; |
| 3056 |
const showTierPicker = showHeaderActivate && activatableTiers.length > 1; |
| 3057 |
const tierName = licenseProduct ? sortedCatalogTiers.find(t => t.tier_slug === licenseProduct.tier)?.name ?? licenseProduct.tier : null; |
| 3058 |
const hasContent = availableFeatures.length > 0 || Object.values(lockedByTier).some(f => f.length > 0); |
| 3059 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("section", { |
| 3060 |
id: product.slug, |
| 3061 |
className: "scroll-mt-20", |
| 3062 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("div", { |
| 3063 |
className: "h-0" |
| 3064 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("div", { |
| 3065 |
className: "flex items-center gap-3 px-4 py-3 bg-neutral-800 text-white sticky top-0 z-10 border-x border-neutral-800 transition-[border-radius] rounded-t-lg border-t", |
| 3066 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_components_atoms_ProductLogo__WEBPACK_IMPORTED_MODULE_7__.ProductLogo, { |
| 3067 |
slug: product.slug, |
| 3068 |
size: 28, |
| 3069 |
productName: product.name |
| 3070 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("h2", { |
| 3071 |
className: "text-base font-semibold m-0 p-0 text-white", |
| 3072 |
children: product.name |
| 3073 |
}), !hideLicenseBadge && (isNotActivated ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.Fragment, { |
| 3074 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_components_atoms_LicenseBadge__WEBPACK_IMPORTED_MODULE_6__.LicenseBadge, { |
| 3075 |
type: "unactivated" |
| 3076 |
}), showHeaderActivate && defaultActivateTier && (showTierPicker ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(_components_ui_dropdown_menu__WEBPACK_IMPORTED_MODULE_9__.DropdownMenu, { |
| 3077 |
modal: false, |
| 3078 |
open: tierMenuOpen, |
| 3079 |
onOpenChange: setTierMenuOpen, |
| 3080 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_components_ui_dropdown_menu__WEBPACK_IMPORTED_MODULE_9__.DropdownMenuTrigger, { |
| 3081 |
asChild: true, |
| 3082 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(_components_ui_button__WEBPACK_IMPORTED_MODULE_8__.Button, { |
| 3083 |
variant: "outline", |
| 3084 |
size: "xs", |
| 3085 |
className: "shrink-0", |
| 3086 |
children: [(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Activate', '%TEXTDOMAIN%'), tierMenuOpen ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_4__["default"], { |
| 3087 |
className: "w-3 h-3 -translate-y-px" |
| 3088 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_3__["default"], { |
| 3089 |
className: "w-3 h-3 -translate-y-px" |
| 3090 |
})] |
| 3091 |
}) |
| 3092 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_components_ui_dropdown_menu__WEBPACK_IMPORTED_MODULE_9__.DropdownMenuContent, { |
| 3093 |
align: "end", |
| 3094 |
children: activatableTiers.map(({ |
| 3095 |
lp, |
| 3096 |
name |
| 3097 |
}) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_components_ui_dropdown_menu__WEBPACK_IMPORTED_MODULE_9__.DropdownMenuItem, { |
| 3098 |
asChild: true, |
| 3099 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("a", { |
| 3100 |
href: (0,_lib_activation_url__WEBPACK_IMPORTED_MODULE_16__.buildActivationUrl)(activationUrl, product.slug, lp.tier), |
| 3101 |
target: "_blank", |
| 3102 |
rel: "noopener noreferrer", |
| 3103 |
children: [name, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_5__["default"], { |
| 3104 |
className: "w-3 h-3 ml-auto" |
| 3105 |
})] |
| 3106 |
}) |
| 3107 |
}, `${lp.product_slug}:${lp.tier}`)) |
| 3108 |
})] |
| 3109 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_components_ui_button__WEBPACK_IMPORTED_MODULE_8__.Button, { |
| 3110 |
variant: "outline", |
| 3111 |
size: "xs", |
| 3112 |
asChild: true, |
| 3113 |
className: "shrink-0", |
| 3114 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("a", { |
| 3115 |
href: (0,_lib_activation_url__WEBPACK_IMPORTED_MODULE_16__.buildActivationUrl)(activationUrl, product.slug, defaultActivateTier), |
| 3116 |
target: "_blank", |
| 3117 |
rel: "noopener noreferrer", |
| 3118 |
children: [(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Activate', '%TEXTDOMAIN%'), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_5__["default"], { |
| 3119 |
className: "w-3 h-3 -translate-y-px" |
| 3120 |
})] |
| 3121 |
}) |
| 3122 |
}))] |
| 3123 |
}) : tierName ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_components_atoms_LicenseBadge__WEBPACK_IMPORTED_MODULE_6__.LicenseBadge, { |
| 3124 |
type: "licensed", |
| 3125 |
tierName: tierName |
| 3126 |
}) : hasActiveLegacy ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_components_atoms_LicenseBadge__WEBPACK_IMPORTED_MODULE_6__.LicenseBadge, { |
| 3127 |
type: "legacy" |
| 3128 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_components_atoms_LicenseBadge__WEBPACK_IMPORTED_MODULE_6__.LicenseBadge, { |
| 3129 |
type: "unlicensed", |
| 3130 |
className: "text-white border-white/40" |
| 3131 |
})), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("span", { |
| 3132 |
className: "ml-auto text-xs text-white/70", |
| 3133 |
children: [activeCount, " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('active', '%TEXTDOMAIN%'), ' · ', deactivatedCount, " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('deactivated', '%TEXTDOMAIN%')] |
| 3134 |
})] |
| 3135 |
}), isSearching && !hasContent && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("div", { |
| 3136 |
className: "border border-t-0 rounded-b-lg", |
| 3137 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("p", { |
| 3138 |
className: "px-4 py-6 text-sm text-muted-foreground text-center", |
| 3139 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('No features match your search.', '%TEXTDOMAIN%') |
| 3140 |
}) |
| 3141 |
}), !isSearching && !hasContent && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("div", { |
| 3142 |
className: "border border-t-0 rounded-b-lg", |
| 3143 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)("p", { |
| 3144 |
className: "px-4 py-6 text-sm text-muted-foreground text-center", |
| 3145 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('No features are available for this product.', '%TEXTDOMAIN%') |
| 3146 |
}) |
| 3147 |
}), hasContent && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)("div", { |
| 3148 |
className: "border border-t-0 rounded-b-lg overflow-hidden", |
| 3149 |
children: [availableFeatures.map(feature => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_components_molecules_FeatureRow__WEBPACK_IMPORTED_MODULE_10__.FeatureRow, { |
| 3150 |
feature: feature |
| 3151 |
}, feature.slug)), activationCatalogTiers.map(tier => { |
| 3152 |
const locked = lockedByTier[tier.tier_slug] ?? []; |
| 3153 |
if (locked.length === 0) return null; |
| 3154 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_components_molecules_TierGroup__WEBPACK_IMPORTED_MODULE_11__.TierGroup, { |
| 3155 |
tier: tier, |
| 3156 |
features: locked, |
| 3157 |
forceOpen: isSearching, |
| 3158 |
showUpgrade: false, |
| 3159 |
showUnactivated: isUnactivatedLicense |
| 3160 |
}, tier.tier_slug); |
| 3161 |
}), upgradeCatalogTiers.map(tier => { |
| 3162 |
const locked = lockedByTier[tier.tier_slug] ?? []; |
| 3163 |
if (locked.length === 0) return null; |
| 3164 |
const effectiveLicenseProduct = licenseProduct ?? unactivatedLicenseProduct; |
| 3165 |
const buttonHref = effectiveLicenseProduct ? tier.upgrade_url ? (0,_lib_upgrade_url__WEBPACK_IMPORTED_MODULE_15__.buildUpgradeUrl)(tier.upgrade_url, (0,_lib_harbor_data__WEBPACK_IMPORTED_MODULE_17__.getHarborDataValue)('domain')) : undefined : tier.purchase_url || undefined; |
| 3166 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_components_molecules_TierGroup__WEBPACK_IMPORTED_MODULE_11__.TierGroup, { |
| 3167 |
tier: tier, |
| 3168 |
features: locked, |
| 3169 |
forceOpen: isSearching, |
| 3170 |
buttonHref: buttonHref |
| 3171 |
}, tier.tier_slug); |
| 3172 |
})] |
| 3173 |
})] |
| 3174 |
}); |
| 3175 |
} |
| 3176 |
|
| 3177 |
/***/ }, |
| 3178 |
|
| 3179 |
/***/ "./resources/js/components/organisms/ProductSectionSkeleton.tsx" |
| 3180 |
/*!**********************************************************************!*\ |
| 3181 |
!*** ./resources/js/components/organisms/ProductSectionSkeleton.tsx ***! |
| 3182 |
\**********************************************************************/ |
| 3183 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 3184 |
|
| 3185 |
__webpack_require__.r(__webpack_exports__); |
| 3186 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3187 |
/* harmony export */ ProductSectionSkeleton: () => (/* binding */ ProductSectionSkeleton) |
| 3188 |
/* harmony export */ }); |
| 3189 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3190 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); |
| 3191 |
|
| 3192 |
/** |
| 3193 |
* Pulse-skeleton for a single product section, shown while the Harbor data |
| 3194 |
* resolvers are in flight on the first page load. |
| 3195 |
* |
| 3196 |
* Mirrors ProductSection's DOM structure: same sticky header followed by a |
| 3197 |
* fixed number of skeleton feature rows. The header is intentionally nameless |
| 3198 |
* (placeholder logo and title bars, no real product) because install state and |
| 3199 |
* ownership — which decide each product's section and order — are not known |
| 3200 |
* until the data resolves. A nameless skeleton avoids named cards appearing to |
| 3201 |
* reorder when the computed layout replaces it. |
| 3202 |
* |
| 3203 |
* @package LiquidWeb\Harbor |
| 3204 |
*/ |
| 3205 |
const SKELETON_ROW_COUNT = 3; |
| 3206 |
function SkeletonFeatureRow({ |
| 3207 |
isLast |
| 3208 |
}) { |
| 3209 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { |
| 3210 |
className: `bg-white animate-pulse${isLast ? '' : ' border-b'}`, |
| 3211 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { |
| 3212 |
className: "flex items-center gap-3 py-3 px-4", |
| 3213 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { |
| 3214 |
className: "w-4 h-4 rounded shrink-0 bg-muted" |
| 3215 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { |
| 3216 |
className: "w-8 h-8 rounded shrink-0 bg-muted" |
| 3217 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { |
| 3218 |
className: "h-3.5 w-32 rounded bg-muted" |
| 3219 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { |
| 3220 |
className: "ml-auto flex items-center gap-3 shrink-0", |
| 3221 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { |
| 3222 |
className: "h-4 w-12 rounded bg-muted" |
| 3223 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { |
| 3224 |
className: "h-5 w-9 rounded-full bg-muted" |
| 3225 |
})] |
| 3226 |
})] |
| 3227 |
}) |
| 3228 |
}); |
| 3229 |
} |
| 3230 |
|
| 3231 |
/** |
| 3232 |
* @since 1.6.0 Render a nameless header instead of a real product logo/name. |
| 3233 |
* @since 1.0.0 |
| 3234 |
*/ |
| 3235 |
function ProductSectionSkeleton() { |
| 3236 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("section", { |
| 3237 |
className: "scroll-mt-20", |
| 3238 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { |
| 3239 |
className: "h-0" |
| 3240 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { |
| 3241 |
className: "flex items-center gap-3 px-4 py-3 bg-neutral-800 text-white sticky top-0 z-10 border-x border-neutral-800 transition-[border-radius] rounded-t-lg border-t", |
| 3242 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { |
| 3243 |
className: "w-7 h-7 rounded shrink-0 bg-white/20 animate-pulse" |
| 3244 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { |
| 3245 |
className: "h-4 w-32 rounded bg-white/20 animate-pulse" |
| 3246 |
})] |
| 3247 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { |
| 3248 |
className: "border border-t-0 rounded-b-lg overflow-hidden", |
| 3249 |
children: Array.from({ |
| 3250 |
length: SKELETON_ROW_COUNT |
| 3251 |
}, (_, i) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SkeletonFeatureRow, { |
| 3252 |
isLast: i === SKELETON_ROW_COUNT - 1 |
| 3253 |
}, i)) |
| 3254 |
})] |
| 3255 |
}); |
| 3256 |
} |
| 3257 |
|
| 3258 |
/***/ }, |
| 3259 |
|
| 3260 |
/***/ "./resources/js/components/organisms/UpsellSection.tsx" |
| 3261 |
/*!*************************************************************!*\ |
| 3262 |
!*** ./resources/js/components/organisms/UpsellSection.tsx ***! |
| 3263 |
\*************************************************************/ |
| 3264 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 3265 |
|
| 3266 |
__webpack_require__.r(__webpack_exports__); |
| 3267 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3268 |
/* harmony export */ UpsellSection: () => (/* binding */ UpsellSection) |
| 3269 |
/* harmony export */ }); |
| 3270 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 3271 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 3272 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/rocket.js"); |
| 3273 |
/* harmony import */ var _components_atoms_SectionHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/atoms/SectionHeader */ "./resources/js/components/atoms/SectionHeader.tsx"); |
| 3274 |
/* harmony import */ var _components_molecules_UpsellCard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/molecules/UpsellCard */ "./resources/js/components/molecules/UpsellCard.tsx"); |
| 3275 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3276 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__); |
| 3277 |
/** |
| 3278 |
* Upsell section: products not covered by the current license. |
| 3279 |
* |
| 3280 |
* @package LiquidWeb\Harbor |
| 3281 |
*/ |
| 3282 |
|
| 3283 |
|
| 3284 |
|
| 3285 |
|
| 3286 |
|
| 3287 |
/** |
| 3288 |
* @since 1.0.0 |
| 3289 |
*/ |
| 3290 |
function UpsellSection({ |
| 3291 |
products, |
| 3292 |
upsellUrlMap |
| 3293 |
}) { |
| 3294 |
if (products.length === 0) return null; |
| 3295 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, { |
| 3296 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("hr", { |
| 3297 |
className: "border-t border-0 !border-b-0" |
| 3298 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", { |
| 3299 |
className: "space-y-3", |
| 3300 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_components_atoms_SectionHeader__WEBPACK_IMPORTED_MODULE_2__.SectionHeader, { |
| 3301 |
icon: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_1__["default"], { |
| 3302 |
className: "w-4 h-4 text-muted-foreground" |
| 3303 |
}), |
| 3304 |
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Add to your plan', '%TEXTDOMAIN%') |
| 3305 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { |
| 3306 |
className: "space-y-2", |
| 3307 |
children: products.map(p => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_components_molecules_UpsellCard__WEBPACK_IMPORTED_MODULE_3__.UpsellCard, { |
| 3308 |
product: p, |
| 3309 |
href: upsellUrlMap[p.slug] ?? '#' |
| 3310 |
}, p.slug)) |
| 3311 |
})] |
| 3312 |
})] |
| 3313 |
}); |
| 3314 |
} |
| 3315 |
|
| 3316 |
/***/ }, |
| 3317 |
|
| 3318 |
/***/ "./resources/js/components/organisms/WelcomeScreen.tsx" |
| 3319 |
/*!*************************************************************!*\ |
| 3320 |
!*** ./resources/js/components/organisms/WelcomeScreen.tsx ***! |
| 3321 |
\*************************************************************/ |
| 3322 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 3323 |
|
| 3324 |
__webpack_require__.r(__webpack_exports__); |
| 3325 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3326 |
/* harmony export */ WelcomeScreen: () => (/* binding */ WelcomeScreen) |
| 3327 |
/* harmony export */ }); |
| 3328 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 3329 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
| 3330 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 3331 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 3332 |
/* harmony import */ var _components_templates_WelcomeShell__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/templates/WelcomeShell */ "./resources/js/components/templates/WelcomeShell.tsx"); |
| 3333 |
/* harmony import */ var _components_molecules_WelcomeNoticeBanner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/molecules/WelcomeNoticeBanner */ "./resources/js/components/molecules/WelcomeNoticeBanner.tsx"); |
| 3334 |
/* harmony import */ var _components_molecules_WelcomeLicenseForm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/molecules/WelcomeLicenseForm */ "./resources/js/components/molecules/WelcomeLicenseForm.tsx"); |
| 3335 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3336 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__); |
| 3337 |
/** |
| 3338 |
* No-license welcome screen. |
| 3339 |
* |
| 3340 |
* Composes WelcomeShell chrome with the hardcoded non-unified-license |
| 3341 |
* notice and the unified license form. The notice copy lives here so |
| 3342 |
* WelcomeNoticeBanner stays a generic container. |
| 3343 |
* |
| 3344 |
* createInterpolateElement turns a single translatable string with |
| 3345 |
* marker tags into real React elements — translators see one |
| 3346 |
* continuous sentence; React renders an actual <strong> node. |
| 3347 |
* |
| 3348 |
* @package LiquidWeb\Harbor |
| 3349 |
*/ |
| 3350 |
|
| 3351 |
|
| 3352 |
|
| 3353 |
|
| 3354 |
|
| 3355 |
|
| 3356 |
/** |
| 3357 |
* @since 1.3.0 |
| 3358 |
*/ |
| 3359 |
|
| 3360 |
function WelcomeScreen() { |
| 3361 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_components_templates_WelcomeShell__WEBPACK_IMPORTED_MODULE_2__.WelcomeShell, { |
| 3362 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_components_molecules_WelcomeNoticeBanner__WEBPACK_IMPORTED_MODULE_3__.WelcomeNoticeBanner, { |
| 3363 |
children: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createInterpolateElement)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('<strong>Have a non-unified license?</strong> Licenses issued before May 12, 2026 are managed inside each plugin\'s own settings.', '%TEXTDOMAIN%'), { |
| 3364 |
strong: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("strong", {}) |
| 3365 |
}) |
| 3366 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_components_molecules_WelcomeLicenseForm__WEBPACK_IMPORTED_MODULE_4__.WelcomeLicenseForm, {})] |
| 3367 |
}); |
| 3368 |
} |
| 3369 |
|
| 3370 |
/***/ }, |
| 3371 |
|
| 3372 |
/***/ "./resources/js/components/templates/AppShell.tsx" |
| 3373 |
/*!********************************************************!*\ |
| 3374 |
!*** ./resources/js/components/templates/AppShell.tsx ***! |
| 3375 |
\********************************************************/ |
| 3376 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 3377 |
|
| 3378 |
__webpack_require__.r(__webpack_exports__); |
| 3379 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3380 |
/* harmony export */ AppShell: () => (/* binding */ AppShell) |
| 3381 |
/* harmony export */ }); |
| 3382 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 3383 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 3384 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 3385 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); |
| 3386 |
/* harmony import */ var _components_templates_Shell__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/templates/Shell */ "./resources/js/components/templates/Shell.tsx"); |
| 3387 |
/* harmony import */ var _components_molecules_FilterBar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/molecules/FilterBar */ "./resources/js/components/molecules/FilterBar.tsx"); |
| 3388 |
/* harmony import */ var _components_organisms_LicensePanel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/organisms/LicensePanel */ "./resources/js/components/organisms/LicensePanel.tsx"); |
| 3389 |
/* harmony import */ var _components_molecules_LegacyLicenseBanner__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/molecules/LegacyLicenseBanner */ "./resources/js/components/molecules/LegacyLicenseBanner.tsx"); |
| 3390 |
/* harmony import */ var _components_molecules_NotActivatedBanner__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/molecules/NotActivatedBanner */ "./resources/js/components/molecules/NotActivatedBanner.tsx"); |
| 3391 |
/* harmony import */ var _components_molecules_ReloadBanner__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/molecules/ReloadBanner */ "./resources/js/components/molecules/ReloadBanner.tsx"); |
| 3392 |
/* harmony import */ var _components_organisms_ProductSection__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/organisms/ProductSection */ "./resources/js/components/organisms/ProductSection.tsx"); |
| 3393 |
/* harmony import */ var _components_organisms_ProductSectionSkeleton__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/organisms/ProductSectionSkeleton */ "./resources/js/components/organisms/ProductSectionSkeleton.tsx"); |
| 3394 |
/* harmony import */ var _components_atoms_ErrorBoundary__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/components/atoms/ErrorBoundary */ "./resources/js/components/atoms/ErrorBoundary.tsx"); |
| 3395 |
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/store */ "./resources/js/store/index.ts"); |
| 3396 |
/* harmony import */ var _data_products__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/data/products */ "./resources/js/data/products.ts"); |
| 3397 |
/* harmony import */ var _context_filter_context__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/context/filter-context */ "./resources/js/context/filter-context.tsx"); |
| 3398 |
/* harmony import */ var _context_harbor_data_context__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @/context/harbor-data-context */ "./resources/js/context/harbor-data-context.tsx"); |
| 3399 |
/* harmony import */ var _lib_harbor_data__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @/lib/harbor-data */ "./resources/js/lib/harbor-data.ts"); |
| 3400 |
/* harmony import */ var _lib_product_install__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @/lib/product-install */ "./resources/js/lib/product-install.ts"); |
| 3401 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3402 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__); |
| 3403 |
/** |
| 3404 |
* Application shell — full-width two-column layout. |
| 3405 |
* |
| 3406 |
* Main area: FilterBar header + product sections. |
| 3407 |
* Sidebar: license panel. |
| 3408 |
* |
| 3409 |
* @package LiquidWeb\Harbor |
| 3410 |
*/ |
| 3411 |
|
| 3412 |
|
| 3413 |
|
| 3414 |
|
| 3415 |
|
| 3416 |
|
| 3417 |
|
| 3418 |
|
| 3419 |
|
| 3420 |
|
| 3421 |
|
| 3422 |
|
| 3423 |
|
| 3424 |
|
| 3425 |
|
| 3426 |
|
| 3427 |
|
| 3428 |
|
| 3429 |
/** |
| 3430 |
* @since 1.6.0 Split products into Installed Features and Available Features sections. |
| 3431 |
* @since 1.3.0 Read version through the getHarborDataValue helper. |
| 3432 |
* @since 1.0.0 |
| 3433 |
*/ |
| 3434 |
function AppShell() { |
| 3435 |
const { |
| 3436 |
isLoading |
| 3437 |
} = (0,_context_harbor_data_context__WEBPACK_IMPORTED_MODULE_14__.useHarborData)(); |
| 3438 |
const version = (0,_lib_harbor_data__WEBPACK_IMPORTED_MODULE_15__.getHarborDataValue)('version'); |
| 3439 |
const { |
| 3440 |
productFilter |
| 3441 |
} = (0,_context_filter_context__WEBPACK_IMPORTED_MODULE_13__.useFilter)(); |
| 3442 |
const visibleProducts = productFilter === 'all' ? _data_products__WEBPACK_IMPORTED_MODULE_12__.PRODUCTS : _data_products__WEBPACK_IMPORTED_MODULE_12__.PRODUCTS.filter(p => p.slug === productFilter); |
| 3443 |
const { |
| 3444 |
installedProducts, |
| 3445 |
availableProducts |
| 3446 |
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => { |
| 3447 |
const s = select(_store__WEBPACK_IMPORTED_MODULE_11__.store); |
| 3448 |
const installed = []; |
| 3449 |
const available = []; |
| 3450 |
for (const product of visibleProducts) { |
| 3451 |
if ((0,_lib_product_install__WEBPACK_IMPORTED_MODULE_16__.isProductInstalled)(s.getFeaturesByProduct(product.slug))) { |
| 3452 |
installed.push(product); |
| 3453 |
} else { |
| 3454 |
available.push(product); |
| 3455 |
} |
| 3456 |
} |
| 3457 |
|
| 3458 |
// Stable-sort owned-but-not-installed products above un-owned ones. |
| 3459 |
const licenseProducts = s.getLicenseProducts(); |
| 3460 |
const owned = []; |
| 3461 |
const unowned = []; |
| 3462 |
for (const product of available) { |
| 3463 |
const owns = (0,_lib_product_install__WEBPACK_IMPORTED_MODULE_16__.isProductOwned)(product.slug, { |
| 3464 |
licenseProducts, |
| 3465 |
hasActiveLegacy: s.hasActiveLegacyLicenseForProduct(product.slug) |
| 3466 |
}); |
| 3467 |
(owns ? owned : unowned).push(product); |
| 3468 |
} |
| 3469 |
return { |
| 3470 |
installedProducts: installed, |
| 3471 |
availableProducts: [...owned, ...unowned] |
| 3472 |
}; |
| 3473 |
}, [visibleProducts]); |
| 3474 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(_components_templates_Shell__WEBPACK_IMPORTED_MODULE_2__.Shell, { |
| 3475 |
header: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.Fragment, { |
| 3476 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(_components_molecules_FilterBar__WEBPACK_IMPORTED_MODULE_3__.FilterBar, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(_components_molecules_ReloadBanner__WEBPACK_IMPORTED_MODULE_7__.ReloadBanner, {})] |
| 3477 |
}), |
| 3478 |
sideContent: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(_components_organisms_LicensePanel__WEBPACK_IMPORTED_MODULE_4__.LicensePanel, {}), |
| 3479 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsxs)(_components_atoms_ErrorBoundary__WEBPACK_IMPORTED_MODULE_10__.ErrorBoundary, { |
| 3480 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsxs)("div", { |
| 3481 |
className: "space-y-8", |
| 3482 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(_components_molecules_LegacyLicenseBanner__WEBPACK_IMPORTED_MODULE_5__.LegacyLicenseBanner, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(_components_molecules_NotActivatedBanner__WEBPACK_IMPORTED_MODULE_6__.NotActivatedBanner, {}), isLoading ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.Fragment, { |
| 3483 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)("div", { |
| 3484 |
className: "flex items-center !mt-8 !mb-6", |
| 3485 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)("div", { |
| 3486 |
className: "h-7 w-48 rounded bg-muted animate-pulse" |
| 3487 |
}) |
| 3488 |
}), Array.from({ |
| 3489 |
length: _data_products__WEBPACK_IMPORTED_MODULE_12__.PRODUCTS.length |
| 3490 |
}, (_, i) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(_components_organisms_ProductSectionSkeleton__WEBPACK_IMPORTED_MODULE_9__.ProductSectionSkeleton, {}, i))] |
| 3491 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.Fragment, { |
| 3492 |
children: [installedProducts.length > 0 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.Fragment, { |
| 3493 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)("div", { |
| 3494 |
className: "flex items-center !mt-8 !mb-6", |
| 3495 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)("h2", { |
| 3496 |
className: "!text-2xl !font-normal !m-0 !p-0", |
| 3497 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Installed Features', '%TEXTDOMAIN%') |
| 3498 |
}) |
| 3499 |
}), installedProducts.map(product => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(_components_organisms_ProductSection__WEBPACK_IMPORTED_MODULE_8__.ProductSection, { |
| 3500 |
product: product |
| 3501 |
}, product.slug))] |
| 3502 |
}), availableProducts.length > 0 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.Fragment, { |
| 3503 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)("div", { |
| 3504 |
className: "flex items-center !mt-8 !mb-6", |
| 3505 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)("h2", { |
| 3506 |
className: "!text-2xl !font-normal !m-0 !p-0", |
| 3507 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Available Features', '%TEXTDOMAIN%') |
| 3508 |
}) |
| 3509 |
}), availableProducts.map(product => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(_components_organisms_ProductSection__WEBPACK_IMPORTED_MODULE_8__.ProductSection, { |
| 3510 |
product: product, |
| 3511 |
hideLicenseBadge: true |
| 3512 |
}, product.slug))] |
| 3513 |
})] |
| 3514 |
})] |
| 3515 |
}), version && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)("div", { |
| 3516 |
className: "flex items-center justify-end mt-auto", |
| 3517 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)("p", { |
| 3518 |
className: "text-[13px] text-gray-500 mt-8 mb-0", |
| 3519 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Version %s', '%TEXTDOMAIN%'), version) |
| 3520 |
}) |
| 3521 |
})] |
| 3522 |
}) |
| 3523 |
}); |
| 3524 |
} |
| 3525 |
|
| 3526 |
/***/ }, |
| 3527 |
|
| 3528 |
/***/ "./resources/js/components/templates/Shell.tsx" |
| 3529 |
/*!*****************************************************!*\ |
| 3530 |
!*** ./resources/js/components/templates/Shell.tsx ***! |
| 3531 |
\*****************************************************/ |
| 3532 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 3533 |
|
| 3534 |
__webpack_require__.r(__webpack_exports__); |
| 3535 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3536 |
/* harmony export */ Shell: () => (/* binding */ Shell) |
| 3537 |
/* harmony export */ }); |
| 3538 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3539 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); |
| 3540 |
|
| 3541 |
/** |
| 3542 |
* Two-column page shell: scrollable main area + sticky sidebar. |
| 3543 |
* |
| 3544 |
* @package LiquidWeb\Harbor |
| 3545 |
*/ |
| 3546 |
|
| 3547 |
/** |
| 3548 |
* @since 1.0.0 |
| 3549 |
*/ |
| 3550 |
function Shell({ |
| 3551 |
header, |
| 3552 |
sideContent, |
| 3553 |
children |
| 3554 |
}) { |
| 3555 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { |
| 3556 |
className: "absolute top-0 left-0 w-full max-w-full flex flex-col overflow-hidden h-[calc(100vh-32px)]", |
| 3557 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("header", { |
| 3558 |
className: "shrink-0 border-b bg-background py-4 px-8 flex items-center gap-3", |
| 3559 |
children: header |
| 3560 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { |
| 3561 |
className: "flex-1 min-h-0 flex overflow-hidden", |
| 3562 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("main", { |
| 3563 |
className: "flex flex-col flex-1 min-w-0 overflow-y-auto pb-6 px-8 bg-neutral-50", |
| 3564 |
children: children |
| 3565 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("aside", { |
| 3566 |
className: "shrink-0 overflow-y-auto border-l px-8 py-4", |
| 3567 |
children: sideContent |
| 3568 |
})] |
| 3569 |
})] |
| 3570 |
}); |
| 3571 |
} |
| 3572 |
|
| 3573 |
/***/ }, |
| 3574 |
|
| 3575 |
/***/ "./resources/js/components/templates/WelcomeShell.tsx" |
| 3576 |
/*!************************************************************!*\ |
| 3577 |
!*** ./resources/js/components/templates/WelcomeShell.tsx ***! |
| 3578 |
\************************************************************/ |
| 3579 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 3580 |
|
| 3581 |
__webpack_require__.r(__webpack_exports__); |
| 3582 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3583 |
/* harmony export */ WelcomeShell: () => (/* binding */ WelcomeShell) |
| 3584 |
/* harmony export */ }); |
| 3585 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 3586 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); |
| 3587 |
/* harmony import */ var _components_atoms_NexcessLogo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/atoms/NexcessLogo */ "./resources/js/components/atoms/NexcessLogo.tsx"); |
| 3588 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3589 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__); |
| 3590 |
/** |
| 3591 |
* Welcome flow template. |
| 3592 |
* |
| 3593 |
* Centered single-column layout used by the welcome screen and the |
| 3594 |
* boot-time AppLoader. Uses a fixed min-height because 100vh overflows |
| 3595 |
* beneath the wp-admin bar and forces a vertical scroll. |
| 3596 |
* |
| 3597 |
* @package LiquidWeb\Harbor |
| 3598 |
*/ |
| 3599 |
|
| 3600 |
|
| 3601 |
|
| 3602 |
|
| 3603 |
/** |
| 3604 |
* @since 1.3.0 |
| 3605 |
*/ |
| 3606 |
function WelcomeShell({ |
| 3607 |
children |
| 3608 |
}) { |
| 3609 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", { |
| 3610 |
className: "absolute top-0 left-0 w-full max-w-full flex flex-col items-center justify-center h-[calc(100vh-32px)] bg-white", |
| 3611 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", { |
| 3612 |
className: "w-full max-w-104", |
| 3613 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", { |
| 3614 |
className: "flex flex-col items-center gap-1.5 text-center", |
| 3615 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_atoms_NexcessLogo__WEBPACK_IMPORTED_MODULE_1__.NexcessLogo, { |
| 3616 |
className: "w-18 h-18" |
| 3617 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", { |
| 3618 |
className: "-space-y-1 mb-4", |
| 3619 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h1", { |
| 3620 |
className: "text-2xl leading-8 font-semibold tracking-wide p-0 text-neutral-950", |
| 3621 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Software License Manager', '%TEXTDOMAIN%') |
| 3622 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("p", { |
| 3623 |
className: "text-xs leading-8 font-semibold m-0 text-neutral-950", |
| 3624 |
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Liquid Web by Nexcess', '%TEXTDOMAIN%') |
| 3625 |
})] |
| 3626 |
})] |
| 3627 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", { |
| 3628 |
className: "space-y-8", |
| 3629 |
children: children |
| 3630 |
})] |
| 3631 |
}) |
| 3632 |
}); |
| 3633 |
} |
| 3634 |
|
| 3635 |
/***/ }, |
| 3636 |
|
| 3637 |
/***/ "./resources/js/components/ui/badge.tsx" |
| 3638 |
/*!**********************************************!*\ |
| 3639 |
!*** ./resources/js/components/ui/badge.tsx ***! |
| 3640 |
\**********************************************/ |
| 3641 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 3642 |
|
| 3643 |
__webpack_require__.r(__webpack_exports__); |
| 3644 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3645 |
/* harmony export */ Badge: () => (/* binding */ Badge), |
| 3646 |
/* harmony export */ badgeVariants: () => (/* binding */ badgeVariants) |
| 3647 |
/* harmony export */ }); |
| 3648 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 3649 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 3650 |
/* harmony import */ var class_variance_authority__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! class-variance-authority */ "./node_modules/class-variance-authority/dist/index.mjs"); |
| 3651 |
/* harmony import */ var _lib_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/lib/utils */ "./resources/js/lib/utils.ts"); |
| 3652 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3653 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); |
| 3654 |
|
| 3655 |
|
| 3656 |
|
| 3657 |
|
| 3658 |
const badgeVariants = (0,class_variance_authority__WEBPACK_IMPORTED_MODULE_1__.cva)('inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden', { |
| 3659 |
variants: { |
| 3660 |
variant: { |
| 3661 |
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90", |
| 3662 |
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", |
| 3663 |
destructive: "bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", |
| 3664 |
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", |
| 3665 |
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground", |
| 3666 |
link: "text-primary underline-offset-4 [a&]:hover:underline", |
| 3667 |
success: "bg-emerald-100 text-emerald-800 border-emerald-200", |
| 3668 |
gradient: "bg-gradient-to-r from-emerald-500 to-emerald-600 text-white border-0", |
| 3669 |
warning: "bg-amber-100 text-amber-800 border-amber-200", |
| 3670 |
info: "bg-blue-100 text-blue-800 border-blue-200" |
| 3671 |
} |
| 3672 |
}, |
| 3673 |
defaultVariants: { |
| 3674 |
variant: 'default' |
| 3675 |
} |
| 3676 |
}); |
| 3677 |
function Badge({ |
| 3678 |
className, |
| 3679 |
variant, |
| 3680 |
...props |
| 3681 |
}) { |
| 3682 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("span", { |
| 3683 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_2__.cn)(badgeVariants({ |
| 3684 |
variant |
| 3685 |
}), className), |
| 3686 |
...props |
| 3687 |
}); |
| 3688 |
} |
| 3689 |
|
| 3690 |
|
| 3691 |
/***/ }, |
| 3692 |
|
| 3693 |
/***/ "./resources/js/components/ui/button.tsx" |
| 3694 |
/*!***********************************************!*\ |
| 3695 |
!*** ./resources/js/components/ui/button.tsx ***! |
| 3696 |
\***********************************************/ |
| 3697 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 3698 |
|
| 3699 |
__webpack_require__.r(__webpack_exports__); |
| 3700 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3701 |
/* harmony export */ Button: () => (/* binding */ Button), |
| 3702 |
/* harmony export */ buttonVariants: () => (/* binding */ buttonVariants) |
| 3703 |
/* harmony export */ }); |
| 3704 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 3705 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 3706 |
/* harmony import */ var class_variance_authority__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! class-variance-authority */ "./node_modules/class-variance-authority/dist/index.mjs"); |
| 3707 |
/* harmony import */ var radix_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! radix-ui */ "./node_modules/@radix-ui/react-slot/dist/index.mjs"); |
| 3708 |
/* harmony import */ var _lib_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/lib/utils */ "./resources/js/lib/utils.ts"); |
| 3709 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3710 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__); |
| 3711 |
|
| 3712 |
|
| 3713 |
|
| 3714 |
|
| 3715 |
|
| 3716 |
const buttonVariants = (0,class_variance_authority__WEBPACK_IMPORTED_MODULE_1__.cva)("cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", { |
| 3717 |
variants: { |
| 3718 |
variant: { |
| 3719 |
default: "bg-primary text-primary-foreground hover:bg-primary/90", |
| 3720 |
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", |
| 3721 |
outline: "border bg-background text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50", |
| 3722 |
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80", |
| 3723 |
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50", |
| 3724 |
link: "text-primary underline-offset-4 hover:underline" |
| 3725 |
}, |
| 3726 |
size: { |
| 3727 |
default: "h-9 px-4 py-2 has-[>svg]:px-3", |
| 3728 |
xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3", |
| 3729 |
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5", |
| 3730 |
lg: "h-10 rounded-md px-6 has-[>svg]:px-4", |
| 3731 |
icon: "size-9", |
| 3732 |
"icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3", |
| 3733 |
"icon-sm": "size-8", |
| 3734 |
"icon-lg": "size-10" |
| 3735 |
} |
| 3736 |
}, |
| 3737 |
defaultVariants: { |
| 3738 |
variant: "default", |
| 3739 |
size: "default" |
| 3740 |
} |
| 3741 |
}); |
| 3742 |
const Button = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({ |
| 3743 |
className, |
| 3744 |
variant = "default", |
| 3745 |
size = "default", |
| 3746 |
asChild = false, |
| 3747 |
...props |
| 3748 |
}, ref) => { |
| 3749 |
const Comp = asChild ? radix_ui__WEBPACK_IMPORTED_MODULE_2__.Root : "button"; |
| 3750 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(Comp, { |
| 3751 |
ref: ref, |
| 3752 |
"data-slot": "button", |
| 3753 |
"data-variant": variant, |
| 3754 |
"data-size": size, |
| 3755 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_3__.cn)(buttonVariants({ |
| 3756 |
variant, |
| 3757 |
size, |
| 3758 |
className |
| 3759 |
})), |
| 3760 |
...props |
| 3761 |
}); |
| 3762 |
}); |
| 3763 |
Button.displayName = "Button"; |
| 3764 |
|
| 3765 |
|
| 3766 |
/***/ }, |
| 3767 |
|
| 3768 |
/***/ "./resources/js/components/ui/dialog.tsx" |
| 3769 |
/*!***********************************************!*\ |
| 3770 |
!*** ./resources/js/components/ui/dialog.tsx ***! |
| 3771 |
\***********************************************/ |
| 3772 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 3773 |
|
| 3774 |
__webpack_require__.r(__webpack_exports__); |
| 3775 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3776 |
/* harmony export */ Dialog: () => (/* binding */ Dialog), |
| 3777 |
/* harmony export */ DialogContent: () => (/* binding */ DialogContent), |
| 3778 |
/* harmony export */ DialogFooter: () => (/* binding */ DialogFooter), |
| 3779 |
/* harmony export */ DialogHeader: () => (/* binding */ DialogHeader) |
| 3780 |
/* harmony export */ }); |
| 3781 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 3782 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 3783 |
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); |
| 3784 |
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); |
| 3785 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/x.js"); |
| 3786 |
/* harmony import */ var _lib_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/lib/utils */ "./resources/js/lib/utils.ts"); |
| 3787 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 3788 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__); |
| 3789 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3790 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__); |
| 3791 |
/** |
| 3792 |
* Custom modal dialog. |
| 3793 |
* |
| 3794 |
* Uses z-[100000] on the overlay so it clears the WP admin bar (z-index: 99999). |
| 3795 |
* NOT using Radix Dialog — keeping this self-contained to control z-index. |
| 3796 |
* |
| 3797 |
* @package LiquidWeb\Harbor |
| 3798 |
*/ |
| 3799 |
|
| 3800 |
|
| 3801 |
|
| 3802 |
|
| 3803 |
|
| 3804 |
|
| 3805 |
/** |
| 3806 |
* Dialog overlay + panel. Traps focus via the backdrop click handler. |
| 3807 |
* @since 1.0.0 |
| 3808 |
*/ |
| 3809 |
function Dialog({ |
| 3810 |
open, |
| 3811 |
onClose, |
| 3812 |
children, |
| 3813 |
maxWidth = 'max-w-lg' |
| 3814 |
}) { |
| 3815 |
// Close on Escape key |
| 3816 |
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { |
| 3817 |
if (!open) return; |
| 3818 |
const handleKey = e => { |
| 3819 |
if (e.key === 'Escape') onClose(); |
| 3820 |
}; |
| 3821 |
document.addEventListener('keydown', handleKey); |
| 3822 |
return () => document.removeEventListener('keydown', handleKey); |
| 3823 |
}, [open, onClose]); |
| 3824 |
|
| 3825 |
// Prevent body scroll when open |
| 3826 |
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { |
| 3827 |
if (open) { |
| 3828 |
document.body.style.overflow = 'hidden'; |
| 3829 |
} else { |
| 3830 |
document.body.style.overflow = ''; |
| 3831 |
} |
| 3832 |
return () => { |
| 3833 |
document.body.style.overflow = ''; |
| 3834 |
}; |
| 3835 |
}, [open]); |
| 3836 |
if (!open) return null; |
| 3837 |
const portalTarget = document.getElementById('lw-harbor-root') ?? document.body; |
| 3838 |
return (0,react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", { |
| 3839 |
className: "fixed inset-0 z-[100000] flex items-center justify-center p-4", |
| 3840 |
role: "dialog", |
| 3841 |
"aria-modal": "true", |
| 3842 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", { |
| 3843 |
className: "absolute inset-0 bg-black/50", |
| 3844 |
onClick: onClose, |
| 3845 |
"aria-hidden": "true" |
| 3846 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", { |
| 3847 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_3__.cn)('relative z-10 w-full rounded-lg bg-background shadow-xl overflow-y-auto max-h-[90vh] outline-none', maxWidth), |
| 3848 |
onClick: e => e.stopPropagation(), |
| 3849 |
children: children |
| 3850 |
})] |
| 3851 |
}), portalTarget); |
| 3852 |
} |
| 3853 |
function DialogHeader({ |
| 3854 |
title, |
| 3855 |
description, |
| 3856 |
onClose |
| 3857 |
}) { |
| 3858 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", { |
| 3859 |
className: "flex items-start justify-between p-6 pb-4 border-b border-border", |
| 3860 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", { |
| 3861 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("h2", { |
| 3862 |
className: "text-lg font-semibold text-foreground m-0", |
| 3863 |
children: title |
| 3864 |
}), description && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("p", { |
| 3865 |
className: "mt-1 text-sm text-muted-foreground m-0", |
| 3866 |
children: description |
| 3867 |
})] |
| 3868 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("button", { |
| 3869 |
type: "button", |
| 3870 |
onClick: onClose, |
| 3871 |
className: "ml-4 shrink-0 rounded p-1 text-muted-foreground hover:text-foreground hover:bg-accent transition-colors", |
| 3872 |
"aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Close dialog', '%TEXTDOMAIN%'), |
| 3873 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_2__["default"], { |
| 3874 |
className: "w-4 h-4" |
| 3875 |
}) |
| 3876 |
})] |
| 3877 |
}); |
| 3878 |
} |
| 3879 |
function DialogContent({ |
| 3880 |
children, |
| 3881 |
className |
| 3882 |
}) { |
| 3883 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", { |
| 3884 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_3__.cn)('p-6', className), |
| 3885 |
children: children |
| 3886 |
}); |
| 3887 |
} |
| 3888 |
function DialogFooter({ |
| 3889 |
children, |
| 3890 |
className |
| 3891 |
}) { |
| 3892 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", { |
| 3893 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_3__.cn)('flex items-center justify-end gap-3 px-6 pb-6 pt-4', className), |
| 3894 |
children: children |
| 3895 |
}); |
| 3896 |
} |
| 3897 |
|
| 3898 |
/***/ }, |
| 3899 |
|
| 3900 |
/***/ "./resources/js/components/ui/dropdown-menu.tsx" |
| 3901 |
/*!******************************************************!*\ |
| 3902 |
!*** ./resources/js/components/ui/dropdown-menu.tsx ***! |
| 3903 |
\******************************************************/ |
| 3904 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 3905 |
|
| 3906 |
__webpack_require__.r(__webpack_exports__); |
| 3907 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3908 |
/* harmony export */ DropdownMenu: () => (/* binding */ DropdownMenu), |
| 3909 |
/* harmony export */ DropdownMenuContent: () => (/* binding */ DropdownMenuContent), |
| 3910 |
/* harmony export */ DropdownMenuGroup: () => (/* binding */ DropdownMenuGroup), |
| 3911 |
/* harmony export */ DropdownMenuItem: () => (/* binding */ DropdownMenuItem), |
| 3912 |
/* harmony export */ DropdownMenuLabel: () => (/* binding */ DropdownMenuLabel), |
| 3913 |
/* harmony export */ DropdownMenuSeparator: () => (/* binding */ DropdownMenuSeparator), |
| 3914 |
/* harmony export */ DropdownMenuTrigger: () => (/* binding */ DropdownMenuTrigger) |
| 3915 |
/* harmony export */ }); |
| 3916 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 3917 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 3918 |
/* harmony import */ var radix_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! radix-ui */ "./node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs"); |
| 3919 |
/* harmony import */ var _lib_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/lib/utils */ "./resources/js/lib/utils.ts"); |
| 3920 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3921 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); |
| 3922 |
/** |
| 3923 |
* Radix UI DropdownMenu primitives styled to the project's design system. |
| 3924 |
* |
| 3925 |
* Intentionally NOT using DropdownMenu.Portal — portal content renders outside |
| 3926 |
* .lw-harbor-ui and would be invisible to the PostCSS scope plugin (all Tailwind |
| 3927 |
* utilities are scoped to .lw-harbor-ui). The Content renders in the DOM tree but |
| 3928 |
* Radix positions it with position:fixed so it still floats above other elements. |
| 3929 |
* |
| 3930 |
* @package LiquidWeb\Harbor |
| 3931 |
*/ |
| 3932 |
|
| 3933 |
|
| 3934 |
|
| 3935 |
|
| 3936 |
const DropdownMenu = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Root; |
| 3937 |
const DropdownMenuTrigger = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Trigger; |
| 3938 |
const DropdownMenuGroup = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Group; |
| 3939 |
const DropdownMenuContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({ |
| 3940 |
className, |
| 3941 |
sideOffset = 4, |
| 3942 |
...props |
| 3943 |
}, ref) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.Content, { |
| 3944 |
ref: ref, |
| 3945 |
sideOffset: sideOffset, |
| 3946 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_2__.cn)('z-[100000] min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md', 'data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1', className), |
| 3947 |
...props |
| 3948 |
})); |
| 3949 |
DropdownMenuContent.displayName = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Content.displayName; |
| 3950 |
const DropdownMenuItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({ |
| 3951 |
className, |
| 3952 |
...props |
| 3953 |
}, ref) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.Item, { |
| 3954 |
ref: ref, |
| 3955 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_2__.cn)('relative flex w-full cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none', 'focus:bg-accent focus:text-accent-foreground', 'data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground', 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), |
| 3956 |
...props |
| 3957 |
})); |
| 3958 |
DropdownMenuItem.displayName = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Item.displayName; |
| 3959 |
const DropdownMenuLabel = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({ |
| 3960 |
className, |
| 3961 |
...props |
| 3962 |
}, ref) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.Label, { |
| 3963 |
ref: ref, |
| 3964 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_2__.cn)('px-2 py-1.5 text-sm font-semibold', className), |
| 3965 |
...props |
| 3966 |
})); |
| 3967 |
DropdownMenuLabel.displayName = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Label.displayName; |
| 3968 |
const DropdownMenuSeparator = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({ |
| 3969 |
className, |
| 3970 |
...props |
| 3971 |
}, ref) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.Separator, { |
| 3972 |
ref: ref, |
| 3973 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_2__.cn)('-mx-1 my-1 h-px bg-muted', className), |
| 3974 |
...props |
| 3975 |
})); |
| 3976 |
DropdownMenuSeparator.displayName = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Separator.displayName; |
| 3977 |
|
| 3978 |
|
| 3979 |
/***/ }, |
| 3980 |
|
| 3981 |
/***/ "./resources/js/components/ui/input.tsx" |
| 3982 |
/*!**********************************************!*\ |
| 3983 |
!*** ./resources/js/components/ui/input.tsx ***! |
| 3984 |
\**********************************************/ |
| 3985 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 3986 |
|
| 3987 |
__webpack_require__.r(__webpack_exports__); |
| 3988 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3989 |
/* harmony export */ Input: () => (/* binding */ Input) |
| 3990 |
/* harmony export */ }); |
| 3991 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 3992 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 3993 |
/* harmony import */ var _lib_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/lib/utils */ "./resources/js/lib/utils.ts"); |
| 3994 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3995 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__); |
| 3996 |
|
| 3997 |
|
| 3998 |
|
| 3999 |
function Input({ |
| 4000 |
className, |
| 4001 |
type, |
| 4002 |
...props |
| 4003 |
}) { |
| 4004 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("input", { |
| 4005 |
type: type, |
| 4006 |
"data-slot": "input", |
| 4007 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_1__.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-white px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className), |
| 4008 |
...props |
| 4009 |
}); |
| 4010 |
} |
| 4011 |
|
| 4012 |
|
| 4013 |
/***/ }, |
| 4014 |
|
| 4015 |
/***/ "./resources/js/components/ui/select.tsx" |
| 4016 |
/*!***********************************************!*\ |
| 4017 |
!*** ./resources/js/components/ui/select.tsx ***! |
| 4018 |
\***********************************************/ |
| 4019 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 4020 |
|
| 4021 |
__webpack_require__.r(__webpack_exports__); |
| 4022 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4023 |
/* harmony export */ Select: () => (/* binding */ Select), |
| 4024 |
/* harmony export */ SelectContent: () => (/* binding */ SelectContent), |
| 4025 |
/* harmony export */ SelectGroup: () => (/* binding */ SelectGroup), |
| 4026 |
/* harmony export */ SelectItem: () => (/* binding */ SelectItem), |
| 4027 |
/* harmony export */ SelectLabel: () => (/* binding */ SelectLabel), |
| 4028 |
/* harmony export */ SelectScrollDownButton: () => (/* binding */ SelectScrollDownButton), |
| 4029 |
/* harmony export */ SelectScrollUpButton: () => (/* binding */ SelectScrollUpButton), |
| 4030 |
/* harmony export */ SelectSeparator: () => (/* binding */ SelectSeparator), |
| 4031 |
/* harmony export */ SelectTrigger: () => (/* binding */ SelectTrigger), |
| 4032 |
/* harmony export */ SelectValue: () => (/* binding */ SelectValue) |
| 4033 |
/* harmony export */ }); |
| 4034 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 4035 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 4036 |
/* harmony import */ var radix_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! radix-ui */ "./node_modules/@radix-ui/react-select/dist/index.mjs"); |
| 4037 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/check.js"); |
| 4038 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/chevron-down.js"); |
| 4039 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/chevron-up.js"); |
| 4040 |
/* harmony import */ var _lib_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/lib/utils */ "./resources/js/lib/utils.ts"); |
| 4041 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 4042 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__); |
| 4043 |
/** |
| 4044 |
* Radix UI Select primitives styled to the project's design system. |
| 4045 |
* |
| 4046 |
* Intentionally NOT using Select.Portal — portal content renders outside |
| 4047 |
* .lw-harbor-ui and would be invisible to the PostCSS scope plugin (all Tailwind |
| 4048 |
* utilities are scoped to .lw-harbor-ui). The Content renders in the DOM tree but |
| 4049 |
* Radix positions it with position:fixed so it still floats above other elements. |
| 4050 |
* |
| 4051 |
* @package LiquidWeb\Harbor |
| 4052 |
*/ |
| 4053 |
|
| 4054 |
|
| 4055 |
|
| 4056 |
|
| 4057 |
|
| 4058 |
const Select = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Root; |
| 4059 |
const SelectGroup = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Group; |
| 4060 |
const SelectValue = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Value; |
| 4061 |
const SelectTrigger = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({ |
| 4062 |
className, |
| 4063 |
children, |
| 4064 |
...props |
| 4065 |
}, ref) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.Trigger, { |
| 4066 |
ref: ref, |
| 4067 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_5__.cn)('flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-colors', 'placeholder:text-muted-foreground [&>span]:line-clamp-1', 'outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]', 'disabled:cursor-not-allowed disabled:opacity-50', className), |
| 4068 |
...props, |
| 4069 |
children: [children, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.Icon, { |
| 4070 |
asChild: true, |
| 4071 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_3__["default"], { |
| 4072 |
className: "w-4 h-4 shrink-0 opacity-50" |
| 4073 |
}) |
| 4074 |
})] |
| 4075 |
})); |
| 4076 |
SelectTrigger.displayName = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Trigger.displayName; |
| 4077 |
const SelectScrollUpButton = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({ |
| 4078 |
className, |
| 4079 |
...props |
| 4080 |
}, ref) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.ScrollUpButton, { |
| 4081 |
ref: ref, |
| 4082 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_5__.cn)('flex cursor-default items-center justify-center py-1', className), |
| 4083 |
...props, |
| 4084 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_4__["default"], { |
| 4085 |
className: "w-4 h-4" |
| 4086 |
}) |
| 4087 |
})); |
| 4088 |
SelectScrollUpButton.displayName = radix_ui__WEBPACK_IMPORTED_MODULE_1__.ScrollUpButton.displayName; |
| 4089 |
const SelectScrollDownButton = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({ |
| 4090 |
className, |
| 4091 |
...props |
| 4092 |
}, ref) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.ScrollDownButton, { |
| 4093 |
ref: ref, |
| 4094 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_5__.cn)('flex cursor-default items-center justify-center py-1', className), |
| 4095 |
...props, |
| 4096 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_3__["default"], { |
| 4097 |
className: "w-4 h-4" |
| 4098 |
}) |
| 4099 |
})); |
| 4100 |
SelectScrollDownButton.displayName = radix_ui__WEBPACK_IMPORTED_MODULE_1__.ScrollDownButton.displayName; |
| 4101 |
const SelectContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({ |
| 4102 |
className, |
| 4103 |
children, |
| 4104 |
position = 'popper', |
| 4105 |
...props |
| 4106 |
}, ref) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.Content, { |
| 4107 |
ref: ref, |
| 4108 |
position: position, |
| 4109 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_5__.cn)('relative z-[100000] max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md', position === 'popper' && 'data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1', className), |
| 4110 |
...props, |
| 4111 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(SelectScrollUpButton, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.Viewport, { |
| 4112 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_5__.cn)('p-1', position === 'popper' && 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]'), |
| 4113 |
children: children |
| 4114 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(SelectScrollDownButton, {})] |
| 4115 |
})); |
| 4116 |
SelectContent.displayName = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Content.displayName; |
| 4117 |
const SelectLabel = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({ |
| 4118 |
className, |
| 4119 |
...props |
| 4120 |
}, ref) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.Label, { |
| 4121 |
ref: ref, |
| 4122 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_5__.cn)('px-2 py-1.5 text-sm font-semibold', className), |
| 4123 |
...props |
| 4124 |
})); |
| 4125 |
SelectLabel.displayName = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Label.displayName; |
| 4126 |
const SelectItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({ |
| 4127 |
className, |
| 4128 |
children, |
| 4129 |
...props |
| 4130 |
}, ref) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.Item, { |
| 4131 |
ref: ref, |
| 4132 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_5__.cn)('relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none', 'focus:bg-accent focus:text-accent-foreground', 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), |
| 4133 |
...props, |
| 4134 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("span", { |
| 4135 |
className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", |
| 4136 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.ItemIndicator, { |
| 4137 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_2__["default"], { |
| 4138 |
className: "w-4 h-4" |
| 4139 |
}) |
| 4140 |
}) |
| 4141 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.ItemText, { |
| 4142 |
children: children |
| 4143 |
})] |
| 4144 |
})); |
| 4145 |
SelectItem.displayName = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Item.displayName; |
| 4146 |
const SelectSeparator = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({ |
| 4147 |
className, |
| 4148 |
...props |
| 4149 |
}, ref) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.Separator, { |
| 4150 |
ref: ref, |
| 4151 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_5__.cn)('-mx-1 my-1 h-px bg-muted', className), |
| 4152 |
...props |
| 4153 |
})); |
| 4154 |
SelectSeparator.displayName = radix_ui__WEBPACK_IMPORTED_MODULE_1__.Separator.displayName; |
| 4155 |
|
| 4156 |
|
| 4157 |
/***/ }, |
| 4158 |
|
| 4159 |
/***/ "./resources/js/components/ui/switch.tsx" |
| 4160 |
/*!***********************************************!*\ |
| 4161 |
!*** ./resources/js/components/ui/switch.tsx ***! |
| 4162 |
\***********************************************/ |
| 4163 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 4164 |
|
| 4165 |
__webpack_require__.r(__webpack_exports__); |
| 4166 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4167 |
/* harmony export */ Switch: () => (/* binding */ Switch) |
| 4168 |
/* harmony export */ }); |
| 4169 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 4170 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 4171 |
/* harmony import */ var radix_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! radix-ui */ "./node_modules/@radix-ui/react-switch/dist/index.mjs"); |
| 4172 |
/* harmony import */ var _lib_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/lib/utils */ "./resources/js/lib/utils.ts"); |
| 4173 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 4174 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); |
| 4175 |
"use client"; |
| 4176 |
|
| 4177 |
|
| 4178 |
|
| 4179 |
|
| 4180 |
|
| 4181 |
function Switch({ |
| 4182 |
className, |
| 4183 |
size = "default", |
| 4184 |
...props |
| 4185 |
}) { |
| 4186 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.Root, { |
| 4187 |
"data-slot": "switch", |
| 4188 |
"data-size": size, |
| 4189 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_2__.cn)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6", className), |
| 4190 |
...props, |
| 4191 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_1__.Thumb, { |
| 4192 |
"data-slot": "switch-thumb", |
| 4193 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_2__.cn)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0") |
| 4194 |
}) |
| 4195 |
}); |
| 4196 |
} |
| 4197 |
|
| 4198 |
|
| 4199 |
/***/ }, |
| 4200 |
|
| 4201 |
/***/ "./resources/js/components/ui/toast.tsx" |
| 4202 |
/*!**********************************************!*\ |
| 4203 |
!*** ./resources/js/components/ui/toast.tsx ***! |
| 4204 |
\**********************************************/ |
| 4205 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 4206 |
|
| 4207 |
__webpack_require__.r(__webpack_exports__); |
| 4208 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4209 |
/* harmony export */ Toaster: () => (/* binding */ Toaster) |
| 4210 |
/* harmony export */ }); |
| 4211 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/circle-check-big.js"); |
| 4212 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/triangle-alert.js"); |
| 4213 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/info.js"); |
| 4214 |
/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lucide-react */ "./node_modules/lucide-react/dist/esm/icons/x.js"); |
| 4215 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 4216 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__); |
| 4217 |
/* harmony import */ var _lib_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/lib/utils */ "./resources/js/lib/utils.ts"); |
| 4218 |
/* harmony import */ var _context_toast_context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/context/toast-context */ "./resources/js/context/toast-context.tsx"); |
| 4219 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 4220 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__); |
| 4221 |
/** |
| 4222 |
* Toast notification renderer. |
| 4223 |
* |
| 4224 |
* Reads from useToastStore and renders a fixed bottom-right stack. |
| 4225 |
* Auto-dismiss is handled by the store (3.5s). |
| 4226 |
* |
| 4227 |
* @package LiquidWeb\Harbor |
| 4228 |
*/ |
| 4229 |
|
| 4230 |
|
| 4231 |
|
| 4232 |
|
| 4233 |
|
| 4234 |
const VARIANT_STYLES = { |
| 4235 |
default: 'bg-background border border-border text-foreground', |
| 4236 |
success: 'bg-green-50 border border-green-200 text-green-800', |
| 4237 |
error: 'bg-red-50 border border-red-200 text-red-800', |
| 4238 |
warning: 'bg-amber-50 border border-amber-200 text-amber-800' |
| 4239 |
}; |
| 4240 |
function ToastIcon({ |
| 4241 |
variant |
| 4242 |
}) { |
| 4243 |
if (variant === 'success') return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_0__["default"], { |
| 4244 |
className: "w-4 h-4 shrink-0" |
| 4245 |
}); |
| 4246 |
if (variant === 'error') return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_1__["default"], { |
| 4247 |
className: "w-4 h-4 shrink-0" |
| 4248 |
}); |
| 4249 |
if (variant === 'warning') return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_1__["default"], { |
| 4250 |
className: "w-4 h-4 shrink-0" |
| 4251 |
}); |
| 4252 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_2__["default"], { |
| 4253 |
className: "w-4 h-4 shrink-0" |
| 4254 |
}); |
| 4255 |
} |
| 4256 |
|
| 4257 |
/** |
| 4258 |
* Renders the toast stack. Mount as a sibling of AppShell in App.tsx. |
| 4259 |
* @since 1.0.0 |
| 4260 |
*/ |
| 4261 |
function Toaster() { |
| 4262 |
const { |
| 4263 |
toasts, |
| 4264 |
removeToast |
| 4265 |
} = (0,_context_toast_context__WEBPACK_IMPORTED_MODULE_6__.useToast)(); |
| 4266 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div", { |
| 4267 |
"aria-live": "polite", |
| 4268 |
className: "fixed bottom-4 right-4 z-[100001] flex flex-col gap-2 pointer-events-none", |
| 4269 |
children: toasts.map(toast => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", { |
| 4270 |
className: (0,_lib_utils__WEBPACK_IMPORTED_MODULE_5__.cn)('pointer-events-auto flex items-start gap-3 rounded-lg px-4 py-3 shadow-lg text-sm max-w-xs', VARIANT_STYLES[toast.variant]), |
| 4271 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(ToastIcon, { |
| 4272 |
variant: toast.variant |
| 4273 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", { |
| 4274 |
className: "flex-1 flex flex-col gap-1.5", |
| 4275 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("span", { |
| 4276 |
children: toast.message |
| 4277 |
}), toast.action && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("button", { |
| 4278 |
type: "button", |
| 4279 |
onClick: () => { |
| 4280 |
toast.action.onClick(); |
| 4281 |
removeToast(toast.id); |
| 4282 |
}, |
| 4283 |
className: "self-start text-xs font-medium underline underline-offset-2 hover:no-underline", |
| 4284 |
children: toast.action.label |
| 4285 |
})] |
| 4286 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("button", { |
| 4287 |
type: "button", |
| 4288 |
onClick: () => removeToast(toast.id), |
| 4289 |
className: "shrink-0 opacity-60 hover:opacity-100 transition-opacity", |
| 4290 |
"aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Dismiss notification', '%TEXTDOMAIN%'), |
| 4291 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(lucide_react__WEBPACK_IMPORTED_MODULE_3__["default"], { |
| 4292 |
className: "w-3.5 h-3.5" |
| 4293 |
}) |
| 4294 |
})] |
| 4295 |
}, toast.id)) |
| 4296 |
}); |
| 4297 |
} |
| 4298 |
|
| 4299 |
/***/ }, |
| 4300 |
|
| 4301 |
/***/ "./resources/js/components/ui/tooltip.tsx" |
| 4302 |
/*!************************************************!*\ |
| 4303 |
!*** ./resources/js/components/ui/tooltip.tsx ***! |
| 4304 |
\************************************************/ |
| 4305 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 4306 |
|
| 4307 |
__webpack_require__.r(__webpack_exports__); |
| 4308 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4309 |
/* harmony export */ Tooltip: () => (/* binding */ Tooltip) |
| 4310 |
/* harmony export */ }); |
| 4311 |
/* harmony import */ var radix_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! radix-ui */ "./node_modules/@radix-ui/react-tooltip/dist/index.mjs"); |
| 4312 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 4313 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__); |
| 4314 |
/** |
| 4315 |
* Single-component tooltip wrapper built on Radix UI. |
| 4316 |
* |
| 4317 |
* Uses a Portal + inline styles instead of Tailwind utilities because the |
| 4318 |
* Portal teleports content outside .lw-harbor-ui, where the PostCSS scope plugin |
| 4319 |
* would no longer apply. z-index 100001 clears the WP admin bar (99999) and |
| 4320 |
* our dialogs (100000). |
| 4321 |
* |
| 4322 |
* The children are wrapped in a <span> so that hover detection still works |
| 4323 |
* when the child element has pointer-events disabled (e.g. a disabled button). |
| 4324 |
* |
| 4325 |
* Usage: |
| 4326 |
* <Tooltip label="Some helpful text"> |
| 4327 |
* <Button disabled>...</Button> |
| 4328 |
* </Tooltip> |
| 4329 |
* |
| 4330 |
* @package LiquidWeb\Harbor |
| 4331 |
*/ |
| 4332 |
|
| 4333 |
|
| 4334 |
/** |
| 4335 |
* @since 1.0.0 |
| 4336 |
*/ |
| 4337 |
function Tooltip({ |
| 4338 |
label, |
| 4339 |
children, |
| 4340 |
className, |
| 4341 |
style |
| 4342 |
}) { |
| 4343 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_0__.Provider, { |
| 4344 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(radix_ui__WEBPACK_IMPORTED_MODULE_0__.Root, { |
| 4345 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_0__.Trigger, { |
| 4346 |
asChild: true, |
| 4347 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", { |
| 4348 |
className: className, |
| 4349 |
children: children |
| 4350 |
}) |
| 4351 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_0__.Portal, { |
| 4352 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_0__.Content, { |
| 4353 |
sideOffset: 6, |
| 4354 |
style: { |
| 4355 |
zIndex: 100001, |
| 4356 |
maxWidth: 240, |
| 4357 |
padding: '6px 10px', |
| 4358 |
borderRadius: 6, |
| 4359 |
fontSize: 12, |
| 4360 |
lineHeight: 1.45, |
| 4361 |
backgroundColor: '#1a1a1a', |
| 4362 |
color: '#fff', |
| 4363 |
boxShadow: '0 4px 12px rgba(0,0,0,0.2)', |
| 4364 |
...style |
| 4365 |
}, |
| 4366 |
children: label |
| 4367 |
}) |
| 4368 |
})] |
| 4369 |
}) |
| 4370 |
}); |
| 4371 |
} |
| 4372 |
|
| 4373 |
/***/ }, |
| 4374 |
|
| 4375 |
/***/ "./resources/js/context/error-modal-context.tsx" |
| 4376 |
/*!******************************************************!*\ |
| 4377 |
!*** ./resources/js/context/error-modal-context.tsx ***! |
| 4378 |
\******************************************************/ |
| 4379 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 4380 |
|
| 4381 |
__webpack_require__.r(__webpack_exports__); |
| 4382 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4383 |
/* harmony export */ ErrorModalProvider: () => (/* binding */ ErrorModalProvider), |
| 4384 |
/* harmony export */ useErrorModal: () => (/* binding */ useErrorModal) |
| 4385 |
/* harmony export */ }); |
| 4386 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 4387 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 4388 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 4389 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__); |
| 4390 |
/** |
| 4391 |
* Error modal context — surfaces resolver and API errors in a dismissible |
| 4392 |
* modal while keeping the full UI rendered. |
| 4393 |
* |
| 4394 |
* Mount <ErrorModalProvider> once in App.tsx; consume with useErrorModal() |
| 4395 |
* anywhere in the component tree. |
| 4396 |
* |
| 4397 |
* @package LiquidWeb\Harbor |
| 4398 |
*/ |
| 4399 |
|
| 4400 |
|
| 4401 |
const ErrorModalContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({ |
| 4402 |
errors: [], |
| 4403 |
addError: () => {}, |
| 4404 |
removeError: () => {}, |
| 4405 |
clearAll: () => {} |
| 4406 |
}); |
| 4407 |
|
| 4408 |
/** |
| 4409 |
* @since 1.0.0 |
| 4410 |
*/ |
| 4411 |
function ErrorModalProvider({ |
| 4412 |
children |
| 4413 |
}) { |
| 4414 |
const [errors, setErrors] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]); |
| 4415 |
const addError = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(error => { |
| 4416 |
setErrors(prev => prev.some(e => e.code === error.code) ? prev : [...prev, error]); |
| 4417 |
}, []); |
| 4418 |
const removeError = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(code => { |
| 4419 |
setErrors(prev => prev.filter(e => e.code !== code)); |
| 4420 |
}, []); |
| 4421 |
const clearAll = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => setErrors([]), []); |
| 4422 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(ErrorModalContext.Provider, { |
| 4423 |
value: { |
| 4424 |
errors, |
| 4425 |
addError, |
| 4426 |
removeError, |
| 4427 |
clearAll |
| 4428 |
}, |
| 4429 |
children: children |
| 4430 |
}); |
| 4431 |
} |
| 4432 |
|
| 4433 |
/** |
| 4434 |
* @since 1.0.0 |
| 4435 |
*/ |
| 4436 |
const useErrorModal = () => (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(ErrorModalContext); |
| 4437 |
|
| 4438 |
/***/ }, |
| 4439 |
|
| 4440 |
/***/ "./resources/js/context/filter-context.tsx" |
| 4441 |
/*!*************************************************!*\ |
| 4442 |
!*** ./resources/js/context/filter-context.tsx ***! |
| 4443 |
\*************************************************/ |
| 4444 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 4445 |
|
| 4446 |
__webpack_require__.r(__webpack_exports__); |
| 4447 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4448 |
/* harmony export */ FilterProvider: () => (/* binding */ FilterProvider), |
| 4449 |
/* harmony export */ useFilter: () => (/* binding */ useFilter) |
| 4450 |
/* harmony export */ }); |
| 4451 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 4452 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 4453 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 4454 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__); |
| 4455 |
/** |
| 4456 |
* Filter context — shared search query and product filter state. |
| 4457 |
* |
| 4458 |
* Mount <FilterProvider> once in App.tsx; consume with useFilter() anywhere |
| 4459 |
* in the component tree. |
| 4460 |
* |
| 4461 |
* @package LiquidWeb\Harbor |
| 4462 |
*/ |
| 4463 |
|
| 4464 |
|
| 4465 |
const FilterContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({ |
| 4466 |
searchQuery: '', |
| 4467 |
productFilter: 'all', |
| 4468 |
setSearchQuery: () => {}, |
| 4469 |
setProductFilter: () => {} |
| 4470 |
}); |
| 4471 |
|
| 4472 |
/** |
| 4473 |
* @since 1.0.0 |
| 4474 |
*/ |
| 4475 |
function FilterProvider({ |
| 4476 |
children |
| 4477 |
}) { |
| 4478 |
const [searchQuery, setSearchQuery] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''); |
| 4479 |
const [productFilter, setProductFilter] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('all'); |
| 4480 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(FilterContext.Provider, { |
| 4481 |
value: { |
| 4482 |
searchQuery, |
| 4483 |
setSearchQuery, |
| 4484 |
productFilter, |
| 4485 |
setProductFilter |
| 4486 |
}, |
| 4487 |
children: children |
| 4488 |
}); |
| 4489 |
} |
| 4490 |
|
| 4491 |
/** |
| 4492 |
* @since 1.0.0 |
| 4493 |
*/ |
| 4494 |
const useFilter = () => (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(FilterContext); |
| 4495 |
|
| 4496 |
/***/ }, |
| 4497 |
|
| 4498 |
/***/ "./resources/js/context/harbor-data-context.tsx" |
| 4499 |
/*!******************************************************!*\ |
| 4500 |
!*** ./resources/js/context/harbor-data-context.tsx ***! |
| 4501 |
\******************************************************/ |
| 4502 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 4503 |
|
| 4504 |
__webpack_require__.r(__webpack_exports__); |
| 4505 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4506 |
/* harmony export */ HarborDataProvider: () => (/* binding */ HarborDataProvider), |
| 4507 |
/* harmony export */ useHarborData: () => (/* binding */ useHarborData) |
| 4508 |
/* harmony export */ }); |
| 4509 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 4510 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 4511 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 4512 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 4513 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 4514 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); |
| 4515 |
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/store */ "./resources/js/store/index.ts"); |
| 4516 |
/* harmony import */ var _hooks_use_resolvable_select_use_resolvable_select__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/hooks/use-resolvable-select/use-resolvable-select */ "./resources/js/hooks/use-resolvable-select/use-resolvable-select.ts"); |
| 4517 |
/* harmony import */ var _errors_harbor_error__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/errors/harbor-error */ "./resources/js/errors/harbor-error.ts"); |
| 4518 |
/* harmony import */ var _errors_error_code__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/errors/error-code */ "./resources/js/errors/error-code.ts"); |
| 4519 |
/* harmony import */ var _context_error_modal_context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/context/error-modal-context */ "./resources/js/context/error-modal-context.tsx"); |
| 4520 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 4521 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__); |
| 4522 |
/** |
| 4523 |
* Harbor admin screen data context. |
| 4524 |
* |
| 4525 |
* Owns the four core resolvers for the Harbor admin screen (license, features, |
| 4526 |
* catalog, legacy licenses). Errors from any resolver are pushed to the |
| 4527 |
* ErrorModalContext so the error modal opens while the full UI stays rendered. |
| 4528 |
* Errors are automatically cleared when all resolvers recover. |
| 4529 |
* |
| 4530 |
* Mount <HarborDataProvider> inside <ErrorModalProvider> and outside |
| 4531 |
* <ErrorBoundary> so it remains alive through render crashes. |
| 4532 |
* |
| 4533 |
* @package LiquidWeb\Harbor |
| 4534 |
*/ |
| 4535 |
|
| 4536 |
|
| 4537 |
|
| 4538 |
|
| 4539 |
|
| 4540 |
|
| 4541 |
|
| 4542 |
|
| 4543 |
|
| 4544 |
const HarborDataContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({ |
| 4545 |
isLoading: true, |
| 4546 |
isLicenseLoading: true |
| 4547 |
}); |
| 4548 |
const RESOLVER_KEYS = ['license', 'features', 'catalog', 'legacyLicenses']; |
| 4549 |
function findErrors(results) { |
| 4550 |
const errors = []; |
| 4551 |
for (const key in results) { |
| 4552 |
const entry = results[key]; |
| 4553 |
if (entry.status === 'ERROR') { |
| 4554 |
errors.push(_errors_harbor_error__WEBPACK_IMPORTED_MODULE_5__["default"].syncFrom(entry.error, _errors_error_code__WEBPACK_IMPORTED_MODULE_6__.ErrorCode.ResolutionFailed, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to load your data.', '%TEXTDOMAIN%'))); |
| 4555 |
} |
| 4556 |
} |
| 4557 |
return errors; |
| 4558 |
} |
| 4559 |
|
| 4560 |
/** |
| 4561 |
* @since 1.3.0 Expose isLicenseLoading alongside isLoading so consumers can route on the license resolver alone. |
| 4562 |
* @since 1.0.0 |
| 4563 |
*/ |
| 4564 |
function HarborDataProvider({ |
| 4565 |
children |
| 4566 |
}) { |
| 4567 |
const { |
| 4568 |
addError, |
| 4569 |
removeError |
| 4570 |
} = (0,_context_error_modal_context__WEBPACK_IMPORTED_MODULE_7__.useErrorModal)(); |
| 4571 |
const lastErrorCodesRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)([]); |
| 4572 |
const result = (0,_hooks_use_resolvable_select_use_resolvable_select__WEBPACK_IMPORTED_MODULE_4__["default"])(resolve => ({ |
| 4573 |
license: resolve(_store__WEBPACK_IMPORTED_MODULE_3__.store).getLicenseKey(), |
| 4574 |
features: resolve(_store__WEBPACK_IMPORTED_MODULE_3__.store).getFeatures(), |
| 4575 |
catalog: resolve(_store__WEBPACK_IMPORTED_MODULE_3__.store).getCatalog(), |
| 4576 |
legacyLicenses: resolve(_store__WEBPACK_IMPORTED_MODULE_3__.store).getLegacyLicenses() |
| 4577 |
}), []); |
| 4578 |
const hasEverResolvedRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({ |
| 4579 |
license: false, |
| 4580 |
features: false, |
| 4581 |
catalog: false, |
| 4582 |
legacyLicenses: false |
| 4583 |
}); |
| 4584 |
for (const key of RESOLVER_KEYS) { |
| 4585 |
if (result[key].hasResolved) { |
| 4586 |
hasEverResolvedRef.current[key] = true; |
| 4587 |
} |
| 4588 |
} |
| 4589 |
const isLoading = RESOLVER_KEYS.some(key => result[key].isResolving && !hasEverResolvedRef.current[key]); |
| 4590 |
// True until the license resolver has settled its first cycle. Covers both |
| 4591 |
// the IDLE pre-fetch frame and the RESOLVING in-flight frame, so the |
| 4592 |
// welcome screen never flashes before the resolver has had a chance to |
| 4593 |
// report whether a key exists. |
| 4594 |
const isLicenseLoading = !hasEverResolvedRef.current.license; |
| 4595 |
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { |
| 4596 |
const found = findErrors(result); |
| 4597 |
if (found.length > 0) { |
| 4598 |
lastErrorCodesRef.current = found.map(e => e.code); |
| 4599 |
found.forEach(error => addError(error)); |
| 4600 |
} else if (lastErrorCodesRef.current.length > 0) { |
| 4601 |
lastErrorCodesRef.current.forEach(code => removeError(code)); |
| 4602 |
lastErrorCodesRef.current = []; |
| 4603 |
} |
| 4604 |
}, [result, addError, removeError]); |
| 4605 |
const licenseError = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => select(_store__WEBPACK_IMPORTED_MODULE_3__.store).getLicenseError(), []); |
| 4606 |
const lastLicenseErrorCodeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); |
| 4607 |
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { |
| 4608 |
if (licenseError !== null) { |
| 4609 |
const error = new _errors_harbor_error__WEBPACK_IMPORTED_MODULE_5__["default"](_errors_error_code__WEBPACK_IMPORTED_MODULE_6__.ErrorCode.LicenseValidateFailed, licenseError.message); |
| 4610 |
lastLicenseErrorCodeRef.current = error.code; |
| 4611 |
addError(error); |
| 4612 |
} else if (lastLicenseErrorCodeRef.current !== null) { |
| 4613 |
removeError(lastLicenseErrorCodeRef.current); |
| 4614 |
lastLicenseErrorCodeRef.current = null; |
| 4615 |
} |
| 4616 |
}, [licenseError, addError, removeError]); |
| 4617 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(HarborDataContext.Provider, { |
| 4618 |
value: { |
| 4619 |
isLoading, |
| 4620 |
isLicenseLoading |
| 4621 |
}, |
| 4622 |
children: children |
| 4623 |
}); |
| 4624 |
} |
| 4625 |
|
| 4626 |
/** |
| 4627 |
* @since 1.0.0 |
| 4628 |
*/ |
| 4629 |
const useHarborData = () => (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(HarborDataContext); |
| 4630 |
|
| 4631 |
/***/ }, |
| 4632 |
|
| 4633 |
/***/ "./resources/js/context/reload-banner-context.tsx" |
| 4634 |
/*!********************************************************!*\ |
| 4635 |
!*** ./resources/js/context/reload-banner-context.tsx ***! |
| 4636 |
\********************************************************/ |
| 4637 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 4638 |
|
| 4639 |
__webpack_require__.r(__webpack_exports__); |
| 4640 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4641 |
/* harmony export */ ReloadBannerProvider: () => (/* binding */ ReloadBannerProvider), |
| 4642 |
/* harmony export */ useReloadBanner: () => (/* binding */ useReloadBanner) |
| 4643 |
/* harmony export */ }); |
| 4644 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 4645 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 4646 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 4647 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__); |
| 4648 |
/** |
| 4649 |
* @package LiquidWeb\Harbor |
| 4650 |
*/ |
| 4651 |
|
| 4652 |
|
| 4653 |
const ReloadBannerContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({ |
| 4654 |
needsReload: false, |
| 4655 |
setNeedsReload: () => {} |
| 4656 |
}); |
| 4657 |
|
| 4658 |
/** |
| 4659 |
* @since 1.0.0 |
| 4660 |
*/ |
| 4661 |
function ReloadBannerProvider({ |
| 4662 |
children |
| 4663 |
}) { |
| 4664 |
const [needsReload, setNeedsReload] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false); |
| 4665 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(ReloadBannerContext.Provider, { |
| 4666 |
value: { |
| 4667 |
needsReload, |
| 4668 |
setNeedsReload |
| 4669 |
}, |
| 4670 |
children: children |
| 4671 |
}); |
| 4672 |
} |
| 4673 |
|
| 4674 |
/** |
| 4675 |
* @since 1.0.0 |
| 4676 |
*/ |
| 4677 |
const useReloadBanner = () => (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(ReloadBannerContext); |
| 4678 |
|
| 4679 |
/***/ }, |
| 4680 |
|
| 4681 |
/***/ "./resources/js/context/toast-context.tsx" |
| 4682 |
/*!************************************************!*\ |
| 4683 |
!*** ./resources/js/context/toast-context.tsx ***! |
| 4684 |
\************************************************/ |
| 4685 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 4686 |
|
| 4687 |
__webpack_require__.r(__webpack_exports__); |
| 4688 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4689 |
/* harmony export */ ToastProvider: () => (/* binding */ ToastProvider), |
| 4690 |
/* harmony export */ useToast: () => (/* binding */ useToast) |
| 4691 |
/* harmony export */ }); |
| 4692 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 4693 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 4694 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 4695 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__); |
| 4696 |
/** |
| 4697 |
* Toast notification context — replaces Zustand toast-store.ts. |
| 4698 |
* |
| 4699 |
* Mount <ToastProvider> once in App.tsx; consume with useToast() anywhere |
| 4700 |
* in the component tree. |
| 4701 |
* |
| 4702 |
* @package LiquidWeb\Harbor |
| 4703 |
*/ |
| 4704 |
|
| 4705 |
|
| 4706 |
const ToastContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({ |
| 4707 |
toasts: [], |
| 4708 |
addToast: () => {}, |
| 4709 |
removeToast: () => {} |
| 4710 |
}); |
| 4711 |
|
| 4712 |
/** |
| 4713 |
* @since 1.0.0 |
| 4714 |
*/ |
| 4715 |
function ToastProvider({ |
| 4716 |
children |
| 4717 |
}) { |
| 4718 |
const [toasts, setToasts] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]); |
| 4719 |
const counterRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0); |
| 4720 |
const removeToast = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(id => { |
| 4721 |
setToasts(prev => prev.filter(t => t.id !== id)); |
| 4722 |
}, []); |
| 4723 |
const addToast = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((message, variant = 'default', action) => { |
| 4724 |
const id = `lw-harbor-toast-id-${++counterRef.current}`; |
| 4725 |
setToasts(prev => [...prev, { |
| 4726 |
id, |
| 4727 |
message, |
| 4728 |
variant, |
| 4729 |
action |
| 4730 |
}]); |
| 4731 |
if (!action) { |
| 4732 |
setTimeout(() => removeToast(id), 3500); |
| 4733 |
} |
| 4734 |
}, [removeToast]); |
| 4735 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(ToastContext.Provider, { |
| 4736 |
value: { |
| 4737 |
toasts, |
| 4738 |
addToast, |
| 4739 |
removeToast |
| 4740 |
}, |
| 4741 |
children: children |
| 4742 |
}); |
| 4743 |
} |
| 4744 |
|
| 4745 |
/** |
| 4746 |
* @since 1.0.0 |
| 4747 |
*/ |
| 4748 |
const useToast = () => (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(ToastContext); |
| 4749 |
|
| 4750 |
/***/ }, |
| 4751 |
|
| 4752 |
/***/ "./resources/js/data/products.ts" |
| 4753 |
/*!***************************************!*\ |
| 4754 |
!*** ./resources/js/data/products.ts ***! |
| 4755 |
\***************************************/ |
| 4756 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 4757 |
|
| 4758 |
__webpack_require__.r(__webpack_exports__); |
| 4759 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4760 |
/* harmony export */ PRODUCTS: () => (/* binding */ PRODUCTS), |
| 4761 |
/* harmony export */ getProduct: () => (/* binding */ getProduct) |
| 4762 |
/* harmony export */ }); |
| 4763 |
/** |
| 4764 |
* Product catalog data. |
| 4765 |
* |
| 4766 |
* Product metadata. Tier definitions and feature lists come from the |
| 4767 |
* liquidweb/harbor/v1/catalog and liquidweb/harbor/v1/features REST |
| 4768 |
* endpoints — not stored here. |
| 4769 |
* |
| 4770 |
* @package LiquidWeb\Harbor |
| 4771 |
*/ |
| 4772 |
|
| 4773 |
const PRODUCTS = [{ |
| 4774 |
slug: 'give', |
| 4775 |
name: 'GiveWP', |
| 4776 |
tagline: 'Donation forms and fundraising for WordPress' |
| 4777 |
}, { |
| 4778 |
slug: 'the-events-calendar', |
| 4779 |
name: 'The Events Calendar', |
| 4780 |
tagline: 'Powerful event management for WordPress' |
| 4781 |
}, { |
| 4782 |
slug: 'learndash', |
| 4783 |
name: 'LearnDash', |
| 4784 |
tagline: 'World-class LMS for online courses' |
| 4785 |
}, { |
| 4786 |
slug: 'kadence', |
| 4787 |
name: 'Kadence', |
| 4788 |
tagline: 'Page builder and theme toolkit for WordPress' |
| 4789 |
}]; |
| 4790 |
|
| 4791 |
/** Lookup a product by slug */ |
| 4792 |
function getProduct(slug) { |
| 4793 |
return PRODUCTS.find(p => p.slug === slug); |
| 4794 |
} |
| 4795 |
|
| 4796 |
/***/ }, |
| 4797 |
|
| 4798 |
/***/ "./resources/js/errors/error-code.ts" |
| 4799 |
/*!*******************************************!*\ |
| 4800 |
!*** ./resources/js/errors/error-code.ts ***! |
| 4801 |
\*******************************************/ |
| 4802 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 4803 |
|
| 4804 |
__webpack_require__.r(__webpack_exports__); |
| 4805 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4806 |
/* harmony export */ ErrorCode: () => (/* binding */ ErrorCode) |
| 4807 |
/* harmony export */ }); |
| 4808 |
/** |
| 4809 |
* Machine-readable error codes for HarborError instances. |
| 4810 |
* |
| 4811 |
* @package LiquidWeb\Harbor |
| 4812 |
*/ |
| 4813 |
let ErrorCode = /*#__PURE__*/function (ErrorCode) { |
| 4814 |
ErrorCode["FeaturesFetchFailed"] = "features-fetch-failed"; |
| 4815 |
ErrorCode["FeatureEnableFailed"] = "feature-enable-failed"; |
| 4816 |
ErrorCode["FeatureDisableFailed"] = "feature-disable-failed"; |
| 4817 |
ErrorCode["FeatureUpdateFailed"] = "feature-update-failed"; |
| 4818 |
ErrorCode["LicenseFetchFailed"] = "license-fetch-failed"; |
| 4819 |
ErrorCode["LicenseActionInProgress"] = "license-action-in-progress"; |
| 4820 |
ErrorCode["LicenseStoreFailed"] = "license-store-failed"; |
| 4821 |
ErrorCode["LicenseDeleteFailed"] = "license-delete-failed"; |
| 4822 |
ErrorCode["LicenseRefreshFailed"] = "license-refresh-failed"; |
| 4823 |
ErrorCode["LicenseValidateFailed"] = "license-validate-failed"; |
| 4824 |
ErrorCode["CatalogFetchFailed"] = "catalog-fetch-failed"; |
| 4825 |
ErrorCode["CatalogRefreshFailed"] = "catalog-refresh-failed"; |
| 4826 |
ErrorCode["LegacyLicensesFetchFailed"] = "legacy-licenses-fetch-failed"; |
| 4827 |
ErrorCode["ResolutionFailed"] = "resolution-failed"; |
| 4828 |
return ErrorCode; |
| 4829 |
}({}); |
| 4830 |
|
| 4831 |
/***/ }, |
| 4832 |
|
| 4833 |
/***/ "./resources/js/errors/harbor-error.ts" |
| 4834 |
/*!*********************************************!*\ |
| 4835 |
!*** ./resources/js/errors/harbor-error.ts ***! |
| 4836 |
\*********************************************/ |
| 4837 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 4838 |
|
| 4839 |
__webpack_require__.r(__webpack_exports__); |
| 4840 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4841 |
/* harmony export */ "default": () => (/* binding */ HarborError) |
| 4842 |
/* harmony export */ }); |
| 4843 |
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./resources/js/errors/utils.ts"); |
| 4844 |
/** |
| 4845 |
* HarborError -- typed wrapper around the WP REST API serialized WP_Error. |
| 4846 |
* |
| 4847 |
* @wordpress/api-fetch throws the parsed JSON body (a plain object) when |
| 4848 |
* the server returns a non-2xx response. HarborError normalizes that into |
| 4849 |
* a proper Error subclass with structured access to code, data, and any |
| 4850 |
* additional errors. |
| 4851 |
* |
| 4852 |
* The entire error chain is typed. `additionalErrors` contains HarborError |
| 4853 |
* instances (not plain WpRestError objects), so consumers get `.code`, |
| 4854 |
* `.status`, and `.data` on every entry without casting. |
| 4855 |
* |
| 4856 |
* @package LiquidWeb\Harbor |
| 4857 |
*/ |
| 4858 |
|
| 4859 |
|
| 4860 |
class HarborError extends Error { |
| 4861 |
/** |
| 4862 |
* Machine-readable error code from the WP_Error. |
| 4863 |
*/ |
| 4864 |
|
| 4865 |
/** |
| 4866 |
* Data payload (usually contains `{ status: number }`). |
| 4867 |
*/ |
| 4868 |
|
| 4869 |
/** |
| 4870 |
* Secondary errors from a multi-code WP_Error response. This is a |
| 4871 |
* deserialization concern only. Use `cause` (via `HarborError.wrap()`) |
| 4872 |
* to chain errors on the frontend. |
| 4873 |
*/ |
| 4874 |
|
| 4875 |
/** |
| 4876 |
* Original cause, if this error wraps another. |
| 4877 |
*/ |
| 4878 |
|
| 4879 |
constructor(codeOrError, messageOrOptions, options) { |
| 4880 |
if (typeof codeOrError === 'string') { |
| 4881 |
super(messageOrOptions); |
| 4882 |
this.name = 'HarborError'; |
| 4883 |
this.code = codeOrError; |
| 4884 |
this.data = {}; |
| 4885 |
this.additionalErrors = []; |
| 4886 |
this.cause = options?.cause; |
| 4887 |
} else { |
| 4888 |
super(codeOrError.message); |
| 4889 |
this.name = 'HarborError'; |
| 4890 |
this.code = codeOrError.code; |
| 4891 |
this.data = codeOrError.data ?? {}; |
| 4892 |
this.additionalErrors = (codeOrError.additional_errors ?? []).map(entry => new HarborError(entry)); |
| 4893 |
this.cause = messageOrOptions?.cause; |
| 4894 |
} |
| 4895 |
} |
| 4896 |
|
| 4897 |
/** |
| 4898 |
* HTTP status code, if present. |
| 4899 |
*/ |
| 4900 |
get status() { |
| 4901 |
return typeof this.data.status === 'number' ? this.data.status : undefined; |
| 4902 |
} |
| 4903 |
|
| 4904 |
/** |
| 4905 |
* Flatten the error tree into an array. Collects this error, then its |
| 4906 |
* additionalErrors (server-side siblings), then recurses into cause. |
| 4907 |
*/ |
| 4908 |
toArray() { |
| 4909 |
const result = [this]; |
| 4910 |
for (const additional of this.additionalErrors) { |
| 4911 |
result.push(...additional.toArray()); |
| 4912 |
} |
| 4913 |
if (this.cause instanceof HarborError) { |
| 4914 |
result.push(...this.cause.toArray()); |
| 4915 |
} |
| 4916 |
return result; |
| 4917 |
} |
| 4918 |
|
| 4919 |
/** |
| 4920 |
* Async conversion of an unknown value into an HarborError. |
| 4921 |
* |
| 4922 |
* Handles everything `syncFrom` does, plus `Response` objects that |
| 4923 |
* apiFetch throws when it cannot parse JSON or when `parse: false` |
| 4924 |
* is used. |
| 4925 |
*/ |
| 4926 |
static async from(error, code, message) { |
| 4927 |
if (error instanceof Response) { |
| 4928 |
try { |
| 4929 |
const body = await error.json(); |
| 4930 |
if ((0,_utils__WEBPACK_IMPORTED_MODULE_0__.isWpRestError)(body)) { |
| 4931 |
return new HarborError(body); |
| 4932 |
} |
| 4933 |
} catch { |
| 4934 |
// Response body wasn't JSON, fall through. |
| 4935 |
} |
| 4936 |
return new HarborError(code, message); |
| 4937 |
} |
| 4938 |
return HarborError.syncFrom(error, code, message); |
| 4939 |
} |
| 4940 |
|
| 4941 |
/** |
| 4942 |
* Synchronous conversion of an unknown value into an HarborError. |
| 4943 |
* |
| 4944 |
* If the value is already an HarborError, returns it as-is. If it is |
| 4945 |
* a WpRestError, hydrates it via the constructor. Anything else |
| 4946 |
* (plain Error, string, etc.) produces an HarborError with the given |
| 4947 |
* fallback `code` and `message`, and the original is stored as `cause`. |
| 4948 |
*/ |
| 4949 |
static syncFrom(error, code, message) { |
| 4950 |
if (error instanceof HarborError) { |
| 4951 |
return error; |
| 4952 |
} |
| 4953 |
if ((0,_utils__WEBPACK_IMPORTED_MODULE_0__.isWpRestError)(error)) { |
| 4954 |
return new HarborError(error); |
| 4955 |
} |
| 4956 |
if (error instanceof Error) { |
| 4957 |
return new HarborError({ |
| 4958 |
code, |
| 4959 |
message |
| 4960 |
}, { |
| 4961 |
cause: error |
| 4962 |
}); |
| 4963 |
} |
| 4964 |
return new HarborError({ |
| 4965 |
code, |
| 4966 |
message |
| 4967 |
}); |
| 4968 |
} |
| 4969 |
|
| 4970 |
/** |
| 4971 |
* Async wrap of an unknown caught value into an HarborError with context. |
| 4972 |
* |
| 4973 |
* The provided `code` and `message` describe what operation failed. |
| 4974 |
* The original value is preserved as `cause` so the full error chain |
| 4975 |
* is available for inspection. When the original is a WpRestError, |
| 4976 |
* its `data` and `additional_errors` are also carried forward. |
| 4977 |
* |
| 4978 |
* Handles `Response` objects that apiFetch throws when it cannot |
| 4979 |
* parse JSON or when `parse: false` is used. |
| 4980 |
*/ |
| 4981 |
static async wrap(error, code, message) { |
| 4982 |
if (error instanceof Response) { |
| 4983 |
try { |
| 4984 |
const body = await error.json(); |
| 4985 |
if ((0,_utils__WEBPACK_IMPORTED_MODULE_0__.isWpRestError)(body)) { |
| 4986 |
return new HarborError({ |
| 4987 |
code, |
| 4988 |
message, |
| 4989 |
data: body.data, |
| 4990 |
additional_errors: body.additional_errors |
| 4991 |
}, { |
| 4992 |
cause: new HarborError(body) |
| 4993 |
}); |
| 4994 |
} |
| 4995 |
} catch { |
| 4996 |
// Response body wasn't JSON, fall through. |
| 4997 |
} |
| 4998 |
return new HarborError({ |
| 4999 |
code, |
| 5000 |
message |
| 5001 |
}); |
| 5002 |
} |
| 5003 |
return HarborError.wrapSync(error, code, message); |
| 5004 |
} |
| 5005 |
|
| 5006 |
/** |
| 5007 |
* Synchronous wrap of an unknown caught value into an HarborError |
| 5008 |
* with context. |
| 5009 |
* |
| 5010 |
* Same as `wrap` but cannot handle `Response` objects. Use this in |
| 5011 |
* synchronous code paths where `await` is not available. |
| 5012 |
*/ |
| 5013 |
static wrapSync(error, code, message) { |
| 5014 |
if (error instanceof HarborError || error instanceof Error) { |
| 5015 |
return new HarborError({ |
| 5016 |
code, |
| 5017 |
message |
| 5018 |
}, { |
| 5019 |
cause: error |
| 5020 |
}); |
| 5021 |
} |
| 5022 |
if ((0,_utils__WEBPACK_IMPORTED_MODULE_0__.isWpRestError)(error)) { |
| 5023 |
return new HarborError({ |
| 5024 |
code, |
| 5025 |
message, |
| 5026 |
data: error.data, |
| 5027 |
additional_errors: error.additional_errors |
| 5028 |
}, { |
| 5029 |
cause: new HarborError(error) |
| 5030 |
}); |
| 5031 |
} |
| 5032 |
return new HarborError({ |
| 5033 |
code, |
| 5034 |
message |
| 5035 |
}); |
| 5036 |
} |
| 5037 |
} |
| 5038 |
|
| 5039 |
/***/ }, |
| 5040 |
|
| 5041 |
/***/ "./resources/js/errors/index.ts" |
| 5042 |
/*!**************************************!*\ |
| 5043 |
!*** ./resources/js/errors/index.ts ***! |
| 5044 |
\**************************************/ |
| 5045 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 5046 |
|
| 5047 |
__webpack_require__.r(__webpack_exports__); |
| 5048 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5049 |
/* harmony export */ ErrorCode: () => (/* reexport safe */ _error_code__WEBPACK_IMPORTED_MODULE_1__.ErrorCode), |
| 5050 |
/* harmony export */ HarborError: () => (/* reexport safe */ _harbor_error__WEBPACK_IMPORTED_MODULE_0__["default"]), |
| 5051 |
/* harmony export */ isWpRestError: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_2__.isWpRestError) |
| 5052 |
/* harmony export */ }); |
| 5053 |
/* harmony import */ var _harbor_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./harbor-error */ "./resources/js/errors/harbor-error.ts"); |
| 5054 |
/* harmony import */ var _error_code__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./error-code */ "./resources/js/errors/error-code.ts"); |
| 5055 |
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./resources/js/errors/utils.ts"); |
| 5056 |
|
| 5057 |
|
| 5058 |
|
| 5059 |
|
| 5060 |
/***/ }, |
| 5061 |
|
| 5062 |
/***/ "./resources/js/errors/utils.ts" |
| 5063 |
/*!**************************************!*\ |
| 5064 |
!*** ./resources/js/errors/utils.ts ***! |
| 5065 |
\**************************************/ |
| 5066 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 5067 |
|
| 5068 |
__webpack_require__.r(__webpack_exports__); |
| 5069 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5070 |
/* harmony export */ isWpRestError: () => (/* binding */ isWpRestError) |
| 5071 |
/* harmony export */ }); |
| 5072 |
/** |
| 5073 |
* Error utility functions. |
| 5074 |
* |
| 5075 |
* @package LiquidWeb\Harbor |
| 5076 |
*/ |
| 5077 |
|
| 5078 |
/** |
| 5079 |
* Type guard. Checks whether an unknown value matches the WP REST error shape. |
| 5080 |
*/ |
| 5081 |
function isWpRestError(value) { |
| 5082 |
return typeof value === 'object' && value !== null && 'code' in value && typeof value.code === 'string' && 'message' in value && typeof value.message === 'string'; |
| 5083 |
} |
| 5084 |
|
| 5085 |
/***/ }, |
| 5086 |
|
| 5087 |
/***/ "./resources/js/hooks/use-resolvable-select/use-resolvable-select.ts" |
| 5088 |
/*!***************************************************************************!*\ |
| 5089 |
!*** ./resources/js/hooks/use-resolvable-select/use-resolvable-select.ts ***! |
| 5090 |
\***************************************************************************/ |
| 5091 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 5092 |
|
| 5093 |
__webpack_require__.r(__webpack_exports__); |
| 5094 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5095 |
/* harmony export */ "default": () => (/* binding */ useResolvableSelect) |
| 5096 |
/* harmony export */ }); |
| 5097 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 5098 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__); |
| 5099 |
/** |
| 5100 |
* Like useSelect, but selectors return objects containing |
| 5101 |
* both the original data AND the resolution info. |
| 5102 |
* |
| 5103 |
* Ported from sync-saas and converted to TypeScript. |
| 5104 |
* |
| 5105 |
* Inspired by `@wordpress/core-data` `useQuerySelect`. |
| 5106 |
* |
| 5107 |
* @see https://github.com/WordPress/gutenberg/blob/c97c26fe371e3d40efe197d8f398326a16cdbf46/packages/core-data/src/hooks/use-query-select.ts |
| 5108 |
* |
| 5109 |
* @package LiquidWeb\Harbor |
| 5110 |
*/ |
| 5111 |
|
| 5112 |
|
| 5113 |
/** |
| 5114 |
* Meta selectors added by @wordpress/data that should not be enriched. |
| 5115 |
*/ |
| 5116 |
const META_SELECTORS = ['getIsResolving', 'hasStartedResolution', 'hasFinishedResolution', 'isResolving', 'getCachedResolvers']; |
| 5117 |
|
| 5118 |
/** |
| 5119 |
* Cache enriched selector proxies by selector object identity so we |
| 5120 |
* don't recreate them on every useSelect call within the same render. |
| 5121 |
*/ |
| 5122 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 5123 |
const cache = new WeakMap(); |
| 5124 |
|
| 5125 |
/** |
| 5126 |
* Wrap store selectors so each call returns a {@link ResolvableSelectResponse} |
| 5127 |
* with the original data and resolution metadata. |
| 5128 |
*/ |
| 5129 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 5130 |
function enrichSelectors(selectors) { |
| 5131 |
const cached = cache.get(selectors); |
| 5132 |
if (cached) { |
| 5133 |
return cached; |
| 5134 |
} |
| 5135 |
|
| 5136 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 5137 |
const resolvers = {}; |
| 5138 |
for (const selectorName in selectors) { |
| 5139 |
if (META_SELECTORS.includes(selectorName)) { |
| 5140 |
continue; |
| 5141 |
} |
| 5142 |
Object.defineProperty(resolvers, selectorName, { |
| 5143 |
get: () => (...args) => { |
| 5144 |
const data = selectors[selectorName](...args); |
| 5145 |
const resolutionState = selectors.getResolutionState(selectorName, args); |
| 5146 |
const resolutionStatus = resolutionState?.status; |
| 5147 |
let status; |
| 5148 |
switch (resolutionStatus) { |
| 5149 |
case 'resolving': |
| 5150 |
status = 'RESOLVING'; |
| 5151 |
break; |
| 5152 |
case 'finished': |
| 5153 |
status = 'SUCCESS'; |
| 5154 |
break; |
| 5155 |
case 'error': |
| 5156 |
status = 'ERROR'; |
| 5157 |
break; |
| 5158 |
default: |
| 5159 |
status = 'IDLE'; |
| 5160 |
} |
| 5161 |
return { |
| 5162 |
data, |
| 5163 |
status, |
| 5164 |
error: resolutionState?.error ?? null, |
| 5165 |
isResolving: status === 'RESOLVING', |
| 5166 |
hasStarted: status !== 'IDLE', |
| 5167 |
hasResolved: status === 'SUCCESS' || status === 'ERROR' |
| 5168 |
}; |
| 5169 |
} |
| 5170 |
}); |
| 5171 |
} |
| 5172 |
cache.set(selectors, resolvers); |
| 5173 |
return resolvers; |
| 5174 |
} |
| 5175 |
|
| 5176 |
/** |
| 5177 |
* Like useSelect, but the selectors return objects containing |
| 5178 |
* both the original data AND the resolution info. |
| 5179 |
*/ |
| 5180 |
function useResolvableSelect(mapResolvableSelect, deps) { |
| 5181 |
return (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useSelect)((select, registry) => { |
| 5182 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 5183 |
const resolve = store => enrichSelectors(select(store)); |
| 5184 |
return mapResolvableSelect(resolve, registry); |
| 5185 |
}, |
| 5186 |
// eslint-disable-next-line react-hooks/exhaustive-deps |
| 5187 |
deps); |
| 5188 |
} |
| 5189 |
|
| 5190 |
/***/ }, |
| 5191 |
|
| 5192 |
/***/ "./resources/js/hooks/useFeatureRow.ts" |
| 5193 |
/*!*********************************************!*\ |
| 5194 |
!*** ./resources/js/hooks/useFeatureRow.ts ***! |
| 5195 |
\*********************************************/ |
| 5196 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 5197 |
|
| 5198 |
__webpack_require__.r(__webpack_exports__); |
| 5199 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5200 |
/* harmony export */ useFeatureRow: () => (/* binding */ useFeatureRow) |
| 5201 |
/* harmony export */ }); |
| 5202 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 5203 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 5204 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 5205 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 5206 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 5207 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); |
| 5208 |
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/store */ "./resources/js/store/index.ts"); |
| 5209 |
/* harmony import */ var _lib_feature_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/lib/feature-utils */ "./resources/js/lib/feature-utils.ts"); |
| 5210 |
/* harmony import */ var _context_toast_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/context/toast-context */ "./resources/js/context/toast-context.tsx"); |
| 5211 |
/* harmony import */ var _context_reload_banner_context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/context/reload-banner-context */ "./resources/js/context/reload-banner-context.tsx"); |
| 5212 |
/* harmony import */ var _context_error_modal_context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/context/error-modal-context */ "./resources/js/context/error-modal-context.tsx"); |
| 5213 |
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/errors */ "./resources/js/errors/index.ts"); |
| 5214 |
/* harmony import */ var _types_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/types/utils */ "./resources/js/types/utils.ts"); |
| 5215 |
/* harmony import */ var _lib_harbor_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/lib/harbor-data */ "./resources/js/lib/harbor-data.ts"); |
| 5216 |
/** |
| 5217 |
* Behavior hook for FeatureRow. |
| 5218 |
* |
| 5219 |
* Encapsulates store wiring, async action handlers, and all derived state |
| 5220 |
* so FeatureRow itself stays a pure composition of atoms. |
| 5221 |
* |
| 5222 |
* @package LiquidWeb\Harbor |
| 5223 |
*/ |
| 5224 |
|
| 5225 |
|
| 5226 |
|
| 5227 |
|
| 5228 |
|
| 5229 |
|
| 5230 |
|
| 5231 |
|
| 5232 |
|
| 5233 |
|
| 5234 |
|
| 5235 |
function getBadgeStatus(pendingAction, licenseBadgeType, featureEnabled) { |
| 5236 |
if (pendingAction) { |
| 5237 |
return pendingAction; |
| 5238 |
} |
| 5239 |
if (licenseBadgeType === 'revoked' && !featureEnabled) { |
| 5240 |
return 'locked'; |
| 5241 |
} |
| 5242 |
return featureEnabled ? 'enabled' : 'available'; |
| 5243 |
} |
| 5244 |
function getSwitchChecked(pendingAction, featureEnabled) { |
| 5245 |
if (pendingAction === 'enabling' || pendingAction === 'installing') { |
| 5246 |
return true; |
| 5247 |
} |
| 5248 |
if (pendingAction === 'disabling') { |
| 5249 |
return false; |
| 5250 |
} |
| 5251 |
return featureEnabled; |
| 5252 |
} |
| 5253 |
/** |
| 5254 |
* @since 1.3.0 Read pluginsUrl through the getHarborDataValue helper for the post-deactivate redirect. |
| 5255 |
* @since 1.0.0 |
| 5256 |
*/ |
| 5257 |
function useFeatureRow(feature) { |
| 5258 |
const { |
| 5259 |
addToast |
| 5260 |
} = (0,_context_toast_context__WEBPACK_IMPORTED_MODULE_5__.useToast)(); |
| 5261 |
const { |
| 5262 |
setNeedsReload |
| 5263 |
} = (0,_context_reload_banner_context__WEBPACK_IMPORTED_MODULE_6__.useReloadBanner)(); |
| 5264 |
const { |
| 5265 |
addError |
| 5266 |
} = (0,_context_error_modal_context__WEBPACK_IMPORTED_MODULE_7__.useErrorModal)(); |
| 5267 |
const { |
| 5268 |
enableFeature, |
| 5269 |
disableFeature, |
| 5270 |
updateFeature |
| 5271 |
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useDispatch)(_store__WEBPACK_IMPORTED_MODULE_3__.store); |
| 5272 |
const installableBusy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => (0,_types_utils__WEBPACK_IMPORTED_MODULE_9__.isInstallableFeature)(feature) && select(_store__WEBPACK_IMPORTED_MODULE_3__.store).isAnyInstallableBusy(), [feature.type]); |
| 5273 |
const enabledHarborHostCount = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => select(_store__WEBPACK_IMPORTED_MODULE_3__.store).getEnabledHarborHostCount(), []); |
| 5274 |
const harborHostBasenames = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => select(_store__WEBPACK_IMPORTED_MODULE_3__.store).getHarborHostBasenames(), []); |
| 5275 |
const isLegacy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => { |
| 5276 |
const activeLegacy = select(_store__WEBPACK_IMPORTED_MODULE_3__.store).getActiveLegacyLicense(feature.slug); |
| 5277 |
if (!activeLegacy) return false; |
| 5278 |
return !select(_store__WEBPACK_IMPORTED_MODULE_3__.store).isProductLicenseValid(feature.product); |
| 5279 |
}, [feature.slug, feature.product]); |
| 5280 |
const licenseBadgeType = (0,_lib_feature_utils__WEBPACK_IMPORTED_MODULE_4__.getLicenseBadgeType)(feature, isLegacy); |
| 5281 |
const [pendingAction, setPendingAction] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null); |
| 5282 |
const [showDeactivateConfirm, setShowDeactivateConfirm] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false); |
| 5283 |
|
| 5284 |
// Non-installable features (services) have no install/toggle/update lifecycle. |
| 5285 |
if (!(0,_types_utils__WEBPACK_IMPORTED_MODULE_9__.isInstallableFeature)(feature)) { |
| 5286 |
return { |
| 5287 |
pendingAction: null, |
| 5288 |
installableBusy: false, |
| 5289 |
badgeStatus: 'included', |
| 5290 |
showSwitch: false, |
| 5291 |
switchChecked: false, |
| 5292 |
licenseBadgeType, |
| 5293 |
showDeactivateConfirm: false, |
| 5294 |
handleToggle: async () => {}, |
| 5295 |
handleUpdate: async () => {}, |
| 5296 |
handleConfirmDeactivate: async () => {}, |
| 5297 |
handleCancelDeactivate: () => {} |
| 5298 |
}; |
| 5299 |
} |
| 5300 |
const featureEnabled = feature.is_enabled; |
| 5301 |
const featureInstalled = feature.installed_version !== null; |
| 5302 |
const isHarborHost = feature.type === 'plugin' && harborHostBasenames.includes(feature.plugin_file); |
| 5303 |
const isLastHarborHost = isHarborHost && featureEnabled && enabledHarborHostCount === 1; |
| 5304 |
const handleToggle = async checked => { |
| 5305 |
if (!checked && isLastHarborHost) { |
| 5306 |
setShowDeactivateConfirm(true); |
| 5307 |
return; |
| 5308 |
} |
| 5309 |
setPendingAction(checked ? featureInstalled ? 'enabling' : 'installing' : 'disabling'); |
| 5310 |
if (checked) { |
| 5311 |
const result = await enableFeature(feature.slug); |
| 5312 |
if (result instanceof _errors__WEBPACK_IMPORTED_MODULE_8__.HarborError) { |
| 5313 |
addError(result); |
| 5314 |
} else { |
| 5315 |
addToast(/* translators: %s is the name of the feature being enabled */ |
| 5316 |
(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('%s enabled', '%TEXTDOMAIN%'), feature.name), 'success'); |
| 5317 |
setNeedsReload(true); |
| 5318 |
} |
| 5319 |
} else { |
| 5320 |
const result = await disableFeature(feature.slug); |
| 5321 |
if (result instanceof _errors__WEBPACK_IMPORTED_MODULE_8__.HarborError) { |
| 5322 |
addError(result); |
| 5323 |
} else { |
| 5324 |
addToast(/* translators: %s is the name of the feature being disabled */ |
| 5325 |
(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('%s disabled', '%TEXTDOMAIN%'), feature.name), 'default'); |
| 5326 |
setNeedsReload(true); |
| 5327 |
} |
| 5328 |
} |
| 5329 |
setPendingAction(null); |
| 5330 |
}; |
| 5331 |
const handleConfirmDeactivate = async () => { |
| 5332 |
setShowDeactivateConfirm(false); |
| 5333 |
setPendingAction('disabling'); |
| 5334 |
const result = await disableFeature(feature.slug); |
| 5335 |
if (result instanceof _errors__WEBPACK_IMPORTED_MODULE_8__.HarborError) { |
| 5336 |
addError(result); |
| 5337 |
} else { |
| 5338 |
window.location.href = (0,_lib_harbor_data__WEBPACK_IMPORTED_MODULE_10__.getHarborDataValue)('pluginsUrl'); |
| 5339 |
} |
| 5340 |
setPendingAction(null); |
| 5341 |
}; |
| 5342 |
const handleCancelDeactivate = () => { |
| 5343 |
setShowDeactivateConfirm(false); |
| 5344 |
}; |
| 5345 |
const handleUpdate = async () => { |
| 5346 |
setPendingAction('updating'); |
| 5347 |
const result = await updateFeature(feature.slug); |
| 5348 |
if (result instanceof _errors__WEBPACK_IMPORTED_MODULE_8__.HarborError) { |
| 5349 |
addError(result); |
| 5350 |
} else { |
| 5351 |
/* translators: %s is the name of the feature being updated */ |
| 5352 |
addToast((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('%s updated.', '%TEXTDOMAIN%'), feature.name), 'success'); |
| 5353 |
} |
| 5354 |
setPendingAction(null); |
| 5355 |
}; |
| 5356 |
const badgeStatus = getBadgeStatus(pendingAction, licenseBadgeType, featureEnabled); |
| 5357 |
const showSwitch = pendingAction !== 'installing' && pendingAction !== 'updating'; |
| 5358 |
const switchChecked = getSwitchChecked(pendingAction, featureEnabled); |
| 5359 |
return { |
| 5360 |
pendingAction, |
| 5361 |
installableBusy, |
| 5362 |
badgeStatus, |
| 5363 |
showSwitch, |
| 5364 |
switchChecked, |
| 5365 |
licenseBadgeType, |
| 5366 |
showDeactivateConfirm, |
| 5367 |
handleToggle, |
| 5368 |
handleUpdate, |
| 5369 |
handleConfirmDeactivate, |
| 5370 |
handleCancelDeactivate |
| 5371 |
}; |
| 5372 |
} |
| 5373 |
|
| 5374 |
/***/ }, |
| 5375 |
|
| 5376 |
/***/ "./resources/js/hooks/useFilteredFeatures.ts" |
| 5377 |
/*!***************************************************!*\ |
| 5378 |
!*** ./resources/js/hooks/useFilteredFeatures.ts ***! |
| 5379 |
\***************************************************/ |
| 5380 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 5381 |
|
| 5382 |
__webpack_require__.r(__webpack_exports__); |
| 5383 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5384 |
/* harmony export */ useFilteredFeatures: () => (/* binding */ useFilteredFeatures) |
| 5385 |
/* harmony export */ }); |
| 5386 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 5387 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__); |
| 5388 |
/* harmony import */ var _context_filter_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/context/filter-context */ "./resources/js/context/filter-context.tsx"); |
| 5389 |
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/store */ "./resources/js/store/index.ts"); |
| 5390 |
/** |
| 5391 |
* Hook that returns features for a product filtered by the active |
| 5392 |
* search query from FilterContext. |
| 5393 |
* |
| 5394 |
* When the search query is empty the original selector result is returned |
| 5395 |
* directly, so ProductSection only re-renders when features or the query |
| 5396 |
* actually change. |
| 5397 |
* |
| 5398 |
* @package LiquidWeb\Harbor |
| 5399 |
*/ |
| 5400 |
|
| 5401 |
|
| 5402 |
|
| 5403 |
/** |
| 5404 |
* @since 1.0.0 |
| 5405 |
*/ |
| 5406 |
function useFilteredFeatures(productSlug) { |
| 5407 |
const { |
| 5408 |
searchQuery |
| 5409 |
} = (0,_context_filter_context__WEBPACK_IMPORTED_MODULE_1__.useFilter)(); |
| 5410 |
const features = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useSelect)(select => select(_store__WEBPACK_IMPORTED_MODULE_2__.store).getFeaturesByProduct(productSlug), [productSlug]); |
| 5411 |
const query = searchQuery.trim(); |
| 5412 |
if (!query) return features; |
| 5413 |
|
| 5414 |
// Try to use the query as a regex; fall back to a literal match if invalid. |
| 5415 |
let pattern; |
| 5416 |
try { |
| 5417 |
pattern = new RegExp(query, 'i'); |
| 5418 |
} catch { |
| 5419 |
pattern = new RegExp(query.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'i'); |
| 5420 |
} |
| 5421 |
return features.filter(f => pattern.test(f.name) || pattern.test(f.slug) || pattern.test(f.description)); |
| 5422 |
} |
| 5423 |
|
| 5424 |
/***/ }, |
| 5425 |
|
| 5426 |
/***/ "./resources/js/hooks/useProductFeatureGroups.ts" |
| 5427 |
/*!*******************************************************!*\ |
| 5428 |
!*** ./resources/js/hooks/useProductFeatureGroups.ts ***! |
| 5429 |
\*******************************************************/ |
| 5430 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 5431 |
|
| 5432 |
__webpack_require__.r(__webpack_exports__); |
| 5433 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5434 |
/* harmony export */ useProductFeatureGroups: () => (/* binding */ useProductFeatureGroups) |
| 5435 |
/* harmony export */ }); |
| 5436 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 5437 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 5438 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 5439 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); |
| 5440 |
/* harmony import */ var _hooks_useFilteredFeatures__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/hooks/useFilteredFeatures */ "./resources/js/hooks/useFilteredFeatures.ts"); |
| 5441 |
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/store */ "./resources/js/store/index.ts"); |
| 5442 |
/* harmony import */ var _lib_feature_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/lib/feature-utils */ "./resources/js/lib/feature-utils.ts"); |
| 5443 |
/** |
| 5444 |
* Partitions features for a product into available and locked groups, |
| 5445 |
* and groups locked features by catalog tier. |
| 5446 |
* |
| 5447 |
* @package LiquidWeb\Harbor |
| 5448 |
*/ |
| 5449 |
|
| 5450 |
|
| 5451 |
|
| 5452 |
|
| 5453 |
|
| 5454 |
/** |
| 5455 |
* @since 1.0.1 Detect unactivated license products and route their tiers to activationCatalogTiers instead of upgradeCatalogTiers. Exposes isUnactivatedLicense flag. |
| 5456 |
* @since 1.0.0 |
| 5457 |
*/ |
| 5458 |
function useProductFeatureGroups(productSlug) { |
| 5459 |
const allFeatures = (0,_hooks_useFilteredFeatures__WEBPACK_IMPORTED_MODULE_2__.useFilteredFeatures)(productSlug); |
| 5460 |
const { |
| 5461 |
catalogTiers, |
| 5462 |
licenseProducts, |
| 5463 |
isLicenseValid, |
| 5464 |
legacyLicenses, |
| 5465 |
unactivatedLicenseProduct |
| 5466 |
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => ({ |
| 5467 |
catalogTiers: select(_store__WEBPACK_IMPORTED_MODULE_3__.store).getProductCatalog(productSlug)?.tiers ?? [], |
| 5468 |
licenseProducts: select(_store__WEBPACK_IMPORTED_MODULE_3__.store).getLicenseProducts(), |
| 5469 |
isLicenseValid: select(_store__WEBPACK_IMPORTED_MODULE_3__.store).isProductLicenseValid(productSlug), |
| 5470 |
legacyLicenses: select(_store__WEBPACK_IMPORTED_MODULE_3__.store).getLegacyLicenses(), |
| 5471 |
unactivatedLicenseProduct: select(_store__WEBPACK_IMPORTED_MODULE_3__.store).getUnactivatedLicenseProduct(productSlug) |
| 5472 |
}), [productSlug]); |
| 5473 |
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => { |
| 5474 |
const sorted = catalogTiers.slice().sort((a, b) => a.rank - b.rank); |
| 5475 |
const forProduct = licenseProducts.filter(lp => lp.product_slug === productSlug); |
| 5476 |
const licenseProduct = forProduct.find(lp => lp.activated_here === true); |
| 5477 |
|
| 5478 |
// A license is "invalid" when a validation status is known but not 'valid' |
| 5479 |
// (e.g. not_activated, expired, suspended). The raw tier is still present on |
| 5480 |
// the product, but features are locked — the user needs to activate, not upgrade. |
| 5481 |
const isLicenseInvalid = licenseProduct !== undefined && licenseProduct.validation_status !== null && licenseProduct.validation_status !== 'valid'; |
| 5482 |
|
| 5483 |
// Rank of the activated product, or -1 when none is present. |
| 5484 |
const activatedTier = licenseProduct?.tier ? sorted.find(t => t.tier_slug === licenseProduct.tier) : null; |
| 5485 |
const activatedRank = activatedTier?.rank ?? -1; |
| 5486 |
|
| 5487 |
// Rank of the unactivated product, if any. |
| 5488 |
// An unactivated product may sit above the activated tier (e.g. user purchased an |
| 5489 |
// upgrade to elite while pro is already active but elite not yet activated on this |
| 5490 |
// domain). In that case both tiers exist and only elite needs the activation badge. |
| 5491 |
const unactivatedTier = unactivatedLicenseProduct?.tier ? sorted.find(t => t.tier_slug === unactivatedLicenseProduct.tier) : null; |
| 5492 |
const unactivatedRank = unactivatedTier?.rank ?? -1; |
| 5493 |
|
| 5494 |
// isUnactivatedLicense: the user owns a tier they have not activated on this domain, |
| 5495 |
// whether because no activated product exists at all (unactivatedRank > -1 > activatedRank) |
| 5496 |
// or because a higher purchased tier is not yet activated (unactivatedRank > activatedRank). |
| 5497 |
const isUnactivatedLicense = unactivatedLicenseProduct !== null && unactivatedRank > activatedRank; |
| 5498 |
|
| 5499 |
// Effective rank = highest owned tier (activated or not). |
| 5500 |
const rank = Math.max(activatedRank, unactivatedRank); |
| 5501 |
|
| 5502 |
// Tiers strictly above the highest owned rank: features here need an upgrade. |
| 5503 |
const upgrade = sorted.filter(t => t.rank > rank); |
| 5504 |
|
| 5505 |
// activationTiers covers two cases: |
| 5506 |
// 1. isLicenseInvalid: tiers within the activated rank locked due to invalid status |
| 5507 |
// (expired, suspended, etc.) — user needs to fix the license, not upgrade. |
| 5508 |
// 2. isUnactivatedLicense: tiers above the activated rank but within the unactivated |
| 5509 |
// rank — user owns them but hasn't activated on this domain yet. |
| 5510 |
// Both render without an upgrade button. |
| 5511 |
const activationTiers = isLicenseInvalid ? sorted.filter(t => t.rank <= activatedRank && t.rank > 0) : isUnactivatedLicense ? sorted.filter(t => t.rank <= rank && t.rank > activatedRank) : []; |
| 5512 |
const slugs = isLicenseValid ? new Set() : new Set(legacyLicenses.filter(l => l.is_active).map(l => l.slug)); |
| 5513 |
const isLegacyAvailable = f => slugs.has(f.slug); |
| 5514 |
|
| 5515 |
// Available: the standard set, PLUS revoked features. |
| 5516 |
// Revoked features are in the user's tier but have had their capability removed. |
| 5517 |
// They render as disabled rows in the available section (not in upgrade accordions), |
| 5518 |
// since the user does not need to upgrade — the tier already covers them. |
| 5519 |
const availableFeatures = allFeatures.filter(f => f.is_available || (0,_lib_feature_utils__WEBPACK_IMPORTED_MODULE_4__.isFreeFeature)(f.tier) || isLegacyAvailable(f) || (0,_lib_feature_utils__WEBPACK_IMPORTED_MODULE_4__.getFeatureMismatch)(f) === 'revoked'); |
| 5520 |
|
| 5521 |
// Locked: not available, not free, not legacy, and not revoked. |
| 5522 |
const lockedFeatures = allFeatures.filter(f => !f.is_available && !(0,_lib_feature_utils__WEBPACK_IMPORTED_MODULE_4__.isFreeFeature)(f.tier) && !isLegacyAvailable(f) && (0,_lib_feature_utils__WEBPACK_IMPORTED_MODULE_4__.getFeatureMismatch)(f) !== 'revoked'); |
| 5523 |
const lockedByTier = sorted.reduce((acc, tier) => { |
| 5524 |
acc[tier.tier_slug] = lockedFeatures.filter(f => f.tier === tier.tier_slug); |
| 5525 |
return acc; |
| 5526 |
}, {}); |
| 5527 |
return { |
| 5528 |
availableFeatures, |
| 5529 |
lockedByTier, |
| 5530 |
sortedCatalogTiers: sorted, |
| 5531 |
upgradeCatalogTiers: upgrade, |
| 5532 |
activationCatalogTiers: activationTiers, |
| 5533 |
isUnactivatedLicense |
| 5534 |
}; |
| 5535 |
}, [allFeatures, catalogTiers, licenseProducts, isLicenseValid, legacyLicenses, productSlug, unactivatedLicenseProduct]); |
| 5536 |
} |
| 5537 |
|
| 5538 |
/***/ }, |
| 5539 |
|
| 5540 |
/***/ "./resources/js/hooks/useWelcomeLicenseForm.ts" |
| 5541 |
/*!*****************************************************!*\ |
| 5542 |
!*** ./resources/js/hooks/useWelcomeLicenseForm.ts ***! |
| 5543 |
\*****************************************************/ |
| 5544 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 5545 |
|
| 5546 |
__webpack_require__.r(__webpack_exports__); |
| 5547 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5548 |
/* harmony export */ getNonUnifiedLicenseAdvice: () => (/* binding */ getNonUnifiedLicenseAdvice), |
| 5549 |
/* harmony export */ pickWelcomeErrorMessage: () => (/* binding */ pickWelcomeErrorMessage), |
| 5550 |
/* harmony export */ useWelcomeLicenseForm: () => (/* binding */ useWelcomeLicenseForm) |
| 5551 |
/* harmony export */ }); |
| 5552 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 5553 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 5554 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 5555 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 5556 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 5557 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); |
| 5558 |
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/store */ "./resources/js/store/index.ts"); |
| 5559 |
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/errors */ "./resources/js/errors/index.ts"); |
| 5560 |
/* harmony import */ var _lib_harbor_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/lib/harbor-data */ "./resources/js/lib/harbor-data.ts"); |
| 5561 |
/** |
| 5562 |
* Behavior hook for WelcomeLicenseForm. |
| 5563 |
* |
| 5564 |
* Owns input state, derived validation, the storeLicense dispatch, |
| 5565 |
* and the pickWelcomeErrorMessage helper. Mirrors the existing |
| 5566 |
* useFeatureRow pattern so the form's component file stays JSX-only. |
| 5567 |
* |
| 5568 |
* Deliberately not generic — the LWSW-prefix rule and the error-message |
| 5569 |
* composition are specific to this form. We do not reuse LicenseKeyInput |
| 5570 |
* because that component routes failures through the global error modal |
| 5571 |
* and exposes a tri-state UI we do not want here. |
| 5572 |
* |
| 5573 |
* @package LiquidWeb\Harbor |
| 5574 |
*/ |
| 5575 |
|
| 5576 |
|
| 5577 |
|
| 5578 |
|
| 5579 |
|
| 5580 |
|
| 5581 |
const SERVER_INVALID_KEY_CODE = 'lw-harbor-invalid-key'; |
| 5582 |
|
| 5583 |
/** |
| 5584 |
* Translated sentence that redirects a customer with a non-unified key to the |
| 5585 |
* owning plugin's own settings page. Surfaced both as an inline format hint |
| 5586 |
* while the user is typing and as the server-side error tail when the |
| 5587 |
* licensing service rejects the key as unrecognized. |
| 5588 |
* |
| 5589 |
* Defined once so translators see a single string identity across both call |
| 5590 |
* sites — re-translating the same advice twice risks drift. |
| 5591 |
* |
| 5592 |
* @since 1.3.0 |
| 5593 |
*/ |
| 5594 |
function getNonUnifiedLicenseAdvice() { |
| 5595 |
return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("If this is a non-unified license, activate it in that plugin's own settings page.", '%TEXTDOMAIN%'); |
| 5596 |
} |
| 5597 |
|
| 5598 |
/** |
| 5599 |
* Compose the user-facing error message for a failed activation. |
| 5600 |
* |
| 5601 |
* storeLicense wraps any WP_Error from the licensing service via |
| 5602 |
* HarborError.wrap(), which preserves the server error as `cause`. |
| 5603 |
* The outer message is the generic wrapper; the cause carries the |
| 5604 |
* server's diagnostic code and message. |
| 5605 |
* |
| 5606 |
* The plugin-settings redirection is appended only when the server |
| 5607 |
* specifically rejected the key as unrecognized — for expired or |
| 5608 |
* suspended subscriptions that framing would be misleading. |
| 5609 |
* |
| 5610 |
* @since 1.3.0 |
| 5611 |
*/ |
| 5612 |
function pickWelcomeErrorMessage(error) { |
| 5613 |
const serverError = error.cause instanceof _errors__WEBPACK_IMPORTED_MODULE_4__.HarborError ? error.cause : null; |
| 5614 |
const baseMessage = serverError?.message?.trim() || error.message; |
| 5615 |
if (serverError?.code === SERVER_INVALID_KEY_CODE) { |
| 5616 |
return `${(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("We couldn't verify this key.", '%TEXTDOMAIN%')} ${getNonUnifiedLicenseAdvice()}`; |
| 5617 |
} |
| 5618 |
return baseMessage; |
| 5619 |
} |
| 5620 |
/** |
| 5621 |
* @since 1.3.0 |
| 5622 |
*/ |
| 5623 |
function useWelcomeLicenseForm() { |
| 5624 |
const [key, setKey] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''); |
| 5625 |
const [serverError, setServerError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null); |
| 5626 |
const { |
| 5627 |
storeLicense |
| 5628 |
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useDispatch)(_store__WEBPACK_IMPORTED_MODULE_3__.store); |
| 5629 |
const { |
| 5630 |
isStoring, |
| 5631 |
canModifyLicense |
| 5632 |
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => ({ |
| 5633 |
isStoring: select(_store__WEBPACK_IMPORTED_MODULE_3__.store).isLicenseStoring(), |
| 5634 |
canModifyLicense: select(_store__WEBPACK_IMPORTED_MODULE_3__.store).canModifyLicense() |
| 5635 |
}), []); |
| 5636 |
const prefix = (0,_lib_harbor_data__WEBPACK_IMPORTED_MODULE_5__.getHarborDataValue)('licenseKeyPrefix'); |
| 5637 |
const trimmed = key.trim(); |
| 5638 |
const hasInput = trimmed.length > 0; |
| 5639 |
const hasInputMinLength = trimmed.length >= prefix.length; |
| 5640 |
const isLwswFormat = trimmed.startsWith(prefix.substring(0, trimmed.length)); |
| 5641 |
const showFormatHint = hasInput && !isLwswFormat && !serverError; |
| 5642 |
const canSubmit = canModifyLicense && hasInputMinLength && isLwswFormat && !isStoring; |
| 5643 |
const onKeyChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(value => { |
| 5644 |
setKey(value.toUpperCase()); |
| 5645 |
setServerError(null); |
| 5646 |
}, []); |
| 5647 |
const onActivate = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async () => { |
| 5648 |
if (!canSubmit) { |
| 5649 |
return; |
| 5650 |
} |
| 5651 |
setServerError(null); |
| 5652 |
const result = await storeLicense(trimmed); |
| 5653 |
if (result instanceof _errors__WEBPACK_IMPORTED_MODULE_4__.HarborError) { |
| 5654 |
setServerError(pickWelcomeErrorMessage(result)); |
| 5655 |
} |
| 5656 |
// On success: hasLicense becomes true → AppContent re-renders to AppShell automatically. |
| 5657 |
}, [canSubmit, storeLicense, trimmed]); |
| 5658 |
return { |
| 5659 |
key, |
| 5660 |
serverError, |
| 5661 |
isStoring, |
| 5662 |
canModifyLicense, |
| 5663 |
showFormatHint, |
| 5664 |
canSubmit, |
| 5665 |
onKeyChange, |
| 5666 |
onActivate |
| 5667 |
}; |
| 5668 |
} |
| 5669 |
|
| 5670 |
/***/ }, |
| 5671 |
|
| 5672 |
/***/ "./resources/js/lib/activation-url.ts" |
| 5673 |
/*!********************************************!*\ |
| 5674 |
!*** ./resources/js/lib/activation-url.ts ***! |
| 5675 |
\********************************************/ |
| 5676 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 5677 |
|
| 5678 |
__webpack_require__.r(__webpack_exports__); |
| 5679 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5680 |
/* harmony export */ buildActivationUrl: () => (/* binding */ buildActivationUrl) |
| 5681 |
/* harmony export */ }); |
| 5682 |
/** |
| 5683 |
* Appends product and tier params to the base activation URL supplied by the |
| 5684 |
* API, producing a product-scoped URL the Liquid Web portal can use to |
| 5685 |
* pre-select the right product and tier. |
| 5686 |
* |
| 5687 |
* The base URL is already fully assembled by the server and includes params |
| 5688 |
* such as portal-referral, redirect_url (percent-encoded), refresh, and |
| 5689 |
* domain. This function only adds the two params it owns and never touches |
| 5690 |
* the others. |
| 5691 |
* |
| 5692 |
* Example base URL from the API: |
| 5693 |
* https://my.liquidweb.com/subscriptions/?portal-referral=plugin |
| 5694 |
* &redirect_url=https%3A%2F%2Fexample.com%2Fwp-admin%2Foptions-general.php%3Fpage%3Dlw-software-manager%26refresh%3Dauto |
| 5695 |
* &domain=example.com |
| 5696 |
* |
| 5697 |
* @param baseUrl The raw activationUrl string from the API. |
| 5698 |
* @param productSlug e.g. "givewp" |
| 5699 |
* @param tier e.g. "elite" |
| 5700 |
* |
| 5701 |
* @since 1.0.0 |
| 5702 |
*/ |
| 5703 |
function buildActivationUrl(baseUrl, productSlug, tier) { |
| 5704 |
try { |
| 5705 |
const url = new URL(baseUrl); |
| 5706 |
url.searchParams.set('sku', `${productSlug}:${tier}`); |
| 5707 |
return url.toString(); |
| 5708 |
} catch { |
| 5709 |
return baseUrl; |
| 5710 |
} |
| 5711 |
} |
| 5712 |
|
| 5713 |
/***/ }, |
| 5714 |
|
| 5715 |
/***/ "./resources/js/lib/feature-utils.ts" |
| 5716 |
/*!*******************************************!*\ |
| 5717 |
!*** ./resources/js/lib/feature-utils.ts ***! |
| 5718 |
\*******************************************/ |
| 5719 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 5720 |
|
| 5721 |
__webpack_require__.r(__webpack_exports__); |
| 5722 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5723 |
/* harmony export */ getFeatureMismatch: () => (/* binding */ getFeatureMismatch), |
| 5724 |
/* harmony export */ getLicenseBadgeType: () => (/* binding */ getLicenseBadgeType), |
| 5725 |
/* harmony export */ isFreeFeature: () => (/* binding */ isFreeFeature) |
| 5726 |
/* harmony export */ }); |
| 5727 |
/** |
| 5728 |
* True when a feature requires no paid tier — either it has no tier at all |
| 5729 |
* or its tier slug contains "free" (e.g. "give-free"). |
| 5730 |
* |
| 5731 |
* @since 1.0.0 |
| 5732 |
*/ |
| 5733 |
function isFreeFeature(tier) { |
| 5734 |
return !tier || tier.toLowerCase().includes('free'); |
| 5735 |
} |
| 5736 |
|
| 5737 |
/** |
| 5738 |
* Returns the single license badge type to display for a feature row, or null if none applies. |
| 5739 |
* |
| 5740 |
* Enforces mutual exclusivity: only the first matching condition wins. |
| 5741 |
* |
| 5742 |
* @since 1.0.0 |
| 5743 |
*/ |
| 5744 |
function getLicenseBadgeType(feature, isLegacy) { |
| 5745 |
if (isFreeFeature(feature.tier)) return 'free'; |
| 5746 |
if (isLegacy) return 'legacy'; |
| 5747 |
return getFeatureMismatch(feature); |
| 5748 |
} |
| 5749 |
|
| 5750 |
/** |
| 5751 |
* Returns the mismatch type for a feature, or null if there is no mismatch. |
| 5752 |
* |
| 5753 |
* Both fields are pre-computed by the backend resolution layer. |
| 5754 |
* No catalog or license cross-referencing is needed at call sites. |
| 5755 |
* |
| 5756 |
* @since 1.0.0 |
| 5757 |
*/ |
| 5758 |
function getFeatureMismatch(feature) { |
| 5759 |
if (feature.is_available && !feature.in_catalog_tier) { |
| 5760 |
return 'bonus'; |
| 5761 |
} |
| 5762 |
if (!feature.is_available && feature.in_catalog_tier) { |
| 5763 |
return 'revoked'; |
| 5764 |
} |
| 5765 |
return null; |
| 5766 |
} |
| 5767 |
|
| 5768 |
/***/ }, |
| 5769 |
|
| 5770 |
/***/ "./resources/js/lib/forward-resolver.ts" |
| 5771 |
/*!**********************************************!*\ |
| 5772 |
!*** ./resources/js/lib/forward-resolver.ts ***! |
| 5773 |
\**********************************************/ |
| 5774 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 5775 |
|
| 5776 |
__webpack_require__.r(__webpack_exports__); |
| 5777 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5778 |
/* harmony export */ forwardResolver: () => (/* binding */ forwardResolver), |
| 5779 |
/* harmony export */ forwardResolverWithoutArgs: () => (/* binding */ forwardResolverWithoutArgs) |
| 5780 |
/* harmony export */ }); |
| 5781 |
/** |
| 5782 |
* Utilities for @wordpress/data stores. |
| 5783 |
* |
| 5784 |
* Ported from sync-saas @utils/data/forward-resolver.js |
| 5785 |
* |
| 5786 |
* @package LiquidWeb\Harbor |
| 5787 |
*/ |
| 5788 |
|
| 5789 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 5790 |
|
| 5791 |
/** |
| 5792 |
* Forwards resolution to another resolver with the same arguments. |
| 5793 |
* |
| 5794 |
* Use when the source and target selectors share the same signature. |
| 5795 |
*/ |
| 5796 |
function forwardResolver(resolverName) { |
| 5797 |
return (...args) => async ({ |
| 5798 |
resolveSelect |
| 5799 |
}) => { |
| 5800 |
await resolveSelect[resolverName](...args); |
| 5801 |
}; |
| 5802 |
} |
| 5803 |
|
| 5804 |
/** |
| 5805 |
* Forwards resolution to another resolver, discarding arguments. |
| 5806 |
* |
| 5807 |
* Use when a derived selector (e.g. getFeature(slug)) depends on data |
| 5808 |
* fetched by a resolver that takes no arguments (e.g. getFeatures()). |
| 5809 |
*/ |
| 5810 |
function forwardResolverWithoutArgs(resolverName) { |
| 5811 |
return () => async ({ |
| 5812 |
resolveSelect |
| 5813 |
}) => { |
| 5814 |
await resolveSelect[resolverName](); |
| 5815 |
}; |
| 5816 |
} |
| 5817 |
|
| 5818 |
/***/ }, |
| 5819 |
|
| 5820 |
/***/ "./resources/js/lib/group-license-products.ts" |
| 5821 |
/*!****************************************************!*\ |
| 5822 |
!*** ./resources/js/lib/group-license-products.ts ***! |
| 5823 |
\****************************************************/ |
| 5824 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 5825 |
|
| 5826 |
__webpack_require__.r(__webpack_exports__); |
| 5827 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5828 |
/* harmony export */ groupLicenseProducts: () => (/* binding */ groupLicenseProducts) |
| 5829 |
/* harmony export */ }); |
| 5830 |
/* harmony import */ var _data_products__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/data/products */ "./resources/js/data/products.ts"); |
| 5831 |
/** |
| 5832 |
* @package LiquidWeb\Harbor |
| 5833 |
*/ |
| 5834 |
|
| 5835 |
/** |
| 5836 |
* Groups LicenseProduct entries by product_slug, sorts tiers within each group |
| 5837 |
* (activated-here first, then ascending by rank), and orders groups by the |
| 5838 |
* PRODUCTS constant. Products absent from licenseProducts are omitted. |
| 5839 |
* |
| 5840 |
* @since 1.0.0 |
| 5841 |
*/ |
| 5842 |
function groupLicenseProducts(licenseProducts, tierRankMap) { |
| 5843 |
const groups = {}; |
| 5844 |
licenseProducts.forEach(lp => { |
| 5845 |
if (!groups[lp.product_slug]) { |
| 5846 |
groups[lp.product_slug] = []; |
| 5847 |
} |
| 5848 |
groups[lp.product_slug].push(lp); |
| 5849 |
}); |
| 5850 |
Object.values(groups).forEach(tiers => { |
| 5851 |
tiers.sort((a, b) => (tierRankMap[a.tier] ?? 0) - (tierRankMap[b.tier] ?? 0)); |
| 5852 |
}); |
| 5853 |
return _data_products__WEBPACK_IMPORTED_MODULE_0__.PRODUCTS.filter(p => groups[p.slug] !== undefined).map(p => ({ |
| 5854 |
productSlug: p.slug, |
| 5855 |
productName: p.name, |
| 5856 |
tiers: groups[p.slug] |
| 5857 |
})); |
| 5858 |
} |
| 5859 |
|
| 5860 |
/***/ }, |
| 5861 |
|
| 5862 |
/***/ "./resources/js/lib/harbor-data.ts" |
| 5863 |
/*!*****************************************!*\ |
| 5864 |
!*** ./resources/js/lib/harbor-data.ts ***! |
| 5865 |
\*****************************************/ |
| 5866 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 5867 |
|
| 5868 |
__webpack_require__.r(__webpack_exports__); |
| 5869 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5870 |
/* harmony export */ getHarborDataValue: () => (/* binding */ getHarborDataValue), |
| 5871 |
/* harmony export */ getLicenseKeyPlaceholder: () => (/* binding */ getLicenseKeyPlaceholder) |
| 5872 |
/* harmony export */ }); |
| 5873 |
/** |
| 5874 |
* Typed accessor for `window.harborData`. |
| 5875 |
* |
| 5876 |
* Single source of truth for global config access. Three lookup tiers: |
| 5877 |
* 1. Live value at `window.harborData[ key ]`. |
| 5878 |
* 2. Per-call `fallback` (optional). |
| 5879 |
* 3. Built-in default from the `DEFAULTS` map. |
| 5880 |
* 4. `null` if none of those exist. |
| 5881 |
* |
| 5882 |
* Defaulting to `null` rather than `undefined` matches the surrounding |
| 5883 |
* codebase convention (LicenseSection / LicensePanel already type their |
| 5884 |
* optional URLs as `string | null`). |
| 5885 |
* |
| 5886 |
* @package LiquidWeb\Harbor |
| 5887 |
*/ |
| 5888 |
|
| 5889 |
const DEFAULTS = { |
| 5890 |
licenseKeyPrefix: 'LWSW-', |
| 5891 |
pluginsUrl: '/wp-admin/plugins.php' |
| 5892 |
}; |
| 5893 |
|
| 5894 |
/** |
| 5895 |
* @since 1.3.0 |
| 5896 |
*/ |
| 5897 |
|
| 5898 |
function getHarborDataValue(key, fallback) { |
| 5899 |
return window.harborData?.[key] ?? fallback ?? DEFAULTS[key] ?? null; |
| 5900 |
} |
| 5901 |
|
| 5902 |
/** |
| 5903 |
* Returns the placeholder string for a license-key input — the configured |
| 5904 |
* prefix followed by five groups of four X's, matching the issued key shape |
| 5905 |
* (e.g. `LWSW-XXXX-XXXX-XXXX-XXXX-XXXX`). |
| 5906 |
* |
| 5907 |
* @since 1.3.0 |
| 5908 |
*/ |
| 5909 |
function getLicenseKeyPlaceholder() { |
| 5910 |
return `${getHarborDataValue('licenseKeyPrefix')}XXXX-XXXX-XXXX-XXXX-XXXX`; |
| 5911 |
} |
| 5912 |
|
| 5913 |
/***/ }, |
| 5914 |
|
| 5915 |
/***/ "./resources/js/lib/license-utils.ts" |
| 5916 |
/*!*******************************************!*\ |
| 5917 |
!*** ./resources/js/lib/license-utils.ts ***! |
| 5918 |
\*******************************************/ |
| 5919 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 5920 |
|
| 5921 |
__webpack_require__.r(__webpack_exports__); |
| 5922 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5923 |
/* harmony export */ expiryTextClass: () => (/* binding */ expiryTextClass), |
| 5924 |
/* harmony export */ formatDate: () => (/* binding */ formatDate), |
| 5925 |
/* harmony export */ getExpiryStatus: () => (/* binding */ getExpiryStatus), |
| 5926 |
/* harmony export */ maskLicenseKey: () => (/* binding */ maskLicenseKey) |
| 5927 |
/* harmony export */ }); |
| 5928 |
/** |
| 5929 |
* Pure utility functions for license expiry display. |
| 5930 |
* |
| 5931 |
* @package LiquidWeb\Harbor |
| 5932 |
*/ |
| 5933 |
|
| 5934 |
// cspell:ignore EFGH IJKL MNOP DJJT -- illustrative masking example fragments |
| 5935 |
|
| 5936 |
/** |
| 5937 |
* @since 1.0.0 |
| 5938 |
*/ |
| 5939 |
function formatDate(dateStr) { |
| 5940 |
return new Date(dateStr).toLocaleDateString('en-US', { |
| 5941 |
year: 'numeric', |
| 5942 |
month: 'short', |
| 5943 |
day: 'numeric' |
| 5944 |
}); |
| 5945 |
} |
| 5946 |
|
| 5947 |
/** |
| 5948 |
* @since 1.0.0 |
| 5949 |
*/ |
| 5950 |
function getExpiryStatus(dateStr) { |
| 5951 |
const diff = new Date(dateStr).getTime() - Date.now(); |
| 5952 |
if (diff <= 0) return 'expired'; |
| 5953 |
if (diff <= 30 * 24 * 60 * 60 * 1000) return 'expiring-soon'; |
| 5954 |
return 'ok'; |
| 5955 |
} |
| 5956 |
const expiryTextClass = { |
| 5957 |
expired: 'text-destructive font-medium', |
| 5958 |
'expiring-soon': 'text-amber-600 font-medium', |
| 5959 |
ok: 'text-muted-foreground' |
| 5960 |
}; |
| 5961 |
|
| 5962 |
/** |
| 5963 |
* Masks a unified license key for display so the full key is never exposed |
| 5964 |
* on screen. The leading prefix segment and the final segment stay visible; |
| 5965 |
* every segment in between is replaced with X's of matching length, e.g. |
| 5966 |
* `LWSW-ABCD-EFGH-IJKL-MNOP-DJJT` becomes `LWSW-XXXX-XXXX-XXXX-XXXX-DJJT`. |
| 5967 |
* |
| 5968 |
* Keys with two or fewer dash-delimited segments have nothing safe to mask |
| 5969 |
* (no middle to hide), so they are returned unchanged. |
| 5970 |
* |
| 5971 |
* @since 1.5.0 |
| 5972 |
*/ |
| 5973 |
function maskLicenseKey(key) { |
| 5974 |
const segments = key.split('-'); |
| 5975 |
if (segments.length <= 2) { |
| 5976 |
return key; |
| 5977 |
} |
| 5978 |
return segments.map((segment, index) => { |
| 5979 |
const isFirst = index === 0; |
| 5980 |
const isLast = index === segments.length - 1; |
| 5981 |
return isFirst || isLast ? segment : 'X'.repeat(segment.length); |
| 5982 |
}).join('-'); |
| 5983 |
} |
| 5984 |
|
| 5985 |
/***/ }, |
| 5986 |
|
| 5987 |
/***/ "./resources/js/lib/product-install.ts" |
| 5988 |
/*!*********************************************!*\ |
| 5989 |
!*** ./resources/js/lib/product-install.ts ***! |
| 5990 |
\*********************************************/ |
| 5991 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 5992 |
|
| 5993 |
__webpack_require__.r(__webpack_exports__); |
| 5994 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5995 |
/* harmony export */ isProductInstalled: () => (/* binding */ isProductInstalled), |
| 5996 |
/* harmony export */ isProductOwned: () => (/* binding */ isProductOwned) |
| 5997 |
/* harmony export */ }); |
| 5998 |
/** |
| 5999 |
* Whether a product is installed on this site. |
| 6000 |
* |
| 6001 |
* A product is installed when at least one of its plugin/theme features has a |
| 6002 |
* non-empty installed_version. Services are non-installable and never count. |
| 6003 |
* |
| 6004 |
* Uses a truthy check because the backend serializes installed_version as '' |
| 6005 |
* (empty string) when not installed — Plugin::to_array() / Theme::to_array() |
| 6006 |
* coerce null to ''. |
| 6007 |
* |
| 6008 |
* @param features The product's features from getFeaturesByProduct(). |
| 6009 |
* |
| 6010 |
* @since 1.6.0 |
| 6011 |
*/ |
| 6012 |
function isProductInstalled(features) { |
| 6013 |
return features.some(f => (f.type === 'plugin' || f.type === 'theme') && !!f.installed_version); |
| 6014 |
} |
| 6015 |
|
| 6016 |
/** |
| 6017 |
* Whether the user has an entitlement to a product. |
| 6018 |
* |
| 6019 |
* True when a license product entry exists for the slug (any activation state) |
| 6020 |
* or an active legacy license covers it. Used only for sub-ordering the |
| 6021 |
* Available section — never for section placement, which is install state. |
| 6022 |
* |
| 6023 |
* @param slug The product slug. |
| 6024 |
* @param args Ownership inputs. |
| 6025 |
* @param args.licenseProducts All non-cancelled license products from getLicenseProducts(). |
| 6026 |
* @param args.hasActiveLegacy Whether an active legacy license covers the product. |
| 6027 |
* |
| 6028 |
* @since 1.6.0 |
| 6029 |
*/ |
| 6030 |
function isProductOwned(slug, args) { |
| 6031 |
if (args.hasActiveLegacy) { |
| 6032 |
return true; |
| 6033 |
} |
| 6034 |
return args.licenseProducts.some(lp => lp.product_slug === slug); |
| 6035 |
} |
| 6036 |
|
| 6037 |
/***/ }, |
| 6038 |
|
| 6039 |
/***/ "./resources/js/lib/upgrade-url.ts" |
| 6040 |
/*!*****************************************!*\ |
| 6041 |
!*** ./resources/js/lib/upgrade-url.ts ***! |
| 6042 |
\*****************************************/ |
| 6043 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 6044 |
|
| 6045 |
__webpack_require__.r(__webpack_exports__); |
| 6046 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 6047 |
/* harmony export */ buildUpgradeUrl: () => (/* binding */ buildUpgradeUrl) |
| 6048 |
/* harmony export */ }); |
| 6049 |
/** |
| 6050 |
* Appends portal tracking parameters to a catalog upgrade URL. |
| 6051 |
* |
| 6052 |
* The upgrade_url comes from the catalog tier and is a base URL without |
| 6053 |
* site context. This function appends domain and portal-referral so the |
| 6054 |
* portal can identify the originating site and entry point. |
| 6055 |
* |
| 6056 |
* Example: |
| 6057 |
* baseUrl = https://my.liquidweb.com/upgrade/kadence/pro/ |
| 6058 |
* domain = example.com |
| 6059 |
* → https://my.liquidweb.com/upgrade/kadence/pro/?domain=example.com&portal-referral=plugin |
| 6060 |
* |
| 6061 |
* @param baseUrl The upgrade_url string from the catalog tier. |
| 6062 |
* @param domain The site domain from getHarborDataValue( 'domain' ). |
| 6063 |
* |
| 6064 |
* @since 1.3.0 Domain parameter is now string | null to match the getHarborDataValue helper. |
| 6065 |
* @since 1.0.2 |
| 6066 |
*/ |
| 6067 |
function buildUpgradeUrl(baseUrl, domain) { |
| 6068 |
if (!domain) { |
| 6069 |
return baseUrl; |
| 6070 |
} |
| 6071 |
try { |
| 6072 |
const url = new URL(baseUrl); |
| 6073 |
url.searchParams.set('domain', domain); |
| 6074 |
url.searchParams.set('portal-referral', 'plugin'); |
| 6075 |
return url.toString(); |
| 6076 |
} catch { |
| 6077 |
return baseUrl; |
| 6078 |
} |
| 6079 |
} |
| 6080 |
|
| 6081 |
/***/ }, |
| 6082 |
|
| 6083 |
/***/ "./resources/js/lib/utils.ts" |
| 6084 |
/*!***********************************!*\ |
| 6085 |
!*** ./resources/js/lib/utils.ts ***! |
| 6086 |
\***********************************/ |
| 6087 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 6088 |
|
| 6089 |
__webpack_require__.r(__webpack_exports__); |
| 6090 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 6091 |
/* harmony export */ cn: () => (/* binding */ cn) |
| 6092 |
/* harmony export */ }); |
| 6093 |
/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! clsx */ "./node_modules/clsx/dist/clsx.mjs"); |
| 6094 |
/* harmony import */ var tailwind_merge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tailwind-merge */ "./node_modules/tailwind-merge/dist/bundle-mjs.mjs"); |
| 6095 |
|
| 6096 |
|
| 6097 |
function cn(...inputs) { |
| 6098 |
return (0,tailwind_merge__WEBPACK_IMPORTED_MODULE_1__.twMerge)((0,clsx__WEBPACK_IMPORTED_MODULE_0__.clsx)(inputs)); |
| 6099 |
} |
| 6100 |
|
| 6101 |
/***/ }, |
| 6102 |
|
| 6103 |
/***/ "./resources/js/store/actions.ts" |
| 6104 |
/*!***************************************!*\ |
| 6105 |
!*** ./resources/js/store/actions.ts ***! |
| 6106 |
\***************************************/ |
| 6107 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 6108 |
|
| 6109 |
__webpack_require__.r(__webpack_exports__); |
| 6110 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 6111 |
/* harmony export */ deleteLicense: () => (/* binding */ deleteLicense), |
| 6112 |
/* harmony export */ disableFeature: () => (/* binding */ disableFeature), |
| 6113 |
/* harmony export */ enableFeature: () => (/* binding */ enableFeature), |
| 6114 |
/* harmony export */ receiveCatalog: () => (/* binding */ receiveCatalog), |
| 6115 |
/* harmony export */ receiveFeatures: () => (/* binding */ receiveFeatures), |
| 6116 |
/* harmony export */ receiveHarborHosts: () => (/* binding */ receiveHarborHosts), |
| 6117 |
/* harmony export */ receiveLegacyLicenses: () => (/* binding */ receiveLegacyLicenses), |
| 6118 |
/* harmony export */ receiveLicense: () => (/* binding */ receiveLicense), |
| 6119 |
/* harmony export */ refreshCatalog: () => (/* binding */ refreshCatalog), |
| 6120 |
/* harmony export */ refreshLicense: () => (/* binding */ refreshLicense), |
| 6121 |
/* harmony export */ storeLicense: () => (/* binding */ storeLicense), |
| 6122 |
/* harmony export */ updateFeature: () => (/* binding */ updateFeature) |
| 6123 |
/* harmony export */ }); |
| 6124 |
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); |
| 6125 |
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__); |
| 6126 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 6127 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 6128 |
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/errors */ "./resources/js/errors/index.ts"); |
| 6129 |
/** |
| 6130 |
* Action creators for the lw @wordpress/data store. |
| 6131 |
* |
| 6132 |
* @package LiquidWeb\Harbor |
| 6133 |
*/ |
| 6134 |
|
| 6135 |
|
| 6136 |
|
| 6137 |
|
| 6138 |
// --------------------------------------------------------------------------- |
| 6139 |
// Plain action creators (synchronous) |
| 6140 |
// --------------------------------------------------------------------------- |
| 6141 |
|
| 6142 |
/** |
| 6143 |
* Receives the list of features from the REST API. |
| 6144 |
* |
| 6145 |
* @param features The list of features. |
| 6146 |
* @since 1.0.0 |
| 6147 |
*/ |
| 6148 |
const receiveFeatures = features => ({ |
| 6149 |
type: 'RECEIVE_FEATURES', |
| 6150 |
features |
| 6151 |
}); |
| 6152 |
|
| 6153 |
/** |
| 6154 |
* Receives the list of Harbor host plugin basenames from the REST API. |
| 6155 |
* |
| 6156 |
* @param basenames The list of Harbor host plugin basenames. |
| 6157 |
* @since 1.0.0 |
| 6158 |
*/ |
| 6159 |
const receiveHarborHosts = basenames => ({ |
| 6160 |
type: 'RECEIVE_HARBOR_HOSTS', |
| 6161 |
basenames |
| 6162 |
}); |
| 6163 |
|
| 6164 |
/** |
| 6165 |
* Receives the license from the REST API. |
| 6166 |
* |
| 6167 |
* @param license The license. |
| 6168 |
* @since 1.0.0 |
| 6169 |
*/ |
| 6170 |
const receiveLicense = license => ({ |
| 6171 |
type: 'RECEIVE_LICENSE', |
| 6172 |
license |
| 6173 |
}); |
| 6174 |
|
| 6175 |
/** |
| 6176 |
* Receives the product catalog from the REST API. |
| 6177 |
* |
| 6178 |
* @param catalogs The product catalog. |
| 6179 |
* @since 1.0.0 |
| 6180 |
*/ |
| 6181 |
const receiveCatalog = catalogs => ({ |
| 6182 |
type: 'RECEIVE_CATALOG', |
| 6183 |
catalogs |
| 6184 |
}); |
| 6185 |
|
| 6186 |
/** |
| 6187 |
* Receives the legacy licenses from the REST API. |
| 6188 |
* |
| 6189 |
* @param licenses The legacy licenses. |
| 6190 |
* @since 1.0.0 |
| 6191 |
*/ |
| 6192 |
const receiveLegacyLicenses = licenses => ({ |
| 6193 |
type: 'RECEIVE_LEGACY_LICENSES', |
| 6194 |
licenses |
| 6195 |
}); |
| 6196 |
|
| 6197 |
// --------------------------------------------------------------------------- |
| 6198 |
// Thunk action creators (async) |
| 6199 |
// --------------------------------------------------------------------------- |
| 6200 |
|
| 6201 |
/** |
| 6202 |
* Enable a feature via the REST API. |
| 6203 |
* |
| 6204 |
* @param slug |
| 6205 |
* @since 1.0.0 |
| 6206 |
*/ |
| 6207 |
const enableFeature = slug => async ({ |
| 6208 |
dispatch |
| 6209 |
}) => { |
| 6210 |
dispatch({ |
| 6211 |
type: 'TOGGLE_FEATURE_START', |
| 6212 |
slug |
| 6213 |
}); |
| 6214 |
try { |
| 6215 |
const feature = await _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ |
| 6216 |
path: `/liquidweb/harbor/v1/features/${slug}/enable`, |
| 6217 |
method: 'POST' |
| 6218 |
}); |
| 6219 |
// TOGGLE_FEATURE_FINISHED patches bySlug with the returned feature — no |
| 6220 |
// need to invalidate getFeatures. A background re-fetch would race the |
| 6221 |
// optimistic patch and could overwrite correct state with stale data, |
| 6222 |
// causing the toggle flicker reproduced in https://github.com/stellarwp/harbor/pull/94. |
| 6223 |
dispatch({ |
| 6224 |
type: 'TOGGLE_FEATURE_FINISHED', |
| 6225 |
feature |
| 6226 |
}); |
| 6227 |
// Activation may have bootstrapped a new Harbor host plugin, so refresh |
| 6228 |
// the hosts list. RECEIVE_HARBOR_HOSTS only touches harborHosts.basenames |
| 6229 |
// and never overwrites bySlug, so there is no flicker risk. |
| 6230 |
dispatch.invalidateResolution('getHarborHostBasenames', []); |
| 6231 |
return null; |
| 6232 |
} catch (err) { |
| 6233 |
const error = await _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError.wrap(err, _errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.FeatureEnableFailed, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to enable your feature.', '%TEXTDOMAIN%')); |
| 6234 |
dispatch({ |
| 6235 |
type: 'TOGGLE_FEATURE_FAILED', |
| 6236 |
slug, |
| 6237 |
error |
| 6238 |
}); |
| 6239 |
return error; |
| 6240 |
} |
| 6241 |
}; |
| 6242 |
|
| 6243 |
/** |
| 6244 |
* Disable a feature via the REST API. |
| 6245 |
* |
| 6246 |
* @param slug |
| 6247 |
* @since 1.0.0 |
| 6248 |
*/ |
| 6249 |
const disableFeature = slug => async ({ |
| 6250 |
dispatch |
| 6251 |
}) => { |
| 6252 |
dispatch({ |
| 6253 |
type: 'TOGGLE_FEATURE_START', |
| 6254 |
slug |
| 6255 |
}); |
| 6256 |
try { |
| 6257 |
const feature = await _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ |
| 6258 |
path: `/liquidweb/harbor/v1/features/${slug}/disable`, |
| 6259 |
method: 'POST' |
| 6260 |
}); |
| 6261 |
// Same reasoning as enableFeature: patch via TOGGLE_FEATURE_FINISHED, |
| 6262 |
// do not invalidate getFeatures (https://github.com/stellarwp/harbor/pull/94). No hosts invalidation needed |
| 6263 |
// because deactivation cannot introduce a new Harbor host. |
| 6264 |
dispatch({ |
| 6265 |
type: 'TOGGLE_FEATURE_FINISHED', |
| 6266 |
feature |
| 6267 |
}); |
| 6268 |
return null; |
| 6269 |
} catch (err) { |
| 6270 |
const error = await _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError.wrap(err, _errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.FeatureDisableFailed, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to disable your feature.', '%TEXTDOMAIN%')); |
| 6271 |
dispatch({ |
| 6272 |
type: 'TOGGLE_FEATURE_FAILED', |
| 6273 |
slug, |
| 6274 |
error |
| 6275 |
}); |
| 6276 |
return error; |
| 6277 |
} |
| 6278 |
}; |
| 6279 |
|
| 6280 |
/** |
| 6281 |
* Update a feature via the REST API. |
| 6282 |
* |
| 6283 |
* @param slug |
| 6284 |
* @since 1.0.0 |
| 6285 |
*/ |
| 6286 |
const updateFeature = slug => async ({ |
| 6287 |
dispatch |
| 6288 |
}) => { |
| 6289 |
dispatch({ |
| 6290 |
type: 'UPDATE_FEATURE_START', |
| 6291 |
slug |
| 6292 |
}); |
| 6293 |
try { |
| 6294 |
const feature = await _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ |
| 6295 |
path: `/liquidweb/harbor/v1/features/${slug}/update`, |
| 6296 |
method: 'POST' |
| 6297 |
}); |
| 6298 |
// Same reasoning as enableFeature/disableFeature: UPDATE_FEATURE_FINISHED |
| 6299 |
// patches bySlug directly — invalidating getFeatures is unnecessary and |
| 6300 |
// risks the stale-overwrite flicker (https://github.com/stellarwp/harbor/pull/94). |
| 6301 |
dispatch({ |
| 6302 |
type: 'UPDATE_FEATURE_FINISHED', |
| 6303 |
feature |
| 6304 |
}); |
| 6305 |
return null; |
| 6306 |
} catch (err) { |
| 6307 |
const error = await _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError.wrap(err, _errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.FeatureUpdateFailed, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to update your feature.', '%TEXTDOMAIN%')); |
| 6308 |
dispatch({ |
| 6309 |
type: 'UPDATE_FEATURE_FAILED', |
| 6310 |
slug, |
| 6311 |
error |
| 6312 |
}); |
| 6313 |
return error; |
| 6314 |
} |
| 6315 |
}; |
| 6316 |
|
| 6317 |
/** |
| 6318 |
* Store a license key via the REST API, then invalidate the license |
| 6319 |
* and features resolvers so the UI refreshes with the new entitlements. |
| 6320 |
* |
| 6321 |
* @param key |
| 6322 |
* @since 1.0.0 |
| 6323 |
*/ |
| 6324 |
const storeLicense = key => async ({ |
| 6325 |
dispatch, |
| 6326 |
select |
| 6327 |
}) => { |
| 6328 |
if (!select.canModifyLicense()) { |
| 6329 |
return new _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError(_errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.LicenseActionInProgress, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to validate your license, another action is in progress.', '%TEXTDOMAIN%')); |
| 6330 |
} |
| 6331 |
dispatch({ |
| 6332 |
type: 'STORE_LICENSE_START' |
| 6333 |
}); |
| 6334 |
try { |
| 6335 |
const result = await _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ |
| 6336 |
path: '/liquidweb/harbor/v1/license', |
| 6337 |
method: 'POST', |
| 6338 |
data: { |
| 6339 |
key |
| 6340 |
} |
| 6341 |
}); |
| 6342 |
dispatch({ |
| 6343 |
type: 'STORE_LICENSE_FINISHED', |
| 6344 |
license: result |
| 6345 |
}); |
| 6346 |
// License changes affect entitlements globally (available features, tiers, |
| 6347 |
// locked state), so a full re-fetch of features is correct here — unlike |
| 6348 |
// toggle/update actions where the API already returns the patched feature. |
| 6349 |
dispatch.invalidateResolution('getFeatures', []); |
| 6350 |
return null; |
| 6351 |
} catch (err) { |
| 6352 |
const error = await _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError.wrap(err, _errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.LicenseStoreFailed, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to validate your license.', '%TEXTDOMAIN%')); |
| 6353 |
dispatch({ |
| 6354 |
type: 'STORE_LICENSE_FAILED', |
| 6355 |
error |
| 6356 |
}); |
| 6357 |
return error; |
| 6358 |
} |
| 6359 |
}; |
| 6360 |
|
| 6361 |
/** |
| 6362 |
* Refresh the license from the upstream service via the REST API, then |
| 6363 |
* invalidate the features resolver so the UI reflects any plan changes. |
| 6364 |
* |
| 6365 |
* @since 1.0.0 |
| 6366 |
*/ |
| 6367 |
const refreshLicense = () => async ({ |
| 6368 |
dispatch, |
| 6369 |
select |
| 6370 |
}) => { |
| 6371 |
if (!select.canModifyLicense()) { |
| 6372 |
return new _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError(_errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.LicenseActionInProgress, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to refresh your license, another action is in progress.', '%TEXTDOMAIN%')); |
| 6373 |
} |
| 6374 |
dispatch({ |
| 6375 |
type: 'REFRESH_LICENSE_START' |
| 6376 |
}); |
| 6377 |
try { |
| 6378 |
const result = await _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ |
| 6379 |
path: '/liquidweb/harbor/v1/license/refresh', |
| 6380 |
method: 'POST' |
| 6381 |
}); |
| 6382 |
dispatch({ |
| 6383 |
type: 'REFRESH_LICENSE_FINISHED', |
| 6384 |
license: result |
| 6385 |
}); |
| 6386 |
dispatch.invalidateResolution('getFeatures', []); |
| 6387 |
if (result.error) { |
| 6388 |
return new _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError(_errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.LicenseValidateFailed, result.error.message); |
| 6389 |
} |
| 6390 |
return null; |
| 6391 |
} catch (err) { |
| 6392 |
const error = await _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError.wrap(err, _errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.LicenseRefreshFailed, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to refresh your license.', '%TEXTDOMAIN%')); |
| 6393 |
dispatch({ |
| 6394 |
type: 'REFRESH_LICENSE_FAILED', |
| 6395 |
error |
| 6396 |
}); |
| 6397 |
return error; |
| 6398 |
} |
| 6399 |
}; |
| 6400 |
|
| 6401 |
/** |
| 6402 |
* Refresh the product catalog from the upstream service via the REST API. |
| 6403 |
* |
| 6404 |
* @since 1.0.0 |
| 6405 |
*/ |
| 6406 |
const refreshCatalog = () => async ({ |
| 6407 |
dispatch |
| 6408 |
}) => { |
| 6409 |
try { |
| 6410 |
const result = await _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ |
| 6411 |
path: '/liquidweb/harbor/v1/catalog/refresh', |
| 6412 |
method: 'POST' |
| 6413 |
}); |
| 6414 |
dispatch.receiveCatalog(result); |
| 6415 |
return null; |
| 6416 |
} catch (err) { |
| 6417 |
const error = await _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError.wrap(err, _errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.CatalogRefreshFailed, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to refresh the product catalog.', '%TEXTDOMAIN%')); |
| 6418 |
return error; |
| 6419 |
} |
| 6420 |
}; |
| 6421 |
|
| 6422 |
/** |
| 6423 |
* Delete the stored license key via the REST API, then invalidate the |
| 6424 |
* features resolver so the UI refreshes. |
| 6425 |
* |
| 6426 |
* @since 1.0.0 |
| 6427 |
*/ |
| 6428 |
const deleteLicense = () => async ({ |
| 6429 |
dispatch, |
| 6430 |
select |
| 6431 |
}) => { |
| 6432 |
if (!select.canModifyLicense()) { |
| 6433 |
return new _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError(_errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.LicenseActionInProgress, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to delete your license, another action is in progress.', '%TEXTDOMAIN%')); |
| 6434 |
} |
| 6435 |
dispatch({ |
| 6436 |
type: 'DELETE_LICENSE_START' |
| 6437 |
}); |
| 6438 |
try { |
| 6439 |
await _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ |
| 6440 |
path: '/liquidweb/harbor/v1/license', |
| 6441 |
method: 'DELETE' |
| 6442 |
}); |
| 6443 |
dispatch({ |
| 6444 |
type: 'DELETE_LICENSE_FINISHED' |
| 6445 |
}); |
| 6446 |
dispatch.invalidateResolution('getFeatures', []); |
| 6447 |
return null; |
| 6448 |
} catch (err) { |
| 6449 |
const error = await _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError.wrap(err, _errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.LicenseDeleteFailed, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to remove your license.', '%TEXTDOMAIN%')); |
| 6450 |
dispatch({ |
| 6451 |
type: 'DELETE_LICENSE_FAILED', |
| 6452 |
error |
| 6453 |
}); |
| 6454 |
return error; |
| 6455 |
} |
| 6456 |
}; |
| 6457 |
|
| 6458 |
/***/ }, |
| 6459 |
|
| 6460 |
/***/ "./resources/js/store/constants.ts" |
| 6461 |
/*!*****************************************!*\ |
| 6462 |
!*** ./resources/js/store/constants.ts ***! |
| 6463 |
\*****************************************/ |
| 6464 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 6465 |
|
| 6466 |
__webpack_require__.r(__webpack_exports__); |
| 6467 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 6468 |
/* harmony export */ STORE_NAME: () => (/* binding */ STORE_NAME) |
| 6469 |
/* harmony export */ }); |
| 6470 |
/** |
| 6471 |
* @wordpress/data store name for the Harbor library. |
| 6472 |
* |
| 6473 |
* @package LiquidWeb\Harbor |
| 6474 |
*/ |
| 6475 |
const STORE_NAME = 'lw/harbor'; |
| 6476 |
|
| 6477 |
/***/ }, |
| 6478 |
|
| 6479 |
/***/ "./resources/js/store/index.ts" |
| 6480 |
/*!*************************************!*\ |
| 6481 |
!*** ./resources/js/store/index.ts ***! |
| 6482 |
\*************************************/ |
| 6483 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 6484 |
|
| 6485 |
__webpack_require__.r(__webpack_exports__); |
| 6486 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 6487 |
/* harmony export */ STORE_NAME: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_5__.STORE_NAME), |
| 6488 |
/* harmony export */ registerHarborStore: () => (/* binding */ registerHarborStore), |
| 6489 |
/* harmony export */ store: () => (/* binding */ store) |
| 6490 |
/* harmony export */ }); |
| 6491 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 6492 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__); |
| 6493 |
/* harmony import */ var _reducer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reducer */ "./resources/js/store/reducer.ts"); |
| 6494 |
/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./actions */ "./resources/js/store/actions.ts"); |
| 6495 |
/* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectors */ "./resources/js/store/selectors.ts"); |
| 6496 |
/* harmony import */ var _resolvers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./resolvers */ "./resources/js/store/resolvers.ts"); |
| 6497 |
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constants */ "./resources/js/store/constants.ts"); |
| 6498 |
/** |
| 6499 |
* Registers the lw @wordpress/data store. |
| 6500 |
* |
| 6501 |
* Call registerHarborStore() once before createRoot() in index.tsx. |
| 6502 |
* Consumers import the store descriptor and use useSelect / useDispatch. |
| 6503 |
* |
| 6504 |
* @package LiquidWeb\Harbor |
| 6505 |
*/ |
| 6506 |
|
| 6507 |
|
| 6508 |
|
| 6509 |
|
| 6510 |
|
| 6511 |
|
| 6512 |
const store = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.createReduxStore)(_constants__WEBPACK_IMPORTED_MODULE_5__.STORE_NAME, { |
| 6513 |
reducer: _reducer__WEBPACK_IMPORTED_MODULE_1__.reducer, |
| 6514 |
actions: _actions__WEBPACK_IMPORTED_MODULE_2__, |
| 6515 |
selectors: _selectors__WEBPACK_IMPORTED_MODULE_3__, |
| 6516 |
resolvers: _resolvers__WEBPACK_IMPORTED_MODULE_4__ |
| 6517 |
}); |
| 6518 |
function registerHarborStore() { |
| 6519 |
(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.register)(store); |
| 6520 |
} |
| 6521 |
|
| 6522 |
|
| 6523 |
/***/ }, |
| 6524 |
|
| 6525 |
/***/ "./resources/js/store/reducer.ts" |
| 6526 |
/*!***************************************!*\ |
| 6527 |
!*** ./resources/js/store/reducer.ts ***! |
| 6528 |
\***************************************/ |
| 6529 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 6530 |
|
| 6531 |
__webpack_require__.r(__webpack_exports__); |
| 6532 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 6533 |
/* harmony export */ reducer: () => (/* binding */ reducer) |
| 6534 |
/* harmony export */ }); |
| 6535 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 6536 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__); |
| 6537 |
/** |
| 6538 |
* Reducer for the lw @wordpress/data store. |
| 6539 |
* |
| 6540 |
* @package LiquidWeb\Harbor |
| 6541 |
*/ |
| 6542 |
|
| 6543 |
const reducer = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.combineReducers)({ |
| 6544 |
features, |
| 6545 |
harborHosts, |
| 6546 |
license, |
| 6547 |
catalog, |
| 6548 |
legacyLicenses |
| 6549 |
}); |
| 6550 |
|
| 6551 |
// --------------------------------------------------------------------------- |
| 6552 |
// Catalog |
| 6553 |
// --------------------------------------------------------------------------- |
| 6554 |
|
| 6555 |
const CATALOG_DEFAULT = { |
| 6556 |
byProductSlug: {} |
| 6557 |
}; |
| 6558 |
function catalog(state = CATALOG_DEFAULT, action) { |
| 6559 |
switch (action.type) { |
| 6560 |
case 'RECEIVE_CATALOG': |
| 6561 |
{ |
| 6562 |
return { |
| 6563 |
...state, |
| 6564 |
byProductSlug: Object.fromEntries(action.catalogs.map(c => [c.product_slug, c])) |
| 6565 |
}; |
| 6566 |
} |
| 6567 |
default: |
| 6568 |
return state; |
| 6569 |
} |
| 6570 |
} |
| 6571 |
|
| 6572 |
// --------------------------------------------------------------------------- |
| 6573 |
// Legacy licenses |
| 6574 |
// --------------------------------------------------------------------------- |
| 6575 |
|
| 6576 |
const LEGACY_LICENSES_DEFAULT = { |
| 6577 |
bySlug: {} |
| 6578 |
}; |
| 6579 |
function legacyLicenses(state = LEGACY_LICENSES_DEFAULT, action) { |
| 6580 |
switch (action.type) { |
| 6581 |
case 'RECEIVE_LEGACY_LICENSES': |
| 6582 |
{ |
| 6583 |
return { |
| 6584 |
...state, |
| 6585 |
bySlug: Object.fromEntries(action.licenses.map(l => [l.slug, l])) |
| 6586 |
}; |
| 6587 |
} |
| 6588 |
default: |
| 6589 |
return state; |
| 6590 |
} |
| 6591 |
} |
| 6592 |
|
| 6593 |
// --------------------------------------------------------------------------- |
| 6594 |
// Features |
| 6595 |
// --------------------------------------------------------------------------- |
| 6596 |
|
| 6597 |
const FEATURES_DEFAULT = { |
| 6598 |
bySlug: {}, |
| 6599 |
toggling: {}, |
| 6600 |
updating: {}, |
| 6601 |
errorBySlug: {} |
| 6602 |
}; |
| 6603 |
function features(state = FEATURES_DEFAULT, action) { |
| 6604 |
switch (action.type) { |
| 6605 |
case 'RECEIVE_FEATURES': |
| 6606 |
{ |
| 6607 |
return { |
| 6608 |
...state, |
| 6609 |
bySlug: Object.fromEntries(action.features.map(f => [f.slug, f])) |
| 6610 |
}; |
| 6611 |
} |
| 6612 |
case 'TOGGLE_FEATURE_START': |
| 6613 |
{ |
| 6614 |
const { |
| 6615 |
[action.slug]: _, |
| 6616 |
...remainingErrors |
| 6617 |
} = state.errorBySlug; |
| 6618 |
return { |
| 6619 |
...state, |
| 6620 |
toggling: { |
| 6621 |
...state.toggling, |
| 6622 |
[action.slug]: true |
| 6623 |
}, |
| 6624 |
errorBySlug: remainingErrors |
| 6625 |
}; |
| 6626 |
} |
| 6627 |
case 'TOGGLE_FEATURE_FINISHED': |
| 6628 |
{ |
| 6629 |
const { |
| 6630 |
slug |
| 6631 |
} = action.feature; |
| 6632 |
const { |
| 6633 |
[slug]: _, |
| 6634 |
...remainingToggling |
| 6635 |
} = state.toggling; |
| 6636 |
return { |
| 6637 |
...state, |
| 6638 |
bySlug: { |
| 6639 |
...state.bySlug, |
| 6640 |
[slug]: action.feature |
| 6641 |
}, |
| 6642 |
toggling: remainingToggling |
| 6643 |
}; |
| 6644 |
} |
| 6645 |
case 'TOGGLE_FEATURE_FAILED': |
| 6646 |
{ |
| 6647 |
const { |
| 6648 |
[action.slug]: _, |
| 6649 |
...remainingToggling |
| 6650 |
} = state.toggling; |
| 6651 |
return { |
| 6652 |
...state, |
| 6653 |
toggling: remainingToggling, |
| 6654 |
errorBySlug: { |
| 6655 |
...state.errorBySlug, |
| 6656 |
[action.slug]: action.error |
| 6657 |
} |
| 6658 |
}; |
| 6659 |
} |
| 6660 |
case 'UPDATE_FEATURE_START': |
| 6661 |
{ |
| 6662 |
const { |
| 6663 |
[action.slug]: _, |
| 6664 |
...remainingErrors |
| 6665 |
} = state.errorBySlug; |
| 6666 |
return { |
| 6667 |
...state, |
| 6668 |
updating: { |
| 6669 |
...state.updating, |
| 6670 |
[action.slug]: true |
| 6671 |
}, |
| 6672 |
errorBySlug: remainingErrors |
| 6673 |
}; |
| 6674 |
} |
| 6675 |
case 'UPDATE_FEATURE_FINISHED': |
| 6676 |
{ |
| 6677 |
const { |
| 6678 |
slug |
| 6679 |
} = action.feature; |
| 6680 |
const { |
| 6681 |
[slug]: _, |
| 6682 |
...remainingUpdating |
| 6683 |
} = state.updating; |
| 6684 |
return { |
| 6685 |
...state, |
| 6686 |
bySlug: { |
| 6687 |
...state.bySlug, |
| 6688 |
[slug]: action.feature |
| 6689 |
}, |
| 6690 |
updating: remainingUpdating |
| 6691 |
}; |
| 6692 |
} |
| 6693 |
case 'UPDATE_FEATURE_FAILED': |
| 6694 |
{ |
| 6695 |
const { |
| 6696 |
[action.slug]: _, |
| 6697 |
...remainingUpdating |
| 6698 |
} = state.updating; |
| 6699 |
return { |
| 6700 |
...state, |
| 6701 |
updating: remainingUpdating, |
| 6702 |
errorBySlug: { |
| 6703 |
...state.errorBySlug, |
| 6704 |
[action.slug]: action.error |
| 6705 |
} |
| 6706 |
}; |
| 6707 |
} |
| 6708 |
default: |
| 6709 |
return state; |
| 6710 |
} |
| 6711 |
} |
| 6712 |
|
| 6713 |
// --------------------------------------------------------------------------- |
| 6714 |
// Harbor hosts |
| 6715 |
// --------------------------------------------------------------------------- |
| 6716 |
|
| 6717 |
const HARBOR_HOSTS_DEFAULT = { |
| 6718 |
basenames: [] |
| 6719 |
}; |
| 6720 |
function harborHosts(state = HARBOR_HOSTS_DEFAULT, action) { |
| 6721 |
switch (action.type) { |
| 6722 |
case 'RECEIVE_HARBOR_HOSTS': |
| 6723 |
return { |
| 6724 |
...state, |
| 6725 |
basenames: action.basenames |
| 6726 |
}; |
| 6727 |
default: |
| 6728 |
return state; |
| 6729 |
} |
| 6730 |
} |
| 6731 |
|
| 6732 |
// --------------------------------------------------------------------------- |
| 6733 |
// License |
| 6734 |
// --------------------------------------------------------------------------- |
| 6735 |
|
| 6736 |
const LICENSE_DEFAULT = { |
| 6737 |
license: { |
| 6738 |
key: null, |
| 6739 |
products: [], |
| 6740 |
error: null |
| 6741 |
}, |
| 6742 |
isStoring: false, |
| 6743 |
isDeleting: false, |
| 6744 |
isRefreshing: false, |
| 6745 |
storeError: null, |
| 6746 |
deleteError: null, |
| 6747 |
refreshError: null |
| 6748 |
}; |
| 6749 |
function license(state = LICENSE_DEFAULT, action) { |
| 6750 |
switch (action.type) { |
| 6751 |
case 'RECEIVE_LICENSE': |
| 6752 |
{ |
| 6753 |
return { |
| 6754 |
...state, |
| 6755 |
license: action.license |
| 6756 |
}; |
| 6757 |
} |
| 6758 |
case 'STORE_LICENSE_START': |
| 6759 |
{ |
| 6760 |
return { |
| 6761 |
...state, |
| 6762 |
isStoring: true, |
| 6763 |
storeError: null |
| 6764 |
}; |
| 6765 |
} |
| 6766 |
case 'STORE_LICENSE_FINISHED': |
| 6767 |
{ |
| 6768 |
return { |
| 6769 |
...state, |
| 6770 |
isStoring: false, |
| 6771 |
license: action.license |
| 6772 |
}; |
| 6773 |
} |
| 6774 |
case 'STORE_LICENSE_FAILED': |
| 6775 |
{ |
| 6776 |
return { |
| 6777 |
...state, |
| 6778 |
isStoring: false, |
| 6779 |
storeError: action.error |
| 6780 |
}; |
| 6781 |
} |
| 6782 |
case 'DELETE_LICENSE_START': |
| 6783 |
{ |
| 6784 |
return { |
| 6785 |
...state, |
| 6786 |
isDeleting: true, |
| 6787 |
deleteError: null |
| 6788 |
}; |
| 6789 |
} |
| 6790 |
case 'DELETE_LICENSE_FINISHED': |
| 6791 |
{ |
| 6792 |
return { |
| 6793 |
...state, |
| 6794 |
isDeleting: false, |
| 6795 |
license: { |
| 6796 |
key: null, |
| 6797 |
products: [], |
| 6798 |
error: null |
| 6799 |
} |
| 6800 |
}; |
| 6801 |
} |
| 6802 |
case 'DELETE_LICENSE_FAILED': |
| 6803 |
{ |
| 6804 |
return { |
| 6805 |
...state, |
| 6806 |
isDeleting: false, |
| 6807 |
deleteError: action.error |
| 6808 |
}; |
| 6809 |
} |
| 6810 |
case 'REFRESH_LICENSE_START': |
| 6811 |
{ |
| 6812 |
return { |
| 6813 |
...state, |
| 6814 |
isRefreshing: true, |
| 6815 |
refreshError: null |
| 6816 |
}; |
| 6817 |
} |
| 6818 |
case 'REFRESH_LICENSE_FINISHED': |
| 6819 |
{ |
| 6820 |
return { |
| 6821 |
...state, |
| 6822 |
isRefreshing: false, |
| 6823 |
license: action.license |
| 6824 |
}; |
| 6825 |
} |
| 6826 |
case 'REFRESH_LICENSE_FAILED': |
| 6827 |
{ |
| 6828 |
return { |
| 6829 |
...state, |
| 6830 |
isRefreshing: false, |
| 6831 |
refreshError: action.error |
| 6832 |
}; |
| 6833 |
} |
| 6834 |
default: |
| 6835 |
return state; |
| 6836 |
} |
| 6837 |
} |
| 6838 |
|
| 6839 |
/***/ }, |
| 6840 |
|
| 6841 |
/***/ "./resources/js/store/resolvers.ts" |
| 6842 |
/*!*****************************************!*\ |
| 6843 |
!*** ./resources/js/store/resolvers.ts ***! |
| 6844 |
\*****************************************/ |
| 6845 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 6846 |
|
| 6847 |
__webpack_require__.r(__webpack_exports__); |
| 6848 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 6849 |
/* harmony export */ getCatalog: () => (/* binding */ getCatalog), |
| 6850 |
/* harmony export */ getCatalogTier: () => (/* binding */ getCatalogTier), |
| 6851 |
/* harmony export */ getFeature: () => (/* binding */ getFeature), |
| 6852 |
/* harmony export */ getFeatures: () => (/* binding */ getFeatures), |
| 6853 |
/* harmony export */ getFeaturesByProduct: () => (/* binding */ getFeaturesByProduct), |
| 6854 |
/* harmony export */ getHarborHostBasenames: () => (/* binding */ getHarborHostBasenames), |
| 6855 |
/* harmony export */ getLegacyLicenseBySlug: () => (/* binding */ getLegacyLicenseBySlug), |
| 6856 |
/* harmony export */ getLegacyLicenses: () => (/* binding */ getLegacyLicenses), |
| 6857 |
/* harmony export */ getLicenseKey: () => (/* binding */ getLicenseKey), |
| 6858 |
/* harmony export */ getLicenseProducts: () => (/* binding */ getLicenseProducts), |
| 6859 |
/* harmony export */ getProductCatalog: () => (/* binding */ getProductCatalog), |
| 6860 |
/* harmony export */ getProductTiers: () => (/* binding */ getProductTiers), |
| 6861 |
/* harmony export */ hasLegacyLicense: () => (/* binding */ hasLegacyLicense), |
| 6862 |
/* harmony export */ hasLegacyLicenses: () => (/* binding */ hasLegacyLicenses), |
| 6863 |
/* harmony export */ hasLicense: () => (/* binding */ hasLicense), |
| 6864 |
/* harmony export */ isFeatureEnabled: () => (/* binding */ isFeatureEnabled) |
| 6865 |
/* harmony export */ }); |
| 6866 |
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); |
| 6867 |
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__); |
| 6868 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 6869 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); |
| 6870 |
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/errors */ "./resources/js/errors/index.ts"); |
| 6871 |
/* harmony import */ var _lib_forward_resolver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/lib/forward-resolver */ "./resources/js/lib/forward-resolver.ts"); |
| 6872 |
/** |
| 6873 |
* Resolvers for the lw @wordpress/data store. |
| 6874 |
* |
| 6875 |
* Each resolver name matches a selector. @wordpress/data calls the resolver |
| 6876 |
* automatically the first time the matching selector is invoked, then marks |
| 6877 |
* it as resolved so subsequent calls hit the cache. |
| 6878 |
* |
| 6879 |
* @package LiquidWeb\Harbor |
| 6880 |
*/ |
| 6881 |
|
| 6882 |
|
| 6883 |
|
| 6884 |
|
| 6885 |
|
| 6886 |
/** |
| 6887 |
* Fetches all features from the REST API and stores them. |
| 6888 |
* Triggered automatically when getFeatures is first called. |
| 6889 |
*/ |
| 6890 |
const getFeatures = () => async ({ |
| 6891 |
dispatch |
| 6892 |
}) => { |
| 6893 |
try { |
| 6894 |
const features = await _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ |
| 6895 |
path: '/liquidweb/harbor/v1/features' |
| 6896 |
}); |
| 6897 |
dispatch.receiveFeatures(features); |
| 6898 |
} catch (err) { |
| 6899 |
throw await _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError.wrap(err, _errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.FeaturesFetchFailed, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to load your features.', '%TEXTDOMAIN%')); |
| 6900 |
} |
| 6901 |
}; |
| 6902 |
|
| 6903 |
/** |
| 6904 |
* Fetches the active Harbor host plugin basenames from the REST API. |
| 6905 |
* Triggered automatically when getHarborHostBasenames is first called, and |
| 6906 |
* invalidated after plugin activation so the list stays current. |
| 6907 |
*/ |
| 6908 |
const getHarborHostBasenames = () => async ({ |
| 6909 |
dispatch |
| 6910 |
}) => { |
| 6911 |
try { |
| 6912 |
const basenames = await _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ |
| 6913 |
path: '/liquidweb/harbor/v1/hosts' |
| 6914 |
}); |
| 6915 |
dispatch.receiveHarborHosts(basenames); |
| 6916 |
} catch (err) { |
| 6917 |
throw await _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError.wrap(err, _errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.FeaturesFetchFailed, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to load Harbor hosts.', '%TEXTDOMAIN%')); |
| 6918 |
} |
| 6919 |
}; |
| 6920 |
const getFeaturesByProduct = (0,_lib_forward_resolver__WEBPACK_IMPORTED_MODULE_3__.forwardResolverWithoutArgs)('getFeatures'); |
| 6921 |
const getFeature = (0,_lib_forward_resolver__WEBPACK_IMPORTED_MODULE_3__.forwardResolverWithoutArgs)('getFeatures'); |
| 6922 |
const isFeatureEnabled = (0,_lib_forward_resolver__WEBPACK_IMPORTED_MODULE_3__.forwardResolverWithoutArgs)('getFeatures'); |
| 6923 |
|
| 6924 |
// --------------------------------------------------------------------------- |
| 6925 |
// Legacy licenses |
| 6926 |
// --------------------------------------------------------------------------- |
| 6927 |
|
| 6928 |
/** |
| 6929 |
* Fetches legacy licenses from the REST API. |
| 6930 |
*/ |
| 6931 |
const getLegacyLicenses = () => async ({ |
| 6932 |
dispatch |
| 6933 |
}) => { |
| 6934 |
try { |
| 6935 |
const licenses = await _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ |
| 6936 |
path: '/liquidweb/harbor/v1/legacy-licenses' |
| 6937 |
}); |
| 6938 |
dispatch.receiveLegacyLicenses(licenses); |
| 6939 |
} catch (err) { |
| 6940 |
throw await _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError.wrap(err, _errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.LegacyLicensesFetchFailed, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to load legacy licenses.', '%TEXTDOMAIN%')); |
| 6941 |
} |
| 6942 |
}; |
| 6943 |
const getLegacyLicenseBySlug = (0,_lib_forward_resolver__WEBPACK_IMPORTED_MODULE_3__.forwardResolverWithoutArgs)('getLegacyLicenses'); |
| 6944 |
const hasLegacyLicense = (0,_lib_forward_resolver__WEBPACK_IMPORTED_MODULE_3__.forwardResolverWithoutArgs)('getLegacyLicenses'); |
| 6945 |
const hasLegacyLicenses = (0,_lib_forward_resolver__WEBPACK_IMPORTED_MODULE_3__.forwardResolver)('getLegacyLicenses'); |
| 6946 |
|
| 6947 |
// --------------------------------------------------------------------------- |
| 6948 |
// Catalog |
| 6949 |
// --------------------------------------------------------------------------- |
| 6950 |
|
| 6951 |
/** |
| 6952 |
* Fetches all product catalogs from the REST API and stores them. |
| 6953 |
* Triggered automatically when getCatalog is first called. |
| 6954 |
*/ |
| 6955 |
const getCatalog = () => async ({ |
| 6956 |
dispatch |
| 6957 |
}) => { |
| 6958 |
try { |
| 6959 |
const catalogs = await _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ |
| 6960 |
path: '/liquidweb/harbor/v1/catalog' |
| 6961 |
}); |
| 6962 |
dispatch.receiveCatalog(catalogs); |
| 6963 |
} catch (err) { |
| 6964 |
throw await _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError.wrap(err, _errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.CatalogFetchFailed, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to load the product catalog.', '%TEXTDOMAIN%')); |
| 6965 |
} |
| 6966 |
}; |
| 6967 |
const getProductCatalog = (0,_lib_forward_resolver__WEBPACK_IMPORTED_MODULE_3__.forwardResolverWithoutArgs)('getCatalog'); |
| 6968 |
const getProductTiers = (0,_lib_forward_resolver__WEBPACK_IMPORTED_MODULE_3__.forwardResolverWithoutArgs)('getCatalog'); |
| 6969 |
const getCatalogTier = (0,_lib_forward_resolver__WEBPACK_IMPORTED_MODULE_3__.forwardResolverWithoutArgs)('getCatalog'); |
| 6970 |
|
| 6971 |
// --------------------------------------------------------------------------- |
| 6972 |
// License |
| 6973 |
// --------------------------------------------------------------------------- |
| 6974 |
|
| 6975 |
/** |
| 6976 |
* Fetches the stored license from the REST API. |
| 6977 |
* Triggered automatically when getLicenseKey is first called. |
| 6978 |
*/ |
| 6979 |
const getLicenseKey = () => async ({ |
| 6980 |
dispatch |
| 6981 |
}) => { |
| 6982 |
try { |
| 6983 |
const result = await _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ |
| 6984 |
path: '/liquidweb/harbor/v1/license' |
| 6985 |
}); |
| 6986 |
dispatch.receiveLicense(result); |
| 6987 |
} catch (err) { |
| 6988 |
throw await _errors__WEBPACK_IMPORTED_MODULE_2__.HarborError.wrap(err, _errors__WEBPACK_IMPORTED_MODULE_2__.ErrorCode.LicenseFetchFailed, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Liquid Web Software Manager failed to load your license.', '%TEXTDOMAIN%')); |
| 6989 |
} |
| 6990 |
}; |
| 6991 |
const hasLicense = (0,_lib_forward_resolver__WEBPACK_IMPORTED_MODULE_3__.forwardResolver)('getLicenseKey'); |
| 6992 |
const getLicenseProducts = (0,_lib_forward_resolver__WEBPACK_IMPORTED_MODULE_3__.forwardResolverWithoutArgs)('getLicenseKey'); |
| 6993 |
|
| 6994 |
/***/ }, |
| 6995 |
|
| 6996 |
/***/ "./resources/js/store/selectors.ts" |
| 6997 |
/*!*****************************************!*\ |
| 6998 |
!*** ./resources/js/store/selectors.ts ***! |
| 6999 |
\*****************************************/ |
| 7000 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7001 |
|
| 7002 |
__webpack_require__.r(__webpack_exports__); |
| 7003 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7004 |
/* harmony export */ areAllProductsNotActivated: () => (/* binding */ areAllProductsNotActivated), |
| 7005 |
/* harmony export */ canModifyLicense: () => (/* binding */ canModifyLicense), |
| 7006 |
/* harmony export */ getActiveLegacyLicense: () => (/* binding */ getActiveLegacyLicense), |
| 7007 |
/* harmony export */ getCatalog: () => (/* binding */ getCatalog), |
| 7008 |
/* harmony export */ getCatalogTier: () => (/* binding */ getCatalogTier), |
| 7009 |
/* harmony export */ getDeleteLicenseError: () => (/* binding */ getDeleteLicenseError), |
| 7010 |
/* harmony export */ getEnabledHarborHostCount: () => (/* binding */ getEnabledHarborHostCount), |
| 7011 |
/* harmony export */ getFeature: () => (/* binding */ getFeature), |
| 7012 |
/* harmony export */ getFeatureError: () => (/* binding */ getFeatureError), |
| 7013 |
/* harmony export */ getFeatureMismatchType: () => (/* binding */ getFeatureMismatchType), |
| 7014 |
/* harmony export */ getFeatures: () => (/* binding */ getFeatures), |
| 7015 |
/* harmony export */ getFeaturesByProduct: () => (/* binding */ getFeaturesByProduct), |
| 7016 |
/* harmony export */ getHarborHostBasenames: () => (/* binding */ getHarborHostBasenames), |
| 7017 |
/* harmony export */ getLegacyLicenseBySlug: () => (/* binding */ getLegacyLicenseBySlug), |
| 7018 |
/* harmony export */ getLegacyLicenses: () => (/* binding */ getLegacyLicenses), |
| 7019 |
/* harmony export */ getLicenseError: () => (/* binding */ getLicenseError), |
| 7020 |
/* harmony export */ getLicenseKey: () => (/* binding */ getLicenseKey), |
| 7021 |
/* harmony export */ getLicenseProducts: () => (/* binding */ getLicenseProducts), |
| 7022 |
/* harmony export */ getProductCatalog: () => (/* binding */ getProductCatalog), |
| 7023 |
/* harmony export */ getProductTiers: () => (/* binding */ getProductTiers), |
| 7024 |
/* harmony export */ getRefreshLicenseError: () => (/* binding */ getRefreshLicenseError), |
| 7025 |
/* harmony export */ getStoreLicenseError: () => (/* binding */ getStoreLicenseError), |
| 7026 |
/* harmony export */ getUnactivatedLicenseProduct: () => (/* binding */ getUnactivatedLicenseProduct), |
| 7027 |
/* harmony export */ getUnactivatedLicenseProducts: () => (/* binding */ getUnactivatedLicenseProducts), |
| 7028 |
/* harmony export */ getWithoutCancelledProducts: () => (/* binding */ getWithoutCancelledProducts), |
| 7029 |
/* harmony export */ hasActiveLegacyLicenseForProduct: () => (/* binding */ hasActiveLegacyLicenseForProduct), |
| 7030 |
/* harmony export */ hasLegacyLicense: () => (/* binding */ hasLegacyLicense), |
| 7031 |
/* harmony export */ hasLegacyLicenses: () => (/* binding */ hasLegacyLicenses), |
| 7032 |
/* harmony export */ hasLicense: () => (/* binding */ hasLicense), |
| 7033 |
/* harmony export */ hasUncoveredLegacyLicenses: () => (/* binding */ hasUncoveredLegacyLicenses), |
| 7034 |
/* harmony export */ isAnyInstallableBusy: () => (/* binding */ isAnyInstallableBusy), |
| 7035 |
/* harmony export */ isFeatureEnabled: () => (/* binding */ isFeatureEnabled), |
| 7036 |
/* harmony export */ isFeatureToggling: () => (/* binding */ isFeatureToggling), |
| 7037 |
/* harmony export */ isFeatureUpdating: () => (/* binding */ isFeatureUpdating), |
| 7038 |
/* harmony export */ isLicenseDeleting: () => (/* binding */ isLicenseDeleting), |
| 7039 |
/* harmony export */ isLicenseRefreshing: () => (/* binding */ isLicenseRefreshing), |
| 7040 |
/* harmony export */ isLicenseStoring: () => (/* binding */ isLicenseStoring), |
| 7041 |
/* harmony export */ isProductLicenseValid: () => (/* binding */ isProductLicenseValid), |
| 7042 |
/* harmony export */ isProductUnifiedLicensed: () => (/* binding */ isProductUnifiedLicensed) |
| 7043 |
/* harmony export */ }); |
| 7044 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 7045 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__); |
| 7046 |
/* harmony import */ var _lib_feature_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/lib/feature-utils */ "./resources/js/lib/feature-utils.ts"); |
| 7047 |
/* harmony import */ var _types_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/types/utils */ "./resources/js/types/utils.ts"); |
| 7048 |
/** |
| 7049 |
* Selectors for the lw @wordpress/data store. |
| 7050 |
* |
| 7051 |
* @package LiquidWeb\Harbor |
| 7052 |
*/ |
| 7053 |
|
| 7054 |
|
| 7055 |
|
| 7056 |
|
| 7057 |
// --------------------------------------------------------------------------- |
| 7058 |
// Features |
| 7059 |
// --------------------------------------------------------------------------- |
| 7060 |
|
| 7061 |
const getFeatures = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.createSelector)(state => Object.values(state.features.bySlug), state => [state.features.bySlug]); |
| 7062 |
const getFeaturesByProduct = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.createSelector)((state, product) => Object.values(state.features.bySlug).filter(f => f.product === product), (state, product) => [state.features.bySlug, product]); |
| 7063 |
const getFeature = (state, slug) => state.features.bySlug[slug] ?? null; |
| 7064 |
const isFeatureEnabled = (state, slug) => state.features.bySlug[slug]?.is_enabled ?? false; |
| 7065 |
const isFeatureToggling = (state, slug) => state.features.toggling[slug] ?? false; |
| 7066 |
const getFeatureError = (state, slug) => state.features.errorBySlug[slug] ?? null; |
| 7067 |
|
| 7068 |
/** |
| 7069 |
* Returns the capability mismatch type for a feature, or null if there is none. |
| 7070 |
* |
| 7071 |
* Wraps getFeatureMismatch() for consumers that only have access to the store. |
| 7072 |
* Hooks that already hold a Feature object should call getFeatureMismatch() directly. |
| 7073 |
*/ |
| 7074 |
const getFeatureMismatchType = (state, slug) => { |
| 7075 |
const feature = state.features.bySlug[slug]; |
| 7076 |
if (!feature) return null; |
| 7077 |
return (0,_lib_feature_utils__WEBPACK_IMPORTED_MODULE_1__.getFeatureMismatch)(feature); |
| 7078 |
}; |
| 7079 |
const isFeatureUpdating = (state, slug) => state.features.updating[slug] ?? false; |
| 7080 |
|
| 7081 |
/** |
| 7082 |
* Returns the plugin basenames of all active Harbor-bundled plugins. |
| 7083 |
*/ |
| 7084 |
const getHarborHostBasenames = state => state.harborHosts.basenames; |
| 7085 |
|
| 7086 |
/** |
| 7087 |
* Returns the number of Harbor host plugins that are currently enabled. |
| 7088 |
* |
| 7089 |
* Uses the dedicated hosts registry (accurate after activation) rather than |
| 7090 |
* the is_harbor_host field on features (unreliable for mid-request activations). |
| 7091 |
*/ |
| 7092 |
const getEnabledHarborHostCount = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.createSelector)(state => Object.values(state.features.bySlug).filter(f => f.type === 'plugin' && state.harborHosts.basenames.includes(f.plugin_file) && f.is_enabled).length, state => [state.harborHosts.basenames, state.features.bySlug]); |
| 7093 |
|
| 7094 |
/** |
| 7095 |
* True when any feature is being toggled or updated. |
| 7096 |
* |
| 7097 |
* Both toggle and update operations trigger WordPress install/activate/deactivate |
| 7098 |
* operations that should not run concurrently. |
| 7099 |
* |
| 7100 |
* Memoized via createSelector so the loops only re-run when |
| 7101 |
* the relevant sub-trees actually change. |
| 7102 |
*/ |
| 7103 |
const isAnyInstallableBusy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.createSelector)(state => { |
| 7104 |
const { |
| 7105 |
toggling, |
| 7106 |
updating, |
| 7107 |
bySlug |
| 7108 |
} = state.features; |
| 7109 |
const isInstallable = slug => { |
| 7110 |
const feature = bySlug[slug]; |
| 7111 |
return feature !== undefined && (0,_types_utils__WEBPACK_IMPORTED_MODULE_2__.isInstallableFeature)(feature); |
| 7112 |
}; |
| 7113 |
return Object.keys(toggling).some(isInstallable) || Object.keys(updating).some(isInstallable); |
| 7114 |
}, state => [state.features.toggling, state.features.updating, state.features.bySlug]); |
| 7115 |
|
| 7116 |
// --------------------------------------------------------------------------- |
| 7117 |
// Legacy licenses |
| 7118 |
// --------------------------------------------------------------------------- |
| 7119 |
|
| 7120 |
const getLegacyLicenses = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.createSelector)(state => Object.values(state.legacyLicenses.bySlug), state => [state.legacyLicenses.bySlug]); |
| 7121 |
const getLegacyLicenseBySlug = (state, slug) => state.legacyLicenses.bySlug[slug] ?? null; |
| 7122 |
const hasLegacyLicense = (state, slug) => slug in state.legacyLicenses.bySlug; |
| 7123 |
const hasLegacyLicenses = state => Object.keys(state.legacyLicenses.bySlug).length > 0; |
| 7124 |
|
| 7125 |
/** |
| 7126 |
* True when at least one legacy license belongs to a product not already |
| 7127 |
* covered by the unified license. Used to suppress the banner when the |
| 7128 |
* unified license makes legacy notices redundant. |
| 7129 |
*/ |
| 7130 |
const hasUncoveredLegacyLicenses = state => Object.values(state.legacyLicenses.bySlug).some(license => !isProductUnifiedLicensed(state, license.product)); |
| 7131 |
|
| 7132 |
/** |
| 7133 |
* Returns the legacy license for the given feature slug only if it is active, |
| 7134 |
* or null if it does not exist or has expired. |
| 7135 |
*/ |
| 7136 |
const getActiveLegacyLicense = (state, slug) => { |
| 7137 |
const license = state.legacyLicenses.bySlug[slug] ?? null; |
| 7138 |
return license !== null && license.is_active ? license : null; |
| 7139 |
}; |
| 7140 |
|
| 7141 |
/** |
| 7142 |
* Returns all license products excluding those with a cancelled status. |
| 7143 |
* |
| 7144 |
* Cancelled products are excluded globally so they do not influence any |
| 7145 |
* selector's output — they clutter the UI and should not affect license |
| 7146 |
* validity or activation checks. |
| 7147 |
*/ |
| 7148 |
const getWithoutCancelledProducts = state => state.license.license.products.filter(p => p.status !== 'cancelled'); |
| 7149 |
|
| 7150 |
/** |
| 7151 |
* True when the unified license covers the given product slug. |
| 7152 |
*/ |
| 7153 |
const isProductUnifiedLicensed = (state, productSlug) => getWithoutCancelledProducts(state).some(p => p.product_slug === productSlug); |
| 7154 |
|
| 7155 |
/** |
| 7156 |
* True when any tier entry for the given product has is_valid set to true, |
| 7157 |
* meaning the product is activated on the current domain with an active entitlement. |
| 7158 |
* |
| 7159 |
* @since 1.0.0 |
| 7160 |
*/ |
| 7161 |
const isProductLicenseValid = (state, productSlug) => getWithoutCancelledProducts(state).some(p => p.product_slug === productSlug && p.is_valid === true); |
| 7162 |
|
| 7163 |
/** |
| 7164 |
* True when at least one feature belonging to the product has an active legacy license. |
| 7165 |
*/ |
| 7166 |
const hasActiveLegacyLicenseForProduct = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.createSelector)((state, productSlug) => Object.values(state.features.bySlug).filter(f => f.product === productSlug).some(f => state.legacyLicenses.bySlug[f.slug]?.is_active === true), (state, productSlug) => [state.features.bySlug, state.legacyLicenses.bySlug, productSlug]); |
| 7167 |
|
| 7168 |
// --------------------------------------------------------------------------- |
| 7169 |
// Catalog |
| 7170 |
// --------------------------------------------------------------------------- |
| 7171 |
|
| 7172 |
const getCatalog = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.createSelector)(state => Object.values(state.catalog.byProductSlug), state => [state.catalog.byProductSlug]); |
| 7173 |
const getProductCatalog = (state, slug) => state.catalog.byProductSlug[slug] ?? null; |
| 7174 |
const getProductTiers = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.createSelector)((state, slug) => state.catalog.byProductSlug[slug]?.tiers ?? [], (state, slug) => [state.catalog.byProductSlug, slug]); |
| 7175 |
|
| 7176 |
/** |
| 7177 |
* Returns a single CatalogTier by product slug and tier slug, or null. |
| 7178 |
* |
| 7179 |
* Returns the full tier object so callers can read price, currency, etc. |
| 7180 |
*/ |
| 7181 |
const getCatalogTier = (state, productSlug, tierSlug) => state.catalog.byProductSlug[productSlug]?.tiers.find(t => t.tier_slug === tierSlug) ?? null; |
| 7182 |
|
| 7183 |
// --------------------------------------------------------------------------- |
| 7184 |
// License |
| 7185 |
// --------------------------------------------------------------------------- |
| 7186 |
|
| 7187 |
const UNACTIVATED_STATUSES = ['not_activated', 'activation_required']; |
| 7188 |
|
| 7189 |
/** |
| 7190 |
* True when a license is present and every non-expired product's validation_status |
| 7191 |
* indicates it has not been activated on this domain. Expired products are excluded |
| 7192 |
* so they don't suppress the notice for products that can still be activated. |
| 7193 |
*/ |
| 7194 |
const areAllProductsNotActivated = state => { |
| 7195 |
const products = getWithoutCancelledProducts(state).filter(p => p.validation_status !== 'expired'); |
| 7196 |
return products.length > 0 && products.every(p => UNACTIVATED_STATUSES.includes(p.validation_status)); |
| 7197 |
}; |
| 7198 |
|
| 7199 |
/** |
| 7200 |
* Returns every license product for the given slug that the user owns but has |
| 7201 |
* not yet activated on this domain. |
| 7202 |
* |
| 7203 |
* Matches entries where activated_here is not true and validation_status is |
| 7204 |
* not_activated or activation_required — i.e. the subscription exists but the |
| 7205 |
* current domain is not in the activations list. A unified key can cover more |
| 7206 |
* than one tier of the same product, so this can return multiple entries. |
| 7207 |
* |
| 7208 |
* @since 1.6.0 |
| 7209 |
*/ |
| 7210 |
const getUnactivatedLicenseProducts = (state, productSlug) => getWithoutCancelledProducts(state).filter(p => p.product_slug === productSlug && p.activated_here !== true && UNACTIVATED_STATUSES.includes(p.validation_status)); |
| 7211 |
|
| 7212 |
/** |
| 7213 |
* Returns the first license product for the given slug that the user owns but |
| 7214 |
* has not yet activated on this domain, or null when none exists. |
| 7215 |
* |
| 7216 |
* @since 1.0.1 |
| 7217 |
*/ |
| 7218 |
const getUnactivatedLicenseProduct = (state, productSlug) => getUnactivatedLicenseProducts(state, productSlug)[0] ?? null; |
| 7219 |
|
| 7220 |
/** |
| 7221 |
* Returns the stored unified license key, or null. Triggers getLicenseKey resolver. |
| 7222 |
* @param state |
| 7223 |
*/ |
| 7224 |
const getLicenseKey = state => state.license.license.key; |
| 7225 |
const hasLicense = state => state.license.license.key !== null; |
| 7226 |
const getLicenseProducts = state => getWithoutCancelledProducts(state).slice().sort((a, b) => (b.activated_here === true ? 1 : 0) - (a.activated_here === true ? 1 : 0)); |
| 7227 |
const getLicenseError = state => state.license.license.error; |
| 7228 |
const isLicenseStoring = state => state.license.isStoring; |
| 7229 |
const isLicenseDeleting = state => state.license.isDeleting; |
| 7230 |
const isLicenseRefreshing = state => state.license.isRefreshing; |
| 7231 |
const canModifyLicense = state => !state.license.isStoring && !state.license.isDeleting && !state.license.isRefreshing; |
| 7232 |
const getStoreLicenseError = state => state.license.storeError; |
| 7233 |
const getDeleteLicenseError = state => state.license.deleteError; |
| 7234 |
const getRefreshLicenseError = state => state.license.refreshError; |
| 7235 |
|
| 7236 |
/***/ }, |
| 7237 |
|
| 7238 |
/***/ "./resources/js/types/utils.ts" |
| 7239 |
/*!*************************************!*\ |
| 7240 |
!*** ./resources/js/types/utils.ts ***! |
| 7241 |
\*************************************/ |
| 7242 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7243 |
|
| 7244 |
__webpack_require__.r(__webpack_exports__); |
| 7245 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7246 |
/* harmony export */ isInstallableFeature: () => (/* binding */ isInstallableFeature), |
| 7247 |
/* harmony export */ isPluginFeature: () => (/* binding */ isPluginFeature), |
| 7248 |
/* harmony export */ isServiceFeature: () => (/* binding */ isServiceFeature), |
| 7249 |
/* harmony export */ isThemeFeature: () => (/* binding */ isThemeFeature) |
| 7250 |
/* harmony export */ }); |
| 7251 |
/** |
| 7252 |
* Type guard utilities for narrowing Feature union types. |
| 7253 |
* |
| 7254 |
* @package LiquidWeb\Harbor |
| 7255 |
*/ |
| 7256 |
|
| 7257 |
function isPluginFeature(feature) { |
| 7258 |
return feature.type === 'plugin'; |
| 7259 |
} |
| 7260 |
function isThemeFeature(feature) { |
| 7261 |
return feature.type === 'theme'; |
| 7262 |
} |
| 7263 |
function isServiceFeature(feature) { |
| 7264 |
return feature.type === 'service'; |
| 7265 |
} |
| 7266 |
function isInstallableFeature(feature) { |
| 7267 |
return feature.type === 'plugin' || feature.type === 'theme'; |
| 7268 |
} |
| 7269 |
|
| 7270 |
/***/ }, |
| 7271 |
|
| 7272 |
/***/ "./node_modules/get-nonce/dist/es2015/index.js" |
| 7273 |
/*!*****************************************************!*\ |
| 7274 |
!*** ./node_modules/get-nonce/dist/es2015/index.js ***! |
| 7275 |
\*****************************************************/ |
| 7276 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7277 |
|
| 7278 |
__webpack_require__.r(__webpack_exports__); |
| 7279 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7280 |
/* harmony export */ getNonce: () => (/* binding */ getNonce), |
| 7281 |
/* harmony export */ setNonce: () => (/* binding */ setNonce) |
| 7282 |
/* harmony export */ }); |
| 7283 |
var currentNonce; |
| 7284 |
var setNonce = function (nonce) { |
| 7285 |
currentNonce = nonce; |
| 7286 |
}; |
| 7287 |
var getNonce = function () { |
| 7288 |
if (currentNonce) { |
| 7289 |
return currentNonce; |
| 7290 |
} |
| 7291 |
if (true) { |
| 7292 |
return __webpack_require__.nc; |
| 7293 |
} |
| 7294 |
// removed by dead control flow |
| 7295 |
|
| 7296 |
}; |
| 7297 |
|
| 7298 |
|
| 7299 |
/***/ }, |
| 7300 |
|
| 7301 |
/***/ "./node_modules/lucide-react/dist/esm/Icon.js" |
| 7302 |
/*!****************************************************!*\ |
| 7303 |
!*** ./node_modules/lucide-react/dist/esm/Icon.js ***! |
| 7304 |
\****************************************************/ |
| 7305 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7306 |
|
| 7307 |
__webpack_require__.r(__webpack_exports__); |
| 7308 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7309 |
/* harmony export */ "default": () => (/* binding */ Icon) |
| 7310 |
/* harmony export */ }); |
| 7311 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 7312 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 7313 |
/* harmony import */ var _defaultAttributes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultAttributes.js */ "./node_modules/lucide-react/dist/esm/defaultAttributes.js"); |
| 7314 |
/* harmony import */ var _shared_src_utils_hasA11yProp_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shared/src/utils/hasA11yProp.js */ "./node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.js"); |
| 7315 |
/* harmony import */ var _shared_src_utils_mergeClasses_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shared/src/utils/mergeClasses.js */ "./node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js"); |
| 7316 |
/** |
| 7317 |
* @license lucide-react v0.575.0 - ISC |
| 7318 |
* |
| 7319 |
* This source code is licensed under the ISC license. |
| 7320 |
* See the LICENSE file in the root directory of this source tree. |
| 7321 |
*/ |
| 7322 |
|
| 7323 |
|
| 7324 |
|
| 7325 |
|
| 7326 |
|
| 7327 |
|
| 7328 |
const Icon = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)( |
| 7329 |
({ |
| 7330 |
color = "currentColor", |
| 7331 |
size = 24, |
| 7332 |
strokeWidth = 2, |
| 7333 |
absoluteStrokeWidth, |
| 7334 |
className = "", |
| 7335 |
children, |
| 7336 |
iconNode, |
| 7337 |
...rest |
| 7338 |
}, ref) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)( |
| 7339 |
"svg", |
| 7340 |
{ |
| 7341 |
ref, |
| 7342 |
..._defaultAttributes_js__WEBPACK_IMPORTED_MODULE_1__["default"], |
| 7343 |
width: size, |
| 7344 |
height: size, |
| 7345 |
stroke: color, |
| 7346 |
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth, |
| 7347 |
className: (0,_shared_src_utils_mergeClasses_js__WEBPACK_IMPORTED_MODULE_3__.mergeClasses)("lucide", className), |
| 7348 |
...!children && !(0,_shared_src_utils_hasA11yProp_js__WEBPACK_IMPORTED_MODULE_2__.hasA11yProp)(rest) && { "aria-hidden": "true" }, |
| 7349 |
...rest |
| 7350 |
}, |
| 7351 |
[ |
| 7352 |
...iconNode.map(([tag, attrs]) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(tag, attrs)), |
| 7353 |
...Array.isArray(children) ? children : [children] |
| 7354 |
] |
| 7355 |
) |
| 7356 |
); |
| 7357 |
|
| 7358 |
|
| 7359 |
//# sourceMappingURL=Icon.js.map |
| 7360 |
|
| 7361 |
|
| 7362 |
/***/ }, |
| 7363 |
|
| 7364 |
/***/ "./node_modules/lucide-react/dist/esm/createLucideIcon.js" |
| 7365 |
/*!****************************************************************!*\ |
| 7366 |
!*** ./node_modules/lucide-react/dist/esm/createLucideIcon.js ***! |
| 7367 |
\****************************************************************/ |
| 7368 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7369 |
|
| 7370 |
__webpack_require__.r(__webpack_exports__); |
| 7371 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7372 |
/* harmony export */ "default": () => (/* binding */ createLucideIcon) |
| 7373 |
/* harmony export */ }); |
| 7374 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 7375 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 7376 |
/* harmony import */ var _shared_src_utils_mergeClasses_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./shared/src/utils/mergeClasses.js */ "./node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js"); |
| 7377 |
/* harmony import */ var _shared_src_utils_toKebabCase_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shared/src/utils/toKebabCase.js */ "./node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js"); |
| 7378 |
/* harmony import */ var _shared_src_utils_toPascalCase_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shared/src/utils/toPascalCase.js */ "./node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js"); |
| 7379 |
/* harmony import */ var _Icon_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Icon.js */ "./node_modules/lucide-react/dist/esm/Icon.js"); |
| 7380 |
/** |
| 7381 |
* @license lucide-react v0.575.0 - ISC |
| 7382 |
* |
| 7383 |
* This source code is licensed under the ISC license. |
| 7384 |
* See the LICENSE file in the root directory of this source tree. |
| 7385 |
*/ |
| 7386 |
|
| 7387 |
|
| 7388 |
|
| 7389 |
|
| 7390 |
|
| 7391 |
|
| 7392 |
|
| 7393 |
const createLucideIcon = (iconName, iconNode) => { |
| 7394 |
const Component = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)( |
| 7395 |
({ className, ...props }, ref) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Icon_js__WEBPACK_IMPORTED_MODULE_4__["default"], { |
| 7396 |
ref, |
| 7397 |
iconNode, |
| 7398 |
className: (0,_shared_src_utils_mergeClasses_js__WEBPACK_IMPORTED_MODULE_1__.mergeClasses)( |
| 7399 |
`lucide-${(0,_shared_src_utils_toKebabCase_js__WEBPACK_IMPORTED_MODULE_2__.toKebabCase)((0,_shared_src_utils_toPascalCase_js__WEBPACK_IMPORTED_MODULE_3__.toPascalCase)(iconName))}`, |
| 7400 |
`lucide-${iconName}`, |
| 7401 |
className |
| 7402 |
), |
| 7403 |
...props |
| 7404 |
}) |
| 7405 |
); |
| 7406 |
Component.displayName = (0,_shared_src_utils_toPascalCase_js__WEBPACK_IMPORTED_MODULE_3__.toPascalCase)(iconName); |
| 7407 |
return Component; |
| 7408 |
}; |
| 7409 |
|
| 7410 |
|
| 7411 |
//# sourceMappingURL=createLucideIcon.js.map |
| 7412 |
|
| 7413 |
|
| 7414 |
/***/ }, |
| 7415 |
|
| 7416 |
/***/ "./node_modules/lucide-react/dist/esm/defaultAttributes.js" |
| 7417 |
/*!*****************************************************************!*\ |
| 7418 |
!*** ./node_modules/lucide-react/dist/esm/defaultAttributes.js ***! |
| 7419 |
\*****************************************************************/ |
| 7420 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7421 |
|
| 7422 |
__webpack_require__.r(__webpack_exports__); |
| 7423 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7424 |
/* harmony export */ "default": () => (/* binding */ defaultAttributes) |
| 7425 |
/* harmony export */ }); |
| 7426 |
/** |
| 7427 |
* @license lucide-react v0.575.0 - ISC |
| 7428 |
* |
| 7429 |
* This source code is licensed under the ISC license. |
| 7430 |
* See the LICENSE file in the root directory of this source tree. |
| 7431 |
*/ |
| 7432 |
|
| 7433 |
var defaultAttributes = { |
| 7434 |
xmlns: "http://www.w3.org/2000/svg", |
| 7435 |
width: 24, |
| 7436 |
height: 24, |
| 7437 |
viewBox: "0 0 24 24", |
| 7438 |
fill: "none", |
| 7439 |
stroke: "currentColor", |
| 7440 |
strokeWidth: 2, |
| 7441 |
strokeLinecap: "round", |
| 7442 |
strokeLinejoin: "round" |
| 7443 |
}; |
| 7444 |
|
| 7445 |
|
| 7446 |
//# sourceMappingURL=defaultAttributes.js.map |
| 7447 |
|
| 7448 |
|
| 7449 |
/***/ }, |
| 7450 |
|
| 7451 |
/***/ "./node_modules/lucide-react/dist/esm/icons/check.js" |
| 7452 |
/*!***********************************************************!*\ |
| 7453 |
!*** ./node_modules/lucide-react/dist/esm/icons/check.js ***! |
| 7454 |
\***********************************************************/ |
| 7455 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7456 |
|
| 7457 |
__webpack_require__.r(__webpack_exports__); |
| 7458 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7459 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7460 |
/* harmony export */ "default": () => (/* binding */ Check) |
| 7461 |
/* harmony export */ }); |
| 7462 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7463 |
/** |
| 7464 |
* @license lucide-react v0.575.0 - ISC |
| 7465 |
* |
| 7466 |
* This source code is licensed under the ISC license. |
| 7467 |
* See the LICENSE file in the root directory of this source tree. |
| 7468 |
*/ |
| 7469 |
|
| 7470 |
|
| 7471 |
|
| 7472 |
const __iconNode = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]; |
| 7473 |
const Check = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("check", __iconNode); |
| 7474 |
|
| 7475 |
|
| 7476 |
//# sourceMappingURL=check.js.map |
| 7477 |
|
| 7478 |
|
| 7479 |
/***/ }, |
| 7480 |
|
| 7481 |
/***/ "./node_modules/lucide-react/dist/esm/icons/chevron-down.js" |
| 7482 |
/*!******************************************************************!*\ |
| 7483 |
!*** ./node_modules/lucide-react/dist/esm/icons/chevron-down.js ***! |
| 7484 |
\******************************************************************/ |
| 7485 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7486 |
|
| 7487 |
__webpack_require__.r(__webpack_exports__); |
| 7488 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7489 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7490 |
/* harmony export */ "default": () => (/* binding */ ChevronDown) |
| 7491 |
/* harmony export */ }); |
| 7492 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7493 |
/** |
| 7494 |
* @license lucide-react v0.575.0 - ISC |
| 7495 |
* |
| 7496 |
* This source code is licensed under the ISC license. |
| 7497 |
* See the LICENSE file in the root directory of this source tree. |
| 7498 |
*/ |
| 7499 |
|
| 7500 |
|
| 7501 |
|
| 7502 |
const __iconNode = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]]; |
| 7503 |
const ChevronDown = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("chevron-down", __iconNode); |
| 7504 |
|
| 7505 |
|
| 7506 |
//# sourceMappingURL=chevron-down.js.map |
| 7507 |
|
| 7508 |
|
| 7509 |
/***/ }, |
| 7510 |
|
| 7511 |
/***/ "./node_modules/lucide-react/dist/esm/icons/chevron-right.js" |
| 7512 |
/*!*******************************************************************!*\ |
| 7513 |
!*** ./node_modules/lucide-react/dist/esm/icons/chevron-right.js ***! |
| 7514 |
\*******************************************************************/ |
| 7515 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7516 |
|
| 7517 |
__webpack_require__.r(__webpack_exports__); |
| 7518 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7519 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7520 |
/* harmony export */ "default": () => (/* binding */ ChevronRight) |
| 7521 |
/* harmony export */ }); |
| 7522 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7523 |
/** |
| 7524 |
* @license lucide-react v0.575.0 - ISC |
| 7525 |
* |
| 7526 |
* This source code is licensed under the ISC license. |
| 7527 |
* See the LICENSE file in the root directory of this source tree. |
| 7528 |
*/ |
| 7529 |
|
| 7530 |
|
| 7531 |
|
| 7532 |
const __iconNode = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]]; |
| 7533 |
const ChevronRight = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("chevron-right", __iconNode); |
| 7534 |
|
| 7535 |
|
| 7536 |
//# sourceMappingURL=chevron-right.js.map |
| 7537 |
|
| 7538 |
|
| 7539 |
/***/ }, |
| 7540 |
|
| 7541 |
/***/ "./node_modules/lucide-react/dist/esm/icons/chevron-up.js" |
| 7542 |
/*!****************************************************************!*\ |
| 7543 |
!*** ./node_modules/lucide-react/dist/esm/icons/chevron-up.js ***! |
| 7544 |
\****************************************************************/ |
| 7545 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7546 |
|
| 7547 |
__webpack_require__.r(__webpack_exports__); |
| 7548 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7549 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7550 |
/* harmony export */ "default": () => (/* binding */ ChevronUp) |
| 7551 |
/* harmony export */ }); |
| 7552 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7553 |
/** |
| 7554 |
* @license lucide-react v0.575.0 - ISC |
| 7555 |
* |
| 7556 |
* This source code is licensed under the ISC license. |
| 7557 |
* See the LICENSE file in the root directory of this source tree. |
| 7558 |
*/ |
| 7559 |
|
| 7560 |
|
| 7561 |
|
| 7562 |
const __iconNode = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]; |
| 7563 |
const ChevronUp = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("chevron-up", __iconNode); |
| 7564 |
|
| 7565 |
|
| 7566 |
//# sourceMappingURL=chevron-up.js.map |
| 7567 |
|
| 7568 |
|
| 7569 |
/***/ }, |
| 7570 |
|
| 7571 |
/***/ "./node_modules/lucide-react/dist/esm/icons/circle-check-big.js" |
| 7572 |
/*!**********************************************************************!*\ |
| 7573 |
!*** ./node_modules/lucide-react/dist/esm/icons/circle-check-big.js ***! |
| 7574 |
\**********************************************************************/ |
| 7575 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7576 |
|
| 7577 |
__webpack_require__.r(__webpack_exports__); |
| 7578 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7579 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7580 |
/* harmony export */ "default": () => (/* binding */ CircleCheckBig) |
| 7581 |
/* harmony export */ }); |
| 7582 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7583 |
/** |
| 7584 |
* @license lucide-react v0.575.0 - ISC |
| 7585 |
* |
| 7586 |
* This source code is licensed under the ISC license. |
| 7587 |
* See the LICENSE file in the root directory of this source tree. |
| 7588 |
*/ |
| 7589 |
|
| 7590 |
|
| 7591 |
|
| 7592 |
const __iconNode = [ |
| 7593 |
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }], |
| 7594 |
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }] |
| 7595 |
]; |
| 7596 |
const CircleCheckBig = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("circle-check-big", __iconNode); |
| 7597 |
|
| 7598 |
|
| 7599 |
//# sourceMappingURL=circle-check-big.js.map |
| 7600 |
|
| 7601 |
|
| 7602 |
/***/ }, |
| 7603 |
|
| 7604 |
/***/ "./node_modules/lucide-react/dist/esm/icons/download.js" |
| 7605 |
/*!**************************************************************!*\ |
| 7606 |
!*** ./node_modules/lucide-react/dist/esm/icons/download.js ***! |
| 7607 |
\**************************************************************/ |
| 7608 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7609 |
|
| 7610 |
__webpack_require__.r(__webpack_exports__); |
| 7611 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7612 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7613 |
/* harmony export */ "default": () => (/* binding */ Download) |
| 7614 |
/* harmony export */ }); |
| 7615 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7616 |
/** |
| 7617 |
* @license lucide-react v0.575.0 - ISC |
| 7618 |
* |
| 7619 |
* This source code is licensed under the ISC license. |
| 7620 |
* See the LICENSE file in the root directory of this source tree. |
| 7621 |
*/ |
| 7622 |
|
| 7623 |
|
| 7624 |
|
| 7625 |
const __iconNode = [ |
| 7626 |
["path", { d: "M12 15V3", key: "m9g1x1" }], |
| 7627 |
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }], |
| 7628 |
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }] |
| 7629 |
]; |
| 7630 |
const Download = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("download", __iconNode); |
| 7631 |
|
| 7632 |
|
| 7633 |
//# sourceMappingURL=download.js.map |
| 7634 |
|
| 7635 |
|
| 7636 |
/***/ }, |
| 7637 |
|
| 7638 |
/***/ "./node_modules/lucide-react/dist/esm/icons/external-link.js" |
| 7639 |
/*!*******************************************************************!*\ |
| 7640 |
!*** ./node_modules/lucide-react/dist/esm/icons/external-link.js ***! |
| 7641 |
\*******************************************************************/ |
| 7642 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7643 |
|
| 7644 |
__webpack_require__.r(__webpack_exports__); |
| 7645 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7646 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7647 |
/* harmony export */ "default": () => (/* binding */ ExternalLink) |
| 7648 |
/* harmony export */ }); |
| 7649 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7650 |
/** |
| 7651 |
* @license lucide-react v0.575.0 - ISC |
| 7652 |
* |
| 7653 |
* This source code is licensed under the ISC license. |
| 7654 |
* See the LICENSE file in the root directory of this source tree. |
| 7655 |
*/ |
| 7656 |
|
| 7657 |
|
| 7658 |
|
| 7659 |
const __iconNode = [ |
| 7660 |
["path", { d: "M15 3h6v6", key: "1q9fwt" }], |
| 7661 |
["path", { d: "M10 14 21 3", key: "gplh6r" }], |
| 7662 |
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }] |
| 7663 |
]; |
| 7664 |
const ExternalLink = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("external-link", __iconNode); |
| 7665 |
|
| 7666 |
|
| 7667 |
//# sourceMappingURL=external-link.js.map |
| 7668 |
|
| 7669 |
|
| 7670 |
/***/ }, |
| 7671 |
|
| 7672 |
/***/ "./node_modules/lucide-react/dist/esm/icons/info.js" |
| 7673 |
/*!**********************************************************!*\ |
| 7674 |
!*** ./node_modules/lucide-react/dist/esm/icons/info.js ***! |
| 7675 |
\**********************************************************/ |
| 7676 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7677 |
|
| 7678 |
__webpack_require__.r(__webpack_exports__); |
| 7679 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7680 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7681 |
/* harmony export */ "default": () => (/* binding */ Info) |
| 7682 |
/* harmony export */ }); |
| 7683 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7684 |
/** |
| 7685 |
* @license lucide-react v0.575.0 - ISC |
| 7686 |
* |
| 7687 |
* This source code is licensed under the ISC license. |
| 7688 |
* See the LICENSE file in the root directory of this source tree. |
| 7689 |
*/ |
| 7690 |
|
| 7691 |
|
| 7692 |
|
| 7693 |
const __iconNode = [ |
| 7694 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 7695 |
["path", { d: "M12 16v-4", key: "1dtifu" }], |
| 7696 |
["path", { d: "M12 8h.01", key: "e9boi3" }] |
| 7697 |
]; |
| 7698 |
const Info = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("info", __iconNode); |
| 7699 |
|
| 7700 |
|
| 7701 |
//# sourceMappingURL=info.js.map |
| 7702 |
|
| 7703 |
|
| 7704 |
/***/ }, |
| 7705 |
|
| 7706 |
/***/ "./node_modules/lucide-react/dist/esm/icons/key-round.js" |
| 7707 |
/*!***************************************************************!*\ |
| 7708 |
!*** ./node_modules/lucide-react/dist/esm/icons/key-round.js ***! |
| 7709 |
\***************************************************************/ |
| 7710 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7711 |
|
| 7712 |
__webpack_require__.r(__webpack_exports__); |
| 7713 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7714 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7715 |
/* harmony export */ "default": () => (/* binding */ KeyRound) |
| 7716 |
/* harmony export */ }); |
| 7717 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7718 |
/** |
| 7719 |
* @license lucide-react v0.575.0 - ISC |
| 7720 |
* |
| 7721 |
* This source code is licensed under the ISC license. |
| 7722 |
* See the LICENSE file in the root directory of this source tree. |
| 7723 |
*/ |
| 7724 |
|
| 7725 |
|
| 7726 |
|
| 7727 |
const __iconNode = [ |
| 7728 |
[ |
| 7729 |
"path", |
| 7730 |
{ |
| 7731 |
d: "M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z", |
| 7732 |
key: "1s6t7t" |
| 7733 |
} |
| 7734 |
], |
| 7735 |
["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor", key: "w0ekpg" }] |
| 7736 |
]; |
| 7737 |
const KeyRound = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("key-round", __iconNode); |
| 7738 |
|
| 7739 |
|
| 7740 |
//# sourceMappingURL=key-round.js.map |
| 7741 |
|
| 7742 |
|
| 7743 |
/***/ }, |
| 7744 |
|
| 7745 |
/***/ "./node_modules/lucide-react/dist/esm/icons/loader-circle.js" |
| 7746 |
/*!*******************************************************************!*\ |
| 7747 |
!*** ./node_modules/lucide-react/dist/esm/icons/loader-circle.js ***! |
| 7748 |
\*******************************************************************/ |
| 7749 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7750 |
|
| 7751 |
__webpack_require__.r(__webpack_exports__); |
| 7752 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7753 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7754 |
/* harmony export */ "default": () => (/* binding */ LoaderCircle) |
| 7755 |
/* harmony export */ }); |
| 7756 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7757 |
/** |
| 7758 |
* @license lucide-react v0.575.0 - ISC |
| 7759 |
* |
| 7760 |
* This source code is licensed under the ISC license. |
| 7761 |
* See the LICENSE file in the root directory of this source tree. |
| 7762 |
*/ |
| 7763 |
|
| 7764 |
|
| 7765 |
|
| 7766 |
const __iconNode = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]]; |
| 7767 |
const LoaderCircle = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("loader-circle", __iconNode); |
| 7768 |
|
| 7769 |
|
| 7770 |
//# sourceMappingURL=loader-circle.js.map |
| 7771 |
|
| 7772 |
|
| 7773 |
/***/ }, |
| 7774 |
|
| 7775 |
/***/ "./node_modules/lucide-react/dist/esm/icons/lock.js" |
| 7776 |
/*!**********************************************************!*\ |
| 7777 |
!*** ./node_modules/lucide-react/dist/esm/icons/lock.js ***! |
| 7778 |
\**********************************************************/ |
| 7779 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7780 |
|
| 7781 |
__webpack_require__.r(__webpack_exports__); |
| 7782 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7783 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7784 |
/* harmony export */ "default": () => (/* binding */ Lock) |
| 7785 |
/* harmony export */ }); |
| 7786 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7787 |
/** |
| 7788 |
* @license lucide-react v0.575.0 - ISC |
| 7789 |
* |
| 7790 |
* This source code is licensed under the ISC license. |
| 7791 |
* See the LICENSE file in the root directory of this source tree. |
| 7792 |
*/ |
| 7793 |
|
| 7794 |
|
| 7795 |
|
| 7796 |
const __iconNode = [ |
| 7797 |
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }], |
| 7798 |
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }] |
| 7799 |
]; |
| 7800 |
const Lock = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("lock", __iconNode); |
| 7801 |
|
| 7802 |
|
| 7803 |
//# sourceMappingURL=lock.js.map |
| 7804 |
|
| 7805 |
|
| 7806 |
/***/ }, |
| 7807 |
|
| 7808 |
/***/ "./node_modules/lucide-react/dist/esm/icons/mail.js" |
| 7809 |
/*!**********************************************************!*\ |
| 7810 |
!*** ./node_modules/lucide-react/dist/esm/icons/mail.js ***! |
| 7811 |
\**********************************************************/ |
| 7812 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7813 |
|
| 7814 |
__webpack_require__.r(__webpack_exports__); |
| 7815 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7816 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7817 |
/* harmony export */ "default": () => (/* binding */ Mail) |
| 7818 |
/* harmony export */ }); |
| 7819 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7820 |
/** |
| 7821 |
* @license lucide-react v0.575.0 - ISC |
| 7822 |
* |
| 7823 |
* This source code is licensed under the ISC license. |
| 7824 |
* See the LICENSE file in the root directory of this source tree. |
| 7825 |
*/ |
| 7826 |
|
| 7827 |
|
| 7828 |
|
| 7829 |
const __iconNode = [ |
| 7830 |
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }], |
| 7831 |
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }] |
| 7832 |
]; |
| 7833 |
const Mail = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("mail", __iconNode); |
| 7834 |
|
| 7835 |
|
| 7836 |
//# sourceMappingURL=mail.js.map |
| 7837 |
|
| 7838 |
|
| 7839 |
/***/ }, |
| 7840 |
|
| 7841 |
/***/ "./node_modules/lucide-react/dist/esm/icons/pencil.js" |
| 7842 |
/*!************************************************************!*\ |
| 7843 |
!*** ./node_modules/lucide-react/dist/esm/icons/pencil.js ***! |
| 7844 |
\************************************************************/ |
| 7845 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7846 |
|
| 7847 |
__webpack_require__.r(__webpack_exports__); |
| 7848 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7849 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7850 |
/* harmony export */ "default": () => (/* binding */ Pencil) |
| 7851 |
/* harmony export */ }); |
| 7852 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7853 |
/** |
| 7854 |
* @license lucide-react v0.575.0 - ISC |
| 7855 |
* |
| 7856 |
* This source code is licensed under the ISC license. |
| 7857 |
* See the LICENSE file in the root directory of this source tree. |
| 7858 |
*/ |
| 7859 |
|
| 7860 |
|
| 7861 |
|
| 7862 |
const __iconNode = [ |
| 7863 |
[ |
| 7864 |
"path", |
| 7865 |
{ |
| 7866 |
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z", |
| 7867 |
key: "1a8usu" |
| 7868 |
} |
| 7869 |
], |
| 7870 |
["path", { d: "m15 5 4 4", key: "1mk7zo" }] |
| 7871 |
]; |
| 7872 |
const Pencil = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("pencil", __iconNode); |
| 7873 |
|
| 7874 |
|
| 7875 |
//# sourceMappingURL=pencil.js.map |
| 7876 |
|
| 7877 |
|
| 7878 |
/***/ }, |
| 7879 |
|
| 7880 |
/***/ "./node_modules/lucide-react/dist/esm/icons/refresh-cw.js" |
| 7881 |
/*!****************************************************************!*\ |
| 7882 |
!*** ./node_modules/lucide-react/dist/esm/icons/refresh-cw.js ***! |
| 7883 |
\****************************************************************/ |
| 7884 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7885 |
|
| 7886 |
__webpack_require__.r(__webpack_exports__); |
| 7887 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7888 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7889 |
/* harmony export */ "default": () => (/* binding */ RefreshCw) |
| 7890 |
/* harmony export */ }); |
| 7891 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7892 |
/** |
| 7893 |
* @license lucide-react v0.575.0 - ISC |
| 7894 |
* |
| 7895 |
* This source code is licensed under the ISC license. |
| 7896 |
* See the LICENSE file in the root directory of this source tree. |
| 7897 |
*/ |
| 7898 |
|
| 7899 |
|
| 7900 |
|
| 7901 |
const __iconNode = [ |
| 7902 |
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }], |
| 7903 |
["path", { d: "M21 3v5h-5", key: "1q7to0" }], |
| 7904 |
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }], |
| 7905 |
["path", { d: "M8 16H3v5", key: "1cv678" }] |
| 7906 |
]; |
| 7907 |
const RefreshCw = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("refresh-cw", __iconNode); |
| 7908 |
|
| 7909 |
|
| 7910 |
//# sourceMappingURL=refresh-cw.js.map |
| 7911 |
|
| 7912 |
|
| 7913 |
/***/ }, |
| 7914 |
|
| 7915 |
/***/ "./node_modules/lucide-react/dist/esm/icons/rocket.js" |
| 7916 |
/*!************************************************************!*\ |
| 7917 |
!*** ./node_modules/lucide-react/dist/esm/icons/rocket.js ***! |
| 7918 |
\************************************************************/ |
| 7919 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7920 |
|
| 7921 |
__webpack_require__.r(__webpack_exports__); |
| 7922 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7923 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7924 |
/* harmony export */ "default": () => (/* binding */ Rocket) |
| 7925 |
/* harmony export */ }); |
| 7926 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7927 |
/** |
| 7928 |
* @license lucide-react v0.575.0 - ISC |
| 7929 |
* |
| 7930 |
* This source code is licensed under the ISC license. |
| 7931 |
* See the LICENSE file in the root directory of this source tree. |
| 7932 |
*/ |
| 7933 |
|
| 7934 |
|
| 7935 |
|
| 7936 |
const __iconNode = [ |
| 7937 |
["path", { d: "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5", key: "qeys4" }], |
| 7938 |
[ |
| 7939 |
"path", |
| 7940 |
{ |
| 7941 |
d: "M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09", |
| 7942 |
key: "u4xsad" |
| 7943 |
} |
| 7944 |
], |
| 7945 |
[ |
| 7946 |
"path", |
| 7947 |
{ |
| 7948 |
d: "M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z", |
| 7949 |
key: "676m9" |
| 7950 |
} |
| 7951 |
], |
| 7952 |
["path", { d: "M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05", key: "92ym6u" }] |
| 7953 |
]; |
| 7954 |
const Rocket = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("rocket", __iconNode); |
| 7955 |
|
| 7956 |
|
| 7957 |
//# sourceMappingURL=rocket.js.map |
| 7958 |
|
| 7959 |
|
| 7960 |
/***/ }, |
| 7961 |
|
| 7962 |
/***/ "./node_modules/lucide-react/dist/esm/icons/search.js" |
| 7963 |
/*!************************************************************!*\ |
| 7964 |
!*** ./node_modules/lucide-react/dist/esm/icons/search.js ***! |
| 7965 |
\************************************************************/ |
| 7966 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 7967 |
|
| 7968 |
__webpack_require__.r(__webpack_exports__); |
| 7969 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 7970 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 7971 |
/* harmony export */ "default": () => (/* binding */ Search) |
| 7972 |
/* harmony export */ }); |
| 7973 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 7974 |
/** |
| 7975 |
* @license lucide-react v0.575.0 - ISC |
| 7976 |
* |
| 7977 |
* This source code is licensed under the ISC license. |
| 7978 |
* See the LICENSE file in the root directory of this source tree. |
| 7979 |
*/ |
| 7980 |
|
| 7981 |
|
| 7982 |
|
| 7983 |
const __iconNode = [ |
| 7984 |
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }], |
| 7985 |
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }] |
| 7986 |
]; |
| 7987 |
const Search = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("search", __iconNode); |
| 7988 |
|
| 7989 |
|
| 7990 |
//# sourceMappingURL=search.js.map |
| 7991 |
|
| 7992 |
|
| 7993 |
/***/ }, |
| 7994 |
|
| 7995 |
/***/ "./node_modules/lucide-react/dist/esm/icons/trash-2.js" |
| 7996 |
/*!*************************************************************!*\ |
| 7997 |
!*** ./node_modules/lucide-react/dist/esm/icons/trash-2.js ***! |
| 7998 |
\*************************************************************/ |
| 7999 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8000 |
|
| 8001 |
__webpack_require__.r(__webpack_exports__); |
| 8002 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8003 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 8004 |
/* harmony export */ "default": () => (/* binding */ Trash2) |
| 8005 |
/* harmony export */ }); |
| 8006 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 8007 |
/** |
| 8008 |
* @license lucide-react v0.575.0 - ISC |
| 8009 |
* |
| 8010 |
* This source code is licensed under the ISC license. |
| 8011 |
* See the LICENSE file in the root directory of this source tree. |
| 8012 |
*/ |
| 8013 |
|
| 8014 |
|
| 8015 |
|
| 8016 |
const __iconNode = [ |
| 8017 |
["path", { d: "M10 11v6", key: "nco0om" }], |
| 8018 |
["path", { d: "M14 11v6", key: "outv1u" }], |
| 8019 |
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }], |
| 8020 |
["path", { d: "M3 6h18", key: "d0wm0j" }], |
| 8021 |
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }] |
| 8022 |
]; |
| 8023 |
const Trash2 = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("trash-2", __iconNode); |
| 8024 |
|
| 8025 |
|
| 8026 |
//# sourceMappingURL=trash-2.js.map |
| 8027 |
|
| 8028 |
|
| 8029 |
/***/ }, |
| 8030 |
|
| 8031 |
/***/ "./node_modules/lucide-react/dist/esm/icons/triangle-alert.js" |
| 8032 |
/*!********************************************************************!*\ |
| 8033 |
!*** ./node_modules/lucide-react/dist/esm/icons/triangle-alert.js ***! |
| 8034 |
\********************************************************************/ |
| 8035 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8036 |
|
| 8037 |
__webpack_require__.r(__webpack_exports__); |
| 8038 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8039 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 8040 |
/* harmony export */ "default": () => (/* binding */ TriangleAlert) |
| 8041 |
/* harmony export */ }); |
| 8042 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 8043 |
/** |
| 8044 |
* @license lucide-react v0.575.0 - ISC |
| 8045 |
* |
| 8046 |
* This source code is licensed under the ISC license. |
| 8047 |
* See the LICENSE file in the root directory of this source tree. |
| 8048 |
*/ |
| 8049 |
|
| 8050 |
|
| 8051 |
|
| 8052 |
const __iconNode = [ |
| 8053 |
[ |
| 8054 |
"path", |
| 8055 |
{ |
| 8056 |
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3", |
| 8057 |
key: "wmoenq" |
| 8058 |
} |
| 8059 |
], |
| 8060 |
["path", { d: "M12 9v4", key: "juzpu7" }], |
| 8061 |
["path", { d: "M12 17h.01", key: "p32p05" }] |
| 8062 |
]; |
| 8063 |
const TriangleAlert = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("triangle-alert", __iconNode); |
| 8064 |
|
| 8065 |
|
| 8066 |
//# sourceMappingURL=triangle-alert.js.map |
| 8067 |
|
| 8068 |
|
| 8069 |
/***/ }, |
| 8070 |
|
| 8071 |
/***/ "./node_modules/lucide-react/dist/esm/icons/x.js" |
| 8072 |
/*!*******************************************************!*\ |
| 8073 |
!*** ./node_modules/lucide-react/dist/esm/icons/x.js ***! |
| 8074 |
\*******************************************************/ |
| 8075 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8076 |
|
| 8077 |
__webpack_require__.r(__webpack_exports__); |
| 8078 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8079 |
/* harmony export */ __iconNode: () => (/* binding */ __iconNode), |
| 8080 |
/* harmony export */ "default": () => (/* binding */ X) |
| 8081 |
/* harmony export */ }); |
| 8082 |
/* harmony import */ var _createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLucideIcon.js */ "./node_modules/lucide-react/dist/esm/createLucideIcon.js"); |
| 8083 |
/** |
| 8084 |
* @license lucide-react v0.575.0 - ISC |
| 8085 |
* |
| 8086 |
* This source code is licensed under the ISC license. |
| 8087 |
* See the LICENSE file in the root directory of this source tree. |
| 8088 |
*/ |
| 8089 |
|
| 8090 |
|
| 8091 |
|
| 8092 |
const __iconNode = [ |
| 8093 |
["path", { d: "M18 6 6 18", key: "1bl5f8" }], |
| 8094 |
["path", { d: "m6 6 12 12", key: "d8bk6v" }] |
| 8095 |
]; |
| 8096 |
const X = (0,_createLucideIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])("x", __iconNode); |
| 8097 |
|
| 8098 |
|
| 8099 |
//# sourceMappingURL=x.js.map |
| 8100 |
|
| 8101 |
|
| 8102 |
/***/ }, |
| 8103 |
|
| 8104 |
/***/ "./node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.js" |
| 8105 |
/*!****************************************************************************!*\ |
| 8106 |
!*** ./node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.js ***! |
| 8107 |
\****************************************************************************/ |
| 8108 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8109 |
|
| 8110 |
__webpack_require__.r(__webpack_exports__); |
| 8111 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8112 |
/* harmony export */ hasA11yProp: () => (/* binding */ hasA11yProp) |
| 8113 |
/* harmony export */ }); |
| 8114 |
/** |
| 8115 |
* @license lucide-react v0.575.0 - ISC |
| 8116 |
* |
| 8117 |
* This source code is licensed under the ISC license. |
| 8118 |
* See the LICENSE file in the root directory of this source tree. |
| 8119 |
*/ |
| 8120 |
|
| 8121 |
const hasA11yProp = (props) => { |
| 8122 |
for (const prop in props) { |
| 8123 |
if (prop.startsWith("aria-") || prop === "role" || prop === "title") { |
| 8124 |
return true; |
| 8125 |
} |
| 8126 |
} |
| 8127 |
return false; |
| 8128 |
}; |
| 8129 |
|
| 8130 |
|
| 8131 |
//# sourceMappingURL=hasA11yProp.js.map |
| 8132 |
|
| 8133 |
|
| 8134 |
/***/ }, |
| 8135 |
|
| 8136 |
/***/ "./node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js" |
| 8137 |
/*!*****************************************************************************!*\ |
| 8138 |
!*** ./node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js ***! |
| 8139 |
\*****************************************************************************/ |
| 8140 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8141 |
|
| 8142 |
__webpack_require__.r(__webpack_exports__); |
| 8143 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8144 |
/* harmony export */ mergeClasses: () => (/* binding */ mergeClasses) |
| 8145 |
/* harmony export */ }); |
| 8146 |
/** |
| 8147 |
* @license lucide-react v0.575.0 - ISC |
| 8148 |
* |
| 8149 |
* This source code is licensed under the ISC license. |
| 8150 |
* See the LICENSE file in the root directory of this source tree. |
| 8151 |
*/ |
| 8152 |
|
| 8153 |
const mergeClasses = (...classes) => classes.filter((className, index, array) => { |
| 8154 |
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index; |
| 8155 |
}).join(" ").trim(); |
| 8156 |
|
| 8157 |
|
| 8158 |
//# sourceMappingURL=mergeClasses.js.map |
| 8159 |
|
| 8160 |
|
| 8161 |
/***/ }, |
| 8162 |
|
| 8163 |
/***/ "./node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js" |
| 8164 |
/*!****************************************************************************!*\ |
| 8165 |
!*** ./node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js ***! |
| 8166 |
\****************************************************************************/ |
| 8167 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8168 |
|
| 8169 |
__webpack_require__.r(__webpack_exports__); |
| 8170 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8171 |
/* harmony export */ toCamelCase: () => (/* binding */ toCamelCase) |
| 8172 |
/* harmony export */ }); |
| 8173 |
/** |
| 8174 |
* @license lucide-react v0.575.0 - ISC |
| 8175 |
* |
| 8176 |
* This source code is licensed under the ISC license. |
| 8177 |
* See the LICENSE file in the root directory of this source tree. |
| 8178 |
*/ |
| 8179 |
|
| 8180 |
const toCamelCase = (string) => string.replace( |
| 8181 |
/^([A-Z])|[\s-_]+(\w)/g, |
| 8182 |
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase() |
| 8183 |
); |
| 8184 |
|
| 8185 |
|
| 8186 |
//# sourceMappingURL=toCamelCase.js.map |
| 8187 |
|
| 8188 |
|
| 8189 |
/***/ }, |
| 8190 |
|
| 8191 |
/***/ "./node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js" |
| 8192 |
/*!****************************************************************************!*\ |
| 8193 |
!*** ./node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js ***! |
| 8194 |
\****************************************************************************/ |
| 8195 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8196 |
|
| 8197 |
__webpack_require__.r(__webpack_exports__); |
| 8198 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8199 |
/* harmony export */ toKebabCase: () => (/* binding */ toKebabCase) |
| 8200 |
/* harmony export */ }); |
| 8201 |
/** |
| 8202 |
* @license lucide-react v0.575.0 - ISC |
| 8203 |
* |
| 8204 |
* This source code is licensed under the ISC license. |
| 8205 |
* See the LICENSE file in the root directory of this source tree. |
| 8206 |
*/ |
| 8207 |
|
| 8208 |
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(); |
| 8209 |
|
| 8210 |
|
| 8211 |
//# sourceMappingURL=toKebabCase.js.map |
| 8212 |
|
| 8213 |
|
| 8214 |
/***/ }, |
| 8215 |
|
| 8216 |
/***/ "./node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js" |
| 8217 |
/*!*****************************************************************************!*\ |
| 8218 |
!*** ./node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js ***! |
| 8219 |
\*****************************************************************************/ |
| 8220 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8221 |
|
| 8222 |
__webpack_require__.r(__webpack_exports__); |
| 8223 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8224 |
/* harmony export */ toPascalCase: () => (/* binding */ toPascalCase) |
| 8225 |
/* harmony export */ }); |
| 8226 |
/* harmony import */ var _toCamelCase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toCamelCase.js */ "./node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js"); |
| 8227 |
/** |
| 8228 |
* @license lucide-react v0.575.0 - ISC |
| 8229 |
* |
| 8230 |
* This source code is licensed under the ISC license. |
| 8231 |
* See the LICENSE file in the root directory of this source tree. |
| 8232 |
*/ |
| 8233 |
|
| 8234 |
|
| 8235 |
|
| 8236 |
const toPascalCase = (string) => { |
| 8237 |
const camelCase = (0,_toCamelCase_js__WEBPACK_IMPORTED_MODULE_0__.toCamelCase)(string); |
| 8238 |
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1); |
| 8239 |
}; |
| 8240 |
|
| 8241 |
|
| 8242 |
//# sourceMappingURL=toPascalCase.js.map |
| 8243 |
|
| 8244 |
|
| 8245 |
/***/ }, |
| 8246 |
|
| 8247 |
/***/ "./resources/css/globals.css" |
| 8248 |
/*!***********************************!*\ |
| 8249 |
!*** ./resources/css/globals.css ***! |
| 8250 |
\***********************************/ |
| 8251 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8252 |
|
| 8253 |
__webpack_require__.r(__webpack_exports__); |
| 8254 |
// extracted by mini-css-extract-plugin |
| 8255 |
|
| 8256 |
|
| 8257 |
/***/ }, |
| 8258 |
|
| 8259 |
/***/ "./node_modules/react-dom/client.js" |
| 8260 |
/*!******************************************!*\ |
| 8261 |
!*** ./node_modules/react-dom/client.js ***! |
| 8262 |
\******************************************/ |
| 8263 |
(__unused_webpack_module, exports, __webpack_require__) { |
| 8264 |
|
| 8265 |
|
| 8266 |
|
| 8267 |
var m = __webpack_require__(/*! react-dom */ "react-dom"); |
| 8268 |
if (false) // removed by dead control flow |
| 8269 |
{} else { |
| 8270 |
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; |
| 8271 |
exports.createRoot = function(c, o) { |
| 8272 |
i.usingClientEntryPoint = true; |
| 8273 |
try { |
| 8274 |
return m.createRoot(c, o); |
| 8275 |
} finally { |
| 8276 |
i.usingClientEntryPoint = false; |
| 8277 |
} |
| 8278 |
}; |
| 8279 |
exports.hydrateRoot = function(c, h, o) { |
| 8280 |
i.usingClientEntryPoint = true; |
| 8281 |
try { |
| 8282 |
return m.hydrateRoot(c, h, o); |
| 8283 |
} finally { |
| 8284 |
i.usingClientEntryPoint = false; |
| 8285 |
} |
| 8286 |
}; |
| 8287 |
} |
| 8288 |
|
| 8289 |
|
| 8290 |
/***/ }, |
| 8291 |
|
| 8292 |
/***/ "./node_modules/react-remove-scroll-bar/dist/es2015/component.js" |
| 8293 |
/*!***********************************************************************!*\ |
| 8294 |
!*** ./node_modules/react-remove-scroll-bar/dist/es2015/component.js ***! |
| 8295 |
\***********************************************************************/ |
| 8296 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8297 |
|
| 8298 |
__webpack_require__.r(__webpack_exports__); |
| 8299 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8300 |
/* harmony export */ RemoveScrollBar: () => (/* binding */ RemoveScrollBar), |
| 8301 |
/* harmony export */ lockAttribute: () => (/* binding */ lockAttribute), |
| 8302 |
/* harmony export */ useLockAttribute: () => (/* binding */ useLockAttribute) |
| 8303 |
/* harmony export */ }); |
| 8304 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 8305 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 8306 |
/* harmony import */ var react_style_singleton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-style-singleton */ "./node_modules/react-style-singleton/dist/es2015/index.js"); |
| 8307 |
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants */ "./node_modules/react-remove-scroll-bar/dist/es2015/constants.js"); |
| 8308 |
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./node_modules/react-remove-scroll-bar/dist/es2015/utils.js"); |
| 8309 |
|
| 8310 |
|
| 8311 |
|
| 8312 |
|
| 8313 |
var Style = (0,react_style_singleton__WEBPACK_IMPORTED_MODULE_1__.styleSingleton)(); |
| 8314 |
var lockAttribute = 'data-scroll-locked'; |
| 8315 |
// important tip - once we measure scrollBar width and remove them |
| 8316 |
// we could not repeat this operation |
| 8317 |
// thus we are using style-singleton - only the first "yet correct" style will be applied. |
| 8318 |
var getStyles = function (_a, allowRelative, gapMode, important) { |
| 8319 |
var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap; |
| 8320 |
if (gapMode === void 0) { gapMode = 'margin'; } |
| 8321 |
return "\n .".concat(_constants__WEBPACK_IMPORTED_MODULE_2__.noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([ |
| 8322 |
allowRelative && "position: relative ".concat(important, ";"), |
| 8323 |
gapMode === 'margin' && |
| 8324 |
"\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "), |
| 8325 |
gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";"), |
| 8326 |
] |
| 8327 |
.filter(Boolean) |
| 8328 |
.join(''), "\n }\n \n .").concat(_constants__WEBPACK_IMPORTED_MODULE_2__.zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(_constants__WEBPACK_IMPORTED_MODULE_2__.fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(_constants__WEBPACK_IMPORTED_MODULE_2__.zeroRightClassName, " .").concat(_constants__WEBPACK_IMPORTED_MODULE_2__.zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(_constants__WEBPACK_IMPORTED_MODULE_2__.fullWidthClassName, " .").concat(_constants__WEBPACK_IMPORTED_MODULE_2__.fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(_constants__WEBPACK_IMPORTED_MODULE_2__.removedBarSizeVariable, ": ").concat(gap, "px;\n }\n"); |
| 8329 |
}; |
| 8330 |
var getCurrentUseCounter = function () { |
| 8331 |
var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10); |
| 8332 |
return isFinite(counter) ? counter : 0; |
| 8333 |
}; |
| 8334 |
var useLockAttribute = function () { |
| 8335 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () { |
| 8336 |
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString()); |
| 8337 |
return function () { |
| 8338 |
var newCounter = getCurrentUseCounter() - 1; |
| 8339 |
if (newCounter <= 0) { |
| 8340 |
document.body.removeAttribute(lockAttribute); |
| 8341 |
} |
| 8342 |
else { |
| 8343 |
document.body.setAttribute(lockAttribute, newCounter.toString()); |
| 8344 |
} |
| 8345 |
}; |
| 8346 |
}, []); |
| 8347 |
}; |
| 8348 |
/** |
| 8349 |
* Removes page scrollbar and blocks page scroll when mounted |
| 8350 |
*/ |
| 8351 |
var RemoveScrollBar = function (_a) { |
| 8352 |
var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b; |
| 8353 |
useLockAttribute(); |
| 8354 |
/* |
| 8355 |
gap will be measured on every component mount |
| 8356 |
however it will be used only by the "first" invocation |
| 8357 |
due to singleton nature of <Style |
| 8358 |
*/ |
| 8359 |
var gap = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(function () { return (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getGapWidth)(gapMode); }, [gapMode]); |
| 8360 |
return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') }); |
| 8361 |
}; |
| 8362 |
|
| 8363 |
|
| 8364 |
/***/ }, |
| 8365 |
|
| 8366 |
/***/ "./node_modules/react-remove-scroll-bar/dist/es2015/constants.js" |
| 8367 |
/*!***********************************************************************!*\ |
| 8368 |
!*** ./node_modules/react-remove-scroll-bar/dist/es2015/constants.js ***! |
| 8369 |
\***********************************************************************/ |
| 8370 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8371 |
|
| 8372 |
__webpack_require__.r(__webpack_exports__); |
| 8373 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8374 |
/* harmony export */ fullWidthClassName: () => (/* binding */ fullWidthClassName), |
| 8375 |
/* harmony export */ noScrollbarsClassName: () => (/* binding */ noScrollbarsClassName), |
| 8376 |
/* harmony export */ removedBarSizeVariable: () => (/* binding */ removedBarSizeVariable), |
| 8377 |
/* harmony export */ zeroRightClassName: () => (/* binding */ zeroRightClassName) |
| 8378 |
/* harmony export */ }); |
| 8379 |
var zeroRightClassName = 'right-scroll-bar-position'; |
| 8380 |
var fullWidthClassName = 'width-before-scroll-bar'; |
| 8381 |
var noScrollbarsClassName = 'with-scroll-bars-hidden'; |
| 8382 |
/** |
| 8383 |
* Name of a CSS variable containing the amount of "hidden" scrollbar |
| 8384 |
* ! might be undefined ! use will fallback! |
| 8385 |
*/ |
| 8386 |
var removedBarSizeVariable = '--removed-body-scroll-bar-size'; |
| 8387 |
|
| 8388 |
|
| 8389 |
/***/ }, |
| 8390 |
|
| 8391 |
/***/ "./node_modules/react-remove-scroll-bar/dist/es2015/index.js" |
| 8392 |
/*!*******************************************************************!*\ |
| 8393 |
!*** ./node_modules/react-remove-scroll-bar/dist/es2015/index.js ***! |
| 8394 |
\*******************************************************************/ |
| 8395 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8396 |
|
| 8397 |
__webpack_require__.r(__webpack_exports__); |
| 8398 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8399 |
/* harmony export */ RemoveScrollBar: () => (/* reexport safe */ _component__WEBPACK_IMPORTED_MODULE_0__.RemoveScrollBar), |
| 8400 |
/* harmony export */ fullWidthClassName: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.fullWidthClassName), |
| 8401 |
/* harmony export */ getGapWidth: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_2__.getGapWidth), |
| 8402 |
/* harmony export */ noScrollbarsClassName: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.noScrollbarsClassName), |
| 8403 |
/* harmony export */ removedBarSizeVariable: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.removedBarSizeVariable), |
| 8404 |
/* harmony export */ zeroRightClassName: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.zeroRightClassName) |
| 8405 |
/* harmony export */ }); |
| 8406 |
/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./component */ "./node_modules/react-remove-scroll-bar/dist/es2015/component.js"); |
| 8407 |
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./node_modules/react-remove-scroll-bar/dist/es2015/constants.js"); |
| 8408 |
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/react-remove-scroll-bar/dist/es2015/utils.js"); |
| 8409 |
|
| 8410 |
|
| 8411 |
|
| 8412 |
|
| 8413 |
|
| 8414 |
|
| 8415 |
/***/ }, |
| 8416 |
|
| 8417 |
/***/ "./node_modules/react-remove-scroll-bar/dist/es2015/utils.js" |
| 8418 |
/*!*******************************************************************!*\ |
| 8419 |
!*** ./node_modules/react-remove-scroll-bar/dist/es2015/utils.js ***! |
| 8420 |
\*******************************************************************/ |
| 8421 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8422 |
|
| 8423 |
__webpack_require__.r(__webpack_exports__); |
| 8424 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8425 |
/* harmony export */ getGapWidth: () => (/* binding */ getGapWidth), |
| 8426 |
/* harmony export */ zeroGap: () => (/* binding */ zeroGap) |
| 8427 |
/* harmony export */ }); |
| 8428 |
var zeroGap = { |
| 8429 |
left: 0, |
| 8430 |
top: 0, |
| 8431 |
right: 0, |
| 8432 |
gap: 0, |
| 8433 |
}; |
| 8434 |
var parse = function (x) { return parseInt(x || '', 10) || 0; }; |
| 8435 |
var getOffset = function (gapMode) { |
| 8436 |
var cs = window.getComputedStyle(document.body); |
| 8437 |
var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft']; |
| 8438 |
var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop']; |
| 8439 |
var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight']; |
| 8440 |
return [parse(left), parse(top), parse(right)]; |
| 8441 |
}; |
| 8442 |
var getGapWidth = function (gapMode) { |
| 8443 |
if (gapMode === void 0) { gapMode = 'margin'; } |
| 8444 |
if (typeof window === 'undefined') { |
| 8445 |
return zeroGap; |
| 8446 |
} |
| 8447 |
var offsets = getOffset(gapMode); |
| 8448 |
var documentWidth = document.documentElement.clientWidth; |
| 8449 |
var windowWidth = window.innerWidth; |
| 8450 |
return { |
| 8451 |
left: offsets[0], |
| 8452 |
top: offsets[1], |
| 8453 |
right: offsets[2], |
| 8454 |
gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]), |
| 8455 |
}; |
| 8456 |
}; |
| 8457 |
|
| 8458 |
|
| 8459 |
/***/ }, |
| 8460 |
|
| 8461 |
/***/ "./node_modules/react-remove-scroll/dist/es2015/Combination.js" |
| 8462 |
/*!*********************************************************************!*\ |
| 8463 |
!*** ./node_modules/react-remove-scroll/dist/es2015/Combination.js ***! |
| 8464 |
\*********************************************************************/ |
| 8465 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8466 |
|
| 8467 |
__webpack_require__.r(__webpack_exports__); |
| 8468 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8469 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 8470 |
/* harmony export */ }); |
| 8471 |
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs"); |
| 8472 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); |
| 8473 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); |
| 8474 |
/* harmony import */ var _UI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./UI */ "./node_modules/react-remove-scroll/dist/es2015/UI.js"); |
| 8475 |
/* harmony import */ var _sidecar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sidecar */ "./node_modules/react-remove-scroll/dist/es2015/sidecar.js"); |
| 8476 |
|
| 8477 |
|
| 8478 |
|
| 8479 |
|
| 8480 |
var ReactRemoveScroll = react__WEBPACK_IMPORTED_MODULE_1__.forwardRef(function (props, ref) { return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_UI__WEBPACK_IMPORTED_MODULE_2__.RemoveScroll, (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, props, { ref: ref, sideCar: _sidecar__WEBPACK_IMPORTED_MODULE_3__["default"] }))); }); |
| 8481 |
ReactRemoveScroll.classNames = _UI__WEBPACK_IMPORTED_MODULE_2__.RemoveScroll.classNames; |
| 8482 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ReactRemoveScroll); |
| 8483 |
|
| 8484 |
|
| 8485 |
/***/ }, |
| 8486 |
|
| 8487 |
/***/ "./node_modules/react-remove-scroll/dist/es2015/SideEffect.js" |
| 8488 |
/*!********************************************************************!*\ |
| 8489 |
!*** ./node_modules/react-remove-scroll/dist/es2015/SideEffect.js ***! |
| 8490 |
\********************************************************************/ |
| 8491 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8492 |
|
| 8493 |
__webpack_require__.r(__webpack_exports__); |
| 8494 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8495 |
/* harmony export */ RemoveScrollSideCar: () => (/* binding */ RemoveScrollSideCar), |
| 8496 |
/* harmony export */ getDeltaXY: () => (/* binding */ getDeltaXY), |
| 8497 |
/* harmony export */ getTouchXY: () => (/* binding */ getTouchXY) |
| 8498 |
/* harmony export */ }); |
| 8499 |
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs"); |
| 8500 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); |
| 8501 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); |
| 8502 |
/* harmony import */ var react_remove_scroll_bar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-remove-scroll-bar */ "./node_modules/react-remove-scroll-bar/dist/es2015/index.js"); |
| 8503 |
/* harmony import */ var react_style_singleton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-style-singleton */ "./node_modules/react-style-singleton/dist/es2015/index.js"); |
| 8504 |
/* harmony import */ var _aggresiveCapture__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./aggresiveCapture */ "./node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js"); |
| 8505 |
/* harmony import */ var _handleScroll__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./handleScroll */ "./node_modules/react-remove-scroll/dist/es2015/handleScroll.js"); |
| 8506 |
|
| 8507 |
|
| 8508 |
|
| 8509 |
|
| 8510 |
|
| 8511 |
|
| 8512 |
var getTouchXY = function (event) { |
| 8513 |
return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0]; |
| 8514 |
}; |
| 8515 |
var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; }; |
| 8516 |
var extractRef = function (ref) { |
| 8517 |
return ref && 'current' in ref ? ref.current : ref; |
| 8518 |
}; |
| 8519 |
var deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; }; |
| 8520 |
var generateStyle = function (id) { return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); }; |
| 8521 |
var idCounter = 0; |
| 8522 |
var lockStack = []; |
| 8523 |
function RemoveScrollSideCar(props) { |
| 8524 |
var shouldPreventQueue = react__WEBPACK_IMPORTED_MODULE_1__.useRef([]); |
| 8525 |
var touchStartRef = react__WEBPACK_IMPORTED_MODULE_1__.useRef([0, 0]); |
| 8526 |
var activeAxis = react__WEBPACK_IMPORTED_MODULE_1__.useRef(); |
| 8527 |
var id = react__WEBPACK_IMPORTED_MODULE_1__.useState(idCounter++)[0]; |
| 8528 |
var Style = react__WEBPACK_IMPORTED_MODULE_1__.useState(react_style_singleton__WEBPACK_IMPORTED_MODULE_3__.styleSingleton)[0]; |
| 8529 |
var lastProps = react__WEBPACK_IMPORTED_MODULE_1__.useRef(props); |
| 8530 |
react__WEBPACK_IMPORTED_MODULE_1__.useEffect(function () { |
| 8531 |
lastProps.current = props; |
| 8532 |
}, [props]); |
| 8533 |
react__WEBPACK_IMPORTED_MODULE_1__.useEffect(function () { |
| 8534 |
if (props.inert) { |
| 8535 |
document.body.classList.add("block-interactivity-".concat(id)); |
| 8536 |
var allow_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__spreadArray)([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean); |
| 8537 |
allow_1.forEach(function (el) { return el.classList.add("allow-interactivity-".concat(id)); }); |
| 8538 |
return function () { |
| 8539 |
document.body.classList.remove("block-interactivity-".concat(id)); |
| 8540 |
allow_1.forEach(function (el) { return el.classList.remove("allow-interactivity-".concat(id)); }); |
| 8541 |
}; |
| 8542 |
} |
| 8543 |
return; |
| 8544 |
}, [props.inert, props.lockRef.current, props.shards]); |
| 8545 |
var shouldCancelEvent = react__WEBPACK_IMPORTED_MODULE_1__.useCallback(function (event, parent) { |
| 8546 |
if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) { |
| 8547 |
return !lastProps.current.allowPinchZoom; |
| 8548 |
} |
| 8549 |
var touch = getTouchXY(event); |
| 8550 |
var touchStart = touchStartRef.current; |
| 8551 |
var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0]; |
| 8552 |
var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1]; |
| 8553 |
var currentAxis; |
| 8554 |
var target = event.target; |
| 8555 |
var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v'; |
| 8556 |
// allow horizontal touch move on Range inputs. They will not cause any scroll |
| 8557 |
if ('touches' in event && moveDirection === 'h' && target.type === 'range') { |
| 8558 |
return false; |
| 8559 |
} |
| 8560 |
// allow drag selection (iOS); check if selection's anchorNode is the same as target or contains target |
| 8561 |
var selection = window.getSelection(); |
| 8562 |
var anchorNode = selection && selection.anchorNode; |
| 8563 |
var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false; |
| 8564 |
if (isTouchingSelection) { |
| 8565 |
return false; |
| 8566 |
} |
| 8567 |
var canBeScrolledInMainDirection = (0,_handleScroll__WEBPACK_IMPORTED_MODULE_5__.locationCouldBeScrolled)(moveDirection, target); |
| 8568 |
if (!canBeScrolledInMainDirection) { |
| 8569 |
return true; |
| 8570 |
} |
| 8571 |
if (canBeScrolledInMainDirection) { |
| 8572 |
currentAxis = moveDirection; |
| 8573 |
} |
| 8574 |
else { |
| 8575 |
currentAxis = moveDirection === 'v' ? 'h' : 'v'; |
| 8576 |
canBeScrolledInMainDirection = (0,_handleScroll__WEBPACK_IMPORTED_MODULE_5__.locationCouldBeScrolled)(moveDirection, target); |
| 8577 |
// other axis might be not scrollable |
| 8578 |
} |
| 8579 |
if (!canBeScrolledInMainDirection) { |
| 8580 |
return false; |
| 8581 |
} |
| 8582 |
if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) { |
| 8583 |
activeAxis.current = currentAxis; |
| 8584 |
} |
| 8585 |
if (!currentAxis) { |
| 8586 |
return true; |
| 8587 |
} |
| 8588 |
var cancelingAxis = activeAxis.current || currentAxis; |
| 8589 |
return (0,_handleScroll__WEBPACK_IMPORTED_MODULE_5__.handleScroll)(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true); |
| 8590 |
}, []); |
| 8591 |
var shouldPrevent = react__WEBPACK_IMPORTED_MODULE_1__.useCallback(function (_event) { |
| 8592 |
var event = _event; |
| 8593 |
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) { |
| 8594 |
// not the last active |
| 8595 |
return; |
| 8596 |
} |
| 8597 |
var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event); |
| 8598 |
var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0]; |
| 8599 |
// self event, and should be canceled |
| 8600 |
if (sourceEvent && sourceEvent.should) { |
| 8601 |
if (event.cancelable) { |
| 8602 |
event.preventDefault(); |
| 8603 |
} |
| 8604 |
return; |
| 8605 |
} |
| 8606 |
// outside or shard event |
| 8607 |
if (!sourceEvent) { |
| 8608 |
var shardNodes = (lastProps.current.shards || []) |
| 8609 |
.map(extractRef) |
| 8610 |
.filter(Boolean) |
| 8611 |
.filter(function (node) { return node.contains(event.target); }); |
| 8612 |
var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation; |
| 8613 |
if (shouldStop) { |
| 8614 |
if (event.cancelable) { |
| 8615 |
event.preventDefault(); |
| 8616 |
} |
| 8617 |
} |
| 8618 |
} |
| 8619 |
}, []); |
| 8620 |
var shouldCancel = react__WEBPACK_IMPORTED_MODULE_1__.useCallback(function (name, delta, target, should) { |
| 8621 |
var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) }; |
| 8622 |
shouldPreventQueue.current.push(event); |
| 8623 |
setTimeout(function () { |
| 8624 |
shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; }); |
| 8625 |
}, 1); |
| 8626 |
}, []); |
| 8627 |
var scrollTouchStart = react__WEBPACK_IMPORTED_MODULE_1__.useCallback(function (event) { |
| 8628 |
touchStartRef.current = getTouchXY(event); |
| 8629 |
activeAxis.current = undefined; |
| 8630 |
}, []); |
| 8631 |
var scrollWheel = react__WEBPACK_IMPORTED_MODULE_1__.useCallback(function (event) { |
| 8632 |
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current)); |
| 8633 |
}, []); |
| 8634 |
var scrollTouchMove = react__WEBPACK_IMPORTED_MODULE_1__.useCallback(function (event) { |
| 8635 |
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current)); |
| 8636 |
}, []); |
| 8637 |
react__WEBPACK_IMPORTED_MODULE_1__.useEffect(function () { |
| 8638 |
lockStack.push(Style); |
| 8639 |
props.setCallbacks({ |
| 8640 |
onScrollCapture: scrollWheel, |
| 8641 |
onWheelCapture: scrollWheel, |
| 8642 |
onTouchMoveCapture: scrollTouchMove, |
| 8643 |
}); |
| 8644 |
document.addEventListener('wheel', shouldPrevent, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_4__.nonPassive); |
| 8645 |
document.addEventListener('touchmove', shouldPrevent, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_4__.nonPassive); |
| 8646 |
document.addEventListener('touchstart', scrollTouchStart, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_4__.nonPassive); |
| 8647 |
return function () { |
| 8648 |
lockStack = lockStack.filter(function (inst) { return inst !== Style; }); |
| 8649 |
document.removeEventListener('wheel', shouldPrevent, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_4__.nonPassive); |
| 8650 |
document.removeEventListener('touchmove', shouldPrevent, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_4__.nonPassive); |
| 8651 |
document.removeEventListener('touchstart', scrollTouchStart, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_4__.nonPassive); |
| 8652 |
}; |
| 8653 |
}, []); |
| 8654 |
var removeScrollBar = props.removeScrollBar, inert = props.inert; |
| 8655 |
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, |
| 8656 |
inert ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(Style, { styles: generateStyle(id) }) : null, |
| 8657 |
removeScrollBar ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(react_remove_scroll_bar__WEBPACK_IMPORTED_MODULE_2__.RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null)); |
| 8658 |
} |
| 8659 |
function getOutermostShadowParent(node) { |
| 8660 |
var shadowParent = null; |
| 8661 |
while (node !== null) { |
| 8662 |
if (node instanceof ShadowRoot) { |
| 8663 |
shadowParent = node.host; |
| 8664 |
node = node.host; |
| 8665 |
} |
| 8666 |
node = node.parentNode; |
| 8667 |
} |
| 8668 |
return shadowParent; |
| 8669 |
} |
| 8670 |
|
| 8671 |
|
| 8672 |
/***/ }, |
| 8673 |
|
| 8674 |
/***/ "./node_modules/react-remove-scroll/dist/es2015/UI.js" |
| 8675 |
/*!************************************************************!*\ |
| 8676 |
!*** ./node_modules/react-remove-scroll/dist/es2015/UI.js ***! |
| 8677 |
\************************************************************/ |
| 8678 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8679 |
|
| 8680 |
__webpack_require__.r(__webpack_exports__); |
| 8681 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8682 |
/* harmony export */ RemoveScroll: () => (/* binding */ RemoveScroll) |
| 8683 |
/* harmony export */ }); |
| 8684 |
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs"); |
| 8685 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); |
| 8686 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); |
| 8687 |
/* harmony import */ var react_remove_scroll_bar_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-remove-scroll-bar/constants */ "./node_modules/react-remove-scroll-bar/dist/es2015/constants.js"); |
| 8688 |
/* harmony import */ var use_callback_ref__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! use-callback-ref */ "./node_modules/use-callback-ref/dist/es2015/useMergeRef.js"); |
| 8689 |
/* harmony import */ var _medium__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./medium */ "./node_modules/react-remove-scroll/dist/es2015/medium.js"); |
| 8690 |
|
| 8691 |
|
| 8692 |
|
| 8693 |
|
| 8694 |
|
| 8695 |
var nothing = function () { |
| 8696 |
return; |
| 8697 |
}; |
| 8698 |
/** |
| 8699 |
* Removes scrollbar from the page and contain the scroll within the Lock |
| 8700 |
*/ |
| 8701 |
var RemoveScroll = react__WEBPACK_IMPORTED_MODULE_1__.forwardRef(function (props, parentRef) { |
| 8702 |
var ref = react__WEBPACK_IMPORTED_MODULE_1__.useRef(null); |
| 8703 |
var _a = react__WEBPACK_IMPORTED_MODULE_1__.useState({ |
| 8704 |
onScrollCapture: nothing, |
| 8705 |
onWheelCapture: nothing, |
| 8706 |
onTouchMoveCapture: nothing, |
| 8707 |
}), callbacks = _a[0], setCallbacks = _a[1]; |
| 8708 |
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__rest)(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]); |
| 8709 |
var SideCar = sideCar; |
| 8710 |
var containerRef = (0,use_callback_ref__WEBPACK_IMPORTED_MODULE_3__.useMergeRefs)([ref, parentRef]); |
| 8711 |
var containerProps = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, rest), callbacks); |
| 8712 |
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, |
| 8713 |
enabled && (react__WEBPACK_IMPORTED_MODULE_1__.createElement(SideCar, { sideCar: _medium__WEBPACK_IMPORTED_MODULE_4__.effectCar, removeScrollBar: removeScrollBar, shards: shards, noRelative: noRelative, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })), |
| 8714 |
forwardProps ? (react__WEBPACK_IMPORTED_MODULE_1__.cloneElement(react__WEBPACK_IMPORTED_MODULE_1__.Children.only(children), (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, containerProps), { ref: containerRef }))) : (react__WEBPACK_IMPORTED_MODULE_1__.createElement(Container, (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, containerProps, { className: className, ref: containerRef }), children)))); |
| 8715 |
}); |
| 8716 |
RemoveScroll.defaultProps = { |
| 8717 |
enabled: true, |
| 8718 |
removeScrollBar: true, |
| 8719 |
inert: false, |
| 8720 |
}; |
| 8721 |
RemoveScroll.classNames = { |
| 8722 |
fullWidth: react_remove_scroll_bar_constants__WEBPACK_IMPORTED_MODULE_2__.fullWidthClassName, |
| 8723 |
zeroRight: react_remove_scroll_bar_constants__WEBPACK_IMPORTED_MODULE_2__.zeroRightClassName, |
| 8724 |
}; |
| 8725 |
|
| 8726 |
|
| 8727 |
|
| 8728 |
/***/ }, |
| 8729 |
|
| 8730 |
/***/ "./node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js" |
| 8731 |
/*!**************************************************************************!*\ |
| 8732 |
!*** ./node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js ***! |
| 8733 |
\**************************************************************************/ |
| 8734 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8735 |
|
| 8736 |
__webpack_require__.r(__webpack_exports__); |
| 8737 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8738 |
/* harmony export */ nonPassive: () => (/* binding */ nonPassive) |
| 8739 |
/* harmony export */ }); |
| 8740 |
var passiveSupported = false; |
| 8741 |
if (typeof window !== 'undefined') { |
| 8742 |
try { |
| 8743 |
var options = Object.defineProperty({}, 'passive', { |
| 8744 |
get: function () { |
| 8745 |
passiveSupported = true; |
| 8746 |
return true; |
| 8747 |
}, |
| 8748 |
}); |
| 8749 |
// @ts-ignore |
| 8750 |
window.addEventListener('test', options, options); |
| 8751 |
// @ts-ignore |
| 8752 |
window.removeEventListener('test', options, options); |
| 8753 |
} |
| 8754 |
catch (err) { |
| 8755 |
passiveSupported = false; |
| 8756 |
} |
| 8757 |
} |
| 8758 |
var nonPassive = passiveSupported ? { passive: false } : false; |
| 8759 |
|
| 8760 |
|
| 8761 |
/***/ }, |
| 8762 |
|
| 8763 |
/***/ "./node_modules/react-remove-scroll/dist/es2015/handleScroll.js" |
| 8764 |
/*!**********************************************************************!*\ |
| 8765 |
!*** ./node_modules/react-remove-scroll/dist/es2015/handleScroll.js ***! |
| 8766 |
\**********************************************************************/ |
| 8767 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8768 |
|
| 8769 |
__webpack_require__.r(__webpack_exports__); |
| 8770 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8771 |
/* harmony export */ handleScroll: () => (/* binding */ handleScroll), |
| 8772 |
/* harmony export */ locationCouldBeScrolled: () => (/* binding */ locationCouldBeScrolled) |
| 8773 |
/* harmony export */ }); |
| 8774 |
var alwaysContainsScroll = function (node) { |
| 8775 |
// textarea will always _contain_ scroll inside self. It only can be hidden |
| 8776 |
return node.tagName === 'TEXTAREA'; |
| 8777 |
}; |
| 8778 |
var elementCanBeScrolled = function (node, overflow) { |
| 8779 |
if (!(node instanceof Element)) { |
| 8780 |
return false; |
| 8781 |
} |
| 8782 |
var styles = window.getComputedStyle(node); |
| 8783 |
return ( |
| 8784 |
// not-not-scrollable |
| 8785 |
styles[overflow] !== 'hidden' && |
| 8786 |
// contains scroll inside self |
| 8787 |
!(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible')); |
| 8788 |
}; |
| 8789 |
var elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); }; |
| 8790 |
var elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); }; |
| 8791 |
var locationCouldBeScrolled = function (axis, node) { |
| 8792 |
var ownerDocument = node.ownerDocument; |
| 8793 |
var current = node; |
| 8794 |
do { |
| 8795 |
// Skip over shadow root |
| 8796 |
if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) { |
| 8797 |
current = current.host; |
| 8798 |
} |
| 8799 |
var isScrollable = elementCouldBeScrolled(axis, current); |
| 8800 |
if (isScrollable) { |
| 8801 |
var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2]; |
| 8802 |
if (scrollHeight > clientHeight) { |
| 8803 |
return true; |
| 8804 |
} |
| 8805 |
} |
| 8806 |
current = current.parentNode; |
| 8807 |
} while (current && current !== ownerDocument.body); |
| 8808 |
return false; |
| 8809 |
}; |
| 8810 |
var getVScrollVariables = function (_a) { |
| 8811 |
var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight; |
| 8812 |
return [ |
| 8813 |
scrollTop, |
| 8814 |
scrollHeight, |
| 8815 |
clientHeight, |
| 8816 |
]; |
| 8817 |
}; |
| 8818 |
var getHScrollVariables = function (_a) { |
| 8819 |
var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth; |
| 8820 |
return [ |
| 8821 |
scrollLeft, |
| 8822 |
scrollWidth, |
| 8823 |
clientWidth, |
| 8824 |
]; |
| 8825 |
}; |
| 8826 |
var elementCouldBeScrolled = function (axis, node) { |
| 8827 |
return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node); |
| 8828 |
}; |
| 8829 |
var getScrollVariables = function (axis, node) { |
| 8830 |
return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node); |
| 8831 |
}; |
| 8832 |
var getDirectionFactor = function (axis, direction) { |
| 8833 |
/** |
| 8834 |
* If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position, |
| 8835 |
* and then increasingly negative as you scroll towards the end of the content. |
| 8836 |
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft |
| 8837 |
*/ |
| 8838 |
return axis === 'h' && direction === 'rtl' ? -1 : 1; |
| 8839 |
}; |
| 8840 |
var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) { |
| 8841 |
var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction); |
| 8842 |
var delta = directionFactor * sourceDelta; |
| 8843 |
// find scrollable target |
| 8844 |
var target = event.target; |
| 8845 |
var targetInLock = endTarget.contains(target); |
| 8846 |
var shouldCancelScroll = false; |
| 8847 |
var isDeltaPositive = delta > 0; |
| 8848 |
var availableScroll = 0; |
| 8849 |
var availableScrollTop = 0; |
| 8850 |
do { |
| 8851 |
if (!target) { |
| 8852 |
break; |
| 8853 |
} |
| 8854 |
var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2]; |
| 8855 |
var elementScroll = scroll_1 - capacity - directionFactor * position; |
| 8856 |
if (position || elementScroll) { |
| 8857 |
if (elementCouldBeScrolled(axis, target)) { |
| 8858 |
availableScroll += elementScroll; |
| 8859 |
availableScrollTop += position; |
| 8860 |
} |
| 8861 |
} |
| 8862 |
var parent_1 = target.parentNode; |
| 8863 |
// we will "bubble" from ShadowDom in case we are, or just to the parent in normal case |
| 8864 |
// this is the same logic used in focus-lock |
| 8865 |
target = (parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1); |
| 8866 |
} while ( |
| 8867 |
// portaled content |
| 8868 |
(!targetInLock && target !== document.body) || |
| 8869 |
// self content |
| 8870 |
(targetInLock && (endTarget.contains(target) || endTarget === target))); |
| 8871 |
// handle epsilon around 0 (non standard zoom levels) |
| 8872 |
if (isDeltaPositive && |
| 8873 |
((noOverscroll && Math.abs(availableScroll) < 1) || (!noOverscroll && delta > availableScroll))) { |
| 8874 |
shouldCancelScroll = true; |
| 8875 |
} |
| 8876 |
else if (!isDeltaPositive && |
| 8877 |
((noOverscroll && Math.abs(availableScrollTop) < 1) || (!noOverscroll && -delta > availableScrollTop))) { |
| 8878 |
shouldCancelScroll = true; |
| 8879 |
} |
| 8880 |
return shouldCancelScroll; |
| 8881 |
}; |
| 8882 |
|
| 8883 |
|
| 8884 |
/***/ }, |
| 8885 |
|
| 8886 |
/***/ "./node_modules/react-remove-scroll/dist/es2015/medium.js" |
| 8887 |
/*!****************************************************************!*\ |
| 8888 |
!*** ./node_modules/react-remove-scroll/dist/es2015/medium.js ***! |
| 8889 |
\****************************************************************/ |
| 8890 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8891 |
|
| 8892 |
__webpack_require__.r(__webpack_exports__); |
| 8893 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8894 |
/* harmony export */ effectCar: () => (/* binding */ effectCar) |
| 8895 |
/* harmony export */ }); |
| 8896 |
/* harmony import */ var use_sidecar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! use-sidecar */ "./node_modules/use-sidecar/dist/es2015/medium.js"); |
| 8897 |
|
| 8898 |
var effectCar = (0,use_sidecar__WEBPACK_IMPORTED_MODULE_0__.createSidecarMedium)(); |
| 8899 |
|
| 8900 |
|
| 8901 |
/***/ }, |
| 8902 |
|
| 8903 |
/***/ "./node_modules/react-remove-scroll/dist/es2015/sidecar.js" |
| 8904 |
/*!*****************************************************************!*\ |
| 8905 |
!*** ./node_modules/react-remove-scroll/dist/es2015/sidecar.js ***! |
| 8906 |
\*****************************************************************/ |
| 8907 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8908 |
|
| 8909 |
__webpack_require__.r(__webpack_exports__); |
| 8910 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8911 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 8912 |
/* harmony export */ }); |
| 8913 |
/* harmony import */ var use_sidecar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! use-sidecar */ "./node_modules/use-sidecar/dist/es2015/exports.js"); |
| 8914 |
/* harmony import */ var _SideEffect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SideEffect */ "./node_modules/react-remove-scroll/dist/es2015/SideEffect.js"); |
| 8915 |
/* harmony import */ var _medium__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./medium */ "./node_modules/react-remove-scroll/dist/es2015/medium.js"); |
| 8916 |
|
| 8917 |
|
| 8918 |
|
| 8919 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,use_sidecar__WEBPACK_IMPORTED_MODULE_0__.exportSidecar)(_medium__WEBPACK_IMPORTED_MODULE_2__.effectCar, _SideEffect__WEBPACK_IMPORTED_MODULE_1__.RemoveScrollSideCar)); |
| 8920 |
|
| 8921 |
|
| 8922 |
/***/ }, |
| 8923 |
|
| 8924 |
/***/ "./node_modules/react-style-singleton/dist/es2015/component.js" |
| 8925 |
/*!*********************************************************************!*\ |
| 8926 |
!*** ./node_modules/react-style-singleton/dist/es2015/component.js ***! |
| 8927 |
\*********************************************************************/ |
| 8928 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8929 |
|
| 8930 |
__webpack_require__.r(__webpack_exports__); |
| 8931 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8932 |
/* harmony export */ styleSingleton: () => (/* binding */ styleSingleton) |
| 8933 |
/* harmony export */ }); |
| 8934 |
/* harmony import */ var _hook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hook */ "./node_modules/react-style-singleton/dist/es2015/hook.js"); |
| 8935 |
|
| 8936 |
/** |
| 8937 |
* create a Component to add styles on demand |
| 8938 |
* - styles are added when first instance is mounted |
| 8939 |
* - styles are removed when the last instance is unmounted |
| 8940 |
* - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior |
| 8941 |
*/ |
| 8942 |
var styleSingleton = function () { |
| 8943 |
var useStyle = (0,_hook__WEBPACK_IMPORTED_MODULE_0__.styleHookSingleton)(); |
| 8944 |
var Sheet = function (_a) { |
| 8945 |
var styles = _a.styles, dynamic = _a.dynamic; |
| 8946 |
useStyle(styles, dynamic); |
| 8947 |
return null; |
| 8948 |
}; |
| 8949 |
return Sheet; |
| 8950 |
}; |
| 8951 |
|
| 8952 |
|
| 8953 |
/***/ }, |
| 8954 |
|
| 8955 |
/***/ "./node_modules/react-style-singleton/dist/es2015/hook.js" |
| 8956 |
/*!****************************************************************!*\ |
| 8957 |
!*** ./node_modules/react-style-singleton/dist/es2015/hook.js ***! |
| 8958 |
\****************************************************************/ |
| 8959 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8960 |
|
| 8961 |
__webpack_require__.r(__webpack_exports__); |
| 8962 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 8963 |
/* harmony export */ styleHookSingleton: () => (/* binding */ styleHookSingleton) |
| 8964 |
/* harmony export */ }); |
| 8965 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 8966 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 8967 |
/* harmony import */ var _singleton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./singleton */ "./node_modules/react-style-singleton/dist/es2015/singleton.js"); |
| 8968 |
|
| 8969 |
|
| 8970 |
/** |
| 8971 |
* creates a hook to control style singleton |
| 8972 |
* @see {@link styleSingleton} for a safer component version |
| 8973 |
* @example |
| 8974 |
* ```tsx |
| 8975 |
* const useStyle = styleHookSingleton(); |
| 8976 |
* /// |
| 8977 |
* useStyle('body { overflow: hidden}'); |
| 8978 |
*/ |
| 8979 |
var styleHookSingleton = function () { |
| 8980 |
var sheet = (0,_singleton__WEBPACK_IMPORTED_MODULE_1__.stylesheetSingleton)(); |
| 8981 |
return function (styles, isDynamic) { |
| 8982 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () { |
| 8983 |
sheet.add(styles); |
| 8984 |
return function () { |
| 8985 |
sheet.remove(); |
| 8986 |
}; |
| 8987 |
}, [styles && isDynamic]); |
| 8988 |
}; |
| 8989 |
}; |
| 8990 |
|
| 8991 |
|
| 8992 |
/***/ }, |
| 8993 |
|
| 8994 |
/***/ "./node_modules/react-style-singleton/dist/es2015/index.js" |
| 8995 |
/*!*****************************************************************!*\ |
| 8996 |
!*** ./node_modules/react-style-singleton/dist/es2015/index.js ***! |
| 8997 |
\*****************************************************************/ |
| 8998 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 8999 |
|
| 9000 |
__webpack_require__.r(__webpack_exports__); |
| 9001 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9002 |
/* harmony export */ styleHookSingleton: () => (/* reexport safe */ _hook__WEBPACK_IMPORTED_MODULE_2__.styleHookSingleton), |
| 9003 |
/* harmony export */ styleSingleton: () => (/* reexport safe */ _component__WEBPACK_IMPORTED_MODULE_0__.styleSingleton), |
| 9004 |
/* harmony export */ stylesheetSingleton: () => (/* reexport safe */ _singleton__WEBPACK_IMPORTED_MODULE_1__.stylesheetSingleton) |
| 9005 |
/* harmony export */ }); |
| 9006 |
/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./component */ "./node_modules/react-style-singleton/dist/es2015/component.js"); |
| 9007 |
/* harmony import */ var _singleton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./singleton */ "./node_modules/react-style-singleton/dist/es2015/singleton.js"); |
| 9008 |
/* harmony import */ var _hook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hook */ "./node_modules/react-style-singleton/dist/es2015/hook.js"); |
| 9009 |
|
| 9010 |
|
| 9011 |
|
| 9012 |
|
| 9013 |
|
| 9014 |
/***/ }, |
| 9015 |
|
| 9016 |
/***/ "./node_modules/react-style-singleton/dist/es2015/singleton.js" |
| 9017 |
/*!*********************************************************************!*\ |
| 9018 |
!*** ./node_modules/react-style-singleton/dist/es2015/singleton.js ***! |
| 9019 |
\*********************************************************************/ |
| 9020 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 9021 |
|
| 9022 |
__webpack_require__.r(__webpack_exports__); |
| 9023 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9024 |
/* harmony export */ stylesheetSingleton: () => (/* binding */ stylesheetSingleton) |
| 9025 |
/* harmony export */ }); |
| 9026 |
/* harmony import */ var get_nonce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! get-nonce */ "./node_modules/get-nonce/dist/es2015/index.js"); |
| 9027 |
|
| 9028 |
function makeStyleTag() { |
| 9029 |
if (!document) |
| 9030 |
return null; |
| 9031 |
var tag = document.createElement('style'); |
| 9032 |
tag.type = 'text/css'; |
| 9033 |
var nonce = (0,get_nonce__WEBPACK_IMPORTED_MODULE_0__.getNonce)(); |
| 9034 |
if (nonce) { |
| 9035 |
tag.setAttribute('nonce', nonce); |
| 9036 |
} |
| 9037 |
return tag; |
| 9038 |
} |
| 9039 |
function injectStyles(tag, css) { |
| 9040 |
// @ts-ignore |
| 9041 |
if (tag.styleSheet) { |
| 9042 |
// @ts-ignore |
| 9043 |
tag.styleSheet.cssText = css; |
| 9044 |
} |
| 9045 |
else { |
| 9046 |
tag.appendChild(document.createTextNode(css)); |
| 9047 |
} |
| 9048 |
} |
| 9049 |
function insertStyleTag(tag) { |
| 9050 |
var head = document.head || document.getElementsByTagName('head')[0]; |
| 9051 |
head.appendChild(tag); |
| 9052 |
} |
| 9053 |
var stylesheetSingleton = function () { |
| 9054 |
var counter = 0; |
| 9055 |
var stylesheet = null; |
| 9056 |
return { |
| 9057 |
add: function (style) { |
| 9058 |
if (counter == 0) { |
| 9059 |
if ((stylesheet = makeStyleTag())) { |
| 9060 |
injectStyles(stylesheet, style); |
| 9061 |
insertStyleTag(stylesheet); |
| 9062 |
} |
| 9063 |
} |
| 9064 |
counter++; |
| 9065 |
}, |
| 9066 |
remove: function () { |
| 9067 |
counter--; |
| 9068 |
if (!counter && stylesheet) { |
| 9069 |
stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet); |
| 9070 |
stylesheet = null; |
| 9071 |
} |
| 9072 |
}, |
| 9073 |
}; |
| 9074 |
}; |
| 9075 |
|
| 9076 |
|
| 9077 |
/***/ }, |
| 9078 |
|
| 9079 |
/***/ "./node_modules/use-callback-ref/dist/es2015/assignRef.js" |
| 9080 |
/*!****************************************************************!*\ |
| 9081 |
!*** ./node_modules/use-callback-ref/dist/es2015/assignRef.js ***! |
| 9082 |
\****************************************************************/ |
| 9083 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 9084 |
|
| 9085 |
__webpack_require__.r(__webpack_exports__); |
| 9086 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9087 |
/* harmony export */ assignRef: () => (/* binding */ assignRef) |
| 9088 |
/* harmony export */ }); |
| 9089 |
/** |
| 9090 |
* Assigns a value for a given ref, no matter of the ref format |
| 9091 |
* @param {RefObject} ref - a callback function or ref object |
| 9092 |
* @param value - a new value |
| 9093 |
* |
| 9094 |
* @see https://github.com/theKashey/use-callback-ref#assignref |
| 9095 |
* @example |
| 9096 |
* const refObject = useRef(); |
| 9097 |
* const refFn = (ref) => {....} |
| 9098 |
* |
| 9099 |
* assignRef(refObject, "refValue"); |
| 9100 |
* assignRef(refFn, "refValue"); |
| 9101 |
*/ |
| 9102 |
function assignRef(ref, value) { |
| 9103 |
if (typeof ref === 'function') { |
| 9104 |
ref(value); |
| 9105 |
} |
| 9106 |
else if (ref) { |
| 9107 |
ref.current = value; |
| 9108 |
} |
| 9109 |
return ref; |
| 9110 |
} |
| 9111 |
|
| 9112 |
|
| 9113 |
/***/ }, |
| 9114 |
|
| 9115 |
/***/ "./node_modules/use-callback-ref/dist/es2015/useMergeRef.js" |
| 9116 |
/*!******************************************************************!*\ |
| 9117 |
!*** ./node_modules/use-callback-ref/dist/es2015/useMergeRef.js ***! |
| 9118 |
\******************************************************************/ |
| 9119 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 9120 |
|
| 9121 |
__webpack_require__.r(__webpack_exports__); |
| 9122 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9123 |
/* harmony export */ useMergeRefs: () => (/* binding */ useMergeRefs) |
| 9124 |
/* harmony export */ }); |
| 9125 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 9126 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 9127 |
/* harmony import */ var _assignRef__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assignRef */ "./node_modules/use-callback-ref/dist/es2015/assignRef.js"); |
| 9128 |
/* harmony import */ var _useRef__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./useRef */ "./node_modules/use-callback-ref/dist/es2015/useRef.js"); |
| 9129 |
|
| 9130 |
|
| 9131 |
|
| 9132 |
var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect; |
| 9133 |
var currentValues = new WeakMap(); |
| 9134 |
/** |
| 9135 |
* Merges two or more refs together providing a single interface to set their value |
| 9136 |
* @param {RefObject|Ref} refs |
| 9137 |
* @returns {MutableRefObject} - a new ref, which translates all changes to {refs} |
| 9138 |
* |
| 9139 |
* @see {@link mergeRefs} a version without buit-in memoization |
| 9140 |
* @see https://github.com/theKashey/use-callback-ref#usemergerefs |
| 9141 |
* @example |
| 9142 |
* const Component = React.forwardRef((props, ref) => { |
| 9143 |
* const ownRef = useRef(); |
| 9144 |
* const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together |
| 9145 |
* return <div ref={domRef}>...</div> |
| 9146 |
* } |
| 9147 |
*/ |
| 9148 |
function useMergeRefs(refs, defaultValue) { |
| 9149 |
var callbackRef = (0,_useRef__WEBPACK_IMPORTED_MODULE_2__.useCallbackRef)(defaultValue || null, function (newValue) { |
| 9150 |
return refs.forEach(function (ref) { return (0,_assignRef__WEBPACK_IMPORTED_MODULE_1__.assignRef)(ref, newValue); }); |
| 9151 |
}); |
| 9152 |
// handle refs changes - added or removed |
| 9153 |
useIsomorphicLayoutEffect(function () { |
| 9154 |
var oldValue = currentValues.get(callbackRef); |
| 9155 |
if (oldValue) { |
| 9156 |
var prevRefs_1 = new Set(oldValue); |
| 9157 |
var nextRefs_1 = new Set(refs); |
| 9158 |
var current_1 = callbackRef.current; |
| 9159 |
prevRefs_1.forEach(function (ref) { |
| 9160 |
if (!nextRefs_1.has(ref)) { |
| 9161 |
(0,_assignRef__WEBPACK_IMPORTED_MODULE_1__.assignRef)(ref, null); |
| 9162 |
} |
| 9163 |
}); |
| 9164 |
nextRefs_1.forEach(function (ref) { |
| 9165 |
if (!prevRefs_1.has(ref)) { |
| 9166 |
(0,_assignRef__WEBPACK_IMPORTED_MODULE_1__.assignRef)(ref, current_1); |
| 9167 |
} |
| 9168 |
}); |
| 9169 |
} |
| 9170 |
currentValues.set(callbackRef, refs); |
| 9171 |
}, [refs]); |
| 9172 |
return callbackRef; |
| 9173 |
} |
| 9174 |
|
| 9175 |
|
| 9176 |
/***/ }, |
| 9177 |
|
| 9178 |
/***/ "./node_modules/use-callback-ref/dist/es2015/useRef.js" |
| 9179 |
/*!*************************************************************!*\ |
| 9180 |
!*** ./node_modules/use-callback-ref/dist/es2015/useRef.js ***! |
| 9181 |
\*************************************************************/ |
| 9182 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 9183 |
|
| 9184 |
__webpack_require__.r(__webpack_exports__); |
| 9185 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9186 |
/* harmony export */ useCallbackRef: () => (/* binding */ useCallbackRef) |
| 9187 |
/* harmony export */ }); |
| 9188 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 9189 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 9190 |
|
| 9191 |
/** |
| 9192 |
* creates a MutableRef with ref change callback |
| 9193 |
* @param initialValue - initial ref value |
| 9194 |
* @param {Function} callback - a callback to run when value changes |
| 9195 |
* |
| 9196 |
* @example |
| 9197 |
* const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue); |
| 9198 |
* ref.current = 1; |
| 9199 |
* // prints 0 -> 1 |
| 9200 |
* |
| 9201 |
* @see https://reactjs.org/docs/hooks-reference.html#useref |
| 9202 |
* @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref |
| 9203 |
* @returns {MutableRefObject} |
| 9204 |
*/ |
| 9205 |
function useCallbackRef(initialValue, callback) { |
| 9206 |
var ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(function () { return ({ |
| 9207 |
// value |
| 9208 |
value: initialValue, |
| 9209 |
// last callback |
| 9210 |
callback: callback, |
| 9211 |
// "memoized" public interface |
| 9212 |
facade: { |
| 9213 |
get current() { |
| 9214 |
return ref.value; |
| 9215 |
}, |
| 9216 |
set current(value) { |
| 9217 |
var last = ref.value; |
| 9218 |
if (last !== value) { |
| 9219 |
ref.value = value; |
| 9220 |
ref.callback(value, last); |
| 9221 |
} |
| 9222 |
}, |
| 9223 |
}, |
| 9224 |
}); })[0]; |
| 9225 |
// update callback |
| 9226 |
ref.callback = callback; |
| 9227 |
return ref.facade; |
| 9228 |
} |
| 9229 |
|
| 9230 |
|
| 9231 |
/***/ }, |
| 9232 |
|
| 9233 |
/***/ "./node_modules/use-sidecar/dist/es2015/exports.js" |
| 9234 |
/*!*********************************************************!*\ |
| 9235 |
!*** ./node_modules/use-sidecar/dist/es2015/exports.js ***! |
| 9236 |
\*********************************************************/ |
| 9237 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 9238 |
|
| 9239 |
__webpack_require__.r(__webpack_exports__); |
| 9240 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9241 |
/* harmony export */ exportSidecar: () => (/* binding */ exportSidecar) |
| 9242 |
/* harmony export */ }); |
| 9243 |
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs"); |
| 9244 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); |
| 9245 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); |
| 9246 |
|
| 9247 |
|
| 9248 |
var SideCar = function (_a) { |
| 9249 |
var sideCar = _a.sideCar, rest = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__rest)(_a, ["sideCar"]); |
| 9250 |
if (!sideCar) { |
| 9251 |
throw new Error('Sidecar: please provide `sideCar` property to import the right car'); |
| 9252 |
} |
| 9253 |
var Target = sideCar.read(); |
| 9254 |
if (!Target) { |
| 9255 |
throw new Error('Sidecar medium not found'); |
| 9256 |
} |
| 9257 |
return react__WEBPACK_IMPORTED_MODULE_1__.createElement(Target, (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, rest)); |
| 9258 |
}; |
| 9259 |
SideCar.isSideCarExport = true; |
| 9260 |
function exportSidecar(medium, exported) { |
| 9261 |
medium.useMedium(exported); |
| 9262 |
return SideCar; |
| 9263 |
} |
| 9264 |
|
| 9265 |
|
| 9266 |
/***/ }, |
| 9267 |
|
| 9268 |
/***/ "./node_modules/use-sidecar/dist/es2015/medium.js" |
| 9269 |
/*!********************************************************!*\ |
| 9270 |
!*** ./node_modules/use-sidecar/dist/es2015/medium.js ***! |
| 9271 |
\********************************************************/ |
| 9272 |
(__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 9273 |
|
| 9274 |
__webpack_require__.r(__webpack_exports__); |
| 9275 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9276 |
/* harmony export */ createMedium: () => (/* binding */ createMedium), |
| 9277 |
/* harmony export */ createSidecarMedium: () => (/* binding */ createSidecarMedium) |
| 9278 |
/* harmony export */ }); |
| 9279 |
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.mjs"); |
| 9280 |
|
| 9281 |
function ItoI(a) { |
| 9282 |
return a; |
| 9283 |
} |
| 9284 |
function innerCreateMedium(defaults, middleware) { |
| 9285 |
if (middleware === void 0) { middleware = ItoI; } |
| 9286 |
var buffer = []; |
| 9287 |
var assigned = false; |
| 9288 |
var medium = { |
| 9289 |
read: function () { |
| 9290 |
if (assigned) { |
| 9291 |
throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.'); |
| 9292 |
} |
| 9293 |
if (buffer.length) { |
| 9294 |
return buffer[buffer.length - 1]; |
| 9295 |
} |
| 9296 |
return defaults; |
| 9297 |
}, |
| 9298 |
useMedium: function (data) { |
| 9299 |
var item = middleware(data, assigned); |
| 9300 |
buffer.push(item); |
| 9301 |
return function () { |
| 9302 |
buffer = buffer.filter(function (x) { return x !== item; }); |
| 9303 |
}; |
| 9304 |
}, |
| 9305 |
assignSyncMedium: function (cb) { |
| 9306 |
assigned = true; |
| 9307 |
while (buffer.length) { |
| 9308 |
var cbs = buffer; |
| 9309 |
buffer = []; |
| 9310 |
cbs.forEach(cb); |
| 9311 |
} |
| 9312 |
buffer = { |
| 9313 |
push: function (x) { return cb(x); }, |
| 9314 |
filter: function () { return buffer; }, |
| 9315 |
}; |
| 9316 |
}, |
| 9317 |
assignMedium: function (cb) { |
| 9318 |
assigned = true; |
| 9319 |
var pendingQueue = []; |
| 9320 |
if (buffer.length) { |
| 9321 |
var cbs = buffer; |
| 9322 |
buffer = []; |
| 9323 |
cbs.forEach(cb); |
| 9324 |
pendingQueue = buffer; |
| 9325 |
} |
| 9326 |
var executeQueue = function () { |
| 9327 |
var cbs = pendingQueue; |
| 9328 |
pendingQueue = []; |
| 9329 |
cbs.forEach(cb); |
| 9330 |
}; |
| 9331 |
var cycle = function () { return Promise.resolve().then(executeQueue); }; |
| 9332 |
cycle(); |
| 9333 |
buffer = { |
| 9334 |
push: function (x) { |
| 9335 |
pendingQueue.push(x); |
| 9336 |
cycle(); |
| 9337 |
}, |
| 9338 |
filter: function (filter) { |
| 9339 |
pendingQueue = pendingQueue.filter(filter); |
| 9340 |
return buffer; |
| 9341 |
}, |
| 9342 |
}; |
| 9343 |
}, |
| 9344 |
}; |
| 9345 |
return medium; |
| 9346 |
} |
| 9347 |
function createMedium(defaults, middleware) { |
| 9348 |
if (middleware === void 0) { middleware = ItoI; } |
| 9349 |
return innerCreateMedium(defaults, middleware); |
| 9350 |
} |
| 9351 |
// eslint-disable-next-line @typescript-eslint/ban-types |
| 9352 |
function createSidecarMedium(options) { |
| 9353 |
if (options === void 0) { options = {}; } |
| 9354 |
var medium = innerCreateMedium(null); |
| 9355 |
medium.options = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({ async: true, ssr: false }, options); |
| 9356 |
return medium; |
| 9357 |
} |
| 9358 |
|
| 9359 |
|
| 9360 |
/***/ }, |
| 9361 |
|
| 9362 |
/***/ "react" |
| 9363 |
/*!************************!*\ |
| 9364 |
!*** external "React" ***! |
| 9365 |
\************************/ |
| 9366 |
(module) { |
| 9367 |
|
| 9368 |
module.exports = window["React"]; |
| 9369 |
|
| 9370 |
/***/ }, |
| 9371 |
|
| 9372 |
/***/ "react-dom" |
| 9373 |
/*!***************************!*\ |
| 9374 |
!*** external "ReactDOM" ***! |
| 9375 |
\***************************/ |
| 9376 |
(module) { |
| 9377 |
|
| 9378 |
module.exports = window["ReactDOM"]; |
| 9379 |
|
| 9380 |
/***/ }, |
| 9381 |
|
| 9382 |
/***/ "react/jsx-runtime" |
| 9383 |
/*!**********************************!*\ |
| 9384 |
!*** external "ReactJSXRuntime" ***! |
| 9385 |
\**********************************/ |
| 9386 |
(module) { |
| 9387 |
|
| 9388 |
module.exports = window["ReactJSXRuntime"]; |
| 9389 |
|
| 9390 |
/***/ }, |
| 9391 |
|
| 9392 |
/***/ "@wordpress/api-fetch" |
| 9393 |
/*!**********************************!*\ |
| 9394 |
!*** external ["wp","apiFetch"] ***! |
| 9395 |
\**********************************/ |
| 9396 |
(module) { |
| 9397 |
|
| 9398 |
module.exports = window["wp"]["apiFetch"]; |
| 9399 |
|
| 9400 |
/***/ }, |
| 9401 |
|
| 9402 |
/***/ "@wordpress/components" |
| 9403 |
/*!************************************!*\ |
| 9404 |
!*** external ["wp","components"] ***! |
| 9405 |
\************************************/ |
| 9406 |
(module) { |
| 9407 |
|
| 9408 |
module.exports = window["wp"]["components"]; |
| 9409 |
|
| 9410 |
/***/ }, |
| 9411 |
|
| 9412 |
/***/ "@wordpress/data" |
| 9413 |
/*!******************************!*\ |
| 9414 |
!*** external ["wp","data"] ***! |
| 9415 |
\******************************/ |
| 9416 |
(module) { |
| 9417 |
|
| 9418 |
module.exports = window["wp"]["data"]; |
| 9419 |
|
| 9420 |
/***/ }, |
| 9421 |
|
| 9422 |
/***/ "@wordpress/element" |
| 9423 |
/*!*********************************!*\ |
| 9424 |
!*** external ["wp","element"] ***! |
| 9425 |
\*********************************/ |
| 9426 |
(module) { |
| 9427 |
|
| 9428 |
module.exports = window["wp"]["element"]; |
| 9429 |
|
| 9430 |
/***/ }, |
| 9431 |
|
| 9432 |
/***/ "@wordpress/i18n" |
| 9433 |
/*!******************************!*\ |
| 9434 |
!*** external ["wp","i18n"] ***! |
| 9435 |
\******************************/ |
| 9436 |
(module) { |
| 9437 |
|
| 9438 |
module.exports = window["wp"]["i18n"]; |
| 9439 |
|
| 9440 |
/***/ }, |
| 9441 |
|
| 9442 |
/***/ "./node_modules/@floating-ui/core/dist/floating-ui.core.mjs" |
| 9443 |
/*!******************************************************************!*\ |
| 9444 |
!*** ./node_modules/@floating-ui/core/dist/floating-ui.core.mjs ***! |
| 9445 |
\******************************************************************/ |
| 9446 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 9447 |
|
| 9448 |
__webpack_require__.r(__webpack_exports__); |
| 9449 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 9450 |
/* harmony export */ arrow: () => (/* binding */ arrow), |
| 9451 |
/* harmony export */ autoPlacement: () => (/* binding */ autoPlacement), |
| 9452 |
/* harmony export */ computePosition: () => (/* binding */ computePosition), |
| 9453 |
/* harmony export */ detectOverflow: () => (/* binding */ detectOverflow), |
| 9454 |
/* harmony export */ flip: () => (/* binding */ flip), |
| 9455 |
/* harmony export */ hide: () => (/* binding */ hide), |
| 9456 |
/* harmony export */ inline: () => (/* binding */ inline), |
| 9457 |
/* harmony export */ limitShift: () => (/* binding */ limitShift), |
| 9458 |
/* harmony export */ offset: () => (/* binding */ offset), |
| 9459 |
/* harmony export */ rectToClientRect: () => (/* reexport safe */ _floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.rectToClientRect), |
| 9460 |
/* harmony export */ shift: () => (/* binding */ shift), |
| 9461 |
/* harmony export */ size: () => (/* binding */ size) |
| 9462 |
/* harmony export */ }); |
| 9463 |
/* harmony import */ var _floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @floating-ui/utils */ "./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs"); |
| 9464 |
|
| 9465 |
|
| 9466 |
|
| 9467 |
function computeCoordsFromPlacement(_ref, placement, rtl) { |
| 9468 |
let { |
| 9469 |
reference, |
| 9470 |
floating |
| 9471 |
} = _ref; |
| 9472 |
const sideAxis = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSideAxis)(placement); |
| 9473 |
const alignmentAxis = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAlignmentAxis)(placement); |
| 9474 |
const alignLength = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAxisLength)(alignmentAxis); |
| 9475 |
const side = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSide)(placement); |
| 9476 |
const isVertical = sideAxis === 'y'; |
| 9477 |
const commonX = reference.x + reference.width / 2 - floating.width / 2; |
| 9478 |
const commonY = reference.y + reference.height / 2 - floating.height / 2; |
| 9479 |
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2; |
| 9480 |
let coords; |
| 9481 |
switch (side) { |
| 9482 |
case 'top': |
| 9483 |
coords = { |
| 9484 |
x: commonX, |
| 9485 |
y: reference.y - floating.height |
| 9486 |
}; |
| 9487 |
break; |
| 9488 |
case 'bottom': |
| 9489 |
coords = { |
| 9490 |
x: commonX, |
| 9491 |
y: reference.y + reference.height |
| 9492 |
}; |
| 9493 |
break; |
| 9494 |
case 'right': |
| 9495 |
coords = { |
| 9496 |
x: reference.x + reference.width, |
| 9497 |
y: commonY |
| 9498 |
}; |
| 9499 |
break; |
| 9500 |
case 'left': |
| 9501 |
coords = { |
| 9502 |
x: reference.x - floating.width, |
| 9503 |
y: commonY |
| 9504 |
}; |
| 9505 |
break; |
| 9506 |
default: |
| 9507 |
coords = { |
| 9508 |
x: reference.x, |
| 9509 |
y: reference.y |
| 9510 |
}; |
| 9511 |
} |
| 9512 |
switch ((0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAlignment)(placement)) { |
| 9513 |
case 'start': |
| 9514 |
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1); |
| 9515 |
break; |
| 9516 |
case 'end': |
| 9517 |
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1); |
| 9518 |
break; |
| 9519 |
} |
| 9520 |
return coords; |
| 9521 |
} |
| 9522 |
|
| 9523 |
/** |
| 9524 |
* Resolves with an object of overflow side offsets that determine how much the |
| 9525 |
* element is overflowing a given clipping boundary on each side. |
| 9526 |
* - positive = overflowing the boundary by that number of pixels |
| 9527 |
* - negative = how many pixels left before it will overflow |
| 9528 |
* - 0 = lies flush with the boundary |
| 9529 |
* @see https://floating-ui.com/docs/detectOverflow |
| 9530 |
*/ |
| 9531 |
async function detectOverflow(state, options) { |
| 9532 |
var _await$platform$isEle; |
| 9533 |
if (options === void 0) { |
| 9534 |
options = {}; |
| 9535 |
} |
| 9536 |
const { |
| 9537 |
x, |
| 9538 |
y, |
| 9539 |
platform, |
| 9540 |
rects, |
| 9541 |
elements, |
| 9542 |
strategy |
| 9543 |
} = state; |
| 9544 |
const { |
| 9545 |
boundary = 'clippingAncestors', |
| 9546 |
rootBoundary = 'viewport', |
| 9547 |
elementContext = 'floating', |
| 9548 |
altBoundary = false, |
| 9549 |
padding = 0 |
| 9550 |
} = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.evaluate)(options, state); |
| 9551 |
const paddingObject = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getPaddingObject)(padding); |
| 9552 |
const altContext = elementContext === 'floating' ? 'reference' : 'floating'; |
| 9553 |
const element = elements[altBoundary ? altContext : elementContext]; |
| 9554 |
const clippingClientRect = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.rectToClientRect)(await platform.getClippingRect({ |
| 9555 |
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))), |
| 9556 |
boundary, |
| 9557 |
rootBoundary, |
| 9558 |
strategy |
| 9559 |
})); |
| 9560 |
const rect = elementContext === 'floating' ? { |
| 9561 |
x, |
| 9562 |
y, |
| 9563 |
width: rects.floating.width, |
| 9564 |
height: rects.floating.height |
| 9565 |
} : rects.reference; |
| 9566 |
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)); |
| 9567 |
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || { |
| 9568 |
x: 1, |
| 9569 |
y: 1 |
| 9570 |
} : { |
| 9571 |
x: 1, |
| 9572 |
y: 1 |
| 9573 |
}; |
| 9574 |
const elementClientRect = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.rectToClientRect)(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({ |
| 9575 |
elements, |
| 9576 |
rect, |
| 9577 |
offsetParent, |
| 9578 |
strategy |
| 9579 |
}) : rect); |
| 9580 |
return { |
| 9581 |
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y, |
| 9582 |
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y, |
| 9583 |
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x, |
| 9584 |
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x |
| 9585 |
}; |
| 9586 |
} |
| 9587 |
|
| 9588 |
/** |
| 9589 |
* Computes the `x` and `y` coordinates that will place the floating element |
| 9590 |
* next to a given reference element. |
| 9591 |
* |
| 9592 |
* This export does not have any `platform` interface logic. You will need to |
| 9593 |
* write one for the platform you are using Floating UI with. |
| 9594 |
*/ |
| 9595 |
const computePosition = async (reference, floating, config) => { |
| 9596 |
const { |
| 9597 |
placement = 'bottom', |
| 9598 |
strategy = 'absolute', |
| 9599 |
middleware = [], |
| 9600 |
platform |
| 9601 |
} = config; |
| 9602 |
const validMiddleware = middleware.filter(Boolean); |
| 9603 |
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating)); |
| 9604 |
let rects = await platform.getElementRects({ |
| 9605 |
reference, |
| 9606 |
floating, |
| 9607 |
strategy |
| 9608 |
}); |
| 9609 |
let { |
| 9610 |
x, |
| 9611 |
y |
| 9612 |
} = computeCoordsFromPlacement(rects, placement, rtl); |
| 9613 |
let statefulPlacement = placement; |
| 9614 |
let middlewareData = {}; |
| 9615 |
let resetCount = 0; |
| 9616 |
for (let i = 0; i < validMiddleware.length; i++) { |
| 9617 |
var _platform$detectOverf; |
| 9618 |
const { |
| 9619 |
name, |
| 9620 |
fn |
| 9621 |
} = validMiddleware[i]; |
| 9622 |
const { |
| 9623 |
x: nextX, |
| 9624 |
y: nextY, |
| 9625 |
data, |
| 9626 |
reset |
| 9627 |
} = await fn({ |
| 9628 |
x, |
| 9629 |
y, |
| 9630 |
initialPlacement: placement, |
| 9631 |
placement: statefulPlacement, |
| 9632 |
strategy, |
| 9633 |
middlewareData, |
| 9634 |
rects, |
| 9635 |
platform: { |
| 9636 |
...platform, |
| 9637 |
detectOverflow: (_platform$detectOverf = platform.detectOverflow) != null ? _platform$detectOverf : detectOverflow |
| 9638 |
}, |
| 9639 |
elements: { |
| 9640 |
reference, |
| 9641 |
floating |
| 9642 |
} |
| 9643 |
}); |
| 9644 |
x = nextX != null ? nextX : x; |
| 9645 |
y = nextY != null ? nextY : y; |
| 9646 |
middlewareData = { |
| 9647 |
...middlewareData, |
| 9648 |
[name]: { |
| 9649 |
...middlewareData[name], |
| 9650 |
...data |
| 9651 |
} |
| 9652 |
}; |
| 9653 |
if (reset && resetCount <= 50) { |
| 9654 |
resetCount++; |
| 9655 |
if (typeof reset === 'object') { |
| 9656 |
if (reset.placement) { |
| 9657 |
statefulPlacement = reset.placement; |
| 9658 |
} |
| 9659 |
if (reset.rects) { |
| 9660 |
rects = reset.rects === true ? await platform.getElementRects({ |
| 9661 |
reference, |
| 9662 |
floating, |
| 9663 |
strategy |
| 9664 |
}) : reset.rects; |
| 9665 |
} |
| 9666 |
({ |
| 9667 |
x, |
| 9668 |
y |
| 9669 |
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl)); |
| 9670 |
} |
| 9671 |
i = -1; |
| 9672 |
} |
| 9673 |
} |
| 9674 |
return { |
| 9675 |
x, |
| 9676 |
y, |
| 9677 |
placement: statefulPlacement, |
| 9678 |
strategy, |
| 9679 |
middlewareData |
| 9680 |
}; |
| 9681 |
}; |
| 9682 |
|
| 9683 |
/** |
| 9684 |
* Provides data to position an inner element of the floating element so that it |
| 9685 |
* appears centered to the reference element. |
| 9686 |
* @see https://floating-ui.com/docs/arrow |
| 9687 |
*/ |
| 9688 |
const arrow = options => ({ |
| 9689 |
name: 'arrow', |
| 9690 |
options, |
| 9691 |
async fn(state) { |
| 9692 |
const { |
| 9693 |
x, |
| 9694 |
y, |
| 9695 |
placement, |
| 9696 |
rects, |
| 9697 |
platform, |
| 9698 |
elements, |
| 9699 |
middlewareData |
| 9700 |
} = state; |
| 9701 |
// Since `element` is required, we don't Partial<> the type. |
| 9702 |
const { |
| 9703 |
element, |
| 9704 |
padding = 0 |
| 9705 |
} = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.evaluate)(options, state) || {}; |
| 9706 |
if (element == null) { |
| 9707 |
return {}; |
| 9708 |
} |
| 9709 |
const paddingObject = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getPaddingObject)(padding); |
| 9710 |
const coords = { |
| 9711 |
x, |
| 9712 |
y |
| 9713 |
}; |
| 9714 |
const axis = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAlignmentAxis)(placement); |
| 9715 |
const length = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAxisLength)(axis); |
| 9716 |
const arrowDimensions = await platform.getDimensions(element); |
| 9717 |
const isYAxis = axis === 'y'; |
| 9718 |
const minProp = isYAxis ? 'top' : 'left'; |
| 9719 |
const maxProp = isYAxis ? 'bottom' : 'right'; |
| 9720 |
const clientProp = isYAxis ? 'clientHeight' : 'clientWidth'; |
| 9721 |
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length]; |
| 9722 |
const startDiff = coords[axis] - rects.reference[axis]; |
| 9723 |
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element)); |
| 9724 |
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0; |
| 9725 |
|
| 9726 |
// DOM platform can return `window` as the `offsetParent`. |
| 9727 |
if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) { |
| 9728 |
clientSize = elements.floating[clientProp] || rects.floating[length]; |
| 9729 |
} |
| 9730 |
const centerToReference = endDiff / 2 - startDiff / 2; |
| 9731 |
|
| 9732 |
// If the padding is large enough that it causes the arrow to no longer be |
| 9733 |
// centered, modify the padding so that it is centered. |
| 9734 |
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1; |
| 9735 |
const minPadding = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.min)(paddingObject[minProp], largestPossiblePadding); |
| 9736 |
const maxPadding = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.min)(paddingObject[maxProp], largestPossiblePadding); |
| 9737 |
|
| 9738 |
// Make sure the arrow doesn't overflow the floating element if the center |
| 9739 |
// point is outside the floating element's bounds. |
| 9740 |
const min$1 = minPadding; |
| 9741 |
const max = clientSize - arrowDimensions[length] - maxPadding; |
| 9742 |
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference; |
| 9743 |
const offset = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.clamp)(min$1, center, max); |
| 9744 |
|
| 9745 |
// If the reference is small enough that the arrow's padding causes it to |
| 9746 |
// to point to nothing for an aligned placement, adjust the offset of the |
| 9747 |
// floating element itself. To ensure `shift()` continues to take action, |
| 9748 |
// a single reset is performed when this is true. |
| 9749 |
const shouldAddOffset = !middlewareData.arrow && (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAlignment)(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0; |
| 9750 |
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0; |
| 9751 |
return { |
| 9752 |
[axis]: coords[axis] + alignmentOffset, |
| 9753 |
data: { |
| 9754 |
[axis]: offset, |
| 9755 |
centerOffset: center - offset - alignmentOffset, |
| 9756 |
...(shouldAddOffset && { |
| 9757 |
alignmentOffset |
| 9758 |
}) |
| 9759 |
}, |
| 9760 |
reset: shouldAddOffset |
| 9761 |
}; |
| 9762 |
} |
| 9763 |
}); |
| 9764 |
|
| 9765 |
function getPlacementList(alignment, autoAlignment, allowedPlacements) { |
| 9766 |
const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAlignment)(placement) === alignment), ...allowedPlacements.filter(placement => (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAlignment)(placement) !== alignment)] : allowedPlacements.filter(placement => (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSide)(placement) === placement); |
| 9767 |
return allowedPlacementsSortedByAlignment.filter(placement => { |
| 9768 |
if (alignment) { |
| 9769 |
return (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAlignment)(placement) === alignment || (autoAlignment ? (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getOppositeAlignmentPlacement)(placement) !== placement : false); |
| 9770 |
} |
| 9771 |
return true; |
| 9772 |
}); |
| 9773 |
} |
| 9774 |
/** |
| 9775 |
* Optimizes the visibility of the floating element by choosing the placement |
| 9776 |
* that has the most space available automatically, without needing to specify a |
| 9777 |
* preferred placement. Alternative to `flip`. |
| 9778 |
* @see https://floating-ui.com/docs/autoPlacement |
| 9779 |
*/ |
| 9780 |
const autoPlacement = function (options) { |
| 9781 |
if (options === void 0) { |
| 9782 |
options = {}; |
| 9783 |
} |
| 9784 |
return { |
| 9785 |
name: 'autoPlacement', |
| 9786 |
options, |
| 9787 |
async fn(state) { |
| 9788 |
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE; |
| 9789 |
const { |
| 9790 |
rects, |
| 9791 |
middlewareData, |
| 9792 |
placement, |
| 9793 |
platform, |
| 9794 |
elements |
| 9795 |
} = state; |
| 9796 |
const { |
| 9797 |
crossAxis = false, |
| 9798 |
alignment, |
| 9799 |
allowedPlacements = _floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.placements, |
| 9800 |
autoAlignment = true, |
| 9801 |
...detectOverflowOptions |
| 9802 |
} = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.evaluate)(options, state); |
| 9803 |
const placements$1 = alignment !== undefined || allowedPlacements === _floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements; |
| 9804 |
const overflow = await platform.detectOverflow(state, detectOverflowOptions); |
| 9805 |
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0; |
| 9806 |
const currentPlacement = placements$1[currentIndex]; |
| 9807 |
if (currentPlacement == null) { |
| 9808 |
return {}; |
| 9809 |
} |
| 9810 |
const alignmentSides = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAlignmentSides)(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))); |
| 9811 |
|
| 9812 |
// Make `computeCoords` start from the right place. |
| 9813 |
if (placement !== currentPlacement) { |
| 9814 |
return { |
| 9815 |
reset: { |
| 9816 |
placement: placements$1[0] |
| 9817 |
} |
| 9818 |
}; |
| 9819 |
} |
| 9820 |
const currentOverflows = [overflow[(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSide)(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]]; |
| 9821 |
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), { |
| 9822 |
placement: currentPlacement, |
| 9823 |
overflows: currentOverflows |
| 9824 |
}]; |
| 9825 |
const nextPlacement = placements$1[currentIndex + 1]; |
| 9826 |
|
| 9827 |
// There are more placements to check. |
| 9828 |
if (nextPlacement) { |
| 9829 |
return { |
| 9830 |
data: { |
| 9831 |
index: currentIndex + 1, |
| 9832 |
overflows: allOverflows |
| 9833 |
}, |
| 9834 |
reset: { |
| 9835 |
placement: nextPlacement |
| 9836 |
} |
| 9837 |
}; |
| 9838 |
} |
| 9839 |
const placementsSortedByMostSpace = allOverflows.map(d => { |
| 9840 |
const alignment = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAlignment)(d.placement); |
| 9841 |
return [d.placement, alignment && crossAxis ? |
| 9842 |
// Check along the mainAxis and main crossAxis side. |
| 9843 |
d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) : |
| 9844 |
// Check only the mainAxis. |
| 9845 |
d.overflows[0], d.overflows]; |
| 9846 |
}).sort((a, b) => a[1] - b[1]); |
| 9847 |
const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0, |
| 9848 |
// Aligned placements should not check their opposite crossAxis |
| 9849 |
// side. |
| 9850 |
(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAlignment)(d[0]) ? 2 : 3).every(v => v <= 0)); |
| 9851 |
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0]; |
| 9852 |
if (resetPlacement !== placement) { |
| 9853 |
return { |
| 9854 |
data: { |
| 9855 |
index: currentIndex + 1, |
| 9856 |
overflows: allOverflows |
| 9857 |
}, |
| 9858 |
reset: { |
| 9859 |
placement: resetPlacement |
| 9860 |
} |
| 9861 |
}; |
| 9862 |
} |
| 9863 |
return {}; |
| 9864 |
} |
| 9865 |
}; |
| 9866 |
}; |
| 9867 |
|
| 9868 |
/** |
| 9869 |
* Optimizes the visibility of the floating element by flipping the `placement` |
| 9870 |
* in order to keep it in view when the preferred placement(s) will overflow the |
| 9871 |
* clipping boundary. Alternative to `autoPlacement`. |
| 9872 |
* @see https://floating-ui.com/docs/flip |
| 9873 |
*/ |
| 9874 |
const flip = function (options) { |
| 9875 |
if (options === void 0) { |
| 9876 |
options = {}; |
| 9877 |
} |
| 9878 |
return { |
| 9879 |
name: 'flip', |
| 9880 |
options, |
| 9881 |
async fn(state) { |
| 9882 |
var _middlewareData$arrow, _middlewareData$flip; |
| 9883 |
const { |
| 9884 |
placement, |
| 9885 |
middlewareData, |
| 9886 |
rects, |
| 9887 |
initialPlacement, |
| 9888 |
platform, |
| 9889 |
elements |
| 9890 |
} = state; |
| 9891 |
const { |
| 9892 |
mainAxis: checkMainAxis = true, |
| 9893 |
crossAxis: checkCrossAxis = true, |
| 9894 |
fallbackPlacements: specifiedFallbackPlacements, |
| 9895 |
fallbackStrategy = 'bestFit', |
| 9896 |
fallbackAxisSideDirection = 'none', |
| 9897 |
flipAlignment = true, |
| 9898 |
...detectOverflowOptions |
| 9899 |
} = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.evaluate)(options, state); |
| 9900 |
|
| 9901 |
// If a reset by the arrow was caused due to an alignment offset being |
| 9902 |
// added, we should skip any logic now since `flip()` has already done its |
| 9903 |
// work. |
| 9904 |
// https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643 |
| 9905 |
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { |
| 9906 |
return {}; |
| 9907 |
} |
| 9908 |
const side = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSide)(placement); |
| 9909 |
const initialSideAxis = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSideAxis)(initialPlacement); |
| 9910 |
const isBasePlacement = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSide)(initialPlacement) === initialPlacement; |
| 9911 |
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)); |
| 9912 |
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getOppositePlacement)(initialPlacement)] : (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getExpandedPlacements)(initialPlacement)); |
| 9913 |
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none'; |
| 9914 |
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) { |
| 9915 |
fallbackPlacements.push(...(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getOppositeAxisPlacements)(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)); |
| 9916 |
} |
| 9917 |
const placements = [initialPlacement, ...fallbackPlacements]; |
| 9918 |
const overflow = await platform.detectOverflow(state, detectOverflowOptions); |
| 9919 |
const overflows = []; |
| 9920 |
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || []; |
| 9921 |
if (checkMainAxis) { |
| 9922 |
overflows.push(overflow[side]); |
| 9923 |
} |
| 9924 |
if (checkCrossAxis) { |
| 9925 |
const sides = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAlignmentSides)(placement, rects, rtl); |
| 9926 |
overflows.push(overflow[sides[0]], overflow[sides[1]]); |
| 9927 |
} |
| 9928 |
overflowsData = [...overflowsData, { |
| 9929 |
placement, |
| 9930 |
overflows |
| 9931 |
}]; |
| 9932 |
|
| 9933 |
// One or more sides is overflowing. |
| 9934 |
if (!overflows.every(side => side <= 0)) { |
| 9935 |
var _middlewareData$flip2, _overflowsData$filter; |
| 9936 |
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1; |
| 9937 |
const nextPlacement = placements[nextIndex]; |
| 9938 |
if (nextPlacement) { |
| 9939 |
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSideAxis)(nextPlacement) : false; |
| 9940 |
if (!ignoreCrossAxisOverflow || |
| 9941 |
// We leave the current main axis only if every placement on that axis |
| 9942 |
// overflows the main axis. |
| 9943 |
overflowsData.every(d => (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSideAxis)(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) { |
| 9944 |
// Try next placement and re-run the lifecycle. |
| 9945 |
return { |
| 9946 |
data: { |
| 9947 |
index: nextIndex, |
| 9948 |
overflows: overflowsData |
| 9949 |
}, |
| 9950 |
reset: { |
| 9951 |
placement: nextPlacement |
| 9952 |
} |
| 9953 |
}; |
| 9954 |
} |
| 9955 |
} |
| 9956 |
|
| 9957 |
// First, find the candidates that fit on the mainAxis side of overflow, |
| 9958 |
// then find the placement that fits the best on the main crossAxis side. |
| 9959 |
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement; |
| 9960 |
|
| 9961 |
// Otherwise fallback. |
| 9962 |
if (!resetPlacement) { |
| 9963 |
switch (fallbackStrategy) { |
| 9964 |
case 'bestFit': |
| 9965 |
{ |
| 9966 |
var _overflowsData$filter2; |
| 9967 |
const placement = (_overflowsData$filter2 = overflowsData.filter(d => { |
| 9968 |
if (hasFallbackAxisSideDirection) { |
| 9969 |
const currentSideAxis = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSideAxis)(d.placement); |
| 9970 |
return currentSideAxis === initialSideAxis || |
| 9971 |
// Create a bias to the `y` side axis due to horizontal |
| 9972 |
// reading directions favoring greater width. |
| 9973 |
currentSideAxis === 'y'; |
| 9974 |
} |
| 9975 |
return true; |
| 9976 |
}).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0]; |
| 9977 |
if (placement) { |
| 9978 |
resetPlacement = placement; |
| 9979 |
} |
| 9980 |
break; |
| 9981 |
} |
| 9982 |
case 'initialPlacement': |
| 9983 |
resetPlacement = initialPlacement; |
| 9984 |
break; |
| 9985 |
} |
| 9986 |
} |
| 9987 |
if (placement !== resetPlacement) { |
| 9988 |
return { |
| 9989 |
reset: { |
| 9990 |
placement: resetPlacement |
| 9991 |
} |
| 9992 |
}; |
| 9993 |
} |
| 9994 |
} |
| 9995 |
return {}; |
| 9996 |
} |
| 9997 |
}; |
| 9998 |
}; |
| 9999 |
|
| 10000 |
function getSideOffsets(overflow, rect) { |
| 10001 |
return { |
| 10002 |
top: overflow.top - rect.height, |
| 10003 |
right: overflow.right - rect.width, |
| 10004 |
bottom: overflow.bottom - rect.height, |
| 10005 |
left: overflow.left - rect.width |
| 10006 |
}; |
| 10007 |
} |
| 10008 |
function isAnySideFullyClipped(overflow) { |
| 10009 |
return _floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.sides.some(side => overflow[side] >= 0); |
| 10010 |
} |
| 10011 |
/** |
| 10012 |
* Provides data to hide the floating element in applicable situations, such as |
| 10013 |
* when it is not in the same clipping context as the reference element. |
| 10014 |
* @see https://floating-ui.com/docs/hide |
| 10015 |
*/ |
| 10016 |
const hide = function (options) { |
| 10017 |
if (options === void 0) { |
| 10018 |
options = {}; |
| 10019 |
} |
| 10020 |
return { |
| 10021 |
name: 'hide', |
| 10022 |
options, |
| 10023 |
async fn(state) { |
| 10024 |
const { |
| 10025 |
rects, |
| 10026 |
platform |
| 10027 |
} = state; |
| 10028 |
const { |
| 10029 |
strategy = 'referenceHidden', |
| 10030 |
...detectOverflowOptions |
| 10031 |
} = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.evaluate)(options, state); |
| 10032 |
switch (strategy) { |
| 10033 |
case 'referenceHidden': |
| 10034 |
{ |
| 10035 |
const overflow = await platform.detectOverflow(state, { |
| 10036 |
...detectOverflowOptions, |
| 10037 |
elementContext: 'reference' |
| 10038 |
}); |
| 10039 |
const offsets = getSideOffsets(overflow, rects.reference); |
| 10040 |
return { |
| 10041 |
data: { |
| 10042 |
referenceHiddenOffsets: offsets, |
| 10043 |
referenceHidden: isAnySideFullyClipped(offsets) |
| 10044 |
} |
| 10045 |
}; |
| 10046 |
} |
| 10047 |
case 'escaped': |
| 10048 |
{ |
| 10049 |
const overflow = await platform.detectOverflow(state, { |
| 10050 |
...detectOverflowOptions, |
| 10051 |
altBoundary: true |
| 10052 |
}); |
| 10053 |
const offsets = getSideOffsets(overflow, rects.floating); |
| 10054 |
return { |
| 10055 |
data: { |
| 10056 |
escapedOffsets: offsets, |
| 10057 |
escaped: isAnySideFullyClipped(offsets) |
| 10058 |
} |
| 10059 |
}; |
| 10060 |
} |
| 10061 |
default: |
| 10062 |
{ |
| 10063 |
return {}; |
| 10064 |
} |
| 10065 |
} |
| 10066 |
} |
| 10067 |
}; |
| 10068 |
}; |
| 10069 |
|
| 10070 |
function getBoundingRect(rects) { |
| 10071 |
const minX = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.min)(...rects.map(rect => rect.left)); |
| 10072 |
const minY = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.min)(...rects.map(rect => rect.top)); |
| 10073 |
const maxX = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.max)(...rects.map(rect => rect.right)); |
| 10074 |
const maxY = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.max)(...rects.map(rect => rect.bottom)); |
| 10075 |
return { |
| 10076 |
x: minX, |
| 10077 |
y: minY, |
| 10078 |
width: maxX - minX, |
| 10079 |
height: maxY - minY |
| 10080 |
}; |
| 10081 |
} |
| 10082 |
function getRectsByLine(rects) { |
| 10083 |
const sortedRects = rects.slice().sort((a, b) => a.y - b.y); |
| 10084 |
const groups = []; |
| 10085 |
let prevRect = null; |
| 10086 |
for (let i = 0; i < sortedRects.length; i++) { |
| 10087 |
const rect = sortedRects[i]; |
| 10088 |
if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) { |
| 10089 |
groups.push([rect]); |
| 10090 |
} else { |
| 10091 |
groups[groups.length - 1].push(rect); |
| 10092 |
} |
| 10093 |
prevRect = rect; |
| 10094 |
} |
| 10095 |
return groups.map(rect => (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.rectToClientRect)(getBoundingRect(rect))); |
| 10096 |
} |
| 10097 |
/** |
| 10098 |
* Provides improved positioning for inline reference elements that can span |
| 10099 |
* over multiple lines, such as hyperlinks or range selections. |
| 10100 |
* @see https://floating-ui.com/docs/inline |
| 10101 |
*/ |
| 10102 |
const inline = function (options) { |
| 10103 |
if (options === void 0) { |
| 10104 |
options = {}; |
| 10105 |
} |
| 10106 |
return { |
| 10107 |
name: 'inline', |
| 10108 |
options, |
| 10109 |
async fn(state) { |
| 10110 |
const { |
| 10111 |
placement, |
| 10112 |
elements, |
| 10113 |
rects, |
| 10114 |
platform, |
| 10115 |
strategy |
| 10116 |
} = state; |
| 10117 |
// A MouseEvent's client{X,Y} coords can be up to 2 pixels off a |
| 10118 |
// ClientRect's bounds, despite the event listener being triggered. A |
| 10119 |
// padding of 2 seems to handle this issue. |
| 10120 |
const { |
| 10121 |
padding = 2, |
| 10122 |
x, |
| 10123 |
y |
| 10124 |
} = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.evaluate)(options, state); |
| 10125 |
const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []); |
| 10126 |
const clientRects = getRectsByLine(nativeClientRects); |
| 10127 |
const fallback = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.rectToClientRect)(getBoundingRect(nativeClientRects)); |
| 10128 |
const paddingObject = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getPaddingObject)(padding); |
| 10129 |
function getBoundingClientRect() { |
| 10130 |
// There are two rects and they are disjoined. |
| 10131 |
if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) { |
| 10132 |
// Find the first rect in which the point is fully inside. |
| 10133 |
return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback; |
| 10134 |
} |
| 10135 |
|
| 10136 |
// There are 2 or more connected rects. |
| 10137 |
if (clientRects.length >= 2) { |
| 10138 |
if ((0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSideAxis)(placement) === 'y') { |
| 10139 |
const firstRect = clientRects[0]; |
| 10140 |
const lastRect = clientRects[clientRects.length - 1]; |
| 10141 |
const isTop = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSide)(placement) === 'top'; |
| 10142 |
const top = firstRect.top; |
| 10143 |
const bottom = lastRect.bottom; |
| 10144 |
const left = isTop ? firstRect.left : lastRect.left; |
| 10145 |
const right = isTop ? firstRect.right : lastRect.right; |
| 10146 |
const width = right - left; |
| 10147 |
const height = bottom - top; |
| 10148 |
return { |
| 10149 |
top, |
| 10150 |
bottom, |
| 10151 |
left, |
| 10152 |
right, |
| 10153 |
width, |
| 10154 |
height, |
| 10155 |
x: left, |
| 10156 |
y: top |
| 10157 |
}; |
| 10158 |
} |
| 10159 |
const isLeftSide = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSide)(placement) === 'left'; |
| 10160 |
const maxRight = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.max)(...clientRects.map(rect => rect.right)); |
| 10161 |
const minLeft = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.min)(...clientRects.map(rect => rect.left)); |
| 10162 |
const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight); |
| 10163 |
const top = measureRects[0].top; |
| 10164 |
const bottom = measureRects[measureRects.length - 1].bottom; |
| 10165 |
const left = minLeft; |
| 10166 |
const right = maxRight; |
| 10167 |
const width = right - left; |
| 10168 |
const height = bottom - top; |
| 10169 |
return { |
| 10170 |
top, |
| 10171 |
bottom, |
| 10172 |
left, |
| 10173 |
right, |
| 10174 |
width, |
| 10175 |
height, |
| 10176 |
x: left, |
| 10177 |
y: top |
| 10178 |
}; |
| 10179 |
} |
| 10180 |
return fallback; |
| 10181 |
} |
| 10182 |
const resetRects = await platform.getElementRects({ |
| 10183 |
reference: { |
| 10184 |
getBoundingClientRect |
| 10185 |
}, |
| 10186 |
floating: elements.floating, |
| 10187 |
strategy |
| 10188 |
}); |
| 10189 |
if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) { |
| 10190 |
return { |
| 10191 |
reset: { |
| 10192 |
rects: resetRects |
| 10193 |
} |
| 10194 |
}; |
| 10195 |
} |
| 10196 |
return {}; |
| 10197 |
} |
| 10198 |
}; |
| 10199 |
}; |
| 10200 |
|
| 10201 |
const originSides = /*#__PURE__*/new Set(['left', 'top']); |
| 10202 |
|
| 10203 |
// For type backwards-compatibility, the `OffsetOptions` type was also |
| 10204 |
// Derivable. |
| 10205 |
|
| 10206 |
async function convertValueToCoords(state, options) { |
| 10207 |
const { |
| 10208 |
placement, |
| 10209 |
platform, |
| 10210 |
elements |
| 10211 |
} = state; |
| 10212 |
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)); |
| 10213 |
const side = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSide)(placement); |
| 10214 |
const alignment = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAlignment)(placement); |
| 10215 |
const isVertical = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSideAxis)(placement) === 'y'; |
| 10216 |
const mainAxisMulti = originSides.has(side) ? -1 : 1; |
| 10217 |
const crossAxisMulti = rtl && isVertical ? -1 : 1; |
| 10218 |
const rawValue = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.evaluate)(options, state); |
| 10219 |
|
| 10220 |
// eslint-disable-next-line prefer-const |
| 10221 |
let { |
| 10222 |
mainAxis, |
| 10223 |
crossAxis, |
| 10224 |
alignmentAxis |
| 10225 |
} = typeof rawValue === 'number' ? { |
| 10226 |
mainAxis: rawValue, |
| 10227 |
crossAxis: 0, |
| 10228 |
alignmentAxis: null |
| 10229 |
} : { |
| 10230 |
mainAxis: rawValue.mainAxis || 0, |
| 10231 |
crossAxis: rawValue.crossAxis || 0, |
| 10232 |
alignmentAxis: rawValue.alignmentAxis |
| 10233 |
}; |
| 10234 |
if (alignment && typeof alignmentAxis === 'number') { |
| 10235 |
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis; |
| 10236 |
} |
| 10237 |
return isVertical ? { |
| 10238 |
x: crossAxis * crossAxisMulti, |
| 10239 |
y: mainAxis * mainAxisMulti |
| 10240 |
} : { |
| 10241 |
x: mainAxis * mainAxisMulti, |
| 10242 |
y: crossAxis * crossAxisMulti |
| 10243 |
}; |
| 10244 |
} |
| 10245 |
|
| 10246 |
/** |
| 10247 |
* Modifies the placement by translating the floating element along the |
| 10248 |
* specified axes. |
| 10249 |
* A number (shorthand for `mainAxis` or distance), or an axes configuration |
| 10250 |
* object may be passed. |
| 10251 |
* @see https://floating-ui.com/docs/offset |
| 10252 |
*/ |
| 10253 |
const offset = function (options) { |
| 10254 |
if (options === void 0) { |
| 10255 |
options = 0; |
| 10256 |
} |
| 10257 |
return { |
| 10258 |
name: 'offset', |
| 10259 |
options, |
| 10260 |
async fn(state) { |
| 10261 |
var _middlewareData$offse, _middlewareData$arrow; |
| 10262 |
const { |
| 10263 |
x, |
| 10264 |
y, |
| 10265 |
placement, |
| 10266 |
middlewareData |
| 10267 |
} = state; |
| 10268 |
const diffCoords = await convertValueToCoords(state, options); |
| 10269 |
|
| 10270 |
// If the placement is the same and the arrow caused an alignment offset |
| 10271 |
// then we don't need to change the positioning coordinates. |
| 10272 |
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { |
| 10273 |
return {}; |
| 10274 |
} |
| 10275 |
return { |
| 10276 |
x: x + diffCoords.x, |
| 10277 |
y: y + diffCoords.y, |
| 10278 |
data: { |
| 10279 |
...diffCoords, |
| 10280 |
placement |
| 10281 |
} |
| 10282 |
}; |
| 10283 |
} |
| 10284 |
}; |
| 10285 |
}; |
| 10286 |
|
| 10287 |
/** |
| 10288 |
* Optimizes the visibility of the floating element by shifting it in order to |
| 10289 |
* keep it in view when it will overflow the clipping boundary. |
| 10290 |
* @see https://floating-ui.com/docs/shift |
| 10291 |
*/ |
| 10292 |
const shift = function (options) { |
| 10293 |
if (options === void 0) { |
| 10294 |
options = {}; |
| 10295 |
} |
| 10296 |
return { |
| 10297 |
name: 'shift', |
| 10298 |
options, |
| 10299 |
async fn(state) { |
| 10300 |
const { |
| 10301 |
x, |
| 10302 |
y, |
| 10303 |
placement, |
| 10304 |
platform |
| 10305 |
} = state; |
| 10306 |
const { |
| 10307 |
mainAxis: checkMainAxis = true, |
| 10308 |
crossAxis: checkCrossAxis = false, |
| 10309 |
limiter = { |
| 10310 |
fn: _ref => { |
| 10311 |
let { |
| 10312 |
x, |
| 10313 |
y |
| 10314 |
} = _ref; |
| 10315 |
return { |
| 10316 |
x, |
| 10317 |
y |
| 10318 |
}; |
| 10319 |
} |
| 10320 |
}, |
| 10321 |
...detectOverflowOptions |
| 10322 |
} = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.evaluate)(options, state); |
| 10323 |
const coords = { |
| 10324 |
x, |
| 10325 |
y |
| 10326 |
}; |
| 10327 |
const overflow = await platform.detectOverflow(state, detectOverflowOptions); |
| 10328 |
const crossAxis = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSideAxis)((0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSide)(placement)); |
| 10329 |
const mainAxis = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getOppositeAxis)(crossAxis); |
| 10330 |
let mainAxisCoord = coords[mainAxis]; |
| 10331 |
let crossAxisCoord = coords[crossAxis]; |
| 10332 |
if (checkMainAxis) { |
| 10333 |
const minSide = mainAxis === 'y' ? 'top' : 'left'; |
| 10334 |
const maxSide = mainAxis === 'y' ? 'bottom' : 'right'; |
| 10335 |
const min = mainAxisCoord + overflow[minSide]; |
| 10336 |
const max = mainAxisCoord - overflow[maxSide]; |
| 10337 |
mainAxisCoord = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.clamp)(min, mainAxisCoord, max); |
| 10338 |
} |
| 10339 |
if (checkCrossAxis) { |
| 10340 |
const minSide = crossAxis === 'y' ? 'top' : 'left'; |
| 10341 |
const maxSide = crossAxis === 'y' ? 'bottom' : 'right'; |
| 10342 |
const min = crossAxisCoord + overflow[minSide]; |
| 10343 |
const max = crossAxisCoord - overflow[maxSide]; |
| 10344 |
crossAxisCoord = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.clamp)(min, crossAxisCoord, max); |
| 10345 |
} |
| 10346 |
const limitedCoords = limiter.fn({ |
| 10347 |
...state, |
| 10348 |
[mainAxis]: mainAxisCoord, |
| 10349 |
[crossAxis]: crossAxisCoord |
| 10350 |
}); |
| 10351 |
return { |
| 10352 |
...limitedCoords, |
| 10353 |
data: { |
| 10354 |
x: limitedCoords.x - x, |
| 10355 |
y: limitedCoords.y - y, |
| 10356 |
enabled: { |
| 10357 |
[mainAxis]: checkMainAxis, |
| 10358 |
[crossAxis]: checkCrossAxis |
| 10359 |
} |
| 10360 |
} |
| 10361 |
}; |
| 10362 |
} |
| 10363 |
}; |
| 10364 |
}; |
| 10365 |
/** |
| 10366 |
* Built-in `limiter` that will stop `shift()` at a certain point. |
| 10367 |
*/ |
| 10368 |
const limitShift = function (options) { |
| 10369 |
if (options === void 0) { |
| 10370 |
options = {}; |
| 10371 |
} |
| 10372 |
return { |
| 10373 |
options, |
| 10374 |
fn(state) { |
| 10375 |
const { |
| 10376 |
x, |
| 10377 |
y, |
| 10378 |
placement, |
| 10379 |
rects, |
| 10380 |
middlewareData |
| 10381 |
} = state; |
| 10382 |
const { |
| 10383 |
offset = 0, |
| 10384 |
mainAxis: checkMainAxis = true, |
| 10385 |
crossAxis: checkCrossAxis = true |
| 10386 |
} = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.evaluate)(options, state); |
| 10387 |
const coords = { |
| 10388 |
x, |
| 10389 |
y |
| 10390 |
}; |
| 10391 |
const crossAxis = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSideAxis)(placement); |
| 10392 |
const mainAxis = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getOppositeAxis)(crossAxis); |
| 10393 |
let mainAxisCoord = coords[mainAxis]; |
| 10394 |
let crossAxisCoord = coords[crossAxis]; |
| 10395 |
const rawOffset = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.evaluate)(offset, state); |
| 10396 |
const computedOffset = typeof rawOffset === 'number' ? { |
| 10397 |
mainAxis: rawOffset, |
| 10398 |
crossAxis: 0 |
| 10399 |
} : { |
| 10400 |
mainAxis: 0, |
| 10401 |
crossAxis: 0, |
| 10402 |
...rawOffset |
| 10403 |
}; |
| 10404 |
if (checkMainAxis) { |
| 10405 |
const len = mainAxis === 'y' ? 'height' : 'width'; |
| 10406 |
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis; |
| 10407 |
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis; |
| 10408 |
if (mainAxisCoord < limitMin) { |
| 10409 |
mainAxisCoord = limitMin; |
| 10410 |
} else if (mainAxisCoord > limitMax) { |
| 10411 |
mainAxisCoord = limitMax; |
| 10412 |
} |
| 10413 |
} |
| 10414 |
if (checkCrossAxis) { |
| 10415 |
var _middlewareData$offse, _middlewareData$offse2; |
| 10416 |
const len = mainAxis === 'y' ? 'width' : 'height'; |
| 10417 |
const isOriginSide = originSides.has((0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSide)(placement)); |
| 10418 |
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis); |
| 10419 |
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0); |
| 10420 |
if (crossAxisCoord < limitMin) { |
| 10421 |
crossAxisCoord = limitMin; |
| 10422 |
} else if (crossAxisCoord > limitMax) { |
| 10423 |
crossAxisCoord = limitMax; |
| 10424 |
} |
| 10425 |
} |
| 10426 |
return { |
| 10427 |
[mainAxis]: mainAxisCoord, |
| 10428 |
[crossAxis]: crossAxisCoord |
| 10429 |
}; |
| 10430 |
} |
| 10431 |
}; |
| 10432 |
}; |
| 10433 |
|
| 10434 |
/** |
| 10435 |
* Provides data that allows you to change the size of the floating element — |
| 10436 |
* for instance, prevent it from overflowing the clipping boundary or match the |
| 10437 |
* width of the reference element. |
| 10438 |
* @see https://floating-ui.com/docs/size |
| 10439 |
*/ |
| 10440 |
const size = function (options) { |
| 10441 |
if (options === void 0) { |
| 10442 |
options = {}; |
| 10443 |
} |
| 10444 |
return { |
| 10445 |
name: 'size', |
| 10446 |
options, |
| 10447 |
async fn(state) { |
| 10448 |
var _state$middlewareData, _state$middlewareData2; |
| 10449 |
const { |
| 10450 |
placement, |
| 10451 |
rects, |
| 10452 |
platform, |
| 10453 |
elements |
| 10454 |
} = state; |
| 10455 |
const { |
| 10456 |
apply = () => {}, |
| 10457 |
...detectOverflowOptions |
| 10458 |
} = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.evaluate)(options, state); |
| 10459 |
const overflow = await platform.detectOverflow(state, detectOverflowOptions); |
| 10460 |
const side = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSide)(placement); |
| 10461 |
const alignment = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getAlignment)(placement); |
| 10462 |
const isYAxis = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.getSideAxis)(placement) === 'y'; |
| 10463 |
const { |
| 10464 |
width, |
| 10465 |
height |
| 10466 |
} = rects.floating; |
| 10467 |
let heightSide; |
| 10468 |
let widthSide; |
| 10469 |
if (side === 'top' || side === 'bottom') { |
| 10470 |
heightSide = side; |
| 10471 |
widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right'; |
| 10472 |
} else { |
| 10473 |
widthSide = side; |
| 10474 |
heightSide = alignment === 'end' ? 'top' : 'bottom'; |
| 10475 |
} |
| 10476 |
const maximumClippingHeight = height - overflow.top - overflow.bottom; |
| 10477 |
const maximumClippingWidth = width - overflow.left - overflow.right; |
| 10478 |
const overflowAvailableHeight = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.min)(height - overflow[heightSide], maximumClippingHeight); |
| 10479 |
const overflowAvailableWidth = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.min)(width - overflow[widthSide], maximumClippingWidth); |
| 10480 |
const noShift = !state.middlewareData.shift; |
| 10481 |
let availableHeight = overflowAvailableHeight; |
| 10482 |
let availableWidth = overflowAvailableWidth; |
| 10483 |
if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) { |
| 10484 |
availableWidth = maximumClippingWidth; |
| 10485 |
} |
| 10486 |
if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) { |
| 10487 |
availableHeight = maximumClippingHeight; |
| 10488 |
} |
| 10489 |
if (noShift && !alignment) { |
| 10490 |
const xMin = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.max)(overflow.left, 0); |
| 10491 |
const xMax = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.max)(overflow.right, 0); |
| 10492 |
const yMin = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.max)(overflow.top, 0); |
| 10493 |
const yMax = (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.max)(overflow.bottom, 0); |
| 10494 |
if (isYAxis) { |
| 10495 |
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.max)(overflow.left, overflow.right)); |
| 10496 |
} else { |
| 10497 |
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : (0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.max)(overflow.top, overflow.bottom)); |
| 10498 |
} |
| 10499 |
} |
| 10500 |
await apply({ |
| 10501 |
...state, |
| 10502 |
availableWidth, |
| 10503 |
availableHeight |
| 10504 |
}); |
| 10505 |
const nextDimensions = await platform.getDimensions(elements.floating); |
| 10506 |
if (width !== nextDimensions.width || height !== nextDimensions.height) { |
| 10507 |
return { |
| 10508 |
reset: { |
| 10509 |
rects: true |
| 10510 |
} |
| 10511 |
}; |
| 10512 |
} |
| 10513 |
return {}; |
| 10514 |
} |
| 10515 |
}; |
| 10516 |
}; |
| 10517 |
|
| 10518 |
|
| 10519 |
|
| 10520 |
|
| 10521 |
/***/ }, |
| 10522 |
|
| 10523 |
/***/ "./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs" |
| 10524 |
/*!****************************************************************!*\ |
| 10525 |
!*** ./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs ***! |
| 10526 |
\****************************************************************/ |
| 10527 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 10528 |
|
| 10529 |
__webpack_require__.r(__webpack_exports__); |
| 10530 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 10531 |
/* harmony export */ arrow: () => (/* binding */ arrow), |
| 10532 |
/* harmony export */ autoPlacement: () => (/* binding */ autoPlacement), |
| 10533 |
/* harmony export */ autoUpdate: () => (/* binding */ autoUpdate), |
| 10534 |
/* harmony export */ computePosition: () => (/* binding */ computePosition), |
| 10535 |
/* harmony export */ detectOverflow: () => (/* binding */ detectOverflow), |
| 10536 |
/* harmony export */ flip: () => (/* binding */ flip), |
| 10537 |
/* harmony export */ getOverflowAncestors: () => (/* reexport safe */ _floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getOverflowAncestors), |
| 10538 |
/* harmony export */ hide: () => (/* binding */ hide), |
| 10539 |
/* harmony export */ inline: () => (/* binding */ inline), |
| 10540 |
/* harmony export */ limitShift: () => (/* binding */ limitShift), |
| 10541 |
/* harmony export */ offset: () => (/* binding */ offset), |
| 10542 |
/* harmony export */ platform: () => (/* binding */ platform), |
| 10543 |
/* harmony export */ shift: () => (/* binding */ shift), |
| 10544 |
/* harmony export */ size: () => (/* binding */ size) |
| 10545 |
/* harmony export */ }); |
| 10546 |
/* harmony import */ var _floating_ui_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @floating-ui/core */ "./node_modules/@floating-ui/core/dist/floating-ui.core.mjs"); |
| 10547 |
/* harmony import */ var _floating_ui_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/utils */ "./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs"); |
| 10548 |
/* harmony import */ var _floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @floating-ui/utils/dom */ "./node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs"); |
| 10549 |
|
| 10550 |
|
| 10551 |
|
| 10552 |
|
| 10553 |
|
| 10554 |
function getCssDimensions(element) { |
| 10555 |
const css = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getComputedStyle)(element); |
| 10556 |
// In testing environments, the `width` and `height` properties are empty |
| 10557 |
// strings for SVG elements, returning NaN. Fallback to `0` in this case. |
| 10558 |
let width = parseFloat(css.width) || 0; |
| 10559 |
let height = parseFloat(css.height) || 0; |
| 10560 |
const hasOffset = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(element); |
| 10561 |
const offsetWidth = hasOffset ? element.offsetWidth : width; |
| 10562 |
const offsetHeight = hasOffset ? element.offsetHeight : height; |
| 10563 |
const shouldFallback = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.round)(width) !== offsetWidth || (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.round)(height) !== offsetHeight; |
| 10564 |
if (shouldFallback) { |
| 10565 |
width = offsetWidth; |
| 10566 |
height = offsetHeight; |
| 10567 |
} |
| 10568 |
return { |
| 10569 |
width, |
| 10570 |
height, |
| 10571 |
$: shouldFallback |
| 10572 |
}; |
| 10573 |
} |
| 10574 |
|
| 10575 |
function unwrapElement(element) { |
| 10576 |
return !(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isElement)(element) ? element.contextElement : element; |
| 10577 |
} |
| 10578 |
|
| 10579 |
function getScale(element) { |
| 10580 |
const domElement = unwrapElement(element); |
| 10581 |
if (!(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(domElement)) { |
| 10582 |
return (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.createCoords)(1); |
| 10583 |
} |
| 10584 |
const rect = domElement.getBoundingClientRect(); |
| 10585 |
const { |
| 10586 |
width, |
| 10587 |
height, |
| 10588 |
$ |
| 10589 |
} = getCssDimensions(domElement); |
| 10590 |
let x = ($ ? (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.round)(rect.width) : rect.width) / width; |
| 10591 |
let y = ($ ? (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.round)(rect.height) : rect.height) / height; |
| 10592 |
|
| 10593 |
// 0, NaN, or Infinity should always fallback to 1. |
| 10594 |
|
| 10595 |
if (!x || !Number.isFinite(x)) { |
| 10596 |
x = 1; |
| 10597 |
} |
| 10598 |
if (!y || !Number.isFinite(y)) { |
| 10599 |
y = 1; |
| 10600 |
} |
| 10601 |
return { |
| 10602 |
x, |
| 10603 |
y |
| 10604 |
}; |
| 10605 |
} |
| 10606 |
|
| 10607 |
const noOffsets = /*#__PURE__*/(0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.createCoords)(0); |
| 10608 |
function getVisualOffsets(element) { |
| 10609 |
const win = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getWindow)(element); |
| 10610 |
if (!(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isWebKit)() || !win.visualViewport) { |
| 10611 |
return noOffsets; |
| 10612 |
} |
| 10613 |
return { |
| 10614 |
x: win.visualViewport.offsetLeft, |
| 10615 |
y: win.visualViewport.offsetTop |
| 10616 |
}; |
| 10617 |
} |
| 10618 |
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) { |
| 10619 |
if (isFixed === void 0) { |
| 10620 |
isFixed = false; |
| 10621 |
} |
| 10622 |
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getWindow)(element)) { |
| 10623 |
return false; |
| 10624 |
} |
| 10625 |
return isFixed; |
| 10626 |
} |
| 10627 |
|
| 10628 |
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) { |
| 10629 |
if (includeScale === void 0) { |
| 10630 |
includeScale = false; |
| 10631 |
} |
| 10632 |
if (isFixedStrategy === void 0) { |
| 10633 |
isFixedStrategy = false; |
| 10634 |
} |
| 10635 |
const clientRect = element.getBoundingClientRect(); |
| 10636 |
const domElement = unwrapElement(element); |
| 10637 |
let scale = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.createCoords)(1); |
| 10638 |
if (includeScale) { |
| 10639 |
if (offsetParent) { |
| 10640 |
if ((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isElement)(offsetParent)) { |
| 10641 |
scale = getScale(offsetParent); |
| 10642 |
} |
| 10643 |
} else { |
| 10644 |
scale = getScale(element); |
| 10645 |
} |
| 10646 |
} |
| 10647 |
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.createCoords)(0); |
| 10648 |
let x = (clientRect.left + visualOffsets.x) / scale.x; |
| 10649 |
let y = (clientRect.top + visualOffsets.y) / scale.y; |
| 10650 |
let width = clientRect.width / scale.x; |
| 10651 |
let height = clientRect.height / scale.y; |
| 10652 |
if (domElement) { |
| 10653 |
const win = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getWindow)(domElement); |
| 10654 |
const offsetWin = offsetParent && (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isElement)(offsetParent) ? (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getWindow)(offsetParent) : offsetParent; |
| 10655 |
let currentWin = win; |
| 10656 |
let currentIFrame = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getFrameElement)(currentWin); |
| 10657 |
while (currentIFrame && offsetParent && offsetWin !== currentWin) { |
| 10658 |
const iframeScale = getScale(currentIFrame); |
| 10659 |
const iframeRect = currentIFrame.getBoundingClientRect(); |
| 10660 |
const css = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getComputedStyle)(currentIFrame); |
| 10661 |
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x; |
| 10662 |
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y; |
| 10663 |
x *= iframeScale.x; |
| 10664 |
y *= iframeScale.y; |
| 10665 |
width *= iframeScale.x; |
| 10666 |
height *= iframeScale.y; |
| 10667 |
x += left; |
| 10668 |
y += top; |
| 10669 |
currentWin = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getWindow)(currentIFrame); |
| 10670 |
currentIFrame = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getFrameElement)(currentWin); |
| 10671 |
} |
| 10672 |
} |
| 10673 |
return (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.rectToClientRect)({ |
| 10674 |
width, |
| 10675 |
height, |
| 10676 |
x, |
| 10677 |
y |
| 10678 |
}); |
| 10679 |
} |
| 10680 |
|
| 10681 |
// If <html> has a CSS width greater than the viewport, then this will be |
| 10682 |
// incorrect for RTL. |
| 10683 |
function getWindowScrollBarX(element, rect) { |
| 10684 |
const leftScroll = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getNodeScroll)(element).scrollLeft; |
| 10685 |
if (!rect) { |
| 10686 |
return getBoundingClientRect((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getDocumentElement)(element)).left + leftScroll; |
| 10687 |
} |
| 10688 |
return rect.left + leftScroll; |
| 10689 |
} |
| 10690 |
|
| 10691 |
function getHTMLOffset(documentElement, scroll) { |
| 10692 |
const htmlRect = documentElement.getBoundingClientRect(); |
| 10693 |
const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect); |
| 10694 |
const y = htmlRect.top + scroll.scrollTop; |
| 10695 |
return { |
| 10696 |
x, |
| 10697 |
y |
| 10698 |
}; |
| 10699 |
} |
| 10700 |
|
| 10701 |
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { |
| 10702 |
let { |
| 10703 |
elements, |
| 10704 |
rect, |
| 10705 |
offsetParent, |
| 10706 |
strategy |
| 10707 |
} = _ref; |
| 10708 |
const isFixed = strategy === 'fixed'; |
| 10709 |
const documentElement = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getDocumentElement)(offsetParent); |
| 10710 |
const topLayer = elements ? (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isTopLayer)(elements.floating) : false; |
| 10711 |
if (offsetParent === documentElement || topLayer && isFixed) { |
| 10712 |
return rect; |
| 10713 |
} |
| 10714 |
let scroll = { |
| 10715 |
scrollLeft: 0, |
| 10716 |
scrollTop: 0 |
| 10717 |
}; |
| 10718 |
let scale = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.createCoords)(1); |
| 10719 |
const offsets = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.createCoords)(0); |
| 10720 |
const isOffsetParentAnElement = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent); |
| 10721 |
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { |
| 10722 |
if ((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getNodeName)(offsetParent) !== 'body' || (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isOverflowElement)(documentElement)) { |
| 10723 |
scroll = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getNodeScroll)(offsetParent); |
| 10724 |
} |
| 10725 |
if ((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent)) { |
| 10726 |
const offsetRect = getBoundingClientRect(offsetParent); |
| 10727 |
scale = getScale(offsetParent); |
| 10728 |
offsets.x = offsetRect.x + offsetParent.clientLeft; |
| 10729 |
offsets.y = offsetRect.y + offsetParent.clientTop; |
| 10730 |
} |
| 10731 |
} |
| 10732 |
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.createCoords)(0); |
| 10733 |
return { |
| 10734 |
width: rect.width * scale.x, |
| 10735 |
height: rect.height * scale.y, |
| 10736 |
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x, |
| 10737 |
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y |
| 10738 |
}; |
| 10739 |
} |
| 10740 |
|
| 10741 |
function getClientRects(element) { |
| 10742 |
return Array.from(element.getClientRects()); |
| 10743 |
} |
| 10744 |
|
| 10745 |
// Gets the entire size of the scrollable document area, even extending outside |
| 10746 |
// of the `<html>` and `<body>` rect bounds if horizontally scrollable. |
| 10747 |
function getDocumentRect(element) { |
| 10748 |
const html = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getDocumentElement)(element); |
| 10749 |
const scroll = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getNodeScroll)(element); |
| 10750 |
const body = element.ownerDocument.body; |
| 10751 |
const width = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.max)(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth); |
| 10752 |
const height = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.max)(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight); |
| 10753 |
let x = -scroll.scrollLeft + getWindowScrollBarX(element); |
| 10754 |
const y = -scroll.scrollTop; |
| 10755 |
if ((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getComputedStyle)(body).direction === 'rtl') { |
| 10756 |
x += (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.max)(html.clientWidth, body.clientWidth) - width; |
| 10757 |
} |
| 10758 |
return { |
| 10759 |
width, |
| 10760 |
height, |
| 10761 |
x, |
| 10762 |
y |
| 10763 |
}; |
| 10764 |
} |
| 10765 |
|
| 10766 |
// Safety check: ensure the scrollbar space is reasonable in case this |
| 10767 |
// calculation is affected by unusual styles. |
| 10768 |
// Most scrollbars leave 15-18px of space. |
| 10769 |
const SCROLLBAR_MAX = 25; |
| 10770 |
function getViewportRect(element, strategy) { |
| 10771 |
const win = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getWindow)(element); |
| 10772 |
const html = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getDocumentElement)(element); |
| 10773 |
const visualViewport = win.visualViewport; |
| 10774 |
let width = html.clientWidth; |
| 10775 |
let height = html.clientHeight; |
| 10776 |
let x = 0; |
| 10777 |
let y = 0; |
| 10778 |
if (visualViewport) { |
| 10779 |
width = visualViewport.width; |
| 10780 |
height = visualViewport.height; |
| 10781 |
const visualViewportBased = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isWebKit)(); |
| 10782 |
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') { |
| 10783 |
x = visualViewport.offsetLeft; |
| 10784 |
y = visualViewport.offsetTop; |
| 10785 |
} |
| 10786 |
} |
| 10787 |
const windowScrollbarX = getWindowScrollBarX(html); |
| 10788 |
// <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the |
| 10789 |
// visual width of the <html> but this is not considered in the size |
| 10790 |
// of `html.clientWidth`. |
| 10791 |
if (windowScrollbarX <= 0) { |
| 10792 |
const doc = html.ownerDocument; |
| 10793 |
const body = doc.body; |
| 10794 |
const bodyStyles = getComputedStyle(body); |
| 10795 |
const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0; |
| 10796 |
const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline); |
| 10797 |
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) { |
| 10798 |
width -= clippingStableScrollbarWidth; |
| 10799 |
} |
| 10800 |
} else if (windowScrollbarX <= SCROLLBAR_MAX) { |
| 10801 |
// If the <body> scrollbar is on the left, the width needs to be extended |
| 10802 |
// by the scrollbar amount so there isn't extra space on the right. |
| 10803 |
width += windowScrollbarX; |
| 10804 |
} |
| 10805 |
return { |
| 10806 |
width, |
| 10807 |
height, |
| 10808 |
x, |
| 10809 |
y |
| 10810 |
}; |
| 10811 |
} |
| 10812 |
|
| 10813 |
const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']); |
| 10814 |
// Returns the inner client rect, subtracting scrollbars if present. |
| 10815 |
function getInnerBoundingClientRect(element, strategy) { |
| 10816 |
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed'); |
| 10817 |
const top = clientRect.top + element.clientTop; |
| 10818 |
const left = clientRect.left + element.clientLeft; |
| 10819 |
const scale = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(element) ? getScale(element) : (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.createCoords)(1); |
| 10820 |
const width = element.clientWidth * scale.x; |
| 10821 |
const height = element.clientHeight * scale.y; |
| 10822 |
const x = left * scale.x; |
| 10823 |
const y = top * scale.y; |
| 10824 |
return { |
| 10825 |
width, |
| 10826 |
height, |
| 10827 |
x, |
| 10828 |
y |
| 10829 |
}; |
| 10830 |
} |
| 10831 |
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) { |
| 10832 |
let rect; |
| 10833 |
if (clippingAncestor === 'viewport') { |
| 10834 |
rect = getViewportRect(element, strategy); |
| 10835 |
} else if (clippingAncestor === 'document') { |
| 10836 |
rect = getDocumentRect((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getDocumentElement)(element)); |
| 10837 |
} else if ((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isElement)(clippingAncestor)) { |
| 10838 |
rect = getInnerBoundingClientRect(clippingAncestor, strategy); |
| 10839 |
} else { |
| 10840 |
const visualOffsets = getVisualOffsets(element); |
| 10841 |
rect = { |
| 10842 |
x: clippingAncestor.x - visualOffsets.x, |
| 10843 |
y: clippingAncestor.y - visualOffsets.y, |
| 10844 |
width: clippingAncestor.width, |
| 10845 |
height: clippingAncestor.height |
| 10846 |
}; |
| 10847 |
} |
| 10848 |
return (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.rectToClientRect)(rect); |
| 10849 |
} |
| 10850 |
function hasFixedPositionAncestor(element, stopNode) { |
| 10851 |
const parentNode = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getParentNode)(element); |
| 10852 |
if (parentNode === stopNode || !(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isElement)(parentNode) || (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isLastTraversableNode)(parentNode)) { |
| 10853 |
return false; |
| 10854 |
} |
| 10855 |
return (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getComputedStyle)(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode); |
| 10856 |
} |
| 10857 |
|
| 10858 |
// A "clipping ancestor" is an `overflow` element with the characteristic of |
| 10859 |
// clipping (or hiding) child elements. This returns all clipping ancestors |
| 10860 |
// of the given element up the tree. |
| 10861 |
function getClippingElementAncestors(element, cache) { |
| 10862 |
const cachedResult = cache.get(element); |
| 10863 |
if (cachedResult) { |
| 10864 |
return cachedResult; |
| 10865 |
} |
| 10866 |
let result = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getOverflowAncestors)(element, [], false).filter(el => (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isElement)(el) && (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getNodeName)(el) !== 'body'); |
| 10867 |
let currentContainingBlockComputedStyle = null; |
| 10868 |
const elementIsFixed = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getComputedStyle)(element).position === 'fixed'; |
| 10869 |
let currentNode = elementIsFixed ? (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getParentNode)(element) : element; |
| 10870 |
|
| 10871 |
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block |
| 10872 |
while ((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isElement)(currentNode) && !(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isLastTraversableNode)(currentNode)) { |
| 10873 |
const computedStyle = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getComputedStyle)(currentNode); |
| 10874 |
const currentNodeIsContaining = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isContainingBlock)(currentNode); |
| 10875 |
if (!currentNodeIsContaining && computedStyle.position === 'fixed') { |
| 10876 |
currentContainingBlockComputedStyle = null; |
| 10877 |
} |
| 10878 |
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isOverflowElement)(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode); |
| 10879 |
if (shouldDropCurrentNode) { |
| 10880 |
// Drop non-containing blocks. |
| 10881 |
result = result.filter(ancestor => ancestor !== currentNode); |
| 10882 |
} else { |
| 10883 |
// Record last containing block for next iteration. |
| 10884 |
currentContainingBlockComputedStyle = computedStyle; |
| 10885 |
} |
| 10886 |
currentNode = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getParentNode)(currentNode); |
| 10887 |
} |
| 10888 |
cache.set(element, result); |
| 10889 |
return result; |
| 10890 |
} |
| 10891 |
|
| 10892 |
// Gets the maximum area that the element is visible in due to any number of |
| 10893 |
// clipping ancestors. |
| 10894 |
function getClippingRect(_ref) { |
| 10895 |
let { |
| 10896 |
element, |
| 10897 |
boundary, |
| 10898 |
rootBoundary, |
| 10899 |
strategy |
| 10900 |
} = _ref; |
| 10901 |
const elementClippingAncestors = boundary === 'clippingAncestors' ? (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isTopLayer)(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary); |
| 10902 |
const clippingAncestors = [...elementClippingAncestors, rootBoundary]; |
| 10903 |
const firstClippingAncestor = clippingAncestors[0]; |
| 10904 |
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => { |
| 10905 |
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy); |
| 10906 |
accRect.top = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.max)(rect.top, accRect.top); |
| 10907 |
accRect.right = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.min)(rect.right, accRect.right); |
| 10908 |
accRect.bottom = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.min)(rect.bottom, accRect.bottom); |
| 10909 |
accRect.left = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.max)(rect.left, accRect.left); |
| 10910 |
return accRect; |
| 10911 |
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy)); |
| 10912 |
return { |
| 10913 |
width: clippingRect.right - clippingRect.left, |
| 10914 |
height: clippingRect.bottom - clippingRect.top, |
| 10915 |
x: clippingRect.left, |
| 10916 |
y: clippingRect.top |
| 10917 |
}; |
| 10918 |
} |
| 10919 |
|
| 10920 |
function getDimensions(element) { |
| 10921 |
const { |
| 10922 |
width, |
| 10923 |
height |
| 10924 |
} = getCssDimensions(element); |
| 10925 |
return { |
| 10926 |
width, |
| 10927 |
height |
| 10928 |
}; |
| 10929 |
} |
| 10930 |
|
| 10931 |
function getRectRelativeToOffsetParent(element, offsetParent, strategy) { |
| 10932 |
const isOffsetParentAnElement = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent); |
| 10933 |
const documentElement = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getDocumentElement)(offsetParent); |
| 10934 |
const isFixed = strategy === 'fixed'; |
| 10935 |
const rect = getBoundingClientRect(element, true, isFixed, offsetParent); |
| 10936 |
let scroll = { |
| 10937 |
scrollLeft: 0, |
| 10938 |
scrollTop: 0 |
| 10939 |
}; |
| 10940 |
const offsets = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.createCoords)(0); |
| 10941 |
|
| 10942 |
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use |
| 10943 |
// Firefox with layout.scrollbar.side = 3 in about:config to test this. |
| 10944 |
function setLeftRTLScrollbarOffset() { |
| 10945 |
offsets.x = getWindowScrollBarX(documentElement); |
| 10946 |
} |
| 10947 |
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { |
| 10948 |
if ((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getNodeName)(offsetParent) !== 'body' || (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isOverflowElement)(documentElement)) { |
| 10949 |
scroll = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getNodeScroll)(offsetParent); |
| 10950 |
} |
| 10951 |
if (isOffsetParentAnElement) { |
| 10952 |
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent); |
| 10953 |
offsets.x = offsetRect.x + offsetParent.clientLeft; |
| 10954 |
offsets.y = offsetRect.y + offsetParent.clientTop; |
| 10955 |
} else if (documentElement) { |
| 10956 |
setLeftRTLScrollbarOffset(); |
| 10957 |
} |
| 10958 |
} |
| 10959 |
if (isFixed && !isOffsetParentAnElement && documentElement) { |
| 10960 |
setLeftRTLScrollbarOffset(); |
| 10961 |
} |
| 10962 |
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.createCoords)(0); |
| 10963 |
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x; |
| 10964 |
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y; |
| 10965 |
return { |
| 10966 |
x, |
| 10967 |
y, |
| 10968 |
width: rect.width, |
| 10969 |
height: rect.height |
| 10970 |
}; |
| 10971 |
} |
| 10972 |
|
| 10973 |
function isStaticPositioned(element) { |
| 10974 |
return (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getComputedStyle)(element).position === 'static'; |
| 10975 |
} |
| 10976 |
|
| 10977 |
function getTrueOffsetParent(element, polyfill) { |
| 10978 |
if (!(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(element) || (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getComputedStyle)(element).position === 'fixed') { |
| 10979 |
return null; |
| 10980 |
} |
| 10981 |
if (polyfill) { |
| 10982 |
return polyfill(element); |
| 10983 |
} |
| 10984 |
let rawOffsetParent = element.offsetParent; |
| 10985 |
|
| 10986 |
// Firefox returns the <html> element as the offsetParent if it's non-static, |
| 10987 |
// while Chrome and Safari return the <body> element. The <body> element must |
| 10988 |
// be used to perform the correct calculations even if the <html> element is |
| 10989 |
// non-static. |
| 10990 |
if ((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getDocumentElement)(element) === rawOffsetParent) { |
| 10991 |
rawOffsetParent = rawOffsetParent.ownerDocument.body; |
| 10992 |
} |
| 10993 |
return rawOffsetParent; |
| 10994 |
} |
| 10995 |
|
| 10996 |
// Gets the closest ancestor positioned element. Handles some edge cases, |
| 10997 |
// such as table ancestors and cross browser bugs. |
| 10998 |
function getOffsetParent(element, polyfill) { |
| 10999 |
const win = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getWindow)(element); |
| 11000 |
if ((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isTopLayer)(element)) { |
| 11001 |
return win; |
| 11002 |
} |
| 11003 |
if (!(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(element)) { |
| 11004 |
let svgOffsetParent = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getParentNode)(element); |
| 11005 |
while (svgOffsetParent && !(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isLastTraversableNode)(svgOffsetParent)) { |
| 11006 |
if ((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isElement)(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) { |
| 11007 |
return svgOffsetParent; |
| 11008 |
} |
| 11009 |
svgOffsetParent = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getParentNode)(svgOffsetParent); |
| 11010 |
} |
| 11011 |
return win; |
| 11012 |
} |
| 11013 |
let offsetParent = getTrueOffsetParent(element, polyfill); |
| 11014 |
while (offsetParent && (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isTableElement)(offsetParent) && isStaticPositioned(offsetParent)) { |
| 11015 |
offsetParent = getTrueOffsetParent(offsetParent, polyfill); |
| 11016 |
} |
| 11017 |
if (offsetParent && (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isLastTraversableNode)(offsetParent) && isStaticPositioned(offsetParent) && !(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isContainingBlock)(offsetParent)) { |
| 11018 |
return win; |
| 11019 |
} |
| 11020 |
return offsetParent || (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getContainingBlock)(element) || win; |
| 11021 |
} |
| 11022 |
|
| 11023 |
const getElementRects = async function (data) { |
| 11024 |
const getOffsetParentFn = this.getOffsetParent || getOffsetParent; |
| 11025 |
const getDimensionsFn = this.getDimensions; |
| 11026 |
const floatingDimensions = await getDimensionsFn(data.floating); |
| 11027 |
return { |
| 11028 |
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy), |
| 11029 |
floating: { |
| 11030 |
x: 0, |
| 11031 |
y: 0, |
| 11032 |
width: floatingDimensions.width, |
| 11033 |
height: floatingDimensions.height |
| 11034 |
} |
| 11035 |
}; |
| 11036 |
}; |
| 11037 |
|
| 11038 |
function isRTL(element) { |
| 11039 |
return (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getComputedStyle)(element).direction === 'rtl'; |
| 11040 |
} |
| 11041 |
|
| 11042 |
const platform = { |
| 11043 |
convertOffsetParentRelativeRectToViewportRelativeRect, |
| 11044 |
getDocumentElement: _floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getDocumentElement, |
| 11045 |
getClippingRect, |
| 11046 |
getOffsetParent, |
| 11047 |
getElementRects, |
| 11048 |
getClientRects, |
| 11049 |
getDimensions, |
| 11050 |
getScale, |
| 11051 |
isElement: _floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isElement, |
| 11052 |
isRTL |
| 11053 |
}; |
| 11054 |
|
| 11055 |
function rectsAreEqual(a, b) { |
| 11056 |
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height; |
| 11057 |
} |
| 11058 |
|
| 11059 |
// https://samthor.au/2021/observing-dom/ |
| 11060 |
function observeMove(element, onMove) { |
| 11061 |
let io = null; |
| 11062 |
let timeoutId; |
| 11063 |
const root = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getDocumentElement)(element); |
| 11064 |
function cleanup() { |
| 11065 |
var _io; |
| 11066 |
clearTimeout(timeoutId); |
| 11067 |
(_io = io) == null || _io.disconnect(); |
| 11068 |
io = null; |
| 11069 |
} |
| 11070 |
function refresh(skip, threshold) { |
| 11071 |
if (skip === void 0) { |
| 11072 |
skip = false; |
| 11073 |
} |
| 11074 |
if (threshold === void 0) { |
| 11075 |
threshold = 1; |
| 11076 |
} |
| 11077 |
cleanup(); |
| 11078 |
const elementRectForRootMargin = element.getBoundingClientRect(); |
| 11079 |
const { |
| 11080 |
left, |
| 11081 |
top, |
| 11082 |
width, |
| 11083 |
height |
| 11084 |
} = elementRectForRootMargin; |
| 11085 |
if (!skip) { |
| 11086 |
onMove(); |
| 11087 |
} |
| 11088 |
if (!width || !height) { |
| 11089 |
return; |
| 11090 |
} |
| 11091 |
const insetTop = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.floor)(top); |
| 11092 |
const insetRight = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.floor)(root.clientWidth - (left + width)); |
| 11093 |
const insetBottom = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.floor)(root.clientHeight - (top + height)); |
| 11094 |
const insetLeft = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.floor)(left); |
| 11095 |
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px"; |
| 11096 |
const options = { |
| 11097 |
rootMargin, |
| 11098 |
threshold: (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.max)(0, (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.min)(1, threshold)) || 1 |
| 11099 |
}; |
| 11100 |
let isFirstUpdate = true; |
| 11101 |
function handleObserve(entries) { |
| 11102 |
const ratio = entries[0].intersectionRatio; |
| 11103 |
if (ratio !== threshold) { |
| 11104 |
if (!isFirstUpdate) { |
| 11105 |
return refresh(); |
| 11106 |
} |
| 11107 |
if (!ratio) { |
| 11108 |
// If the reference is clipped, the ratio is 0. Throttle the refresh |
| 11109 |
// to prevent an infinite loop of updates. |
| 11110 |
timeoutId = setTimeout(() => { |
| 11111 |
refresh(false, 1e-7); |
| 11112 |
}, 1000); |
| 11113 |
} else { |
| 11114 |
refresh(false, ratio); |
| 11115 |
} |
| 11116 |
} |
| 11117 |
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) { |
| 11118 |
// It's possible that even though the ratio is reported as 1, the |
| 11119 |
// element is not actually fully within the IntersectionObserver's root |
| 11120 |
// area anymore. This can happen under performance constraints. This may |
| 11121 |
// be a bug in the browser's IntersectionObserver implementation. To |
| 11122 |
// work around this, we compare the element's bounding rect now with |
| 11123 |
// what it was at the time we created the IntersectionObserver. If they |
| 11124 |
// are not equal then the element moved, so we refresh. |
| 11125 |
refresh(); |
| 11126 |
} |
| 11127 |
isFirstUpdate = false; |
| 11128 |
} |
| 11129 |
|
| 11130 |
// Older browsers don't support a `document` as the root and will throw an |
| 11131 |
// error. |
| 11132 |
try { |
| 11133 |
io = new IntersectionObserver(handleObserve, { |
| 11134 |
...options, |
| 11135 |
// Handle <iframe>s |
| 11136 |
root: root.ownerDocument |
| 11137 |
}); |
| 11138 |
} catch (_e) { |
| 11139 |
io = new IntersectionObserver(handleObserve, options); |
| 11140 |
} |
| 11141 |
io.observe(element); |
| 11142 |
} |
| 11143 |
refresh(true); |
| 11144 |
return cleanup; |
| 11145 |
} |
| 11146 |
|
| 11147 |
/** |
| 11148 |
* Automatically updates the position of the floating element when necessary. |
| 11149 |
* Should only be called when the floating element is mounted on the DOM or |
| 11150 |
* visible on the screen. |
| 11151 |
* @returns cleanup function that should be invoked when the floating element is |
| 11152 |
* removed from the DOM or hidden from the screen. |
| 11153 |
* @see https://floating-ui.com/docs/autoUpdate |
| 11154 |
*/ |
| 11155 |
function autoUpdate(reference, floating, update, options) { |
| 11156 |
if (options === void 0) { |
| 11157 |
options = {}; |
| 11158 |
} |
| 11159 |
const { |
| 11160 |
ancestorScroll = true, |
| 11161 |
ancestorResize = true, |
| 11162 |
elementResize = typeof ResizeObserver === 'function', |
| 11163 |
layoutShift = typeof IntersectionObserver === 'function', |
| 11164 |
animationFrame = false |
| 11165 |
} = options; |
| 11166 |
const referenceEl = unwrapElement(reference); |
| 11167 |
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getOverflowAncestors)(referenceEl) : []), ...(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getOverflowAncestors)(floating)] : []; |
| 11168 |
ancestors.forEach(ancestor => { |
| 11169 |
ancestorScroll && ancestor.addEventListener('scroll', update, { |
| 11170 |
passive: true |
| 11171 |
}); |
| 11172 |
ancestorResize && ancestor.addEventListener('resize', update); |
| 11173 |
}); |
| 11174 |
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null; |
| 11175 |
let reobserveFrame = -1; |
| 11176 |
let resizeObserver = null; |
| 11177 |
if (elementResize) { |
| 11178 |
resizeObserver = new ResizeObserver(_ref => { |
| 11179 |
let [firstEntry] = _ref; |
| 11180 |
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) { |
| 11181 |
// Prevent update loops when using the `size` middleware. |
| 11182 |
// https://github.com/floating-ui/floating-ui/issues/1740 |
| 11183 |
resizeObserver.unobserve(floating); |
| 11184 |
cancelAnimationFrame(reobserveFrame); |
| 11185 |
reobserveFrame = requestAnimationFrame(() => { |
| 11186 |
var _resizeObserver; |
| 11187 |
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating); |
| 11188 |
}); |
| 11189 |
} |
| 11190 |
update(); |
| 11191 |
}); |
| 11192 |
if (referenceEl && !animationFrame) { |
| 11193 |
resizeObserver.observe(referenceEl); |
| 11194 |
} |
| 11195 |
resizeObserver.observe(floating); |
| 11196 |
} |
| 11197 |
let frameId; |
| 11198 |
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null; |
| 11199 |
if (animationFrame) { |
| 11200 |
frameLoop(); |
| 11201 |
} |
| 11202 |
function frameLoop() { |
| 11203 |
const nextRefRect = getBoundingClientRect(reference); |
| 11204 |
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) { |
| 11205 |
update(); |
| 11206 |
} |
| 11207 |
prevRefRect = nextRefRect; |
| 11208 |
frameId = requestAnimationFrame(frameLoop); |
| 11209 |
} |
| 11210 |
update(); |
| 11211 |
return () => { |
| 11212 |
var _resizeObserver2; |
| 11213 |
ancestors.forEach(ancestor => { |
| 11214 |
ancestorScroll && ancestor.removeEventListener('scroll', update); |
| 11215 |
ancestorResize && ancestor.removeEventListener('resize', update); |
| 11216 |
}); |
| 11217 |
cleanupIo == null || cleanupIo(); |
| 11218 |
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect(); |
| 11219 |
resizeObserver = null; |
| 11220 |
if (animationFrame) { |
| 11221 |
cancelAnimationFrame(frameId); |
| 11222 |
} |
| 11223 |
}; |
| 11224 |
} |
| 11225 |
|
| 11226 |
/** |
| 11227 |
* Resolves with an object of overflow side offsets that determine how much the |
| 11228 |
* element is overflowing a given clipping boundary on each side. |
| 11229 |
* - positive = overflowing the boundary by that number of pixels |
| 11230 |
* - negative = how many pixels left before it will overflow |
| 11231 |
* - 0 = lies flush with the boundary |
| 11232 |
* @see https://floating-ui.com/docs/detectOverflow |
| 11233 |
*/ |
| 11234 |
const detectOverflow = _floating_ui_core__WEBPACK_IMPORTED_MODULE_0__.detectOverflow; |
| 11235 |
|
| 11236 |
/** |
| 11237 |
* Modifies the placement by translating the floating element along the |
| 11238 |
* specified axes. |
| 11239 |
* A number (shorthand for `mainAxis` or distance), or an axes configuration |
| 11240 |
* object may be passed. |
| 11241 |
* @see https://floating-ui.com/docs/offset |
| 11242 |
*/ |
| 11243 |
const offset = _floating_ui_core__WEBPACK_IMPORTED_MODULE_0__.offset; |
| 11244 |
|
| 11245 |
/** |
| 11246 |
* Optimizes the visibility of the floating element by choosing the placement |
| 11247 |
* that has the most space available automatically, without needing to specify a |
| 11248 |
* preferred placement. Alternative to `flip`. |
| 11249 |
* @see https://floating-ui.com/docs/autoPlacement |
| 11250 |
*/ |
| 11251 |
const autoPlacement = _floating_ui_core__WEBPACK_IMPORTED_MODULE_0__.autoPlacement; |
| 11252 |
|
| 11253 |
/** |
| 11254 |
* Optimizes the visibility of the floating element by shifting it in order to |
| 11255 |
* keep it in view when it will overflow the clipping boundary. |
| 11256 |
* @see https://floating-ui.com/docs/shift |
| 11257 |
*/ |
| 11258 |
const shift = _floating_ui_core__WEBPACK_IMPORTED_MODULE_0__.shift; |
| 11259 |
|
| 11260 |
/** |
| 11261 |
* Optimizes the visibility of the floating element by flipping the `placement` |
| 11262 |
* in order to keep it in view when the preferred placement(s) will overflow the |
| 11263 |
* clipping boundary. Alternative to `autoPlacement`. |
| 11264 |
* @see https://floating-ui.com/docs/flip |
| 11265 |
*/ |
| 11266 |
const flip = _floating_ui_core__WEBPACK_IMPORTED_MODULE_0__.flip; |
| 11267 |
|
| 11268 |
/** |
| 11269 |
* Provides data that allows you to change the size of the floating element — |
| 11270 |
* for instance, prevent it from overflowing the clipping boundary or match the |
| 11271 |
* width of the reference element. |
| 11272 |
* @see https://floating-ui.com/docs/size |
| 11273 |
*/ |
| 11274 |
const size = _floating_ui_core__WEBPACK_IMPORTED_MODULE_0__.size; |
| 11275 |
|
| 11276 |
/** |
| 11277 |
* Provides data to hide the floating element in applicable situations, such as |
| 11278 |
* when it is not in the same clipping context as the reference element. |
| 11279 |
* @see https://floating-ui.com/docs/hide |
| 11280 |
*/ |
| 11281 |
const hide = _floating_ui_core__WEBPACK_IMPORTED_MODULE_0__.hide; |
| 11282 |
|
| 11283 |
/** |
| 11284 |
* Provides data to position an inner element of the floating element so that it |
| 11285 |
* appears centered to the reference element. |
| 11286 |
* @see https://floating-ui.com/docs/arrow |
| 11287 |
*/ |
| 11288 |
const arrow = _floating_ui_core__WEBPACK_IMPORTED_MODULE_0__.arrow; |
| 11289 |
|
| 11290 |
/** |
| 11291 |
* Provides improved positioning for inline reference elements that can span |
| 11292 |
* over multiple lines, such as hyperlinks or range selections. |
| 11293 |
* @see https://floating-ui.com/docs/inline |
| 11294 |
*/ |
| 11295 |
const inline = _floating_ui_core__WEBPACK_IMPORTED_MODULE_0__.inline; |
| 11296 |
|
| 11297 |
/** |
| 11298 |
* Built-in `limiter` that will stop `shift()` at a certain point. |
| 11299 |
*/ |
| 11300 |
const limitShift = _floating_ui_core__WEBPACK_IMPORTED_MODULE_0__.limitShift; |
| 11301 |
|
| 11302 |
/** |
| 11303 |
* Computes the `x` and `y` coordinates that will place the floating element |
| 11304 |
* next to a given reference element. |
| 11305 |
*/ |
| 11306 |
const computePosition = (reference, floating, options) => { |
| 11307 |
// This caches the expensive `getClippingElementAncestors` function so that |
| 11308 |
// multiple lifecycle resets re-use the same result. It only lives for a |
| 11309 |
// single call. If other functions become expensive, we can add them as well. |
| 11310 |
const cache = new Map(); |
| 11311 |
const mergedOptions = { |
| 11312 |
platform, |
| 11313 |
...options |
| 11314 |
}; |
| 11315 |
const platformWithCache = { |
| 11316 |
...mergedOptions.platform, |
| 11317 |
_c: cache |
| 11318 |
}; |
| 11319 |
return (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_0__.computePosition)(reference, floating, { |
| 11320 |
...mergedOptions, |
| 11321 |
platform: platformWithCache |
| 11322 |
}); |
| 11323 |
}; |
| 11324 |
|
| 11325 |
|
| 11326 |
|
| 11327 |
|
| 11328 |
/***/ }, |
| 11329 |
|
| 11330 |
/***/ "./node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs" |
| 11331 |
/*!************************************************************************!*\ |
| 11332 |
!*** ./node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs ***! |
| 11333 |
\************************************************************************/ |
| 11334 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 11335 |
|
| 11336 |
__webpack_require__.r(__webpack_exports__); |
| 11337 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 11338 |
/* harmony export */ getComputedStyle: () => (/* binding */ getComputedStyle), |
| 11339 |
/* harmony export */ getContainingBlock: () => (/* binding */ getContainingBlock), |
| 11340 |
/* harmony export */ getDocumentElement: () => (/* binding */ getDocumentElement), |
| 11341 |
/* harmony export */ getFrameElement: () => (/* binding */ getFrameElement), |
| 11342 |
/* harmony export */ getNearestOverflowAncestor: () => (/* binding */ getNearestOverflowAncestor), |
| 11343 |
/* harmony export */ getNodeName: () => (/* binding */ getNodeName), |
| 11344 |
/* harmony export */ getNodeScroll: () => (/* binding */ getNodeScroll), |
| 11345 |
/* harmony export */ getOverflowAncestors: () => (/* binding */ getOverflowAncestors), |
| 11346 |
/* harmony export */ getParentNode: () => (/* binding */ getParentNode), |
| 11347 |
/* harmony export */ getWindow: () => (/* binding */ getWindow), |
| 11348 |
/* harmony export */ isContainingBlock: () => (/* binding */ isContainingBlock), |
| 11349 |
/* harmony export */ isElement: () => (/* binding */ isElement), |
| 11350 |
/* harmony export */ isHTMLElement: () => (/* binding */ isHTMLElement), |
| 11351 |
/* harmony export */ isLastTraversableNode: () => (/* binding */ isLastTraversableNode), |
| 11352 |
/* harmony export */ isNode: () => (/* binding */ isNode), |
| 11353 |
/* harmony export */ isOverflowElement: () => (/* binding */ isOverflowElement), |
| 11354 |
/* harmony export */ isShadowRoot: () => (/* binding */ isShadowRoot), |
| 11355 |
/* harmony export */ isTableElement: () => (/* binding */ isTableElement), |
| 11356 |
/* harmony export */ isTopLayer: () => (/* binding */ isTopLayer), |
| 11357 |
/* harmony export */ isWebKit: () => (/* binding */ isWebKit) |
| 11358 |
/* harmony export */ }); |
| 11359 |
function hasWindow() { |
| 11360 |
return typeof window !== 'undefined'; |
| 11361 |
} |
| 11362 |
function getNodeName(node) { |
| 11363 |
if (isNode(node)) { |
| 11364 |
return (node.nodeName || '').toLowerCase(); |
| 11365 |
} |
| 11366 |
// Mocked nodes in testing environments may not be instances of Node. By |
| 11367 |
// returning `#document` an infinite loop won't occur. |
| 11368 |
// https://github.com/floating-ui/floating-ui/issues/2317 |
| 11369 |
return '#document'; |
| 11370 |
} |
| 11371 |
function getWindow(node) { |
| 11372 |
var _node$ownerDocument; |
| 11373 |
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; |
| 11374 |
} |
| 11375 |
function getDocumentElement(node) { |
| 11376 |
var _ref; |
| 11377 |
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement; |
| 11378 |
} |
| 11379 |
function isNode(value) { |
| 11380 |
if (!hasWindow()) { |
| 11381 |
return false; |
| 11382 |
} |
| 11383 |
return value instanceof Node || value instanceof getWindow(value).Node; |
| 11384 |
} |
| 11385 |
function isElement(value) { |
| 11386 |
if (!hasWindow()) { |
| 11387 |
return false; |
| 11388 |
} |
| 11389 |
return value instanceof Element || value instanceof getWindow(value).Element; |
| 11390 |
} |
| 11391 |
function isHTMLElement(value) { |
| 11392 |
if (!hasWindow()) { |
| 11393 |
return false; |
| 11394 |
} |
| 11395 |
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement; |
| 11396 |
} |
| 11397 |
function isShadowRoot(value) { |
| 11398 |
if (!hasWindow() || typeof ShadowRoot === 'undefined') { |
| 11399 |
return false; |
| 11400 |
} |
| 11401 |
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot; |
| 11402 |
} |
| 11403 |
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']); |
| 11404 |
function isOverflowElement(element) { |
| 11405 |
const { |
| 11406 |
overflow, |
| 11407 |
overflowX, |
| 11408 |
overflowY, |
| 11409 |
display |
| 11410 |
} = getComputedStyle(element); |
| 11411 |
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display); |
| 11412 |
} |
| 11413 |
const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']); |
| 11414 |
function isTableElement(element) { |
| 11415 |
return tableElements.has(getNodeName(element)); |
| 11416 |
} |
| 11417 |
const topLayerSelectors = [':popover-open', ':modal']; |
| 11418 |
function isTopLayer(element) { |
| 11419 |
return topLayerSelectors.some(selector => { |
| 11420 |
try { |
| 11421 |
return element.matches(selector); |
| 11422 |
} catch (_e) { |
| 11423 |
return false; |
| 11424 |
} |
| 11425 |
}); |
| 11426 |
} |
| 11427 |
const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective']; |
| 11428 |
const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter']; |
| 11429 |
const containValues = ['paint', 'layout', 'strict', 'content']; |
| 11430 |
function isContainingBlock(elementOrCss) { |
| 11431 |
const webkit = isWebKit(); |
| 11432 |
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss; |
| 11433 |
|
| 11434 |
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block |
| 11435 |
// https://drafts.csswg.org/css-transforms-2/#individual-transforms |
| 11436 |
return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value)); |
| 11437 |
} |
| 11438 |
function getContainingBlock(element) { |
| 11439 |
let currentNode = getParentNode(element); |
| 11440 |
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { |
| 11441 |
if (isContainingBlock(currentNode)) { |
| 11442 |
return currentNode; |
| 11443 |
} else if (isTopLayer(currentNode)) { |
| 11444 |
return null; |
| 11445 |
} |
| 11446 |
currentNode = getParentNode(currentNode); |
| 11447 |
} |
| 11448 |
return null; |
| 11449 |
} |
| 11450 |
function isWebKit() { |
| 11451 |
if (typeof CSS === 'undefined' || !CSS.supports) return false; |
| 11452 |
return CSS.supports('-webkit-backdrop-filter', 'none'); |
| 11453 |
} |
| 11454 |
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']); |
| 11455 |
function isLastTraversableNode(node) { |
| 11456 |
return lastTraversableNodeNames.has(getNodeName(node)); |
| 11457 |
} |
| 11458 |
function getComputedStyle(element) { |
| 11459 |
return getWindow(element).getComputedStyle(element); |
| 11460 |
} |
| 11461 |
function getNodeScroll(element) { |
| 11462 |
if (isElement(element)) { |
| 11463 |
return { |
| 11464 |
scrollLeft: element.scrollLeft, |
| 11465 |
scrollTop: element.scrollTop |
| 11466 |
}; |
| 11467 |
} |
| 11468 |
return { |
| 11469 |
scrollLeft: element.scrollX, |
| 11470 |
scrollTop: element.scrollY |
| 11471 |
}; |
| 11472 |
} |
| 11473 |
function getParentNode(node) { |
| 11474 |
if (getNodeName(node) === 'html') { |
| 11475 |
return node; |
| 11476 |
} |
| 11477 |
const result = |
| 11478 |
// Step into the shadow DOM of the parent of a slotted node. |
| 11479 |
node.assignedSlot || |
| 11480 |
// DOM Element detected. |
| 11481 |
node.parentNode || |
| 11482 |
// ShadowRoot detected. |
| 11483 |
isShadowRoot(node) && node.host || |
| 11484 |
// Fallback. |
| 11485 |
getDocumentElement(node); |
| 11486 |
return isShadowRoot(result) ? result.host : result; |
| 11487 |
} |
| 11488 |
function getNearestOverflowAncestor(node) { |
| 11489 |
const parentNode = getParentNode(node); |
| 11490 |
if (isLastTraversableNode(parentNode)) { |
| 11491 |
return node.ownerDocument ? node.ownerDocument.body : node.body; |
| 11492 |
} |
| 11493 |
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) { |
| 11494 |
return parentNode; |
| 11495 |
} |
| 11496 |
return getNearestOverflowAncestor(parentNode); |
| 11497 |
} |
| 11498 |
function getOverflowAncestors(node, list, traverseIframes) { |
| 11499 |
var _node$ownerDocument2; |
| 11500 |
if (list === void 0) { |
| 11501 |
list = []; |
| 11502 |
} |
| 11503 |
if (traverseIframes === void 0) { |
| 11504 |
traverseIframes = true; |
| 11505 |
} |
| 11506 |
const scrollableAncestor = getNearestOverflowAncestor(node); |
| 11507 |
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body); |
| 11508 |
const win = getWindow(scrollableAncestor); |
| 11509 |
if (isBody) { |
| 11510 |
const frameElement = getFrameElement(win); |
| 11511 |
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []); |
| 11512 |
} |
| 11513 |
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes)); |
| 11514 |
} |
| 11515 |
function getFrameElement(win) { |
| 11516 |
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null; |
| 11517 |
} |
| 11518 |
|
| 11519 |
|
| 11520 |
|
| 11521 |
|
| 11522 |
/***/ }, |
| 11523 |
|
| 11524 |
/***/ "./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs" |
| 11525 |
/*!********************************************************************!*\ |
| 11526 |
!*** ./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs ***! |
| 11527 |
\********************************************************************/ |
| 11528 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 11529 |
|
| 11530 |
__webpack_require__.r(__webpack_exports__); |
| 11531 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 11532 |
/* harmony export */ alignments: () => (/* binding */ alignments), |
| 11533 |
/* harmony export */ clamp: () => (/* binding */ clamp), |
| 11534 |
/* harmony export */ createCoords: () => (/* binding */ createCoords), |
| 11535 |
/* harmony export */ evaluate: () => (/* binding */ evaluate), |
| 11536 |
/* harmony export */ expandPaddingObject: () => (/* binding */ expandPaddingObject), |
| 11537 |
/* harmony export */ floor: () => (/* binding */ floor), |
| 11538 |
/* harmony export */ getAlignment: () => (/* binding */ getAlignment), |
| 11539 |
/* harmony export */ getAlignmentAxis: () => (/* binding */ getAlignmentAxis), |
| 11540 |
/* harmony export */ getAlignmentSides: () => (/* binding */ getAlignmentSides), |
| 11541 |
/* harmony export */ getAxisLength: () => (/* binding */ getAxisLength), |
| 11542 |
/* harmony export */ getExpandedPlacements: () => (/* binding */ getExpandedPlacements), |
| 11543 |
/* harmony export */ getOppositeAlignmentPlacement: () => (/* binding */ getOppositeAlignmentPlacement), |
| 11544 |
/* harmony export */ getOppositeAxis: () => (/* binding */ getOppositeAxis), |
| 11545 |
/* harmony export */ getOppositeAxisPlacements: () => (/* binding */ getOppositeAxisPlacements), |
| 11546 |
/* harmony export */ getOppositePlacement: () => (/* binding */ getOppositePlacement), |
| 11547 |
/* harmony export */ getPaddingObject: () => (/* binding */ getPaddingObject), |
| 11548 |
/* harmony export */ getSide: () => (/* binding */ getSide), |
| 11549 |
/* harmony export */ getSideAxis: () => (/* binding */ getSideAxis), |
| 11550 |
/* harmony export */ max: () => (/* binding */ max), |
| 11551 |
/* harmony export */ min: () => (/* binding */ min), |
| 11552 |
/* harmony export */ placements: () => (/* binding */ placements), |
| 11553 |
/* harmony export */ rectToClientRect: () => (/* binding */ rectToClientRect), |
| 11554 |
/* harmony export */ round: () => (/* binding */ round), |
| 11555 |
/* harmony export */ sides: () => (/* binding */ sides) |
| 11556 |
/* harmony export */ }); |
| 11557 |
/** |
| 11558 |
* Custom positioning reference element. |
| 11559 |
* @see https://floating-ui.com/docs/virtual-elements |
| 11560 |
*/ |
| 11561 |
|
| 11562 |
const sides = ['top', 'right', 'bottom', 'left']; |
| 11563 |
const alignments = ['start', 'end']; |
| 11564 |
const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []); |
| 11565 |
const min = Math.min; |
| 11566 |
const max = Math.max; |
| 11567 |
const round = Math.round; |
| 11568 |
const floor = Math.floor; |
| 11569 |
const createCoords = v => ({ |
| 11570 |
x: v, |
| 11571 |
y: v |
| 11572 |
}); |
| 11573 |
const oppositeSideMap = { |
| 11574 |
left: 'right', |
| 11575 |
right: 'left', |
| 11576 |
bottom: 'top', |
| 11577 |
top: 'bottom' |
| 11578 |
}; |
| 11579 |
const oppositeAlignmentMap = { |
| 11580 |
start: 'end', |
| 11581 |
end: 'start' |
| 11582 |
}; |
| 11583 |
function clamp(start, value, end) { |
| 11584 |
return max(start, min(value, end)); |
| 11585 |
} |
| 11586 |
function evaluate(value, param) { |
| 11587 |
return typeof value === 'function' ? value(param) : value; |
| 11588 |
} |
| 11589 |
function getSide(placement) { |
| 11590 |
return placement.split('-')[0]; |
| 11591 |
} |
| 11592 |
function getAlignment(placement) { |
| 11593 |
return placement.split('-')[1]; |
| 11594 |
} |
| 11595 |
function getOppositeAxis(axis) { |
| 11596 |
return axis === 'x' ? 'y' : 'x'; |
| 11597 |
} |
| 11598 |
function getAxisLength(axis) { |
| 11599 |
return axis === 'y' ? 'height' : 'width'; |
| 11600 |
} |
| 11601 |
const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']); |
| 11602 |
function getSideAxis(placement) { |
| 11603 |
return yAxisSides.has(getSide(placement)) ? 'y' : 'x'; |
| 11604 |
} |
| 11605 |
function getAlignmentAxis(placement) { |
| 11606 |
return getOppositeAxis(getSideAxis(placement)); |
| 11607 |
} |
| 11608 |
function getAlignmentSides(placement, rects, rtl) { |
| 11609 |
if (rtl === void 0) { |
| 11610 |
rtl = false; |
| 11611 |
} |
| 11612 |
const alignment = getAlignment(placement); |
| 11613 |
const alignmentAxis = getAlignmentAxis(placement); |
| 11614 |
const length = getAxisLength(alignmentAxis); |
| 11615 |
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top'; |
| 11616 |
if (rects.reference[length] > rects.floating[length]) { |
| 11617 |
mainAlignmentSide = getOppositePlacement(mainAlignmentSide); |
| 11618 |
} |
| 11619 |
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)]; |
| 11620 |
} |
| 11621 |
function getExpandedPlacements(placement) { |
| 11622 |
const oppositePlacement = getOppositePlacement(placement); |
| 11623 |
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)]; |
| 11624 |
} |
| 11625 |
function getOppositeAlignmentPlacement(placement) { |
| 11626 |
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]); |
| 11627 |
} |
| 11628 |
const lrPlacement = ['left', 'right']; |
| 11629 |
const rlPlacement = ['right', 'left']; |
| 11630 |
const tbPlacement = ['top', 'bottom']; |
| 11631 |
const btPlacement = ['bottom', 'top']; |
| 11632 |
function getSideList(side, isStart, rtl) { |
| 11633 |
switch (side) { |
| 11634 |
case 'top': |
| 11635 |
case 'bottom': |
| 11636 |
if (rtl) return isStart ? rlPlacement : lrPlacement; |
| 11637 |
return isStart ? lrPlacement : rlPlacement; |
| 11638 |
case 'left': |
| 11639 |
case 'right': |
| 11640 |
return isStart ? tbPlacement : btPlacement; |
| 11641 |
default: |
| 11642 |
return []; |
| 11643 |
} |
| 11644 |
} |
| 11645 |
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) { |
| 11646 |
const alignment = getAlignment(placement); |
| 11647 |
let list = getSideList(getSide(placement), direction === 'start', rtl); |
| 11648 |
if (alignment) { |
| 11649 |
list = list.map(side => side + "-" + alignment); |
| 11650 |
if (flipAlignment) { |
| 11651 |
list = list.concat(list.map(getOppositeAlignmentPlacement)); |
| 11652 |
} |
| 11653 |
} |
| 11654 |
return list; |
| 11655 |
} |
| 11656 |
function getOppositePlacement(placement) { |
| 11657 |
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]); |
| 11658 |
} |
| 11659 |
function expandPaddingObject(padding) { |
| 11660 |
return { |
| 11661 |
top: 0, |
| 11662 |
right: 0, |
| 11663 |
bottom: 0, |
| 11664 |
left: 0, |
| 11665 |
...padding |
| 11666 |
}; |
| 11667 |
} |
| 11668 |
function getPaddingObject(padding) { |
| 11669 |
return typeof padding !== 'number' ? expandPaddingObject(padding) : { |
| 11670 |
top: padding, |
| 11671 |
right: padding, |
| 11672 |
bottom: padding, |
| 11673 |
left: padding |
| 11674 |
}; |
| 11675 |
} |
| 11676 |
function rectToClientRect(rect) { |
| 11677 |
const { |
| 11678 |
x, |
| 11679 |
y, |
| 11680 |
width, |
| 11681 |
height |
| 11682 |
} = rect; |
| 11683 |
return { |
| 11684 |
width, |
| 11685 |
height, |
| 11686 |
top: y, |
| 11687 |
left: x, |
| 11688 |
right: x + width, |
| 11689 |
bottom: y + height, |
| 11690 |
x, |
| 11691 |
y |
| 11692 |
}; |
| 11693 |
} |
| 11694 |
|
| 11695 |
|
| 11696 |
|
| 11697 |
|
| 11698 |
/***/ }, |
| 11699 |
|
| 11700 |
/***/ "./node_modules/@radix-ui/number/dist/index.mjs" |
| 11701 |
/*!******************************************************!*\ |
| 11702 |
!*** ./node_modules/@radix-ui/number/dist/index.mjs ***! |
| 11703 |
\******************************************************/ |
| 11704 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 11705 |
|
| 11706 |
__webpack_require__.r(__webpack_exports__); |
| 11707 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 11708 |
/* harmony export */ clamp: () => (/* binding */ clamp) |
| 11709 |
/* harmony export */ }); |
| 11710 |
// packages/core/number/src/number.ts |
| 11711 |
function clamp(value, [min, max]) { |
| 11712 |
return Math.min(max, Math.max(min, value)); |
| 11713 |
} |
| 11714 |
|
| 11715 |
//# sourceMappingURL=index.mjs.map |
| 11716 |
|
| 11717 |
|
| 11718 |
/***/ }, |
| 11719 |
|
| 11720 |
/***/ "./node_modules/@radix-ui/primitive/dist/index.mjs" |
| 11721 |
/*!*********************************************************!*\ |
| 11722 |
!*** ./node_modules/@radix-ui/primitive/dist/index.mjs ***! |
| 11723 |
\*********************************************************/ |
| 11724 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 11725 |
|
| 11726 |
__webpack_require__.r(__webpack_exports__); |
| 11727 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 11728 |
/* harmony export */ canUseDOM: () => (/* binding */ canUseDOM), |
| 11729 |
/* harmony export */ composeEventHandlers: () => (/* binding */ composeEventHandlers), |
| 11730 |
/* harmony export */ getActiveElement: () => (/* binding */ getActiveElement), |
| 11731 |
/* harmony export */ getOwnerDocument: () => (/* binding */ getOwnerDocument), |
| 11732 |
/* harmony export */ getOwnerWindow: () => (/* binding */ getOwnerWindow), |
| 11733 |
/* harmony export */ isFrame: () => (/* binding */ isFrame) |
| 11734 |
/* harmony export */ }); |
| 11735 |
// src/primitive.tsx |
| 11736 |
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement); |
| 11737 |
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) { |
| 11738 |
return function handleEvent(event) { |
| 11739 |
originalEventHandler?.(event); |
| 11740 |
if (checkForDefaultPrevented === false || !event.defaultPrevented) { |
| 11741 |
return ourEventHandler?.(event); |
| 11742 |
} |
| 11743 |
}; |
| 11744 |
} |
| 11745 |
function getOwnerWindow(element) { |
| 11746 |
if (!canUseDOM) { |
| 11747 |
throw new Error("Cannot access window outside of the DOM"); |
| 11748 |
} |
| 11749 |
return element?.ownerDocument?.defaultView ?? window; |
| 11750 |
} |
| 11751 |
function getOwnerDocument(element) { |
| 11752 |
if (!canUseDOM) { |
| 11753 |
throw new Error("Cannot access document outside of the DOM"); |
| 11754 |
} |
| 11755 |
return element?.ownerDocument ?? document; |
| 11756 |
} |
| 11757 |
function getActiveElement(node, activeDescendant = false) { |
| 11758 |
const { activeElement } = getOwnerDocument(node); |
| 11759 |
if (!activeElement?.nodeName) { |
| 11760 |
return null; |
| 11761 |
} |
| 11762 |
if (isFrame(activeElement) && activeElement.contentDocument) { |
| 11763 |
return getActiveElement(activeElement.contentDocument.body, activeDescendant); |
| 11764 |
} |
| 11765 |
if (activeDescendant) { |
| 11766 |
const id = activeElement.getAttribute("aria-activedescendant"); |
| 11767 |
if (id) { |
| 11768 |
const element = getOwnerDocument(activeElement).getElementById(id); |
| 11769 |
if (element) { |
| 11770 |
return element; |
| 11771 |
} |
| 11772 |
} |
| 11773 |
} |
| 11774 |
return activeElement; |
| 11775 |
} |
| 11776 |
function isFrame(element) { |
| 11777 |
return element.tagName === "IFRAME"; |
| 11778 |
} |
| 11779 |
|
| 11780 |
//# sourceMappingURL=index.mjs.map |
| 11781 |
|
| 11782 |
|
| 11783 |
/***/ }, |
| 11784 |
|
| 11785 |
/***/ "./node_modules/@radix-ui/react-arrow/dist/index.mjs" |
| 11786 |
/*!***********************************************************!*\ |
| 11787 |
!*** ./node_modules/@radix-ui/react-arrow/dist/index.mjs ***! |
| 11788 |
\***********************************************************/ |
| 11789 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 11790 |
|
| 11791 |
__webpack_require__.r(__webpack_exports__); |
| 11792 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 11793 |
/* harmony export */ Arrow: () => (/* binding */ Arrow), |
| 11794 |
/* harmony export */ Root: () => (/* binding */ Root) |
| 11795 |
/* harmony export */ }); |
| 11796 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 11797 |
/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-primitive */ "./node_modules/@radix-ui/react-primitive/dist/index.mjs"); |
| 11798 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 11799 |
// src/arrow.tsx |
| 11800 |
|
| 11801 |
|
| 11802 |
|
| 11803 |
var NAME = "Arrow"; |
| 11804 |
var Arrow = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 11805 |
const { children, width = 10, height = 5, ...arrowProps } = props; |
| 11806 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)( |
| 11807 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_1__.Primitive.svg, |
| 11808 |
{ |
| 11809 |
...arrowProps, |
| 11810 |
ref: forwardedRef, |
| 11811 |
width, |
| 11812 |
height, |
| 11813 |
viewBox: "0 0 30 10", |
| 11814 |
preserveAspectRatio: "none", |
| 11815 |
children: props.asChild ? children : /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("polygon", { points: "0,0 30,0 15,10" }) |
| 11816 |
} |
| 11817 |
); |
| 11818 |
}); |
| 11819 |
Arrow.displayName = NAME; |
| 11820 |
var Root = Arrow; |
| 11821 |
|
| 11822 |
//# sourceMappingURL=index.mjs.map |
| 11823 |
|
| 11824 |
|
| 11825 |
/***/ }, |
| 11826 |
|
| 11827 |
/***/ "./node_modules/@radix-ui/react-collection/dist/index.mjs" |
| 11828 |
/*!****************************************************************!*\ |
| 11829 |
!*** ./node_modules/@radix-ui/react-collection/dist/index.mjs ***! |
| 11830 |
\****************************************************************/ |
| 11831 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 11832 |
|
| 11833 |
__webpack_require__.r(__webpack_exports__); |
| 11834 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 11835 |
/* harmony export */ createCollection: () => (/* binding */ createCollection), |
| 11836 |
/* harmony export */ unstable_createCollection: () => (/* binding */ createCollection2) |
| 11837 |
/* harmony export */ }); |
| 11838 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 11839 |
/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-context */ "./node_modules/@radix-ui/react-context/dist/index.mjs"); |
| 11840 |
/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ "./node_modules/@radix-ui/react-compose-refs/dist/index.mjs"); |
| 11841 |
/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-slot */ "./node_modules/@radix-ui/react-slot/dist/index.mjs"); |
| 11842 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 11843 |
"use client"; |
| 11844 |
|
| 11845 |
// src/collection-legacy.tsx |
| 11846 |
|
| 11847 |
|
| 11848 |
|
| 11849 |
|
| 11850 |
|
| 11851 |
function createCollection(name) { |
| 11852 |
const PROVIDER_NAME = name + "CollectionProvider"; |
| 11853 |
const [createCollectionContext, createCollectionScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_1__.createContextScope)(PROVIDER_NAME); |
| 11854 |
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext( |
| 11855 |
PROVIDER_NAME, |
| 11856 |
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() } |
| 11857 |
); |
| 11858 |
const CollectionProvider = (props) => { |
| 11859 |
const { scope, children } = props; |
| 11860 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 11861 |
const itemMap = react__WEBPACK_IMPORTED_MODULE_0__.useRef(/* @__PURE__ */ new Map()).current; |
| 11862 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children }); |
| 11863 |
}; |
| 11864 |
CollectionProvider.displayName = PROVIDER_NAME; |
| 11865 |
const COLLECTION_SLOT_NAME = name + "CollectionSlot"; |
| 11866 |
const CollectionSlotImpl = (0,_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__.createSlot)(COLLECTION_SLOT_NAME); |
| 11867 |
const CollectionSlot = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 11868 |
(props, forwardedRef) => { |
| 11869 |
const { scope, children } = props; |
| 11870 |
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope); |
| 11871 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, context.collectionRef); |
| 11872 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(CollectionSlotImpl, { ref: composedRefs, children }); |
| 11873 |
} |
| 11874 |
); |
| 11875 |
CollectionSlot.displayName = COLLECTION_SLOT_NAME; |
| 11876 |
const ITEM_SLOT_NAME = name + "CollectionItemSlot"; |
| 11877 |
const ITEM_DATA_ATTR = "data-radix-collection-item"; |
| 11878 |
const CollectionItemSlotImpl = (0,_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__.createSlot)(ITEM_SLOT_NAME); |
| 11879 |
const CollectionItemSlot = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 11880 |
(props, forwardedRef) => { |
| 11881 |
const { scope, children, ...itemData } = props; |
| 11882 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 11883 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, ref); |
| 11884 |
const context = useCollectionContext(ITEM_SLOT_NAME, scope); |
| 11885 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 11886 |
context.itemMap.set(ref, { ref, ...itemData }); |
| 11887 |
return () => void context.itemMap.delete(ref); |
| 11888 |
}); |
| 11889 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children }); |
| 11890 |
} |
| 11891 |
); |
| 11892 |
CollectionItemSlot.displayName = ITEM_SLOT_NAME; |
| 11893 |
function useCollection(scope) { |
| 11894 |
const context = useCollectionContext(name + "CollectionConsumer", scope); |
| 11895 |
const getItems = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => { |
| 11896 |
const collectionNode = context.collectionRef.current; |
| 11897 |
if (!collectionNode) return []; |
| 11898 |
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`)); |
| 11899 |
const items = Array.from(context.itemMap.values()); |
| 11900 |
const orderedItems = items.sort( |
| 11901 |
(a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current) |
| 11902 |
); |
| 11903 |
return orderedItems; |
| 11904 |
}, [context.collectionRef, context.itemMap]); |
| 11905 |
return getItems; |
| 11906 |
} |
| 11907 |
return [ |
| 11908 |
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot }, |
| 11909 |
useCollection, |
| 11910 |
createCollectionScope |
| 11911 |
]; |
| 11912 |
} |
| 11913 |
|
| 11914 |
// src/collection.tsx |
| 11915 |
|
| 11916 |
|
| 11917 |
|
| 11918 |
|
| 11919 |
|
| 11920 |
// src/ordered-dictionary.ts |
| 11921 |
var __instanciated = /* @__PURE__ */ new WeakMap(); |
| 11922 |
var OrderedDict = class _OrderedDict extends Map { |
| 11923 |
#keys; |
| 11924 |
constructor(entries) { |
| 11925 |
super(entries); |
| 11926 |
this.#keys = [...super.keys()]; |
| 11927 |
__instanciated.set(this, true); |
| 11928 |
} |
| 11929 |
set(key, value) { |
| 11930 |
if (__instanciated.get(this)) { |
| 11931 |
if (this.has(key)) { |
| 11932 |
this.#keys[this.#keys.indexOf(key)] = key; |
| 11933 |
} else { |
| 11934 |
this.#keys.push(key); |
| 11935 |
} |
| 11936 |
} |
| 11937 |
super.set(key, value); |
| 11938 |
return this; |
| 11939 |
} |
| 11940 |
insert(index, key, value) { |
| 11941 |
const has = this.has(key); |
| 11942 |
const length = this.#keys.length; |
| 11943 |
const relativeIndex = toSafeInteger(index); |
| 11944 |
let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex; |
| 11945 |
const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex; |
| 11946 |
if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) { |
| 11947 |
this.set(key, value); |
| 11948 |
return this; |
| 11949 |
} |
| 11950 |
const size = this.size + (has ? 0 : 1); |
| 11951 |
if (relativeIndex < 0) { |
| 11952 |
actualIndex++; |
| 11953 |
} |
| 11954 |
const keys = [...this.#keys]; |
| 11955 |
let nextValue; |
| 11956 |
let shouldSkip = false; |
| 11957 |
for (let i = actualIndex; i < size; i++) { |
| 11958 |
if (actualIndex === i) { |
| 11959 |
let nextKey = keys[i]; |
| 11960 |
if (keys[i] === key) { |
| 11961 |
nextKey = keys[i + 1]; |
| 11962 |
} |
| 11963 |
if (has) { |
| 11964 |
this.delete(key); |
| 11965 |
} |
| 11966 |
nextValue = this.get(nextKey); |
| 11967 |
this.set(key, value); |
| 11968 |
} else { |
| 11969 |
if (!shouldSkip && keys[i - 1] === key) { |
| 11970 |
shouldSkip = true; |
| 11971 |
} |
| 11972 |
const currentKey = keys[shouldSkip ? i : i - 1]; |
| 11973 |
const currentValue = nextValue; |
| 11974 |
nextValue = this.get(currentKey); |
| 11975 |
this.delete(currentKey); |
| 11976 |
this.set(currentKey, currentValue); |
| 11977 |
} |
| 11978 |
} |
| 11979 |
return this; |
| 11980 |
} |
| 11981 |
with(index, key, value) { |
| 11982 |
const copy = new _OrderedDict(this); |
| 11983 |
copy.insert(index, key, value); |
| 11984 |
return copy; |
| 11985 |
} |
| 11986 |
before(key) { |
| 11987 |
const index = this.#keys.indexOf(key) - 1; |
| 11988 |
if (index < 0) { |
| 11989 |
return void 0; |
| 11990 |
} |
| 11991 |
return this.entryAt(index); |
| 11992 |
} |
| 11993 |
/** |
| 11994 |
* Sets a new key-value pair at the position before the given key. |
| 11995 |
*/ |
| 11996 |
setBefore(key, newKey, value) { |
| 11997 |
const index = this.#keys.indexOf(key); |
| 11998 |
if (index === -1) { |
| 11999 |
return this; |
| 12000 |
} |
| 12001 |
return this.insert(index, newKey, value); |
| 12002 |
} |
| 12003 |
after(key) { |
| 12004 |
let index = this.#keys.indexOf(key); |
| 12005 |
index = index === -1 || index === this.size - 1 ? -1 : index + 1; |
| 12006 |
if (index === -1) { |
| 12007 |
return void 0; |
| 12008 |
} |
| 12009 |
return this.entryAt(index); |
| 12010 |
} |
| 12011 |
/** |
| 12012 |
* Sets a new key-value pair at the position after the given key. |
| 12013 |
*/ |
| 12014 |
setAfter(key, newKey, value) { |
| 12015 |
const index = this.#keys.indexOf(key); |
| 12016 |
if (index === -1) { |
| 12017 |
return this; |
| 12018 |
} |
| 12019 |
return this.insert(index + 1, newKey, value); |
| 12020 |
} |
| 12021 |
first() { |
| 12022 |
return this.entryAt(0); |
| 12023 |
} |
| 12024 |
last() { |
| 12025 |
return this.entryAt(-1); |
| 12026 |
} |
| 12027 |
clear() { |
| 12028 |
this.#keys = []; |
| 12029 |
return super.clear(); |
| 12030 |
} |
| 12031 |
delete(key) { |
| 12032 |
const deleted = super.delete(key); |
| 12033 |
if (deleted) { |
| 12034 |
this.#keys.splice(this.#keys.indexOf(key), 1); |
| 12035 |
} |
| 12036 |
return deleted; |
| 12037 |
} |
| 12038 |
deleteAt(index) { |
| 12039 |
const key = this.keyAt(index); |
| 12040 |
if (key !== void 0) { |
| 12041 |
return this.delete(key); |
| 12042 |
} |
| 12043 |
return false; |
| 12044 |
} |
| 12045 |
at(index) { |
| 12046 |
const key = at(this.#keys, index); |
| 12047 |
if (key !== void 0) { |
| 12048 |
return this.get(key); |
| 12049 |
} |
| 12050 |
} |
| 12051 |
entryAt(index) { |
| 12052 |
const key = at(this.#keys, index); |
| 12053 |
if (key !== void 0) { |
| 12054 |
return [key, this.get(key)]; |
| 12055 |
} |
| 12056 |
} |
| 12057 |
indexOf(key) { |
| 12058 |
return this.#keys.indexOf(key); |
| 12059 |
} |
| 12060 |
keyAt(index) { |
| 12061 |
return at(this.#keys, index); |
| 12062 |
} |
| 12063 |
from(key, offset) { |
| 12064 |
const index = this.indexOf(key); |
| 12065 |
if (index === -1) { |
| 12066 |
return void 0; |
| 12067 |
} |
| 12068 |
let dest = index + offset; |
| 12069 |
if (dest < 0) dest = 0; |
| 12070 |
if (dest >= this.size) dest = this.size - 1; |
| 12071 |
return this.at(dest); |
| 12072 |
} |
| 12073 |
keyFrom(key, offset) { |
| 12074 |
const index = this.indexOf(key); |
| 12075 |
if (index === -1) { |
| 12076 |
return void 0; |
| 12077 |
} |
| 12078 |
let dest = index + offset; |
| 12079 |
if (dest < 0) dest = 0; |
| 12080 |
if (dest >= this.size) dest = this.size - 1; |
| 12081 |
return this.keyAt(dest); |
| 12082 |
} |
| 12083 |
find(predicate, thisArg) { |
| 12084 |
let index = 0; |
| 12085 |
for (const entry of this) { |
| 12086 |
if (Reflect.apply(predicate, thisArg, [entry, index, this])) { |
| 12087 |
return entry; |
| 12088 |
} |
| 12089 |
index++; |
| 12090 |
} |
| 12091 |
return void 0; |
| 12092 |
} |
| 12093 |
findIndex(predicate, thisArg) { |
| 12094 |
let index = 0; |
| 12095 |
for (const entry of this) { |
| 12096 |
if (Reflect.apply(predicate, thisArg, [entry, index, this])) { |
| 12097 |
return index; |
| 12098 |
} |
| 12099 |
index++; |
| 12100 |
} |
| 12101 |
return -1; |
| 12102 |
} |
| 12103 |
filter(predicate, thisArg) { |
| 12104 |
const entries = []; |
| 12105 |
let index = 0; |
| 12106 |
for (const entry of this) { |
| 12107 |
if (Reflect.apply(predicate, thisArg, [entry, index, this])) { |
| 12108 |
entries.push(entry); |
| 12109 |
} |
| 12110 |
index++; |
| 12111 |
} |
| 12112 |
return new _OrderedDict(entries); |
| 12113 |
} |
| 12114 |
map(callbackfn, thisArg) { |
| 12115 |
const entries = []; |
| 12116 |
let index = 0; |
| 12117 |
for (const entry of this) { |
| 12118 |
entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]); |
| 12119 |
index++; |
| 12120 |
} |
| 12121 |
return new _OrderedDict(entries); |
| 12122 |
} |
| 12123 |
reduce(...args) { |
| 12124 |
const [callbackfn, initialValue] = args; |
| 12125 |
let index = 0; |
| 12126 |
let accumulator = initialValue ?? this.at(0); |
| 12127 |
for (const entry of this) { |
| 12128 |
if (index === 0 && args.length === 1) { |
| 12129 |
accumulator = entry; |
| 12130 |
} else { |
| 12131 |
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]); |
| 12132 |
} |
| 12133 |
index++; |
| 12134 |
} |
| 12135 |
return accumulator; |
| 12136 |
} |
| 12137 |
reduceRight(...args) { |
| 12138 |
const [callbackfn, initialValue] = args; |
| 12139 |
let accumulator = initialValue ?? this.at(-1); |
| 12140 |
for (let index = this.size - 1; index >= 0; index--) { |
| 12141 |
const entry = this.at(index); |
| 12142 |
if (index === this.size - 1 && args.length === 1) { |
| 12143 |
accumulator = entry; |
| 12144 |
} else { |
| 12145 |
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]); |
| 12146 |
} |
| 12147 |
} |
| 12148 |
return accumulator; |
| 12149 |
} |
| 12150 |
toSorted(compareFn) { |
| 12151 |
const entries = [...this.entries()].sort(compareFn); |
| 12152 |
return new _OrderedDict(entries); |
| 12153 |
} |
| 12154 |
toReversed() { |
| 12155 |
const reversed = new _OrderedDict(); |
| 12156 |
for (let index = this.size - 1; index >= 0; index--) { |
| 12157 |
const key = this.keyAt(index); |
| 12158 |
const element = this.get(key); |
| 12159 |
reversed.set(key, element); |
| 12160 |
} |
| 12161 |
return reversed; |
| 12162 |
} |
| 12163 |
toSpliced(...args) { |
| 12164 |
const entries = [...this.entries()]; |
| 12165 |
entries.splice(...args); |
| 12166 |
return new _OrderedDict(entries); |
| 12167 |
} |
| 12168 |
slice(start, end) { |
| 12169 |
const result = new _OrderedDict(); |
| 12170 |
let stop = this.size - 1; |
| 12171 |
if (start === void 0) { |
| 12172 |
return result; |
| 12173 |
} |
| 12174 |
if (start < 0) { |
| 12175 |
start = start + this.size; |
| 12176 |
} |
| 12177 |
if (end !== void 0 && end > 0) { |
| 12178 |
stop = end - 1; |
| 12179 |
} |
| 12180 |
for (let index = start; index <= stop; index++) { |
| 12181 |
const key = this.keyAt(index); |
| 12182 |
const element = this.get(key); |
| 12183 |
result.set(key, element); |
| 12184 |
} |
| 12185 |
return result; |
| 12186 |
} |
| 12187 |
every(predicate, thisArg) { |
| 12188 |
let index = 0; |
| 12189 |
for (const entry of this) { |
| 12190 |
if (!Reflect.apply(predicate, thisArg, [entry, index, this])) { |
| 12191 |
return false; |
| 12192 |
} |
| 12193 |
index++; |
| 12194 |
} |
| 12195 |
return true; |
| 12196 |
} |
| 12197 |
some(predicate, thisArg) { |
| 12198 |
let index = 0; |
| 12199 |
for (const entry of this) { |
| 12200 |
if (Reflect.apply(predicate, thisArg, [entry, index, this])) { |
| 12201 |
return true; |
| 12202 |
} |
| 12203 |
index++; |
| 12204 |
} |
| 12205 |
return false; |
| 12206 |
} |
| 12207 |
}; |
| 12208 |
function at(array, index) { |
| 12209 |
if ("at" in Array.prototype) { |
| 12210 |
return Array.prototype.at.call(array, index); |
| 12211 |
} |
| 12212 |
const actualIndex = toSafeIndex(array, index); |
| 12213 |
return actualIndex === -1 ? void 0 : array[actualIndex]; |
| 12214 |
} |
| 12215 |
function toSafeIndex(array, index) { |
| 12216 |
const length = array.length; |
| 12217 |
const relativeIndex = toSafeInteger(index); |
| 12218 |
const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex; |
| 12219 |
return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex; |
| 12220 |
} |
| 12221 |
function toSafeInteger(number) { |
| 12222 |
return number !== number || number === 0 ? 0 : Math.trunc(number); |
| 12223 |
} |
| 12224 |
|
| 12225 |
// src/collection.tsx |
| 12226 |
|
| 12227 |
function createCollection2(name) { |
| 12228 |
const PROVIDER_NAME = name + "CollectionProvider"; |
| 12229 |
const [createCollectionContext, createCollectionScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_1__.createContextScope)(PROVIDER_NAME); |
| 12230 |
const [CollectionContextProvider, useCollectionContext] = createCollectionContext( |
| 12231 |
PROVIDER_NAME, |
| 12232 |
{ |
| 12233 |
collectionElement: null, |
| 12234 |
collectionRef: { current: null }, |
| 12235 |
collectionRefObject: { current: null }, |
| 12236 |
itemMap: new OrderedDict(), |
| 12237 |
setItemMap: () => void 0 |
| 12238 |
} |
| 12239 |
); |
| 12240 |
const CollectionProvider = ({ state, ...props }) => { |
| 12241 |
return state ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(CollectionProviderImpl, { ...props, state }) : /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(CollectionInit, { ...props }); |
| 12242 |
}; |
| 12243 |
CollectionProvider.displayName = PROVIDER_NAME; |
| 12244 |
const CollectionInit = (props) => { |
| 12245 |
const state = useInitCollection(); |
| 12246 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(CollectionProviderImpl, { ...props, state }); |
| 12247 |
}; |
| 12248 |
CollectionInit.displayName = PROVIDER_NAME + "Init"; |
| 12249 |
const CollectionProviderImpl = (props) => { |
| 12250 |
const { scope, children, state } = props; |
| 12251 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 12252 |
const [collectionElement, setCollectionElement] = react__WEBPACK_IMPORTED_MODULE_0__.useState( |
| 12253 |
null |
| 12254 |
); |
| 12255 |
const composeRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(ref, setCollectionElement); |
| 12256 |
const [itemMap, setItemMap] = state; |
| 12257 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 12258 |
if (!collectionElement) return; |
| 12259 |
const observer = getChildListObserver(() => { |
| 12260 |
}); |
| 12261 |
observer.observe(collectionElement, { |
| 12262 |
childList: true, |
| 12263 |
subtree: true |
| 12264 |
}); |
| 12265 |
return () => { |
| 12266 |
observer.disconnect(); |
| 12267 |
}; |
| 12268 |
}, [collectionElement]); |
| 12269 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)( |
| 12270 |
CollectionContextProvider, |
| 12271 |
{ |
| 12272 |
scope, |
| 12273 |
itemMap, |
| 12274 |
setItemMap, |
| 12275 |
collectionRef: composeRefs, |
| 12276 |
collectionRefObject: ref, |
| 12277 |
collectionElement, |
| 12278 |
children |
| 12279 |
} |
| 12280 |
); |
| 12281 |
}; |
| 12282 |
CollectionProviderImpl.displayName = PROVIDER_NAME + "Impl"; |
| 12283 |
const COLLECTION_SLOT_NAME = name + "CollectionSlot"; |
| 12284 |
const CollectionSlotImpl = (0,_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__.createSlot)(COLLECTION_SLOT_NAME); |
| 12285 |
const CollectionSlot = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 12286 |
(props, forwardedRef) => { |
| 12287 |
const { scope, children } = props; |
| 12288 |
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope); |
| 12289 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, context.collectionRef); |
| 12290 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(CollectionSlotImpl, { ref: composedRefs, children }); |
| 12291 |
} |
| 12292 |
); |
| 12293 |
CollectionSlot.displayName = COLLECTION_SLOT_NAME; |
| 12294 |
const ITEM_SLOT_NAME = name + "CollectionItemSlot"; |
| 12295 |
const ITEM_DATA_ATTR = "data-radix-collection-item"; |
| 12296 |
const CollectionItemSlotImpl = (0,_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__.createSlot)(ITEM_SLOT_NAME); |
| 12297 |
const CollectionItemSlot = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 12298 |
(props, forwardedRef) => { |
| 12299 |
const { scope, children, ...itemData } = props; |
| 12300 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 12301 |
const [element, setElement] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 12302 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, ref, setElement); |
| 12303 |
const context = useCollectionContext(ITEM_SLOT_NAME, scope); |
| 12304 |
const { setItemMap } = context; |
| 12305 |
const itemDataRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(itemData); |
| 12306 |
if (!shallowEqual(itemDataRef.current, itemData)) { |
| 12307 |
itemDataRef.current = itemData; |
| 12308 |
} |
| 12309 |
const memoizedItemData = itemDataRef.current; |
| 12310 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 12311 |
const itemData2 = memoizedItemData; |
| 12312 |
setItemMap((map) => { |
| 12313 |
if (!element) { |
| 12314 |
return map; |
| 12315 |
} |
| 12316 |
if (!map.has(element)) { |
| 12317 |
map.set(element, { ...itemData2, element }); |
| 12318 |
return map.toSorted(sortByDocumentPosition); |
| 12319 |
} |
| 12320 |
return map.set(element, { ...itemData2, element }).toSorted(sortByDocumentPosition); |
| 12321 |
}); |
| 12322 |
return () => { |
| 12323 |
setItemMap((map) => { |
| 12324 |
if (!element || !map.has(element)) { |
| 12325 |
return map; |
| 12326 |
} |
| 12327 |
map.delete(element); |
| 12328 |
return new OrderedDict(map); |
| 12329 |
}); |
| 12330 |
}; |
| 12331 |
}, [element, memoizedItemData, setItemMap]); |
| 12332 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children }); |
| 12333 |
} |
| 12334 |
); |
| 12335 |
CollectionItemSlot.displayName = ITEM_SLOT_NAME; |
| 12336 |
function useInitCollection() { |
| 12337 |
return react__WEBPACK_IMPORTED_MODULE_0__.useState(new OrderedDict()); |
| 12338 |
} |
| 12339 |
function useCollection(scope) { |
| 12340 |
const { itemMap } = useCollectionContext(name + "CollectionConsumer", scope); |
| 12341 |
return itemMap; |
| 12342 |
} |
| 12343 |
const functions = { |
| 12344 |
createCollectionScope, |
| 12345 |
useCollection, |
| 12346 |
useInitCollection |
| 12347 |
}; |
| 12348 |
return [ |
| 12349 |
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot }, |
| 12350 |
functions |
| 12351 |
]; |
| 12352 |
} |
| 12353 |
function shallowEqual(a, b) { |
| 12354 |
if (a === b) return true; |
| 12355 |
if (typeof a !== "object" || typeof b !== "object") return false; |
| 12356 |
if (a == null || b == null) return false; |
| 12357 |
const keysA = Object.keys(a); |
| 12358 |
const keysB = Object.keys(b); |
| 12359 |
if (keysA.length !== keysB.length) return false; |
| 12360 |
for (const key of keysA) { |
| 12361 |
if (!Object.prototype.hasOwnProperty.call(b, key)) return false; |
| 12362 |
if (a[key] !== b[key]) return false; |
| 12363 |
} |
| 12364 |
return true; |
| 12365 |
} |
| 12366 |
function isElementPreceding(a, b) { |
| 12367 |
return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING); |
| 12368 |
} |
| 12369 |
function sortByDocumentPosition(a, b) { |
| 12370 |
return !a[1].element || !b[1].element ? 0 : isElementPreceding(a[1].element, b[1].element) ? -1 : 1; |
| 12371 |
} |
| 12372 |
function getChildListObserver(callback) { |
| 12373 |
const observer = new MutationObserver((mutationsList) => { |
| 12374 |
for (const mutation of mutationsList) { |
| 12375 |
if (mutation.type === "childList") { |
| 12376 |
callback(); |
| 12377 |
return; |
| 12378 |
} |
| 12379 |
} |
| 12380 |
}); |
| 12381 |
return observer; |
| 12382 |
} |
| 12383 |
|
| 12384 |
//# sourceMappingURL=index.mjs.map |
| 12385 |
|
| 12386 |
|
| 12387 |
/***/ }, |
| 12388 |
|
| 12389 |
/***/ "./node_modules/@radix-ui/react-compose-refs/dist/index.mjs" |
| 12390 |
/*!******************************************************************!*\ |
| 12391 |
!*** ./node_modules/@radix-ui/react-compose-refs/dist/index.mjs ***! |
| 12392 |
\******************************************************************/ |
| 12393 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 12394 |
|
| 12395 |
__webpack_require__.r(__webpack_exports__); |
| 12396 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 12397 |
/* harmony export */ composeRefs: () => (/* binding */ composeRefs), |
| 12398 |
/* harmony export */ useComposedRefs: () => (/* binding */ useComposedRefs) |
| 12399 |
/* harmony export */ }); |
| 12400 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 12401 |
// packages/react/compose-refs/src/compose-refs.tsx |
| 12402 |
|
| 12403 |
function setRef(ref, value) { |
| 12404 |
if (typeof ref === "function") { |
| 12405 |
return ref(value); |
| 12406 |
} else if (ref !== null && ref !== void 0) { |
| 12407 |
ref.current = value; |
| 12408 |
} |
| 12409 |
} |
| 12410 |
function composeRefs(...refs) { |
| 12411 |
return (node) => { |
| 12412 |
let hasCleanup = false; |
| 12413 |
const cleanups = refs.map((ref) => { |
| 12414 |
const cleanup = setRef(ref, node); |
| 12415 |
if (!hasCleanup && typeof cleanup == "function") { |
| 12416 |
hasCleanup = true; |
| 12417 |
} |
| 12418 |
return cleanup; |
| 12419 |
}); |
| 12420 |
if (hasCleanup) { |
| 12421 |
return () => { |
| 12422 |
for (let i = 0; i < cleanups.length; i++) { |
| 12423 |
const cleanup = cleanups[i]; |
| 12424 |
if (typeof cleanup == "function") { |
| 12425 |
cleanup(); |
| 12426 |
} else { |
| 12427 |
setRef(refs[i], null); |
| 12428 |
} |
| 12429 |
} |
| 12430 |
}; |
| 12431 |
} |
| 12432 |
}; |
| 12433 |
} |
| 12434 |
function useComposedRefs(...refs) { |
| 12435 |
return react__WEBPACK_IMPORTED_MODULE_0__.useCallback(composeRefs(...refs), refs); |
| 12436 |
} |
| 12437 |
|
| 12438 |
//# sourceMappingURL=index.mjs.map |
| 12439 |
|
| 12440 |
|
| 12441 |
/***/ }, |
| 12442 |
|
| 12443 |
/***/ "./node_modules/@radix-ui/react-context/dist/index.mjs" |
| 12444 |
/*!*************************************************************!*\ |
| 12445 |
!*** ./node_modules/@radix-ui/react-context/dist/index.mjs ***! |
| 12446 |
\*************************************************************/ |
| 12447 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 12448 |
|
| 12449 |
__webpack_require__.r(__webpack_exports__); |
| 12450 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 12451 |
/* harmony export */ createContext: () => (/* binding */ createContext2), |
| 12452 |
/* harmony export */ createContextScope: () => (/* binding */ createContextScope) |
| 12453 |
/* harmony export */ }); |
| 12454 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 12455 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 12456 |
// packages/react/context/src/create-context.tsx |
| 12457 |
|
| 12458 |
|
| 12459 |
function createContext2(rootComponentName, defaultContext) { |
| 12460 |
const Context = react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext); |
| 12461 |
const Provider = (props) => { |
| 12462 |
const { children, ...context } = props; |
| 12463 |
const value = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => context, Object.values(context)); |
| 12464 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Context.Provider, { value, children }); |
| 12465 |
}; |
| 12466 |
Provider.displayName = rootComponentName + "Provider"; |
| 12467 |
function useContext2(consumerName) { |
| 12468 |
const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(Context); |
| 12469 |
if (context) return context; |
| 12470 |
if (defaultContext !== void 0) return defaultContext; |
| 12471 |
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``); |
| 12472 |
} |
| 12473 |
return [Provider, useContext2]; |
| 12474 |
} |
| 12475 |
function createContextScope(scopeName, createContextScopeDeps = []) { |
| 12476 |
let defaultContexts = []; |
| 12477 |
function createContext3(rootComponentName, defaultContext) { |
| 12478 |
const BaseContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext); |
| 12479 |
const index = defaultContexts.length; |
| 12480 |
defaultContexts = [...defaultContexts, defaultContext]; |
| 12481 |
const Provider = (props) => { |
| 12482 |
const { scope, children, ...context } = props; |
| 12483 |
const Context = scope?.[scopeName]?.[index] || BaseContext; |
| 12484 |
const value = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => context, Object.values(context)); |
| 12485 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Context.Provider, { value, children }); |
| 12486 |
}; |
| 12487 |
Provider.displayName = rootComponentName + "Provider"; |
| 12488 |
function useContext2(consumerName, scope) { |
| 12489 |
const Context = scope?.[scopeName]?.[index] || BaseContext; |
| 12490 |
const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(Context); |
| 12491 |
if (context) return context; |
| 12492 |
if (defaultContext !== void 0) return defaultContext; |
| 12493 |
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``); |
| 12494 |
} |
| 12495 |
return [Provider, useContext2]; |
| 12496 |
} |
| 12497 |
const createScope = () => { |
| 12498 |
const scopeContexts = defaultContexts.map((defaultContext) => { |
| 12499 |
return react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext); |
| 12500 |
}); |
| 12501 |
return function useScope(scope) { |
| 12502 |
const contexts = scope?.[scopeName] || scopeContexts; |
| 12503 |
return react__WEBPACK_IMPORTED_MODULE_0__.useMemo( |
| 12504 |
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), |
| 12505 |
[scope, contexts] |
| 12506 |
); |
| 12507 |
}; |
| 12508 |
}; |
| 12509 |
createScope.scopeName = scopeName; |
| 12510 |
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)]; |
| 12511 |
} |
| 12512 |
function composeContextScopes(...scopes) { |
| 12513 |
const baseScope = scopes[0]; |
| 12514 |
if (scopes.length === 1) return baseScope; |
| 12515 |
const createScope = () => { |
| 12516 |
const scopeHooks = scopes.map((createScope2) => ({ |
| 12517 |
useScope: createScope2(), |
| 12518 |
scopeName: createScope2.scopeName |
| 12519 |
})); |
| 12520 |
return function useComposedScopes(overrideScopes) { |
| 12521 |
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => { |
| 12522 |
const scopeProps = useScope(overrideScopes); |
| 12523 |
const currentScope = scopeProps[`__scope${scopeName}`]; |
| 12524 |
return { ...nextScopes2, ...currentScope }; |
| 12525 |
}, {}); |
| 12526 |
return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]); |
| 12527 |
}; |
| 12528 |
}; |
| 12529 |
createScope.scopeName = baseScope.scopeName; |
| 12530 |
return createScope; |
| 12531 |
} |
| 12532 |
|
| 12533 |
//# sourceMappingURL=index.mjs.map |
| 12534 |
|
| 12535 |
|
| 12536 |
/***/ }, |
| 12537 |
|
| 12538 |
/***/ "./node_modules/@radix-ui/react-direction/dist/index.mjs" |
| 12539 |
/*!***************************************************************!*\ |
| 12540 |
!*** ./node_modules/@radix-ui/react-direction/dist/index.mjs ***! |
| 12541 |
\***************************************************************/ |
| 12542 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 12543 |
|
| 12544 |
__webpack_require__.r(__webpack_exports__); |
| 12545 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 12546 |
/* harmony export */ DirectionProvider: () => (/* binding */ DirectionProvider), |
| 12547 |
/* harmony export */ Provider: () => (/* binding */ Provider), |
| 12548 |
/* harmony export */ useDirection: () => (/* binding */ useDirection) |
| 12549 |
/* harmony export */ }); |
| 12550 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 12551 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 12552 |
// packages/react/direction/src/direction.tsx |
| 12553 |
|
| 12554 |
|
| 12555 |
var DirectionContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(void 0); |
| 12556 |
var DirectionProvider = (props) => { |
| 12557 |
const { dir, children } = props; |
| 12558 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(DirectionContext.Provider, { value: dir, children }); |
| 12559 |
}; |
| 12560 |
function useDirection(localDir) { |
| 12561 |
const globalDir = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DirectionContext); |
| 12562 |
return localDir || globalDir || "ltr"; |
| 12563 |
} |
| 12564 |
var Provider = DirectionProvider; |
| 12565 |
|
| 12566 |
//# sourceMappingURL=index.mjs.map |
| 12567 |
|
| 12568 |
|
| 12569 |
/***/ }, |
| 12570 |
|
| 12571 |
/***/ "./node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs" |
| 12572 |
/*!***********************************************************************!*\ |
| 12573 |
!*** ./node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs ***! |
| 12574 |
\***********************************************************************/ |
| 12575 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 12576 |
|
| 12577 |
__webpack_require__.r(__webpack_exports__); |
| 12578 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 12579 |
/* harmony export */ Branch: () => (/* binding */ Branch), |
| 12580 |
/* harmony export */ DismissableLayer: () => (/* binding */ DismissableLayer), |
| 12581 |
/* harmony export */ DismissableLayerBranch: () => (/* binding */ DismissableLayerBranch), |
| 12582 |
/* harmony export */ Root: () => (/* binding */ Root) |
| 12583 |
/* harmony export */ }); |
| 12584 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 12585 |
/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/primitive */ "./node_modules/@radix-ui/primitive/dist/index.mjs"); |
| 12586 |
/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-primitive */ "./node_modules/@radix-ui/react-primitive/dist/index.mjs"); |
| 12587 |
/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ "./node_modules/@radix-ui/react-compose-refs/dist/index.mjs"); |
| 12588 |
/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ "./node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"); |
| 12589 |
/* harmony import */ var _radix_ui_react_use_escape_keydown__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-use-escape-keydown */ "./node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs"); |
| 12590 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 12591 |
"use client"; |
| 12592 |
|
| 12593 |
// src/dismissable-layer.tsx |
| 12594 |
|
| 12595 |
|
| 12596 |
|
| 12597 |
|
| 12598 |
|
| 12599 |
|
| 12600 |
|
| 12601 |
var DISMISSABLE_LAYER_NAME = "DismissableLayer"; |
| 12602 |
var CONTEXT_UPDATE = "dismissableLayer.update"; |
| 12603 |
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside"; |
| 12604 |
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside"; |
| 12605 |
var originalBodyPointerEvents; |
| 12606 |
var DismissableLayerContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext({ |
| 12607 |
layers: /* @__PURE__ */ new Set(), |
| 12608 |
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(), |
| 12609 |
branches: /* @__PURE__ */ new Set() |
| 12610 |
}); |
| 12611 |
var DismissableLayer = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 12612 |
(props, forwardedRef) => { |
| 12613 |
const { |
| 12614 |
disableOutsidePointerEvents = false, |
| 12615 |
onEscapeKeyDown, |
| 12616 |
onPointerDownOutside, |
| 12617 |
onFocusOutside, |
| 12618 |
onInteractOutside, |
| 12619 |
onDismiss, |
| 12620 |
...layerProps |
| 12621 |
} = props; |
| 12622 |
const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DismissableLayerContext); |
| 12623 |
const [node, setNode] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 12624 |
const ownerDocument = node?.ownerDocument ?? globalThis?.document; |
| 12625 |
const [, force] = react__WEBPACK_IMPORTED_MODULE_0__.useState({}); |
| 12626 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, (node2) => setNode(node2)); |
| 12627 |
const layers = Array.from(context.layers); |
| 12628 |
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1); |
| 12629 |
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); |
| 12630 |
const index = node ? layers.indexOf(node) : -1; |
| 12631 |
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0; |
| 12632 |
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex; |
| 12633 |
const pointerDownOutside = usePointerDownOutside((event) => { |
| 12634 |
const target = event.target; |
| 12635 |
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target)); |
| 12636 |
if (!isPointerEventsEnabled || isPointerDownOnBranch) return; |
| 12637 |
onPointerDownOutside?.(event); |
| 12638 |
onInteractOutside?.(event); |
| 12639 |
if (!event.defaultPrevented) onDismiss?.(); |
| 12640 |
}, ownerDocument); |
| 12641 |
const focusOutside = useFocusOutside((event) => { |
| 12642 |
const target = event.target; |
| 12643 |
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target)); |
| 12644 |
if (isFocusInBranch) return; |
| 12645 |
onFocusOutside?.(event); |
| 12646 |
onInteractOutside?.(event); |
| 12647 |
if (!event.defaultPrevented) onDismiss?.(); |
| 12648 |
}, ownerDocument); |
| 12649 |
(0,_radix_ui_react_use_escape_keydown__WEBPACK_IMPORTED_MODULE_5__.useEscapeKeydown)((event) => { |
| 12650 |
const isHighestLayer = index === context.layers.size - 1; |
| 12651 |
if (!isHighestLayer) return; |
| 12652 |
onEscapeKeyDown?.(event); |
| 12653 |
if (!event.defaultPrevented && onDismiss) { |
| 12654 |
event.preventDefault(); |
| 12655 |
onDismiss(); |
| 12656 |
} |
| 12657 |
}, ownerDocument); |
| 12658 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 12659 |
if (!node) return; |
| 12660 |
if (disableOutsidePointerEvents) { |
| 12661 |
if (context.layersWithOutsidePointerEventsDisabled.size === 0) { |
| 12662 |
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents; |
| 12663 |
ownerDocument.body.style.pointerEvents = "none"; |
| 12664 |
} |
| 12665 |
context.layersWithOutsidePointerEventsDisabled.add(node); |
| 12666 |
} |
| 12667 |
context.layers.add(node); |
| 12668 |
dispatchUpdate(); |
| 12669 |
return () => { |
| 12670 |
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) { |
| 12671 |
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents; |
| 12672 |
} |
| 12673 |
}; |
| 12674 |
}, [node, ownerDocument, disableOutsidePointerEvents, context]); |
| 12675 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 12676 |
return () => { |
| 12677 |
if (!node) return; |
| 12678 |
context.layers.delete(node); |
| 12679 |
context.layersWithOutsidePointerEventsDisabled.delete(node); |
| 12680 |
dispatchUpdate(); |
| 12681 |
}; |
| 12682 |
}, [node, context]); |
| 12683 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 12684 |
const handleUpdate = () => force({}); |
| 12685 |
document.addEventListener(CONTEXT_UPDATE, handleUpdate); |
| 12686 |
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate); |
| 12687 |
}, []); |
| 12688 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)( |
| 12689 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_2__.Primitive.div, |
| 12690 |
{ |
| 12691 |
...layerProps, |
| 12692 |
ref: composedRefs, |
| 12693 |
style: { |
| 12694 |
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0, |
| 12695 |
...props.style |
| 12696 |
}, |
| 12697 |
onFocusCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onFocusCapture, focusOutside.onFocusCapture), |
| 12698 |
onBlurCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onBlurCapture, focusOutside.onBlurCapture), |
| 12699 |
onPointerDownCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)( |
| 12700 |
props.onPointerDownCapture, |
| 12701 |
pointerDownOutside.onPointerDownCapture |
| 12702 |
) |
| 12703 |
} |
| 12704 |
); |
| 12705 |
} |
| 12706 |
); |
| 12707 |
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME; |
| 12708 |
var BRANCH_NAME = "DismissableLayerBranch"; |
| 12709 |
var DismissableLayerBranch = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 12710 |
const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DismissableLayerContext); |
| 12711 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 12712 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, ref); |
| 12713 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 12714 |
const node = ref.current; |
| 12715 |
if (node) { |
| 12716 |
context.branches.add(node); |
| 12717 |
return () => { |
| 12718 |
context.branches.delete(node); |
| 12719 |
}; |
| 12720 |
} |
| 12721 |
}, [context.branches]); |
| 12722 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_2__.Primitive.div, { ...props, ref: composedRefs }); |
| 12723 |
}); |
| 12724 |
DismissableLayerBranch.displayName = BRANCH_NAME; |
| 12725 |
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) { |
| 12726 |
const handlePointerDownOutside = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_4__.useCallbackRef)(onPointerDownOutside); |
| 12727 |
const isPointerInsideReactTreeRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); |
| 12728 |
const handleClickRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(() => { |
| 12729 |
}); |
| 12730 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 12731 |
const handlePointerDown = (event) => { |
| 12732 |
if (event.target && !isPointerInsideReactTreeRef.current) { |
| 12733 |
let handleAndDispatchPointerDownOutsideEvent2 = function() { |
| 12734 |
handleAndDispatchCustomEvent( |
| 12735 |
POINTER_DOWN_OUTSIDE, |
| 12736 |
handlePointerDownOutside, |
| 12737 |
eventDetail, |
| 12738 |
{ discrete: true } |
| 12739 |
); |
| 12740 |
}; |
| 12741 |
var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2; |
| 12742 |
const eventDetail = { originalEvent: event }; |
| 12743 |
if (event.pointerType === "touch") { |
| 12744 |
ownerDocument.removeEventListener("click", handleClickRef.current); |
| 12745 |
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2; |
| 12746 |
ownerDocument.addEventListener("click", handleClickRef.current, { once: true }); |
| 12747 |
} else { |
| 12748 |
handleAndDispatchPointerDownOutsideEvent2(); |
| 12749 |
} |
| 12750 |
} else { |
| 12751 |
ownerDocument.removeEventListener("click", handleClickRef.current); |
| 12752 |
} |
| 12753 |
isPointerInsideReactTreeRef.current = false; |
| 12754 |
}; |
| 12755 |
const timerId = window.setTimeout(() => { |
| 12756 |
ownerDocument.addEventListener("pointerdown", handlePointerDown); |
| 12757 |
}, 0); |
| 12758 |
return () => { |
| 12759 |
window.clearTimeout(timerId); |
| 12760 |
ownerDocument.removeEventListener("pointerdown", handlePointerDown); |
| 12761 |
ownerDocument.removeEventListener("click", handleClickRef.current); |
| 12762 |
}; |
| 12763 |
}, [ownerDocument, handlePointerDownOutside]); |
| 12764 |
return { |
| 12765 |
// ensures we check React component tree (not just DOM tree) |
| 12766 |
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true |
| 12767 |
}; |
| 12768 |
} |
| 12769 |
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) { |
| 12770 |
const handleFocusOutside = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_4__.useCallbackRef)(onFocusOutside); |
| 12771 |
const isFocusInsideReactTreeRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); |
| 12772 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 12773 |
const handleFocus = (event) => { |
| 12774 |
if (event.target && !isFocusInsideReactTreeRef.current) { |
| 12775 |
const eventDetail = { originalEvent: event }; |
| 12776 |
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, { |
| 12777 |
discrete: false |
| 12778 |
}); |
| 12779 |
} |
| 12780 |
}; |
| 12781 |
ownerDocument.addEventListener("focusin", handleFocus); |
| 12782 |
return () => ownerDocument.removeEventListener("focusin", handleFocus); |
| 12783 |
}, [ownerDocument, handleFocusOutside]); |
| 12784 |
return { |
| 12785 |
onFocusCapture: () => isFocusInsideReactTreeRef.current = true, |
| 12786 |
onBlurCapture: () => isFocusInsideReactTreeRef.current = false |
| 12787 |
}; |
| 12788 |
} |
| 12789 |
function dispatchUpdate() { |
| 12790 |
const event = new CustomEvent(CONTEXT_UPDATE); |
| 12791 |
document.dispatchEvent(event); |
| 12792 |
} |
| 12793 |
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) { |
| 12794 |
const target = detail.originalEvent.target; |
| 12795 |
const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail }); |
| 12796 |
if (handler) target.addEventListener(name, handler, { once: true }); |
| 12797 |
if (discrete) { |
| 12798 |
(0,_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_2__.dispatchDiscreteCustomEvent)(target, event); |
| 12799 |
} else { |
| 12800 |
target.dispatchEvent(event); |
| 12801 |
} |
| 12802 |
} |
| 12803 |
var Root = DismissableLayer; |
| 12804 |
var Branch = DismissableLayerBranch; |
| 12805 |
|
| 12806 |
//# sourceMappingURL=index.mjs.map |
| 12807 |
|
| 12808 |
|
| 12809 |
/***/ }, |
| 12810 |
|
| 12811 |
/***/ "./node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs" |
| 12812 |
/*!*******************************************************************!*\ |
| 12813 |
!*** ./node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs ***! |
| 12814 |
\*******************************************************************/ |
| 12815 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 12816 |
|
| 12817 |
__webpack_require__.r(__webpack_exports__); |
| 12818 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 12819 |
/* harmony export */ Arrow: () => (/* binding */ Arrow2), |
| 12820 |
/* harmony export */ CheckboxItem: () => (/* binding */ CheckboxItem2), |
| 12821 |
/* harmony export */ Content: () => (/* binding */ Content2), |
| 12822 |
/* harmony export */ DropdownMenu: () => (/* binding */ DropdownMenu), |
| 12823 |
/* harmony export */ DropdownMenuArrow: () => (/* binding */ DropdownMenuArrow), |
| 12824 |
/* harmony export */ DropdownMenuCheckboxItem: () => (/* binding */ DropdownMenuCheckboxItem), |
| 12825 |
/* harmony export */ DropdownMenuContent: () => (/* binding */ DropdownMenuContent), |
| 12826 |
/* harmony export */ DropdownMenuGroup: () => (/* binding */ DropdownMenuGroup), |
| 12827 |
/* harmony export */ DropdownMenuItem: () => (/* binding */ DropdownMenuItem), |
| 12828 |
/* harmony export */ DropdownMenuItemIndicator: () => (/* binding */ DropdownMenuItemIndicator), |
| 12829 |
/* harmony export */ DropdownMenuLabel: () => (/* binding */ DropdownMenuLabel), |
| 12830 |
/* harmony export */ DropdownMenuPortal: () => (/* binding */ DropdownMenuPortal), |
| 12831 |
/* harmony export */ DropdownMenuRadioGroup: () => (/* binding */ DropdownMenuRadioGroup), |
| 12832 |
/* harmony export */ DropdownMenuRadioItem: () => (/* binding */ DropdownMenuRadioItem), |
| 12833 |
/* harmony export */ DropdownMenuSeparator: () => (/* binding */ DropdownMenuSeparator), |
| 12834 |
/* harmony export */ DropdownMenuSub: () => (/* binding */ DropdownMenuSub), |
| 12835 |
/* harmony export */ DropdownMenuSubContent: () => (/* binding */ DropdownMenuSubContent), |
| 12836 |
/* harmony export */ DropdownMenuSubTrigger: () => (/* binding */ DropdownMenuSubTrigger), |
| 12837 |
/* harmony export */ DropdownMenuTrigger: () => (/* binding */ DropdownMenuTrigger), |
| 12838 |
/* harmony export */ Group: () => (/* binding */ Group2), |
| 12839 |
/* harmony export */ Item: () => (/* binding */ Item2), |
| 12840 |
/* harmony export */ ItemIndicator: () => (/* binding */ ItemIndicator2), |
| 12841 |
/* harmony export */ Label: () => (/* binding */ Label2), |
| 12842 |
/* harmony export */ Portal: () => (/* binding */ Portal2), |
| 12843 |
/* harmony export */ RadioGroup: () => (/* binding */ RadioGroup2), |
| 12844 |
/* harmony export */ RadioItem: () => (/* binding */ RadioItem2), |
| 12845 |
/* harmony export */ Root: () => (/* binding */ Root2), |
| 12846 |
/* harmony export */ Separator: () => (/* binding */ Separator2), |
| 12847 |
/* harmony export */ Sub: () => (/* binding */ Sub2), |
| 12848 |
/* harmony export */ SubContent: () => (/* binding */ SubContent2), |
| 12849 |
/* harmony export */ SubTrigger: () => (/* binding */ SubTrigger2), |
| 12850 |
/* harmony export */ Trigger: () => (/* binding */ Trigger), |
| 12851 |
/* harmony export */ createDropdownMenuScope: () => (/* binding */ createDropdownMenuScope) |
| 12852 |
/* harmony export */ }); |
| 12853 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 12854 |
/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/primitive */ "./node_modules/@radix-ui/primitive/dist/index.mjs"); |
| 12855 |
/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ "./node_modules/@radix-ui/react-compose-refs/dist/index.mjs"); |
| 12856 |
/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-context */ "./node_modules/@radix-ui/react-context/dist/index.mjs"); |
| 12857 |
/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ "./node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"); |
| 12858 |
/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-primitive */ "./node_modules/@radix-ui/react-primitive/dist/index.mjs"); |
| 12859 |
/* harmony import */ var _radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-menu */ "./node_modules/@radix-ui/react-menu/dist/index.mjs"); |
| 12860 |
/* harmony import */ var _radix_ui_react_id__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/react-id */ "./node_modules/@radix-ui/react-id/dist/index.mjs"); |
| 12861 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 12862 |
"use client"; |
| 12863 |
|
| 12864 |
// src/dropdown-menu.tsx |
| 12865 |
|
| 12866 |
|
| 12867 |
|
| 12868 |
|
| 12869 |
|
| 12870 |
|
| 12871 |
|
| 12872 |
|
| 12873 |
|
| 12874 |
|
| 12875 |
var DROPDOWN_MENU_NAME = "DropdownMenu"; |
| 12876 |
var [createDropdownMenuContext, createDropdownMenuScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_3__.createContextScope)( |
| 12877 |
DROPDOWN_MENU_NAME, |
| 12878 |
[_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.createMenuScope] |
| 12879 |
); |
| 12880 |
var useMenuScope = (0,_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.createMenuScope)(); |
| 12881 |
var [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME); |
| 12882 |
var DropdownMenu = (props) => { |
| 12883 |
const { |
| 12884 |
__scopeDropdownMenu, |
| 12885 |
children, |
| 12886 |
dir, |
| 12887 |
open: openProp, |
| 12888 |
defaultOpen, |
| 12889 |
onOpenChange, |
| 12890 |
modal = true |
| 12891 |
} = props; |
| 12892 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 12893 |
const triggerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 12894 |
const [open, setOpen] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__.useControllableState)({ |
| 12895 |
prop: openProp, |
| 12896 |
defaultProp: defaultOpen ?? false, |
| 12897 |
onChange: onOpenChange, |
| 12898 |
caller: DROPDOWN_MENU_NAME |
| 12899 |
}); |
| 12900 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)( |
| 12901 |
DropdownMenuProvider, |
| 12902 |
{ |
| 12903 |
scope: __scopeDropdownMenu, |
| 12904 |
triggerId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_7__.useId)(), |
| 12905 |
triggerRef, |
| 12906 |
contentId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_7__.useId)(), |
| 12907 |
open, |
| 12908 |
onOpenChange: setOpen, |
| 12909 |
onOpenToggle: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]), |
| 12910 |
modal, |
| 12911 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.Root, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children }) |
| 12912 |
} |
| 12913 |
); |
| 12914 |
}; |
| 12915 |
DropdownMenu.displayName = DROPDOWN_MENU_NAME; |
| 12916 |
var TRIGGER_NAME = "DropdownMenuTrigger"; |
| 12917 |
var DropdownMenuTrigger = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 12918 |
(props, forwardedRef) => { |
| 12919 |
const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props; |
| 12920 |
const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu); |
| 12921 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 12922 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)( |
| 12923 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_5__.Primitive.button, |
| 12924 |
{ |
| 12925 |
type: "button", |
| 12926 |
id: context.triggerId, |
| 12927 |
"aria-haspopup": "menu", |
| 12928 |
"aria-expanded": context.open, |
| 12929 |
"aria-controls": context.open ? context.contentId : void 0, |
| 12930 |
"data-state": context.open ? "open" : "closed", |
| 12931 |
"data-disabled": disabled ? "" : void 0, |
| 12932 |
disabled, |
| 12933 |
...triggerProps, |
| 12934 |
ref: (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.composeRefs)(forwardedRef, context.triggerRef), |
| 12935 |
onPointerDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onPointerDown, (event) => { |
| 12936 |
if (!disabled && event.button === 0 && event.ctrlKey === false) { |
| 12937 |
context.onOpenToggle(); |
| 12938 |
if (!context.open) event.preventDefault(); |
| 12939 |
} |
| 12940 |
}), |
| 12941 |
onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onKeyDown, (event) => { |
| 12942 |
if (disabled) return; |
| 12943 |
if (["Enter", " "].includes(event.key)) context.onOpenToggle(); |
| 12944 |
if (event.key === "ArrowDown") context.onOpenChange(true); |
| 12945 |
if (["Enter", " ", "ArrowDown"].includes(event.key)) event.preventDefault(); |
| 12946 |
}) |
| 12947 |
} |
| 12948 |
) }); |
| 12949 |
} |
| 12950 |
); |
| 12951 |
DropdownMenuTrigger.displayName = TRIGGER_NAME; |
| 12952 |
var PORTAL_NAME = "DropdownMenuPortal"; |
| 12953 |
var DropdownMenuPortal = (props) => { |
| 12954 |
const { __scopeDropdownMenu, ...portalProps } = props; |
| 12955 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 12956 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.Portal, { ...menuScope, ...portalProps }); |
| 12957 |
}; |
| 12958 |
DropdownMenuPortal.displayName = PORTAL_NAME; |
| 12959 |
var CONTENT_NAME = "DropdownMenuContent"; |
| 12960 |
var DropdownMenuContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 12961 |
(props, forwardedRef) => { |
| 12962 |
const { __scopeDropdownMenu, ...contentProps } = props; |
| 12963 |
const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu); |
| 12964 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 12965 |
const hasInteractedOutsideRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); |
| 12966 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)( |
| 12967 |
_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.Content, |
| 12968 |
{ |
| 12969 |
id: context.contentId, |
| 12970 |
"aria-labelledby": context.triggerId, |
| 12971 |
...menuScope, |
| 12972 |
...contentProps, |
| 12973 |
ref: forwardedRef, |
| 12974 |
onCloseAutoFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onCloseAutoFocus, (event) => { |
| 12975 |
if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus(); |
| 12976 |
hasInteractedOutsideRef.current = false; |
| 12977 |
event.preventDefault(); |
| 12978 |
}), |
| 12979 |
onInteractOutside: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onInteractOutside, (event) => { |
| 12980 |
const originalEvent = event.detail.originalEvent; |
| 12981 |
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true; |
| 12982 |
const isRightClick = originalEvent.button === 2 || ctrlLeftClick; |
| 12983 |
if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true; |
| 12984 |
}), |
| 12985 |
style: { |
| 12986 |
...props.style, |
| 12987 |
// re-namespace exposed content custom properties |
| 12988 |
...{ |
| 12989 |
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)", |
| 12990 |
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)", |
| 12991 |
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)", |
| 12992 |
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)", |
| 12993 |
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)" |
| 12994 |
} |
| 12995 |
} |
| 12996 |
} |
| 12997 |
); |
| 12998 |
} |
| 12999 |
); |
| 13000 |
DropdownMenuContent.displayName = CONTENT_NAME; |
| 13001 |
var GROUP_NAME = "DropdownMenuGroup"; |
| 13002 |
var DropdownMenuGroup = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 13003 |
(props, forwardedRef) => { |
| 13004 |
const { __scopeDropdownMenu, ...groupProps } = props; |
| 13005 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 13006 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.Group, { ...menuScope, ...groupProps, ref: forwardedRef }); |
| 13007 |
} |
| 13008 |
); |
| 13009 |
DropdownMenuGroup.displayName = GROUP_NAME; |
| 13010 |
var LABEL_NAME = "DropdownMenuLabel"; |
| 13011 |
var DropdownMenuLabel = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 13012 |
(props, forwardedRef) => { |
| 13013 |
const { __scopeDropdownMenu, ...labelProps } = props; |
| 13014 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 13015 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.Label, { ...menuScope, ...labelProps, ref: forwardedRef }); |
| 13016 |
} |
| 13017 |
); |
| 13018 |
DropdownMenuLabel.displayName = LABEL_NAME; |
| 13019 |
var ITEM_NAME = "DropdownMenuItem"; |
| 13020 |
var DropdownMenuItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 13021 |
(props, forwardedRef) => { |
| 13022 |
const { __scopeDropdownMenu, ...itemProps } = props; |
| 13023 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 13024 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.Item, { ...menuScope, ...itemProps, ref: forwardedRef }); |
| 13025 |
} |
| 13026 |
); |
| 13027 |
DropdownMenuItem.displayName = ITEM_NAME; |
| 13028 |
var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem"; |
| 13029 |
var DropdownMenuCheckboxItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 13030 |
const { __scopeDropdownMenu, ...checkboxItemProps } = props; |
| 13031 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 13032 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef }); |
| 13033 |
}); |
| 13034 |
DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME; |
| 13035 |
var RADIO_GROUP_NAME = "DropdownMenuRadioGroup"; |
| 13036 |
var DropdownMenuRadioGroup = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 13037 |
const { __scopeDropdownMenu, ...radioGroupProps } = props; |
| 13038 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 13039 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef }); |
| 13040 |
}); |
| 13041 |
DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME; |
| 13042 |
var RADIO_ITEM_NAME = "DropdownMenuRadioItem"; |
| 13043 |
var DropdownMenuRadioItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 13044 |
const { __scopeDropdownMenu, ...radioItemProps } = props; |
| 13045 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 13046 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef }); |
| 13047 |
}); |
| 13048 |
DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME; |
| 13049 |
var INDICATOR_NAME = "DropdownMenuItemIndicator"; |
| 13050 |
var DropdownMenuItemIndicator = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 13051 |
const { __scopeDropdownMenu, ...itemIndicatorProps } = props; |
| 13052 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 13053 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef }); |
| 13054 |
}); |
| 13055 |
DropdownMenuItemIndicator.displayName = INDICATOR_NAME; |
| 13056 |
var SEPARATOR_NAME = "DropdownMenuSeparator"; |
| 13057 |
var DropdownMenuSeparator = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 13058 |
const { __scopeDropdownMenu, ...separatorProps } = props; |
| 13059 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 13060 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef }); |
| 13061 |
}); |
| 13062 |
DropdownMenuSeparator.displayName = SEPARATOR_NAME; |
| 13063 |
var ARROW_NAME = "DropdownMenuArrow"; |
| 13064 |
var DropdownMenuArrow = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 13065 |
(props, forwardedRef) => { |
| 13066 |
const { __scopeDropdownMenu, ...arrowProps } = props; |
| 13067 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 13068 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef }); |
| 13069 |
} |
| 13070 |
); |
| 13071 |
DropdownMenuArrow.displayName = ARROW_NAME; |
| 13072 |
var DropdownMenuSub = (props) => { |
| 13073 |
const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props; |
| 13074 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 13075 |
const [open, setOpen] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__.useControllableState)({ |
| 13076 |
prop: openProp, |
| 13077 |
defaultProp: defaultOpen ?? false, |
| 13078 |
onChange: onOpenChange, |
| 13079 |
caller: "DropdownMenuSub" |
| 13080 |
}); |
| 13081 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.Sub, { ...menuScope, open, onOpenChange: setOpen, children }); |
| 13082 |
}; |
| 13083 |
var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger"; |
| 13084 |
var DropdownMenuSubTrigger = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 13085 |
const { __scopeDropdownMenu, ...subTriggerProps } = props; |
| 13086 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 13087 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef }); |
| 13088 |
}); |
| 13089 |
DropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME; |
| 13090 |
var SUB_CONTENT_NAME = "DropdownMenuSubContent"; |
| 13091 |
var DropdownMenuSubContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 13092 |
const { __scopeDropdownMenu, ...subContentProps } = props; |
| 13093 |
const menuScope = useMenuScope(__scopeDropdownMenu); |
| 13094 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)( |
| 13095 |
_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_6__.SubContent, |
| 13096 |
{ |
| 13097 |
...menuScope, |
| 13098 |
...subContentProps, |
| 13099 |
ref: forwardedRef, |
| 13100 |
style: { |
| 13101 |
...props.style, |
| 13102 |
// re-namespace exposed content custom properties |
| 13103 |
...{ |
| 13104 |
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)", |
| 13105 |
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)", |
| 13106 |
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)", |
| 13107 |
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)", |
| 13108 |
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)" |
| 13109 |
} |
| 13110 |
} |
| 13111 |
} |
| 13112 |
); |
| 13113 |
}); |
| 13114 |
DropdownMenuSubContent.displayName = SUB_CONTENT_NAME; |
| 13115 |
var Root2 = DropdownMenu; |
| 13116 |
var Trigger = DropdownMenuTrigger; |
| 13117 |
var Portal2 = DropdownMenuPortal; |
| 13118 |
var Content2 = DropdownMenuContent; |
| 13119 |
var Group2 = DropdownMenuGroup; |
| 13120 |
var Label2 = DropdownMenuLabel; |
| 13121 |
var Item2 = DropdownMenuItem; |
| 13122 |
var CheckboxItem2 = DropdownMenuCheckboxItem; |
| 13123 |
var RadioGroup2 = DropdownMenuRadioGroup; |
| 13124 |
var RadioItem2 = DropdownMenuRadioItem; |
| 13125 |
var ItemIndicator2 = DropdownMenuItemIndicator; |
| 13126 |
var Separator2 = DropdownMenuSeparator; |
| 13127 |
var Arrow2 = DropdownMenuArrow; |
| 13128 |
var Sub2 = DropdownMenuSub; |
| 13129 |
var SubTrigger2 = DropdownMenuSubTrigger; |
| 13130 |
var SubContent2 = DropdownMenuSubContent; |
| 13131 |
|
| 13132 |
//# sourceMappingURL=index.mjs.map |
| 13133 |
|
| 13134 |
|
| 13135 |
/***/ }, |
| 13136 |
|
| 13137 |
/***/ "./node_modules/@radix-ui/react-focus-guards/dist/index.mjs" |
| 13138 |
/*!******************************************************************!*\ |
| 13139 |
!*** ./node_modules/@radix-ui/react-focus-guards/dist/index.mjs ***! |
| 13140 |
\******************************************************************/ |
| 13141 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 13142 |
|
| 13143 |
__webpack_require__.r(__webpack_exports__); |
| 13144 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 13145 |
/* harmony export */ FocusGuards: () => (/* binding */ FocusGuards), |
| 13146 |
/* harmony export */ Root: () => (/* binding */ FocusGuards), |
| 13147 |
/* harmony export */ useFocusGuards: () => (/* binding */ useFocusGuards) |
| 13148 |
/* harmony export */ }); |
| 13149 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 13150 |
"use client"; |
| 13151 |
|
| 13152 |
// src/focus-guards.tsx |
| 13153 |
|
| 13154 |
var count = 0; |
| 13155 |
function FocusGuards(props) { |
| 13156 |
useFocusGuards(); |
| 13157 |
return props.children; |
| 13158 |
} |
| 13159 |
function useFocusGuards() { |
| 13160 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 13161 |
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]"); |
| 13162 |
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard()); |
| 13163 |
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard()); |
| 13164 |
count++; |
| 13165 |
return () => { |
| 13166 |
if (count === 1) { |
| 13167 |
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove()); |
| 13168 |
} |
| 13169 |
count--; |
| 13170 |
}; |
| 13171 |
}, []); |
| 13172 |
} |
| 13173 |
function createFocusGuard() { |
| 13174 |
const element = document.createElement("span"); |
| 13175 |
element.setAttribute("data-radix-focus-guard", ""); |
| 13176 |
element.tabIndex = 0; |
| 13177 |
element.style.outline = "none"; |
| 13178 |
element.style.opacity = "0"; |
| 13179 |
element.style.position = "fixed"; |
| 13180 |
element.style.pointerEvents = "none"; |
| 13181 |
return element; |
| 13182 |
} |
| 13183 |
|
| 13184 |
//# sourceMappingURL=index.mjs.map |
| 13185 |
|
| 13186 |
|
| 13187 |
/***/ }, |
| 13188 |
|
| 13189 |
/***/ "./node_modules/@radix-ui/react-focus-scope/dist/index.mjs" |
| 13190 |
/*!*****************************************************************!*\ |
| 13191 |
!*** ./node_modules/@radix-ui/react-focus-scope/dist/index.mjs ***! |
| 13192 |
\*****************************************************************/ |
| 13193 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 13194 |
|
| 13195 |
__webpack_require__.r(__webpack_exports__); |
| 13196 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 13197 |
/* harmony export */ FocusScope: () => (/* binding */ FocusScope), |
| 13198 |
/* harmony export */ Root: () => (/* binding */ Root) |
| 13199 |
/* harmony export */ }); |
| 13200 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 13201 |
/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ "./node_modules/@radix-ui/react-compose-refs/dist/index.mjs"); |
| 13202 |
/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-primitive */ "./node_modules/@radix-ui/react-primitive/dist/index.mjs"); |
| 13203 |
/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ "./node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"); |
| 13204 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 13205 |
"use client"; |
| 13206 |
|
| 13207 |
// src/focus-scope.tsx |
| 13208 |
|
| 13209 |
|
| 13210 |
|
| 13211 |
|
| 13212 |
|
| 13213 |
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount"; |
| 13214 |
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount"; |
| 13215 |
var EVENT_OPTIONS = { bubbles: false, cancelable: true }; |
| 13216 |
var FOCUS_SCOPE_NAME = "FocusScope"; |
| 13217 |
var FocusScope = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 13218 |
const { |
| 13219 |
loop = false, |
| 13220 |
trapped = false, |
| 13221 |
onMountAutoFocus: onMountAutoFocusProp, |
| 13222 |
onUnmountAutoFocus: onUnmountAutoFocusProp, |
| 13223 |
...scopeProps |
| 13224 |
} = props; |
| 13225 |
const [container, setContainer] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 13226 |
const onMountAutoFocus = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_3__.useCallbackRef)(onMountAutoFocusProp); |
| 13227 |
const onUnmountAutoFocus = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_3__.useCallbackRef)(onUnmountAutoFocusProp); |
| 13228 |
const lastFocusedElementRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 13229 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_1__.useComposedRefs)(forwardedRef, (node) => setContainer(node)); |
| 13230 |
const focusScope = react__WEBPACK_IMPORTED_MODULE_0__.useRef({ |
| 13231 |
paused: false, |
| 13232 |
pause() { |
| 13233 |
this.paused = true; |
| 13234 |
}, |
| 13235 |
resume() { |
| 13236 |
this.paused = false; |
| 13237 |
} |
| 13238 |
}).current; |
| 13239 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 13240 |
if (trapped) { |
| 13241 |
let handleFocusIn2 = function(event) { |
| 13242 |
if (focusScope.paused || !container) return; |
| 13243 |
const target = event.target; |
| 13244 |
if (container.contains(target)) { |
| 13245 |
lastFocusedElementRef.current = target; |
| 13246 |
} else { |
| 13247 |
focus(lastFocusedElementRef.current, { select: true }); |
| 13248 |
} |
| 13249 |
}, handleFocusOut2 = function(event) { |
| 13250 |
if (focusScope.paused || !container) return; |
| 13251 |
const relatedTarget = event.relatedTarget; |
| 13252 |
if (relatedTarget === null) return; |
| 13253 |
if (!container.contains(relatedTarget)) { |
| 13254 |
focus(lastFocusedElementRef.current, { select: true }); |
| 13255 |
} |
| 13256 |
}, handleMutations2 = function(mutations) { |
| 13257 |
const focusedElement = document.activeElement; |
| 13258 |
if (focusedElement !== document.body) return; |
| 13259 |
for (const mutation of mutations) { |
| 13260 |
if (mutation.removedNodes.length > 0) focus(container); |
| 13261 |
} |
| 13262 |
}; |
| 13263 |
var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2; |
| 13264 |
document.addEventListener("focusin", handleFocusIn2); |
| 13265 |
document.addEventListener("focusout", handleFocusOut2); |
| 13266 |
const mutationObserver = new MutationObserver(handleMutations2); |
| 13267 |
if (container) mutationObserver.observe(container, { childList: true, subtree: true }); |
| 13268 |
return () => { |
| 13269 |
document.removeEventListener("focusin", handleFocusIn2); |
| 13270 |
document.removeEventListener("focusout", handleFocusOut2); |
| 13271 |
mutationObserver.disconnect(); |
| 13272 |
}; |
| 13273 |
} |
| 13274 |
}, [trapped, container, focusScope.paused]); |
| 13275 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 13276 |
if (container) { |
| 13277 |
focusScopesStack.add(focusScope); |
| 13278 |
const previouslyFocusedElement = document.activeElement; |
| 13279 |
const hasFocusedCandidate = container.contains(previouslyFocusedElement); |
| 13280 |
if (!hasFocusedCandidate) { |
| 13281 |
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS); |
| 13282 |
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus); |
| 13283 |
container.dispatchEvent(mountEvent); |
| 13284 |
if (!mountEvent.defaultPrevented) { |
| 13285 |
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true }); |
| 13286 |
if (document.activeElement === previouslyFocusedElement) { |
| 13287 |
focus(container); |
| 13288 |
} |
| 13289 |
} |
| 13290 |
} |
| 13291 |
return () => { |
| 13292 |
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus); |
| 13293 |
setTimeout(() => { |
| 13294 |
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS); |
| 13295 |
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus); |
| 13296 |
container.dispatchEvent(unmountEvent); |
| 13297 |
if (!unmountEvent.defaultPrevented) { |
| 13298 |
focus(previouslyFocusedElement ?? document.body, { select: true }); |
| 13299 |
} |
| 13300 |
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus); |
| 13301 |
focusScopesStack.remove(focusScope); |
| 13302 |
}, 0); |
| 13303 |
}; |
| 13304 |
} |
| 13305 |
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]); |
| 13306 |
const handleKeyDown = react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 13307 |
(event) => { |
| 13308 |
if (!loop && !trapped) return; |
| 13309 |
if (focusScope.paused) return; |
| 13310 |
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey; |
| 13311 |
const focusedElement = document.activeElement; |
| 13312 |
if (isTabKey && focusedElement) { |
| 13313 |
const container2 = event.currentTarget; |
| 13314 |
const [first, last] = getTabbableEdges(container2); |
| 13315 |
const hasTabbableElementsInside = first && last; |
| 13316 |
if (!hasTabbableElementsInside) { |
| 13317 |
if (focusedElement === container2) event.preventDefault(); |
| 13318 |
} else { |
| 13319 |
if (!event.shiftKey && focusedElement === last) { |
| 13320 |
event.preventDefault(); |
| 13321 |
if (loop) focus(first, { select: true }); |
| 13322 |
} else if (event.shiftKey && focusedElement === first) { |
| 13323 |
event.preventDefault(); |
| 13324 |
if (loop) focus(last, { select: true }); |
| 13325 |
} |
| 13326 |
} |
| 13327 |
} |
| 13328 |
}, |
| 13329 |
[loop, trapped, focusScope.paused] |
| 13330 |
); |
| 13331 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_2__.Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown }); |
| 13332 |
}); |
| 13333 |
FocusScope.displayName = FOCUS_SCOPE_NAME; |
| 13334 |
function focusFirst(candidates, { select = false } = {}) { |
| 13335 |
const previouslyFocusedElement = document.activeElement; |
| 13336 |
for (const candidate of candidates) { |
| 13337 |
focus(candidate, { select }); |
| 13338 |
if (document.activeElement !== previouslyFocusedElement) return; |
| 13339 |
} |
| 13340 |
} |
| 13341 |
function getTabbableEdges(container) { |
| 13342 |
const candidates = getTabbableCandidates(container); |
| 13343 |
const first = findVisible(candidates, container); |
| 13344 |
const last = findVisible(candidates.reverse(), container); |
| 13345 |
return [first, last]; |
| 13346 |
} |
| 13347 |
function getTabbableCandidates(container) { |
| 13348 |
const nodes = []; |
| 13349 |
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { |
| 13350 |
acceptNode: (node) => { |
| 13351 |
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden"; |
| 13352 |
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; |
| 13353 |
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; |
| 13354 |
} |
| 13355 |
}); |
| 13356 |
while (walker.nextNode()) nodes.push(walker.currentNode); |
| 13357 |
return nodes; |
| 13358 |
} |
| 13359 |
function findVisible(elements, container) { |
| 13360 |
for (const element of elements) { |
| 13361 |
if (!isHidden(element, { upTo: container })) return element; |
| 13362 |
} |
| 13363 |
} |
| 13364 |
function isHidden(node, { upTo }) { |
| 13365 |
if (getComputedStyle(node).visibility === "hidden") return true; |
| 13366 |
while (node) { |
| 13367 |
if (upTo !== void 0 && node === upTo) return false; |
| 13368 |
if (getComputedStyle(node).display === "none") return true; |
| 13369 |
node = node.parentElement; |
| 13370 |
} |
| 13371 |
return false; |
| 13372 |
} |
| 13373 |
function isSelectableInput(element) { |
| 13374 |
return element instanceof HTMLInputElement && "select" in element; |
| 13375 |
} |
| 13376 |
function focus(element, { select = false } = {}) { |
| 13377 |
if (element && element.focus) { |
| 13378 |
const previouslyFocusedElement = document.activeElement; |
| 13379 |
element.focus({ preventScroll: true }); |
| 13380 |
if (element !== previouslyFocusedElement && isSelectableInput(element) && select) |
| 13381 |
element.select(); |
| 13382 |
} |
| 13383 |
} |
| 13384 |
var focusScopesStack = createFocusScopesStack(); |
| 13385 |
function createFocusScopesStack() { |
| 13386 |
let stack = []; |
| 13387 |
return { |
| 13388 |
add(focusScope) { |
| 13389 |
const activeFocusScope = stack[0]; |
| 13390 |
if (focusScope !== activeFocusScope) { |
| 13391 |
activeFocusScope?.pause(); |
| 13392 |
} |
| 13393 |
stack = arrayRemove(stack, focusScope); |
| 13394 |
stack.unshift(focusScope); |
| 13395 |
}, |
| 13396 |
remove(focusScope) { |
| 13397 |
stack = arrayRemove(stack, focusScope); |
| 13398 |
stack[0]?.resume(); |
| 13399 |
} |
| 13400 |
}; |
| 13401 |
} |
| 13402 |
function arrayRemove(array, item) { |
| 13403 |
const updatedArray = [...array]; |
| 13404 |
const index = updatedArray.indexOf(item); |
| 13405 |
if (index !== -1) { |
| 13406 |
updatedArray.splice(index, 1); |
| 13407 |
} |
| 13408 |
return updatedArray; |
| 13409 |
} |
| 13410 |
function removeLinks(items) { |
| 13411 |
return items.filter((item) => item.tagName !== "A"); |
| 13412 |
} |
| 13413 |
var Root = FocusScope; |
| 13414 |
|
| 13415 |
//# sourceMappingURL=index.mjs.map |
| 13416 |
|
| 13417 |
|
| 13418 |
/***/ }, |
| 13419 |
|
| 13420 |
/***/ "./node_modules/@radix-ui/react-id/dist/index.mjs" |
| 13421 |
/*!********************************************************!*\ |
| 13422 |
!*** ./node_modules/@radix-ui/react-id/dist/index.mjs ***! |
| 13423 |
\********************************************************/ |
| 13424 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 13425 |
|
| 13426 |
var react__WEBPACK_IMPORTED_MODULE_0___namespace_cache; |
| 13427 |
__webpack_require__.r(__webpack_exports__); |
| 13428 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 13429 |
/* harmony export */ useId: () => (/* binding */ useId) |
| 13430 |
/* harmony export */ }); |
| 13431 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 13432 |
/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ "./node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"); |
| 13433 |
// packages/react/id/src/id.tsx |
| 13434 |
|
| 13435 |
|
| 13436 |
var useReactId = /*#__PURE__*/ (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache = __webpack_require__.t(react__WEBPACK_IMPORTED_MODULE_0__, 2)))[" useId ".trim().toString()] || (() => void 0); |
| 13437 |
var count = 0; |
| 13438 |
function useId(deterministicId) { |
| 13439 |
const [id, setId] = react__WEBPACK_IMPORTED_MODULE_0__.useState(useReactId()); |
| 13440 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(() => { |
| 13441 |
if (!deterministicId) setId((reactId) => reactId ?? String(count++)); |
| 13442 |
}, [deterministicId]); |
| 13443 |
return deterministicId || (id ? `radix-${id}` : ""); |
| 13444 |
} |
| 13445 |
|
| 13446 |
//# sourceMappingURL=index.mjs.map |
| 13447 |
|
| 13448 |
|
| 13449 |
/***/ }, |
| 13450 |
|
| 13451 |
/***/ "./node_modules/@radix-ui/react-menu/dist/index.mjs" |
| 13452 |
/*!**********************************************************!*\ |
| 13453 |
!*** ./node_modules/@radix-ui/react-menu/dist/index.mjs ***! |
| 13454 |
\**********************************************************/ |
| 13455 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 13456 |
|
| 13457 |
__webpack_require__.r(__webpack_exports__); |
| 13458 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 13459 |
/* harmony export */ Anchor: () => (/* binding */ Anchor2), |
| 13460 |
/* harmony export */ Arrow: () => (/* binding */ Arrow2), |
| 13461 |
/* harmony export */ CheckboxItem: () => (/* binding */ CheckboxItem), |
| 13462 |
/* harmony export */ Content: () => (/* binding */ Content2), |
| 13463 |
/* harmony export */ Group: () => (/* binding */ Group), |
| 13464 |
/* harmony export */ Item: () => (/* binding */ Item2), |
| 13465 |
/* harmony export */ ItemIndicator: () => (/* binding */ ItemIndicator), |
| 13466 |
/* harmony export */ Label: () => (/* binding */ Label), |
| 13467 |
/* harmony export */ Menu: () => (/* binding */ Menu), |
| 13468 |
/* harmony export */ MenuAnchor: () => (/* binding */ MenuAnchor), |
| 13469 |
/* harmony export */ MenuArrow: () => (/* binding */ MenuArrow), |
| 13470 |
/* harmony export */ MenuCheckboxItem: () => (/* binding */ MenuCheckboxItem), |
| 13471 |
/* harmony export */ MenuContent: () => (/* binding */ MenuContent), |
| 13472 |
/* harmony export */ MenuGroup: () => (/* binding */ MenuGroup), |
| 13473 |
/* harmony export */ MenuItem: () => (/* binding */ MenuItem), |
| 13474 |
/* harmony export */ MenuItemIndicator: () => (/* binding */ MenuItemIndicator), |
| 13475 |
/* harmony export */ MenuLabel: () => (/* binding */ MenuLabel), |
| 13476 |
/* harmony export */ MenuPortal: () => (/* binding */ MenuPortal), |
| 13477 |
/* harmony export */ MenuRadioGroup: () => (/* binding */ MenuRadioGroup), |
| 13478 |
/* harmony export */ MenuRadioItem: () => (/* binding */ MenuRadioItem), |
| 13479 |
/* harmony export */ MenuSeparator: () => (/* binding */ MenuSeparator), |
| 13480 |
/* harmony export */ MenuSub: () => (/* binding */ MenuSub), |
| 13481 |
/* harmony export */ MenuSubContent: () => (/* binding */ MenuSubContent), |
| 13482 |
/* harmony export */ MenuSubTrigger: () => (/* binding */ MenuSubTrigger), |
| 13483 |
/* harmony export */ Portal: () => (/* binding */ Portal), |
| 13484 |
/* harmony export */ RadioGroup: () => (/* binding */ RadioGroup), |
| 13485 |
/* harmony export */ RadioItem: () => (/* binding */ RadioItem), |
| 13486 |
/* harmony export */ Root: () => (/* binding */ Root3), |
| 13487 |
/* harmony export */ Separator: () => (/* binding */ Separator), |
| 13488 |
/* harmony export */ Sub: () => (/* binding */ Sub), |
| 13489 |
/* harmony export */ SubContent: () => (/* binding */ SubContent), |
| 13490 |
/* harmony export */ SubTrigger: () => (/* binding */ SubTrigger), |
| 13491 |
/* harmony export */ createMenuScope: () => (/* binding */ createMenuScope) |
| 13492 |
/* harmony export */ }); |
| 13493 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 13494 |
/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/primitive */ "./node_modules/@radix-ui/primitive/dist/index.mjs"); |
| 13495 |
/* harmony import */ var _radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-collection */ "./node_modules/@radix-ui/react-collection/dist/index.mjs"); |
| 13496 |
/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ "./node_modules/@radix-ui/react-compose-refs/dist/index.mjs"); |
| 13497 |
/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-context */ "./node_modules/@radix-ui/react-context/dist/index.mjs"); |
| 13498 |
/* harmony import */ var _radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-direction */ "./node_modules/@radix-ui/react-direction/dist/index.mjs"); |
| 13499 |
/* harmony import */ var _radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-dismissable-layer */ "./node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs"); |
| 13500 |
/* harmony import */ var _radix_ui_react_focus_guards__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/react-focus-guards */ "./node_modules/@radix-ui/react-focus-guards/dist/index.mjs"); |
| 13501 |
/* harmony import */ var _radix_ui_react_focus_scope__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/react-focus-scope */ "./node_modules/@radix-ui/react-focus-scope/dist/index.mjs"); |
| 13502 |
/* harmony import */ var _radix_ui_react_id__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-id */ "./node_modules/@radix-ui/react-id/dist/index.mjs"); |
| 13503 |
/* harmony import */ var _radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @radix-ui/react-popper */ "./node_modules/@radix-ui/react-popper/dist/index.mjs"); |
| 13504 |
/* harmony import */ var _radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @radix-ui/react-portal */ "./node_modules/@radix-ui/react-portal/dist/index.mjs"); |
| 13505 |
/* harmony import */ var _radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @radix-ui/react-presence */ "./node_modules/@radix-ui/react-presence/dist/index.mjs"); |
| 13506 |
/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @radix-ui/react-primitive */ "./node_modules/@radix-ui/react-primitive/dist/index.mjs"); |
| 13507 |
/* harmony import */ var _radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @radix-ui/react-roving-focus */ "./node_modules/@radix-ui/react-roving-focus/dist/index.mjs"); |
| 13508 |
/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @radix-ui/react-slot */ "./node_modules/@radix-ui/react-slot/dist/index.mjs"); |
| 13509 |
/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ "./node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"); |
| 13510 |
/* harmony import */ var aria_hidden__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! aria-hidden */ "./node_modules/aria-hidden/dist/es2015/index.js"); |
| 13511 |
/* harmony import */ var react_remove_scroll__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! react-remove-scroll */ "./node_modules/react-remove-scroll/dist/es2015/Combination.js"); |
| 13512 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 13513 |
"use client"; |
| 13514 |
|
| 13515 |
// src/menu.tsx |
| 13516 |
|
| 13517 |
|
| 13518 |
|
| 13519 |
|
| 13520 |
|
| 13521 |
|
| 13522 |
|
| 13523 |
|
| 13524 |
|
| 13525 |
|
| 13526 |
|
| 13527 |
|
| 13528 |
|
| 13529 |
|
| 13530 |
|
| 13531 |
|
| 13532 |
|
| 13533 |
|
| 13534 |
|
| 13535 |
|
| 13536 |
|
| 13537 |
|
| 13538 |
var SELECTION_KEYS = ["Enter", " "]; |
| 13539 |
var FIRST_KEYS = ["ArrowDown", "PageUp", "Home"]; |
| 13540 |
var LAST_KEYS = ["ArrowUp", "PageDown", "End"]; |
| 13541 |
var FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS]; |
| 13542 |
var SUB_OPEN_KEYS = { |
| 13543 |
ltr: [...SELECTION_KEYS, "ArrowRight"], |
| 13544 |
rtl: [...SELECTION_KEYS, "ArrowLeft"] |
| 13545 |
}; |
| 13546 |
var SUB_CLOSE_KEYS = { |
| 13547 |
ltr: ["ArrowLeft"], |
| 13548 |
rtl: ["ArrowRight"] |
| 13549 |
}; |
| 13550 |
var MENU_NAME = "Menu"; |
| 13551 |
var [Collection, useCollection, createCollectionScope] = (0,_radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_2__.createCollection)(MENU_NAME); |
| 13552 |
var [createMenuContext, createMenuScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_4__.createContextScope)(MENU_NAME, [ |
| 13553 |
createCollectionScope, |
| 13554 |
_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_10__.createPopperScope, |
| 13555 |
_radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_14__.createRovingFocusGroupScope |
| 13556 |
]); |
| 13557 |
var usePopperScope = (0,_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_10__.createPopperScope)(); |
| 13558 |
var useRovingFocusGroupScope = (0,_radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_14__.createRovingFocusGroupScope)(); |
| 13559 |
var [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME); |
| 13560 |
var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME); |
| 13561 |
var Menu = (props) => { |
| 13562 |
const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props; |
| 13563 |
const popperScope = usePopperScope(__scopeMenu); |
| 13564 |
const [content, setContent] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 13565 |
const isUsingKeyboardRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); |
| 13566 |
const handleOpenChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_16__.useCallbackRef)(onOpenChange); |
| 13567 |
const direction = (0,_radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_5__.useDirection)(dir); |
| 13568 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 13569 |
const handleKeyDown = () => { |
| 13570 |
isUsingKeyboardRef.current = true; |
| 13571 |
document.addEventListener("pointerdown", handlePointer, { capture: true, once: true }); |
| 13572 |
document.addEventListener("pointermove", handlePointer, { capture: true, once: true }); |
| 13573 |
}; |
| 13574 |
const handlePointer = () => isUsingKeyboardRef.current = false; |
| 13575 |
document.addEventListener("keydown", handleKeyDown, { capture: true }); |
| 13576 |
return () => { |
| 13577 |
document.removeEventListener("keydown", handleKeyDown, { capture: true }); |
| 13578 |
document.removeEventListener("pointerdown", handlePointer, { capture: true }); |
| 13579 |
document.removeEventListener("pointermove", handlePointer, { capture: true }); |
| 13580 |
}; |
| 13581 |
}, []); |
| 13582 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_10__.Root, { ...popperScope, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 13583 |
MenuProvider, |
| 13584 |
{ |
| 13585 |
scope: __scopeMenu, |
| 13586 |
open, |
| 13587 |
onOpenChange: handleOpenChange, |
| 13588 |
content, |
| 13589 |
onContentChange: setContent, |
| 13590 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 13591 |
MenuRootProvider, |
| 13592 |
{ |
| 13593 |
scope: __scopeMenu, |
| 13594 |
onClose: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => handleOpenChange(false), [handleOpenChange]), |
| 13595 |
isUsingKeyboardRef, |
| 13596 |
dir: direction, |
| 13597 |
modal, |
| 13598 |
children |
| 13599 |
} |
| 13600 |
) |
| 13601 |
} |
| 13602 |
) }); |
| 13603 |
}; |
| 13604 |
Menu.displayName = MENU_NAME; |
| 13605 |
var ANCHOR_NAME = "MenuAnchor"; |
| 13606 |
var MenuAnchor = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 13607 |
(props, forwardedRef) => { |
| 13608 |
const { __scopeMenu, ...anchorProps } = props; |
| 13609 |
const popperScope = usePopperScope(__scopeMenu); |
| 13610 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_10__.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef }); |
| 13611 |
} |
| 13612 |
); |
| 13613 |
MenuAnchor.displayName = ANCHOR_NAME; |
| 13614 |
var PORTAL_NAME = "MenuPortal"; |
| 13615 |
var [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, { |
| 13616 |
forceMount: void 0 |
| 13617 |
}); |
| 13618 |
var MenuPortal = (props) => { |
| 13619 |
const { __scopeMenu, forceMount, children, container } = props; |
| 13620 |
const context = useMenuContext(PORTAL_NAME, __scopeMenu); |
| 13621 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_12__.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(_radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_11__.Portal, { asChild: true, container, children }) }) }); |
| 13622 |
}; |
| 13623 |
MenuPortal.displayName = PORTAL_NAME; |
| 13624 |
var CONTENT_NAME = "MenuContent"; |
| 13625 |
var [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME); |
| 13626 |
var MenuContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 13627 |
(props, forwardedRef) => { |
| 13628 |
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu); |
| 13629 |
const { forceMount = portalContext.forceMount, ...contentProps } = props; |
| 13630 |
const context = useMenuContext(CONTENT_NAME, props.__scopeMenu); |
| 13631 |
const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu); |
| 13632 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_12__.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) }); |
| 13633 |
} |
| 13634 |
); |
| 13635 |
var MenuRootContentModal = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 13636 |
(props, forwardedRef) => { |
| 13637 |
const context = useMenuContext(CONTENT_NAME, props.__scopeMenu); |
| 13638 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 13639 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, ref); |
| 13640 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 13641 |
const content = ref.current; |
| 13642 |
if (content) return (0,aria_hidden__WEBPACK_IMPORTED_MODULE_17__.hideOthers)(content); |
| 13643 |
}, []); |
| 13644 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 13645 |
MenuContentImpl, |
| 13646 |
{ |
| 13647 |
...props, |
| 13648 |
ref: composedRefs, |
| 13649 |
trapFocus: context.open, |
| 13650 |
disableOutsidePointerEvents: context.open, |
| 13651 |
disableOutsideScroll: true, |
| 13652 |
onFocusOutside: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)( |
| 13653 |
props.onFocusOutside, |
| 13654 |
(event) => event.preventDefault(), |
| 13655 |
{ checkForDefaultPrevented: false } |
| 13656 |
), |
| 13657 |
onDismiss: () => context.onOpenChange(false) |
| 13658 |
} |
| 13659 |
); |
| 13660 |
} |
| 13661 |
); |
| 13662 |
var MenuRootContentNonModal = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 13663 |
const context = useMenuContext(CONTENT_NAME, props.__scopeMenu); |
| 13664 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 13665 |
MenuContentImpl, |
| 13666 |
{ |
| 13667 |
...props, |
| 13668 |
ref: forwardedRef, |
| 13669 |
trapFocus: false, |
| 13670 |
disableOutsidePointerEvents: false, |
| 13671 |
disableOutsideScroll: false, |
| 13672 |
onDismiss: () => context.onOpenChange(false) |
| 13673 |
} |
| 13674 |
); |
| 13675 |
}); |
| 13676 |
var Slot = (0,_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_15__.createSlot)("MenuContent.ScrollLock"); |
| 13677 |
var MenuContentImpl = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 13678 |
(props, forwardedRef) => { |
| 13679 |
const { |
| 13680 |
__scopeMenu, |
| 13681 |
loop = false, |
| 13682 |
trapFocus, |
| 13683 |
onOpenAutoFocus, |
| 13684 |
onCloseAutoFocus, |
| 13685 |
disableOutsidePointerEvents, |
| 13686 |
onEntryFocus, |
| 13687 |
onEscapeKeyDown, |
| 13688 |
onPointerDownOutside, |
| 13689 |
onFocusOutside, |
| 13690 |
onInteractOutside, |
| 13691 |
onDismiss, |
| 13692 |
disableOutsideScroll, |
| 13693 |
...contentProps |
| 13694 |
} = props; |
| 13695 |
const context = useMenuContext(CONTENT_NAME, __scopeMenu); |
| 13696 |
const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu); |
| 13697 |
const popperScope = usePopperScope(__scopeMenu); |
| 13698 |
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu); |
| 13699 |
const getItems = useCollection(__scopeMenu); |
| 13700 |
const [currentItemId, setCurrentItemId] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 13701 |
const contentRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 13702 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, contentRef, context.onContentChange); |
| 13703 |
const timerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(0); |
| 13704 |
const searchRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(""); |
| 13705 |
const pointerGraceTimerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(0); |
| 13706 |
const pointerGraceIntentRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 13707 |
const pointerDirRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef("right"); |
| 13708 |
const lastPointerXRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(0); |
| 13709 |
const ScrollLockWrapper = disableOutsideScroll ? react_remove_scroll__WEBPACK_IMPORTED_MODULE_18__["default"] : react__WEBPACK_IMPORTED_MODULE_0__.Fragment; |
| 13710 |
const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0; |
| 13711 |
const handleTypeaheadSearch = (key) => { |
| 13712 |
const search = searchRef.current + key; |
| 13713 |
const items = getItems().filter((item) => !item.disabled); |
| 13714 |
const currentItem = document.activeElement; |
| 13715 |
const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue; |
| 13716 |
const values = items.map((item) => item.textValue); |
| 13717 |
const nextMatch = getNextMatch(values, search, currentMatch); |
| 13718 |
const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current; |
| 13719 |
(function updateSearch(value) { |
| 13720 |
searchRef.current = value; |
| 13721 |
window.clearTimeout(timerRef.current); |
| 13722 |
if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3); |
| 13723 |
})(search); |
| 13724 |
if (newItem) { |
| 13725 |
setTimeout(() => newItem.focus()); |
| 13726 |
} |
| 13727 |
}; |
| 13728 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 13729 |
return () => window.clearTimeout(timerRef.current); |
| 13730 |
}, []); |
| 13731 |
(0,_radix_ui_react_focus_guards__WEBPACK_IMPORTED_MODULE_7__.useFocusGuards)(); |
| 13732 |
const isPointerMovingToSubmenu = react__WEBPACK_IMPORTED_MODULE_0__.useCallback((event) => { |
| 13733 |
const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side; |
| 13734 |
return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area); |
| 13735 |
}, []); |
| 13736 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 13737 |
MenuContentProvider, |
| 13738 |
{ |
| 13739 |
scope: __scopeMenu, |
| 13740 |
searchRef, |
| 13741 |
onItemEnter: react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 13742 |
(event) => { |
| 13743 |
if (isPointerMovingToSubmenu(event)) event.preventDefault(); |
| 13744 |
}, |
| 13745 |
[isPointerMovingToSubmenu] |
| 13746 |
), |
| 13747 |
onItemLeave: react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 13748 |
(event) => { |
| 13749 |
if (isPointerMovingToSubmenu(event)) return; |
| 13750 |
contentRef.current?.focus(); |
| 13751 |
setCurrentItemId(null); |
| 13752 |
}, |
| 13753 |
[isPointerMovingToSubmenu] |
| 13754 |
), |
| 13755 |
onTriggerLeave: react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 13756 |
(event) => { |
| 13757 |
if (isPointerMovingToSubmenu(event)) event.preventDefault(); |
| 13758 |
}, |
| 13759 |
[isPointerMovingToSubmenu] |
| 13760 |
), |
| 13761 |
pointerGraceTimerRef, |
| 13762 |
onPointerGraceIntentChange: react__WEBPACK_IMPORTED_MODULE_0__.useCallback((intent) => { |
| 13763 |
pointerGraceIntentRef.current = intent; |
| 13764 |
}, []), |
| 13765 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 13766 |
_radix_ui_react_focus_scope__WEBPACK_IMPORTED_MODULE_8__.FocusScope, |
| 13767 |
{ |
| 13768 |
asChild: true, |
| 13769 |
trapped: trapFocus, |
| 13770 |
onMountAutoFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(onOpenAutoFocus, (event) => { |
| 13771 |
event.preventDefault(); |
| 13772 |
contentRef.current?.focus({ preventScroll: true }); |
| 13773 |
}), |
| 13774 |
onUnmountAutoFocus: onCloseAutoFocus, |
| 13775 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 13776 |
_radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_6__.DismissableLayer, |
| 13777 |
{ |
| 13778 |
asChild: true, |
| 13779 |
disableOutsidePointerEvents, |
| 13780 |
onEscapeKeyDown, |
| 13781 |
onPointerDownOutside, |
| 13782 |
onFocusOutside, |
| 13783 |
onInteractOutside, |
| 13784 |
onDismiss, |
| 13785 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 13786 |
_radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_14__.Root, |
| 13787 |
{ |
| 13788 |
asChild: true, |
| 13789 |
...rovingFocusGroupScope, |
| 13790 |
dir: rootContext.dir, |
| 13791 |
orientation: "vertical", |
| 13792 |
loop, |
| 13793 |
currentTabStopId: currentItemId, |
| 13794 |
onCurrentTabStopIdChange: setCurrentItemId, |
| 13795 |
onEntryFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(onEntryFocus, (event) => { |
| 13796 |
if (!rootContext.isUsingKeyboardRef.current) event.preventDefault(); |
| 13797 |
}), |
| 13798 |
preventScrollOnEntryFocus: true, |
| 13799 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 13800 |
_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_10__.Content, |
| 13801 |
{ |
| 13802 |
role: "menu", |
| 13803 |
"aria-orientation": "vertical", |
| 13804 |
"data-state": getOpenState(context.open), |
| 13805 |
"data-radix-menu-content": "", |
| 13806 |
dir: rootContext.dir, |
| 13807 |
...popperScope, |
| 13808 |
...contentProps, |
| 13809 |
ref: composedRefs, |
| 13810 |
style: { outline: "none", ...contentProps.style }, |
| 13811 |
onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(contentProps.onKeyDown, (event) => { |
| 13812 |
const target = event.target; |
| 13813 |
const isKeyDownInside = target.closest("[data-radix-menu-content]") === event.currentTarget; |
| 13814 |
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey; |
| 13815 |
const isCharacterKey = event.key.length === 1; |
| 13816 |
if (isKeyDownInside) { |
| 13817 |
if (event.key === "Tab") event.preventDefault(); |
| 13818 |
if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key); |
| 13819 |
} |
| 13820 |
const content = contentRef.current; |
| 13821 |
if (event.target !== content) return; |
| 13822 |
if (!FIRST_LAST_KEYS.includes(event.key)) return; |
| 13823 |
event.preventDefault(); |
| 13824 |
const items = getItems().filter((item) => !item.disabled); |
| 13825 |
const candidateNodes = items.map((item) => item.ref.current); |
| 13826 |
if (LAST_KEYS.includes(event.key)) candidateNodes.reverse(); |
| 13827 |
focusFirst(candidateNodes); |
| 13828 |
}), |
| 13829 |
onBlur: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onBlur, (event) => { |
| 13830 |
if (!event.currentTarget.contains(event.target)) { |
| 13831 |
window.clearTimeout(timerRef.current); |
| 13832 |
searchRef.current = ""; |
| 13833 |
} |
| 13834 |
}), |
| 13835 |
onPointerMove: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)( |
| 13836 |
props.onPointerMove, |
| 13837 |
whenMouse((event) => { |
| 13838 |
const target = event.target; |
| 13839 |
const pointerXHasChanged = lastPointerXRef.current !== event.clientX; |
| 13840 |
if (event.currentTarget.contains(target) && pointerXHasChanged) { |
| 13841 |
const newDir = event.clientX > lastPointerXRef.current ? "right" : "left"; |
| 13842 |
pointerDirRef.current = newDir; |
| 13843 |
lastPointerXRef.current = event.clientX; |
| 13844 |
} |
| 13845 |
}) |
| 13846 |
) |
| 13847 |
} |
| 13848 |
) |
| 13849 |
} |
| 13850 |
) |
| 13851 |
} |
| 13852 |
) |
| 13853 |
} |
| 13854 |
) }) |
| 13855 |
} |
| 13856 |
); |
| 13857 |
} |
| 13858 |
); |
| 13859 |
MenuContent.displayName = CONTENT_NAME; |
| 13860 |
var GROUP_NAME = "MenuGroup"; |
| 13861 |
var MenuGroup = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 13862 |
(props, forwardedRef) => { |
| 13863 |
const { __scopeMenu, ...groupProps } = props; |
| 13864 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_13__.Primitive.div, { role: "group", ...groupProps, ref: forwardedRef }); |
| 13865 |
} |
| 13866 |
); |
| 13867 |
MenuGroup.displayName = GROUP_NAME; |
| 13868 |
var LABEL_NAME = "MenuLabel"; |
| 13869 |
var MenuLabel = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 13870 |
(props, forwardedRef) => { |
| 13871 |
const { __scopeMenu, ...labelProps } = props; |
| 13872 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_13__.Primitive.div, { ...labelProps, ref: forwardedRef }); |
| 13873 |
} |
| 13874 |
); |
| 13875 |
MenuLabel.displayName = LABEL_NAME; |
| 13876 |
var ITEM_NAME = "MenuItem"; |
| 13877 |
var ITEM_SELECT = "menu.itemSelect"; |
| 13878 |
var MenuItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 13879 |
(props, forwardedRef) => { |
| 13880 |
const { disabled = false, onSelect, ...itemProps } = props; |
| 13881 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 13882 |
const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu); |
| 13883 |
const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu); |
| 13884 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, ref); |
| 13885 |
const isPointerDownRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); |
| 13886 |
const handleSelect = () => { |
| 13887 |
const menuItem = ref.current; |
| 13888 |
if (!disabled && menuItem) { |
| 13889 |
const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true }); |
| 13890 |
menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true }); |
| 13891 |
(0,_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_13__.dispatchDiscreteCustomEvent)(menuItem, itemSelectEvent); |
| 13892 |
if (itemSelectEvent.defaultPrevented) { |
| 13893 |
isPointerDownRef.current = false; |
| 13894 |
} else { |
| 13895 |
rootContext.onClose(); |
| 13896 |
} |
| 13897 |
} |
| 13898 |
}; |
| 13899 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 13900 |
MenuItemImpl, |
| 13901 |
{ |
| 13902 |
...itemProps, |
| 13903 |
ref: composedRefs, |
| 13904 |
disabled, |
| 13905 |
onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onClick, handleSelect), |
| 13906 |
onPointerDown: (event) => { |
| 13907 |
props.onPointerDown?.(event); |
| 13908 |
isPointerDownRef.current = true; |
| 13909 |
}, |
| 13910 |
onPointerUp: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onPointerUp, (event) => { |
| 13911 |
if (!isPointerDownRef.current) event.currentTarget?.click(); |
| 13912 |
}), |
| 13913 |
onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onKeyDown, (event) => { |
| 13914 |
const isTypingAhead = contentContext.searchRef.current !== ""; |
| 13915 |
if (disabled || isTypingAhead && event.key === " ") return; |
| 13916 |
if (SELECTION_KEYS.includes(event.key)) { |
| 13917 |
event.currentTarget.click(); |
| 13918 |
event.preventDefault(); |
| 13919 |
} |
| 13920 |
}) |
| 13921 |
} |
| 13922 |
); |
| 13923 |
} |
| 13924 |
); |
| 13925 |
MenuItem.displayName = ITEM_NAME; |
| 13926 |
var MenuItemImpl = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 13927 |
(props, forwardedRef) => { |
| 13928 |
const { __scopeMenu, disabled = false, textValue, ...itemProps } = props; |
| 13929 |
const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu); |
| 13930 |
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu); |
| 13931 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 13932 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, ref); |
| 13933 |
const [isFocused, setIsFocused] = react__WEBPACK_IMPORTED_MODULE_0__.useState(false); |
| 13934 |
const [textContent, setTextContent] = react__WEBPACK_IMPORTED_MODULE_0__.useState(""); |
| 13935 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 13936 |
const menuItem = ref.current; |
| 13937 |
if (menuItem) { |
| 13938 |
setTextContent((menuItem.textContent ?? "").trim()); |
| 13939 |
} |
| 13940 |
}, [itemProps.children]); |
| 13941 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 13942 |
Collection.ItemSlot, |
| 13943 |
{ |
| 13944 |
scope: __scopeMenu, |
| 13945 |
disabled, |
| 13946 |
textValue: textValue ?? textContent, |
| 13947 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(_radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_14__.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 13948 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_13__.Primitive.div, |
| 13949 |
{ |
| 13950 |
role: "menuitem", |
| 13951 |
"data-highlighted": isFocused ? "" : void 0, |
| 13952 |
"aria-disabled": disabled || void 0, |
| 13953 |
"data-disabled": disabled ? "" : void 0, |
| 13954 |
...itemProps, |
| 13955 |
ref: composedRefs, |
| 13956 |
onPointerMove: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)( |
| 13957 |
props.onPointerMove, |
| 13958 |
whenMouse((event) => { |
| 13959 |
if (disabled) { |
| 13960 |
contentContext.onItemLeave(event); |
| 13961 |
} else { |
| 13962 |
contentContext.onItemEnter(event); |
| 13963 |
if (!event.defaultPrevented) { |
| 13964 |
const item = event.currentTarget; |
| 13965 |
item.focus({ preventScroll: true }); |
| 13966 |
} |
| 13967 |
} |
| 13968 |
}) |
| 13969 |
), |
| 13970 |
onPointerLeave: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)( |
| 13971 |
props.onPointerLeave, |
| 13972 |
whenMouse((event) => contentContext.onItemLeave(event)) |
| 13973 |
), |
| 13974 |
onFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onFocus, () => setIsFocused(true)), |
| 13975 |
onBlur: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onBlur, () => setIsFocused(false)) |
| 13976 |
} |
| 13977 |
) }) |
| 13978 |
} |
| 13979 |
); |
| 13980 |
} |
| 13981 |
); |
| 13982 |
var CHECKBOX_ITEM_NAME = "MenuCheckboxItem"; |
| 13983 |
var MenuCheckboxItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 13984 |
(props, forwardedRef) => { |
| 13985 |
const { checked = false, onCheckedChange, ...checkboxItemProps } = props; |
| 13986 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 13987 |
MenuItem, |
| 13988 |
{ |
| 13989 |
role: "menuitemcheckbox", |
| 13990 |
"aria-checked": isIndeterminate(checked) ? "mixed" : checked, |
| 13991 |
...checkboxItemProps, |
| 13992 |
ref: forwardedRef, |
| 13993 |
"data-state": getCheckedState(checked), |
| 13994 |
onSelect: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)( |
| 13995 |
checkboxItemProps.onSelect, |
| 13996 |
() => onCheckedChange?.(isIndeterminate(checked) ? true : !checked), |
| 13997 |
{ checkForDefaultPrevented: false } |
| 13998 |
) |
| 13999 |
} |
| 14000 |
) }); |
| 14001 |
} |
| 14002 |
); |
| 14003 |
MenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME; |
| 14004 |
var RADIO_GROUP_NAME = "MenuRadioGroup"; |
| 14005 |
var [RadioGroupProvider, useRadioGroupContext] = createMenuContext( |
| 14006 |
RADIO_GROUP_NAME, |
| 14007 |
{ value: void 0, onValueChange: () => { |
| 14008 |
} } |
| 14009 |
); |
| 14010 |
var MenuRadioGroup = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 14011 |
(props, forwardedRef) => { |
| 14012 |
const { value, onValueChange, ...groupProps } = props; |
| 14013 |
const handleValueChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_16__.useCallbackRef)(onValueChange); |
| 14014 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(MenuGroup, { ...groupProps, ref: forwardedRef }) }); |
| 14015 |
} |
| 14016 |
); |
| 14017 |
MenuRadioGroup.displayName = RADIO_GROUP_NAME; |
| 14018 |
var RADIO_ITEM_NAME = "MenuRadioItem"; |
| 14019 |
var MenuRadioItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 14020 |
(props, forwardedRef) => { |
| 14021 |
const { value, ...radioItemProps } = props; |
| 14022 |
const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu); |
| 14023 |
const checked = value === context.value; |
| 14024 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 14025 |
MenuItem, |
| 14026 |
{ |
| 14027 |
role: "menuitemradio", |
| 14028 |
"aria-checked": checked, |
| 14029 |
...radioItemProps, |
| 14030 |
ref: forwardedRef, |
| 14031 |
"data-state": getCheckedState(checked), |
| 14032 |
onSelect: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)( |
| 14033 |
radioItemProps.onSelect, |
| 14034 |
() => context.onValueChange?.(value), |
| 14035 |
{ checkForDefaultPrevented: false } |
| 14036 |
) |
| 14037 |
} |
| 14038 |
) }); |
| 14039 |
} |
| 14040 |
); |
| 14041 |
MenuRadioItem.displayName = RADIO_ITEM_NAME; |
| 14042 |
var ITEM_INDICATOR_NAME = "MenuItemIndicator"; |
| 14043 |
var [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext( |
| 14044 |
ITEM_INDICATOR_NAME, |
| 14045 |
{ checked: false } |
| 14046 |
); |
| 14047 |
var MenuItemIndicator = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 14048 |
(props, forwardedRef) => { |
| 14049 |
const { __scopeMenu, forceMount, ...itemIndicatorProps } = props; |
| 14050 |
const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu); |
| 14051 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 14052 |
_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_12__.Presence, |
| 14053 |
{ |
| 14054 |
present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true, |
| 14055 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 14056 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_13__.Primitive.span, |
| 14057 |
{ |
| 14058 |
...itemIndicatorProps, |
| 14059 |
ref: forwardedRef, |
| 14060 |
"data-state": getCheckedState(indicatorContext.checked) |
| 14061 |
} |
| 14062 |
) |
| 14063 |
} |
| 14064 |
); |
| 14065 |
} |
| 14066 |
); |
| 14067 |
MenuItemIndicator.displayName = ITEM_INDICATOR_NAME; |
| 14068 |
var SEPARATOR_NAME = "MenuSeparator"; |
| 14069 |
var MenuSeparator = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 14070 |
(props, forwardedRef) => { |
| 14071 |
const { __scopeMenu, ...separatorProps } = props; |
| 14072 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 14073 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_13__.Primitive.div, |
| 14074 |
{ |
| 14075 |
role: "separator", |
| 14076 |
"aria-orientation": "horizontal", |
| 14077 |
...separatorProps, |
| 14078 |
ref: forwardedRef |
| 14079 |
} |
| 14080 |
); |
| 14081 |
} |
| 14082 |
); |
| 14083 |
MenuSeparator.displayName = SEPARATOR_NAME; |
| 14084 |
var ARROW_NAME = "MenuArrow"; |
| 14085 |
var MenuArrow = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 14086 |
(props, forwardedRef) => { |
| 14087 |
const { __scopeMenu, ...arrowProps } = props; |
| 14088 |
const popperScope = usePopperScope(__scopeMenu); |
| 14089 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_10__.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }); |
| 14090 |
} |
| 14091 |
); |
| 14092 |
MenuArrow.displayName = ARROW_NAME; |
| 14093 |
var SUB_NAME = "MenuSub"; |
| 14094 |
var [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME); |
| 14095 |
var MenuSub = (props) => { |
| 14096 |
const { __scopeMenu, children, open = false, onOpenChange } = props; |
| 14097 |
const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu); |
| 14098 |
const popperScope = usePopperScope(__scopeMenu); |
| 14099 |
const [trigger, setTrigger] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 14100 |
const [content, setContent] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 14101 |
const handleOpenChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_16__.useCallbackRef)(onOpenChange); |
| 14102 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 14103 |
if (parentMenuContext.open === false) handleOpenChange(false); |
| 14104 |
return () => handleOpenChange(false); |
| 14105 |
}, [parentMenuContext.open, handleOpenChange]); |
| 14106 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_10__.Root, { ...popperScope, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 14107 |
MenuProvider, |
| 14108 |
{ |
| 14109 |
scope: __scopeMenu, |
| 14110 |
open, |
| 14111 |
onOpenChange: handleOpenChange, |
| 14112 |
content, |
| 14113 |
onContentChange: setContent, |
| 14114 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 14115 |
MenuSubProvider, |
| 14116 |
{ |
| 14117 |
scope: __scopeMenu, |
| 14118 |
contentId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_9__.useId)(), |
| 14119 |
triggerId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_9__.useId)(), |
| 14120 |
trigger, |
| 14121 |
onTriggerChange: setTrigger, |
| 14122 |
children |
| 14123 |
} |
| 14124 |
) |
| 14125 |
} |
| 14126 |
) }); |
| 14127 |
}; |
| 14128 |
MenuSub.displayName = SUB_NAME; |
| 14129 |
var SUB_TRIGGER_NAME = "MenuSubTrigger"; |
| 14130 |
var MenuSubTrigger = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 14131 |
(props, forwardedRef) => { |
| 14132 |
const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu); |
| 14133 |
const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu); |
| 14134 |
const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu); |
| 14135 |
const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu); |
| 14136 |
const openTimerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 14137 |
const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext; |
| 14138 |
const scope = { __scopeMenu: props.__scopeMenu }; |
| 14139 |
const clearOpenTimer = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => { |
| 14140 |
if (openTimerRef.current) window.clearTimeout(openTimerRef.current); |
| 14141 |
openTimerRef.current = null; |
| 14142 |
}, []); |
| 14143 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => clearOpenTimer, [clearOpenTimer]); |
| 14144 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 14145 |
const pointerGraceTimer = pointerGraceTimerRef.current; |
| 14146 |
return () => { |
| 14147 |
window.clearTimeout(pointerGraceTimer); |
| 14148 |
onPointerGraceIntentChange(null); |
| 14149 |
}; |
| 14150 |
}, [pointerGraceTimerRef, onPointerGraceIntentChange]); |
| 14151 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 14152 |
MenuItemImpl, |
| 14153 |
{ |
| 14154 |
id: subContext.triggerId, |
| 14155 |
"aria-haspopup": "menu", |
| 14156 |
"aria-expanded": context.open, |
| 14157 |
"aria-controls": subContext.contentId, |
| 14158 |
"data-state": getOpenState(context.open), |
| 14159 |
...props, |
| 14160 |
ref: (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.composeRefs)(forwardedRef, subContext.onTriggerChange), |
| 14161 |
onClick: (event) => { |
| 14162 |
props.onClick?.(event); |
| 14163 |
if (props.disabled || event.defaultPrevented) return; |
| 14164 |
event.currentTarget.focus(); |
| 14165 |
if (!context.open) context.onOpenChange(true); |
| 14166 |
}, |
| 14167 |
onPointerMove: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)( |
| 14168 |
props.onPointerMove, |
| 14169 |
whenMouse((event) => { |
| 14170 |
contentContext.onItemEnter(event); |
| 14171 |
if (event.defaultPrevented) return; |
| 14172 |
if (!props.disabled && !context.open && !openTimerRef.current) { |
| 14173 |
contentContext.onPointerGraceIntentChange(null); |
| 14174 |
openTimerRef.current = window.setTimeout(() => { |
| 14175 |
context.onOpenChange(true); |
| 14176 |
clearOpenTimer(); |
| 14177 |
}, 100); |
| 14178 |
} |
| 14179 |
}) |
| 14180 |
), |
| 14181 |
onPointerLeave: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)( |
| 14182 |
props.onPointerLeave, |
| 14183 |
whenMouse((event) => { |
| 14184 |
clearOpenTimer(); |
| 14185 |
const contentRect = context.content?.getBoundingClientRect(); |
| 14186 |
if (contentRect) { |
| 14187 |
const side = context.content?.dataset.side; |
| 14188 |
const rightSide = side === "right"; |
| 14189 |
const bleed = rightSide ? -5 : 5; |
| 14190 |
const contentNearEdge = contentRect[rightSide ? "left" : "right"]; |
| 14191 |
const contentFarEdge = contentRect[rightSide ? "right" : "left"]; |
| 14192 |
contentContext.onPointerGraceIntentChange({ |
| 14193 |
area: [ |
| 14194 |
// Apply a bleed on clientX to ensure that our exit point is |
| 14195 |
// consistently within polygon bounds |
| 14196 |
{ x: event.clientX + bleed, y: event.clientY }, |
| 14197 |
{ x: contentNearEdge, y: contentRect.top }, |
| 14198 |
{ x: contentFarEdge, y: contentRect.top }, |
| 14199 |
{ x: contentFarEdge, y: contentRect.bottom }, |
| 14200 |
{ x: contentNearEdge, y: contentRect.bottom } |
| 14201 |
], |
| 14202 |
side |
| 14203 |
}); |
| 14204 |
window.clearTimeout(pointerGraceTimerRef.current); |
| 14205 |
pointerGraceTimerRef.current = window.setTimeout( |
| 14206 |
() => contentContext.onPointerGraceIntentChange(null), |
| 14207 |
300 |
| 14208 |
); |
| 14209 |
} else { |
| 14210 |
contentContext.onTriggerLeave(event); |
| 14211 |
if (event.defaultPrevented) return; |
| 14212 |
contentContext.onPointerGraceIntentChange(null); |
| 14213 |
} |
| 14214 |
}) |
| 14215 |
), |
| 14216 |
onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onKeyDown, (event) => { |
| 14217 |
const isTypingAhead = contentContext.searchRef.current !== ""; |
| 14218 |
if (props.disabled || isTypingAhead && event.key === " ") return; |
| 14219 |
if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) { |
| 14220 |
context.onOpenChange(true); |
| 14221 |
context.content?.focus(); |
| 14222 |
event.preventDefault(); |
| 14223 |
} |
| 14224 |
}) |
| 14225 |
} |
| 14226 |
) }); |
| 14227 |
} |
| 14228 |
); |
| 14229 |
MenuSubTrigger.displayName = SUB_TRIGGER_NAME; |
| 14230 |
var SUB_CONTENT_NAME = "MenuSubContent"; |
| 14231 |
var MenuSubContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 14232 |
(props, forwardedRef) => { |
| 14233 |
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu); |
| 14234 |
const { forceMount = portalContext.forceMount, ...subContentProps } = props; |
| 14235 |
const context = useMenuContext(CONTENT_NAME, props.__scopeMenu); |
| 14236 |
const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu); |
| 14237 |
const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu); |
| 14238 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 14239 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, ref); |
| 14240 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_12__.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_19__.jsx)( |
| 14241 |
MenuContentImpl, |
| 14242 |
{ |
| 14243 |
id: subContext.contentId, |
| 14244 |
"aria-labelledby": subContext.triggerId, |
| 14245 |
...subContentProps, |
| 14246 |
ref: composedRefs, |
| 14247 |
align: "start", |
| 14248 |
side: rootContext.dir === "rtl" ? "left" : "right", |
| 14249 |
disableOutsidePointerEvents: false, |
| 14250 |
disableOutsideScroll: false, |
| 14251 |
trapFocus: false, |
| 14252 |
onOpenAutoFocus: (event) => { |
| 14253 |
if (rootContext.isUsingKeyboardRef.current) ref.current?.focus(); |
| 14254 |
event.preventDefault(); |
| 14255 |
}, |
| 14256 |
onCloseAutoFocus: (event) => event.preventDefault(), |
| 14257 |
onFocusOutside: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onFocusOutside, (event) => { |
| 14258 |
if (event.target !== subContext.trigger) context.onOpenChange(false); |
| 14259 |
}), |
| 14260 |
onEscapeKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onEscapeKeyDown, (event) => { |
| 14261 |
rootContext.onClose(); |
| 14262 |
event.preventDefault(); |
| 14263 |
}), |
| 14264 |
onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onKeyDown, (event) => { |
| 14265 |
const isKeyDownInside = event.currentTarget.contains(event.target); |
| 14266 |
const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key); |
| 14267 |
if (isKeyDownInside && isCloseKey) { |
| 14268 |
context.onOpenChange(false); |
| 14269 |
subContext.trigger?.focus(); |
| 14270 |
event.preventDefault(); |
| 14271 |
} |
| 14272 |
}) |
| 14273 |
} |
| 14274 |
) }) }) }); |
| 14275 |
} |
| 14276 |
); |
| 14277 |
MenuSubContent.displayName = SUB_CONTENT_NAME; |
| 14278 |
function getOpenState(open) { |
| 14279 |
return open ? "open" : "closed"; |
| 14280 |
} |
| 14281 |
function isIndeterminate(checked) { |
| 14282 |
return checked === "indeterminate"; |
| 14283 |
} |
| 14284 |
function getCheckedState(checked) { |
| 14285 |
return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked"; |
| 14286 |
} |
| 14287 |
function focusFirst(candidates) { |
| 14288 |
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement; |
| 14289 |
for (const candidate of candidates) { |
| 14290 |
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return; |
| 14291 |
candidate.focus(); |
| 14292 |
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return; |
| 14293 |
} |
| 14294 |
} |
| 14295 |
function wrapArray(array, startIndex) { |
| 14296 |
return array.map((_, index) => array[(startIndex + index) % array.length]); |
| 14297 |
} |
| 14298 |
function getNextMatch(values, search, currentMatch) { |
| 14299 |
const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]); |
| 14300 |
const normalizedSearch = isRepeated ? search[0] : search; |
| 14301 |
const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1; |
| 14302 |
let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0)); |
| 14303 |
const excludeCurrentMatch = normalizedSearch.length === 1; |
| 14304 |
if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch); |
| 14305 |
const nextMatch = wrappedValues.find( |
| 14306 |
(value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase()) |
| 14307 |
); |
| 14308 |
return nextMatch !== currentMatch ? nextMatch : void 0; |
| 14309 |
} |
| 14310 |
function isPointInPolygon(point, polygon) { |
| 14311 |
const { x, y } = point; |
| 14312 |
let inside = false; |
| 14313 |
for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) { |
| 14314 |
const ii = polygon[i]; |
| 14315 |
const jj = polygon[j]; |
| 14316 |
const xi = ii.x; |
| 14317 |
const yi = ii.y; |
| 14318 |
const xj = jj.x; |
| 14319 |
const yj = jj.y; |
| 14320 |
const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi; |
| 14321 |
if (intersect) inside = !inside; |
| 14322 |
} |
| 14323 |
return inside; |
| 14324 |
} |
| 14325 |
function isPointerInGraceArea(event, area) { |
| 14326 |
if (!area) return false; |
| 14327 |
const cursorPos = { x: event.clientX, y: event.clientY }; |
| 14328 |
return isPointInPolygon(cursorPos, area); |
| 14329 |
} |
| 14330 |
function whenMouse(handler) { |
| 14331 |
return (event) => event.pointerType === "mouse" ? handler(event) : void 0; |
| 14332 |
} |
| 14333 |
var Root3 = Menu; |
| 14334 |
var Anchor2 = MenuAnchor; |
| 14335 |
var Portal = MenuPortal; |
| 14336 |
var Content2 = MenuContent; |
| 14337 |
var Group = MenuGroup; |
| 14338 |
var Label = MenuLabel; |
| 14339 |
var Item2 = MenuItem; |
| 14340 |
var CheckboxItem = MenuCheckboxItem; |
| 14341 |
var RadioGroup = MenuRadioGroup; |
| 14342 |
var RadioItem = MenuRadioItem; |
| 14343 |
var ItemIndicator = MenuItemIndicator; |
| 14344 |
var Separator = MenuSeparator; |
| 14345 |
var Arrow2 = MenuArrow; |
| 14346 |
var Sub = MenuSub; |
| 14347 |
var SubTrigger = MenuSubTrigger; |
| 14348 |
var SubContent = MenuSubContent; |
| 14349 |
|
| 14350 |
//# sourceMappingURL=index.mjs.map |
| 14351 |
|
| 14352 |
|
| 14353 |
/***/ }, |
| 14354 |
|
| 14355 |
/***/ "./node_modules/@radix-ui/react-popper/dist/index.mjs" |
| 14356 |
/*!************************************************************!*\ |
| 14357 |
!*** ./node_modules/@radix-ui/react-popper/dist/index.mjs ***! |
| 14358 |
\************************************************************/ |
| 14359 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 14360 |
|
| 14361 |
__webpack_require__.r(__webpack_exports__); |
| 14362 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 14363 |
/* harmony export */ ALIGN_OPTIONS: () => (/* binding */ ALIGN_OPTIONS), |
| 14364 |
/* harmony export */ Anchor: () => (/* binding */ Anchor), |
| 14365 |
/* harmony export */ Arrow: () => (/* binding */ Arrow), |
| 14366 |
/* harmony export */ Content: () => (/* binding */ Content), |
| 14367 |
/* harmony export */ Popper: () => (/* binding */ Popper), |
| 14368 |
/* harmony export */ PopperAnchor: () => (/* binding */ PopperAnchor), |
| 14369 |
/* harmony export */ PopperArrow: () => (/* binding */ PopperArrow), |
| 14370 |
/* harmony export */ PopperContent: () => (/* binding */ PopperContent), |
| 14371 |
/* harmony export */ Root: () => (/* binding */ Root2), |
| 14372 |
/* harmony export */ SIDE_OPTIONS: () => (/* binding */ SIDE_OPTIONS), |
| 14373 |
/* harmony export */ createPopperScope: () => (/* binding */ createPopperScope) |
| 14374 |
/* harmony export */ }); |
| 14375 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 14376 |
/* harmony import */ var _floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/react-dom */ "./node_modules/@radix-ui/react-popper/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs"); |
| 14377 |
/* harmony import */ var _floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @floating-ui/react-dom */ "./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"); |
| 14378 |
/* harmony import */ var _radix_ui_react_arrow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-arrow */ "./node_modules/@radix-ui/react-arrow/dist/index.mjs"); |
| 14379 |
/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ "./node_modules/@radix-ui/react-compose-refs/dist/index.mjs"); |
| 14380 |
/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-context */ "./node_modules/@radix-ui/react-context/dist/index.mjs"); |
| 14381 |
/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-primitive */ "./node_modules/@radix-ui/react-primitive/dist/index.mjs"); |
| 14382 |
/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ "./node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"); |
| 14383 |
/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ "./node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"); |
| 14384 |
/* harmony import */ var _radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-use-size */ "./node_modules/@radix-ui/react-use-size/dist/index.mjs"); |
| 14385 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 14386 |
"use client"; |
| 14387 |
|
| 14388 |
// src/popper.tsx |
| 14389 |
|
| 14390 |
|
| 14391 |
|
| 14392 |
|
| 14393 |
|
| 14394 |
|
| 14395 |
|
| 14396 |
|
| 14397 |
|
| 14398 |
|
| 14399 |
var SIDE_OPTIONS = ["top", "right", "bottom", "left"]; |
| 14400 |
var ALIGN_OPTIONS = ["start", "center", "end"]; |
| 14401 |
var POPPER_NAME = "Popper"; |
| 14402 |
var [createPopperContext, createPopperScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_5__.createContextScope)(POPPER_NAME); |
| 14403 |
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME); |
| 14404 |
var Popper = (props) => { |
| 14405 |
const { __scopePopper, children } = props; |
| 14406 |
const [anchor, setAnchor] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 14407 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children }); |
| 14408 |
}; |
| 14409 |
Popper.displayName = POPPER_NAME; |
| 14410 |
var ANCHOR_NAME = "PopperAnchor"; |
| 14411 |
var PopperAnchor = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 14412 |
(props, forwardedRef) => { |
| 14413 |
const { __scopePopper, virtualRef, ...anchorProps } = props; |
| 14414 |
const context = usePopperContext(ANCHOR_NAME, __scopePopper); |
| 14415 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 14416 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, ref); |
| 14417 |
const anchorRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 14418 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 14419 |
const previousAnchor = anchorRef.current; |
| 14420 |
anchorRef.current = virtualRef?.current || ref.current; |
| 14421 |
if (previousAnchor !== anchorRef.current) { |
| 14422 |
context.onAnchorChange(anchorRef.current); |
| 14423 |
} |
| 14424 |
}); |
| 14425 |
return virtualRef ? null : /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.div, { ...anchorProps, ref: composedRefs }); |
| 14426 |
} |
| 14427 |
); |
| 14428 |
PopperAnchor.displayName = ANCHOR_NAME; |
| 14429 |
var CONTENT_NAME = "PopperContent"; |
| 14430 |
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME); |
| 14431 |
var PopperContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 14432 |
(props, forwardedRef) => { |
| 14433 |
const { |
| 14434 |
__scopePopper, |
| 14435 |
side = "bottom", |
| 14436 |
sideOffset = 0, |
| 14437 |
align = "center", |
| 14438 |
alignOffset = 0, |
| 14439 |
arrowPadding = 0, |
| 14440 |
avoidCollisions = true, |
| 14441 |
collisionBoundary = [], |
| 14442 |
collisionPadding: collisionPaddingProp = 0, |
| 14443 |
sticky = "partial", |
| 14444 |
hideWhenDetached = false, |
| 14445 |
updatePositionStrategy = "optimized", |
| 14446 |
onPlaced, |
| 14447 |
...contentProps |
| 14448 |
} = props; |
| 14449 |
const context = usePopperContext(CONTENT_NAME, __scopePopper); |
| 14450 |
const [content, setContent] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 14451 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, (node) => setContent(node)); |
| 14452 |
const [arrow, setArrow] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 14453 |
const arrowSize = (0,_radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_9__.useSize)(arrow); |
| 14454 |
const arrowWidth = arrowSize?.width ?? 0; |
| 14455 |
const arrowHeight = arrowSize?.height ?? 0; |
| 14456 |
const desiredPlacement = side + (align !== "center" ? "-" + align : ""); |
| 14457 |
const collisionPadding = typeof collisionPaddingProp === "number" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp }; |
| 14458 |
const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary]; |
| 14459 |
const hasExplicitBoundaries = boundary.length > 0; |
| 14460 |
const detectOverflowOptions = { |
| 14461 |
padding: collisionPadding, |
| 14462 |
boundary: boundary.filter(isNotNull), |
| 14463 |
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries |
| 14464 |
altBoundary: hasExplicitBoundaries |
| 14465 |
}; |
| 14466 |
const { refs, floatingStyles, placement, isPositioned, middlewareData } = (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_1__.useFloating)({ |
| 14467 |
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues |
| 14468 |
strategy: "fixed", |
| 14469 |
placement: desiredPlacement, |
| 14470 |
whileElementsMounted: (...args) => { |
| 14471 |
const cleanup = (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_2__.autoUpdate)(...args, { |
| 14472 |
animationFrame: updatePositionStrategy === "always" |
| 14473 |
}); |
| 14474 |
return cleanup; |
| 14475 |
}, |
| 14476 |
elements: { |
| 14477 |
reference: context.anchor |
| 14478 |
}, |
| 14479 |
middleware: [ |
| 14480 |
(0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_1__.offset)({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }), |
| 14481 |
avoidCollisions && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_1__.shift)({ |
| 14482 |
mainAxis: true, |
| 14483 |
crossAxis: false, |
| 14484 |
limiter: sticky === "partial" ? (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_1__.limitShift)() : void 0, |
| 14485 |
...detectOverflowOptions |
| 14486 |
}), |
| 14487 |
avoidCollisions && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_1__.flip)({ ...detectOverflowOptions }), |
| 14488 |
(0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_1__.size)({ |
| 14489 |
...detectOverflowOptions, |
| 14490 |
apply: ({ elements, rects, availableWidth, availableHeight }) => { |
| 14491 |
const { width: anchorWidth, height: anchorHeight } = rects.reference; |
| 14492 |
const contentStyle = elements.floating.style; |
| 14493 |
contentStyle.setProperty("--radix-popper-available-width", `${availableWidth}px`); |
| 14494 |
contentStyle.setProperty("--radix-popper-available-height", `${availableHeight}px`); |
| 14495 |
contentStyle.setProperty("--radix-popper-anchor-width", `${anchorWidth}px`); |
| 14496 |
contentStyle.setProperty("--radix-popper-anchor-height", `${anchorHeight}px`); |
| 14497 |
} |
| 14498 |
}), |
| 14499 |
arrow && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_1__.arrow)({ element: arrow, padding: arrowPadding }), |
| 14500 |
transformOrigin({ arrowWidth, arrowHeight }), |
| 14501 |
hideWhenDetached && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_1__.hide)({ strategy: "referenceHidden", ...detectOverflowOptions }) |
| 14502 |
] |
| 14503 |
}); |
| 14504 |
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement); |
| 14505 |
const handlePlaced = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_7__.useCallbackRef)(onPlaced); |
| 14506 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_8__.useLayoutEffect)(() => { |
| 14507 |
if (isPositioned) { |
| 14508 |
handlePlaced?.(); |
| 14509 |
} |
| 14510 |
}, [isPositioned, handlePlaced]); |
| 14511 |
const arrowX = middlewareData.arrow?.x; |
| 14512 |
const arrowY = middlewareData.arrow?.y; |
| 14513 |
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0; |
| 14514 |
const [contentZIndex, setContentZIndex] = react__WEBPACK_IMPORTED_MODULE_0__.useState(); |
| 14515 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_8__.useLayoutEffect)(() => { |
| 14516 |
if (content) setContentZIndex(window.getComputedStyle(content).zIndex); |
| 14517 |
}, [content]); |
| 14518 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)( |
| 14519 |
"div", |
| 14520 |
{ |
| 14521 |
ref: refs.setFloating, |
| 14522 |
"data-radix-popper-content-wrapper": "", |
| 14523 |
style: { |
| 14524 |
...floatingStyles, |
| 14525 |
transform: isPositioned ? floatingStyles.transform : "translate(0, -200%)", |
| 14526 |
// keep off the page when measuring |
| 14527 |
minWidth: "max-content", |
| 14528 |
zIndex: contentZIndex, |
| 14529 |
["--radix-popper-transform-origin"]: [ |
| 14530 |
middlewareData.transformOrigin?.x, |
| 14531 |
middlewareData.transformOrigin?.y |
| 14532 |
].join(" "), |
| 14533 |
// hide the content if using the hide middleware and should be hidden |
| 14534 |
// set visibility to hidden and disable pointer events so the UI behaves |
| 14535 |
// as if the PopperContent isn't there at all |
| 14536 |
...middlewareData.hide?.referenceHidden && { |
| 14537 |
visibility: "hidden", |
| 14538 |
pointerEvents: "none" |
| 14539 |
} |
| 14540 |
}, |
| 14541 |
dir: props.dir, |
| 14542 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)( |
| 14543 |
PopperContentProvider, |
| 14544 |
{ |
| 14545 |
scope: __scopePopper, |
| 14546 |
placedSide, |
| 14547 |
onArrowChange: setArrow, |
| 14548 |
arrowX, |
| 14549 |
arrowY, |
| 14550 |
shouldHideArrow: cannotCenterArrow, |
| 14551 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)( |
| 14552 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.div, |
| 14553 |
{ |
| 14554 |
"data-side": placedSide, |
| 14555 |
"data-align": placedAlign, |
| 14556 |
...contentProps, |
| 14557 |
ref: composedRefs, |
| 14558 |
style: { |
| 14559 |
...contentProps.style, |
| 14560 |
// if the PopperContent hasn't been placed yet (not all measurements done) |
| 14561 |
// we prevent animations so that users's animation don't kick in too early referring wrong sides |
| 14562 |
animation: !isPositioned ? "none" : void 0 |
| 14563 |
} |
| 14564 |
} |
| 14565 |
) |
| 14566 |
} |
| 14567 |
) |
| 14568 |
} |
| 14569 |
); |
| 14570 |
} |
| 14571 |
); |
| 14572 |
PopperContent.displayName = CONTENT_NAME; |
| 14573 |
var ARROW_NAME = "PopperArrow"; |
| 14574 |
var OPPOSITE_SIDE = { |
| 14575 |
top: "bottom", |
| 14576 |
right: "left", |
| 14577 |
bottom: "top", |
| 14578 |
left: "right" |
| 14579 |
}; |
| 14580 |
var PopperArrow = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function PopperArrow2(props, forwardedRef) { |
| 14581 |
const { __scopePopper, ...arrowProps } = props; |
| 14582 |
const contentContext = useContentContext(ARROW_NAME, __scopePopper); |
| 14583 |
const baseSide = OPPOSITE_SIDE[contentContext.placedSide]; |
| 14584 |
return ( |
| 14585 |
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`) |
| 14586 |
// doesn't report size as we'd expect on SVG elements. |
| 14587 |
// it reports their bounding box which is effectively the largest path inside the SVG. |
| 14588 |
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)( |
| 14589 |
"span", |
| 14590 |
{ |
| 14591 |
ref: contentContext.onArrowChange, |
| 14592 |
style: { |
| 14593 |
position: "absolute", |
| 14594 |
left: contentContext.arrowX, |
| 14595 |
top: contentContext.arrowY, |
| 14596 |
[baseSide]: 0, |
| 14597 |
transformOrigin: { |
| 14598 |
top: "", |
| 14599 |
right: "0 0", |
| 14600 |
bottom: "center 0", |
| 14601 |
left: "100% 0" |
| 14602 |
}[contentContext.placedSide], |
| 14603 |
transform: { |
| 14604 |
top: "translateY(100%)", |
| 14605 |
right: "translateY(50%) rotate(90deg) translateX(-50%)", |
| 14606 |
bottom: `rotate(180deg)`, |
| 14607 |
left: "translateY(50%) rotate(-90deg) translateX(50%)" |
| 14608 |
}[contentContext.placedSide], |
| 14609 |
visibility: contentContext.shouldHideArrow ? "hidden" : void 0 |
| 14610 |
}, |
| 14611 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)( |
| 14612 |
_radix_ui_react_arrow__WEBPACK_IMPORTED_MODULE_3__.Root, |
| 14613 |
{ |
| 14614 |
...arrowProps, |
| 14615 |
ref: forwardedRef, |
| 14616 |
style: { |
| 14617 |
...arrowProps.style, |
| 14618 |
// ensures the element can be measured correctly (mostly for if SVG) |
| 14619 |
display: "block" |
| 14620 |
} |
| 14621 |
} |
| 14622 |
) |
| 14623 |
} |
| 14624 |
) |
| 14625 |
); |
| 14626 |
}); |
| 14627 |
PopperArrow.displayName = ARROW_NAME; |
| 14628 |
function isNotNull(value) { |
| 14629 |
return value !== null; |
| 14630 |
} |
| 14631 |
var transformOrigin = (options) => ({ |
| 14632 |
name: "transformOrigin", |
| 14633 |
options, |
| 14634 |
fn(data) { |
| 14635 |
const { placement, rects, middlewareData } = data; |
| 14636 |
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0; |
| 14637 |
const isArrowHidden = cannotCenterArrow; |
| 14638 |
const arrowWidth = isArrowHidden ? 0 : options.arrowWidth; |
| 14639 |
const arrowHeight = isArrowHidden ? 0 : options.arrowHeight; |
| 14640 |
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement); |
| 14641 |
const noArrowAlign = { start: "0%", center: "50%", end: "100%" }[placedAlign]; |
| 14642 |
const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2; |
| 14643 |
const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2; |
| 14644 |
let x = ""; |
| 14645 |
let y = ""; |
| 14646 |
if (placedSide === "bottom") { |
| 14647 |
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`; |
| 14648 |
y = `${-arrowHeight}px`; |
| 14649 |
} else if (placedSide === "top") { |
| 14650 |
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`; |
| 14651 |
y = `${rects.floating.height + arrowHeight}px`; |
| 14652 |
} else if (placedSide === "right") { |
| 14653 |
x = `${-arrowHeight}px`; |
| 14654 |
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`; |
| 14655 |
} else if (placedSide === "left") { |
| 14656 |
x = `${rects.floating.width + arrowHeight}px`; |
| 14657 |
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`; |
| 14658 |
} |
| 14659 |
return { data: { x, y } }; |
| 14660 |
} |
| 14661 |
}); |
| 14662 |
function getSideAndAlignFromPlacement(placement) { |
| 14663 |
const [side, align = "center"] = placement.split("-"); |
| 14664 |
return [side, align]; |
| 14665 |
} |
| 14666 |
var Root2 = Popper; |
| 14667 |
var Anchor = PopperAnchor; |
| 14668 |
var Content = PopperContent; |
| 14669 |
var Arrow = PopperArrow; |
| 14670 |
|
| 14671 |
//# sourceMappingURL=index.mjs.map |
| 14672 |
|
| 14673 |
|
| 14674 |
/***/ }, |
| 14675 |
|
| 14676 |
/***/ "./node_modules/@radix-ui/react-popper/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs" |
| 14677 |
/*!****************************************************************************************************************!*\ |
| 14678 |
!*** ./node_modules/@radix-ui/react-popper/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs ***! |
| 14679 |
\****************************************************************************************************************/ |
| 14680 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 14681 |
|
| 14682 |
__webpack_require__.r(__webpack_exports__); |
| 14683 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 14684 |
/* harmony export */ arrow: () => (/* binding */ arrow), |
| 14685 |
/* harmony export */ autoPlacement: () => (/* binding */ autoPlacement), |
| 14686 |
/* harmony export */ autoUpdate: () => (/* reexport safe */ _floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.autoUpdate), |
| 14687 |
/* harmony export */ computePosition: () => (/* reexport safe */ _floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.computePosition), |
| 14688 |
/* harmony export */ detectOverflow: () => (/* reexport safe */ _floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.detectOverflow), |
| 14689 |
/* harmony export */ flip: () => (/* binding */ flip), |
| 14690 |
/* harmony export */ getOverflowAncestors: () => (/* reexport safe */ _floating_ui_dom__WEBPACK_IMPORTED_MODULE_1__.getOverflowAncestors), |
| 14691 |
/* harmony export */ hide: () => (/* binding */ hide), |
| 14692 |
/* harmony export */ inline: () => (/* binding */ inline), |
| 14693 |
/* harmony export */ limitShift: () => (/* binding */ limitShift), |
| 14694 |
/* harmony export */ offset: () => (/* binding */ offset), |
| 14695 |
/* harmony export */ platform: () => (/* reexport safe */ _floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.platform), |
| 14696 |
/* harmony export */ shift: () => (/* binding */ shift), |
| 14697 |
/* harmony export */ size: () => (/* binding */ size), |
| 14698 |
/* harmony export */ useFloating: () => (/* binding */ useFloating) |
| 14699 |
/* harmony export */ }); |
| 14700 |
/* harmony import */ var _floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @floating-ui/dom */ "./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"); |
| 14701 |
/* harmony import */ var _floating_ui_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/dom */ "./node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs"); |
| 14702 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); |
| 14703 |
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-dom */ "react-dom"); |
| 14704 |
|
| 14705 |
|
| 14706 |
|
| 14707 |
|
| 14708 |
|
| 14709 |
|
| 14710 |
var isClient = typeof document !== 'undefined'; |
| 14711 |
|
| 14712 |
var noop = function noop() {}; |
| 14713 |
var index = isClient ? react__WEBPACK_IMPORTED_MODULE_2__.useLayoutEffect : noop; |
| 14714 |
|
| 14715 |
// Fork of `fast-deep-equal` that only does the comparisons we need and compares |
| 14716 |
// functions |
| 14717 |
function deepEqual(a, b) { |
| 14718 |
if (a === b) { |
| 14719 |
return true; |
| 14720 |
} |
| 14721 |
if (typeof a !== typeof b) { |
| 14722 |
return false; |
| 14723 |
} |
| 14724 |
if (typeof a === 'function' && a.toString() === b.toString()) { |
| 14725 |
return true; |
| 14726 |
} |
| 14727 |
let length; |
| 14728 |
let i; |
| 14729 |
let keys; |
| 14730 |
if (a && b && typeof a === 'object') { |
| 14731 |
if (Array.isArray(a)) { |
| 14732 |
length = a.length; |
| 14733 |
if (length !== b.length) return false; |
| 14734 |
for (i = length; i-- !== 0;) { |
| 14735 |
if (!deepEqual(a[i], b[i])) { |
| 14736 |
return false; |
| 14737 |
} |
| 14738 |
} |
| 14739 |
return true; |
| 14740 |
} |
| 14741 |
keys = Object.keys(a); |
| 14742 |
length = keys.length; |
| 14743 |
if (length !== Object.keys(b).length) { |
| 14744 |
return false; |
| 14745 |
} |
| 14746 |
for (i = length; i-- !== 0;) { |
| 14747 |
if (!{}.hasOwnProperty.call(b, keys[i])) { |
| 14748 |
return false; |
| 14749 |
} |
| 14750 |
} |
| 14751 |
for (i = length; i-- !== 0;) { |
| 14752 |
const key = keys[i]; |
| 14753 |
if (key === '_owner' && a.$$typeof) { |
| 14754 |
continue; |
| 14755 |
} |
| 14756 |
if (!deepEqual(a[key], b[key])) { |
| 14757 |
return false; |
| 14758 |
} |
| 14759 |
} |
| 14760 |
return true; |
| 14761 |
} |
| 14762 |
return a !== a && b !== b; |
| 14763 |
} |
| 14764 |
|
| 14765 |
function getDPR(element) { |
| 14766 |
if (typeof window === 'undefined') { |
| 14767 |
return 1; |
| 14768 |
} |
| 14769 |
const win = element.ownerDocument.defaultView || window; |
| 14770 |
return win.devicePixelRatio || 1; |
| 14771 |
} |
| 14772 |
|
| 14773 |
function roundByDPR(element, value) { |
| 14774 |
const dpr = getDPR(element); |
| 14775 |
return Math.round(value * dpr) / dpr; |
| 14776 |
} |
| 14777 |
|
| 14778 |
function useLatestRef(value) { |
| 14779 |
const ref = react__WEBPACK_IMPORTED_MODULE_2__.useRef(value); |
| 14780 |
index(() => { |
| 14781 |
ref.current = value; |
| 14782 |
}); |
| 14783 |
return ref; |
| 14784 |
} |
| 14785 |
|
| 14786 |
/** |
| 14787 |
* Provides data to position a floating element. |
| 14788 |
* @see https://floating-ui.com/docs/useFloating |
| 14789 |
*/ |
| 14790 |
function useFloating(options) { |
| 14791 |
if (options === void 0) { |
| 14792 |
options = {}; |
| 14793 |
} |
| 14794 |
const { |
| 14795 |
placement = 'bottom', |
| 14796 |
strategy = 'absolute', |
| 14797 |
middleware = [], |
| 14798 |
platform, |
| 14799 |
elements: { |
| 14800 |
reference: externalReference, |
| 14801 |
floating: externalFloating |
| 14802 |
} = {}, |
| 14803 |
transform = true, |
| 14804 |
whileElementsMounted, |
| 14805 |
open |
| 14806 |
} = options; |
| 14807 |
const [data, setData] = react__WEBPACK_IMPORTED_MODULE_2__.useState({ |
| 14808 |
x: 0, |
| 14809 |
y: 0, |
| 14810 |
strategy, |
| 14811 |
placement, |
| 14812 |
middlewareData: {}, |
| 14813 |
isPositioned: false |
| 14814 |
}); |
| 14815 |
const [latestMiddleware, setLatestMiddleware] = react__WEBPACK_IMPORTED_MODULE_2__.useState(middleware); |
| 14816 |
if (!deepEqual(latestMiddleware, middleware)) { |
| 14817 |
setLatestMiddleware(middleware); |
| 14818 |
} |
| 14819 |
const [_reference, _setReference] = react__WEBPACK_IMPORTED_MODULE_2__.useState(null); |
| 14820 |
const [_floating, _setFloating] = react__WEBPACK_IMPORTED_MODULE_2__.useState(null); |
| 14821 |
const setReference = react__WEBPACK_IMPORTED_MODULE_2__.useCallback(node => { |
| 14822 |
if (node !== referenceRef.current) { |
| 14823 |
referenceRef.current = node; |
| 14824 |
_setReference(node); |
| 14825 |
} |
| 14826 |
}, []); |
| 14827 |
const setFloating = react__WEBPACK_IMPORTED_MODULE_2__.useCallback(node => { |
| 14828 |
if (node !== floatingRef.current) { |
| 14829 |
floatingRef.current = node; |
| 14830 |
_setFloating(node); |
| 14831 |
} |
| 14832 |
}, []); |
| 14833 |
const referenceEl = externalReference || _reference; |
| 14834 |
const floatingEl = externalFloating || _floating; |
| 14835 |
const referenceRef = react__WEBPACK_IMPORTED_MODULE_2__.useRef(null); |
| 14836 |
const floatingRef = react__WEBPACK_IMPORTED_MODULE_2__.useRef(null); |
| 14837 |
const dataRef = react__WEBPACK_IMPORTED_MODULE_2__.useRef(data); |
| 14838 |
const hasWhileElementsMounted = whileElementsMounted != null; |
| 14839 |
const whileElementsMountedRef = useLatestRef(whileElementsMounted); |
| 14840 |
const platformRef = useLatestRef(platform); |
| 14841 |
const openRef = useLatestRef(open); |
| 14842 |
const update = react__WEBPACK_IMPORTED_MODULE_2__.useCallback(() => { |
| 14843 |
if (!referenceRef.current || !floatingRef.current) { |
| 14844 |
return; |
| 14845 |
} |
| 14846 |
const config = { |
| 14847 |
placement, |
| 14848 |
strategy, |
| 14849 |
middleware: latestMiddleware |
| 14850 |
}; |
| 14851 |
if (platformRef.current) { |
| 14852 |
config.platform = platformRef.current; |
| 14853 |
} |
| 14854 |
(0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.computePosition)(referenceRef.current, floatingRef.current, config).then(data => { |
| 14855 |
const fullData = { |
| 14856 |
...data, |
| 14857 |
// The floating element's position may be recomputed while it's closed |
| 14858 |
// but still mounted (such as when transitioning out). To ensure |
| 14859 |
// `isPositioned` will be `false` initially on the next open, avoid |
| 14860 |
// setting it to `true` when `open === false` (must be specified). |
| 14861 |
isPositioned: openRef.current !== false |
| 14862 |
}; |
| 14863 |
if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) { |
| 14864 |
dataRef.current = fullData; |
| 14865 |
react_dom__WEBPACK_IMPORTED_MODULE_3__.flushSync(() => { |
| 14866 |
setData(fullData); |
| 14867 |
}); |
| 14868 |
} |
| 14869 |
}); |
| 14870 |
}, [latestMiddleware, placement, strategy, platformRef, openRef]); |
| 14871 |
index(() => { |
| 14872 |
if (open === false && dataRef.current.isPositioned) { |
| 14873 |
dataRef.current.isPositioned = false; |
| 14874 |
setData(data => ({ |
| 14875 |
...data, |
| 14876 |
isPositioned: false |
| 14877 |
})); |
| 14878 |
} |
| 14879 |
}, [open]); |
| 14880 |
const isMountedRef = react__WEBPACK_IMPORTED_MODULE_2__.useRef(false); |
| 14881 |
index(() => { |
| 14882 |
isMountedRef.current = true; |
| 14883 |
return () => { |
| 14884 |
isMountedRef.current = false; |
| 14885 |
}; |
| 14886 |
}, []); |
| 14887 |
index(() => { |
| 14888 |
if (referenceEl) referenceRef.current = referenceEl; |
| 14889 |
if (floatingEl) floatingRef.current = floatingEl; |
| 14890 |
if (referenceEl && floatingEl) { |
| 14891 |
if (whileElementsMountedRef.current) { |
| 14892 |
return whileElementsMountedRef.current(referenceEl, floatingEl, update); |
| 14893 |
} |
| 14894 |
update(); |
| 14895 |
} |
| 14896 |
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]); |
| 14897 |
const refs = react__WEBPACK_IMPORTED_MODULE_2__.useMemo(() => ({ |
| 14898 |
reference: referenceRef, |
| 14899 |
floating: floatingRef, |
| 14900 |
setReference, |
| 14901 |
setFloating |
| 14902 |
}), [setReference, setFloating]); |
| 14903 |
const elements = react__WEBPACK_IMPORTED_MODULE_2__.useMemo(() => ({ |
| 14904 |
reference: referenceEl, |
| 14905 |
floating: floatingEl |
| 14906 |
}), [referenceEl, floatingEl]); |
| 14907 |
const floatingStyles = react__WEBPACK_IMPORTED_MODULE_2__.useMemo(() => { |
| 14908 |
const initialStyles = { |
| 14909 |
position: strategy, |
| 14910 |
left: 0, |
| 14911 |
top: 0 |
| 14912 |
}; |
| 14913 |
if (!elements.floating) { |
| 14914 |
return initialStyles; |
| 14915 |
} |
| 14916 |
const x = roundByDPR(elements.floating, data.x); |
| 14917 |
const y = roundByDPR(elements.floating, data.y); |
| 14918 |
if (transform) { |
| 14919 |
return { |
| 14920 |
...initialStyles, |
| 14921 |
transform: "translate(" + x + "px, " + y + "px)", |
| 14922 |
...(getDPR(elements.floating) >= 1.5 && { |
| 14923 |
willChange: 'transform' |
| 14924 |
}) |
| 14925 |
}; |
| 14926 |
} |
| 14927 |
return { |
| 14928 |
position: strategy, |
| 14929 |
left: x, |
| 14930 |
top: y |
| 14931 |
}; |
| 14932 |
}, [strategy, transform, elements.floating, data.x, data.y]); |
| 14933 |
return react__WEBPACK_IMPORTED_MODULE_2__.useMemo(() => ({ |
| 14934 |
...data, |
| 14935 |
update, |
| 14936 |
refs, |
| 14937 |
elements, |
| 14938 |
floatingStyles |
| 14939 |
}), [data, update, refs, elements, floatingStyles]); |
| 14940 |
} |
| 14941 |
|
| 14942 |
/** |
| 14943 |
* Provides data to position an inner element of the floating element so that it |
| 14944 |
* appears centered to the reference element. |
| 14945 |
* This wraps the core `arrow` middleware to allow React refs as the element. |
| 14946 |
* @see https://floating-ui.com/docs/arrow |
| 14947 |
*/ |
| 14948 |
const arrow$1 = options => { |
| 14949 |
function isRef(value) { |
| 14950 |
return {}.hasOwnProperty.call(value, 'current'); |
| 14951 |
} |
| 14952 |
return { |
| 14953 |
name: 'arrow', |
| 14954 |
options, |
| 14955 |
fn(state) { |
| 14956 |
const { |
| 14957 |
element, |
| 14958 |
padding |
| 14959 |
} = typeof options === 'function' ? options(state) : options; |
| 14960 |
if (element && isRef(element)) { |
| 14961 |
if (element.current != null) { |
| 14962 |
return (0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.arrow)({ |
| 14963 |
element: element.current, |
| 14964 |
padding |
| 14965 |
}).fn(state); |
| 14966 |
} |
| 14967 |
return {}; |
| 14968 |
} |
| 14969 |
if (element) { |
| 14970 |
return (0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.arrow)({ |
| 14971 |
element, |
| 14972 |
padding |
| 14973 |
}).fn(state); |
| 14974 |
} |
| 14975 |
return {}; |
| 14976 |
} |
| 14977 |
}; |
| 14978 |
}; |
| 14979 |
|
| 14980 |
/** |
| 14981 |
* Modifies the placement by translating the floating element along the |
| 14982 |
* specified axes. |
| 14983 |
* A number (shorthand for `mainAxis` or distance), or an axes configuration |
| 14984 |
* object may be passed. |
| 14985 |
* @see https://floating-ui.com/docs/offset |
| 14986 |
*/ |
| 14987 |
const offset = (options, deps) => ({ |
| 14988 |
...(0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.offset)(options), |
| 14989 |
options: [options, deps] |
| 14990 |
}); |
| 14991 |
|
| 14992 |
/** |
| 14993 |
* Optimizes the visibility of the floating element by shifting it in order to |
| 14994 |
* keep it in view when it will overflow the clipping boundary. |
| 14995 |
* @see https://floating-ui.com/docs/shift |
| 14996 |
*/ |
| 14997 |
const shift = (options, deps) => ({ |
| 14998 |
...(0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.shift)(options), |
| 14999 |
options: [options, deps] |
| 15000 |
}); |
| 15001 |
|
| 15002 |
/** |
| 15003 |
* Built-in `limiter` that will stop `shift()` at a certain point. |
| 15004 |
*/ |
| 15005 |
const limitShift = (options, deps) => ({ |
| 15006 |
...(0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.limitShift)(options), |
| 15007 |
options: [options, deps] |
| 15008 |
}); |
| 15009 |
|
| 15010 |
/** |
| 15011 |
* Optimizes the visibility of the floating element by flipping the `placement` |
| 15012 |
* in order to keep it in view when the preferred placement(s) will overflow the |
| 15013 |
* clipping boundary. Alternative to `autoPlacement`. |
| 15014 |
* @see https://floating-ui.com/docs/flip |
| 15015 |
*/ |
| 15016 |
const flip = (options, deps) => ({ |
| 15017 |
...(0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.flip)(options), |
| 15018 |
options: [options, deps] |
| 15019 |
}); |
| 15020 |
|
| 15021 |
/** |
| 15022 |
* Provides data that allows you to change the size of the floating element — |
| 15023 |
* for instance, prevent it from overflowing the clipping boundary or match the |
| 15024 |
* width of the reference element. |
| 15025 |
* @see https://floating-ui.com/docs/size |
| 15026 |
*/ |
| 15027 |
const size = (options, deps) => ({ |
| 15028 |
...(0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.size)(options), |
| 15029 |
options: [options, deps] |
| 15030 |
}); |
| 15031 |
|
| 15032 |
/** |
| 15033 |
* Optimizes the visibility of the floating element by choosing the placement |
| 15034 |
* that has the most space available automatically, without needing to specify a |
| 15035 |
* preferred placement. Alternative to `flip`. |
| 15036 |
* @see https://floating-ui.com/docs/autoPlacement |
| 15037 |
*/ |
| 15038 |
const autoPlacement = (options, deps) => ({ |
| 15039 |
...(0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.autoPlacement)(options), |
| 15040 |
options: [options, deps] |
| 15041 |
}); |
| 15042 |
|
| 15043 |
/** |
| 15044 |
* Provides data to hide the floating element in applicable situations, such as |
| 15045 |
* when it is not in the same clipping context as the reference element. |
| 15046 |
* @see https://floating-ui.com/docs/hide |
| 15047 |
*/ |
| 15048 |
const hide = (options, deps) => ({ |
| 15049 |
...(0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.hide)(options), |
| 15050 |
options: [options, deps] |
| 15051 |
}); |
| 15052 |
|
| 15053 |
/** |
| 15054 |
* Provides improved positioning for inline reference elements that can span |
| 15055 |
* over multiple lines, such as hyperlinks or range selections. |
| 15056 |
* @see https://floating-ui.com/docs/inline |
| 15057 |
*/ |
| 15058 |
const inline = (options, deps) => ({ |
| 15059 |
...(0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.inline)(options), |
| 15060 |
options: [options, deps] |
| 15061 |
}); |
| 15062 |
|
| 15063 |
/** |
| 15064 |
* Provides data to position an inner element of the floating element so that it |
| 15065 |
* appears centered to the reference element. |
| 15066 |
* This wraps the core `arrow` middleware to allow React refs as the element. |
| 15067 |
* @see https://floating-ui.com/docs/arrow |
| 15068 |
*/ |
| 15069 |
const arrow = (options, deps) => ({ |
| 15070 |
...arrow$1(options), |
| 15071 |
options: [options, deps] |
| 15072 |
}); |
| 15073 |
|
| 15074 |
|
| 15075 |
|
| 15076 |
|
| 15077 |
/***/ }, |
| 15078 |
|
| 15079 |
/***/ "./node_modules/@radix-ui/react-portal/dist/index.mjs" |
| 15080 |
/*!************************************************************!*\ |
| 15081 |
!*** ./node_modules/@radix-ui/react-portal/dist/index.mjs ***! |
| 15082 |
\************************************************************/ |
| 15083 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 15084 |
|
| 15085 |
__webpack_require__.r(__webpack_exports__); |
| 15086 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 15087 |
/* harmony export */ Portal: () => (/* binding */ Portal), |
| 15088 |
/* harmony export */ Root: () => (/* binding */ Root) |
| 15089 |
/* harmony export */ }); |
| 15090 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 15091 |
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); |
| 15092 |
/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-primitive */ "./node_modules/@radix-ui/react-primitive/dist/index.mjs"); |
| 15093 |
/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ "./node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"); |
| 15094 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 15095 |
"use client"; |
| 15096 |
|
| 15097 |
// src/portal.tsx |
| 15098 |
|
| 15099 |
|
| 15100 |
|
| 15101 |
|
| 15102 |
|
| 15103 |
var PORTAL_NAME = "Portal"; |
| 15104 |
var Portal = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 15105 |
const { container: containerProp, ...portalProps } = props; |
| 15106 |
const [mounted, setMounted] = react__WEBPACK_IMPORTED_MODULE_0__.useState(false); |
| 15107 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_3__.useLayoutEffect)(() => setMounted(true), []); |
| 15108 |
const container = containerProp || mounted && globalThis?.document?.body; |
| 15109 |
return container ? react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal(/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_2__.Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null; |
| 15110 |
}); |
| 15111 |
Portal.displayName = PORTAL_NAME; |
| 15112 |
var Root = Portal; |
| 15113 |
|
| 15114 |
//# sourceMappingURL=index.mjs.map |
| 15115 |
|
| 15116 |
|
| 15117 |
/***/ }, |
| 15118 |
|
| 15119 |
/***/ "./node_modules/@radix-ui/react-presence/dist/index.mjs" |
| 15120 |
/*!**************************************************************!*\ |
| 15121 |
!*** ./node_modules/@radix-ui/react-presence/dist/index.mjs ***! |
| 15122 |
\**************************************************************/ |
| 15123 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 15124 |
|
| 15125 |
__webpack_require__.r(__webpack_exports__); |
| 15126 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 15127 |
/* harmony export */ Presence: () => (/* binding */ Presence), |
| 15128 |
/* harmony export */ Root: () => (/* binding */ Root) |
| 15129 |
/* harmony export */ }); |
| 15130 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 15131 |
/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ "./node_modules/@radix-ui/react-compose-refs/dist/index.mjs"); |
| 15132 |
/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ "./node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"); |
| 15133 |
"use client"; |
| 15134 |
|
| 15135 |
// src/presence.tsx |
| 15136 |
|
| 15137 |
|
| 15138 |
|
| 15139 |
|
| 15140 |
// src/use-state-machine.tsx |
| 15141 |
|
| 15142 |
function useStateMachine(initialState, machine) { |
| 15143 |
return react__WEBPACK_IMPORTED_MODULE_0__.useReducer((state, event) => { |
| 15144 |
const nextState = machine[state][event]; |
| 15145 |
return nextState ?? state; |
| 15146 |
}, initialState); |
| 15147 |
} |
| 15148 |
|
| 15149 |
// src/presence.tsx |
| 15150 |
var Presence = (props) => { |
| 15151 |
const { present, children } = props; |
| 15152 |
const presence = usePresence(present); |
| 15153 |
const child = typeof children === "function" ? children({ present: presence.isPresent }) : react__WEBPACK_IMPORTED_MODULE_0__.Children.only(children); |
| 15154 |
const ref = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_1__.useComposedRefs)(presence.ref, getElementRef(child)); |
| 15155 |
const forceMount = typeof children === "function"; |
| 15156 |
return forceMount || presence.isPresent ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(child, { ref }) : null; |
| 15157 |
}; |
| 15158 |
Presence.displayName = "Presence"; |
| 15159 |
function usePresence(present) { |
| 15160 |
const [node, setNode] = react__WEBPACK_IMPORTED_MODULE_0__.useState(); |
| 15161 |
const stylesRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 15162 |
const prevPresentRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(present); |
| 15163 |
const prevAnimationNameRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef("none"); |
| 15164 |
const initialState = present ? "mounted" : "unmounted"; |
| 15165 |
const [state, send] = useStateMachine(initialState, { |
| 15166 |
mounted: { |
| 15167 |
UNMOUNT: "unmounted", |
| 15168 |
ANIMATION_OUT: "unmountSuspended" |
| 15169 |
}, |
| 15170 |
unmountSuspended: { |
| 15171 |
MOUNT: "mounted", |
| 15172 |
ANIMATION_END: "unmounted" |
| 15173 |
}, |
| 15174 |
unmounted: { |
| 15175 |
MOUNT: "mounted" |
| 15176 |
} |
| 15177 |
}); |
| 15178 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 15179 |
const currentAnimationName = getAnimationName(stylesRef.current); |
| 15180 |
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none"; |
| 15181 |
}, [state]); |
| 15182 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_2__.useLayoutEffect)(() => { |
| 15183 |
const styles = stylesRef.current; |
| 15184 |
const wasPresent = prevPresentRef.current; |
| 15185 |
const hasPresentChanged = wasPresent !== present; |
| 15186 |
if (hasPresentChanged) { |
| 15187 |
const prevAnimationName = prevAnimationNameRef.current; |
| 15188 |
const currentAnimationName = getAnimationName(styles); |
| 15189 |
if (present) { |
| 15190 |
send("MOUNT"); |
| 15191 |
} else if (currentAnimationName === "none" || styles?.display === "none") { |
| 15192 |
send("UNMOUNT"); |
| 15193 |
} else { |
| 15194 |
const isAnimating = prevAnimationName !== currentAnimationName; |
| 15195 |
if (wasPresent && isAnimating) { |
| 15196 |
send("ANIMATION_OUT"); |
| 15197 |
} else { |
| 15198 |
send("UNMOUNT"); |
| 15199 |
} |
| 15200 |
} |
| 15201 |
prevPresentRef.current = present; |
| 15202 |
} |
| 15203 |
}, [present, send]); |
| 15204 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_2__.useLayoutEffect)(() => { |
| 15205 |
if (node) { |
| 15206 |
let timeoutId; |
| 15207 |
const ownerWindow = node.ownerDocument.defaultView ?? window; |
| 15208 |
const handleAnimationEnd = (event) => { |
| 15209 |
const currentAnimationName = getAnimationName(stylesRef.current); |
| 15210 |
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName)); |
| 15211 |
if (event.target === node && isCurrentAnimation) { |
| 15212 |
send("ANIMATION_END"); |
| 15213 |
if (!prevPresentRef.current) { |
| 15214 |
const currentFillMode = node.style.animationFillMode; |
| 15215 |
node.style.animationFillMode = "forwards"; |
| 15216 |
timeoutId = ownerWindow.setTimeout(() => { |
| 15217 |
if (node.style.animationFillMode === "forwards") { |
| 15218 |
node.style.animationFillMode = currentFillMode; |
| 15219 |
} |
| 15220 |
}); |
| 15221 |
} |
| 15222 |
} |
| 15223 |
}; |
| 15224 |
const handleAnimationStart = (event) => { |
| 15225 |
if (event.target === node) { |
| 15226 |
prevAnimationNameRef.current = getAnimationName(stylesRef.current); |
| 15227 |
} |
| 15228 |
}; |
| 15229 |
node.addEventListener("animationstart", handleAnimationStart); |
| 15230 |
node.addEventListener("animationcancel", handleAnimationEnd); |
| 15231 |
node.addEventListener("animationend", handleAnimationEnd); |
| 15232 |
return () => { |
| 15233 |
ownerWindow.clearTimeout(timeoutId); |
| 15234 |
node.removeEventListener("animationstart", handleAnimationStart); |
| 15235 |
node.removeEventListener("animationcancel", handleAnimationEnd); |
| 15236 |
node.removeEventListener("animationend", handleAnimationEnd); |
| 15237 |
}; |
| 15238 |
} else { |
| 15239 |
send("ANIMATION_END"); |
| 15240 |
} |
| 15241 |
}, [node, send]); |
| 15242 |
return { |
| 15243 |
isPresent: ["mounted", "unmountSuspended"].includes(state), |
| 15244 |
ref: react__WEBPACK_IMPORTED_MODULE_0__.useCallback((node2) => { |
| 15245 |
stylesRef.current = node2 ? getComputedStyle(node2) : null; |
| 15246 |
setNode(node2); |
| 15247 |
}, []) |
| 15248 |
}; |
| 15249 |
} |
| 15250 |
function getAnimationName(styles) { |
| 15251 |
return styles?.animationName || "none"; |
| 15252 |
} |
| 15253 |
function getElementRef(element) { |
| 15254 |
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get; |
| 15255 |
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; |
| 15256 |
if (mayWarn) { |
| 15257 |
return element.ref; |
| 15258 |
} |
| 15259 |
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get; |
| 15260 |
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; |
| 15261 |
if (mayWarn) { |
| 15262 |
return element.props.ref; |
| 15263 |
} |
| 15264 |
return element.props.ref || element.ref; |
| 15265 |
} |
| 15266 |
var Root = Presence; |
| 15267 |
|
| 15268 |
//# sourceMappingURL=index.mjs.map |
| 15269 |
|
| 15270 |
|
| 15271 |
/***/ }, |
| 15272 |
|
| 15273 |
/***/ "./node_modules/@radix-ui/react-primitive/dist/index.mjs" |
| 15274 |
/*!***************************************************************!*\ |
| 15275 |
!*** ./node_modules/@radix-ui/react-primitive/dist/index.mjs ***! |
| 15276 |
\***************************************************************/ |
| 15277 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 15278 |
|
| 15279 |
__webpack_require__.r(__webpack_exports__); |
| 15280 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 15281 |
/* harmony export */ Primitive: () => (/* binding */ Primitive), |
| 15282 |
/* harmony export */ Root: () => (/* binding */ Root), |
| 15283 |
/* harmony export */ dispatchDiscreteCustomEvent: () => (/* binding */ dispatchDiscreteCustomEvent) |
| 15284 |
/* harmony export */ }); |
| 15285 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 15286 |
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); |
| 15287 |
/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-slot */ "./node_modules/@radix-ui/react-slot/dist/index.mjs"); |
| 15288 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 15289 |
// src/primitive.tsx |
| 15290 |
|
| 15291 |
|
| 15292 |
|
| 15293 |
|
| 15294 |
var NODES = [ |
| 15295 |
"a", |
| 15296 |
"button", |
| 15297 |
"div", |
| 15298 |
"form", |
| 15299 |
"h2", |
| 15300 |
"h3", |
| 15301 |
"img", |
| 15302 |
"input", |
| 15303 |
"label", |
| 15304 |
"li", |
| 15305 |
"nav", |
| 15306 |
"ol", |
| 15307 |
"p", |
| 15308 |
"select", |
| 15309 |
"span", |
| 15310 |
"svg", |
| 15311 |
"ul" |
| 15312 |
]; |
| 15313 |
var Primitive = NODES.reduce((primitive, node) => { |
| 15314 |
const Slot = (0,_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_2__.createSlot)(`Primitive.${node}`); |
| 15315 |
const Node = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 15316 |
const { asChild, ...primitiveProps } = props; |
| 15317 |
const Comp = asChild ? Slot : node; |
| 15318 |
if (typeof window !== "undefined") { |
| 15319 |
window[Symbol.for("radix-ui")] = true; |
| 15320 |
} |
| 15321 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(Comp, { ...primitiveProps, ref: forwardedRef }); |
| 15322 |
}); |
| 15323 |
Node.displayName = `Primitive.${node}`; |
| 15324 |
return { ...primitive, [node]: Node }; |
| 15325 |
}, {}); |
| 15326 |
function dispatchDiscreteCustomEvent(target, event) { |
| 15327 |
if (target) react_dom__WEBPACK_IMPORTED_MODULE_1__.flushSync(() => target.dispatchEvent(event)); |
| 15328 |
} |
| 15329 |
var Root = Primitive; |
| 15330 |
|
| 15331 |
//# sourceMappingURL=index.mjs.map |
| 15332 |
|
| 15333 |
|
| 15334 |
/***/ }, |
| 15335 |
|
| 15336 |
/***/ "./node_modules/@radix-ui/react-roving-focus/dist/index.mjs" |
| 15337 |
/*!******************************************************************!*\ |
| 15338 |
!*** ./node_modules/@radix-ui/react-roving-focus/dist/index.mjs ***! |
| 15339 |
\******************************************************************/ |
| 15340 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 15341 |
|
| 15342 |
__webpack_require__.r(__webpack_exports__); |
| 15343 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 15344 |
/* harmony export */ Item: () => (/* binding */ Item), |
| 15345 |
/* harmony export */ Root: () => (/* binding */ Root), |
| 15346 |
/* harmony export */ RovingFocusGroup: () => (/* binding */ RovingFocusGroup), |
| 15347 |
/* harmony export */ RovingFocusGroupItem: () => (/* binding */ RovingFocusGroupItem), |
| 15348 |
/* harmony export */ createRovingFocusGroupScope: () => (/* binding */ createRovingFocusGroupScope) |
| 15349 |
/* harmony export */ }); |
| 15350 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 15351 |
/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/primitive */ "./node_modules/@radix-ui/primitive/dist/index.mjs"); |
| 15352 |
/* harmony import */ var _radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-collection */ "./node_modules/@radix-ui/react-collection/dist/index.mjs"); |
| 15353 |
/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ "./node_modules/@radix-ui/react-compose-refs/dist/index.mjs"); |
| 15354 |
/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-context */ "./node_modules/@radix-ui/react-context/dist/index.mjs"); |
| 15355 |
/* harmony import */ var _radix_ui_react_id__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-id */ "./node_modules/@radix-ui/react-id/dist/index.mjs"); |
| 15356 |
/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-primitive */ "./node_modules/@radix-ui/react-primitive/dist/index.mjs"); |
| 15357 |
/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ "./node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"); |
| 15358 |
/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ "./node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"); |
| 15359 |
/* harmony import */ var _radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-direction */ "./node_modules/@radix-ui/react-direction/dist/index.mjs"); |
| 15360 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 15361 |
"use client"; |
| 15362 |
|
| 15363 |
// src/roving-focus-group.tsx |
| 15364 |
|
| 15365 |
|
| 15366 |
|
| 15367 |
|
| 15368 |
|
| 15369 |
|
| 15370 |
|
| 15371 |
|
| 15372 |
|
| 15373 |
|
| 15374 |
|
| 15375 |
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus"; |
| 15376 |
var EVENT_OPTIONS = { bubbles: false, cancelable: true }; |
| 15377 |
var GROUP_NAME = "RovingFocusGroup"; |
| 15378 |
var [Collection, useCollection, createCollectionScope] = (0,_radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_2__.createCollection)(GROUP_NAME); |
| 15379 |
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_4__.createContextScope)( |
| 15380 |
GROUP_NAME, |
| 15381 |
[createCollectionScope] |
| 15382 |
); |
| 15383 |
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME); |
| 15384 |
var RovingFocusGroup = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 15385 |
(props, forwardedRef) => { |
| 15386 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) }); |
| 15387 |
} |
| 15388 |
); |
| 15389 |
RovingFocusGroup.displayName = GROUP_NAME; |
| 15390 |
var RovingFocusGroupImpl = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 15391 |
const { |
| 15392 |
__scopeRovingFocusGroup, |
| 15393 |
orientation, |
| 15394 |
loop = false, |
| 15395 |
dir, |
| 15396 |
currentTabStopId: currentTabStopIdProp, |
| 15397 |
defaultCurrentTabStopId, |
| 15398 |
onCurrentTabStopIdChange, |
| 15399 |
onEntryFocus, |
| 15400 |
preventScrollOnEntryFocus = false, |
| 15401 |
...groupProps |
| 15402 |
} = props; |
| 15403 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 15404 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, ref); |
| 15405 |
const direction = (0,_radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_9__.useDirection)(dir); |
| 15406 |
const [currentTabStopId, setCurrentTabStopId] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_8__.useControllableState)({ |
| 15407 |
prop: currentTabStopIdProp, |
| 15408 |
defaultProp: defaultCurrentTabStopId ?? null, |
| 15409 |
onChange: onCurrentTabStopIdChange, |
| 15410 |
caller: GROUP_NAME |
| 15411 |
}); |
| 15412 |
const [isTabbingBackOut, setIsTabbingBackOut] = react__WEBPACK_IMPORTED_MODULE_0__.useState(false); |
| 15413 |
const handleEntryFocus = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_7__.useCallbackRef)(onEntryFocus); |
| 15414 |
const getItems = useCollection(__scopeRovingFocusGroup); |
| 15415 |
const isClickFocusRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); |
| 15416 |
const [focusableItemsCount, setFocusableItemsCount] = react__WEBPACK_IMPORTED_MODULE_0__.useState(0); |
| 15417 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 15418 |
const node = ref.current; |
| 15419 |
if (node) { |
| 15420 |
node.addEventListener(ENTRY_FOCUS, handleEntryFocus); |
| 15421 |
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus); |
| 15422 |
} |
| 15423 |
}, [handleEntryFocus]); |
| 15424 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)( |
| 15425 |
RovingFocusProvider, |
| 15426 |
{ |
| 15427 |
scope: __scopeRovingFocusGroup, |
| 15428 |
orientation, |
| 15429 |
dir: direction, |
| 15430 |
loop, |
| 15431 |
currentTabStopId, |
| 15432 |
onItemFocus: react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 15433 |
(tabStopId) => setCurrentTabStopId(tabStopId), |
| 15434 |
[setCurrentTabStopId] |
| 15435 |
), |
| 15436 |
onItemShiftTab: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => setIsTabbingBackOut(true), []), |
| 15437 |
onFocusableItemAdd: react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 15438 |
() => setFocusableItemsCount((prevCount) => prevCount + 1), |
| 15439 |
[] |
| 15440 |
), |
| 15441 |
onFocusableItemRemove: react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 15442 |
() => setFocusableItemsCount((prevCount) => prevCount - 1), |
| 15443 |
[] |
| 15444 |
), |
| 15445 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)( |
| 15446 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.div, |
| 15447 |
{ |
| 15448 |
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0, |
| 15449 |
"data-orientation": orientation, |
| 15450 |
...groupProps, |
| 15451 |
ref: composedRefs, |
| 15452 |
style: { outline: "none", ...props.style }, |
| 15453 |
onMouseDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onMouseDown, () => { |
| 15454 |
isClickFocusRef.current = true; |
| 15455 |
}), |
| 15456 |
onFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onFocus, (event) => { |
| 15457 |
const isKeyboardFocus = !isClickFocusRef.current; |
| 15458 |
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) { |
| 15459 |
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS); |
| 15460 |
event.currentTarget.dispatchEvent(entryFocusEvent); |
| 15461 |
if (!entryFocusEvent.defaultPrevented) { |
| 15462 |
const items = getItems().filter((item) => item.focusable); |
| 15463 |
const activeItem = items.find((item) => item.active); |
| 15464 |
const currentItem = items.find((item) => item.id === currentTabStopId); |
| 15465 |
const candidateItems = [activeItem, currentItem, ...items].filter( |
| 15466 |
Boolean |
| 15467 |
); |
| 15468 |
const candidateNodes = candidateItems.map((item) => item.ref.current); |
| 15469 |
focusFirst(candidateNodes, preventScrollOnEntryFocus); |
| 15470 |
} |
| 15471 |
} |
| 15472 |
isClickFocusRef.current = false; |
| 15473 |
}), |
| 15474 |
onBlur: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onBlur, () => setIsTabbingBackOut(false)) |
| 15475 |
} |
| 15476 |
) |
| 15477 |
} |
| 15478 |
); |
| 15479 |
}); |
| 15480 |
var ITEM_NAME = "RovingFocusGroupItem"; |
| 15481 |
var RovingFocusGroupItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 15482 |
(props, forwardedRef) => { |
| 15483 |
const { |
| 15484 |
__scopeRovingFocusGroup, |
| 15485 |
focusable = true, |
| 15486 |
active = false, |
| 15487 |
tabStopId, |
| 15488 |
children, |
| 15489 |
...itemProps |
| 15490 |
} = props; |
| 15491 |
const autoId = (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_5__.useId)(); |
| 15492 |
const id = tabStopId || autoId; |
| 15493 |
const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup); |
| 15494 |
const isCurrentTabStop = context.currentTabStopId === id; |
| 15495 |
const getItems = useCollection(__scopeRovingFocusGroup); |
| 15496 |
const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context; |
| 15497 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 15498 |
if (focusable) { |
| 15499 |
onFocusableItemAdd(); |
| 15500 |
return () => onFocusableItemRemove(); |
| 15501 |
} |
| 15502 |
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]); |
| 15503 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)( |
| 15504 |
Collection.ItemSlot, |
| 15505 |
{ |
| 15506 |
scope: __scopeRovingFocusGroup, |
| 15507 |
id, |
| 15508 |
focusable, |
| 15509 |
active, |
| 15510 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)( |
| 15511 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.span, |
| 15512 |
{ |
| 15513 |
tabIndex: isCurrentTabStop ? 0 : -1, |
| 15514 |
"data-orientation": context.orientation, |
| 15515 |
...itemProps, |
| 15516 |
ref: forwardedRef, |
| 15517 |
onMouseDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onMouseDown, (event) => { |
| 15518 |
if (!focusable) event.preventDefault(); |
| 15519 |
else context.onItemFocus(id); |
| 15520 |
}), |
| 15521 |
onFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onFocus, () => context.onItemFocus(id)), |
| 15522 |
onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onKeyDown, (event) => { |
| 15523 |
if (event.key === "Tab" && event.shiftKey) { |
| 15524 |
context.onItemShiftTab(); |
| 15525 |
return; |
| 15526 |
} |
| 15527 |
if (event.target !== event.currentTarget) return; |
| 15528 |
const focusIntent = getFocusIntent(event, context.orientation, context.dir); |
| 15529 |
if (focusIntent !== void 0) { |
| 15530 |
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return; |
| 15531 |
event.preventDefault(); |
| 15532 |
const items = getItems().filter((item) => item.focusable); |
| 15533 |
let candidateNodes = items.map((item) => item.ref.current); |
| 15534 |
if (focusIntent === "last") candidateNodes.reverse(); |
| 15535 |
else if (focusIntent === "prev" || focusIntent === "next") { |
| 15536 |
if (focusIntent === "prev") candidateNodes.reverse(); |
| 15537 |
const currentIndex = candidateNodes.indexOf(event.currentTarget); |
| 15538 |
candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1); |
| 15539 |
} |
| 15540 |
setTimeout(() => focusFirst(candidateNodes)); |
| 15541 |
} |
| 15542 |
}), |
| 15543 |
children: typeof children === "function" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children |
| 15544 |
} |
| 15545 |
) |
| 15546 |
} |
| 15547 |
); |
| 15548 |
} |
| 15549 |
); |
| 15550 |
RovingFocusGroupItem.displayName = ITEM_NAME; |
| 15551 |
var MAP_KEY_TO_FOCUS_INTENT = { |
| 15552 |
ArrowLeft: "prev", |
| 15553 |
ArrowUp: "prev", |
| 15554 |
ArrowRight: "next", |
| 15555 |
ArrowDown: "next", |
| 15556 |
PageUp: "first", |
| 15557 |
Home: "first", |
| 15558 |
PageDown: "last", |
| 15559 |
End: "last" |
| 15560 |
}; |
| 15561 |
function getDirectionAwareKey(key, dir) { |
| 15562 |
if (dir !== "rtl") return key; |
| 15563 |
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key; |
| 15564 |
} |
| 15565 |
function getFocusIntent(event, orientation, dir) { |
| 15566 |
const key = getDirectionAwareKey(event.key, dir); |
| 15567 |
if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0; |
| 15568 |
if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0; |
| 15569 |
return MAP_KEY_TO_FOCUS_INTENT[key]; |
| 15570 |
} |
| 15571 |
function focusFirst(candidates, preventScroll = false) { |
| 15572 |
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement; |
| 15573 |
for (const candidate of candidates) { |
| 15574 |
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return; |
| 15575 |
candidate.focus({ preventScroll }); |
| 15576 |
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return; |
| 15577 |
} |
| 15578 |
} |
| 15579 |
function wrapArray(array, startIndex) { |
| 15580 |
return array.map((_, index) => array[(startIndex + index) % array.length]); |
| 15581 |
} |
| 15582 |
var Root = RovingFocusGroup; |
| 15583 |
var Item = RovingFocusGroupItem; |
| 15584 |
|
| 15585 |
//# sourceMappingURL=index.mjs.map |
| 15586 |
|
| 15587 |
|
| 15588 |
/***/ }, |
| 15589 |
|
| 15590 |
/***/ "./node_modules/@radix-ui/react-select/dist/index.mjs" |
| 15591 |
/*!************************************************************!*\ |
| 15592 |
!*** ./node_modules/@radix-ui/react-select/dist/index.mjs ***! |
| 15593 |
\************************************************************/ |
| 15594 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 15595 |
|
| 15596 |
__webpack_require__.r(__webpack_exports__); |
| 15597 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 15598 |
/* harmony export */ Arrow: () => (/* binding */ Arrow2), |
| 15599 |
/* harmony export */ Content: () => (/* binding */ Content2), |
| 15600 |
/* harmony export */ Group: () => (/* binding */ Group), |
| 15601 |
/* harmony export */ Icon: () => (/* binding */ Icon), |
| 15602 |
/* harmony export */ Item: () => (/* binding */ Item), |
| 15603 |
/* harmony export */ ItemIndicator: () => (/* binding */ ItemIndicator), |
| 15604 |
/* harmony export */ ItemText: () => (/* binding */ ItemText), |
| 15605 |
/* harmony export */ Label: () => (/* binding */ Label), |
| 15606 |
/* harmony export */ Portal: () => (/* binding */ Portal), |
| 15607 |
/* harmony export */ Root: () => (/* binding */ Root2), |
| 15608 |
/* harmony export */ ScrollDownButton: () => (/* binding */ ScrollDownButton), |
| 15609 |
/* harmony export */ ScrollUpButton: () => (/* binding */ ScrollUpButton), |
| 15610 |
/* harmony export */ Select: () => (/* binding */ Select), |
| 15611 |
/* harmony export */ SelectArrow: () => (/* binding */ SelectArrow), |
| 15612 |
/* harmony export */ SelectContent: () => (/* binding */ SelectContent), |
| 15613 |
/* harmony export */ SelectGroup: () => (/* binding */ SelectGroup), |
| 15614 |
/* harmony export */ SelectIcon: () => (/* binding */ SelectIcon), |
| 15615 |
/* harmony export */ SelectItem: () => (/* binding */ SelectItem), |
| 15616 |
/* harmony export */ SelectItemIndicator: () => (/* binding */ SelectItemIndicator), |
| 15617 |
/* harmony export */ SelectItemText: () => (/* binding */ SelectItemText), |
| 15618 |
/* harmony export */ SelectLabel: () => (/* binding */ SelectLabel), |
| 15619 |
/* harmony export */ SelectPortal: () => (/* binding */ SelectPortal), |
| 15620 |
/* harmony export */ SelectScrollDownButton: () => (/* binding */ SelectScrollDownButton), |
| 15621 |
/* harmony export */ SelectScrollUpButton: () => (/* binding */ SelectScrollUpButton), |
| 15622 |
/* harmony export */ SelectSeparator: () => (/* binding */ SelectSeparator), |
| 15623 |
/* harmony export */ SelectTrigger: () => (/* binding */ SelectTrigger), |
| 15624 |
/* harmony export */ SelectValue: () => (/* binding */ SelectValue), |
| 15625 |
/* harmony export */ SelectViewport: () => (/* binding */ SelectViewport), |
| 15626 |
/* harmony export */ Separator: () => (/* binding */ Separator), |
| 15627 |
/* harmony export */ Trigger: () => (/* binding */ Trigger), |
| 15628 |
/* harmony export */ Value: () => (/* binding */ Value), |
| 15629 |
/* harmony export */ Viewport: () => (/* binding */ Viewport), |
| 15630 |
/* harmony export */ createSelectScope: () => (/* binding */ createSelectScope) |
| 15631 |
/* harmony export */ }); |
| 15632 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 15633 |
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); |
| 15634 |
/* harmony import */ var _radix_ui_number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/number */ "./node_modules/@radix-ui/number/dist/index.mjs"); |
| 15635 |
/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/primitive */ "./node_modules/@radix-ui/primitive/dist/index.mjs"); |
| 15636 |
/* harmony import */ var _radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-collection */ "./node_modules/@radix-ui/react-collection/dist/index.mjs"); |
| 15637 |
/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ "./node_modules/@radix-ui/react-compose-refs/dist/index.mjs"); |
| 15638 |
/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-context */ "./node_modules/@radix-ui/react-context/dist/index.mjs"); |
| 15639 |
/* harmony import */ var _radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/react-direction */ "./node_modules/@radix-ui/react-direction/dist/index.mjs"); |
| 15640 |
/* harmony import */ var _radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/react-dismissable-layer */ "./node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs"); |
| 15641 |
/* harmony import */ var _radix_ui_react_focus_guards__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-focus-guards */ "./node_modules/@radix-ui/react-focus-guards/dist/index.mjs"); |
| 15642 |
/* harmony import */ var _radix_ui_react_focus_scope__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @radix-ui/react-focus-scope */ "./node_modules/@radix-ui/react-focus-scope/dist/index.mjs"); |
| 15643 |
/* harmony import */ var _radix_ui_react_id__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @radix-ui/react-id */ "./node_modules/@radix-ui/react-id/dist/index.mjs"); |
| 15644 |
/* harmony import */ var _radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @radix-ui/react-popper */ "./node_modules/@radix-ui/react-popper/dist/index.mjs"); |
| 15645 |
/* harmony import */ var _radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @radix-ui/react-portal */ "./node_modules/@radix-ui/react-portal/dist/index.mjs"); |
| 15646 |
/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @radix-ui/react-primitive */ "./node_modules/@radix-ui/react-primitive/dist/index.mjs"); |
| 15647 |
/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @radix-ui/react-slot */ "./node_modules/@radix-ui/react-slot/dist/index.mjs"); |
| 15648 |
/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ "./node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"); |
| 15649 |
/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ "./node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"); |
| 15650 |
/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ "./node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"); |
| 15651 |
/* harmony import */ var _radix_ui_react_use_previous__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @radix-ui/react-use-previous */ "./node_modules/@radix-ui/react-use-previous/dist/index.mjs"); |
| 15652 |
/* harmony import */ var _radix_ui_react_visually_hidden__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @radix-ui/react-visually-hidden */ "./node_modules/@radix-ui/react-visually-hidden/dist/index.mjs"); |
| 15653 |
/* harmony import */ var aria_hidden__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! aria-hidden */ "./node_modules/aria-hidden/dist/es2015/index.js"); |
| 15654 |
/* harmony import */ var react_remove_scroll__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! react-remove-scroll */ "./node_modules/react-remove-scroll/dist/es2015/Combination.js"); |
| 15655 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 15656 |
"use client"; |
| 15657 |
|
| 15658 |
// src/select.tsx |
| 15659 |
|
| 15660 |
|
| 15661 |
|
| 15662 |
|
| 15663 |
|
| 15664 |
|
| 15665 |
|
| 15666 |
|
| 15667 |
|
| 15668 |
|
| 15669 |
|
| 15670 |
|
| 15671 |
|
| 15672 |
|
| 15673 |
|
| 15674 |
|
| 15675 |
|
| 15676 |
|
| 15677 |
|
| 15678 |
|
| 15679 |
|
| 15680 |
|
| 15681 |
|
| 15682 |
|
| 15683 |
|
| 15684 |
var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"]; |
| 15685 |
var SELECTION_KEYS = [" ", "Enter"]; |
| 15686 |
var SELECT_NAME = "Select"; |
| 15687 |
var [Collection, useCollection, createCollectionScope] = (0,_radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_4__.createCollection)(SELECT_NAME); |
| 15688 |
var [createSelectContext, createSelectScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_6__.createContextScope)(SELECT_NAME, [ |
| 15689 |
createCollectionScope, |
| 15690 |
_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_12__.createPopperScope |
| 15691 |
]); |
| 15692 |
var usePopperScope = (0,_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_12__.createPopperScope)(); |
| 15693 |
var [SelectProvider, useSelectContext] = createSelectContext(SELECT_NAME); |
| 15694 |
var [SelectNativeOptionsProvider, useSelectNativeOptionsContext] = createSelectContext(SELECT_NAME); |
| 15695 |
var Select = (props) => { |
| 15696 |
const { |
| 15697 |
__scopeSelect, |
| 15698 |
children, |
| 15699 |
open: openProp, |
| 15700 |
defaultOpen, |
| 15701 |
onOpenChange, |
| 15702 |
value: valueProp, |
| 15703 |
defaultValue, |
| 15704 |
onValueChange, |
| 15705 |
dir, |
| 15706 |
name, |
| 15707 |
autoComplete, |
| 15708 |
disabled, |
| 15709 |
required, |
| 15710 |
form |
| 15711 |
} = props; |
| 15712 |
const popperScope = usePopperScope(__scopeSelect); |
| 15713 |
const [trigger, setTrigger] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 15714 |
const [valueNode, setValueNode] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 15715 |
const [valueNodeHasChildren, setValueNodeHasChildren] = react__WEBPACK_IMPORTED_MODULE_0__.useState(false); |
| 15716 |
const direction = (0,_radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_7__.useDirection)(dir); |
| 15717 |
const [open, setOpen] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_17__.useControllableState)({ |
| 15718 |
prop: openProp, |
| 15719 |
defaultProp: defaultOpen ?? false, |
| 15720 |
onChange: onOpenChange, |
| 15721 |
caller: SELECT_NAME |
| 15722 |
}); |
| 15723 |
const [value, setValue] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_17__.useControllableState)({ |
| 15724 |
prop: valueProp, |
| 15725 |
defaultProp: defaultValue, |
| 15726 |
onChange: onValueChange, |
| 15727 |
caller: SELECT_NAME |
| 15728 |
}); |
| 15729 |
const triggerPointerDownPosRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 15730 |
const isFormControl = trigger ? form || !!trigger.closest("form") : true; |
| 15731 |
const [nativeOptionsSet, setNativeOptionsSet] = react__WEBPACK_IMPORTED_MODULE_0__.useState(/* @__PURE__ */ new Set()); |
| 15732 |
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";"); |
| 15733 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_12__.Root, { ...popperScope, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)( |
| 15734 |
SelectProvider, |
| 15735 |
{ |
| 15736 |
required, |
| 15737 |
scope: __scopeSelect, |
| 15738 |
trigger, |
| 15739 |
onTriggerChange: setTrigger, |
| 15740 |
valueNode, |
| 15741 |
onValueNodeChange: setValueNode, |
| 15742 |
valueNodeHasChildren, |
| 15743 |
onValueNodeHasChildrenChange: setValueNodeHasChildren, |
| 15744 |
contentId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_11__.useId)(), |
| 15745 |
value, |
| 15746 |
onValueChange: setValue, |
| 15747 |
open, |
| 15748 |
onOpenChange: setOpen, |
| 15749 |
dir: direction, |
| 15750 |
triggerPointerDownPosRef, |
| 15751 |
disabled, |
| 15752 |
children: [ |
| 15753 |
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 15754 |
SelectNativeOptionsProvider, |
| 15755 |
{ |
| 15756 |
scope: props.__scopeSelect, |
| 15757 |
onNativeOptionAdd: react__WEBPACK_IMPORTED_MODULE_0__.useCallback((option) => { |
| 15758 |
setNativeOptionsSet((prev) => new Set(prev).add(option)); |
| 15759 |
}, []), |
| 15760 |
onNativeOptionRemove: react__WEBPACK_IMPORTED_MODULE_0__.useCallback((option) => { |
| 15761 |
setNativeOptionsSet((prev) => { |
| 15762 |
const optionsSet = new Set(prev); |
| 15763 |
optionsSet.delete(option); |
| 15764 |
return optionsSet; |
| 15765 |
}); |
| 15766 |
}, []), |
| 15767 |
children |
| 15768 |
} |
| 15769 |
) }), |
| 15770 |
isFormControl ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)( |
| 15771 |
SelectBubbleInput, |
| 15772 |
{ |
| 15773 |
"aria-hidden": true, |
| 15774 |
required, |
| 15775 |
tabIndex: -1, |
| 15776 |
name, |
| 15777 |
autoComplete, |
| 15778 |
value, |
| 15779 |
onChange: (event) => setValue(event.target.value), |
| 15780 |
disabled, |
| 15781 |
form, |
| 15782 |
children: [ |
| 15783 |
value === void 0 ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("option", { value: "" }) : null, |
| 15784 |
Array.from(nativeOptionsSet) |
| 15785 |
] |
| 15786 |
}, |
| 15787 |
nativeSelectKey |
| 15788 |
) : null |
| 15789 |
] |
| 15790 |
} |
| 15791 |
) }); |
| 15792 |
}; |
| 15793 |
Select.displayName = SELECT_NAME; |
| 15794 |
var TRIGGER_NAME = "SelectTrigger"; |
| 15795 |
var SelectTrigger = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 15796 |
(props, forwardedRef) => { |
| 15797 |
const { __scopeSelect, disabled = false, ...triggerProps } = props; |
| 15798 |
const popperScope = usePopperScope(__scopeSelect); |
| 15799 |
const context = useSelectContext(TRIGGER_NAME, __scopeSelect); |
| 15800 |
const isDisabled = context.disabled || disabled; |
| 15801 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)(forwardedRef, context.onTriggerChange); |
| 15802 |
const getItems = useCollection(__scopeSelect); |
| 15803 |
const pointerTypeRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef("touch"); |
| 15804 |
const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => { |
| 15805 |
const enabledItems = getItems().filter((item) => !item.disabled); |
| 15806 |
const currentItem = enabledItems.find((item) => item.value === context.value); |
| 15807 |
const nextItem = findNextItem(enabledItems, search, currentItem); |
| 15808 |
if (nextItem !== void 0) { |
| 15809 |
context.onValueChange(nextItem.value); |
| 15810 |
} |
| 15811 |
}); |
| 15812 |
const handleOpen = (pointerEvent) => { |
| 15813 |
if (!isDisabled) { |
| 15814 |
context.onOpenChange(true); |
| 15815 |
resetTypeahead(); |
| 15816 |
} |
| 15817 |
if (pointerEvent) { |
| 15818 |
context.triggerPointerDownPosRef.current = { |
| 15819 |
x: Math.round(pointerEvent.pageX), |
| 15820 |
y: Math.round(pointerEvent.pageY) |
| 15821 |
}; |
| 15822 |
} |
| 15823 |
}; |
| 15824 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_12__.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 15825 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_14__.Primitive.button, |
| 15826 |
{ |
| 15827 |
type: "button", |
| 15828 |
role: "combobox", |
| 15829 |
"aria-controls": context.contentId, |
| 15830 |
"aria-expanded": context.open, |
| 15831 |
"aria-required": context.required, |
| 15832 |
"aria-autocomplete": "none", |
| 15833 |
dir: context.dir, |
| 15834 |
"data-state": context.open ? "open" : "closed", |
| 15835 |
disabled: isDisabled, |
| 15836 |
"data-disabled": isDisabled ? "" : void 0, |
| 15837 |
"data-placeholder": shouldShowPlaceholder(context.value) ? "" : void 0, |
| 15838 |
...triggerProps, |
| 15839 |
ref: composedRefs, |
| 15840 |
onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(triggerProps.onClick, (event) => { |
| 15841 |
event.currentTarget.focus(); |
| 15842 |
if (pointerTypeRef.current !== "mouse") { |
| 15843 |
handleOpen(event); |
| 15844 |
} |
| 15845 |
}), |
| 15846 |
onPointerDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(triggerProps.onPointerDown, (event) => { |
| 15847 |
pointerTypeRef.current = event.pointerType; |
| 15848 |
const target = event.target; |
| 15849 |
if (target.hasPointerCapture(event.pointerId)) { |
| 15850 |
target.releasePointerCapture(event.pointerId); |
| 15851 |
} |
| 15852 |
if (event.button === 0 && event.ctrlKey === false && event.pointerType === "mouse") { |
| 15853 |
handleOpen(event); |
| 15854 |
event.preventDefault(); |
| 15855 |
} |
| 15856 |
}), |
| 15857 |
onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(triggerProps.onKeyDown, (event) => { |
| 15858 |
const isTypingAhead = searchRef.current !== ""; |
| 15859 |
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey; |
| 15860 |
if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key); |
| 15861 |
if (isTypingAhead && event.key === " ") return; |
| 15862 |
if (OPEN_KEYS.includes(event.key)) { |
| 15863 |
handleOpen(); |
| 15864 |
event.preventDefault(); |
| 15865 |
} |
| 15866 |
}) |
| 15867 |
} |
| 15868 |
) }); |
| 15869 |
} |
| 15870 |
); |
| 15871 |
SelectTrigger.displayName = TRIGGER_NAME; |
| 15872 |
var VALUE_NAME = "SelectValue"; |
| 15873 |
var SelectValue = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 15874 |
(props, forwardedRef) => { |
| 15875 |
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props; |
| 15876 |
const context = useSelectContext(VALUE_NAME, __scopeSelect); |
| 15877 |
const { onValueNodeHasChildrenChange } = context; |
| 15878 |
const hasChildren = children !== void 0; |
| 15879 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)(forwardedRef, context.onValueNodeChange); |
| 15880 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_18__.useLayoutEffect)(() => { |
| 15881 |
onValueNodeHasChildrenChange(hasChildren); |
| 15882 |
}, [onValueNodeHasChildrenChange, hasChildren]); |
| 15883 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 15884 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_14__.Primitive.span, |
| 15885 |
{ |
| 15886 |
...valueProps, |
| 15887 |
ref: composedRefs, |
| 15888 |
style: { pointerEvents: "none" }, |
| 15889 |
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.Fragment, { children: placeholder }) : children |
| 15890 |
} |
| 15891 |
); |
| 15892 |
} |
| 15893 |
); |
| 15894 |
SelectValue.displayName = VALUE_NAME; |
| 15895 |
var ICON_NAME = "SelectIcon"; |
| 15896 |
var SelectIcon = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 15897 |
(props, forwardedRef) => { |
| 15898 |
const { __scopeSelect, children, ...iconProps } = props; |
| 15899 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_14__.Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "\u25BC" }); |
| 15900 |
} |
| 15901 |
); |
| 15902 |
SelectIcon.displayName = ICON_NAME; |
| 15903 |
var PORTAL_NAME = "SelectPortal"; |
| 15904 |
var SelectPortal = (props) => { |
| 15905 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_13__.Portal, { asChild: true, ...props }); |
| 15906 |
}; |
| 15907 |
SelectPortal.displayName = PORTAL_NAME; |
| 15908 |
var CONTENT_NAME = "SelectContent"; |
| 15909 |
var SelectContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 15910 |
(props, forwardedRef) => { |
| 15911 |
const context = useSelectContext(CONTENT_NAME, props.__scopeSelect); |
| 15912 |
const [fragment, setFragment] = react__WEBPACK_IMPORTED_MODULE_0__.useState(); |
| 15913 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_18__.useLayoutEffect)(() => { |
| 15914 |
setFragment(new DocumentFragment()); |
| 15915 |
}, []); |
| 15916 |
if (!context.open) { |
| 15917 |
const frag = fragment; |
| 15918 |
return frag ? react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal( |
| 15919 |
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", { children: props.children }) }) }), |
| 15920 |
frag |
| 15921 |
) : null; |
| 15922 |
} |
| 15923 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(SelectContentImpl, { ...props, ref: forwardedRef }); |
| 15924 |
} |
| 15925 |
); |
| 15926 |
SelectContent.displayName = CONTENT_NAME; |
| 15927 |
var CONTENT_MARGIN = 10; |
| 15928 |
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME); |
| 15929 |
var CONTENT_IMPL_NAME = "SelectContentImpl"; |
| 15930 |
var Slot = (0,_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_15__.createSlot)("SelectContent.RemoveScroll"); |
| 15931 |
var SelectContentImpl = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 15932 |
(props, forwardedRef) => { |
| 15933 |
const { |
| 15934 |
__scopeSelect, |
| 15935 |
position = "item-aligned", |
| 15936 |
onCloseAutoFocus, |
| 15937 |
onEscapeKeyDown, |
| 15938 |
onPointerDownOutside, |
| 15939 |
// |
| 15940 |
// PopperContent props |
| 15941 |
side, |
| 15942 |
sideOffset, |
| 15943 |
align, |
| 15944 |
alignOffset, |
| 15945 |
arrowPadding, |
| 15946 |
collisionBoundary, |
| 15947 |
collisionPadding, |
| 15948 |
sticky, |
| 15949 |
hideWhenDetached, |
| 15950 |
avoidCollisions, |
| 15951 |
// |
| 15952 |
...contentProps |
| 15953 |
} = props; |
| 15954 |
const context = useSelectContext(CONTENT_NAME, __scopeSelect); |
| 15955 |
const [content, setContent] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 15956 |
const [viewport, setViewport] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 15957 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)(forwardedRef, (node) => setContent(node)); |
| 15958 |
const [selectedItem, setSelectedItem] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 15959 |
const [selectedItemText, setSelectedItemText] = react__WEBPACK_IMPORTED_MODULE_0__.useState( |
| 15960 |
null |
| 15961 |
); |
| 15962 |
const getItems = useCollection(__scopeSelect); |
| 15963 |
const [isPositioned, setIsPositioned] = react__WEBPACK_IMPORTED_MODULE_0__.useState(false); |
| 15964 |
const firstValidItemFoundRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); |
| 15965 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 15966 |
if (content) return (0,aria_hidden__WEBPACK_IMPORTED_MODULE_21__.hideOthers)(content); |
| 15967 |
}, [content]); |
| 15968 |
(0,_radix_ui_react_focus_guards__WEBPACK_IMPORTED_MODULE_9__.useFocusGuards)(); |
| 15969 |
const focusFirst = react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 15970 |
(candidates) => { |
| 15971 |
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current); |
| 15972 |
const [lastItem] = restItems.slice(-1); |
| 15973 |
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement; |
| 15974 |
for (const candidate of candidates) { |
| 15975 |
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return; |
| 15976 |
candidate?.scrollIntoView({ block: "nearest" }); |
| 15977 |
if (candidate === firstItem && viewport) viewport.scrollTop = 0; |
| 15978 |
if (candidate === lastItem && viewport) viewport.scrollTop = viewport.scrollHeight; |
| 15979 |
candidate?.focus(); |
| 15980 |
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return; |
| 15981 |
} |
| 15982 |
}, |
| 15983 |
[getItems, viewport] |
| 15984 |
); |
| 15985 |
const focusSelectedItem = react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 15986 |
() => focusFirst([selectedItem, content]), |
| 15987 |
[focusFirst, selectedItem, content] |
| 15988 |
); |
| 15989 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 15990 |
if (isPositioned) { |
| 15991 |
focusSelectedItem(); |
| 15992 |
} |
| 15993 |
}, [isPositioned, focusSelectedItem]); |
| 15994 |
const { onOpenChange, triggerPointerDownPosRef } = context; |
| 15995 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 15996 |
if (content) { |
| 15997 |
let pointerMoveDelta = { x: 0, y: 0 }; |
| 15998 |
const handlePointerMove = (event) => { |
| 15999 |
pointerMoveDelta = { |
| 16000 |
x: Math.abs(Math.round(event.pageX) - (triggerPointerDownPosRef.current?.x ?? 0)), |
| 16001 |
y: Math.abs(Math.round(event.pageY) - (triggerPointerDownPosRef.current?.y ?? 0)) |
| 16002 |
}; |
| 16003 |
}; |
| 16004 |
const handlePointerUp = (event) => { |
| 16005 |
if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) { |
| 16006 |
event.preventDefault(); |
| 16007 |
} else { |
| 16008 |
if (!content.contains(event.target)) { |
| 16009 |
onOpenChange(false); |
| 16010 |
} |
| 16011 |
} |
| 16012 |
document.removeEventListener("pointermove", handlePointerMove); |
| 16013 |
triggerPointerDownPosRef.current = null; |
| 16014 |
}; |
| 16015 |
if (triggerPointerDownPosRef.current !== null) { |
| 16016 |
document.addEventListener("pointermove", handlePointerMove); |
| 16017 |
document.addEventListener("pointerup", handlePointerUp, { capture: true, once: true }); |
| 16018 |
} |
| 16019 |
return () => { |
| 16020 |
document.removeEventListener("pointermove", handlePointerMove); |
| 16021 |
document.removeEventListener("pointerup", handlePointerUp, { capture: true }); |
| 16022 |
}; |
| 16023 |
} |
| 16024 |
}, [content, onOpenChange, triggerPointerDownPosRef]); |
| 16025 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 16026 |
const close = () => onOpenChange(false); |
| 16027 |
window.addEventListener("blur", close); |
| 16028 |
window.addEventListener("resize", close); |
| 16029 |
return () => { |
| 16030 |
window.removeEventListener("blur", close); |
| 16031 |
window.removeEventListener("resize", close); |
| 16032 |
}; |
| 16033 |
}, [onOpenChange]); |
| 16034 |
const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search) => { |
| 16035 |
const enabledItems = getItems().filter((item) => !item.disabled); |
| 16036 |
const currentItem = enabledItems.find((item) => item.ref.current === document.activeElement); |
| 16037 |
const nextItem = findNextItem(enabledItems, search, currentItem); |
| 16038 |
if (nextItem) { |
| 16039 |
setTimeout(() => nextItem.ref.current.focus()); |
| 16040 |
} |
| 16041 |
}); |
| 16042 |
const itemRefCallback = react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 16043 |
(node, value, disabled) => { |
| 16044 |
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled; |
| 16045 |
const isSelectedItem = context.value !== void 0 && context.value === value; |
| 16046 |
if (isSelectedItem || isFirstValidItem) { |
| 16047 |
setSelectedItem(node); |
| 16048 |
if (isFirstValidItem) firstValidItemFoundRef.current = true; |
| 16049 |
} |
| 16050 |
}, |
| 16051 |
[context.value] |
| 16052 |
); |
| 16053 |
const handleItemLeave = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => content?.focus(), [content]); |
| 16054 |
const itemTextRefCallback = react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 16055 |
(node, value, disabled) => { |
| 16056 |
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled; |
| 16057 |
const isSelectedItem = context.value !== void 0 && context.value === value; |
| 16058 |
if (isSelectedItem || isFirstValidItem) { |
| 16059 |
setSelectedItemText(node); |
| 16060 |
} |
| 16061 |
}, |
| 16062 |
[context.value] |
| 16063 |
); |
| 16064 |
const SelectPosition = position === "popper" ? SelectPopperPosition : SelectItemAlignedPosition; |
| 16065 |
const popperContentProps = SelectPosition === SelectPopperPosition ? { |
| 16066 |
side, |
| 16067 |
sideOffset, |
| 16068 |
align, |
| 16069 |
alignOffset, |
| 16070 |
arrowPadding, |
| 16071 |
collisionBoundary, |
| 16072 |
collisionPadding, |
| 16073 |
sticky, |
| 16074 |
hideWhenDetached, |
| 16075 |
avoidCollisions |
| 16076 |
} : {}; |
| 16077 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16078 |
SelectContentProvider, |
| 16079 |
{ |
| 16080 |
scope: __scopeSelect, |
| 16081 |
content, |
| 16082 |
viewport, |
| 16083 |
onViewportChange: setViewport, |
| 16084 |
itemRefCallback, |
| 16085 |
selectedItem, |
| 16086 |
onItemLeave: handleItemLeave, |
| 16087 |
itemTextRefCallback, |
| 16088 |
focusSelectedItem, |
| 16089 |
selectedItemText, |
| 16090 |
position, |
| 16091 |
isPositioned, |
| 16092 |
searchRef, |
| 16093 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(react_remove_scroll__WEBPACK_IMPORTED_MODULE_22__["default"], { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16094 |
_radix_ui_react_focus_scope__WEBPACK_IMPORTED_MODULE_10__.FocusScope, |
| 16095 |
{ |
| 16096 |
asChild: true, |
| 16097 |
trapped: context.open, |
| 16098 |
onMountAutoFocus: (event) => { |
| 16099 |
event.preventDefault(); |
| 16100 |
}, |
| 16101 |
onUnmountAutoFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(onCloseAutoFocus, (event) => { |
| 16102 |
context.trigger?.focus({ preventScroll: true }); |
| 16103 |
event.preventDefault(); |
| 16104 |
}), |
| 16105 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16106 |
_radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_8__.DismissableLayer, |
| 16107 |
{ |
| 16108 |
asChild: true, |
| 16109 |
disableOutsidePointerEvents: true, |
| 16110 |
onEscapeKeyDown, |
| 16111 |
onPointerDownOutside, |
| 16112 |
onFocusOutside: (event) => event.preventDefault(), |
| 16113 |
onDismiss: () => context.onOpenChange(false), |
| 16114 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16115 |
SelectPosition, |
| 16116 |
{ |
| 16117 |
role: "listbox", |
| 16118 |
id: context.contentId, |
| 16119 |
"data-state": context.open ? "open" : "closed", |
| 16120 |
dir: context.dir, |
| 16121 |
onContextMenu: (event) => event.preventDefault(), |
| 16122 |
...contentProps, |
| 16123 |
...popperContentProps, |
| 16124 |
onPlaced: () => setIsPositioned(true), |
| 16125 |
ref: composedRefs, |
| 16126 |
style: { |
| 16127 |
// flex layout so we can place the scroll buttons properly |
| 16128 |
display: "flex", |
| 16129 |
flexDirection: "column", |
| 16130 |
// reset the outline by default as the content MAY get focused |
| 16131 |
outline: "none", |
| 16132 |
...contentProps.style |
| 16133 |
}, |
| 16134 |
onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(contentProps.onKeyDown, (event) => { |
| 16135 |
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey; |
| 16136 |
if (event.key === "Tab") event.preventDefault(); |
| 16137 |
if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key); |
| 16138 |
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(event.key)) { |
| 16139 |
const items = getItems().filter((item) => !item.disabled); |
| 16140 |
let candidateNodes = items.map((item) => item.ref.current); |
| 16141 |
if (["ArrowUp", "End"].includes(event.key)) { |
| 16142 |
candidateNodes = candidateNodes.slice().reverse(); |
| 16143 |
} |
| 16144 |
if (["ArrowUp", "ArrowDown"].includes(event.key)) { |
| 16145 |
const currentElement = event.target; |
| 16146 |
const currentIndex = candidateNodes.indexOf(currentElement); |
| 16147 |
candidateNodes = candidateNodes.slice(currentIndex + 1); |
| 16148 |
} |
| 16149 |
setTimeout(() => focusFirst(candidateNodes)); |
| 16150 |
event.preventDefault(); |
| 16151 |
} |
| 16152 |
}) |
| 16153 |
} |
| 16154 |
) |
| 16155 |
} |
| 16156 |
) |
| 16157 |
} |
| 16158 |
) }) |
| 16159 |
} |
| 16160 |
); |
| 16161 |
} |
| 16162 |
); |
| 16163 |
SelectContentImpl.displayName = CONTENT_IMPL_NAME; |
| 16164 |
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition"; |
| 16165 |
var SelectItemAlignedPosition = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 16166 |
const { __scopeSelect, onPlaced, ...popperProps } = props; |
| 16167 |
const context = useSelectContext(CONTENT_NAME, __scopeSelect); |
| 16168 |
const contentContext = useSelectContentContext(CONTENT_NAME, __scopeSelect); |
| 16169 |
const [contentWrapper, setContentWrapper] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 16170 |
const [content, setContent] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 16171 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)(forwardedRef, (node) => setContent(node)); |
| 16172 |
const getItems = useCollection(__scopeSelect); |
| 16173 |
const shouldExpandOnScrollRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); |
| 16174 |
const shouldRepositionRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(true); |
| 16175 |
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext; |
| 16176 |
const position = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => { |
| 16177 |
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) { |
| 16178 |
const triggerRect = context.trigger.getBoundingClientRect(); |
| 16179 |
const contentRect = content.getBoundingClientRect(); |
| 16180 |
const valueNodeRect = context.valueNode.getBoundingClientRect(); |
| 16181 |
const itemTextRect = selectedItemText.getBoundingClientRect(); |
| 16182 |
if (context.dir !== "rtl") { |
| 16183 |
const itemTextOffset = itemTextRect.left - contentRect.left; |
| 16184 |
const left = valueNodeRect.left - itemTextOffset; |
| 16185 |
const leftDelta = triggerRect.left - left; |
| 16186 |
const minContentWidth = triggerRect.width + leftDelta; |
| 16187 |
const contentWidth = Math.max(minContentWidth, contentRect.width); |
| 16188 |
const rightEdge = window.innerWidth - CONTENT_MARGIN; |
| 16189 |
const clampedLeft = (0,_radix_ui_number__WEBPACK_IMPORTED_MODULE_2__.clamp)(left, [ |
| 16190 |
CONTENT_MARGIN, |
| 16191 |
// Prevents the content from going off the starting edge of the |
| 16192 |
// viewport. It may still go off the ending edge, but this can be |
| 16193 |
// controlled by the user since they may want to manage overflow in a |
| 16194 |
// specific way. |
| 16195 |
// https://github.com/radix-ui/primitives/issues/2049 |
| 16196 |
Math.max(CONTENT_MARGIN, rightEdge - contentWidth) |
| 16197 |
]); |
| 16198 |
contentWrapper.style.minWidth = minContentWidth + "px"; |
| 16199 |
contentWrapper.style.left = clampedLeft + "px"; |
| 16200 |
} else { |
| 16201 |
const itemTextOffset = contentRect.right - itemTextRect.right; |
| 16202 |
const right = window.innerWidth - valueNodeRect.right - itemTextOffset; |
| 16203 |
const rightDelta = window.innerWidth - triggerRect.right - right; |
| 16204 |
const minContentWidth = triggerRect.width + rightDelta; |
| 16205 |
const contentWidth = Math.max(minContentWidth, contentRect.width); |
| 16206 |
const leftEdge = window.innerWidth - CONTENT_MARGIN; |
| 16207 |
const clampedRight = (0,_radix_ui_number__WEBPACK_IMPORTED_MODULE_2__.clamp)(right, [ |
| 16208 |
CONTENT_MARGIN, |
| 16209 |
Math.max(CONTENT_MARGIN, leftEdge - contentWidth) |
| 16210 |
]); |
| 16211 |
contentWrapper.style.minWidth = minContentWidth + "px"; |
| 16212 |
contentWrapper.style.right = clampedRight + "px"; |
| 16213 |
} |
| 16214 |
const items = getItems(); |
| 16215 |
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2; |
| 16216 |
const itemsHeight = viewport.scrollHeight; |
| 16217 |
const contentStyles = window.getComputedStyle(content); |
| 16218 |
const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10); |
| 16219 |
const contentPaddingTop = parseInt(contentStyles.paddingTop, 10); |
| 16220 |
const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10); |
| 16221 |
const contentPaddingBottom = parseInt(contentStyles.paddingBottom, 10); |
| 16222 |
const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth; |
| 16223 |
const minContentHeight = Math.min(selectedItem.offsetHeight * 5, fullContentHeight); |
| 16224 |
const viewportStyles = window.getComputedStyle(viewport); |
| 16225 |
const viewportPaddingTop = parseInt(viewportStyles.paddingTop, 10); |
| 16226 |
const viewportPaddingBottom = parseInt(viewportStyles.paddingBottom, 10); |
| 16227 |
const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN; |
| 16228 |
const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle; |
| 16229 |
const selectedItemHalfHeight = selectedItem.offsetHeight / 2; |
| 16230 |
const itemOffsetMiddle = selectedItem.offsetTop + selectedItemHalfHeight; |
| 16231 |
const contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle; |
| 16232 |
const itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle; |
| 16233 |
const willAlignWithoutTopOverflow = contentTopToItemMiddle <= topEdgeToTriggerMiddle; |
| 16234 |
if (willAlignWithoutTopOverflow) { |
| 16235 |
const isLastItem = items.length > 0 && selectedItem === items[items.length - 1].ref.current; |
| 16236 |
contentWrapper.style.bottom = "0px"; |
| 16237 |
const viewportOffsetBottom = content.clientHeight - viewport.offsetTop - viewport.offsetHeight; |
| 16238 |
const clampedTriggerMiddleToBottomEdge = Math.max( |
| 16239 |
triggerMiddleToBottomEdge, |
| 16240 |
selectedItemHalfHeight + // viewport might have padding bottom, include it to avoid a scrollable viewport |
| 16241 |
(isLastItem ? viewportPaddingBottom : 0) + viewportOffsetBottom + contentBorderBottomWidth |
| 16242 |
); |
| 16243 |
const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge; |
| 16244 |
contentWrapper.style.height = height + "px"; |
| 16245 |
} else { |
| 16246 |
const isFirstItem = items.length > 0 && selectedItem === items[0].ref.current; |
| 16247 |
contentWrapper.style.top = "0px"; |
| 16248 |
const clampedTopEdgeToTriggerMiddle = Math.max( |
| 16249 |
topEdgeToTriggerMiddle, |
| 16250 |
contentBorderTopWidth + viewport.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport |
| 16251 |
(isFirstItem ? viewportPaddingTop : 0) + selectedItemHalfHeight |
| 16252 |
); |
| 16253 |
const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom; |
| 16254 |
contentWrapper.style.height = height + "px"; |
| 16255 |
viewport.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.offsetTop; |
| 16256 |
} |
| 16257 |
contentWrapper.style.margin = `${CONTENT_MARGIN}px 0`; |
| 16258 |
contentWrapper.style.minHeight = minContentHeight + "px"; |
| 16259 |
contentWrapper.style.maxHeight = availableHeight + "px"; |
| 16260 |
onPlaced?.(); |
| 16261 |
requestAnimationFrame(() => shouldExpandOnScrollRef.current = true); |
| 16262 |
} |
| 16263 |
}, [ |
| 16264 |
getItems, |
| 16265 |
context.trigger, |
| 16266 |
context.valueNode, |
| 16267 |
contentWrapper, |
| 16268 |
content, |
| 16269 |
viewport, |
| 16270 |
selectedItem, |
| 16271 |
selectedItemText, |
| 16272 |
context.dir, |
| 16273 |
onPlaced |
| 16274 |
]); |
| 16275 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_18__.useLayoutEffect)(() => position(), [position]); |
| 16276 |
const [contentZIndex, setContentZIndex] = react__WEBPACK_IMPORTED_MODULE_0__.useState(); |
| 16277 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_18__.useLayoutEffect)(() => { |
| 16278 |
if (content) setContentZIndex(window.getComputedStyle(content).zIndex); |
| 16279 |
}, [content]); |
| 16280 |
const handleScrollButtonChange = react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 16281 |
(node) => { |
| 16282 |
if (node && shouldRepositionRef.current === true) { |
| 16283 |
position(); |
| 16284 |
focusSelectedItem?.(); |
| 16285 |
shouldRepositionRef.current = false; |
| 16286 |
} |
| 16287 |
}, |
| 16288 |
[position, focusSelectedItem] |
| 16289 |
); |
| 16290 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16291 |
SelectViewportProvider, |
| 16292 |
{ |
| 16293 |
scope: __scopeSelect, |
| 16294 |
contentWrapper, |
| 16295 |
shouldExpandOnScrollRef, |
| 16296 |
onScrollButtonChange: handleScrollButtonChange, |
| 16297 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16298 |
"div", |
| 16299 |
{ |
| 16300 |
ref: setContentWrapper, |
| 16301 |
style: { |
| 16302 |
display: "flex", |
| 16303 |
flexDirection: "column", |
| 16304 |
position: "fixed", |
| 16305 |
zIndex: contentZIndex |
| 16306 |
}, |
| 16307 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16308 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_14__.Primitive.div, |
| 16309 |
{ |
| 16310 |
...popperProps, |
| 16311 |
ref: composedRefs, |
| 16312 |
style: { |
| 16313 |
// When we get the height of the content, it includes borders. If we were to set |
| 16314 |
// the height without having `boxSizing: 'border-box'` it would be too big. |
| 16315 |
boxSizing: "border-box", |
| 16316 |
// We need to ensure the content doesn't get taller than the wrapper |
| 16317 |
maxHeight: "100%", |
| 16318 |
...popperProps.style |
| 16319 |
} |
| 16320 |
} |
| 16321 |
) |
| 16322 |
} |
| 16323 |
) |
| 16324 |
} |
| 16325 |
); |
| 16326 |
}); |
| 16327 |
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME; |
| 16328 |
var POPPER_POSITION_NAME = "SelectPopperPosition"; |
| 16329 |
var SelectPopperPosition = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 16330 |
const { |
| 16331 |
__scopeSelect, |
| 16332 |
align = "start", |
| 16333 |
collisionPadding = CONTENT_MARGIN, |
| 16334 |
...popperProps |
| 16335 |
} = props; |
| 16336 |
const popperScope = usePopperScope(__scopeSelect); |
| 16337 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16338 |
_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_12__.Content, |
| 16339 |
{ |
| 16340 |
...popperScope, |
| 16341 |
...popperProps, |
| 16342 |
ref: forwardedRef, |
| 16343 |
align, |
| 16344 |
collisionPadding, |
| 16345 |
style: { |
| 16346 |
// Ensure border-box for floating-ui calculations |
| 16347 |
boxSizing: "border-box", |
| 16348 |
...popperProps.style, |
| 16349 |
// re-namespace exposed content custom properties |
| 16350 |
...{ |
| 16351 |
"--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)", |
| 16352 |
"--radix-select-content-available-width": "var(--radix-popper-available-width)", |
| 16353 |
"--radix-select-content-available-height": "var(--radix-popper-available-height)", |
| 16354 |
"--radix-select-trigger-width": "var(--radix-popper-anchor-width)", |
| 16355 |
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)" |
| 16356 |
} |
| 16357 |
} |
| 16358 |
} |
| 16359 |
); |
| 16360 |
}); |
| 16361 |
SelectPopperPosition.displayName = POPPER_POSITION_NAME; |
| 16362 |
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME, {}); |
| 16363 |
var VIEWPORT_NAME = "SelectViewport"; |
| 16364 |
var SelectViewport = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 16365 |
(props, forwardedRef) => { |
| 16366 |
const { __scopeSelect, nonce, ...viewportProps } = props; |
| 16367 |
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect); |
| 16368 |
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect); |
| 16369 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)(forwardedRef, contentContext.onViewportChange); |
| 16370 |
const prevScrollTopRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(0); |
| 16371 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.Fragment, { children: [ |
| 16372 |
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16373 |
"style", |
| 16374 |
{ |
| 16375 |
dangerouslySetInnerHTML: { |
| 16376 |
__html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}` |
| 16377 |
}, |
| 16378 |
nonce |
| 16379 |
} |
| 16380 |
), |
| 16381 |
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16382 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_14__.Primitive.div, |
| 16383 |
{ |
| 16384 |
"data-radix-select-viewport": "", |
| 16385 |
role: "presentation", |
| 16386 |
...viewportProps, |
| 16387 |
ref: composedRefs, |
| 16388 |
style: { |
| 16389 |
// we use position: 'relative' here on the `viewport` so that when we call |
| 16390 |
// `selectedItem.offsetTop` in calculations, the offset is relative to the viewport |
| 16391 |
// (independent of the scrollUpButton). |
| 16392 |
position: "relative", |
| 16393 |
flex: 1, |
| 16394 |
// Viewport should only be scrollable in the vertical direction. |
| 16395 |
// This won't work in vertical writing modes, so we'll need to |
| 16396 |
// revisit this if/when that is supported |
| 16397 |
// https://developer.chrome.com/blog/vertical-form-controls |
| 16398 |
overflow: "hidden auto", |
| 16399 |
...viewportProps.style |
| 16400 |
}, |
| 16401 |
onScroll: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(viewportProps.onScroll, (event) => { |
| 16402 |
const viewport = event.currentTarget; |
| 16403 |
const { contentWrapper, shouldExpandOnScrollRef } = viewportContext; |
| 16404 |
if (shouldExpandOnScrollRef?.current && contentWrapper) { |
| 16405 |
const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop); |
| 16406 |
if (scrolledBy > 0) { |
| 16407 |
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2; |
| 16408 |
const cssMinHeight = parseFloat(contentWrapper.style.minHeight); |
| 16409 |
const cssHeight = parseFloat(contentWrapper.style.height); |
| 16410 |
const prevHeight = Math.max(cssMinHeight, cssHeight); |
| 16411 |
if (prevHeight < availableHeight) { |
| 16412 |
const nextHeight = prevHeight + scrolledBy; |
| 16413 |
const clampedNextHeight = Math.min(availableHeight, nextHeight); |
| 16414 |
const heightDiff = nextHeight - clampedNextHeight; |
| 16415 |
contentWrapper.style.height = clampedNextHeight + "px"; |
| 16416 |
if (contentWrapper.style.bottom === "0px") { |
| 16417 |
viewport.scrollTop = heightDiff > 0 ? heightDiff : 0; |
| 16418 |
contentWrapper.style.justifyContent = "flex-end"; |
| 16419 |
} |
| 16420 |
} |
| 16421 |
} |
| 16422 |
} |
| 16423 |
prevScrollTopRef.current = viewport.scrollTop; |
| 16424 |
}) |
| 16425 |
} |
| 16426 |
) }) |
| 16427 |
] }); |
| 16428 |
} |
| 16429 |
); |
| 16430 |
SelectViewport.displayName = VIEWPORT_NAME; |
| 16431 |
var GROUP_NAME = "SelectGroup"; |
| 16432 |
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME); |
| 16433 |
var SelectGroup = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 16434 |
(props, forwardedRef) => { |
| 16435 |
const { __scopeSelect, ...groupProps } = props; |
| 16436 |
const groupId = (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_11__.useId)(); |
| 16437 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_14__.Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) }); |
| 16438 |
} |
| 16439 |
); |
| 16440 |
SelectGroup.displayName = GROUP_NAME; |
| 16441 |
var LABEL_NAME = "SelectLabel"; |
| 16442 |
var SelectLabel = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 16443 |
(props, forwardedRef) => { |
| 16444 |
const { __scopeSelect, ...labelProps } = props; |
| 16445 |
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect); |
| 16446 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_14__.Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef }); |
| 16447 |
} |
| 16448 |
); |
| 16449 |
SelectLabel.displayName = LABEL_NAME; |
| 16450 |
var ITEM_NAME = "SelectItem"; |
| 16451 |
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME); |
| 16452 |
var SelectItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 16453 |
(props, forwardedRef) => { |
| 16454 |
const { |
| 16455 |
__scopeSelect, |
| 16456 |
value, |
| 16457 |
disabled = false, |
| 16458 |
textValue: textValueProp, |
| 16459 |
...itemProps |
| 16460 |
} = props; |
| 16461 |
const context = useSelectContext(ITEM_NAME, __scopeSelect); |
| 16462 |
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect); |
| 16463 |
const isSelected = context.value === value; |
| 16464 |
const [textValue, setTextValue] = react__WEBPACK_IMPORTED_MODULE_0__.useState(textValueProp ?? ""); |
| 16465 |
const [isFocused, setIsFocused] = react__WEBPACK_IMPORTED_MODULE_0__.useState(false); |
| 16466 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)( |
| 16467 |
forwardedRef, |
| 16468 |
(node) => contentContext.itemRefCallback?.(node, value, disabled) |
| 16469 |
); |
| 16470 |
const textId = (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_11__.useId)(); |
| 16471 |
const pointerTypeRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef("touch"); |
| 16472 |
const handleSelect = () => { |
| 16473 |
if (!disabled) { |
| 16474 |
context.onValueChange(value); |
| 16475 |
context.onOpenChange(false); |
| 16476 |
} |
| 16477 |
}; |
| 16478 |
if (value === "") { |
| 16479 |
throw new Error( |
| 16480 |
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder." |
| 16481 |
); |
| 16482 |
} |
| 16483 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16484 |
SelectItemContextProvider, |
| 16485 |
{ |
| 16486 |
scope: __scopeSelect, |
| 16487 |
value, |
| 16488 |
disabled, |
| 16489 |
textId, |
| 16490 |
isSelected, |
| 16491 |
onItemTextChange: react__WEBPACK_IMPORTED_MODULE_0__.useCallback((node) => { |
| 16492 |
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim()); |
| 16493 |
}, []), |
| 16494 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16495 |
Collection.ItemSlot, |
| 16496 |
{ |
| 16497 |
scope: __scopeSelect, |
| 16498 |
value, |
| 16499 |
disabled, |
| 16500 |
textValue, |
| 16501 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16502 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_14__.Primitive.div, |
| 16503 |
{ |
| 16504 |
role: "option", |
| 16505 |
"aria-labelledby": textId, |
| 16506 |
"data-highlighted": isFocused ? "" : void 0, |
| 16507 |
"aria-selected": isSelected && isFocused, |
| 16508 |
"data-state": isSelected ? "checked" : "unchecked", |
| 16509 |
"aria-disabled": disabled || void 0, |
| 16510 |
"data-disabled": disabled ? "" : void 0, |
| 16511 |
tabIndex: disabled ? void 0 : -1, |
| 16512 |
...itemProps, |
| 16513 |
ref: composedRefs, |
| 16514 |
onFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(itemProps.onFocus, () => setIsFocused(true)), |
| 16515 |
onBlur: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(itemProps.onBlur, () => setIsFocused(false)), |
| 16516 |
onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(itemProps.onClick, () => { |
| 16517 |
if (pointerTypeRef.current !== "mouse") handleSelect(); |
| 16518 |
}), |
| 16519 |
onPointerUp: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(itemProps.onPointerUp, () => { |
| 16520 |
if (pointerTypeRef.current === "mouse") handleSelect(); |
| 16521 |
}), |
| 16522 |
onPointerDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(itemProps.onPointerDown, (event) => { |
| 16523 |
pointerTypeRef.current = event.pointerType; |
| 16524 |
}), |
| 16525 |
onPointerMove: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(itemProps.onPointerMove, (event) => { |
| 16526 |
pointerTypeRef.current = event.pointerType; |
| 16527 |
if (disabled) { |
| 16528 |
contentContext.onItemLeave?.(); |
| 16529 |
} else if (pointerTypeRef.current === "mouse") { |
| 16530 |
event.currentTarget.focus({ preventScroll: true }); |
| 16531 |
} |
| 16532 |
}), |
| 16533 |
onPointerLeave: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(itemProps.onPointerLeave, (event) => { |
| 16534 |
if (event.currentTarget === document.activeElement) { |
| 16535 |
contentContext.onItemLeave?.(); |
| 16536 |
} |
| 16537 |
}), |
| 16538 |
onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(itemProps.onKeyDown, (event) => { |
| 16539 |
const isTypingAhead = contentContext.searchRef?.current !== ""; |
| 16540 |
if (isTypingAhead && event.key === " ") return; |
| 16541 |
if (SELECTION_KEYS.includes(event.key)) handleSelect(); |
| 16542 |
if (event.key === " ") event.preventDefault(); |
| 16543 |
}) |
| 16544 |
} |
| 16545 |
) |
| 16546 |
} |
| 16547 |
) |
| 16548 |
} |
| 16549 |
); |
| 16550 |
} |
| 16551 |
); |
| 16552 |
SelectItem.displayName = ITEM_NAME; |
| 16553 |
var ITEM_TEXT_NAME = "SelectItemText"; |
| 16554 |
var SelectItemText = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 16555 |
(props, forwardedRef) => { |
| 16556 |
const { __scopeSelect, className, style, ...itemTextProps } = props; |
| 16557 |
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect); |
| 16558 |
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect); |
| 16559 |
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect); |
| 16560 |
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect); |
| 16561 |
const [itemTextNode, setItemTextNode] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 16562 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)( |
| 16563 |
forwardedRef, |
| 16564 |
(node) => setItemTextNode(node), |
| 16565 |
itemContext.onItemTextChange, |
| 16566 |
(node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled) |
| 16567 |
); |
| 16568 |
const textContent = itemTextNode?.textContent; |
| 16569 |
const nativeOption = react__WEBPACK_IMPORTED_MODULE_0__.useMemo( |
| 16570 |
() => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), |
| 16571 |
[itemContext.disabled, itemContext.value, textContent] |
| 16572 |
); |
| 16573 |
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext; |
| 16574 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_18__.useLayoutEffect)(() => { |
| 16575 |
onNativeOptionAdd(nativeOption); |
| 16576 |
return () => onNativeOptionRemove(nativeOption); |
| 16577 |
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]); |
| 16578 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.Fragment, { children: [ |
| 16579 |
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_14__.Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }), |
| 16580 |
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal(itemTextProps.children, context.valueNode) : null |
| 16581 |
] }); |
| 16582 |
} |
| 16583 |
); |
| 16584 |
SelectItemText.displayName = ITEM_TEXT_NAME; |
| 16585 |
var ITEM_INDICATOR_NAME = "SelectItemIndicator"; |
| 16586 |
var SelectItemIndicator = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 16587 |
(props, forwardedRef) => { |
| 16588 |
const { __scopeSelect, ...itemIndicatorProps } = props; |
| 16589 |
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect); |
| 16590 |
return itemContext.isSelected ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_14__.Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null; |
| 16591 |
} |
| 16592 |
); |
| 16593 |
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME; |
| 16594 |
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton"; |
| 16595 |
var SelectScrollUpButton = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 16596 |
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect); |
| 16597 |
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect); |
| 16598 |
const [canScrollUp, setCanScrollUp] = react__WEBPACK_IMPORTED_MODULE_0__.useState(false); |
| 16599 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)(forwardedRef, viewportContext.onScrollButtonChange); |
| 16600 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_18__.useLayoutEffect)(() => { |
| 16601 |
if (contentContext.viewport && contentContext.isPositioned) { |
| 16602 |
let handleScroll2 = function() { |
| 16603 |
const canScrollUp2 = viewport.scrollTop > 0; |
| 16604 |
setCanScrollUp(canScrollUp2); |
| 16605 |
}; |
| 16606 |
var handleScroll = handleScroll2; |
| 16607 |
const viewport = contentContext.viewport; |
| 16608 |
handleScroll2(); |
| 16609 |
viewport.addEventListener("scroll", handleScroll2); |
| 16610 |
return () => viewport.removeEventListener("scroll", handleScroll2); |
| 16611 |
} |
| 16612 |
}, [contentContext.viewport, contentContext.isPositioned]); |
| 16613 |
return canScrollUp ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16614 |
SelectScrollButtonImpl, |
| 16615 |
{ |
| 16616 |
...props, |
| 16617 |
ref: composedRefs, |
| 16618 |
onAutoScroll: () => { |
| 16619 |
const { viewport, selectedItem } = contentContext; |
| 16620 |
if (viewport && selectedItem) { |
| 16621 |
viewport.scrollTop = viewport.scrollTop - selectedItem.offsetHeight; |
| 16622 |
} |
| 16623 |
} |
| 16624 |
} |
| 16625 |
) : null; |
| 16626 |
}); |
| 16627 |
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME; |
| 16628 |
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton"; |
| 16629 |
var SelectScrollDownButton = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 16630 |
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect); |
| 16631 |
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect); |
| 16632 |
const [canScrollDown, setCanScrollDown] = react__WEBPACK_IMPORTED_MODULE_0__.useState(false); |
| 16633 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)(forwardedRef, viewportContext.onScrollButtonChange); |
| 16634 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_18__.useLayoutEffect)(() => { |
| 16635 |
if (contentContext.viewport && contentContext.isPositioned) { |
| 16636 |
let handleScroll2 = function() { |
| 16637 |
const maxScroll = viewport.scrollHeight - viewport.clientHeight; |
| 16638 |
const canScrollDown2 = Math.ceil(viewport.scrollTop) < maxScroll; |
| 16639 |
setCanScrollDown(canScrollDown2); |
| 16640 |
}; |
| 16641 |
var handleScroll = handleScroll2; |
| 16642 |
const viewport = contentContext.viewport; |
| 16643 |
handleScroll2(); |
| 16644 |
viewport.addEventListener("scroll", handleScroll2); |
| 16645 |
return () => viewport.removeEventListener("scroll", handleScroll2); |
| 16646 |
} |
| 16647 |
}, [contentContext.viewport, contentContext.isPositioned]); |
| 16648 |
return canScrollDown ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16649 |
SelectScrollButtonImpl, |
| 16650 |
{ |
| 16651 |
...props, |
| 16652 |
ref: composedRefs, |
| 16653 |
onAutoScroll: () => { |
| 16654 |
const { viewport, selectedItem } = contentContext; |
| 16655 |
if (viewport && selectedItem) { |
| 16656 |
viewport.scrollTop = viewport.scrollTop + selectedItem.offsetHeight; |
| 16657 |
} |
| 16658 |
} |
| 16659 |
} |
| 16660 |
) : null; |
| 16661 |
}); |
| 16662 |
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME; |
| 16663 |
var SelectScrollButtonImpl = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 16664 |
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props; |
| 16665 |
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect); |
| 16666 |
const autoScrollTimerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 16667 |
const getItems = useCollection(__scopeSelect); |
| 16668 |
const clearAutoScrollTimer = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => { |
| 16669 |
if (autoScrollTimerRef.current !== null) { |
| 16670 |
window.clearInterval(autoScrollTimerRef.current); |
| 16671 |
autoScrollTimerRef.current = null; |
| 16672 |
} |
| 16673 |
}, []); |
| 16674 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 16675 |
return () => clearAutoScrollTimer(); |
| 16676 |
}, [clearAutoScrollTimer]); |
| 16677 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_18__.useLayoutEffect)(() => { |
| 16678 |
const activeItem = getItems().find((item) => item.ref.current === document.activeElement); |
| 16679 |
activeItem?.ref.current?.scrollIntoView({ block: "nearest" }); |
| 16680 |
}, [getItems]); |
| 16681 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16682 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_14__.Primitive.div, |
| 16683 |
{ |
| 16684 |
"aria-hidden": true, |
| 16685 |
...scrollIndicatorProps, |
| 16686 |
ref: forwardedRef, |
| 16687 |
style: { flexShrink: 0, ...scrollIndicatorProps.style }, |
| 16688 |
onPointerDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(scrollIndicatorProps.onPointerDown, () => { |
| 16689 |
if (autoScrollTimerRef.current === null) { |
| 16690 |
autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50); |
| 16691 |
} |
| 16692 |
}), |
| 16693 |
onPointerMove: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(scrollIndicatorProps.onPointerMove, () => { |
| 16694 |
contentContext.onItemLeave?.(); |
| 16695 |
if (autoScrollTimerRef.current === null) { |
| 16696 |
autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50); |
| 16697 |
} |
| 16698 |
}), |
| 16699 |
onPointerLeave: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_3__.composeEventHandlers)(scrollIndicatorProps.onPointerLeave, () => { |
| 16700 |
clearAutoScrollTimer(); |
| 16701 |
}) |
| 16702 |
} |
| 16703 |
); |
| 16704 |
}); |
| 16705 |
var SEPARATOR_NAME = "SelectSeparator"; |
| 16706 |
var SelectSeparator = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 16707 |
(props, forwardedRef) => { |
| 16708 |
const { __scopeSelect, ...separatorProps } = props; |
| 16709 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_14__.Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef }); |
| 16710 |
} |
| 16711 |
); |
| 16712 |
SelectSeparator.displayName = SEPARATOR_NAME; |
| 16713 |
var ARROW_NAME = "SelectArrow"; |
| 16714 |
var SelectArrow = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 16715 |
(props, forwardedRef) => { |
| 16716 |
const { __scopeSelect, ...arrowProps } = props; |
| 16717 |
const popperScope = usePopperScope(__scopeSelect); |
| 16718 |
const context = useSelectContext(ARROW_NAME, __scopeSelect); |
| 16719 |
const contentContext = useSelectContentContext(ARROW_NAME, __scopeSelect); |
| 16720 |
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_12__.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null; |
| 16721 |
} |
| 16722 |
); |
| 16723 |
SelectArrow.displayName = ARROW_NAME; |
| 16724 |
var BUBBLE_INPUT_NAME = "SelectBubbleInput"; |
| 16725 |
var SelectBubbleInput = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 16726 |
({ __scopeSelect, value, ...props }, forwardedRef) => { |
| 16727 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 16728 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)(forwardedRef, ref); |
| 16729 |
const prevValue = (0,_radix_ui_react_use_previous__WEBPACK_IMPORTED_MODULE_19__.usePrevious)(value); |
| 16730 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 16731 |
const select = ref.current; |
| 16732 |
if (!select) return; |
| 16733 |
const selectProto = window.HTMLSelectElement.prototype; |
| 16734 |
const descriptor = Object.getOwnPropertyDescriptor( |
| 16735 |
selectProto, |
| 16736 |
"value" |
| 16737 |
); |
| 16738 |
const setValue = descriptor.set; |
| 16739 |
if (prevValue !== value && setValue) { |
| 16740 |
const event = new Event("change", { bubbles: true }); |
| 16741 |
setValue.call(select, value); |
| 16742 |
select.dispatchEvent(event); |
| 16743 |
} |
| 16744 |
}, [prevValue, value]); |
| 16745 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)( |
| 16746 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_14__.Primitive.select, |
| 16747 |
{ |
| 16748 |
...props, |
| 16749 |
style: { ..._radix_ui_react_visually_hidden__WEBPACK_IMPORTED_MODULE_20__.VISUALLY_HIDDEN_STYLES, ...props.style }, |
| 16750 |
ref: composedRefs, |
| 16751 |
defaultValue: value |
| 16752 |
} |
| 16753 |
); |
| 16754 |
} |
| 16755 |
); |
| 16756 |
SelectBubbleInput.displayName = BUBBLE_INPUT_NAME; |
| 16757 |
function shouldShowPlaceholder(value) { |
| 16758 |
return value === "" || value === void 0; |
| 16759 |
} |
| 16760 |
function useTypeaheadSearch(onSearchChange) { |
| 16761 |
const handleSearchChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_16__.useCallbackRef)(onSearchChange); |
| 16762 |
const searchRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(""); |
| 16763 |
const timerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(0); |
| 16764 |
const handleTypeaheadSearch = react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 16765 |
(key) => { |
| 16766 |
const search = searchRef.current + key; |
| 16767 |
handleSearchChange(search); |
| 16768 |
(function updateSearch(value) { |
| 16769 |
searchRef.current = value; |
| 16770 |
window.clearTimeout(timerRef.current); |
| 16771 |
if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3); |
| 16772 |
})(search); |
| 16773 |
}, |
| 16774 |
[handleSearchChange] |
| 16775 |
); |
| 16776 |
const resetTypeahead = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => { |
| 16777 |
searchRef.current = ""; |
| 16778 |
window.clearTimeout(timerRef.current); |
| 16779 |
}, []); |
| 16780 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 16781 |
return () => window.clearTimeout(timerRef.current); |
| 16782 |
}, []); |
| 16783 |
return [searchRef, handleTypeaheadSearch, resetTypeahead]; |
| 16784 |
} |
| 16785 |
function findNextItem(items, search, currentItem) { |
| 16786 |
const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]); |
| 16787 |
const normalizedSearch = isRepeated ? search[0] : search; |
| 16788 |
const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1; |
| 16789 |
let wrappedItems = wrapArray(items, Math.max(currentItemIndex, 0)); |
| 16790 |
const excludeCurrentItem = normalizedSearch.length === 1; |
| 16791 |
if (excludeCurrentItem) wrappedItems = wrappedItems.filter((v) => v !== currentItem); |
| 16792 |
const nextItem = wrappedItems.find( |
| 16793 |
(item) => item.textValue.toLowerCase().startsWith(normalizedSearch.toLowerCase()) |
| 16794 |
); |
| 16795 |
return nextItem !== currentItem ? nextItem : void 0; |
| 16796 |
} |
| 16797 |
function wrapArray(array, startIndex) { |
| 16798 |
return array.map((_, index) => array[(startIndex + index) % array.length]); |
| 16799 |
} |
| 16800 |
var Root2 = Select; |
| 16801 |
var Trigger = SelectTrigger; |
| 16802 |
var Value = SelectValue; |
| 16803 |
var Icon = SelectIcon; |
| 16804 |
var Portal = SelectPortal; |
| 16805 |
var Content2 = SelectContent; |
| 16806 |
var Viewport = SelectViewport; |
| 16807 |
var Group = SelectGroup; |
| 16808 |
var Label = SelectLabel; |
| 16809 |
var Item = SelectItem; |
| 16810 |
var ItemText = SelectItemText; |
| 16811 |
var ItemIndicator = SelectItemIndicator; |
| 16812 |
var ScrollUpButton = SelectScrollUpButton; |
| 16813 |
var ScrollDownButton = SelectScrollDownButton; |
| 16814 |
var Separator = SelectSeparator; |
| 16815 |
var Arrow2 = SelectArrow; |
| 16816 |
|
| 16817 |
//# sourceMappingURL=index.mjs.map |
| 16818 |
|
| 16819 |
|
| 16820 |
/***/ }, |
| 16821 |
|
| 16822 |
/***/ "./node_modules/@radix-ui/react-slot/dist/index.mjs" |
| 16823 |
/*!**********************************************************!*\ |
| 16824 |
!*** ./node_modules/@radix-ui/react-slot/dist/index.mjs ***! |
| 16825 |
\**********************************************************/ |
| 16826 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 16827 |
|
| 16828 |
__webpack_require__.r(__webpack_exports__); |
| 16829 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 16830 |
/* harmony export */ Root: () => (/* binding */ Slot), |
| 16831 |
/* harmony export */ Slot: () => (/* binding */ Slot), |
| 16832 |
/* harmony export */ Slottable: () => (/* binding */ Slottable), |
| 16833 |
/* harmony export */ createSlot: () => (/* binding */ createSlot), |
| 16834 |
/* harmony export */ createSlottable: () => (/* binding */ createSlottable) |
| 16835 |
/* harmony export */ }); |
| 16836 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 16837 |
/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ "./node_modules/@radix-ui/react-compose-refs/dist/index.mjs"); |
| 16838 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 16839 |
// src/slot.tsx |
| 16840 |
|
| 16841 |
|
| 16842 |
|
| 16843 |
// @__NO_SIDE_EFFECTS__ |
| 16844 |
function createSlot(ownerName) { |
| 16845 |
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName); |
| 16846 |
const Slot2 = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 16847 |
const { children, ...slotProps } = props; |
| 16848 |
const childrenArray = react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children); |
| 16849 |
const slottable = childrenArray.find(isSlottable); |
| 16850 |
if (slottable) { |
| 16851 |
const newElement = slottable.props.children; |
| 16852 |
const newChildren = childrenArray.map((child) => { |
| 16853 |
if (child === slottable) { |
| 16854 |
if (react__WEBPACK_IMPORTED_MODULE_0__.Children.count(newElement) > 1) return react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null); |
| 16855 |
return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? newElement.props.children : null; |
| 16856 |
} else { |
| 16857 |
return child; |
| 16858 |
} |
| 16859 |
}); |
| 16860 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(newElement, void 0, newChildren) : null }); |
| 16861 |
} |
| 16862 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children }); |
| 16863 |
}); |
| 16864 |
Slot2.displayName = `${ownerName}.Slot`; |
| 16865 |
return Slot2; |
| 16866 |
} |
| 16867 |
var Slot = /* @__PURE__ */ createSlot("Slot"); |
| 16868 |
// @__NO_SIDE_EFFECTS__ |
| 16869 |
function createSlotClone(ownerName) { |
| 16870 |
const SlotClone = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 16871 |
const { children, ...slotProps } = props; |
| 16872 |
if (react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(children)) { |
| 16873 |
const childrenRef = getElementRef(children); |
| 16874 |
const props2 = mergeProps(slotProps, children.props); |
| 16875 |
if (children.type !== react__WEBPACK_IMPORTED_MODULE_0__.Fragment) { |
| 16876 |
props2.ref = forwardedRef ? (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_1__.composeRefs)(forwardedRef, childrenRef) : childrenRef; |
| 16877 |
} |
| 16878 |
return react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, props2); |
| 16879 |
} |
| 16880 |
return react__WEBPACK_IMPORTED_MODULE_0__.Children.count(children) > 1 ? react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null) : null; |
| 16881 |
}); |
| 16882 |
SlotClone.displayName = `${ownerName}.SlotClone`; |
| 16883 |
return SlotClone; |
| 16884 |
} |
| 16885 |
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable"); |
| 16886 |
// @__NO_SIDE_EFFECTS__ |
| 16887 |
function createSlottable(ownerName) { |
| 16888 |
const Slottable2 = ({ children }) => { |
| 16889 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment, { children }); |
| 16890 |
}; |
| 16891 |
Slottable2.displayName = `${ownerName}.Slottable`; |
| 16892 |
Slottable2.__radixId = SLOTTABLE_IDENTIFIER; |
| 16893 |
return Slottable2; |
| 16894 |
} |
| 16895 |
var Slottable = /* @__PURE__ */ createSlottable("Slottable"); |
| 16896 |
function isSlottable(child) { |
| 16897 |
return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER; |
| 16898 |
} |
| 16899 |
function mergeProps(slotProps, childProps) { |
| 16900 |
const overrideProps = { ...childProps }; |
| 16901 |
for (const propName in childProps) { |
| 16902 |
const slotPropValue = slotProps[propName]; |
| 16903 |
const childPropValue = childProps[propName]; |
| 16904 |
const isHandler = /^on[A-Z]/.test(propName); |
| 16905 |
if (isHandler) { |
| 16906 |
if (slotPropValue && childPropValue) { |
| 16907 |
overrideProps[propName] = (...args) => { |
| 16908 |
const result = childPropValue(...args); |
| 16909 |
slotPropValue(...args); |
| 16910 |
return result; |
| 16911 |
}; |
| 16912 |
} else if (slotPropValue) { |
| 16913 |
overrideProps[propName] = slotPropValue; |
| 16914 |
} |
| 16915 |
} else if (propName === "style") { |
| 16916 |
overrideProps[propName] = { ...slotPropValue, ...childPropValue }; |
| 16917 |
} else if (propName === "className") { |
| 16918 |
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" "); |
| 16919 |
} |
| 16920 |
} |
| 16921 |
return { ...slotProps, ...overrideProps }; |
| 16922 |
} |
| 16923 |
function getElementRef(element) { |
| 16924 |
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get; |
| 16925 |
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; |
| 16926 |
if (mayWarn) { |
| 16927 |
return element.ref; |
| 16928 |
} |
| 16929 |
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get; |
| 16930 |
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; |
| 16931 |
if (mayWarn) { |
| 16932 |
return element.props.ref; |
| 16933 |
} |
| 16934 |
return element.props.ref || element.ref; |
| 16935 |
} |
| 16936 |
|
| 16937 |
//# sourceMappingURL=index.mjs.map |
| 16938 |
|
| 16939 |
|
| 16940 |
/***/ }, |
| 16941 |
|
| 16942 |
/***/ "./node_modules/@radix-ui/react-switch/dist/index.mjs" |
| 16943 |
/*!************************************************************!*\ |
| 16944 |
!*** ./node_modules/@radix-ui/react-switch/dist/index.mjs ***! |
| 16945 |
\************************************************************/ |
| 16946 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 16947 |
|
| 16948 |
__webpack_require__.r(__webpack_exports__); |
| 16949 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 16950 |
/* harmony export */ Root: () => (/* binding */ Root), |
| 16951 |
/* harmony export */ Switch: () => (/* binding */ Switch), |
| 16952 |
/* harmony export */ SwitchThumb: () => (/* binding */ SwitchThumb), |
| 16953 |
/* harmony export */ Thumb: () => (/* binding */ Thumb), |
| 16954 |
/* harmony export */ createSwitchScope: () => (/* binding */ createSwitchScope) |
| 16955 |
/* harmony export */ }); |
| 16956 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 16957 |
/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/primitive */ "./node_modules/@radix-ui/primitive/dist/index.mjs"); |
| 16958 |
/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ "./node_modules/@radix-ui/react-compose-refs/dist/index.mjs"); |
| 16959 |
/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-context */ "./node_modules/@radix-ui/react-context/dist/index.mjs"); |
| 16960 |
/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ "./node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"); |
| 16961 |
/* harmony import */ var _radix_ui_react_use_previous__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-use-previous */ "./node_modules/@radix-ui/react-use-previous/dist/index.mjs"); |
| 16962 |
/* harmony import */ var _radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-use-size */ "./node_modules/@radix-ui/react-use-size/dist/index.mjs"); |
| 16963 |
/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/react-primitive */ "./node_modules/@radix-ui/react-primitive/dist/index.mjs"); |
| 16964 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 16965 |
"use client"; |
| 16966 |
|
| 16967 |
// src/switch.tsx |
| 16968 |
|
| 16969 |
|
| 16970 |
|
| 16971 |
|
| 16972 |
|
| 16973 |
|
| 16974 |
|
| 16975 |
|
| 16976 |
|
| 16977 |
var SWITCH_NAME = "Switch"; |
| 16978 |
var [createSwitchContext, createSwitchScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_3__.createContextScope)(SWITCH_NAME); |
| 16979 |
var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME); |
| 16980 |
var Switch = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 16981 |
(props, forwardedRef) => { |
| 16982 |
const { |
| 16983 |
__scopeSwitch, |
| 16984 |
name, |
| 16985 |
checked: checkedProp, |
| 16986 |
defaultChecked, |
| 16987 |
required, |
| 16988 |
disabled, |
| 16989 |
value = "on", |
| 16990 |
onCheckedChange, |
| 16991 |
form, |
| 16992 |
...switchProps |
| 16993 |
} = props; |
| 16994 |
const [button, setButton] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 16995 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, (node) => setButton(node)); |
| 16996 |
const hasConsumerStoppedPropagationRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); |
| 16997 |
const isFormControl = button ? form || !!button.closest("form") : true; |
| 16998 |
const [checked, setChecked] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__.useControllableState)({ |
| 16999 |
prop: checkedProp, |
| 17000 |
defaultProp: defaultChecked ?? false, |
| 17001 |
onChange: onCheckedChange, |
| 17002 |
caller: SWITCH_NAME |
| 17003 |
}); |
| 17004 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [ |
| 17005 |
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)( |
| 17006 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_7__.Primitive.button, |
| 17007 |
{ |
| 17008 |
type: "button", |
| 17009 |
role: "switch", |
| 17010 |
"aria-checked": checked, |
| 17011 |
"aria-required": required, |
| 17012 |
"data-state": getState(checked), |
| 17013 |
"data-disabled": disabled ? "" : void 0, |
| 17014 |
disabled, |
| 17015 |
value, |
| 17016 |
...switchProps, |
| 17017 |
ref: composedRefs, |
| 17018 |
onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onClick, (event) => { |
| 17019 |
setChecked((prevChecked) => !prevChecked); |
| 17020 |
if (isFormControl) { |
| 17021 |
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(); |
| 17022 |
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation(); |
| 17023 |
} |
| 17024 |
}) |
| 17025 |
} |
| 17026 |
), |
| 17027 |
isFormControl && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)( |
| 17028 |
SwitchBubbleInput, |
| 17029 |
{ |
| 17030 |
control: button, |
| 17031 |
bubbles: !hasConsumerStoppedPropagationRef.current, |
| 17032 |
name, |
| 17033 |
value, |
| 17034 |
checked, |
| 17035 |
required, |
| 17036 |
disabled, |
| 17037 |
form, |
| 17038 |
style: { transform: "translateX(-100%)" } |
| 17039 |
} |
| 17040 |
) |
| 17041 |
] }); |
| 17042 |
} |
| 17043 |
); |
| 17044 |
Switch.displayName = SWITCH_NAME; |
| 17045 |
var THUMB_NAME = "SwitchThumb"; |
| 17046 |
var SwitchThumb = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 17047 |
(props, forwardedRef) => { |
| 17048 |
const { __scopeSwitch, ...thumbProps } = props; |
| 17049 |
const context = useSwitchContext(THUMB_NAME, __scopeSwitch); |
| 17050 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)( |
| 17051 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_7__.Primitive.span, |
| 17052 |
{ |
| 17053 |
"data-state": getState(context.checked), |
| 17054 |
"data-disabled": context.disabled ? "" : void 0, |
| 17055 |
...thumbProps, |
| 17056 |
ref: forwardedRef |
| 17057 |
} |
| 17058 |
); |
| 17059 |
} |
| 17060 |
); |
| 17061 |
SwitchThumb.displayName = THUMB_NAME; |
| 17062 |
var BUBBLE_INPUT_NAME = "SwitchBubbleInput"; |
| 17063 |
var SwitchBubbleInput = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 17064 |
({ |
| 17065 |
__scopeSwitch, |
| 17066 |
control, |
| 17067 |
checked, |
| 17068 |
bubbles = true, |
| 17069 |
...props |
| 17070 |
}, forwardedRef) => { |
| 17071 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 17072 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(ref, forwardedRef); |
| 17073 |
const prevChecked = (0,_radix_ui_react_use_previous__WEBPACK_IMPORTED_MODULE_5__.usePrevious)(checked); |
| 17074 |
const controlSize = (0,_radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_6__.useSize)(control); |
| 17075 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17076 |
const input = ref.current; |
| 17077 |
if (!input) return; |
| 17078 |
const inputProto = window.HTMLInputElement.prototype; |
| 17079 |
const descriptor = Object.getOwnPropertyDescriptor( |
| 17080 |
inputProto, |
| 17081 |
"checked" |
| 17082 |
); |
| 17083 |
const setChecked = descriptor.set; |
| 17084 |
if (prevChecked !== checked && setChecked) { |
| 17085 |
const event = new Event("click", { bubbles }); |
| 17086 |
setChecked.call(input, checked); |
| 17087 |
input.dispatchEvent(event); |
| 17088 |
} |
| 17089 |
}, [prevChecked, checked, bubbles]); |
| 17090 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)( |
| 17091 |
"input", |
| 17092 |
{ |
| 17093 |
type: "checkbox", |
| 17094 |
"aria-hidden": true, |
| 17095 |
defaultChecked: checked, |
| 17096 |
...props, |
| 17097 |
tabIndex: -1, |
| 17098 |
ref: composedRefs, |
| 17099 |
style: { |
| 17100 |
...props.style, |
| 17101 |
...controlSize, |
| 17102 |
position: "absolute", |
| 17103 |
pointerEvents: "none", |
| 17104 |
opacity: 0, |
| 17105 |
margin: 0 |
| 17106 |
} |
| 17107 |
} |
| 17108 |
); |
| 17109 |
} |
| 17110 |
); |
| 17111 |
SwitchBubbleInput.displayName = BUBBLE_INPUT_NAME; |
| 17112 |
function getState(checked) { |
| 17113 |
return checked ? "checked" : "unchecked"; |
| 17114 |
} |
| 17115 |
var Root = Switch; |
| 17116 |
var Thumb = SwitchThumb; |
| 17117 |
|
| 17118 |
//# sourceMappingURL=index.mjs.map |
| 17119 |
|
| 17120 |
|
| 17121 |
/***/ }, |
| 17122 |
|
| 17123 |
/***/ "./node_modules/@radix-ui/react-tooltip/dist/index.mjs" |
| 17124 |
/*!*************************************************************!*\ |
| 17125 |
!*** ./node_modules/@radix-ui/react-tooltip/dist/index.mjs ***! |
| 17126 |
\*************************************************************/ |
| 17127 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 17128 |
|
| 17129 |
__webpack_require__.r(__webpack_exports__); |
| 17130 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 17131 |
/* harmony export */ Arrow: () => (/* binding */ Arrow2), |
| 17132 |
/* harmony export */ Content: () => (/* binding */ Content2), |
| 17133 |
/* harmony export */ Portal: () => (/* binding */ Portal), |
| 17134 |
/* harmony export */ Provider: () => (/* binding */ Provider), |
| 17135 |
/* harmony export */ Root: () => (/* binding */ Root3), |
| 17136 |
/* harmony export */ Tooltip: () => (/* binding */ Tooltip), |
| 17137 |
/* harmony export */ TooltipArrow: () => (/* binding */ TooltipArrow), |
| 17138 |
/* harmony export */ TooltipContent: () => (/* binding */ TooltipContent), |
| 17139 |
/* harmony export */ TooltipPortal: () => (/* binding */ TooltipPortal), |
| 17140 |
/* harmony export */ TooltipProvider: () => (/* binding */ TooltipProvider), |
| 17141 |
/* harmony export */ TooltipTrigger: () => (/* binding */ TooltipTrigger), |
| 17142 |
/* harmony export */ Trigger: () => (/* binding */ Trigger), |
| 17143 |
/* harmony export */ createTooltipScope: () => (/* binding */ createTooltipScope) |
| 17144 |
/* harmony export */ }); |
| 17145 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 17146 |
/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/primitive */ "./node_modules/@radix-ui/primitive/dist/index.mjs"); |
| 17147 |
/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ "./node_modules/@radix-ui/react-compose-refs/dist/index.mjs"); |
| 17148 |
/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-context */ "./node_modules/@radix-ui/react-context/dist/index.mjs"); |
| 17149 |
/* harmony import */ var _radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-dismissable-layer */ "./node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs"); |
| 17150 |
/* harmony import */ var _radix_ui_react_id__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-id */ "./node_modules/@radix-ui/react-id/dist/index.mjs"); |
| 17151 |
/* harmony import */ var _radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-popper */ "./node_modules/@radix-ui/react-popper/dist/index.mjs"); |
| 17152 |
/* harmony import */ var _radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/react-portal */ "./node_modules/@radix-ui/react-portal/dist/index.mjs"); |
| 17153 |
/* harmony import */ var _radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/react-presence */ "./node_modules/@radix-ui/react-presence/dist/index.mjs"); |
| 17154 |
/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-primitive */ "./node_modules/@radix-ui/react-primitive/dist/index.mjs"); |
| 17155 |
/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @radix-ui/react-slot */ "./node_modules/@radix-ui/react-slot/dist/index.mjs"); |
| 17156 |
/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ "./node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"); |
| 17157 |
/* harmony import */ var _radix_ui_react_visually_hidden__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @radix-ui/react-visually-hidden */ "./node_modules/@radix-ui/react-visually-hidden/dist/index.mjs"); |
| 17158 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 17159 |
"use client"; |
| 17160 |
|
| 17161 |
// src/tooltip.tsx |
| 17162 |
|
| 17163 |
|
| 17164 |
|
| 17165 |
|
| 17166 |
|
| 17167 |
|
| 17168 |
|
| 17169 |
|
| 17170 |
|
| 17171 |
|
| 17172 |
|
| 17173 |
|
| 17174 |
|
| 17175 |
|
| 17176 |
|
| 17177 |
var [createTooltipContext, createTooltipScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_3__.createContextScope)("Tooltip", [ |
| 17178 |
_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_6__.createPopperScope |
| 17179 |
]); |
| 17180 |
var usePopperScope = (0,_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_6__.createPopperScope)(); |
| 17181 |
var PROVIDER_NAME = "TooltipProvider"; |
| 17182 |
var DEFAULT_DELAY_DURATION = 700; |
| 17183 |
var TOOLTIP_OPEN = "tooltip.open"; |
| 17184 |
var [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME); |
| 17185 |
var TooltipProvider = (props) => { |
| 17186 |
const { |
| 17187 |
__scopeTooltip, |
| 17188 |
delayDuration = DEFAULT_DELAY_DURATION, |
| 17189 |
skipDelayDuration = 300, |
| 17190 |
disableHoverableContent = false, |
| 17191 |
children |
| 17192 |
} = props; |
| 17193 |
const isOpenDelayedRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(true); |
| 17194 |
const isPointerInTransitRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); |
| 17195 |
const skipDelayTimerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(0); |
| 17196 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17197 |
const skipDelayTimer = skipDelayTimerRef.current; |
| 17198 |
return () => window.clearTimeout(skipDelayTimer); |
| 17199 |
}, []); |
| 17200 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)( |
| 17201 |
TooltipProviderContextProvider, |
| 17202 |
{ |
| 17203 |
scope: __scopeTooltip, |
| 17204 |
isOpenDelayedRef, |
| 17205 |
delayDuration, |
| 17206 |
onOpen: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => { |
| 17207 |
window.clearTimeout(skipDelayTimerRef.current); |
| 17208 |
isOpenDelayedRef.current = false; |
| 17209 |
}, []), |
| 17210 |
onClose: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => { |
| 17211 |
window.clearTimeout(skipDelayTimerRef.current); |
| 17212 |
skipDelayTimerRef.current = window.setTimeout( |
| 17213 |
() => isOpenDelayedRef.current = true, |
| 17214 |
skipDelayDuration |
| 17215 |
); |
| 17216 |
}, [skipDelayDuration]), |
| 17217 |
isPointerInTransitRef, |
| 17218 |
onPointerInTransitChange: react__WEBPACK_IMPORTED_MODULE_0__.useCallback((inTransit) => { |
| 17219 |
isPointerInTransitRef.current = inTransit; |
| 17220 |
}, []), |
| 17221 |
disableHoverableContent, |
| 17222 |
children |
| 17223 |
} |
| 17224 |
); |
| 17225 |
}; |
| 17226 |
TooltipProvider.displayName = PROVIDER_NAME; |
| 17227 |
var TOOLTIP_NAME = "Tooltip"; |
| 17228 |
var [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME); |
| 17229 |
var Tooltip = (props) => { |
| 17230 |
const { |
| 17231 |
__scopeTooltip, |
| 17232 |
children, |
| 17233 |
open: openProp, |
| 17234 |
defaultOpen, |
| 17235 |
onOpenChange, |
| 17236 |
disableHoverableContent: disableHoverableContentProp, |
| 17237 |
delayDuration: delayDurationProp |
| 17238 |
} = props; |
| 17239 |
const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip); |
| 17240 |
const popperScope = usePopperScope(__scopeTooltip); |
| 17241 |
const [trigger, setTrigger] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 17242 |
const contentId = (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_5__.useId)(); |
| 17243 |
const openTimerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(0); |
| 17244 |
const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent; |
| 17245 |
const delayDuration = delayDurationProp ?? providerContext.delayDuration; |
| 17246 |
const wasOpenDelayedRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); |
| 17247 |
const [open, setOpen] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_11__.useControllableState)({ |
| 17248 |
prop: openProp, |
| 17249 |
defaultProp: defaultOpen ?? false, |
| 17250 |
onChange: (open2) => { |
| 17251 |
if (open2) { |
| 17252 |
providerContext.onOpen(); |
| 17253 |
document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN)); |
| 17254 |
} else { |
| 17255 |
providerContext.onClose(); |
| 17256 |
} |
| 17257 |
onOpenChange?.(open2); |
| 17258 |
}, |
| 17259 |
caller: TOOLTIP_NAME |
| 17260 |
}); |
| 17261 |
const stateAttribute = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { |
| 17262 |
return open ? wasOpenDelayedRef.current ? "delayed-open" : "instant-open" : "closed"; |
| 17263 |
}, [open]); |
| 17264 |
const handleOpen = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => { |
| 17265 |
window.clearTimeout(openTimerRef.current); |
| 17266 |
openTimerRef.current = 0; |
| 17267 |
wasOpenDelayedRef.current = false; |
| 17268 |
setOpen(true); |
| 17269 |
}, [setOpen]); |
| 17270 |
const handleClose = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => { |
| 17271 |
window.clearTimeout(openTimerRef.current); |
| 17272 |
openTimerRef.current = 0; |
| 17273 |
setOpen(false); |
| 17274 |
}, [setOpen]); |
| 17275 |
const handleDelayedOpen = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => { |
| 17276 |
window.clearTimeout(openTimerRef.current); |
| 17277 |
openTimerRef.current = window.setTimeout(() => { |
| 17278 |
wasOpenDelayedRef.current = true; |
| 17279 |
setOpen(true); |
| 17280 |
openTimerRef.current = 0; |
| 17281 |
}, delayDuration); |
| 17282 |
}, [delayDuration, setOpen]); |
| 17283 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17284 |
return () => { |
| 17285 |
if (openTimerRef.current) { |
| 17286 |
window.clearTimeout(openTimerRef.current); |
| 17287 |
openTimerRef.current = 0; |
| 17288 |
} |
| 17289 |
}; |
| 17290 |
}, []); |
| 17291 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_6__.Root, { ...popperScope, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)( |
| 17292 |
TooltipContextProvider, |
| 17293 |
{ |
| 17294 |
scope: __scopeTooltip, |
| 17295 |
contentId, |
| 17296 |
open, |
| 17297 |
stateAttribute, |
| 17298 |
trigger, |
| 17299 |
onTriggerChange: setTrigger, |
| 17300 |
onTriggerEnter: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => { |
| 17301 |
if (providerContext.isOpenDelayedRef.current) handleDelayedOpen(); |
| 17302 |
else handleOpen(); |
| 17303 |
}, [providerContext.isOpenDelayedRef, handleDelayedOpen, handleOpen]), |
| 17304 |
onTriggerLeave: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => { |
| 17305 |
if (disableHoverableContent) { |
| 17306 |
handleClose(); |
| 17307 |
} else { |
| 17308 |
window.clearTimeout(openTimerRef.current); |
| 17309 |
openTimerRef.current = 0; |
| 17310 |
} |
| 17311 |
}, [handleClose, disableHoverableContent]), |
| 17312 |
onOpen: handleOpen, |
| 17313 |
onClose: handleClose, |
| 17314 |
disableHoverableContent, |
| 17315 |
children |
| 17316 |
} |
| 17317 |
) }); |
| 17318 |
}; |
| 17319 |
Tooltip.displayName = TOOLTIP_NAME; |
| 17320 |
var TRIGGER_NAME = "TooltipTrigger"; |
| 17321 |
var TooltipTrigger = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 17322 |
(props, forwardedRef) => { |
| 17323 |
const { __scopeTooltip, ...triggerProps } = props; |
| 17324 |
const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip); |
| 17325 |
const providerContext = useTooltipProviderContext(TRIGGER_NAME, __scopeTooltip); |
| 17326 |
const popperScope = usePopperScope(__scopeTooltip); |
| 17327 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 17328 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, ref, context.onTriggerChange); |
| 17329 |
const isPointerDownRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); |
| 17330 |
const hasPointerMoveOpenedRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false); |
| 17331 |
const handlePointerUp = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => isPointerDownRef.current = false, []); |
| 17332 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17333 |
return () => document.removeEventListener("pointerup", handlePointerUp); |
| 17334 |
}, [handlePointerUp]); |
| 17335 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_6__.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)( |
| 17336 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__.Primitive.button, |
| 17337 |
{ |
| 17338 |
"aria-describedby": context.open ? context.contentId : void 0, |
| 17339 |
"data-state": context.stateAttribute, |
| 17340 |
...triggerProps, |
| 17341 |
ref: composedRefs, |
| 17342 |
onPointerMove: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onPointerMove, (event) => { |
| 17343 |
if (event.pointerType === "touch") return; |
| 17344 |
if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) { |
| 17345 |
context.onTriggerEnter(); |
| 17346 |
hasPointerMoveOpenedRef.current = true; |
| 17347 |
} |
| 17348 |
}), |
| 17349 |
onPointerLeave: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onPointerLeave, () => { |
| 17350 |
context.onTriggerLeave(); |
| 17351 |
hasPointerMoveOpenedRef.current = false; |
| 17352 |
}), |
| 17353 |
onPointerDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onPointerDown, () => { |
| 17354 |
if (context.open) { |
| 17355 |
context.onClose(); |
| 17356 |
} |
| 17357 |
isPointerDownRef.current = true; |
| 17358 |
document.addEventListener("pointerup", handlePointerUp, { once: true }); |
| 17359 |
}), |
| 17360 |
onFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onFocus, () => { |
| 17361 |
if (!isPointerDownRef.current) context.onOpen(); |
| 17362 |
}), |
| 17363 |
onBlur: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onBlur, context.onClose), |
| 17364 |
onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_1__.composeEventHandlers)(props.onClick, context.onClose) |
| 17365 |
} |
| 17366 |
) }); |
| 17367 |
} |
| 17368 |
); |
| 17369 |
TooltipTrigger.displayName = TRIGGER_NAME; |
| 17370 |
var PORTAL_NAME = "TooltipPortal"; |
| 17371 |
var [PortalProvider, usePortalContext] = createTooltipContext(PORTAL_NAME, { |
| 17372 |
forceMount: void 0 |
| 17373 |
}); |
| 17374 |
var TooltipPortal = (props) => { |
| 17375 |
const { __scopeTooltip, forceMount, children, container } = props; |
| 17376 |
const context = useTooltipContext(PORTAL_NAME, __scopeTooltip); |
| 17377 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(PortalProvider, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_7__.Portal, { asChild: true, container, children }) }) }); |
| 17378 |
}; |
| 17379 |
TooltipPortal.displayName = PORTAL_NAME; |
| 17380 |
var CONTENT_NAME = "TooltipContent"; |
| 17381 |
var TooltipContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 17382 |
(props, forwardedRef) => { |
| 17383 |
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip); |
| 17384 |
const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props; |
| 17385 |
const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip); |
| 17386 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__.Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) }); |
| 17387 |
} |
| 17388 |
); |
| 17389 |
var TooltipContentHoverable = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => { |
| 17390 |
const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip); |
| 17391 |
const providerContext = useTooltipProviderContext(CONTENT_NAME, props.__scopeTooltip); |
| 17392 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); |
| 17393 |
const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, ref); |
| 17394 |
const [pointerGraceArea, setPointerGraceArea] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); |
| 17395 |
const { trigger, onClose } = context; |
| 17396 |
const content = ref.current; |
| 17397 |
const { onPointerInTransitChange } = providerContext; |
| 17398 |
const handleRemoveGraceArea = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => { |
| 17399 |
setPointerGraceArea(null); |
| 17400 |
onPointerInTransitChange(false); |
| 17401 |
}, [onPointerInTransitChange]); |
| 17402 |
const handleCreateGraceArea = react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 17403 |
(event, hoverTarget) => { |
| 17404 |
const currentTarget = event.currentTarget; |
| 17405 |
const exitPoint = { x: event.clientX, y: event.clientY }; |
| 17406 |
const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect()); |
| 17407 |
const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide); |
| 17408 |
const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect()); |
| 17409 |
const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints]); |
| 17410 |
setPointerGraceArea(graceArea); |
| 17411 |
onPointerInTransitChange(true); |
| 17412 |
}, |
| 17413 |
[onPointerInTransitChange] |
| 17414 |
); |
| 17415 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17416 |
return () => handleRemoveGraceArea(); |
| 17417 |
}, [handleRemoveGraceArea]); |
| 17418 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17419 |
if (trigger && content) { |
| 17420 |
const handleTriggerLeave = (event) => handleCreateGraceArea(event, content); |
| 17421 |
const handleContentLeave = (event) => handleCreateGraceArea(event, trigger); |
| 17422 |
trigger.addEventListener("pointerleave", handleTriggerLeave); |
| 17423 |
content.addEventListener("pointerleave", handleContentLeave); |
| 17424 |
return () => { |
| 17425 |
trigger.removeEventListener("pointerleave", handleTriggerLeave); |
| 17426 |
content.removeEventListener("pointerleave", handleContentLeave); |
| 17427 |
}; |
| 17428 |
} |
| 17429 |
}, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]); |
| 17430 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17431 |
if (pointerGraceArea) { |
| 17432 |
const handleTrackPointerGrace = (event) => { |
| 17433 |
const target = event.target; |
| 17434 |
const pointerPosition = { x: event.clientX, y: event.clientY }; |
| 17435 |
const hasEnteredTarget = trigger?.contains(target) || content?.contains(target); |
| 17436 |
const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea); |
| 17437 |
if (hasEnteredTarget) { |
| 17438 |
handleRemoveGraceArea(); |
| 17439 |
} else if (isPointerOutsideGraceArea) { |
| 17440 |
handleRemoveGraceArea(); |
| 17441 |
onClose(); |
| 17442 |
} |
| 17443 |
}; |
| 17444 |
document.addEventListener("pointermove", handleTrackPointerGrace); |
| 17445 |
return () => document.removeEventListener("pointermove", handleTrackPointerGrace); |
| 17446 |
} |
| 17447 |
}, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]); |
| 17448 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(TooltipContentImpl, { ...props, ref: composedRefs }); |
| 17449 |
}); |
| 17450 |
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false }); |
| 17451 |
var Slottable = (0,_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_10__.createSlottable)("TooltipContent"); |
| 17452 |
var TooltipContentImpl = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 17453 |
(props, forwardedRef) => { |
| 17454 |
const { |
| 17455 |
__scopeTooltip, |
| 17456 |
children, |
| 17457 |
"aria-label": ariaLabel, |
| 17458 |
onEscapeKeyDown, |
| 17459 |
onPointerDownOutside, |
| 17460 |
...contentProps |
| 17461 |
} = props; |
| 17462 |
const context = useTooltipContext(CONTENT_NAME, __scopeTooltip); |
| 17463 |
const popperScope = usePopperScope(__scopeTooltip); |
| 17464 |
const { onClose } = context; |
| 17465 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17466 |
document.addEventListener(TOOLTIP_OPEN, onClose); |
| 17467 |
return () => document.removeEventListener(TOOLTIP_OPEN, onClose); |
| 17468 |
}, [onClose]); |
| 17469 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17470 |
if (context.trigger) { |
| 17471 |
const handleScroll = (event) => { |
| 17472 |
const target = event.target; |
| 17473 |
if (target?.contains(context.trigger)) onClose(); |
| 17474 |
}; |
| 17475 |
window.addEventListener("scroll", handleScroll, { capture: true }); |
| 17476 |
return () => window.removeEventListener("scroll", handleScroll, { capture: true }); |
| 17477 |
} |
| 17478 |
}, [context.trigger, onClose]); |
| 17479 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)( |
| 17480 |
_radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_4__.DismissableLayer, |
| 17481 |
{ |
| 17482 |
asChild: true, |
| 17483 |
disableOutsidePointerEvents: false, |
| 17484 |
onEscapeKeyDown, |
| 17485 |
onPointerDownOutside, |
| 17486 |
onFocusOutside: (event) => event.preventDefault(), |
| 17487 |
onDismiss: onClose, |
| 17488 |
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)( |
| 17489 |
_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_6__.Content, |
| 17490 |
{ |
| 17491 |
"data-state": context.stateAttribute, |
| 17492 |
...popperScope, |
| 17493 |
...contentProps, |
| 17494 |
ref: forwardedRef, |
| 17495 |
style: { |
| 17496 |
...contentProps.style, |
| 17497 |
// re-namespace exposed content custom properties |
| 17498 |
...{ |
| 17499 |
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)", |
| 17500 |
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)", |
| 17501 |
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)", |
| 17502 |
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)", |
| 17503 |
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)" |
| 17504 |
} |
| 17505 |
}, |
| 17506 |
children: [ |
| 17507 |
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(Slottable, { children }), |
| 17508 |
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_radix_ui_react_visually_hidden__WEBPACK_IMPORTED_MODULE_12__.Root, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) }) |
| 17509 |
] |
| 17510 |
} |
| 17511 |
) |
| 17512 |
} |
| 17513 |
); |
| 17514 |
} |
| 17515 |
); |
| 17516 |
TooltipContent.displayName = CONTENT_NAME; |
| 17517 |
var ARROW_NAME = "TooltipArrow"; |
| 17518 |
var TooltipArrow = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 17519 |
(props, forwardedRef) => { |
| 17520 |
const { __scopeTooltip, ...arrowProps } = props; |
| 17521 |
const popperScope = usePopperScope(__scopeTooltip); |
| 17522 |
const visuallyHiddenContentContext = useVisuallyHiddenContentContext( |
| 17523 |
ARROW_NAME, |
| 17524 |
__scopeTooltip |
| 17525 |
); |
| 17526 |
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_6__.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }); |
| 17527 |
} |
| 17528 |
); |
| 17529 |
TooltipArrow.displayName = ARROW_NAME; |
| 17530 |
function getExitSideFromRect(point, rect) { |
| 17531 |
const top = Math.abs(rect.top - point.y); |
| 17532 |
const bottom = Math.abs(rect.bottom - point.y); |
| 17533 |
const right = Math.abs(rect.right - point.x); |
| 17534 |
const left = Math.abs(rect.left - point.x); |
| 17535 |
switch (Math.min(top, bottom, right, left)) { |
| 17536 |
case left: |
| 17537 |
return "left"; |
| 17538 |
case right: |
| 17539 |
return "right"; |
| 17540 |
case top: |
| 17541 |
return "top"; |
| 17542 |
case bottom: |
| 17543 |
return "bottom"; |
| 17544 |
default: |
| 17545 |
throw new Error("unreachable"); |
| 17546 |
} |
| 17547 |
} |
| 17548 |
function getPaddedExitPoints(exitPoint, exitSide, padding = 5) { |
| 17549 |
const paddedExitPoints = []; |
| 17550 |
switch (exitSide) { |
| 17551 |
case "top": |
| 17552 |
paddedExitPoints.push( |
| 17553 |
{ x: exitPoint.x - padding, y: exitPoint.y + padding }, |
| 17554 |
{ x: exitPoint.x + padding, y: exitPoint.y + padding } |
| 17555 |
); |
| 17556 |
break; |
| 17557 |
case "bottom": |
| 17558 |
paddedExitPoints.push( |
| 17559 |
{ x: exitPoint.x - padding, y: exitPoint.y - padding }, |
| 17560 |
{ x: exitPoint.x + padding, y: exitPoint.y - padding } |
| 17561 |
); |
| 17562 |
break; |
| 17563 |
case "left": |
| 17564 |
paddedExitPoints.push( |
| 17565 |
{ x: exitPoint.x + padding, y: exitPoint.y - padding }, |
| 17566 |
{ x: exitPoint.x + padding, y: exitPoint.y + padding } |
| 17567 |
); |
| 17568 |
break; |
| 17569 |
case "right": |
| 17570 |
paddedExitPoints.push( |
| 17571 |
{ x: exitPoint.x - padding, y: exitPoint.y - padding }, |
| 17572 |
{ x: exitPoint.x - padding, y: exitPoint.y + padding } |
| 17573 |
); |
| 17574 |
break; |
| 17575 |
} |
| 17576 |
return paddedExitPoints; |
| 17577 |
} |
| 17578 |
function getPointsFromRect(rect) { |
| 17579 |
const { top, right, bottom, left } = rect; |
| 17580 |
return [ |
| 17581 |
{ x: left, y: top }, |
| 17582 |
{ x: right, y: top }, |
| 17583 |
{ x: right, y: bottom }, |
| 17584 |
{ x: left, y: bottom } |
| 17585 |
]; |
| 17586 |
} |
| 17587 |
function isPointInPolygon(point, polygon) { |
| 17588 |
const { x, y } = point; |
| 17589 |
let inside = false; |
| 17590 |
for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) { |
| 17591 |
const ii = polygon[i]; |
| 17592 |
const jj = polygon[j]; |
| 17593 |
const xi = ii.x; |
| 17594 |
const yi = ii.y; |
| 17595 |
const xj = jj.x; |
| 17596 |
const yj = jj.y; |
| 17597 |
const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi; |
| 17598 |
if (intersect) inside = !inside; |
| 17599 |
} |
| 17600 |
return inside; |
| 17601 |
} |
| 17602 |
function getHull(points) { |
| 17603 |
const newPoints = points.slice(); |
| 17604 |
newPoints.sort((a, b) => { |
| 17605 |
if (a.x < b.x) return -1; |
| 17606 |
else if (a.x > b.x) return 1; |
| 17607 |
else if (a.y < b.y) return -1; |
| 17608 |
else if (a.y > b.y) return 1; |
| 17609 |
else return 0; |
| 17610 |
}); |
| 17611 |
return getHullPresorted(newPoints); |
| 17612 |
} |
| 17613 |
function getHullPresorted(points) { |
| 17614 |
if (points.length <= 1) return points.slice(); |
| 17615 |
const upperHull = []; |
| 17616 |
for (let i = 0; i < points.length; i++) { |
| 17617 |
const p = points[i]; |
| 17618 |
while (upperHull.length >= 2) { |
| 17619 |
const q = upperHull[upperHull.length - 1]; |
| 17620 |
const r = upperHull[upperHull.length - 2]; |
| 17621 |
if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop(); |
| 17622 |
else break; |
| 17623 |
} |
| 17624 |
upperHull.push(p); |
| 17625 |
} |
| 17626 |
upperHull.pop(); |
| 17627 |
const lowerHull = []; |
| 17628 |
for (let i = points.length - 1; i >= 0; i--) { |
| 17629 |
const p = points[i]; |
| 17630 |
while (lowerHull.length >= 2) { |
| 17631 |
const q = lowerHull[lowerHull.length - 1]; |
| 17632 |
const r = lowerHull[lowerHull.length - 2]; |
| 17633 |
if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop(); |
| 17634 |
else break; |
| 17635 |
} |
| 17636 |
lowerHull.push(p); |
| 17637 |
} |
| 17638 |
lowerHull.pop(); |
| 17639 |
if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) { |
| 17640 |
return upperHull; |
| 17641 |
} else { |
| 17642 |
return upperHull.concat(lowerHull); |
| 17643 |
} |
| 17644 |
} |
| 17645 |
var Provider = TooltipProvider; |
| 17646 |
var Root3 = Tooltip; |
| 17647 |
var Trigger = TooltipTrigger; |
| 17648 |
var Portal = TooltipPortal; |
| 17649 |
var Content2 = TooltipContent; |
| 17650 |
var Arrow2 = TooltipArrow; |
| 17651 |
|
| 17652 |
//# sourceMappingURL=index.mjs.map |
| 17653 |
|
| 17654 |
|
| 17655 |
/***/ }, |
| 17656 |
|
| 17657 |
/***/ "./node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs" |
| 17658 |
/*!**********************************************************************!*\ |
| 17659 |
!*** ./node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs ***! |
| 17660 |
\**********************************************************************/ |
| 17661 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 17662 |
|
| 17663 |
__webpack_require__.r(__webpack_exports__); |
| 17664 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 17665 |
/* harmony export */ useCallbackRef: () => (/* binding */ useCallbackRef) |
| 17666 |
/* harmony export */ }); |
| 17667 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 17668 |
// packages/react/use-callback-ref/src/use-callback-ref.tsx |
| 17669 |
|
| 17670 |
function useCallbackRef(callback) { |
| 17671 |
const callbackRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(callback); |
| 17672 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17673 |
callbackRef.current = callback; |
| 17674 |
}); |
| 17675 |
return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => (...args) => callbackRef.current?.(...args), []); |
| 17676 |
} |
| 17677 |
|
| 17678 |
//# sourceMappingURL=index.mjs.map |
| 17679 |
|
| 17680 |
|
| 17681 |
/***/ }, |
| 17682 |
|
| 17683 |
/***/ "./node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs" |
| 17684 |
/*!****************************************************************************!*\ |
| 17685 |
!*** ./node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs ***! |
| 17686 |
\****************************************************************************/ |
| 17687 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 17688 |
|
| 17689 |
var react__WEBPACK_IMPORTED_MODULE_0___namespace_cache; |
| 17690 |
__webpack_require__.r(__webpack_exports__); |
| 17691 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 17692 |
/* harmony export */ useControllableState: () => (/* binding */ useControllableState), |
| 17693 |
/* harmony export */ useControllableStateReducer: () => (/* binding */ useControllableStateReducer) |
| 17694 |
/* harmony export */ }); |
| 17695 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 17696 |
/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ "./node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"); |
| 17697 |
/* harmony import */ var _radix_ui_react_use_effect_event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-use-effect-event */ "./node_modules/@radix-ui/react-use-effect-event/dist/index.mjs"); |
| 17698 |
// src/use-controllable-state.tsx |
| 17699 |
|
| 17700 |
|
| 17701 |
var useInsertionEffect = /*#__PURE__*/ (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache = __webpack_require__.t(react__WEBPACK_IMPORTED_MODULE_0__, 2)))[" useInsertionEffect ".trim().toString()] || _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect; |
| 17702 |
function useControllableState({ |
| 17703 |
prop, |
| 17704 |
defaultProp, |
| 17705 |
onChange = () => { |
| 17706 |
}, |
| 17707 |
caller |
| 17708 |
}) { |
| 17709 |
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({ |
| 17710 |
defaultProp, |
| 17711 |
onChange |
| 17712 |
}); |
| 17713 |
const isControlled = prop !== void 0; |
| 17714 |
const value = isControlled ? prop : uncontrolledProp; |
| 17715 |
if (true) { |
| 17716 |
const isControlledRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(prop !== void 0); |
| 17717 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17718 |
const wasControlled = isControlledRef.current; |
| 17719 |
if (wasControlled !== isControlled) { |
| 17720 |
const from = wasControlled ? "controlled" : "uncontrolled"; |
| 17721 |
const to = isControlled ? "controlled" : "uncontrolled"; |
| 17722 |
console.warn( |
| 17723 |
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.` |
| 17724 |
); |
| 17725 |
} |
| 17726 |
isControlledRef.current = isControlled; |
| 17727 |
}, [isControlled, caller]); |
| 17728 |
} |
| 17729 |
const setValue = react__WEBPACK_IMPORTED_MODULE_0__.useCallback( |
| 17730 |
(nextValue) => { |
| 17731 |
if (isControlled) { |
| 17732 |
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue; |
| 17733 |
if (value2 !== prop) { |
| 17734 |
onChangeRef.current?.(value2); |
| 17735 |
} |
| 17736 |
} else { |
| 17737 |
setUncontrolledProp(nextValue); |
| 17738 |
} |
| 17739 |
}, |
| 17740 |
[isControlled, prop, setUncontrolledProp, onChangeRef] |
| 17741 |
); |
| 17742 |
return [value, setValue]; |
| 17743 |
} |
| 17744 |
function useUncontrolledState({ |
| 17745 |
defaultProp, |
| 17746 |
onChange |
| 17747 |
}) { |
| 17748 |
const [value, setValue] = react__WEBPACK_IMPORTED_MODULE_0__.useState(defaultProp); |
| 17749 |
const prevValueRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(value); |
| 17750 |
const onChangeRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(onChange); |
| 17751 |
useInsertionEffect(() => { |
| 17752 |
onChangeRef.current = onChange; |
| 17753 |
}, [onChange]); |
| 17754 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17755 |
if (prevValueRef.current !== value) { |
| 17756 |
onChangeRef.current?.(value); |
| 17757 |
prevValueRef.current = value; |
| 17758 |
} |
| 17759 |
}, [value, prevValueRef]); |
| 17760 |
return [value, setValue, onChangeRef]; |
| 17761 |
} |
| 17762 |
function isFunction(value) { |
| 17763 |
return typeof value === "function"; |
| 17764 |
} |
| 17765 |
|
| 17766 |
// src/use-controllable-state-reducer.tsx |
| 17767 |
|
| 17768 |
|
| 17769 |
var SYNC_STATE = Symbol("RADIX:SYNC_STATE"); |
| 17770 |
function useControllableStateReducer(reducer, userArgs, initialArg, init) { |
| 17771 |
const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs; |
| 17772 |
const isControlled = controlledState !== void 0; |
| 17773 |
const onChange = (0,_radix_ui_react_use_effect_event__WEBPACK_IMPORTED_MODULE_2__.useEffectEvent)(onChangeProp); |
| 17774 |
if (true) { |
| 17775 |
const isControlledRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(controlledState !== void 0); |
| 17776 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17777 |
const wasControlled = isControlledRef.current; |
| 17778 |
if (wasControlled !== isControlled) { |
| 17779 |
const from = wasControlled ? "controlled" : "uncontrolled"; |
| 17780 |
const to = isControlled ? "controlled" : "uncontrolled"; |
| 17781 |
console.warn( |
| 17782 |
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.` |
| 17783 |
); |
| 17784 |
} |
| 17785 |
isControlledRef.current = isControlled; |
| 17786 |
}, [isControlled, caller]); |
| 17787 |
} |
| 17788 |
const args = [{ ...initialArg, state: defaultProp }]; |
| 17789 |
if (init) { |
| 17790 |
args.push(init); |
| 17791 |
} |
| 17792 |
const [internalState, dispatch] = react__WEBPACK_IMPORTED_MODULE_0__.useReducer( |
| 17793 |
(state2, action) => { |
| 17794 |
if (action.type === SYNC_STATE) { |
| 17795 |
return { ...state2, state: action.state }; |
| 17796 |
} |
| 17797 |
const next = reducer(state2, action); |
| 17798 |
if (isControlled && !Object.is(next.state, state2.state)) { |
| 17799 |
onChange(next.state); |
| 17800 |
} |
| 17801 |
return next; |
| 17802 |
}, |
| 17803 |
...args |
| 17804 |
); |
| 17805 |
const uncontrolledState = internalState.state; |
| 17806 |
const prevValueRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(uncontrolledState); |
| 17807 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17808 |
if (prevValueRef.current !== uncontrolledState) { |
| 17809 |
prevValueRef.current = uncontrolledState; |
| 17810 |
if (!isControlled) { |
| 17811 |
onChange(uncontrolledState); |
| 17812 |
} |
| 17813 |
} |
| 17814 |
}, [onChange, uncontrolledState, prevValueRef, isControlled]); |
| 17815 |
const state = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { |
| 17816 |
const isControlled2 = controlledState !== void 0; |
| 17817 |
if (isControlled2) { |
| 17818 |
return { ...internalState, state: controlledState }; |
| 17819 |
} |
| 17820 |
return internalState; |
| 17821 |
}, [internalState, controlledState]); |
| 17822 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17823 |
if (isControlled && !Object.is(controlledState, internalState.state)) { |
| 17824 |
dispatch({ type: SYNC_STATE, state: controlledState }); |
| 17825 |
} |
| 17826 |
}, [controlledState, internalState.state, isControlled]); |
| 17827 |
return [state, dispatch]; |
| 17828 |
} |
| 17829 |
|
| 17830 |
//# sourceMappingURL=index.mjs.map |
| 17831 |
|
| 17832 |
|
| 17833 |
/***/ }, |
| 17834 |
|
| 17835 |
/***/ "./node_modules/@radix-ui/react-use-effect-event/dist/index.mjs" |
| 17836 |
/*!**********************************************************************!*\ |
| 17837 |
!*** ./node_modules/@radix-ui/react-use-effect-event/dist/index.mjs ***! |
| 17838 |
\**********************************************************************/ |
| 17839 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 17840 |
|
| 17841 |
var react__WEBPACK_IMPORTED_MODULE_1___namespace_cache; |
| 17842 |
__webpack_require__.r(__webpack_exports__); |
| 17843 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 17844 |
/* harmony export */ useEffectEvent: () => (/* binding */ useEffectEvent) |
| 17845 |
/* harmony export */ }); |
| 17846 |
/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ "./node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"); |
| 17847 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); |
| 17848 |
// src/use-effect-event.tsx |
| 17849 |
|
| 17850 |
|
| 17851 |
var useReactEffectEvent = /*#__PURE__*/ (react__WEBPACK_IMPORTED_MODULE_1___namespace_cache || (react__WEBPACK_IMPORTED_MODULE_1___namespace_cache = __webpack_require__.t(react__WEBPACK_IMPORTED_MODULE_1__, 2)))[" useEffectEvent ".trim().toString()]; |
| 17852 |
var useReactInsertionEffect = /*#__PURE__*/ (react__WEBPACK_IMPORTED_MODULE_1___namespace_cache || (react__WEBPACK_IMPORTED_MODULE_1___namespace_cache = __webpack_require__.t(react__WEBPACK_IMPORTED_MODULE_1__, 2)))[" useInsertionEffect ".trim().toString()]; |
| 17853 |
function useEffectEvent(callback) { |
| 17854 |
if (typeof useReactEffectEvent === "function") { |
| 17855 |
return useReactEffectEvent(callback); |
| 17856 |
} |
| 17857 |
const ref = react__WEBPACK_IMPORTED_MODULE_1__.useRef(() => { |
| 17858 |
throw new Error("Cannot call an event handler while rendering."); |
| 17859 |
}); |
| 17860 |
if (typeof useReactInsertionEffect === "function") { |
| 17861 |
useReactInsertionEffect(() => { |
| 17862 |
ref.current = callback; |
| 17863 |
}); |
| 17864 |
} else { |
| 17865 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(() => { |
| 17866 |
ref.current = callback; |
| 17867 |
}); |
| 17868 |
} |
| 17869 |
return react__WEBPACK_IMPORTED_MODULE_1__.useMemo(() => (...args) => ref.current?.(...args), []); |
| 17870 |
} |
| 17871 |
|
| 17872 |
//# sourceMappingURL=index.mjs.map |
| 17873 |
|
| 17874 |
|
| 17875 |
/***/ }, |
| 17876 |
|
| 17877 |
/***/ "./node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs" |
| 17878 |
/*!************************************************************************!*\ |
| 17879 |
!*** ./node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs ***! |
| 17880 |
\************************************************************************/ |
| 17881 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 17882 |
|
| 17883 |
__webpack_require__.r(__webpack_exports__); |
| 17884 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 17885 |
/* harmony export */ useEscapeKeydown: () => (/* binding */ useEscapeKeydown) |
| 17886 |
/* harmony export */ }); |
| 17887 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 17888 |
/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ "./node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"); |
| 17889 |
// packages/react/use-escape-keydown/src/use-escape-keydown.tsx |
| 17890 |
|
| 17891 |
|
| 17892 |
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) { |
| 17893 |
const onEscapeKeyDown = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.useCallbackRef)(onEscapeKeyDownProp); |
| 17894 |
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { |
| 17895 |
const handleKeyDown = (event) => { |
| 17896 |
if (event.key === "Escape") { |
| 17897 |
onEscapeKeyDown(event); |
| 17898 |
} |
| 17899 |
}; |
| 17900 |
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true }); |
| 17901 |
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true }); |
| 17902 |
}, [onEscapeKeyDown, ownerDocument]); |
| 17903 |
} |
| 17904 |
|
| 17905 |
//# sourceMappingURL=index.mjs.map |
| 17906 |
|
| 17907 |
|
| 17908 |
/***/ }, |
| 17909 |
|
| 17910 |
/***/ "./node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs" |
| 17911 |
/*!***********************************************************************!*\ |
| 17912 |
!*** ./node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs ***! |
| 17913 |
\***********************************************************************/ |
| 17914 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 17915 |
|
| 17916 |
__webpack_require__.r(__webpack_exports__); |
| 17917 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 17918 |
/* harmony export */ useLayoutEffect: () => (/* binding */ useLayoutEffect2) |
| 17919 |
/* harmony export */ }); |
| 17920 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 17921 |
// packages/react/use-layout-effect/src/use-layout-effect.tsx |
| 17922 |
|
| 17923 |
var useLayoutEffect2 = globalThis?.document ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : () => { |
| 17924 |
}; |
| 17925 |
|
| 17926 |
//# sourceMappingURL=index.mjs.map |
| 17927 |
|
| 17928 |
|
| 17929 |
/***/ }, |
| 17930 |
|
| 17931 |
/***/ "./node_modules/@radix-ui/react-use-previous/dist/index.mjs" |
| 17932 |
/*!******************************************************************!*\ |
| 17933 |
!*** ./node_modules/@radix-ui/react-use-previous/dist/index.mjs ***! |
| 17934 |
\******************************************************************/ |
| 17935 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 17936 |
|
| 17937 |
__webpack_require__.r(__webpack_exports__); |
| 17938 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 17939 |
/* harmony export */ usePrevious: () => (/* binding */ usePrevious) |
| 17940 |
/* harmony export */ }); |
| 17941 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 17942 |
// packages/react/use-previous/src/use-previous.tsx |
| 17943 |
|
| 17944 |
function usePrevious(value) { |
| 17945 |
const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef({ value, previous: value }); |
| 17946 |
return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { |
| 17947 |
if (ref.current.value !== value) { |
| 17948 |
ref.current.previous = ref.current.value; |
| 17949 |
ref.current.value = value; |
| 17950 |
} |
| 17951 |
return ref.current.previous; |
| 17952 |
}, [value]); |
| 17953 |
} |
| 17954 |
|
| 17955 |
//# sourceMappingURL=index.mjs.map |
| 17956 |
|
| 17957 |
|
| 17958 |
/***/ }, |
| 17959 |
|
| 17960 |
/***/ "./node_modules/@radix-ui/react-use-size/dist/index.mjs" |
| 17961 |
/*!**************************************************************!*\ |
| 17962 |
!*** ./node_modules/@radix-ui/react-use-size/dist/index.mjs ***! |
| 17963 |
\**************************************************************/ |
| 17964 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 17965 |
|
| 17966 |
__webpack_require__.r(__webpack_exports__); |
| 17967 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 17968 |
/* harmony export */ useSize: () => (/* binding */ useSize) |
| 17969 |
/* harmony export */ }); |
| 17970 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 17971 |
/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ "./node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"); |
| 17972 |
// packages/react/use-size/src/use-size.tsx |
| 17973 |
|
| 17974 |
|
| 17975 |
function useSize(element) { |
| 17976 |
const [size, setSize] = react__WEBPACK_IMPORTED_MODULE_0__.useState(void 0); |
| 17977 |
(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(() => { |
| 17978 |
if (element) { |
| 17979 |
setSize({ width: element.offsetWidth, height: element.offsetHeight }); |
| 17980 |
const resizeObserver = new ResizeObserver((entries) => { |
| 17981 |
if (!Array.isArray(entries)) { |
| 17982 |
return; |
| 17983 |
} |
| 17984 |
if (!entries.length) { |
| 17985 |
return; |
| 17986 |
} |
| 17987 |
const entry = entries[0]; |
| 17988 |
let width; |
| 17989 |
let height; |
| 17990 |
if ("borderBoxSize" in entry) { |
| 17991 |
const borderSizeEntry = entry["borderBoxSize"]; |
| 17992 |
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry; |
| 17993 |
width = borderSize["inlineSize"]; |
| 17994 |
height = borderSize["blockSize"]; |
| 17995 |
} else { |
| 17996 |
width = element.offsetWidth; |
| 17997 |
height = element.offsetHeight; |
| 17998 |
} |
| 17999 |
setSize({ width, height }); |
| 18000 |
}); |
| 18001 |
resizeObserver.observe(element, { box: "border-box" }); |
| 18002 |
return () => resizeObserver.unobserve(element); |
| 18003 |
} else { |
| 18004 |
setSize(void 0); |
| 18005 |
} |
| 18006 |
}, [element]); |
| 18007 |
return size; |
| 18008 |
} |
| 18009 |
|
| 18010 |
//# sourceMappingURL=index.mjs.map |
| 18011 |
|
| 18012 |
|
| 18013 |
/***/ }, |
| 18014 |
|
| 18015 |
/***/ "./node_modules/@radix-ui/react-visually-hidden/dist/index.mjs" |
| 18016 |
/*!*********************************************************************!*\ |
| 18017 |
!*** ./node_modules/@radix-ui/react-visually-hidden/dist/index.mjs ***! |
| 18018 |
\*********************************************************************/ |
| 18019 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 18020 |
|
| 18021 |
__webpack_require__.r(__webpack_exports__); |
| 18022 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 18023 |
/* harmony export */ Root: () => (/* binding */ Root), |
| 18024 |
/* harmony export */ VISUALLY_HIDDEN_STYLES: () => (/* binding */ VISUALLY_HIDDEN_STYLES), |
| 18025 |
/* harmony export */ VisuallyHidden: () => (/* binding */ VisuallyHidden) |
| 18026 |
/* harmony export */ }); |
| 18027 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 18028 |
/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-primitive */ "./node_modules/@radix-ui/react-primitive/dist/index.mjs"); |
| 18029 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 18030 |
// src/visually-hidden.tsx |
| 18031 |
|
| 18032 |
|
| 18033 |
|
| 18034 |
var VISUALLY_HIDDEN_STYLES = Object.freeze({ |
| 18035 |
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss |
| 18036 |
position: "absolute", |
| 18037 |
border: 0, |
| 18038 |
width: 1, |
| 18039 |
height: 1, |
| 18040 |
padding: 0, |
| 18041 |
margin: -1, |
| 18042 |
overflow: "hidden", |
| 18043 |
clip: "rect(0, 0, 0, 0)", |
| 18044 |
whiteSpace: "nowrap", |
| 18045 |
wordWrap: "normal" |
| 18046 |
}); |
| 18047 |
var NAME = "VisuallyHidden"; |
| 18048 |
var VisuallyHidden = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef( |
| 18049 |
(props, forwardedRef) => { |
| 18050 |
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)( |
| 18051 |
_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_1__.Primitive.span, |
| 18052 |
{ |
| 18053 |
...props, |
| 18054 |
ref: forwardedRef, |
| 18055 |
style: { ...VISUALLY_HIDDEN_STYLES, ...props.style } |
| 18056 |
} |
| 18057 |
); |
| 18058 |
} |
| 18059 |
); |
| 18060 |
VisuallyHidden.displayName = NAME; |
| 18061 |
var Root = VisuallyHidden; |
| 18062 |
|
| 18063 |
//# sourceMappingURL=index.mjs.map |
| 18064 |
|
| 18065 |
|
| 18066 |
/***/ }, |
| 18067 |
|
| 18068 |
/***/ "./node_modules/class-variance-authority/dist/index.mjs" |
| 18069 |
/*!**************************************************************!*\ |
| 18070 |
!*** ./node_modules/class-variance-authority/dist/index.mjs ***! |
| 18071 |
\**************************************************************/ |
| 18072 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 18073 |
|
| 18074 |
__webpack_require__.r(__webpack_exports__); |
| 18075 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 18076 |
/* harmony export */ cva: () => (/* binding */ cva), |
| 18077 |
/* harmony export */ cx: () => (/* binding */ cx) |
| 18078 |
/* harmony export */ }); |
| 18079 |
/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! clsx */ "./node_modules/clsx/dist/clsx.mjs"); |
| 18080 |
/** |
| 18081 |
* Copyright 2022 Joe Bell. All rights reserved. |
| 18082 |
* |
| 18083 |
* This file is licensed to you under the Apache License, Version 2.0 |
| 18084 |
* (the "License"); you may not use this file except in compliance with the |
| 18085 |
* License. You may obtain a copy of the License at |
| 18086 |
* |
| 18087 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 18088 |
* |
| 18089 |
* Unless required by applicable law or agreed to in writing, software |
| 18090 |
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 18091 |
* WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the |
| 18092 |
* License for the specific language governing permissions and limitations under |
| 18093 |
* the License. |
| 18094 |
*/ |
| 18095 |
const falsyToString = (value)=>typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value; |
| 18096 |
const cx = clsx__WEBPACK_IMPORTED_MODULE_0__.clsx; |
| 18097 |
const cva = (base, config)=>(props)=>{ |
| 18098 |
var _config_compoundVariants; |
| 18099 |
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className); |
| 18100 |
const { variants, defaultVariants } = config; |
| 18101 |
const getVariantClassNames = Object.keys(variants).map((variant)=>{ |
| 18102 |
const variantProp = props === null || props === void 0 ? void 0 : props[variant]; |
| 18103 |
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant]; |
| 18104 |
if (variantProp === null) return null; |
| 18105 |
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp); |
| 18106 |
return variants[variant][variantKey]; |
| 18107 |
}); |
| 18108 |
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{ |
| 18109 |
let [key, value] = param; |
| 18110 |
if (value === undefined) { |
| 18111 |
return acc; |
| 18112 |
} |
| 18113 |
acc[key] = value; |
| 18114 |
return acc; |
| 18115 |
}, {}); |
| 18116 |
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{ |
| 18117 |
let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param; |
| 18118 |
return Object.entries(compoundVariantOptions).every((param)=>{ |
| 18119 |
let [key, value] = param; |
| 18120 |
return Array.isArray(value) ? value.includes({ |
| 18121 |
...defaultVariants, |
| 18122 |
...propsWithoutUndefined |
| 18123 |
}[key]) : ({ |
| 18124 |
...defaultVariants, |
| 18125 |
...propsWithoutUndefined |
| 18126 |
})[key] === value; |
| 18127 |
}) ? [ |
| 18128 |
...acc, |
| 18129 |
cvClass, |
| 18130 |
cvClassName |
| 18131 |
] : acc; |
| 18132 |
}, []); |
| 18133 |
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className); |
| 18134 |
}; |
| 18135 |
|
| 18136 |
|
| 18137 |
|
| 18138 |
/***/ }, |
| 18139 |
|
| 18140 |
/***/ "./node_modules/clsx/dist/clsx.mjs" |
| 18141 |
/*!*****************************************!*\ |
| 18142 |
!*** ./node_modules/clsx/dist/clsx.mjs ***! |
| 18143 |
\*****************************************/ |
| 18144 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 18145 |
|
| 18146 |
__webpack_require__.r(__webpack_exports__); |
| 18147 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 18148 |
/* harmony export */ clsx: () => (/* binding */ clsx), |
| 18149 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 18150 |
/* harmony export */ }); |
| 18151 |
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clsx); |
| 18152 |
|
| 18153 |
/***/ }, |
| 18154 |
|
| 18155 |
/***/ "./node_modules/tailwind-merge/dist/bundle-mjs.mjs" |
| 18156 |
/*!*********************************************************!*\ |
| 18157 |
!*** ./node_modules/tailwind-merge/dist/bundle-mjs.mjs ***! |
| 18158 |
\*********************************************************/ |
| 18159 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 18160 |
|
| 18161 |
__webpack_require__.r(__webpack_exports__); |
| 18162 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 18163 |
/* harmony export */ createTailwindMerge: () => (/* binding */ createTailwindMerge), |
| 18164 |
/* harmony export */ extendTailwindMerge: () => (/* binding */ extendTailwindMerge), |
| 18165 |
/* harmony export */ fromTheme: () => (/* binding */ fromTheme), |
| 18166 |
/* harmony export */ getDefaultConfig: () => (/* binding */ getDefaultConfig), |
| 18167 |
/* harmony export */ mergeConfigs: () => (/* binding */ mergeConfigs), |
| 18168 |
/* harmony export */ twJoin: () => (/* binding */ twJoin), |
| 18169 |
/* harmony export */ twMerge: () => (/* binding */ twMerge), |
| 18170 |
/* harmony export */ validators: () => (/* binding */ validators) |
| 18171 |
/* harmony export */ }); |
| 18172 |
const CLASS_PART_SEPARATOR = '-'; |
| 18173 |
const createClassGroupUtils = config => { |
| 18174 |
const classMap = createClassMap(config); |
| 18175 |
const { |
| 18176 |
conflictingClassGroups, |
| 18177 |
conflictingClassGroupModifiers |
| 18178 |
} = config; |
| 18179 |
const getClassGroupId = className => { |
| 18180 |
const classParts = className.split(CLASS_PART_SEPARATOR); |
| 18181 |
// Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts. |
| 18182 |
if (classParts[0] === '' && classParts.length !== 1) { |
| 18183 |
classParts.shift(); |
| 18184 |
} |
| 18185 |
return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className); |
| 18186 |
}; |
| 18187 |
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => { |
| 18188 |
const conflicts = conflictingClassGroups[classGroupId] || []; |
| 18189 |
if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) { |
| 18190 |
return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]]; |
| 18191 |
} |
| 18192 |
return conflicts; |
| 18193 |
}; |
| 18194 |
return { |
| 18195 |
getClassGroupId, |
| 18196 |
getConflictingClassGroupIds |
| 18197 |
}; |
| 18198 |
}; |
| 18199 |
const getGroupRecursive = (classParts, classPartObject) => { |
| 18200 |
if (classParts.length === 0) { |
| 18201 |
return classPartObject.classGroupId; |
| 18202 |
} |
| 18203 |
const currentClassPart = classParts[0]; |
| 18204 |
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart); |
| 18205 |
const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined; |
| 18206 |
if (classGroupFromNextClassPart) { |
| 18207 |
return classGroupFromNextClassPart; |
| 18208 |
} |
| 18209 |
if (classPartObject.validators.length === 0) { |
| 18210 |
return undefined; |
| 18211 |
} |
| 18212 |
const classRest = classParts.join(CLASS_PART_SEPARATOR); |
| 18213 |
return classPartObject.validators.find(({ |
| 18214 |
validator |
| 18215 |
}) => validator(classRest))?.classGroupId; |
| 18216 |
}; |
| 18217 |
const arbitraryPropertyRegex = /^\[(.+)\]$/; |
| 18218 |
const getGroupIdForArbitraryProperty = className => { |
| 18219 |
if (arbitraryPropertyRegex.test(className)) { |
| 18220 |
const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1]; |
| 18221 |
const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':')); |
| 18222 |
if (property) { |
| 18223 |
// I use two dots here because one dot is used as prefix for class groups in plugins |
| 18224 |
return 'arbitrary..' + property; |
| 18225 |
} |
| 18226 |
} |
| 18227 |
}; |
| 18228 |
/** |
| 18229 |
* Exported for testing only |
| 18230 |
*/ |
| 18231 |
const createClassMap = config => { |
| 18232 |
const { |
| 18233 |
theme, |
| 18234 |
prefix |
| 18235 |
} = config; |
| 18236 |
const classMap = { |
| 18237 |
nextPart: new Map(), |
| 18238 |
validators: [] |
| 18239 |
}; |
| 18240 |
const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix); |
| 18241 |
prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => { |
| 18242 |
processClassesRecursively(classGroup, classMap, classGroupId, theme); |
| 18243 |
}); |
| 18244 |
return classMap; |
| 18245 |
}; |
| 18246 |
const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => { |
| 18247 |
classGroup.forEach(classDefinition => { |
| 18248 |
if (typeof classDefinition === 'string') { |
| 18249 |
const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition); |
| 18250 |
classPartObjectToEdit.classGroupId = classGroupId; |
| 18251 |
return; |
| 18252 |
} |
| 18253 |
if (typeof classDefinition === 'function') { |
| 18254 |
if (isThemeGetter(classDefinition)) { |
| 18255 |
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme); |
| 18256 |
return; |
| 18257 |
} |
| 18258 |
classPartObject.validators.push({ |
| 18259 |
validator: classDefinition, |
| 18260 |
classGroupId |
| 18261 |
}); |
| 18262 |
return; |
| 18263 |
} |
| 18264 |
Object.entries(classDefinition).forEach(([key, classGroup]) => { |
| 18265 |
processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme); |
| 18266 |
}); |
| 18267 |
}); |
| 18268 |
}; |
| 18269 |
const getPart = (classPartObject, path) => { |
| 18270 |
let currentClassPartObject = classPartObject; |
| 18271 |
path.split(CLASS_PART_SEPARATOR).forEach(pathPart => { |
| 18272 |
if (!currentClassPartObject.nextPart.has(pathPart)) { |
| 18273 |
currentClassPartObject.nextPart.set(pathPart, { |
| 18274 |
nextPart: new Map(), |
| 18275 |
validators: [] |
| 18276 |
}); |
| 18277 |
} |
| 18278 |
currentClassPartObject = currentClassPartObject.nextPart.get(pathPart); |
| 18279 |
}); |
| 18280 |
return currentClassPartObject; |
| 18281 |
}; |
| 18282 |
const isThemeGetter = func => func.isThemeGetter; |
| 18283 |
const getPrefixedClassGroupEntries = (classGroupEntries, prefix) => { |
| 18284 |
if (!prefix) { |
| 18285 |
return classGroupEntries; |
| 18286 |
} |
| 18287 |
return classGroupEntries.map(([classGroupId, classGroup]) => { |
| 18288 |
const prefixedClassGroup = classGroup.map(classDefinition => { |
| 18289 |
if (typeof classDefinition === 'string') { |
| 18290 |
return prefix + classDefinition; |
| 18291 |
} |
| 18292 |
if (typeof classDefinition === 'object') { |
| 18293 |
return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value])); |
| 18294 |
} |
| 18295 |
return classDefinition; |
| 18296 |
}); |
| 18297 |
return [classGroupId, prefixedClassGroup]; |
| 18298 |
}); |
| 18299 |
}; |
| 18300 |
|
| 18301 |
// LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance |
| 18302 |
const createLruCache = maxCacheSize => { |
| 18303 |
if (maxCacheSize < 1) { |
| 18304 |
return { |
| 18305 |
get: () => undefined, |
| 18306 |
set: () => {} |
| 18307 |
}; |
| 18308 |
} |
| 18309 |
let cacheSize = 0; |
| 18310 |
let cache = new Map(); |
| 18311 |
let previousCache = new Map(); |
| 18312 |
const update = (key, value) => { |
| 18313 |
cache.set(key, value); |
| 18314 |
cacheSize++; |
| 18315 |
if (cacheSize > maxCacheSize) { |
| 18316 |
cacheSize = 0; |
| 18317 |
previousCache = cache; |
| 18318 |
cache = new Map(); |
| 18319 |
} |
| 18320 |
}; |
| 18321 |
return { |
| 18322 |
get(key) { |
| 18323 |
let value = cache.get(key); |
| 18324 |
if (value !== undefined) { |
| 18325 |
return value; |
| 18326 |
} |
| 18327 |
if ((value = previousCache.get(key)) !== undefined) { |
| 18328 |
update(key, value); |
| 18329 |
return value; |
| 18330 |
} |
| 18331 |
}, |
| 18332 |
set(key, value) { |
| 18333 |
if (cache.has(key)) { |
| 18334 |
cache.set(key, value); |
| 18335 |
} else { |
| 18336 |
update(key, value); |
| 18337 |
} |
| 18338 |
} |
| 18339 |
}; |
| 18340 |
}; |
| 18341 |
const IMPORTANT_MODIFIER = '!'; |
| 18342 |
const createParseClassName = config => { |
| 18343 |
const { |
| 18344 |
separator, |
| 18345 |
experimentalParseClassName |
| 18346 |
} = config; |
| 18347 |
const isSeparatorSingleCharacter = separator.length === 1; |
| 18348 |
const firstSeparatorCharacter = separator[0]; |
| 18349 |
const separatorLength = separator.length; |
| 18350 |
// parseClassName inspired by https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js |
| 18351 |
const parseClassName = className => { |
| 18352 |
const modifiers = []; |
| 18353 |
let bracketDepth = 0; |
| 18354 |
let modifierStart = 0; |
| 18355 |
let postfixModifierPosition; |
| 18356 |
for (let index = 0; index < className.length; index++) { |
| 18357 |
let currentCharacter = className[index]; |
| 18358 |
if (bracketDepth === 0) { |
| 18359 |
if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) { |
| 18360 |
modifiers.push(className.slice(modifierStart, index)); |
| 18361 |
modifierStart = index + separatorLength; |
| 18362 |
continue; |
| 18363 |
} |
| 18364 |
if (currentCharacter === '/') { |
| 18365 |
postfixModifierPosition = index; |
| 18366 |
continue; |
| 18367 |
} |
| 18368 |
} |
| 18369 |
if (currentCharacter === '[') { |
| 18370 |
bracketDepth++; |
| 18371 |
} else if (currentCharacter === ']') { |
| 18372 |
bracketDepth--; |
| 18373 |
} |
| 18374 |
} |
| 18375 |
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart); |
| 18376 |
const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER); |
| 18377 |
const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier; |
| 18378 |
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined; |
| 18379 |
return { |
| 18380 |
modifiers, |
| 18381 |
hasImportantModifier, |
| 18382 |
baseClassName, |
| 18383 |
maybePostfixModifierPosition |
| 18384 |
}; |
| 18385 |
}; |
| 18386 |
if (experimentalParseClassName) { |
| 18387 |
return className => experimentalParseClassName({ |
| 18388 |
className, |
| 18389 |
parseClassName |
| 18390 |
}); |
| 18391 |
} |
| 18392 |
return parseClassName; |
| 18393 |
}; |
| 18394 |
/** |
| 18395 |
* Sorts modifiers according to following schema: |
| 18396 |
* - Predefined modifiers are sorted alphabetically |
| 18397 |
* - When an arbitrary variant appears, it must be preserved which modifiers are before and after it |
| 18398 |
*/ |
| 18399 |
const sortModifiers = modifiers => { |
| 18400 |
if (modifiers.length <= 1) { |
| 18401 |
return modifiers; |
| 18402 |
} |
| 18403 |
const sortedModifiers = []; |
| 18404 |
let unsortedModifiers = []; |
| 18405 |
modifiers.forEach(modifier => { |
| 18406 |
const isArbitraryVariant = modifier[0] === '['; |
| 18407 |
if (isArbitraryVariant) { |
| 18408 |
sortedModifiers.push(...unsortedModifiers.sort(), modifier); |
| 18409 |
unsortedModifiers = []; |
| 18410 |
} else { |
| 18411 |
unsortedModifiers.push(modifier); |
| 18412 |
} |
| 18413 |
}); |
| 18414 |
sortedModifiers.push(...unsortedModifiers.sort()); |
| 18415 |
return sortedModifiers; |
| 18416 |
}; |
| 18417 |
const createConfigUtils = config => ({ |
| 18418 |
cache: createLruCache(config.cacheSize), |
| 18419 |
parseClassName: createParseClassName(config), |
| 18420 |
...createClassGroupUtils(config) |
| 18421 |
}); |
| 18422 |
const SPLIT_CLASSES_REGEX = /\s+/; |
| 18423 |
const mergeClassList = (classList, configUtils) => { |
| 18424 |
const { |
| 18425 |
parseClassName, |
| 18426 |
getClassGroupId, |
| 18427 |
getConflictingClassGroupIds |
| 18428 |
} = configUtils; |
| 18429 |
/** |
| 18430 |
* Set of classGroupIds in following format: |
| 18431 |
* `{importantModifier}{variantModifiers}{classGroupId}` |
| 18432 |
* @example 'float' |
| 18433 |
* @example 'hover:focus:bg-color' |
| 18434 |
* @example 'md:!pr' |
| 18435 |
*/ |
| 18436 |
const classGroupsInConflict = []; |
| 18437 |
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX); |
| 18438 |
let result = ''; |
| 18439 |
for (let index = classNames.length - 1; index >= 0; index -= 1) { |
| 18440 |
const originalClassName = classNames[index]; |
| 18441 |
const { |
| 18442 |
modifiers, |
| 18443 |
hasImportantModifier, |
| 18444 |
baseClassName, |
| 18445 |
maybePostfixModifierPosition |
| 18446 |
} = parseClassName(originalClassName); |
| 18447 |
let hasPostfixModifier = Boolean(maybePostfixModifierPosition); |
| 18448 |
let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName); |
| 18449 |
if (!classGroupId) { |
| 18450 |
if (!hasPostfixModifier) { |
| 18451 |
// Not a Tailwind class |
| 18452 |
result = originalClassName + (result.length > 0 ? ' ' + result : result); |
| 18453 |
continue; |
| 18454 |
} |
| 18455 |
classGroupId = getClassGroupId(baseClassName); |
| 18456 |
if (!classGroupId) { |
| 18457 |
// Not a Tailwind class |
| 18458 |
result = originalClassName + (result.length > 0 ? ' ' + result : result); |
| 18459 |
continue; |
| 18460 |
} |
| 18461 |
hasPostfixModifier = false; |
| 18462 |
} |
| 18463 |
const variantModifier = sortModifiers(modifiers).join(':'); |
| 18464 |
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier; |
| 18465 |
const classId = modifierId + classGroupId; |
| 18466 |
if (classGroupsInConflict.includes(classId)) { |
| 18467 |
// Tailwind class omitted due to conflict |
| 18468 |
continue; |
| 18469 |
} |
| 18470 |
classGroupsInConflict.push(classId); |
| 18471 |
const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier); |
| 18472 |
for (let i = 0; i < conflictGroups.length; ++i) { |
| 18473 |
const group = conflictGroups[i]; |
| 18474 |
classGroupsInConflict.push(modifierId + group); |
| 18475 |
} |
| 18476 |
// Tailwind class not in conflict |
| 18477 |
result = originalClassName + (result.length > 0 ? ' ' + result : result); |
| 18478 |
} |
| 18479 |
return result; |
| 18480 |
}; |
| 18481 |
|
| 18482 |
/** |
| 18483 |
* The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better. |
| 18484 |
* |
| 18485 |
* Specifically: |
| 18486 |
* - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js |
| 18487 |
* - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts |
| 18488 |
* |
| 18489 |
* Original code has MIT license: Copyright (c) Luke Edwards <[email protected]> (lukeed.com) |
| 18490 |
*/ |
| 18491 |
function twJoin() { |
| 18492 |
let index = 0; |
| 18493 |
let argument; |
| 18494 |
let resolvedValue; |
| 18495 |
let string = ''; |
| 18496 |
while (index < arguments.length) { |
| 18497 |
if (argument = arguments[index++]) { |
| 18498 |
if (resolvedValue = toValue(argument)) { |
| 18499 |
string && (string += ' '); |
| 18500 |
string += resolvedValue; |
| 18501 |
} |
| 18502 |
} |
| 18503 |
} |
| 18504 |
return string; |
| 18505 |
} |
| 18506 |
const toValue = mix => { |
| 18507 |
if (typeof mix === 'string') { |
| 18508 |
return mix; |
| 18509 |
} |
| 18510 |
let resolvedValue; |
| 18511 |
let string = ''; |
| 18512 |
for (let k = 0; k < mix.length; k++) { |
| 18513 |
if (mix[k]) { |
| 18514 |
if (resolvedValue = toValue(mix[k])) { |
| 18515 |
string && (string += ' '); |
| 18516 |
string += resolvedValue; |
| 18517 |
} |
| 18518 |
} |
| 18519 |
} |
| 18520 |
return string; |
| 18521 |
}; |
| 18522 |
function createTailwindMerge(createConfigFirst, ...createConfigRest) { |
| 18523 |
let configUtils; |
| 18524 |
let cacheGet; |
| 18525 |
let cacheSet; |
| 18526 |
let functionToCall = initTailwindMerge; |
| 18527 |
function initTailwindMerge(classList) { |
| 18528 |
const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst()); |
| 18529 |
configUtils = createConfigUtils(config); |
| 18530 |
cacheGet = configUtils.cache.get; |
| 18531 |
cacheSet = configUtils.cache.set; |
| 18532 |
functionToCall = tailwindMerge; |
| 18533 |
return tailwindMerge(classList); |
| 18534 |
} |
| 18535 |
function tailwindMerge(classList) { |
| 18536 |
const cachedResult = cacheGet(classList); |
| 18537 |
if (cachedResult) { |
| 18538 |
return cachedResult; |
| 18539 |
} |
| 18540 |
const result = mergeClassList(classList, configUtils); |
| 18541 |
cacheSet(classList, result); |
| 18542 |
return result; |
| 18543 |
} |
| 18544 |
return function callTailwindMerge() { |
| 18545 |
return functionToCall(twJoin.apply(null, arguments)); |
| 18546 |
}; |
| 18547 |
} |
| 18548 |
const fromTheme = key => { |
| 18549 |
const themeGetter = theme => theme[key] || []; |
| 18550 |
themeGetter.isThemeGetter = true; |
| 18551 |
return themeGetter; |
| 18552 |
}; |
| 18553 |
const arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i; |
| 18554 |
const fractionRegex = /^\d+\/\d+$/; |
| 18555 |
const stringLengths = /*#__PURE__*/new Set(['px', 'full', 'screen']); |
| 18556 |
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/; |
| 18557 |
const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/; |
| 18558 |
const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/; |
| 18559 |
// Shadow always begins with x and y offset separated by underscore optionally prepended by inset |
| 18560 |
const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/; |
| 18561 |
const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/; |
| 18562 |
const isLength = value => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value); |
| 18563 |
const isArbitraryLength = value => getIsArbitraryValue(value, 'length', isLengthOnly); |
| 18564 |
const isNumber = value => Boolean(value) && !Number.isNaN(Number(value)); |
| 18565 |
const isArbitraryNumber = value => getIsArbitraryValue(value, 'number', isNumber); |
| 18566 |
const isInteger = value => Boolean(value) && Number.isInteger(Number(value)); |
| 18567 |
const isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1)); |
| 18568 |
const isArbitraryValue = value => arbitraryValueRegex.test(value); |
| 18569 |
const isTshirtSize = value => tshirtUnitRegex.test(value); |
| 18570 |
const sizeLabels = /*#__PURE__*/new Set(['length', 'size', 'percentage']); |
| 18571 |
const isArbitrarySize = value => getIsArbitraryValue(value, sizeLabels, isNever); |
| 18572 |
const isArbitraryPosition = value => getIsArbitraryValue(value, 'position', isNever); |
| 18573 |
const imageLabels = /*#__PURE__*/new Set(['image', 'url']); |
| 18574 |
const isArbitraryImage = value => getIsArbitraryValue(value, imageLabels, isImage); |
| 18575 |
const isArbitraryShadow = value => getIsArbitraryValue(value, '', isShadow); |
| 18576 |
const isAny = () => true; |
| 18577 |
const getIsArbitraryValue = (value, label, testValue) => { |
| 18578 |
const result = arbitraryValueRegex.exec(value); |
| 18579 |
if (result) { |
| 18580 |
if (result[1]) { |
| 18581 |
return typeof label === 'string' ? result[1] === label : label.has(result[1]); |
| 18582 |
} |
| 18583 |
return testValue(result[2]); |
| 18584 |
} |
| 18585 |
return false; |
| 18586 |
}; |
| 18587 |
const isLengthOnly = value => |
| 18588 |
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths. |
| 18589 |
// For example, `hsl(0 0% 0%)` would be classified as a length without this check. |
| 18590 |
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough. |
| 18591 |
lengthUnitRegex.test(value) && !colorFunctionRegex.test(value); |
| 18592 |
const isNever = () => false; |
| 18593 |
const isShadow = value => shadowRegex.test(value); |
| 18594 |
const isImage = value => imageRegex.test(value); |
| 18595 |
const validators = /*#__PURE__*/Object.defineProperty({ |
| 18596 |
__proto__: null, |
| 18597 |
isAny, |
| 18598 |
isArbitraryImage, |
| 18599 |
isArbitraryLength, |
| 18600 |
isArbitraryNumber, |
| 18601 |
isArbitraryPosition, |
| 18602 |
isArbitraryShadow, |
| 18603 |
isArbitrarySize, |
| 18604 |
isArbitraryValue, |
| 18605 |
isInteger, |
| 18606 |
isLength, |
| 18607 |
isNumber, |
| 18608 |
isPercent, |
| 18609 |
isTshirtSize |
| 18610 |
}, Symbol.toStringTag, { |
| 18611 |
value: 'Module' |
| 18612 |
}); |
| 18613 |
const getDefaultConfig = () => { |
| 18614 |
const colors = fromTheme('colors'); |
| 18615 |
const spacing = fromTheme('spacing'); |
| 18616 |
const blur = fromTheme('blur'); |
| 18617 |
const brightness = fromTheme('brightness'); |
| 18618 |
const borderColor = fromTheme('borderColor'); |
| 18619 |
const borderRadius = fromTheme('borderRadius'); |
| 18620 |
const borderSpacing = fromTheme('borderSpacing'); |
| 18621 |
const borderWidth = fromTheme('borderWidth'); |
| 18622 |
const contrast = fromTheme('contrast'); |
| 18623 |
const grayscale = fromTheme('grayscale'); |
| 18624 |
const hueRotate = fromTheme('hueRotate'); |
| 18625 |
const invert = fromTheme('invert'); |
| 18626 |
const gap = fromTheme('gap'); |
| 18627 |
const gradientColorStops = fromTheme('gradientColorStops'); |
| 18628 |
const gradientColorStopPositions = fromTheme('gradientColorStopPositions'); |
| 18629 |
const inset = fromTheme('inset'); |
| 18630 |
const margin = fromTheme('margin'); |
| 18631 |
const opacity = fromTheme('opacity'); |
| 18632 |
const padding = fromTheme('padding'); |
| 18633 |
const saturate = fromTheme('saturate'); |
| 18634 |
const scale = fromTheme('scale'); |
| 18635 |
const sepia = fromTheme('sepia'); |
| 18636 |
const skew = fromTheme('skew'); |
| 18637 |
const space = fromTheme('space'); |
| 18638 |
const translate = fromTheme('translate'); |
| 18639 |
const getOverscroll = () => ['auto', 'contain', 'none']; |
| 18640 |
const getOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll']; |
| 18641 |
const getSpacingWithAutoAndArbitrary = () => ['auto', isArbitraryValue, spacing]; |
| 18642 |
const getSpacingWithArbitrary = () => [isArbitraryValue, spacing]; |
| 18643 |
const getLengthWithEmptyAndArbitrary = () => ['', isLength, isArbitraryLength]; |
| 18644 |
const getNumberWithAutoAndArbitrary = () => ['auto', isNumber, isArbitraryValue]; |
| 18645 |
const getPositions = () => ['bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top']; |
| 18646 |
const getLineStyles = () => ['solid', 'dashed', 'dotted', 'double', 'none']; |
| 18647 |
const getBlendModes = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity']; |
| 18648 |
const getAlign = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch']; |
| 18649 |
const getZeroAndEmpty = () => ['', '0', isArbitraryValue]; |
| 18650 |
const getBreaks = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column']; |
| 18651 |
const getNumberAndArbitrary = () => [isNumber, isArbitraryValue]; |
| 18652 |
return { |
| 18653 |
cacheSize: 500, |
| 18654 |
separator: ':', |
| 18655 |
theme: { |
| 18656 |
colors: [isAny], |
| 18657 |
spacing: [isLength, isArbitraryLength], |
| 18658 |
blur: ['none', '', isTshirtSize, isArbitraryValue], |
| 18659 |
brightness: getNumberAndArbitrary(), |
| 18660 |
borderColor: [colors], |
| 18661 |
borderRadius: ['none', '', 'full', isTshirtSize, isArbitraryValue], |
| 18662 |
borderSpacing: getSpacingWithArbitrary(), |
| 18663 |
borderWidth: getLengthWithEmptyAndArbitrary(), |
| 18664 |
contrast: getNumberAndArbitrary(), |
| 18665 |
grayscale: getZeroAndEmpty(), |
| 18666 |
hueRotate: getNumberAndArbitrary(), |
| 18667 |
invert: getZeroAndEmpty(), |
| 18668 |
gap: getSpacingWithArbitrary(), |
| 18669 |
gradientColorStops: [colors], |
| 18670 |
gradientColorStopPositions: [isPercent, isArbitraryLength], |
| 18671 |
inset: getSpacingWithAutoAndArbitrary(), |
| 18672 |
margin: getSpacingWithAutoAndArbitrary(), |
| 18673 |
opacity: getNumberAndArbitrary(), |
| 18674 |
padding: getSpacingWithArbitrary(), |
| 18675 |
saturate: getNumberAndArbitrary(), |
| 18676 |
scale: getNumberAndArbitrary(), |
| 18677 |
sepia: getZeroAndEmpty(), |
| 18678 |
skew: getNumberAndArbitrary(), |
| 18679 |
space: getSpacingWithArbitrary(), |
| 18680 |
translate: getSpacingWithArbitrary() |
| 18681 |
}, |
| 18682 |
classGroups: { |
| 18683 |
// Layout |
| 18684 |
/** |
| 18685 |
* Aspect Ratio |
| 18686 |
* @see https://tailwindcss.com/docs/aspect-ratio |
| 18687 |
*/ |
| 18688 |
aspect: [{ |
| 18689 |
aspect: ['auto', 'square', 'video', isArbitraryValue] |
| 18690 |
}], |
| 18691 |
/** |
| 18692 |
* Container |
| 18693 |
* @see https://tailwindcss.com/docs/container |
| 18694 |
*/ |
| 18695 |
container: ['container'], |
| 18696 |
/** |
| 18697 |
* Columns |
| 18698 |
* @see https://tailwindcss.com/docs/columns |
| 18699 |
*/ |
| 18700 |
columns: [{ |
| 18701 |
columns: [isTshirtSize] |
| 18702 |
}], |
| 18703 |
/** |
| 18704 |
* Break After |
| 18705 |
* @see https://tailwindcss.com/docs/break-after |
| 18706 |
*/ |
| 18707 |
'break-after': [{ |
| 18708 |
'break-after': getBreaks() |
| 18709 |
}], |
| 18710 |
/** |
| 18711 |
* Break Before |
| 18712 |
* @see https://tailwindcss.com/docs/break-before |
| 18713 |
*/ |
| 18714 |
'break-before': [{ |
| 18715 |
'break-before': getBreaks() |
| 18716 |
}], |
| 18717 |
/** |
| 18718 |
* Break Inside |
| 18719 |
* @see https://tailwindcss.com/docs/break-inside |
| 18720 |
*/ |
| 18721 |
'break-inside': [{ |
| 18722 |
'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column'] |
| 18723 |
}], |
| 18724 |
/** |
| 18725 |
* Box Decoration Break |
| 18726 |
* @see https://tailwindcss.com/docs/box-decoration-break |
| 18727 |
*/ |
| 18728 |
'box-decoration': [{ |
| 18729 |
'box-decoration': ['slice', 'clone'] |
| 18730 |
}], |
| 18731 |
/** |
| 18732 |
* Box Sizing |
| 18733 |
* @see https://tailwindcss.com/docs/box-sizing |
| 18734 |
*/ |
| 18735 |
box: [{ |
| 18736 |
box: ['border', 'content'] |
| 18737 |
}], |
| 18738 |
/** |
| 18739 |
* Display |
| 18740 |
* @see https://tailwindcss.com/docs/display |
| 18741 |
*/ |
| 18742 |
display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'], |
| 18743 |
/** |
| 18744 |
* Floats |
| 18745 |
* @see https://tailwindcss.com/docs/float |
| 18746 |
*/ |
| 18747 |
float: [{ |
| 18748 |
float: ['right', 'left', 'none', 'start', 'end'] |
| 18749 |
}], |
| 18750 |
/** |
| 18751 |
* Clear |
| 18752 |
* @see https://tailwindcss.com/docs/clear |
| 18753 |
*/ |
| 18754 |
clear: [{ |
| 18755 |
clear: ['left', 'right', 'both', 'none', 'start', 'end'] |
| 18756 |
}], |
| 18757 |
/** |
| 18758 |
* Isolation |
| 18759 |
* @see https://tailwindcss.com/docs/isolation |
| 18760 |
*/ |
| 18761 |
isolation: ['isolate', 'isolation-auto'], |
| 18762 |
/** |
| 18763 |
* Object Fit |
| 18764 |
* @see https://tailwindcss.com/docs/object-fit |
| 18765 |
*/ |
| 18766 |
'object-fit': [{ |
| 18767 |
object: ['contain', 'cover', 'fill', 'none', 'scale-down'] |
| 18768 |
}], |
| 18769 |
/** |
| 18770 |
* Object Position |
| 18771 |
* @see https://tailwindcss.com/docs/object-position |
| 18772 |
*/ |
| 18773 |
'object-position': [{ |
| 18774 |
object: [...getPositions(), isArbitraryValue] |
| 18775 |
}], |
| 18776 |
/** |
| 18777 |
* Overflow |
| 18778 |
* @see https://tailwindcss.com/docs/overflow |
| 18779 |
*/ |
| 18780 |
overflow: [{ |
| 18781 |
overflow: getOverflow() |
| 18782 |
}], |
| 18783 |
/** |
| 18784 |
* Overflow X |
| 18785 |
* @see https://tailwindcss.com/docs/overflow |
| 18786 |
*/ |
| 18787 |
'overflow-x': [{ |
| 18788 |
'overflow-x': getOverflow() |
| 18789 |
}], |
| 18790 |
/** |
| 18791 |
* Overflow Y |
| 18792 |
* @see https://tailwindcss.com/docs/overflow |
| 18793 |
*/ |
| 18794 |
'overflow-y': [{ |
| 18795 |
'overflow-y': getOverflow() |
| 18796 |
}], |
| 18797 |
/** |
| 18798 |
* Overscroll Behavior |
| 18799 |
* @see https://tailwindcss.com/docs/overscroll-behavior |
| 18800 |
*/ |
| 18801 |
overscroll: [{ |
| 18802 |
overscroll: getOverscroll() |
| 18803 |
}], |
| 18804 |
/** |
| 18805 |
* Overscroll Behavior X |
| 18806 |
* @see https://tailwindcss.com/docs/overscroll-behavior |
| 18807 |
*/ |
| 18808 |
'overscroll-x': [{ |
| 18809 |
'overscroll-x': getOverscroll() |
| 18810 |
}], |
| 18811 |
/** |
| 18812 |
* Overscroll Behavior Y |
| 18813 |
* @see https://tailwindcss.com/docs/overscroll-behavior |
| 18814 |
*/ |
| 18815 |
'overscroll-y': [{ |
| 18816 |
'overscroll-y': getOverscroll() |
| 18817 |
}], |
| 18818 |
/** |
| 18819 |
* Position |
| 18820 |
* @see https://tailwindcss.com/docs/position |
| 18821 |
*/ |
| 18822 |
position: ['static', 'fixed', 'absolute', 'relative', 'sticky'], |
| 18823 |
/** |
| 18824 |
* Top / Right / Bottom / Left |
| 18825 |
* @see https://tailwindcss.com/docs/top-right-bottom-left |
| 18826 |
*/ |
| 18827 |
inset: [{ |
| 18828 |
inset: [inset] |
| 18829 |
}], |
| 18830 |
/** |
| 18831 |
* Right / Left |
| 18832 |
* @see https://tailwindcss.com/docs/top-right-bottom-left |
| 18833 |
*/ |
| 18834 |
'inset-x': [{ |
| 18835 |
'inset-x': [inset] |
| 18836 |
}], |
| 18837 |
/** |
| 18838 |
* Top / Bottom |
| 18839 |
* @see https://tailwindcss.com/docs/top-right-bottom-left |
| 18840 |
*/ |
| 18841 |
'inset-y': [{ |
| 18842 |
'inset-y': [inset] |
| 18843 |
}], |
| 18844 |
/** |
| 18845 |
* Start |
| 18846 |
* @see https://tailwindcss.com/docs/top-right-bottom-left |
| 18847 |
*/ |
| 18848 |
start: [{ |
| 18849 |
start: [inset] |
| 18850 |
}], |
| 18851 |
/** |
| 18852 |
* End |
| 18853 |
* @see https://tailwindcss.com/docs/top-right-bottom-left |
| 18854 |
*/ |
| 18855 |
end: [{ |
| 18856 |
end: [inset] |
| 18857 |
}], |
| 18858 |
/** |
| 18859 |
* Top |
| 18860 |
* @see https://tailwindcss.com/docs/top-right-bottom-left |
| 18861 |
*/ |
| 18862 |
top: [{ |
| 18863 |
top: [inset] |
| 18864 |
}], |
| 18865 |
/** |
| 18866 |
* Right |
| 18867 |
* @see https://tailwindcss.com/docs/top-right-bottom-left |
| 18868 |
*/ |
| 18869 |
right: [{ |
| 18870 |
right: [inset] |
| 18871 |
}], |
| 18872 |
/** |
| 18873 |
* Bottom |
| 18874 |
* @see https://tailwindcss.com/docs/top-right-bottom-left |
| 18875 |
*/ |
| 18876 |
bottom: [{ |
| 18877 |
bottom: [inset] |
| 18878 |
}], |
| 18879 |
/** |
| 18880 |
* Left |
| 18881 |
* @see https://tailwindcss.com/docs/top-right-bottom-left |
| 18882 |
*/ |
| 18883 |
left: [{ |
| 18884 |
left: [inset] |
| 18885 |
}], |
| 18886 |
/** |
| 18887 |
* Visibility |
| 18888 |
* @see https://tailwindcss.com/docs/visibility |
| 18889 |
*/ |
| 18890 |
visibility: ['visible', 'invisible', 'collapse'], |
| 18891 |
/** |
| 18892 |
* Z-Index |
| 18893 |
* @see https://tailwindcss.com/docs/z-index |
| 18894 |
*/ |
| 18895 |
z: [{ |
| 18896 |
z: ['auto', isInteger, isArbitraryValue] |
| 18897 |
}], |
| 18898 |
// Flexbox and Grid |
| 18899 |
/** |
| 18900 |
* Flex Basis |
| 18901 |
* @see https://tailwindcss.com/docs/flex-basis |
| 18902 |
*/ |
| 18903 |
basis: [{ |
| 18904 |
basis: getSpacingWithAutoAndArbitrary() |
| 18905 |
}], |
| 18906 |
/** |
| 18907 |
* Flex Direction |
| 18908 |
* @see https://tailwindcss.com/docs/flex-direction |
| 18909 |
*/ |
| 18910 |
'flex-direction': [{ |
| 18911 |
flex: ['row', 'row-reverse', 'col', 'col-reverse'] |
| 18912 |
}], |
| 18913 |
/** |
| 18914 |
* Flex Wrap |
| 18915 |
* @see https://tailwindcss.com/docs/flex-wrap |
| 18916 |
*/ |
| 18917 |
'flex-wrap': [{ |
| 18918 |
flex: ['wrap', 'wrap-reverse', 'nowrap'] |
| 18919 |
}], |
| 18920 |
/** |
| 18921 |
* Flex |
| 18922 |
* @see https://tailwindcss.com/docs/flex |
| 18923 |
*/ |
| 18924 |
flex: [{ |
| 18925 |
flex: ['1', 'auto', 'initial', 'none', isArbitraryValue] |
| 18926 |
}], |
| 18927 |
/** |
| 18928 |
* Flex Grow |
| 18929 |
* @see https://tailwindcss.com/docs/flex-grow |
| 18930 |
*/ |
| 18931 |
grow: [{ |
| 18932 |
grow: getZeroAndEmpty() |
| 18933 |
}], |
| 18934 |
/** |
| 18935 |
* Flex Shrink |
| 18936 |
* @see https://tailwindcss.com/docs/flex-shrink |
| 18937 |
*/ |
| 18938 |
shrink: [{ |
| 18939 |
shrink: getZeroAndEmpty() |
| 18940 |
}], |
| 18941 |
/** |
| 18942 |
* Order |
| 18943 |
* @see https://tailwindcss.com/docs/order |
| 18944 |
*/ |
| 18945 |
order: [{ |
| 18946 |
order: ['first', 'last', 'none', isInteger, isArbitraryValue] |
| 18947 |
}], |
| 18948 |
/** |
| 18949 |
* Grid Template Columns |
| 18950 |
* @see https://tailwindcss.com/docs/grid-template-columns |
| 18951 |
*/ |
| 18952 |
'grid-cols': [{ |
| 18953 |
'grid-cols': [isAny] |
| 18954 |
}], |
| 18955 |
/** |
| 18956 |
* Grid Column Start / End |
| 18957 |
* @see https://tailwindcss.com/docs/grid-column |
| 18958 |
*/ |
| 18959 |
'col-start-end': [{ |
| 18960 |
col: ['auto', { |
| 18961 |
span: ['full', isInteger, isArbitraryValue] |
| 18962 |
}, isArbitraryValue] |
| 18963 |
}], |
| 18964 |
/** |
| 18965 |
* Grid Column Start |
| 18966 |
* @see https://tailwindcss.com/docs/grid-column |
| 18967 |
*/ |
| 18968 |
'col-start': [{ |
| 18969 |
'col-start': getNumberWithAutoAndArbitrary() |
| 18970 |
}], |
| 18971 |
/** |
| 18972 |
* Grid Column End |
| 18973 |
* @see https://tailwindcss.com/docs/grid-column |
| 18974 |
*/ |
| 18975 |
'col-end': [{ |
| 18976 |
'col-end': getNumberWithAutoAndArbitrary() |
| 18977 |
}], |
| 18978 |
/** |
| 18979 |
* Grid Template Rows |
| 18980 |
* @see https://tailwindcss.com/docs/grid-template-rows |
| 18981 |
*/ |
| 18982 |
'grid-rows': [{ |
| 18983 |
'grid-rows': [isAny] |
| 18984 |
}], |
| 18985 |
/** |
| 18986 |
* Grid Row Start / End |
| 18987 |
* @see https://tailwindcss.com/docs/grid-row |
| 18988 |
*/ |
| 18989 |
'row-start-end': [{ |
| 18990 |
row: ['auto', { |
| 18991 |
span: [isInteger, isArbitraryValue] |
| 18992 |
}, isArbitraryValue] |
| 18993 |
}], |
| 18994 |
/** |
| 18995 |
* Grid Row Start |
| 18996 |
* @see https://tailwindcss.com/docs/grid-row |
| 18997 |
*/ |
| 18998 |
'row-start': [{ |
| 18999 |
'row-start': getNumberWithAutoAndArbitrary() |
| 19000 |
}], |
| 19001 |
/** |
| 19002 |
* Grid Row End |
| 19003 |
* @see https://tailwindcss.com/docs/grid-row |
| 19004 |
*/ |
| 19005 |
'row-end': [{ |
| 19006 |
'row-end': getNumberWithAutoAndArbitrary() |
| 19007 |
}], |
| 19008 |
/** |
| 19009 |
* Grid Auto Flow |
| 19010 |
* @see https://tailwindcss.com/docs/grid-auto-flow |
| 19011 |
*/ |
| 19012 |
'grid-flow': [{ |
| 19013 |
'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense'] |
| 19014 |
}], |
| 19015 |
/** |
| 19016 |
* Grid Auto Columns |
| 19017 |
* @see https://tailwindcss.com/docs/grid-auto-columns |
| 19018 |
*/ |
| 19019 |
'auto-cols': [{ |
| 19020 |
'auto-cols': ['auto', 'min', 'max', 'fr', isArbitraryValue] |
| 19021 |
}], |
| 19022 |
/** |
| 19023 |
* Grid Auto Rows |
| 19024 |
* @see https://tailwindcss.com/docs/grid-auto-rows |
| 19025 |
*/ |
| 19026 |
'auto-rows': [{ |
| 19027 |
'auto-rows': ['auto', 'min', 'max', 'fr', isArbitraryValue] |
| 19028 |
}], |
| 19029 |
/** |
| 19030 |
* Gap |
| 19031 |
* @see https://tailwindcss.com/docs/gap |
| 19032 |
*/ |
| 19033 |
gap: [{ |
| 19034 |
gap: [gap] |
| 19035 |
}], |
| 19036 |
/** |
| 19037 |
* Gap X |
| 19038 |
* @see https://tailwindcss.com/docs/gap |
| 19039 |
*/ |
| 19040 |
'gap-x': [{ |
| 19041 |
'gap-x': [gap] |
| 19042 |
}], |
| 19043 |
/** |
| 19044 |
* Gap Y |
| 19045 |
* @see https://tailwindcss.com/docs/gap |
| 19046 |
*/ |
| 19047 |
'gap-y': [{ |
| 19048 |
'gap-y': [gap] |
| 19049 |
}], |
| 19050 |
/** |
| 19051 |
* Justify Content |
| 19052 |
* @see https://tailwindcss.com/docs/justify-content |
| 19053 |
*/ |
| 19054 |
'justify-content': [{ |
| 19055 |
justify: ['normal', ...getAlign()] |
| 19056 |
}], |
| 19057 |
/** |
| 19058 |
* Justify Items |
| 19059 |
* @see https://tailwindcss.com/docs/justify-items |
| 19060 |
*/ |
| 19061 |
'justify-items': [{ |
| 19062 |
'justify-items': ['start', 'end', 'center', 'stretch'] |
| 19063 |
}], |
| 19064 |
/** |
| 19065 |
* Justify Self |
| 19066 |
* @see https://tailwindcss.com/docs/justify-self |
| 19067 |
*/ |
| 19068 |
'justify-self': [{ |
| 19069 |
'justify-self': ['auto', 'start', 'end', 'center', 'stretch'] |
| 19070 |
}], |
| 19071 |
/** |
| 19072 |
* Align Content |
| 19073 |
* @see https://tailwindcss.com/docs/align-content |
| 19074 |
*/ |
| 19075 |
'align-content': [{ |
| 19076 |
content: ['normal', ...getAlign(), 'baseline'] |
| 19077 |
}], |
| 19078 |
/** |
| 19079 |
* Align Items |
| 19080 |
* @see https://tailwindcss.com/docs/align-items |
| 19081 |
*/ |
| 19082 |
'align-items': [{ |
| 19083 |
items: ['start', 'end', 'center', 'baseline', 'stretch'] |
| 19084 |
}], |
| 19085 |
/** |
| 19086 |
* Align Self |
| 19087 |
* @see https://tailwindcss.com/docs/align-self |
| 19088 |
*/ |
| 19089 |
'align-self': [{ |
| 19090 |
self: ['auto', 'start', 'end', 'center', 'stretch', 'baseline'] |
| 19091 |
}], |
| 19092 |
/** |
| 19093 |
* Place Content |
| 19094 |
* @see https://tailwindcss.com/docs/place-content |
| 19095 |
*/ |
| 19096 |
'place-content': [{ |
| 19097 |
'place-content': [...getAlign(), 'baseline'] |
| 19098 |
}], |
| 19099 |
/** |
| 19100 |
* Place Items |
| 19101 |
* @see https://tailwindcss.com/docs/place-items |
| 19102 |
*/ |
| 19103 |
'place-items': [{ |
| 19104 |
'place-items': ['start', 'end', 'center', 'baseline', 'stretch'] |
| 19105 |
}], |
| 19106 |
/** |
| 19107 |
* Place Self |
| 19108 |
* @see https://tailwindcss.com/docs/place-self |
| 19109 |
*/ |
| 19110 |
'place-self': [{ |
| 19111 |
'place-self': ['auto', 'start', 'end', 'center', 'stretch'] |
| 19112 |
}], |
| 19113 |
// Spacing |
| 19114 |
/** |
| 19115 |
* Padding |
| 19116 |
* @see https://tailwindcss.com/docs/padding |
| 19117 |
*/ |
| 19118 |
p: [{ |
| 19119 |
p: [padding] |
| 19120 |
}], |
| 19121 |
/** |
| 19122 |
* Padding X |
| 19123 |
* @see https://tailwindcss.com/docs/padding |
| 19124 |
*/ |
| 19125 |
px: [{ |
| 19126 |
px: [padding] |
| 19127 |
}], |
| 19128 |
/** |
| 19129 |
* Padding Y |
| 19130 |
* @see https://tailwindcss.com/docs/padding |
| 19131 |
*/ |
| 19132 |
py: [{ |
| 19133 |
py: [padding] |
| 19134 |
}], |
| 19135 |
/** |
| 19136 |
* Padding Start |
| 19137 |
* @see https://tailwindcss.com/docs/padding |
| 19138 |
*/ |
| 19139 |
ps: [{ |
| 19140 |
ps: [padding] |
| 19141 |
}], |
| 19142 |
/** |
| 19143 |
* Padding End |
| 19144 |
* @see https://tailwindcss.com/docs/padding |
| 19145 |
*/ |
| 19146 |
pe: [{ |
| 19147 |
pe: [padding] |
| 19148 |
}], |
| 19149 |
/** |
| 19150 |
* Padding Top |
| 19151 |
* @see https://tailwindcss.com/docs/padding |
| 19152 |
*/ |
| 19153 |
pt: [{ |
| 19154 |
pt: [padding] |
| 19155 |
}], |
| 19156 |
/** |
| 19157 |
* Padding Right |
| 19158 |
* @see https://tailwindcss.com/docs/padding |
| 19159 |
*/ |
| 19160 |
pr: [{ |
| 19161 |
pr: [padding] |
| 19162 |
}], |
| 19163 |
/** |
| 19164 |
* Padding Bottom |
| 19165 |
* @see https://tailwindcss.com/docs/padding |
| 19166 |
*/ |
| 19167 |
pb: [{ |
| 19168 |
pb: [padding] |
| 19169 |
}], |
| 19170 |
/** |
| 19171 |
* Padding Left |
| 19172 |
* @see https://tailwindcss.com/docs/padding |
| 19173 |
*/ |
| 19174 |
pl: [{ |
| 19175 |
pl: [padding] |
| 19176 |
}], |
| 19177 |
/** |
| 19178 |
* Margin |
| 19179 |
* @see https://tailwindcss.com/docs/margin |
| 19180 |
*/ |
| 19181 |
m: [{ |
| 19182 |
m: [margin] |
| 19183 |
}], |
| 19184 |
/** |
| 19185 |
* Margin X |
| 19186 |
* @see https://tailwindcss.com/docs/margin |
| 19187 |
*/ |
| 19188 |
mx: [{ |
| 19189 |
mx: [margin] |
| 19190 |
}], |
| 19191 |
/** |
| 19192 |
* Margin Y |
| 19193 |
* @see https://tailwindcss.com/docs/margin |
| 19194 |
*/ |
| 19195 |
my: [{ |
| 19196 |
my: [margin] |
| 19197 |
}], |
| 19198 |
/** |
| 19199 |
* Margin Start |
| 19200 |
* @see https://tailwindcss.com/docs/margin |
| 19201 |
*/ |
| 19202 |
ms: [{ |
| 19203 |
ms: [margin] |
| 19204 |
}], |
| 19205 |
/** |
| 19206 |
* Margin End |
| 19207 |
* @see https://tailwindcss.com/docs/margin |
| 19208 |
*/ |
| 19209 |
me: [{ |
| 19210 |
me: [margin] |
| 19211 |
}], |
| 19212 |
/** |
| 19213 |
* Margin Top |
| 19214 |
* @see https://tailwindcss.com/docs/margin |
| 19215 |
*/ |
| 19216 |
mt: [{ |
| 19217 |
mt: [margin] |
| 19218 |
}], |
| 19219 |
/** |
| 19220 |
* Margin Right |
| 19221 |
* @see https://tailwindcss.com/docs/margin |
| 19222 |
*/ |
| 19223 |
mr: [{ |
| 19224 |
mr: [margin] |
| 19225 |
}], |
| 19226 |
/** |
| 19227 |
* Margin Bottom |
| 19228 |
* @see https://tailwindcss.com/docs/margin |
| 19229 |
*/ |
| 19230 |
mb: [{ |
| 19231 |
mb: [margin] |
| 19232 |
}], |
| 19233 |
/** |
| 19234 |
* Margin Left |
| 19235 |
* @see https://tailwindcss.com/docs/margin |
| 19236 |
*/ |
| 19237 |
ml: [{ |
| 19238 |
ml: [margin] |
| 19239 |
}], |
| 19240 |
/** |
| 19241 |
* Space Between X |
| 19242 |
* @see https://tailwindcss.com/docs/space |
| 19243 |
*/ |
| 19244 |
'space-x': [{ |
| 19245 |
'space-x': [space] |
| 19246 |
}], |
| 19247 |
/** |
| 19248 |
* Space Between X Reverse |
| 19249 |
* @see https://tailwindcss.com/docs/space |
| 19250 |
*/ |
| 19251 |
'space-x-reverse': ['space-x-reverse'], |
| 19252 |
/** |
| 19253 |
* Space Between Y |
| 19254 |
* @see https://tailwindcss.com/docs/space |
| 19255 |
*/ |
| 19256 |
'space-y': [{ |
| 19257 |
'space-y': [space] |
| 19258 |
}], |
| 19259 |
/** |
| 19260 |
* Space Between Y Reverse |
| 19261 |
* @see https://tailwindcss.com/docs/space |
| 19262 |
*/ |
| 19263 |
'space-y-reverse': ['space-y-reverse'], |
| 19264 |
// Sizing |
| 19265 |
/** |
| 19266 |
* Width |
| 19267 |
* @see https://tailwindcss.com/docs/width |
| 19268 |
*/ |
| 19269 |
w: [{ |
| 19270 |
w: ['auto', 'min', 'max', 'fit', 'svw', 'lvw', 'dvw', isArbitraryValue, spacing] |
| 19271 |
}], |
| 19272 |
/** |
| 19273 |
* Min-Width |
| 19274 |
* @see https://tailwindcss.com/docs/min-width |
| 19275 |
*/ |
| 19276 |
'min-w': [{ |
| 19277 |
'min-w': [isArbitraryValue, spacing, 'min', 'max', 'fit'] |
| 19278 |
}], |
| 19279 |
/** |
| 19280 |
* Max-Width |
| 19281 |
* @see https://tailwindcss.com/docs/max-width |
| 19282 |
*/ |
| 19283 |
'max-w': [{ |
| 19284 |
'max-w': [isArbitraryValue, spacing, 'none', 'full', 'min', 'max', 'fit', 'prose', { |
| 19285 |
screen: [isTshirtSize] |
| 19286 |
}, isTshirtSize] |
| 19287 |
}], |
| 19288 |
/** |
| 19289 |
* Height |
| 19290 |
* @see https://tailwindcss.com/docs/height |
| 19291 |
*/ |
| 19292 |
h: [{ |
| 19293 |
h: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit', 'svh', 'lvh', 'dvh'] |
| 19294 |
}], |
| 19295 |
/** |
| 19296 |
* Min-Height |
| 19297 |
* @see https://tailwindcss.com/docs/min-height |
| 19298 |
*/ |
| 19299 |
'min-h': [{ |
| 19300 |
'min-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh'] |
| 19301 |
}], |
| 19302 |
/** |
| 19303 |
* Max-Height |
| 19304 |
* @see https://tailwindcss.com/docs/max-height |
| 19305 |
*/ |
| 19306 |
'max-h': [{ |
| 19307 |
'max-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh'] |
| 19308 |
}], |
| 19309 |
/** |
| 19310 |
* Size |
| 19311 |
* @see https://tailwindcss.com/docs/size |
| 19312 |
*/ |
| 19313 |
size: [{ |
| 19314 |
size: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit'] |
| 19315 |
}], |
| 19316 |
// Typography |
| 19317 |
/** |
| 19318 |
* Font Size |
| 19319 |
* @see https://tailwindcss.com/docs/font-size |
| 19320 |
*/ |
| 19321 |
'font-size': [{ |
| 19322 |
text: ['base', isTshirtSize, isArbitraryLength] |
| 19323 |
}], |
| 19324 |
/** |
| 19325 |
* Font Smoothing |
| 19326 |
* @see https://tailwindcss.com/docs/font-smoothing |
| 19327 |
*/ |
| 19328 |
'font-smoothing': ['antialiased', 'subpixel-antialiased'], |
| 19329 |
/** |
| 19330 |
* Font Style |
| 19331 |
* @see https://tailwindcss.com/docs/font-style |
| 19332 |
*/ |
| 19333 |
'font-style': ['italic', 'not-italic'], |
| 19334 |
/** |
| 19335 |
* Font Weight |
| 19336 |
* @see https://tailwindcss.com/docs/font-weight |
| 19337 |
*/ |
| 19338 |
'font-weight': [{ |
| 19339 |
font: ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black', isArbitraryNumber] |
| 19340 |
}], |
| 19341 |
/** |
| 19342 |
* Font Family |
| 19343 |
* @see https://tailwindcss.com/docs/font-family |
| 19344 |
*/ |
| 19345 |
'font-family': [{ |
| 19346 |
font: [isAny] |
| 19347 |
}], |
| 19348 |
/** |
| 19349 |
* Font Variant Numeric |
| 19350 |
* @see https://tailwindcss.com/docs/font-variant-numeric |
| 19351 |
*/ |
| 19352 |
'fvn-normal': ['normal-nums'], |
| 19353 |
/** |
| 19354 |
* Font Variant Numeric |
| 19355 |
* @see https://tailwindcss.com/docs/font-variant-numeric |
| 19356 |
*/ |
| 19357 |
'fvn-ordinal': ['ordinal'], |
| 19358 |
/** |
| 19359 |
* Font Variant Numeric |
| 19360 |
* @see https://tailwindcss.com/docs/font-variant-numeric |
| 19361 |
*/ |
| 19362 |
'fvn-slashed-zero': ['slashed-zero'], |
| 19363 |
/** |
| 19364 |
* Font Variant Numeric |
| 19365 |
* @see https://tailwindcss.com/docs/font-variant-numeric |
| 19366 |
*/ |
| 19367 |
'fvn-figure': ['lining-nums', 'oldstyle-nums'], |
| 19368 |
/** |
| 19369 |
* Font Variant Numeric |
| 19370 |
* @see https://tailwindcss.com/docs/font-variant-numeric |
| 19371 |
*/ |
| 19372 |
'fvn-spacing': ['proportional-nums', 'tabular-nums'], |
| 19373 |
/** |
| 19374 |
* Font Variant Numeric |
| 19375 |
* @see https://tailwindcss.com/docs/font-variant-numeric |
| 19376 |
*/ |
| 19377 |
'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'], |
| 19378 |
/** |
| 19379 |
* Letter Spacing |
| 19380 |
* @see https://tailwindcss.com/docs/letter-spacing |
| 19381 |
*/ |
| 19382 |
tracking: [{ |
| 19383 |
tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest', isArbitraryValue] |
| 19384 |
}], |
| 19385 |
/** |
| 19386 |
* Line Clamp |
| 19387 |
* @see https://tailwindcss.com/docs/line-clamp |
| 19388 |
*/ |
| 19389 |
'line-clamp': [{ |
| 19390 |
'line-clamp': ['none', isNumber, isArbitraryNumber] |
| 19391 |
}], |
| 19392 |
/** |
| 19393 |
* Line Height |
| 19394 |
* @see https://tailwindcss.com/docs/line-height |
| 19395 |
*/ |
| 19396 |
leading: [{ |
| 19397 |
leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose', isLength, isArbitraryValue] |
| 19398 |
}], |
| 19399 |
/** |
| 19400 |
* List Style Image |
| 19401 |
* @see https://tailwindcss.com/docs/list-style-image |
| 19402 |
*/ |
| 19403 |
'list-image': [{ |
| 19404 |
'list-image': ['none', isArbitraryValue] |
| 19405 |
}], |
| 19406 |
/** |
| 19407 |
* List Style Type |
| 19408 |
* @see https://tailwindcss.com/docs/list-style-type |
| 19409 |
*/ |
| 19410 |
'list-style-type': [{ |
| 19411 |
list: ['none', 'disc', 'decimal', isArbitraryValue] |
| 19412 |
}], |
| 19413 |
/** |
| 19414 |
* List Style Position |
| 19415 |
* @see https://tailwindcss.com/docs/list-style-position |
| 19416 |
*/ |
| 19417 |
'list-style-position': [{ |
| 19418 |
list: ['inside', 'outside'] |
| 19419 |
}], |
| 19420 |
/** |
| 19421 |
* Placeholder Color |
| 19422 |
* @deprecated since Tailwind CSS v3.0.0 |
| 19423 |
* @see https://tailwindcss.com/docs/placeholder-color |
| 19424 |
*/ |
| 19425 |
'placeholder-color': [{ |
| 19426 |
placeholder: [colors] |
| 19427 |
}], |
| 19428 |
/** |
| 19429 |
* Placeholder Opacity |
| 19430 |
* @see https://tailwindcss.com/docs/placeholder-opacity |
| 19431 |
*/ |
| 19432 |
'placeholder-opacity': [{ |
| 19433 |
'placeholder-opacity': [opacity] |
| 19434 |
}], |
| 19435 |
/** |
| 19436 |
* Text Alignment |
| 19437 |
* @see https://tailwindcss.com/docs/text-align |
| 19438 |
*/ |
| 19439 |
'text-alignment': [{ |
| 19440 |
text: ['left', 'center', 'right', 'justify', 'start', 'end'] |
| 19441 |
}], |
| 19442 |
/** |
| 19443 |
* Text Color |
| 19444 |
* @see https://tailwindcss.com/docs/text-color |
| 19445 |
*/ |
| 19446 |
'text-color': [{ |
| 19447 |
text: [colors] |
| 19448 |
}], |
| 19449 |
/** |
| 19450 |
* Text Opacity |
| 19451 |
* @see https://tailwindcss.com/docs/text-opacity |
| 19452 |
*/ |
| 19453 |
'text-opacity': [{ |
| 19454 |
'text-opacity': [opacity] |
| 19455 |
}], |
| 19456 |
/** |
| 19457 |
* Text Decoration |
| 19458 |
* @see https://tailwindcss.com/docs/text-decoration |
| 19459 |
*/ |
| 19460 |
'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'], |
| 19461 |
/** |
| 19462 |
* Text Decoration Style |
| 19463 |
* @see https://tailwindcss.com/docs/text-decoration-style |
| 19464 |
*/ |
| 19465 |
'text-decoration-style': [{ |
| 19466 |
decoration: [...getLineStyles(), 'wavy'] |
| 19467 |
}], |
| 19468 |
/** |
| 19469 |
* Text Decoration Thickness |
| 19470 |
* @see https://tailwindcss.com/docs/text-decoration-thickness |
| 19471 |
*/ |
| 19472 |
'text-decoration-thickness': [{ |
| 19473 |
decoration: ['auto', 'from-font', isLength, isArbitraryLength] |
| 19474 |
}], |
| 19475 |
/** |
| 19476 |
* Text Underline Offset |
| 19477 |
* @see https://tailwindcss.com/docs/text-underline-offset |
| 19478 |
*/ |
| 19479 |
'underline-offset': [{ |
| 19480 |
'underline-offset': ['auto', isLength, isArbitraryValue] |
| 19481 |
}], |
| 19482 |
/** |
| 19483 |
* Text Decoration Color |
| 19484 |
* @see https://tailwindcss.com/docs/text-decoration-color |
| 19485 |
*/ |
| 19486 |
'text-decoration-color': [{ |
| 19487 |
decoration: [colors] |
| 19488 |
}], |
| 19489 |
/** |
| 19490 |
* Text Transform |
| 19491 |
* @see https://tailwindcss.com/docs/text-transform |
| 19492 |
*/ |
| 19493 |
'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'], |
| 19494 |
/** |
| 19495 |
* Text Overflow |
| 19496 |
* @see https://tailwindcss.com/docs/text-overflow |
| 19497 |
*/ |
| 19498 |
'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'], |
| 19499 |
/** |
| 19500 |
* Text Wrap |
| 19501 |
* @see https://tailwindcss.com/docs/text-wrap |
| 19502 |
*/ |
| 19503 |
'text-wrap': [{ |
| 19504 |
text: ['wrap', 'nowrap', 'balance', 'pretty'] |
| 19505 |
}], |
| 19506 |
/** |
| 19507 |
* Text Indent |
| 19508 |
* @see https://tailwindcss.com/docs/text-indent |
| 19509 |
*/ |
| 19510 |
indent: [{ |
| 19511 |
indent: getSpacingWithArbitrary() |
| 19512 |
}], |
| 19513 |
/** |
| 19514 |
* Vertical Alignment |
| 19515 |
* @see https://tailwindcss.com/docs/vertical-align |
| 19516 |
*/ |
| 19517 |
'vertical-align': [{ |
| 19518 |
align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryValue] |
| 19519 |
}], |
| 19520 |
/** |
| 19521 |
* Whitespace |
| 19522 |
* @see https://tailwindcss.com/docs/whitespace |
| 19523 |
*/ |
| 19524 |
whitespace: [{ |
| 19525 |
whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'] |
| 19526 |
}], |
| 19527 |
/** |
| 19528 |
* Word Break |
| 19529 |
* @see https://tailwindcss.com/docs/word-break |
| 19530 |
*/ |
| 19531 |
break: [{ |
| 19532 |
break: ['normal', 'words', 'all', 'keep'] |
| 19533 |
}], |
| 19534 |
/** |
| 19535 |
* Hyphens |
| 19536 |
* @see https://tailwindcss.com/docs/hyphens |
| 19537 |
*/ |
| 19538 |
hyphens: [{ |
| 19539 |
hyphens: ['none', 'manual', 'auto'] |
| 19540 |
}], |
| 19541 |
/** |
| 19542 |
* Content |
| 19543 |
* @see https://tailwindcss.com/docs/content |
| 19544 |
*/ |
| 19545 |
content: [{ |
| 19546 |
content: ['none', isArbitraryValue] |
| 19547 |
}], |
| 19548 |
// Backgrounds |
| 19549 |
/** |
| 19550 |
* Background Attachment |
| 19551 |
* @see https://tailwindcss.com/docs/background-attachment |
| 19552 |
*/ |
| 19553 |
'bg-attachment': [{ |
| 19554 |
bg: ['fixed', 'local', 'scroll'] |
| 19555 |
}], |
| 19556 |
/** |
| 19557 |
* Background Clip |
| 19558 |
* @see https://tailwindcss.com/docs/background-clip |
| 19559 |
*/ |
| 19560 |
'bg-clip': [{ |
| 19561 |
'bg-clip': ['border', 'padding', 'content', 'text'] |
| 19562 |
}], |
| 19563 |
/** |
| 19564 |
* Background Opacity |
| 19565 |
* @deprecated since Tailwind CSS v3.0.0 |
| 19566 |
* @see https://tailwindcss.com/docs/background-opacity |
| 19567 |
*/ |
| 19568 |
'bg-opacity': [{ |
| 19569 |
'bg-opacity': [opacity] |
| 19570 |
}], |
| 19571 |
/** |
| 19572 |
* Background Origin |
| 19573 |
* @see https://tailwindcss.com/docs/background-origin |
| 19574 |
*/ |
| 19575 |
'bg-origin': [{ |
| 19576 |
'bg-origin': ['border', 'padding', 'content'] |
| 19577 |
}], |
| 19578 |
/** |
| 19579 |
* Background Position |
| 19580 |
* @see https://tailwindcss.com/docs/background-position |
| 19581 |
*/ |
| 19582 |
'bg-position': [{ |
| 19583 |
bg: [...getPositions(), isArbitraryPosition] |
| 19584 |
}], |
| 19585 |
/** |
| 19586 |
* Background Repeat |
| 19587 |
* @see https://tailwindcss.com/docs/background-repeat |
| 19588 |
*/ |
| 19589 |
'bg-repeat': [{ |
| 19590 |
bg: ['no-repeat', { |
| 19591 |
repeat: ['', 'x', 'y', 'round', 'space'] |
| 19592 |
}] |
| 19593 |
}], |
| 19594 |
/** |
| 19595 |
* Background Size |
| 19596 |
* @see https://tailwindcss.com/docs/background-size |
| 19597 |
*/ |
| 19598 |
'bg-size': [{ |
| 19599 |
bg: ['auto', 'cover', 'contain', isArbitrarySize] |
| 19600 |
}], |
| 19601 |
/** |
| 19602 |
* Background Image |
| 19603 |
* @see https://tailwindcss.com/docs/background-image |
| 19604 |
*/ |
| 19605 |
'bg-image': [{ |
| 19606 |
bg: ['none', { |
| 19607 |
'gradient-to': ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl'] |
| 19608 |
}, isArbitraryImage] |
| 19609 |
}], |
| 19610 |
/** |
| 19611 |
* Background Color |
| 19612 |
* @see https://tailwindcss.com/docs/background-color |
| 19613 |
*/ |
| 19614 |
'bg-color': [{ |
| 19615 |
bg: [colors] |
| 19616 |
}], |
| 19617 |
/** |
| 19618 |
* Gradient Color Stops From Position |
| 19619 |
* @see https://tailwindcss.com/docs/gradient-color-stops |
| 19620 |
*/ |
| 19621 |
'gradient-from-pos': [{ |
| 19622 |
from: [gradientColorStopPositions] |
| 19623 |
}], |
| 19624 |
/** |
| 19625 |
* Gradient Color Stops Via Position |
| 19626 |
* @see https://tailwindcss.com/docs/gradient-color-stops |
| 19627 |
*/ |
| 19628 |
'gradient-via-pos': [{ |
| 19629 |
via: [gradientColorStopPositions] |
| 19630 |
}], |
| 19631 |
/** |
| 19632 |
* Gradient Color Stops To Position |
| 19633 |
* @see https://tailwindcss.com/docs/gradient-color-stops |
| 19634 |
*/ |
| 19635 |
'gradient-to-pos': [{ |
| 19636 |
to: [gradientColorStopPositions] |
| 19637 |
}], |
| 19638 |
/** |
| 19639 |
* Gradient Color Stops From |
| 19640 |
* @see https://tailwindcss.com/docs/gradient-color-stops |
| 19641 |
*/ |
| 19642 |
'gradient-from': [{ |
| 19643 |
from: [gradientColorStops] |
| 19644 |
}], |
| 19645 |
/** |
| 19646 |
* Gradient Color Stops Via |
| 19647 |
* @see https://tailwindcss.com/docs/gradient-color-stops |
| 19648 |
*/ |
| 19649 |
'gradient-via': [{ |
| 19650 |
via: [gradientColorStops] |
| 19651 |
}], |
| 19652 |
/** |
| 19653 |
* Gradient Color Stops To |
| 19654 |
* @see https://tailwindcss.com/docs/gradient-color-stops |
| 19655 |
*/ |
| 19656 |
'gradient-to': [{ |
| 19657 |
to: [gradientColorStops] |
| 19658 |
}], |
| 19659 |
// Borders |
| 19660 |
/** |
| 19661 |
* Border Radius |
| 19662 |
* @see https://tailwindcss.com/docs/border-radius |
| 19663 |
*/ |
| 19664 |
rounded: [{ |
| 19665 |
rounded: [borderRadius] |
| 19666 |
}], |
| 19667 |
/** |
| 19668 |
* Border Radius Start |
| 19669 |
* @see https://tailwindcss.com/docs/border-radius |
| 19670 |
*/ |
| 19671 |
'rounded-s': [{ |
| 19672 |
'rounded-s': [borderRadius] |
| 19673 |
}], |
| 19674 |
/** |
| 19675 |
* Border Radius End |
| 19676 |
* @see https://tailwindcss.com/docs/border-radius |
| 19677 |
*/ |
| 19678 |
'rounded-e': [{ |
| 19679 |
'rounded-e': [borderRadius] |
| 19680 |
}], |
| 19681 |
/** |
| 19682 |
* Border Radius Top |
| 19683 |
* @see https://tailwindcss.com/docs/border-radius |
| 19684 |
*/ |
| 19685 |
'rounded-t': [{ |
| 19686 |
'rounded-t': [borderRadius] |
| 19687 |
}], |
| 19688 |
/** |
| 19689 |
* Border Radius Right |
| 19690 |
* @see https://tailwindcss.com/docs/border-radius |
| 19691 |
*/ |
| 19692 |
'rounded-r': [{ |
| 19693 |
'rounded-r': [borderRadius] |
| 19694 |
}], |
| 19695 |
/** |
| 19696 |
* Border Radius Bottom |
| 19697 |
* @see https://tailwindcss.com/docs/border-radius |
| 19698 |
*/ |
| 19699 |
'rounded-b': [{ |
| 19700 |
'rounded-b': [borderRadius] |
| 19701 |
}], |
| 19702 |
/** |
| 19703 |
* Border Radius Left |
| 19704 |
* @see https://tailwindcss.com/docs/border-radius |
| 19705 |
*/ |
| 19706 |
'rounded-l': [{ |
| 19707 |
'rounded-l': [borderRadius] |
| 19708 |
}], |
| 19709 |
/** |
| 19710 |
* Border Radius Start Start |
| 19711 |
* @see https://tailwindcss.com/docs/border-radius |
| 19712 |
*/ |
| 19713 |
'rounded-ss': [{ |
| 19714 |
'rounded-ss': [borderRadius] |
| 19715 |
}], |
| 19716 |
/** |
| 19717 |
* Border Radius Start End |
| 19718 |
* @see https://tailwindcss.com/docs/border-radius |
| 19719 |
*/ |
| 19720 |
'rounded-se': [{ |
| 19721 |
'rounded-se': [borderRadius] |
| 19722 |
}], |
| 19723 |
/** |
| 19724 |
* Border Radius End End |
| 19725 |
* @see https://tailwindcss.com/docs/border-radius |
| 19726 |
*/ |
| 19727 |
'rounded-ee': [{ |
| 19728 |
'rounded-ee': [borderRadius] |
| 19729 |
}], |
| 19730 |
/** |
| 19731 |
* Border Radius End Start |
| 19732 |
* @see https://tailwindcss.com/docs/border-radius |
| 19733 |
*/ |
| 19734 |
'rounded-es': [{ |
| 19735 |
'rounded-es': [borderRadius] |
| 19736 |
}], |
| 19737 |
/** |
| 19738 |
* Border Radius Top Left |
| 19739 |
* @see https://tailwindcss.com/docs/border-radius |
| 19740 |
*/ |
| 19741 |
'rounded-tl': [{ |
| 19742 |
'rounded-tl': [borderRadius] |
| 19743 |
}], |
| 19744 |
/** |
| 19745 |
* Border Radius Top Right |
| 19746 |
* @see https://tailwindcss.com/docs/border-radius |
| 19747 |
*/ |
| 19748 |
'rounded-tr': [{ |
| 19749 |
'rounded-tr': [borderRadius] |
| 19750 |
}], |
| 19751 |
/** |
| 19752 |
* Border Radius Bottom Right |
| 19753 |
* @see https://tailwindcss.com/docs/border-radius |
| 19754 |
*/ |
| 19755 |
'rounded-br': [{ |
| 19756 |
'rounded-br': [borderRadius] |
| 19757 |
}], |
| 19758 |
/** |
| 19759 |
* Border Radius Bottom Left |
| 19760 |
* @see https://tailwindcss.com/docs/border-radius |
| 19761 |
*/ |
| 19762 |
'rounded-bl': [{ |
| 19763 |
'rounded-bl': [borderRadius] |
| 19764 |
}], |
| 19765 |
/** |
| 19766 |
* Border Width |
| 19767 |
* @see https://tailwindcss.com/docs/border-width |
| 19768 |
*/ |
| 19769 |
'border-w': [{ |
| 19770 |
border: [borderWidth] |
| 19771 |
}], |
| 19772 |
/** |
| 19773 |
* Border Width X |
| 19774 |
* @see https://tailwindcss.com/docs/border-width |
| 19775 |
*/ |
| 19776 |
'border-w-x': [{ |
| 19777 |
'border-x': [borderWidth] |
| 19778 |
}], |
| 19779 |
/** |
| 19780 |
* Border Width Y |
| 19781 |
* @see https://tailwindcss.com/docs/border-width |
| 19782 |
*/ |
| 19783 |
'border-w-y': [{ |
| 19784 |
'border-y': [borderWidth] |
| 19785 |
}], |
| 19786 |
/** |
| 19787 |
* Border Width Start |
| 19788 |
* @see https://tailwindcss.com/docs/border-width |
| 19789 |
*/ |
| 19790 |
'border-w-s': [{ |
| 19791 |
'border-s': [borderWidth] |
| 19792 |
}], |
| 19793 |
/** |
| 19794 |
* Border Width End |
| 19795 |
* @see https://tailwindcss.com/docs/border-width |
| 19796 |
*/ |
| 19797 |
'border-w-e': [{ |
| 19798 |
'border-e': [borderWidth] |
| 19799 |
}], |
| 19800 |
/** |
| 19801 |
* Border Width Top |
| 19802 |
* @see https://tailwindcss.com/docs/border-width |
| 19803 |
*/ |
| 19804 |
'border-w-t': [{ |
| 19805 |
'border-t': [borderWidth] |
| 19806 |
}], |
| 19807 |
/** |
| 19808 |
* Border Width Right |
| 19809 |
* @see https://tailwindcss.com/docs/border-width |
| 19810 |
*/ |
| 19811 |
'border-w-r': [{ |
| 19812 |
'border-r': [borderWidth] |
| 19813 |
}], |
| 19814 |
/** |
| 19815 |
* Border Width Bottom |
| 19816 |
* @see https://tailwindcss.com/docs/border-width |
| 19817 |
*/ |
| 19818 |
'border-w-b': [{ |
| 19819 |
'border-b': [borderWidth] |
| 19820 |
}], |
| 19821 |
/** |
| 19822 |
* Border Width Left |
| 19823 |
* @see https://tailwindcss.com/docs/border-width |
| 19824 |
*/ |
| 19825 |
'border-w-l': [{ |
| 19826 |
'border-l': [borderWidth] |
| 19827 |
}], |
| 19828 |
/** |
| 19829 |
* Border Opacity |
| 19830 |
* @see https://tailwindcss.com/docs/border-opacity |
| 19831 |
*/ |
| 19832 |
'border-opacity': [{ |
| 19833 |
'border-opacity': [opacity] |
| 19834 |
}], |
| 19835 |
/** |
| 19836 |
* Border Style |
| 19837 |
* @see https://tailwindcss.com/docs/border-style |
| 19838 |
*/ |
| 19839 |
'border-style': [{ |
| 19840 |
border: [...getLineStyles(), 'hidden'] |
| 19841 |
}], |
| 19842 |
/** |
| 19843 |
* Divide Width X |
| 19844 |
* @see https://tailwindcss.com/docs/divide-width |
| 19845 |
*/ |
| 19846 |
'divide-x': [{ |
| 19847 |
'divide-x': [borderWidth] |
| 19848 |
}], |
| 19849 |
/** |
| 19850 |
* Divide Width X Reverse |
| 19851 |
* @see https://tailwindcss.com/docs/divide-width |
| 19852 |
*/ |
| 19853 |
'divide-x-reverse': ['divide-x-reverse'], |
| 19854 |
/** |
| 19855 |
* Divide Width Y |
| 19856 |
* @see https://tailwindcss.com/docs/divide-width |
| 19857 |
*/ |
| 19858 |
'divide-y': [{ |
| 19859 |
'divide-y': [borderWidth] |
| 19860 |
}], |
| 19861 |
/** |
| 19862 |
* Divide Width Y Reverse |
| 19863 |
* @see https://tailwindcss.com/docs/divide-width |
| 19864 |
*/ |
| 19865 |
'divide-y-reverse': ['divide-y-reverse'], |
| 19866 |
/** |
| 19867 |
* Divide Opacity |
| 19868 |
* @see https://tailwindcss.com/docs/divide-opacity |
| 19869 |
*/ |
| 19870 |
'divide-opacity': [{ |
| 19871 |
'divide-opacity': [opacity] |
| 19872 |
}], |
| 19873 |
/** |
| 19874 |
* Divide Style |
| 19875 |
* @see https://tailwindcss.com/docs/divide-style |
| 19876 |
*/ |
| 19877 |
'divide-style': [{ |
| 19878 |
divide: getLineStyles() |
| 19879 |
}], |
| 19880 |
/** |
| 19881 |
* Border Color |
| 19882 |
* @see https://tailwindcss.com/docs/border-color |
| 19883 |
*/ |
| 19884 |
'border-color': [{ |
| 19885 |
border: [borderColor] |
| 19886 |
}], |
| 19887 |
/** |
| 19888 |
* Border Color X |
| 19889 |
* @see https://tailwindcss.com/docs/border-color |
| 19890 |
*/ |
| 19891 |
'border-color-x': [{ |
| 19892 |
'border-x': [borderColor] |
| 19893 |
}], |
| 19894 |
/** |
| 19895 |
* Border Color Y |
| 19896 |
* @see https://tailwindcss.com/docs/border-color |
| 19897 |
*/ |
| 19898 |
'border-color-y': [{ |
| 19899 |
'border-y': [borderColor] |
| 19900 |
}], |
| 19901 |
/** |
| 19902 |
* Border Color S |
| 19903 |
* @see https://tailwindcss.com/docs/border-color |
| 19904 |
*/ |
| 19905 |
'border-color-s': [{ |
| 19906 |
'border-s': [borderColor] |
| 19907 |
}], |
| 19908 |
/** |
| 19909 |
* Border Color E |
| 19910 |
* @see https://tailwindcss.com/docs/border-color |
| 19911 |
*/ |
| 19912 |
'border-color-e': [{ |
| 19913 |
'border-e': [borderColor] |
| 19914 |
}], |
| 19915 |
/** |
| 19916 |
* Border Color Top |
| 19917 |
* @see https://tailwindcss.com/docs/border-color |
| 19918 |
*/ |
| 19919 |
'border-color-t': [{ |
| 19920 |
'border-t': [borderColor] |
| 19921 |
}], |
| 19922 |
/** |
| 19923 |
* Border Color Right |
| 19924 |
* @see https://tailwindcss.com/docs/border-color |
| 19925 |
*/ |
| 19926 |
'border-color-r': [{ |
| 19927 |
'border-r': [borderColor] |
| 19928 |
}], |
| 19929 |
/** |
| 19930 |
* Border Color Bottom |
| 19931 |
* @see https://tailwindcss.com/docs/border-color |
| 19932 |
*/ |
| 19933 |
'border-color-b': [{ |
| 19934 |
'border-b': [borderColor] |
| 19935 |
}], |
| 19936 |
/** |
| 19937 |
* Border Color Left |
| 19938 |
* @see https://tailwindcss.com/docs/border-color |
| 19939 |
*/ |
| 19940 |
'border-color-l': [{ |
| 19941 |
'border-l': [borderColor] |
| 19942 |
}], |
| 19943 |
/** |
| 19944 |
* Divide Color |
| 19945 |
* @see https://tailwindcss.com/docs/divide-color |
| 19946 |
*/ |
| 19947 |
'divide-color': [{ |
| 19948 |
divide: [borderColor] |
| 19949 |
}], |
| 19950 |
/** |
| 19951 |
* Outline Style |
| 19952 |
* @see https://tailwindcss.com/docs/outline-style |
| 19953 |
*/ |
| 19954 |
'outline-style': [{ |
| 19955 |
outline: ['', ...getLineStyles()] |
| 19956 |
}], |
| 19957 |
/** |
| 19958 |
* Outline Offset |
| 19959 |
* @see https://tailwindcss.com/docs/outline-offset |
| 19960 |
*/ |
| 19961 |
'outline-offset': [{ |
| 19962 |
'outline-offset': [isLength, isArbitraryValue] |
| 19963 |
}], |
| 19964 |
/** |
| 19965 |
* Outline Width |
| 19966 |
* @see https://tailwindcss.com/docs/outline-width |
| 19967 |
*/ |
| 19968 |
'outline-w': [{ |
| 19969 |
outline: [isLength, isArbitraryLength] |
| 19970 |
}], |
| 19971 |
/** |
| 19972 |
* Outline Color |
| 19973 |
* @see https://tailwindcss.com/docs/outline-color |
| 19974 |
*/ |
| 19975 |
'outline-color': [{ |
| 19976 |
outline: [colors] |
| 19977 |
}], |
| 19978 |
/** |
| 19979 |
* Ring Width |
| 19980 |
* @see https://tailwindcss.com/docs/ring-width |
| 19981 |
*/ |
| 19982 |
'ring-w': [{ |
| 19983 |
ring: getLengthWithEmptyAndArbitrary() |
| 19984 |
}], |
| 19985 |
/** |
| 19986 |
* Ring Width Inset |
| 19987 |
* @see https://tailwindcss.com/docs/ring-width |
| 19988 |
*/ |
| 19989 |
'ring-w-inset': ['ring-inset'], |
| 19990 |
/** |
| 19991 |
* Ring Color |
| 19992 |
* @see https://tailwindcss.com/docs/ring-color |
| 19993 |
*/ |
| 19994 |
'ring-color': [{ |
| 19995 |
ring: [colors] |
| 19996 |
}], |
| 19997 |
/** |
| 19998 |
* Ring Opacity |
| 19999 |
* @see https://tailwindcss.com/docs/ring-opacity |
| 20000 |
*/ |
| 20001 |
'ring-opacity': [{ |
| 20002 |
'ring-opacity': [opacity] |
| 20003 |
}], |
| 20004 |
/** |
| 20005 |
* Ring Offset Width |
| 20006 |
* @see https://tailwindcss.com/docs/ring-offset-width |
| 20007 |
*/ |
| 20008 |
'ring-offset-w': [{ |
| 20009 |
'ring-offset': [isLength, isArbitraryLength] |
| 20010 |
}], |
| 20011 |
/** |
| 20012 |
* Ring Offset Color |
| 20013 |
* @see https://tailwindcss.com/docs/ring-offset-color |
| 20014 |
*/ |
| 20015 |
'ring-offset-color': [{ |
| 20016 |
'ring-offset': [colors] |
| 20017 |
}], |
| 20018 |
// Effects |
| 20019 |
/** |
| 20020 |
* Box Shadow |
| 20021 |
* @see https://tailwindcss.com/docs/box-shadow |
| 20022 |
*/ |
| 20023 |
shadow: [{ |
| 20024 |
shadow: ['', 'inner', 'none', isTshirtSize, isArbitraryShadow] |
| 20025 |
}], |
| 20026 |
/** |
| 20027 |
* Box Shadow Color |
| 20028 |
* @see https://tailwindcss.com/docs/box-shadow-color |
| 20029 |
*/ |
| 20030 |
'shadow-color': [{ |
| 20031 |
shadow: [isAny] |
| 20032 |
}], |
| 20033 |
/** |
| 20034 |
* Opacity |
| 20035 |
* @see https://tailwindcss.com/docs/opacity |
| 20036 |
*/ |
| 20037 |
opacity: [{ |
| 20038 |
opacity: [opacity] |
| 20039 |
}], |
| 20040 |
/** |
| 20041 |
* Mix Blend Mode |
| 20042 |
* @see https://tailwindcss.com/docs/mix-blend-mode |
| 20043 |
*/ |
| 20044 |
'mix-blend': [{ |
| 20045 |
'mix-blend': [...getBlendModes(), 'plus-lighter', 'plus-darker'] |
| 20046 |
}], |
| 20047 |
/** |
| 20048 |
* Background Blend Mode |
| 20049 |
* @see https://tailwindcss.com/docs/background-blend-mode |
| 20050 |
*/ |
| 20051 |
'bg-blend': [{ |
| 20052 |
'bg-blend': getBlendModes() |
| 20053 |
}], |
| 20054 |
// Filters |
| 20055 |
/** |
| 20056 |
* Filter |
| 20057 |
* @deprecated since Tailwind CSS v3.0.0 |
| 20058 |
* @see https://tailwindcss.com/docs/filter |
| 20059 |
*/ |
| 20060 |
filter: [{ |
| 20061 |
filter: ['', 'none'] |
| 20062 |
}], |
| 20063 |
/** |
| 20064 |
* Blur |
| 20065 |
* @see https://tailwindcss.com/docs/blur |
| 20066 |
*/ |
| 20067 |
blur: [{ |
| 20068 |
blur: [blur] |
| 20069 |
}], |
| 20070 |
/** |
| 20071 |
* Brightness |
| 20072 |
* @see https://tailwindcss.com/docs/brightness |
| 20073 |
*/ |
| 20074 |
brightness: [{ |
| 20075 |
brightness: [brightness] |
| 20076 |
}], |
| 20077 |
/** |
| 20078 |
* Contrast |
| 20079 |
* @see https://tailwindcss.com/docs/contrast |
| 20080 |
*/ |
| 20081 |
contrast: [{ |
| 20082 |
contrast: [contrast] |
| 20083 |
}], |
| 20084 |
/** |
| 20085 |
* Drop Shadow |
| 20086 |
* @see https://tailwindcss.com/docs/drop-shadow |
| 20087 |
*/ |
| 20088 |
'drop-shadow': [{ |
| 20089 |
'drop-shadow': ['', 'none', isTshirtSize, isArbitraryValue] |
| 20090 |
}], |
| 20091 |
/** |
| 20092 |
* Grayscale |
| 20093 |
* @see https://tailwindcss.com/docs/grayscale |
| 20094 |
*/ |
| 20095 |
grayscale: [{ |
| 20096 |
grayscale: [grayscale] |
| 20097 |
}], |
| 20098 |
/** |
| 20099 |
* Hue Rotate |
| 20100 |
* @see https://tailwindcss.com/docs/hue-rotate |
| 20101 |
*/ |
| 20102 |
'hue-rotate': [{ |
| 20103 |
'hue-rotate': [hueRotate] |
| 20104 |
}], |
| 20105 |
/** |
| 20106 |
* Invert |
| 20107 |
* @see https://tailwindcss.com/docs/invert |
| 20108 |
*/ |
| 20109 |
invert: [{ |
| 20110 |
invert: [invert] |
| 20111 |
}], |
| 20112 |
/** |
| 20113 |
* Saturate |
| 20114 |
* @see https://tailwindcss.com/docs/saturate |
| 20115 |
*/ |
| 20116 |
saturate: [{ |
| 20117 |
saturate: [saturate] |
| 20118 |
}], |
| 20119 |
/** |
| 20120 |
* Sepia |
| 20121 |
* @see https://tailwindcss.com/docs/sepia |
| 20122 |
*/ |
| 20123 |
sepia: [{ |
| 20124 |
sepia: [sepia] |
| 20125 |
}], |
| 20126 |
/** |
| 20127 |
* Backdrop Filter |
| 20128 |
* @deprecated since Tailwind CSS v3.0.0 |
| 20129 |
* @see https://tailwindcss.com/docs/backdrop-filter |
| 20130 |
*/ |
| 20131 |
'backdrop-filter': [{ |
| 20132 |
'backdrop-filter': ['', 'none'] |
| 20133 |
}], |
| 20134 |
/** |
| 20135 |
* Backdrop Blur |
| 20136 |
* @see https://tailwindcss.com/docs/backdrop-blur |
| 20137 |
*/ |
| 20138 |
'backdrop-blur': [{ |
| 20139 |
'backdrop-blur': [blur] |
| 20140 |
}], |
| 20141 |
/** |
| 20142 |
* Backdrop Brightness |
| 20143 |
* @see https://tailwindcss.com/docs/backdrop-brightness |
| 20144 |
*/ |
| 20145 |
'backdrop-brightness': [{ |
| 20146 |
'backdrop-brightness': [brightness] |
| 20147 |
}], |
| 20148 |
/** |
| 20149 |
* Backdrop Contrast |
| 20150 |
* @see https://tailwindcss.com/docs/backdrop-contrast |
| 20151 |
*/ |
| 20152 |
'backdrop-contrast': [{ |
| 20153 |
'backdrop-contrast': [contrast] |
| 20154 |
}], |
| 20155 |
/** |
| 20156 |
* Backdrop Grayscale |
| 20157 |
* @see https://tailwindcss.com/docs/backdrop-grayscale |
| 20158 |
*/ |
| 20159 |
'backdrop-grayscale': [{ |
| 20160 |
'backdrop-grayscale': [grayscale] |
| 20161 |
}], |
| 20162 |
/** |
| 20163 |
* Backdrop Hue Rotate |
| 20164 |
* @see https://tailwindcss.com/docs/backdrop-hue-rotate |
| 20165 |
*/ |
| 20166 |
'backdrop-hue-rotate': [{ |
| 20167 |
'backdrop-hue-rotate': [hueRotate] |
| 20168 |
}], |
| 20169 |
/** |
| 20170 |
* Backdrop Invert |
| 20171 |
* @see https://tailwindcss.com/docs/backdrop-invert |
| 20172 |
*/ |
| 20173 |
'backdrop-invert': [{ |
| 20174 |
'backdrop-invert': [invert] |
| 20175 |
}], |
| 20176 |
/** |
| 20177 |
* Backdrop Opacity |
| 20178 |
* @see https://tailwindcss.com/docs/backdrop-opacity |
| 20179 |
*/ |
| 20180 |
'backdrop-opacity': [{ |
| 20181 |
'backdrop-opacity': [opacity] |
| 20182 |
}], |
| 20183 |
/** |
| 20184 |
* Backdrop Saturate |
| 20185 |
* @see https://tailwindcss.com/docs/backdrop-saturate |
| 20186 |
*/ |
| 20187 |
'backdrop-saturate': [{ |
| 20188 |
'backdrop-saturate': [saturate] |
| 20189 |
}], |
| 20190 |
/** |
| 20191 |
* Backdrop Sepia |
| 20192 |
* @see https://tailwindcss.com/docs/backdrop-sepia |
| 20193 |
*/ |
| 20194 |
'backdrop-sepia': [{ |
| 20195 |
'backdrop-sepia': [sepia] |
| 20196 |
}], |
| 20197 |
// Tables |
| 20198 |
/** |
| 20199 |
* Border Collapse |
| 20200 |
* @see https://tailwindcss.com/docs/border-collapse |
| 20201 |
*/ |
| 20202 |
'border-collapse': [{ |
| 20203 |
border: ['collapse', 'separate'] |
| 20204 |
}], |
| 20205 |
/** |
| 20206 |
* Border Spacing |
| 20207 |
* @see https://tailwindcss.com/docs/border-spacing |
| 20208 |
*/ |
| 20209 |
'border-spacing': [{ |
| 20210 |
'border-spacing': [borderSpacing] |
| 20211 |
}], |
| 20212 |
/** |
| 20213 |
* Border Spacing X |
| 20214 |
* @see https://tailwindcss.com/docs/border-spacing |
| 20215 |
*/ |
| 20216 |
'border-spacing-x': [{ |
| 20217 |
'border-spacing-x': [borderSpacing] |
| 20218 |
}], |
| 20219 |
/** |
| 20220 |
* Border Spacing Y |
| 20221 |
* @see https://tailwindcss.com/docs/border-spacing |
| 20222 |
*/ |
| 20223 |
'border-spacing-y': [{ |
| 20224 |
'border-spacing-y': [borderSpacing] |
| 20225 |
}], |
| 20226 |
/** |
| 20227 |
* Table Layout |
| 20228 |
* @see https://tailwindcss.com/docs/table-layout |
| 20229 |
*/ |
| 20230 |
'table-layout': [{ |
| 20231 |
table: ['auto', 'fixed'] |
| 20232 |
}], |
| 20233 |
/** |
| 20234 |
* Caption Side |
| 20235 |
* @see https://tailwindcss.com/docs/caption-side |
| 20236 |
*/ |
| 20237 |
caption: [{ |
| 20238 |
caption: ['top', 'bottom'] |
| 20239 |
}], |
| 20240 |
// Transitions and Animation |
| 20241 |
/** |
| 20242 |
* Tranisition Property |
| 20243 |
* @see https://tailwindcss.com/docs/transition-property |
| 20244 |
*/ |
| 20245 |
transition: [{ |
| 20246 |
transition: ['none', 'all', '', 'colors', 'opacity', 'shadow', 'transform', isArbitraryValue] |
| 20247 |
}], |
| 20248 |
/** |
| 20249 |
* Transition Duration |
| 20250 |
* @see https://tailwindcss.com/docs/transition-duration |
| 20251 |
*/ |
| 20252 |
duration: [{ |
| 20253 |
duration: getNumberAndArbitrary() |
| 20254 |
}], |
| 20255 |
/** |
| 20256 |
* Transition Timing Function |
| 20257 |
* @see https://tailwindcss.com/docs/transition-timing-function |
| 20258 |
*/ |
| 20259 |
ease: [{ |
| 20260 |
ease: ['linear', 'in', 'out', 'in-out', isArbitraryValue] |
| 20261 |
}], |
| 20262 |
/** |
| 20263 |
* Transition Delay |
| 20264 |
* @see https://tailwindcss.com/docs/transition-delay |
| 20265 |
*/ |
| 20266 |
delay: [{ |
| 20267 |
delay: getNumberAndArbitrary() |
| 20268 |
}], |
| 20269 |
/** |
| 20270 |
* Animation |
| 20271 |
* @see https://tailwindcss.com/docs/animation |
| 20272 |
*/ |
| 20273 |
animate: [{ |
| 20274 |
animate: ['none', 'spin', 'ping', 'pulse', 'bounce', isArbitraryValue] |
| 20275 |
}], |
| 20276 |
// Transforms |
| 20277 |
/** |
| 20278 |
* Transform |
| 20279 |
* @see https://tailwindcss.com/docs/transform |
| 20280 |
*/ |
| 20281 |
transform: [{ |
| 20282 |
transform: ['', 'gpu', 'none'] |
| 20283 |
}], |
| 20284 |
/** |
| 20285 |
* Scale |
| 20286 |
* @see https://tailwindcss.com/docs/scale |
| 20287 |
*/ |
| 20288 |
scale: [{ |
| 20289 |
scale: [scale] |
| 20290 |
}], |
| 20291 |
/** |
| 20292 |
* Scale X |
| 20293 |
* @see https://tailwindcss.com/docs/scale |
| 20294 |
*/ |
| 20295 |
'scale-x': [{ |
| 20296 |
'scale-x': [scale] |
| 20297 |
}], |
| 20298 |
/** |
| 20299 |
* Scale Y |
| 20300 |
* @see https://tailwindcss.com/docs/scale |
| 20301 |
*/ |
| 20302 |
'scale-y': [{ |
| 20303 |
'scale-y': [scale] |
| 20304 |
}], |
| 20305 |
/** |
| 20306 |
* Rotate |
| 20307 |
* @see https://tailwindcss.com/docs/rotate |
| 20308 |
*/ |
| 20309 |
rotate: [{ |
| 20310 |
rotate: [isInteger, isArbitraryValue] |
| 20311 |
}], |
| 20312 |
/** |
| 20313 |
* Translate X |
| 20314 |
* @see https://tailwindcss.com/docs/translate |
| 20315 |
*/ |
| 20316 |
'translate-x': [{ |
| 20317 |
'translate-x': [translate] |
| 20318 |
}], |
| 20319 |
/** |
| 20320 |
* Translate Y |
| 20321 |
* @see https://tailwindcss.com/docs/translate |
| 20322 |
*/ |
| 20323 |
'translate-y': [{ |
| 20324 |
'translate-y': [translate] |
| 20325 |
}], |
| 20326 |
/** |
| 20327 |
* Skew X |
| 20328 |
* @see https://tailwindcss.com/docs/skew |
| 20329 |
*/ |
| 20330 |
'skew-x': [{ |
| 20331 |
'skew-x': [skew] |
| 20332 |
}], |
| 20333 |
/** |
| 20334 |
* Skew Y |
| 20335 |
* @see https://tailwindcss.com/docs/skew |
| 20336 |
*/ |
| 20337 |
'skew-y': [{ |
| 20338 |
'skew-y': [skew] |
| 20339 |
}], |
| 20340 |
/** |
| 20341 |
* Transform Origin |
| 20342 |
* @see https://tailwindcss.com/docs/transform-origin |
| 20343 |
*/ |
| 20344 |
'transform-origin': [{ |
| 20345 |
origin: ['center', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left', isArbitraryValue] |
| 20346 |
}], |
| 20347 |
// Interactivity |
| 20348 |
/** |
| 20349 |
* Accent Color |
| 20350 |
* @see https://tailwindcss.com/docs/accent-color |
| 20351 |
*/ |
| 20352 |
accent: [{ |
| 20353 |
accent: ['auto', colors] |
| 20354 |
}], |
| 20355 |
/** |
| 20356 |
* Appearance |
| 20357 |
* @see https://tailwindcss.com/docs/appearance |
| 20358 |
*/ |
| 20359 |
appearance: [{ |
| 20360 |
appearance: ['none', 'auto'] |
| 20361 |
}], |
| 20362 |
/** |
| 20363 |
* Cursor |
| 20364 |
* @see https://tailwindcss.com/docs/cursor |
| 20365 |
*/ |
| 20366 |
cursor: [{ |
| 20367 |
cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryValue] |
| 20368 |
}], |
| 20369 |
/** |
| 20370 |
* Caret Color |
| 20371 |
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities |
| 20372 |
*/ |
| 20373 |
'caret-color': [{ |
| 20374 |
caret: [colors] |
| 20375 |
}], |
| 20376 |
/** |
| 20377 |
* Pointer Events |
| 20378 |
* @see https://tailwindcss.com/docs/pointer-events |
| 20379 |
*/ |
| 20380 |
'pointer-events': [{ |
| 20381 |
'pointer-events': ['none', 'auto'] |
| 20382 |
}], |
| 20383 |
/** |
| 20384 |
* Resize |
| 20385 |
* @see https://tailwindcss.com/docs/resize |
| 20386 |
*/ |
| 20387 |
resize: [{ |
| 20388 |
resize: ['none', 'y', 'x', ''] |
| 20389 |
}], |
| 20390 |
/** |
| 20391 |
* Scroll Behavior |
| 20392 |
* @see https://tailwindcss.com/docs/scroll-behavior |
| 20393 |
*/ |
| 20394 |
'scroll-behavior': [{ |
| 20395 |
scroll: ['auto', 'smooth'] |
| 20396 |
}], |
| 20397 |
/** |
| 20398 |
* Scroll Margin |
| 20399 |
* @see https://tailwindcss.com/docs/scroll-margin |
| 20400 |
*/ |
| 20401 |
'scroll-m': [{ |
| 20402 |
'scroll-m': getSpacingWithArbitrary() |
| 20403 |
}], |
| 20404 |
/** |
| 20405 |
* Scroll Margin X |
| 20406 |
* @see https://tailwindcss.com/docs/scroll-margin |
| 20407 |
*/ |
| 20408 |
'scroll-mx': [{ |
| 20409 |
'scroll-mx': getSpacingWithArbitrary() |
| 20410 |
}], |
| 20411 |
/** |
| 20412 |
* Scroll Margin Y |
| 20413 |
* @see https://tailwindcss.com/docs/scroll-margin |
| 20414 |
*/ |
| 20415 |
'scroll-my': [{ |
| 20416 |
'scroll-my': getSpacingWithArbitrary() |
| 20417 |
}], |
| 20418 |
/** |
| 20419 |
* Scroll Margin Start |
| 20420 |
* @see https://tailwindcss.com/docs/scroll-margin |
| 20421 |
*/ |
| 20422 |
'scroll-ms': [{ |
| 20423 |
'scroll-ms': getSpacingWithArbitrary() |
| 20424 |
}], |
| 20425 |
/** |
| 20426 |
* Scroll Margin End |
| 20427 |
* @see https://tailwindcss.com/docs/scroll-margin |
| 20428 |
*/ |
| 20429 |
'scroll-me': [{ |
| 20430 |
'scroll-me': getSpacingWithArbitrary() |
| 20431 |
}], |
| 20432 |
/** |
| 20433 |
* Scroll Margin Top |
| 20434 |
* @see https://tailwindcss.com/docs/scroll-margin |
| 20435 |
*/ |
| 20436 |
'scroll-mt': [{ |
| 20437 |
'scroll-mt': getSpacingWithArbitrary() |
| 20438 |
}], |
| 20439 |
/** |
| 20440 |
* Scroll Margin Right |
| 20441 |
* @see https://tailwindcss.com/docs/scroll-margin |
| 20442 |
*/ |
| 20443 |
'scroll-mr': [{ |
| 20444 |
'scroll-mr': getSpacingWithArbitrary() |
| 20445 |
}], |
| 20446 |
/** |
| 20447 |
* Scroll Margin Bottom |
| 20448 |
* @see https://tailwindcss.com/docs/scroll-margin |
| 20449 |
*/ |
| 20450 |
'scroll-mb': [{ |
| 20451 |
'scroll-mb': getSpacingWithArbitrary() |
| 20452 |
}], |
| 20453 |
/** |
| 20454 |
* Scroll Margin Left |
| 20455 |
* @see https://tailwindcss.com/docs/scroll-margin |
| 20456 |
*/ |
| 20457 |
'scroll-ml': [{ |
| 20458 |
'scroll-ml': getSpacingWithArbitrary() |
| 20459 |
}], |
| 20460 |
/** |
| 20461 |
* Scroll Padding |
| 20462 |
* @see https://tailwindcss.com/docs/scroll-padding |
| 20463 |
*/ |
| 20464 |
'scroll-p': [{ |
| 20465 |
'scroll-p': getSpacingWithArbitrary() |
| 20466 |
}], |
| 20467 |
/** |
| 20468 |
* Scroll Padding X |
| 20469 |
* @see https://tailwindcss.com/docs/scroll-padding |
| 20470 |
*/ |
| 20471 |
'scroll-px': [{ |
| 20472 |
'scroll-px': getSpacingWithArbitrary() |
| 20473 |
}], |
| 20474 |
/** |
| 20475 |
* Scroll Padding Y |
| 20476 |
* @see https://tailwindcss.com/docs/scroll-padding |
| 20477 |
*/ |
| 20478 |
'scroll-py': [{ |
| 20479 |
'scroll-py': getSpacingWithArbitrary() |
| 20480 |
}], |
| 20481 |
/** |
| 20482 |
* Scroll Padding Start |
| 20483 |
* @see https://tailwindcss.com/docs/scroll-padding |
| 20484 |
*/ |
| 20485 |
'scroll-ps': [{ |
| 20486 |
'scroll-ps': getSpacingWithArbitrary() |
| 20487 |
}], |
| 20488 |
/** |
| 20489 |
* Scroll Padding End |
| 20490 |
* @see https://tailwindcss.com/docs/scroll-padding |
| 20491 |
*/ |
| 20492 |
'scroll-pe': [{ |
| 20493 |
'scroll-pe': getSpacingWithArbitrary() |
| 20494 |
}], |
| 20495 |
/** |
| 20496 |
* Scroll Padding Top |
| 20497 |
* @see https://tailwindcss.com/docs/scroll-padding |
| 20498 |
*/ |
| 20499 |
'scroll-pt': [{ |
| 20500 |
'scroll-pt': getSpacingWithArbitrary() |
| 20501 |
}], |
| 20502 |
/** |
| 20503 |
* Scroll Padding Right |
| 20504 |
* @see https://tailwindcss.com/docs/scroll-padding |
| 20505 |
*/ |
| 20506 |
'scroll-pr': [{ |
| 20507 |
'scroll-pr': getSpacingWithArbitrary() |
| 20508 |
}], |
| 20509 |
/** |
| 20510 |
* Scroll Padding Bottom |
| 20511 |
* @see https://tailwindcss.com/docs/scroll-padding |
| 20512 |
*/ |
| 20513 |
'scroll-pb': [{ |
| 20514 |
'scroll-pb': getSpacingWithArbitrary() |
| 20515 |
}], |
| 20516 |
/** |
| 20517 |
* Scroll Padding Left |
| 20518 |
* @see https://tailwindcss.com/docs/scroll-padding |
| 20519 |
*/ |
| 20520 |
'scroll-pl': [{ |
| 20521 |
'scroll-pl': getSpacingWithArbitrary() |
| 20522 |
}], |
| 20523 |
/** |
| 20524 |
* Scroll Snap Align |
| 20525 |
* @see https://tailwindcss.com/docs/scroll-snap-align |
| 20526 |
*/ |
| 20527 |
'snap-align': [{ |
| 20528 |
snap: ['start', 'end', 'center', 'align-none'] |
| 20529 |
}], |
| 20530 |
/** |
| 20531 |
* Scroll Snap Stop |
| 20532 |
* @see https://tailwindcss.com/docs/scroll-snap-stop |
| 20533 |
*/ |
| 20534 |
'snap-stop': [{ |
| 20535 |
snap: ['normal', 'always'] |
| 20536 |
}], |
| 20537 |
/** |
| 20538 |
* Scroll Snap Type |
| 20539 |
* @see https://tailwindcss.com/docs/scroll-snap-type |
| 20540 |
*/ |
| 20541 |
'snap-type': [{ |
| 20542 |
snap: ['none', 'x', 'y', 'both'] |
| 20543 |
}], |
| 20544 |
/** |
| 20545 |
* Scroll Snap Type Strictness |
| 20546 |
* @see https://tailwindcss.com/docs/scroll-snap-type |
| 20547 |
*/ |
| 20548 |
'snap-strictness': [{ |
| 20549 |
snap: ['mandatory', 'proximity'] |
| 20550 |
}], |
| 20551 |
/** |
| 20552 |
* Touch Action |
| 20553 |
* @see https://tailwindcss.com/docs/touch-action |
| 20554 |
*/ |
| 20555 |
touch: [{ |
| 20556 |
touch: ['auto', 'none', 'manipulation'] |
| 20557 |
}], |
| 20558 |
/** |
| 20559 |
* Touch Action X |
| 20560 |
* @see https://tailwindcss.com/docs/touch-action |
| 20561 |
*/ |
| 20562 |
'touch-x': [{ |
| 20563 |
'touch-pan': ['x', 'left', 'right'] |
| 20564 |
}], |
| 20565 |
/** |
| 20566 |
* Touch Action Y |
| 20567 |
* @see https://tailwindcss.com/docs/touch-action |
| 20568 |
*/ |
| 20569 |
'touch-y': [{ |
| 20570 |
'touch-pan': ['y', 'up', 'down'] |
| 20571 |
}], |
| 20572 |
/** |
| 20573 |
* Touch Action Pinch Zoom |
| 20574 |
* @see https://tailwindcss.com/docs/touch-action |
| 20575 |
*/ |
| 20576 |
'touch-pz': ['touch-pinch-zoom'], |
| 20577 |
/** |
| 20578 |
* User Select |
| 20579 |
* @see https://tailwindcss.com/docs/user-select |
| 20580 |
*/ |
| 20581 |
select: [{ |
| 20582 |
select: ['none', 'text', 'all', 'auto'] |
| 20583 |
}], |
| 20584 |
/** |
| 20585 |
* Will Change |
| 20586 |
* @see https://tailwindcss.com/docs/will-change |
| 20587 |
*/ |
| 20588 |
'will-change': [{ |
| 20589 |
'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryValue] |
| 20590 |
}], |
| 20591 |
// SVG |
| 20592 |
/** |
| 20593 |
* Fill |
| 20594 |
* @see https://tailwindcss.com/docs/fill |
| 20595 |
*/ |
| 20596 |
fill: [{ |
| 20597 |
fill: [colors, 'none'] |
| 20598 |
}], |
| 20599 |
/** |
| 20600 |
* Stroke Width |
| 20601 |
* @see https://tailwindcss.com/docs/stroke-width |
| 20602 |
*/ |
| 20603 |
'stroke-w': [{ |
| 20604 |
stroke: [isLength, isArbitraryLength, isArbitraryNumber] |
| 20605 |
}], |
| 20606 |
/** |
| 20607 |
* Stroke |
| 20608 |
* @see https://tailwindcss.com/docs/stroke |
| 20609 |
*/ |
| 20610 |
stroke: [{ |
| 20611 |
stroke: [colors, 'none'] |
| 20612 |
}], |
| 20613 |
// Accessibility |
| 20614 |
/** |
| 20615 |
* Screen Readers |
| 20616 |
* @see https://tailwindcss.com/docs/screen-readers |
| 20617 |
*/ |
| 20618 |
sr: ['sr-only', 'not-sr-only'], |
| 20619 |
/** |
| 20620 |
* Forced Color Adjust |
| 20621 |
* @see https://tailwindcss.com/docs/forced-color-adjust |
| 20622 |
*/ |
| 20623 |
'forced-color-adjust': [{ |
| 20624 |
'forced-color-adjust': ['auto', 'none'] |
| 20625 |
}] |
| 20626 |
}, |
| 20627 |
conflictingClassGroups: { |
| 20628 |
overflow: ['overflow-x', 'overflow-y'], |
| 20629 |
overscroll: ['overscroll-x', 'overscroll-y'], |
| 20630 |
inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'], |
| 20631 |
'inset-x': ['right', 'left'], |
| 20632 |
'inset-y': ['top', 'bottom'], |
| 20633 |
flex: ['basis', 'grow', 'shrink'], |
| 20634 |
gap: ['gap-x', 'gap-y'], |
| 20635 |
p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'], |
| 20636 |
px: ['pr', 'pl'], |
| 20637 |
py: ['pt', 'pb'], |
| 20638 |
m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'], |
| 20639 |
mx: ['mr', 'ml'], |
| 20640 |
my: ['mt', 'mb'], |
| 20641 |
size: ['w', 'h'], |
| 20642 |
'font-size': ['leading'], |
| 20643 |
'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'], |
| 20644 |
'fvn-ordinal': ['fvn-normal'], |
| 20645 |
'fvn-slashed-zero': ['fvn-normal'], |
| 20646 |
'fvn-figure': ['fvn-normal'], |
| 20647 |
'fvn-spacing': ['fvn-normal'], |
| 20648 |
'fvn-fraction': ['fvn-normal'], |
| 20649 |
'line-clamp': ['display', 'overflow'], |
| 20650 |
rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'], |
| 20651 |
'rounded-s': ['rounded-ss', 'rounded-es'], |
| 20652 |
'rounded-e': ['rounded-se', 'rounded-ee'], |
| 20653 |
'rounded-t': ['rounded-tl', 'rounded-tr'], |
| 20654 |
'rounded-r': ['rounded-tr', 'rounded-br'], |
| 20655 |
'rounded-b': ['rounded-br', 'rounded-bl'], |
| 20656 |
'rounded-l': ['rounded-tl', 'rounded-bl'], |
| 20657 |
'border-spacing': ['border-spacing-x', 'border-spacing-y'], |
| 20658 |
'border-w': ['border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'], |
| 20659 |
'border-w-x': ['border-w-r', 'border-w-l'], |
| 20660 |
'border-w-y': ['border-w-t', 'border-w-b'], |
| 20661 |
'border-color': ['border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'], |
| 20662 |
'border-color-x': ['border-color-r', 'border-color-l'], |
| 20663 |
'border-color-y': ['border-color-t', 'border-color-b'], |
| 20664 |
'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'], |
| 20665 |
'scroll-mx': ['scroll-mr', 'scroll-ml'], |
| 20666 |
'scroll-my': ['scroll-mt', 'scroll-mb'], |
| 20667 |
'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'], |
| 20668 |
'scroll-px': ['scroll-pr', 'scroll-pl'], |
| 20669 |
'scroll-py': ['scroll-pt', 'scroll-pb'], |
| 20670 |
touch: ['touch-x', 'touch-y', 'touch-pz'], |
| 20671 |
'touch-x': ['touch'], |
| 20672 |
'touch-y': ['touch'], |
| 20673 |
'touch-pz': ['touch'] |
| 20674 |
}, |
| 20675 |
conflictingClassGroupModifiers: { |
| 20676 |
'font-size': ['leading'] |
| 20677 |
} |
| 20678 |
}; |
| 20679 |
}; |
| 20680 |
|
| 20681 |
/** |
| 20682 |
* @param baseConfig Config where other config will be merged into. This object will be mutated. |
| 20683 |
* @param configExtension Partial config to merge into the `baseConfig`. |
| 20684 |
*/ |
| 20685 |
const mergeConfigs = (baseConfig, { |
| 20686 |
cacheSize, |
| 20687 |
prefix, |
| 20688 |
separator, |
| 20689 |
experimentalParseClassName, |
| 20690 |
extend = {}, |
| 20691 |
override = {} |
| 20692 |
}) => { |
| 20693 |
overrideProperty(baseConfig, 'cacheSize', cacheSize); |
| 20694 |
overrideProperty(baseConfig, 'prefix', prefix); |
| 20695 |
overrideProperty(baseConfig, 'separator', separator); |
| 20696 |
overrideProperty(baseConfig, 'experimentalParseClassName', experimentalParseClassName); |
| 20697 |
for (const configKey in override) { |
| 20698 |
overrideConfigProperties(baseConfig[configKey], override[configKey]); |
| 20699 |
} |
| 20700 |
for (const key in extend) { |
| 20701 |
mergeConfigProperties(baseConfig[key], extend[key]); |
| 20702 |
} |
| 20703 |
return baseConfig; |
| 20704 |
}; |
| 20705 |
const overrideProperty = (baseObject, overrideKey, overrideValue) => { |
| 20706 |
if (overrideValue !== undefined) { |
| 20707 |
baseObject[overrideKey] = overrideValue; |
| 20708 |
} |
| 20709 |
}; |
| 20710 |
const overrideConfigProperties = (baseObject, overrideObject) => { |
| 20711 |
if (overrideObject) { |
| 20712 |
for (const key in overrideObject) { |
| 20713 |
overrideProperty(baseObject, key, overrideObject[key]); |
| 20714 |
} |
| 20715 |
} |
| 20716 |
}; |
| 20717 |
const mergeConfigProperties = (baseObject, mergeObject) => { |
| 20718 |
if (mergeObject) { |
| 20719 |
for (const key in mergeObject) { |
| 20720 |
const mergeValue = mergeObject[key]; |
| 20721 |
if (mergeValue !== undefined) { |
| 20722 |
baseObject[key] = (baseObject[key] || []).concat(mergeValue); |
| 20723 |
} |
| 20724 |
} |
| 20725 |
} |
| 20726 |
}; |
| 20727 |
const extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig); |
| 20728 |
const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig); |
| 20729 |
|
| 20730 |
//# sourceMappingURL=bundle-mjs.mjs.map |
| 20731 |
|
| 20732 |
|
| 20733 |
/***/ }, |
| 20734 |
|
| 20735 |
/***/ "./node_modules/tslib/tslib.es6.mjs" |
| 20736 |
/*!******************************************!*\ |
| 20737 |
!*** ./node_modules/tslib/tslib.es6.mjs ***! |
| 20738 |
\******************************************/ |
| 20739 |
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 20740 |
|
| 20741 |
__webpack_require__.r(__webpack_exports__); |
| 20742 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 20743 |
/* harmony export */ __addDisposableResource: () => (/* binding */ __addDisposableResource), |
| 20744 |
/* harmony export */ __assign: () => (/* binding */ __assign), |
| 20745 |
/* harmony export */ __asyncDelegator: () => (/* binding */ __asyncDelegator), |
| 20746 |
/* harmony export */ __asyncGenerator: () => (/* binding */ __asyncGenerator), |
| 20747 |
/* harmony export */ __asyncValues: () => (/* binding */ __asyncValues), |
| 20748 |
/* harmony export */ __await: () => (/* binding */ __await), |
| 20749 |
/* harmony export */ __awaiter: () => (/* binding */ __awaiter), |
| 20750 |
/* harmony export */ __classPrivateFieldGet: () => (/* binding */ __classPrivateFieldGet), |
| 20751 |
/* harmony export */ __classPrivateFieldIn: () => (/* binding */ __classPrivateFieldIn), |
| 20752 |
/* harmony export */ __classPrivateFieldSet: () => (/* binding */ __classPrivateFieldSet), |
| 20753 |
/* harmony export */ __createBinding: () => (/* binding */ __createBinding), |
| 20754 |
/* harmony export */ __decorate: () => (/* binding */ __decorate), |
| 20755 |
/* harmony export */ __disposeResources: () => (/* binding */ __disposeResources), |
| 20756 |
/* harmony export */ __esDecorate: () => (/* binding */ __esDecorate), |
| 20757 |
/* harmony export */ __exportStar: () => (/* binding */ __exportStar), |
| 20758 |
/* harmony export */ __extends: () => (/* binding */ __extends), |
| 20759 |
/* harmony export */ __generator: () => (/* binding */ __generator), |
| 20760 |
/* harmony export */ __importDefault: () => (/* binding */ __importDefault), |
| 20761 |
/* harmony export */ __importStar: () => (/* binding */ __importStar), |
| 20762 |
/* harmony export */ __makeTemplateObject: () => (/* binding */ __makeTemplateObject), |
| 20763 |
/* harmony export */ __metadata: () => (/* binding */ __metadata), |
| 20764 |
/* harmony export */ __param: () => (/* binding */ __param), |
| 20765 |
/* harmony export */ __propKey: () => (/* binding */ __propKey), |
| 20766 |
/* harmony export */ __read: () => (/* binding */ __read), |
| 20767 |
/* harmony export */ __rest: () => (/* binding */ __rest), |
| 20768 |
/* harmony export */ __rewriteRelativeImportExtension: () => (/* binding */ __rewriteRelativeImportExtension), |
| 20769 |
/* harmony export */ __runInitializers: () => (/* binding */ __runInitializers), |
| 20770 |
/* harmony export */ __setFunctionName: () => (/* binding */ __setFunctionName), |
| 20771 |
/* harmony export */ __spread: () => (/* binding */ __spread), |
| 20772 |
/* harmony export */ __spreadArray: () => (/* binding */ __spreadArray), |
| 20773 |
/* harmony export */ __spreadArrays: () => (/* binding */ __spreadArrays), |
| 20774 |
/* harmony export */ __values: () => (/* binding */ __values), |
| 20775 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 20776 |
/* harmony export */ }); |
| 20777 |
/****************************************************************************** |
| 20778 |
Copyright (c) Microsoft Corporation. |
| 20779 |
|
| 20780 |
Permission to use, copy, modify, and/or distribute this software for any |
| 20781 |
purpose with or without fee is hereby granted. |
| 20782 |
|
| 20783 |
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH |
| 20784 |
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |
| 20785 |
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
| 20786 |
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
| 20787 |
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR |
| 20788 |
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 20789 |
PERFORMANCE OF THIS SOFTWARE. |
| 20790 |
***************************************************************************** */ |
| 20791 |
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ |
| 20792 |
|
| 20793 |
var extendStatics = function(d, b) { |
| 20794 |
extendStatics = Object.setPrototypeOf || |
| 20795 |
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || |
| 20796 |
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; |
| 20797 |
return extendStatics(d, b); |
| 20798 |
}; |
| 20799 |
|
| 20800 |
function __extends(d, b) { |
| 20801 |
if (typeof b !== "function" && b !== null) |
| 20802 |
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); |
| 20803 |
extendStatics(d, b); |
| 20804 |
function __() { this.constructor = d; } |
| 20805 |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |
| 20806 |
} |
| 20807 |
|
| 20808 |
var __assign = function() { |
| 20809 |
__assign = Object.assign || function __assign(t) { |
| 20810 |
for (var s, i = 1, n = arguments.length; i < n; i++) { |
| 20811 |
s = arguments[i]; |
| 20812 |
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; |
| 20813 |
} |
| 20814 |
return t; |
| 20815 |
} |
| 20816 |
return __assign.apply(this, arguments); |
| 20817 |
} |
| 20818 |
|
| 20819 |
function __rest(s, e) { |
| 20820 |
var t = {}; |
| 20821 |
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) |
| 20822 |
t[p] = s[p]; |
| 20823 |
if (s != null && typeof Object.getOwnPropertySymbols === "function") |
| 20824 |
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { |
| 20825 |
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) |
| 20826 |
t[p[i]] = s[p[i]]; |
| 20827 |
} |
| 20828 |
return t; |
| 20829 |
} |
| 20830 |
|
| 20831 |
function __decorate(decorators, target, key, desc) { |
| 20832 |
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
| 20833 |
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); |
| 20834 |
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; |
| 20835 |
return c > 3 && r && Object.defineProperty(target, key, r), r; |
| 20836 |
} |
| 20837 |
|
| 20838 |
function __param(paramIndex, decorator) { |
| 20839 |
return function (target, key) { decorator(target, key, paramIndex); } |
| 20840 |
} |
| 20841 |
|
| 20842 |
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { |
| 20843 |
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } |
| 20844 |
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; |
| 20845 |
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; |
| 20846 |
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); |
| 20847 |
var _, done = false; |
| 20848 |
for (var i = decorators.length - 1; i >= 0; i--) { |
| 20849 |
var context = {}; |
| 20850 |
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; |
| 20851 |
for (var p in contextIn.access) context.access[p] = contextIn.access[p]; |
| 20852 |
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; |
| 20853 |
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); |
| 20854 |
if (kind === "accessor") { |
| 20855 |
if (result === void 0) continue; |
| 20856 |
if (result === null || typeof result !== "object") throw new TypeError("Object expected"); |
| 20857 |
if (_ = accept(result.get)) descriptor.get = _; |
| 20858 |
if (_ = accept(result.set)) descriptor.set = _; |
| 20859 |
if (_ = accept(result.init)) initializers.unshift(_); |
| 20860 |
} |
| 20861 |
else if (_ = accept(result)) { |
| 20862 |
if (kind === "field") initializers.unshift(_); |
| 20863 |
else descriptor[key] = _; |
| 20864 |
} |
| 20865 |
} |
| 20866 |
if (target) Object.defineProperty(target, contextIn.name, descriptor); |
| 20867 |
done = true; |
| 20868 |
}; |
| 20869 |
|
| 20870 |
function __runInitializers(thisArg, initializers, value) { |
| 20871 |
var useValue = arguments.length > 2; |
| 20872 |
for (var i = 0; i < initializers.length; i++) { |
| 20873 |
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); |
| 20874 |
} |
| 20875 |
return useValue ? value : void 0; |
| 20876 |
}; |
| 20877 |
|
| 20878 |
function __propKey(x) { |
| 20879 |
return typeof x === "symbol" ? x : "".concat(x); |
| 20880 |
}; |
| 20881 |
|
| 20882 |
function __setFunctionName(f, name, prefix) { |
| 20883 |
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; |
| 20884 |
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); |
| 20885 |
}; |
| 20886 |
|
| 20887 |
function __metadata(metadataKey, metadataValue) { |
| 20888 |
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); |
| 20889 |
} |
| 20890 |
|
| 20891 |
function __awaiter(thisArg, _arguments, P, generator) { |
| 20892 |
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |
| 20893 |
return new (P || (P = Promise))(function (resolve, reject) { |
| 20894 |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |
| 20895 |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } |
| 20896 |
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } |
| 20897 |
step((generator = generator.apply(thisArg, _arguments || [])).next()); |
| 20898 |
}); |
| 20899 |
} |
| 20900 |
|
| 20901 |
function __generator(thisArg, body) { |
| 20902 |
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); |
| 20903 |
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; |
| 20904 |
function verb(n) { return function (v) { return step([n, v]); }; } |
| 20905 |
function step(op) { |
| 20906 |
if (f) throw new TypeError("Generator is already executing."); |
| 20907 |
while (g && (g = 0, op[0] && (_ = 0)), _) try { |
| 20908 |
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; |
| 20909 |
if (y = 0, t) op = [op[0] & 2, t.value]; |
| 20910 |
switch (op[0]) { |
| 20911 |
case 0: case 1: t = op; break; |
| 20912 |
case 4: _.label++; return { value: op[1], done: false }; |
| 20913 |
case 5: _.label++; y = op[1]; op = [0]; continue; |
| 20914 |
case 7: op = _.ops.pop(); _.trys.pop(); continue; |
| 20915 |
default: |
| 20916 |
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } |
| 20917 |
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } |
| 20918 |
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } |
| 20919 |
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } |
| 20920 |
if (t[2]) _.ops.pop(); |
| 20921 |
_.trys.pop(); continue; |
| 20922 |
} |
| 20923 |
op = body.call(thisArg, _); |
| 20924 |
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } |
| 20925 |
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; |
| 20926 |
} |
| 20927 |
} |
| 20928 |
|
| 20929 |
var __createBinding = Object.create ? (function(o, m, k, k2) { |
| 20930 |
if (k2 === undefined) k2 = k; |
| 20931 |
var desc = Object.getOwnPropertyDescriptor(m, k); |
| 20932 |
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { |
| 20933 |
desc = { enumerable: true, get: function() { return m[k]; } }; |
| 20934 |
} |
| 20935 |
Object.defineProperty(o, k2, desc); |
| 20936 |
}) : (function(o, m, k, k2) { |
| 20937 |
if (k2 === undefined) k2 = k; |
| 20938 |
o[k2] = m[k]; |
| 20939 |
}); |
| 20940 |
|
| 20941 |
function __exportStar(m, o) { |
| 20942 |
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); |
| 20943 |
} |
| 20944 |
|
| 20945 |
function __values(o) { |
| 20946 |
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; |
| 20947 |
if (m) return m.call(o); |
| 20948 |
if (o && typeof o.length === "number") return { |
| 20949 |
next: function () { |
| 20950 |
if (o && i >= o.length) o = void 0; |
| 20951 |
return { value: o && o[i++], done: !o }; |
| 20952 |
} |
| 20953 |
}; |
| 20954 |
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); |
| 20955 |
} |
| 20956 |
|
| 20957 |
function __read(o, n) { |
| 20958 |
var m = typeof Symbol === "function" && o[Symbol.iterator]; |
| 20959 |
if (!m) return o; |
| 20960 |
var i = m.call(o), r, ar = [], e; |
| 20961 |
try { |
| 20962 |
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); |
| 20963 |
} |
| 20964 |
catch (error) { e = { error: error }; } |
| 20965 |
finally { |
| 20966 |
try { |
| 20967 |
if (r && !r.done && (m = i["return"])) m.call(i); |
| 20968 |
} |
| 20969 |
finally { if (e) throw e.error; } |
| 20970 |
} |
| 20971 |
return ar; |
| 20972 |
} |
| 20973 |
|
| 20974 |
/** @deprecated */ |
| 20975 |
function __spread() { |
| 20976 |
for (var ar = [], i = 0; i < arguments.length; i++) |
| 20977 |
ar = ar.concat(__read(arguments[i])); |
| 20978 |
return ar; |
| 20979 |
} |
| 20980 |
|
| 20981 |
/** @deprecated */ |
| 20982 |
function __spreadArrays() { |
| 20983 |
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; |
| 20984 |
for (var r = Array(s), k = 0, i = 0; i < il; i++) |
| 20985 |
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) |
| 20986 |
r[k] = a[j]; |
| 20987 |
return r; |
| 20988 |
} |
| 20989 |
|
| 20990 |
function __spreadArray(to, from, pack) { |
| 20991 |
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { |
| 20992 |
if (ar || !(i in from)) { |
| 20993 |
if (!ar) ar = Array.prototype.slice.call(from, 0, i); |
| 20994 |
ar[i] = from[i]; |
| 20995 |
} |
| 20996 |
} |
| 20997 |
return to.concat(ar || Array.prototype.slice.call(from)); |
| 20998 |
} |
| 20999 |
|
| 21000 |
function __await(v) { |
| 21001 |
return this instanceof __await ? (this.v = v, this) : new __await(v); |
| 21002 |
} |
| 21003 |
|
| 21004 |
function __asyncGenerator(thisArg, _arguments, generator) { |
| 21005 |
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |
| 21006 |
var g = generator.apply(thisArg, _arguments || []), i, q = []; |
| 21007 |
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; |
| 21008 |
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } |
| 21009 |
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } |
| 21010 |
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } |
| 21011 |
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } |
| 21012 |
function fulfill(value) { resume("next", value); } |
| 21013 |
function reject(value) { resume("throw", value); } |
| 21014 |
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } |
| 21015 |
} |
| 21016 |
|
| 21017 |
function __asyncDelegator(o) { |
| 21018 |
var i, p; |
| 21019 |
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; |
| 21020 |
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } |
| 21021 |
} |
| 21022 |
|
| 21023 |
function __asyncValues(o) { |
| 21024 |
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |
| 21025 |
var m = o[Symbol.asyncIterator], i; |
| 21026 |
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); |
| 21027 |
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } |
| 21028 |
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } |
| 21029 |
} |
| 21030 |
|
| 21031 |
function __makeTemplateObject(cooked, raw) { |
| 21032 |
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } |
| 21033 |
return cooked; |
| 21034 |
}; |
| 21035 |
|
| 21036 |
var __setModuleDefault = Object.create ? (function(o, v) { |
| 21037 |
Object.defineProperty(o, "default", { enumerable: true, value: v }); |
| 21038 |
}) : function(o, v) { |
| 21039 |
o["default"] = v; |
| 21040 |
}; |
| 21041 |
|
| 21042 |
var ownKeys = function(o) { |
| 21043 |
ownKeys = Object.getOwnPropertyNames || function (o) { |
| 21044 |
var ar = []; |
| 21045 |
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; |
| 21046 |
return ar; |
| 21047 |
}; |
| 21048 |
return ownKeys(o); |
| 21049 |
}; |
| 21050 |
|
| 21051 |
function __importStar(mod) { |
| 21052 |
if (mod && mod.__esModule) return mod; |
| 21053 |
var result = {}; |
| 21054 |
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); |
| 21055 |
__setModuleDefault(result, mod); |
| 21056 |
return result; |
| 21057 |
} |
| 21058 |
|
| 21059 |
function __importDefault(mod) { |
| 21060 |
return (mod && mod.__esModule) ? mod : { default: mod }; |
| 21061 |
} |
| 21062 |
|
| 21063 |
function __classPrivateFieldGet(receiver, state, kind, f) { |
| 21064 |
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); |
| 21065 |
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); |
| 21066 |
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); |
| 21067 |
} |
| 21068 |
|
| 21069 |
function __classPrivateFieldSet(receiver, state, value, kind, f) { |
| 21070 |
if (kind === "m") throw new TypeError("Private method is not writable"); |
| 21071 |
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); |
| 21072 |
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); |
| 21073 |
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; |
| 21074 |
} |
| 21075 |
|
| 21076 |
function __classPrivateFieldIn(state, receiver) { |
| 21077 |
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); |
| 21078 |
return typeof state === "function" ? receiver === state : state.has(receiver); |
| 21079 |
} |
| 21080 |
|
| 21081 |
function __addDisposableResource(env, value, async) { |
| 21082 |
if (value !== null && value !== void 0) { |
| 21083 |
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); |
| 21084 |
var dispose, inner; |
| 21085 |
if (async) { |
| 21086 |
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); |
| 21087 |
dispose = value[Symbol.asyncDispose]; |
| 21088 |
} |
| 21089 |
if (dispose === void 0) { |
| 21090 |
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); |
| 21091 |
dispose = value[Symbol.dispose]; |
| 21092 |
if (async) inner = dispose; |
| 21093 |
} |
| 21094 |
if (typeof dispose !== "function") throw new TypeError("Object not disposable."); |
| 21095 |
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; |
| 21096 |
env.stack.push({ value: value, dispose: dispose, async: async }); |
| 21097 |
} |
| 21098 |
else if (async) { |
| 21099 |
env.stack.push({ async: true }); |
| 21100 |
} |
| 21101 |
return value; |
| 21102 |
} |
| 21103 |
|
| 21104 |
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { |
| 21105 |
var e = new Error(message); |
| 21106 |
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; |
| 21107 |
}; |
| 21108 |
|
| 21109 |
function __disposeResources(env) { |
| 21110 |
function fail(e) { |
| 21111 |
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; |
| 21112 |
env.hasError = true; |
| 21113 |
} |
| 21114 |
var r, s = 0; |
| 21115 |
function next() { |
| 21116 |
while (r = env.stack.pop()) { |
| 21117 |
try { |
| 21118 |
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); |
| 21119 |
if (r.dispose) { |
| 21120 |
var result = r.dispose.call(r.value); |
| 21121 |
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); |
| 21122 |
} |
| 21123 |
else s |= 1; |
| 21124 |
} |
| 21125 |
catch (e) { |
| 21126 |
fail(e); |
| 21127 |
} |
| 21128 |
} |
| 21129 |
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); |
| 21130 |
if (env.hasError) throw env.error; |
| 21131 |
} |
| 21132 |
return next(); |
| 21133 |
} |
| 21134 |
|
| 21135 |
function __rewriteRelativeImportExtension(path, preserveJsx) { |
| 21136 |
if (typeof path === "string" && /^\.\.?\//.test(path)) { |
| 21137 |
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { |
| 21138 |
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); |
| 21139 |
}); |
| 21140 |
} |
| 21141 |
return path; |
| 21142 |
} |
| 21143 |
|
| 21144 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ |
| 21145 |
__extends, |
| 21146 |
__assign, |
| 21147 |
__rest, |
| 21148 |
__decorate, |
| 21149 |
__param, |
| 21150 |
__esDecorate, |
| 21151 |
__runInitializers, |
| 21152 |
__propKey, |
| 21153 |
__setFunctionName, |
| 21154 |
__metadata, |
| 21155 |
__awaiter, |
| 21156 |
__generator, |
| 21157 |
__createBinding, |
| 21158 |
__exportStar, |
| 21159 |
__values, |
| 21160 |
__read, |
| 21161 |
__spread, |
| 21162 |
__spreadArrays, |
| 21163 |
__spreadArray, |
| 21164 |
__await, |
| 21165 |
__asyncGenerator, |
| 21166 |
__asyncDelegator, |
| 21167 |
__asyncValues, |
| 21168 |
__makeTemplateObject, |
| 21169 |
__importStar, |
| 21170 |
__importDefault, |
| 21171 |
__classPrivateFieldGet, |
| 21172 |
__classPrivateFieldSet, |
| 21173 |
__classPrivateFieldIn, |
| 21174 |
__addDisposableResource, |
| 21175 |
__disposeResources, |
| 21176 |
__rewriteRelativeImportExtension, |
| 21177 |
}); |
| 21178 |
|
| 21179 |
|
| 21180 |
/***/ } |
| 21181 |
|
| 21182 |
/******/ }); |
| 21183 |
/************************************************************************/ |
| 21184 |
/******/ // The module cache |
| 21185 |
/******/ var __webpack_module_cache__ = {}; |
| 21186 |
/******/ |
| 21187 |
/******/ // The require function |
| 21188 |
/******/ function __webpack_require__(moduleId) { |
| 21189 |
/******/ // Check if module is in cache |
| 21190 |
/******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 21191 |
/******/ if (cachedModule !== undefined) { |
| 21192 |
/******/ return cachedModule.exports; |
| 21193 |
/******/ } |
| 21194 |
/******/ // Create a new module (and put it into the cache) |
| 21195 |
/******/ var module = __webpack_module_cache__[moduleId] = { |
| 21196 |
/******/ // no module.id needed |
| 21197 |
/******/ // no module.loaded needed |
| 21198 |
/******/ exports: {} |
| 21199 |
/******/ }; |
| 21200 |
/******/ |
| 21201 |
/******/ // Execute the module function |
| 21202 |
/******/ if (!(moduleId in __webpack_modules__)) { |
| 21203 |
/******/ delete __webpack_module_cache__[moduleId]; |
| 21204 |
/******/ var e = new Error("Cannot find module '" + moduleId + "'"); |
| 21205 |
/******/ e.code = 'MODULE_NOT_FOUND'; |
| 21206 |
/******/ throw e; |
| 21207 |
/******/ } |
| 21208 |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 21209 |
/******/ |
| 21210 |
/******/ // Return the exports of the module |
| 21211 |
/******/ return module.exports; |
| 21212 |
/******/ } |
| 21213 |
/******/ |
| 21214 |
/************************************************************************/ |
| 21215 |
/******/ /* webpack/runtime/compat get default export */ |
| 21216 |
/******/ (() => { |
| 21217 |
/******/ // getDefaultExport function for compatibility with non-harmony modules |
| 21218 |
/******/ __webpack_require__.n = (module) => { |
| 21219 |
/******/ var getter = module && module.__esModule ? |
| 21220 |
/******/ () => (module['default']) : |
| 21221 |
/******/ () => (module); |
| 21222 |
/******/ __webpack_require__.d(getter, { a: getter }); |
| 21223 |
/******/ return getter; |
| 21224 |
/******/ }; |
| 21225 |
/******/ })(); |
| 21226 |
/******/ |
| 21227 |
/******/ /* webpack/runtime/create fake namespace object */ |
| 21228 |
/******/ (() => { |
| 21229 |
/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__); |
| 21230 |
/******/ var leafPrototypes; |
| 21231 |
/******/ // create a fake namespace object |
| 21232 |
/******/ // mode & 1: value is a module id, require it |
| 21233 |
/******/ // mode & 2: merge all properties of value into the ns |
| 21234 |
/******/ // mode & 4: return value when already ns object |
| 21235 |
/******/ // mode & 16: return value when it's Promise-like |
| 21236 |
/******/ // mode & 8|1: behave like require |
| 21237 |
/******/ __webpack_require__.t = function(value, mode) { |
| 21238 |
/******/ if(mode & 1) value = this(value); |
| 21239 |
/******/ if(mode & 8) return value; |
| 21240 |
/******/ if(typeof value === 'object' && value) { |
| 21241 |
/******/ if((mode & 4) && value.__esModule) return value; |
| 21242 |
/******/ if((mode & 16) && typeof value.then === 'function') return value; |
| 21243 |
/******/ } |
| 21244 |
/******/ var ns = Object.create(null); |
| 21245 |
/******/ __webpack_require__.r(ns); |
| 21246 |
/******/ var def = {}; |
| 21247 |
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; |
| 21248 |
/******/ for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) { |
| 21249 |
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key]))); |
| 21250 |
/******/ } |
| 21251 |
/******/ def['default'] = () => (value); |
| 21252 |
/******/ __webpack_require__.d(ns, def); |
| 21253 |
/******/ return ns; |
| 21254 |
/******/ }; |
| 21255 |
/******/ })(); |
| 21256 |
/******/ |
| 21257 |
/******/ /* webpack/runtime/define property getters */ |
| 21258 |
/******/ (() => { |
| 21259 |
/******/ // define getter functions for harmony exports |
| 21260 |
/******/ __webpack_require__.d = (exports, definition) => { |
| 21261 |
/******/ for(var key in definition) { |
| 21262 |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
| 21263 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
| 21264 |
/******/ } |
| 21265 |
/******/ } |
| 21266 |
/******/ }; |
| 21267 |
/******/ })(); |
| 21268 |
/******/ |
| 21269 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
| 21270 |
/******/ (() => { |
| 21271 |
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) |
| 21272 |
/******/ })(); |
| 21273 |
/******/ |
| 21274 |
/******/ /* webpack/runtime/make namespace object */ |
| 21275 |
/******/ (() => { |
| 21276 |
/******/ // define __esModule on exports |
| 21277 |
/******/ __webpack_require__.r = (exports) => { |
| 21278 |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
| 21279 |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
| 21280 |
/******/ } |
| 21281 |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 21282 |
/******/ }; |
| 21283 |
/******/ })(); |
| 21284 |
/******/ |
| 21285 |
/******/ /* webpack/runtime/nonce */ |
| 21286 |
/******/ (() => { |
| 21287 |
/******/ __webpack_require__.nc = undefined; |
| 21288 |
/******/ })(); |
| 21289 |
/******/ |
| 21290 |
/************************************************************************/ |
| 21291 |
var __webpack_exports__ = {}; |
| 21292 |
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. |
| 21293 |
(() => { |
| 21294 |
/*!********************************!*\ |
| 21295 |
!*** ./resources/js/index.tsx ***! |
| 21296 |
\********************************/ |
| 21297 |
__webpack_require__.r(__webpack_exports__); |
| 21298 |
/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom/client */ "./node_modules/react-dom/client.js"); |
| 21299 |
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/store */ "./resources/js/store/index.ts"); |
| 21300 |
/* harmony import */ var _App__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/App */ "./resources/js/App.tsx"); |
| 21301 |
/* harmony import */ var _css_globals_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @css/globals.css */ "./resources/css/globals.css"); |
| 21302 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 21303 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__); |
| 21304 |
|
| 21305 |
|
| 21306 |
|
| 21307 |
|
| 21308 |
|
| 21309 |
(0,_store__WEBPACK_IMPORTED_MODULE_1__.registerHarborStore)(); |
| 21310 |
const rootElement = document.getElementById('lw-harbor-root'); |
| 21311 |
if (rootElement) { |
| 21312 |
// Delay execution until after the DOM is fully loaded. |
| 21313 |
window.addEventListener('DOMContentLoaded', () => { |
| 21314 |
(0,react_dom_client__WEBPACK_IMPORTED_MODULE_0__.createRoot)(rootElement).render(/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_App__WEBPACK_IMPORTED_MODULE_2__.App, {})); |
| 21315 |
}); |
| 21316 |
} |
| 21317 |
})(); |
| 21318 |
|
| 21319 |
/******/ })() |
| 21320 |
; |
| 21321 |
//# sourceMappingURL=index.js.map |