"use strict"; exports.id = 25869; exports.ids = [25869]; exports.modules = { /***/ 25869: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16689); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_seo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16641); /* harmony import */ var next_seo__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_seo__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _utils_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(96174); const NextSeoWrapper = (props)=>{ const { url , image , imageAlt , imageHeight , imageWidth , openGraph , description , ...rest } = props; const openGraphParams = { ...openGraph && { openGraph }, ...url && { url }, ...image && { images: [ { url: image, width: imageWidth, height: imageHeight, alt: imageAlt } ] } }; const params = { ...rest, ...description && { description: (0,_utils_string__WEBPACK_IMPORTED_MODULE_3__/* .truncateString */ .aS)(description, 150) } }; return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(next_seo__WEBPACK_IMPORTED_MODULE_2__.NextSeo, { ...params, openGraph: openGraphParams }); }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NextSeoWrapper); /***/ }), /***/ 96174: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "Nl": () => (/* binding */ slugifiedCollectionIdToCollectionId), /* harmony export */ "aS": () => (/* binding */ truncateString) /* harmony export */ }); /* unused harmony export stripHTMLTags */ /** * Shorten a text by setting the maximum number of characters * by the value of the parameter and adding "..." at the end. * * @param {string} rawString * @param {number} length * @param {string} suffix * @returns {string} */ const truncateString = (rawString, length, suffix = "...")=>{ const characters = rawString.split("", length); let shortenedText = ""; for(let index = 0; index < characters.length; index += 1){ const character = characters[index]; if (shortenedText.length === length - 1) { shortenedText = `${shortenedText}${character}${suffix}`; break; } shortenedText = `${shortenedText}${character}`; } return shortenedText; }; /** * Strip HTML tags from a string. * * @param {string} rawString * @returns {string} */ const stripHTMLTags = (rawString)=>rawString.replace(/(<([^>]+)>)/gi, ""); /** * Convert a slugified collection id to collection id only after * removing the slug. * * @param {string} slugifiedCollectionId * @returns {string} */ const slugifiedCollectionIdToCollectionId = (slugifiedCollectionId)=>{ if (!slugifiedCollectionId) { return ""; } const splits = slugifiedCollectionId.split("-"); // if there is no slug in the url (collections with a name that cannot be slugified e.g. emoticons) if (splits.length === 1) { return splits[0]; } return splits[splits.length - 1]; }; /***/ }) }; ; //# sourceMappingURL=25869.js.map