diff --git a/cli/displayDevServer.js b/cli/displayDevServer.js index b3cee14..75383c9 100755 --- a/cli/displayDevServer.js +++ b/cli/displayDevServer.js @@ -18,6 +18,7 @@ program .option('-o, --outputDir ', 'output dir', './build') .option('--skipBuild', 'skip compiling ads phase', false) .option('--skipPreview', 'skip preview building phase', false) + .option('-p, --parallel [data]', 'run webpack in parallel') .parse(process.argv); const options = program.opts(); diff --git a/package-lock.json b/package-lock.json index c416dc0..e9c0e8f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mediamonks/display-dev-server", - "version": "11.0.11", + "version": "11.6.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@mediamonks/display-dev-server", - "version": "11.0.11", + "version": "11.6.2", "license": "MIT", "dependencies": { "@babel/core": "^7.21.0", @@ -52,7 +52,8 @@ "webpack": "^5.75.0", "webpack-dev-middleware": "^6.0.1", "webpack-hot-middleware": "^2.25.3", - "webpack-virtual-modules": "^0.5.0" + "webpack-virtual-modules": "^0.5.0", + "worker-farm": "^1.7.0" }, "bin": { "dds": "cli/displayDevServer.js" @@ -3048,9 +3049,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001458", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001458.tgz", - "integrity": "sha512-lQ1VlUUq5q9ro9X+5gOEyH7i3vm+AYVT1WDCVB69XOZ17KZRhnZ9J0Sqz7wTHQaLBJccNCHq8/Ww5LlOIZbB0w==", + "version": "1.0.30001549", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001549.tgz", + "integrity": "sha512-qRp48dPYSCYaP+KurZLhDYdVE+yEyht/3NlmcJgVQ2VMGt6JL36ndQ/7rgspdZsJuxDPFIo/OzBT2+GmIJ53BA==", "funding": [ { "type": "opencollective", @@ -3059,6 +3060,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -3704,6 +3709,17 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -6386,6 +6402,11 @@ "node": ">= 0.10" } }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==" + }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -7630,6 +7651,14 @@ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" }, + "node_modules/worker-farm": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", + "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "dependencies": { + "errno": "~0.1.7" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -9702,9 +9731,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001458", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001458.tgz", - "integrity": "sha512-lQ1VlUUq5q9ro9X+5gOEyH7i3vm+AYVT1WDCVB69XOZ17KZRhnZ9J0Sqz7wTHQaLBJccNCHq8/Ww5LlOIZbB0w==" + "version": "1.0.30001549", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001549.tgz", + "integrity": "sha512-qRp48dPYSCYaP+KurZLhDYdVE+yEyht/3NlmcJgVQ2VMGt6JL36ndQ/7rgspdZsJuxDPFIo/OzBT2+GmIJ53BA==" }, "chalk": { "version": "4.1.2", @@ -10155,6 +10184,14 @@ "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==" }, + "errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "requires": { + "prr": "~1.0.1" + } + }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -12016,6 +12053,11 @@ "ipaddr.js": "1.9.1" } }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==" + }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -12920,6 +12962,14 @@ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" }, + "worker-farm": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", + "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "requires": { + "errno": "~0.1.7" + } + }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", diff --git a/package.json b/package.json index e5d74c1..fcb13ca 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { "name": "@mediamonks/display-dev-server", - "version": "11.0.11", + "version": "11.6.2", "description": "This is the Display.Monks development server, which handles previewing and compiling ads via webpack.", "scripts": { - "preview-dev": "cd ./src/preview && npm run dev" + "preview-dev": "cd ./src/preview && npm run dev", + "preview-build": "cd ./src/preview && npm run build" }, "engines": { "node": ">= 16", @@ -66,6 +67,7 @@ "webpack": "^5.75.0", "webpack-dev-middleware": "^6.0.1", "webpack-hot-middleware": "^2.25.3", - "webpack-virtual-modules": "^0.5.0" + "webpack-virtual-modules": "^0.5.0", + "worker-farm": "^1.7.0" } } diff --git a/src/index.js b/src/index.js index 3d0eae8..3c92f26 100644 --- a/src/index.js +++ b/src/index.js @@ -1,18 +1,30 @@ const getWebpackConfigs = require("./webpack/getWebpackConfigs"); const devServer = require("./webpack/devServer"); +const devServerParallel = require("./webpack/devServerParallel"); const buildFiles = require("./webpack/buildFiles"); +const buildFilesParallel = require("./webpack/buildFilesParallel"); const buildPreview = require("./webpack/buildPreview"); +const deleteAllGooglesheetFiles = require("./util/deleteAllGooglesheetFiles"); module.exports = async function (options) { // {mode = "development", glob = "./**/.richmediarc*", choices = null, stats = null, outputDir = "./build", configOverride = {}} - let {mode, glob, choices, stats, outputDir, skipBuild, skipPreview} = options; + let {mode, glob, choices, stats, outputDir, skipBuild, skipPreview, parallel} = options; + + if (mode == "cleanup") { + return await deleteAllGooglesheetFiles() + } const webpackConfigs = !skipBuild ? await getWebpackConfigs(options) : null; if (mode === "development") { - await devServer(webpackConfigs.result, webpackConfigs.choices.openLocation); + if (parallel) await devServerParallel(webpackConfigs.result, webpackConfigs.choices.openLocation, options); + else await devServer(webpackConfigs.result, webpackConfigs.choices.openLocation); } else { - if (!skipBuild) await buildFiles(webpackConfigs.result, outputDir); - if (!skipPreview) await buildPreview(outputDir); + let qualities + if (!skipBuild) { + if (parallel) qualities = await buildFilesParallel(webpackConfigs.result, options); + else qualities = await buildFiles(webpackConfigs.result, outputDir); + } + if (!skipPreview) await buildPreview(webpackConfigs?.result, qualities?.ads, outputDir); } }; diff --git a/src/preview/dist/index.html b/src/preview/dist/index.html index 06242e3..964c670 100644 --- a/src/preview/dist/index.html +++ b/src/preview/dist/index.html @@ -36,4 +36,6 @@ To create a production bundle, use `npm run build` or `yarn build`. --> + + diff --git a/src/preview/dist/js/index_bundle.js b/src/preview/dist/js/index_bundle.js index 838be89..6d7b604 100644 --- a/src/preview/dist/js/index_bundle.js +++ b/src/preview/dist/js/index_bundle.js @@ -339,36 +339,47 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), -/***/ "./node_modules/@mui/icons-material/Cancel.js": +/***/ "./node_modules/@mui/icons-material/Cached.js": /*!****************************************************!*\ - !*** ./node_modules/@mui/icons-material/Cancel.js ***! + !*** ./node_modules/@mui/icons-material/Cached.js ***! \****************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ./utils/createSvgIcon */ \"./node_modules/@mui/icons-material/utils/createSvgIcon.js\"));\nvar _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"\n}), 'Cancel');\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://display-dev-server-preview/./node_modules/@mui/icons-material/Cancel.js?"); +eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ./utils/createSvgIcon */ \"./node_modules/@mui/icons-material/utils/createSvgIcon.js\"));\nvar _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z\"\n}), 'Cached');\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://display-dev-server-preview/./node_modules/@mui/icons-material/Cached.js?"); /***/ }), -/***/ "./node_modules/@mui/icons-material/Clear.js": -/*!***************************************************!*\ - !*** ./node_modules/@mui/icons-material/Clear.js ***! - \***************************************************/ +/***/ "./node_modules/@mui/icons-material/CameraEnhance.js": +/*!***********************************************************!*\ + !*** ./node_modules/@mui/icons-material/CameraEnhance.js ***! + \***********************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ./utils/createSvgIcon */ \"./node_modules/@mui/icons-material/utils/createSvgIcon.js\"));\nvar _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Clear');\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://display-dev-server-preview/./node_modules/@mui/icons-material/Clear.js?"); +eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ./utils/createSvgIcon */ \"./node_modules/@mui/icons-material/utils/createSvgIcon.js\"));\nvar _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\nvar _default = (0, _createSvgIcon.default)([/*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M9 3 7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2h-3.17L15 3H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z\"\n}, \"0\"), /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m12 17 1.25-2.75L16 13l-2.75-1.25L12 9l-1.25 2.75L8 13l2.75 1.25z\"\n}, \"1\")], 'CameraEnhance');\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://display-dev-server-preview/./node_modules/@mui/icons-material/CameraEnhance.js?"); /***/ }), -/***/ "./node_modules/@mui/icons-material/Done.js": -/*!**************************************************!*\ - !*** ./node_modules/@mui/icons-material/Done.js ***! - \**************************************************/ +/***/ "./node_modules/@mui/icons-material/Cancel.js": +/*!****************************************************!*\ + !*** ./node_modules/@mui/icons-material/Cancel.js ***! + \****************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; +eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ./utils/createSvgIcon */ \"./node_modules/@mui/icons-material/utils/createSvgIcon.js\"));\nvar _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"\n}), 'Cancel');\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://display-dev-server-preview/./node_modules/@mui/icons-material/Cancel.js?"); + +/***/ }), + +/***/ "./node_modules/@mui/icons-material/FolderOpen.js": +/*!********************************************************!*\ + !*** ./node_modules/@mui/icons-material/FolderOpen.js ***! + \********************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ./utils/createSvgIcon */ \"./node_modules/@mui/icons-material/utils/createSvgIcon.js\"));\nvar _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z\"\n}), 'Done');\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://display-dev-server-preview/./node_modules/@mui/icons-material/Done.js?"); +eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ./utils/createSvgIcon */ \"./node_modules/@mui/icons-material/utils/createSvgIcon.js\"));\nvar _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z\"\n}), 'FolderOpen');\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://display-dev-server-preview/./node_modules/@mui/icons-material/FolderOpen.js?"); /***/ }), @@ -3415,7 +3426,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AdPreview\": () => (/* binding */ AdPreview)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Card/Card.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Typography/Typography.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Box/Box.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Tab/Tab.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/CardMedia/CardMedia.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/CardContent/CardContent.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Tooltip/Tooltip.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Chip/Chip.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Divider/Divider.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/IconButton/IconButton.js\");\n/* harmony import */ var _mui_lab_TabContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/lab/TabContext */ \"./node_modules/@mui/lab/TabContext/TabContext.js\");\n/* harmony import */ var _mui_lab_TabList__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/lab/TabList */ \"./node_modules/@mui/lab/TabList/TabList.js\");\n/* harmony import */ var _mui_icons_material_Replay__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @mui/icons-material/Replay */ \"./node_modules/@mui/icons-material/Replay.js\");\n/* harmony import */ var _mui_icons_material_Gif__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/Gif */ \"./node_modules/@mui/icons-material/Gif.js\");\n/* harmony import */ var _mui_icons_material_Image__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/icons-material/Image */ \"./node_modules/@mui/icons-material/Image.js\");\n/* harmony import */ var _mui_icons_material_Movie__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/icons-material/Movie */ \"./node_modules/@mui/icons-material/Movie.js\");\n/* harmony import */ var _mui_icons_material_OpenInNew__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @mui/icons-material/OpenInNew */ \"./node_modules/@mui/icons-material/OpenInNew.js\");\n/* harmony import */ var _mui_icons_material_FolderZip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/icons-material/FolderZip */ \"./node_modules/@mui/icons-material/FolderZip.js\");\n/* harmony import */ var _mui_icons_material_Done__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/icons-material/Done */ \"./node_modules/@mui/icons-material/Done.js\");\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/Clear */ \"./node_modules/@mui/icons-material/Clear.js\");\n// import styles from \"./Previews.module.scss\";\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst AdPreview = props => {\n const {\n ad,\n maxFileSize = 150\n } = props;\n const [mediaType, setMediaType] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"iframe\");\n const [mediaSource, setMediaSource] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(ad.output.html.url);\n const [activeConfigTab, setActiveConfigTab] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"html,iframe\");\n const adPreviewCard = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();\n const extensionTypes = [\"jpg,img\", \"mp4,video\", \"gif,img\"];\n const extensionIcons = {\n html: \"\",\n zip: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_FolderZip__WEBPACK_IMPORTED_MODULE_1__[\"default\"], null),\n jpg: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_Image__WEBPACK_IMPORTED_MODULE_2__[\"default\"], null),\n mp4: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_Movie__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null),\n gif: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_Gif__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null)\n };\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {\n const [type, mediaType] = activeConfigTab.split(\",\");\n setMediaType(mediaType);\n if (type === \"html\") {\n setMediaSource(ad.output.html.url);\n } else {\n setMediaSource(ad.output[type].url);\n }\n }, [activeConfigTab]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n sx: {\n minWidth: `${ad.width}px`,\n maxWidth: `${ad.width}px`,\n height: \"fit-content\"\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n sx: {\n padding: \"0px 10px\",\n margin: \"10px 0\",\n wordBreak: \"break-all\"\n },\n align: \"center\",\n variant: \"body2\"\n }, ad.bundleName), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_lab_TabContext__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n value: activeConfigTab\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n sx: {\n borderColor: \"divider\"\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_lab_TabList__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n variant: \"fullWidth\",\n onChange: (event, newValue) => setActiveConfigTab(newValue)\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n wrapped: true,\n sx: {\n minWidth: \"50px\"\n },\n label: \"html\",\n value: \"html,iframe\"\n }), extensionTypes.map(item => {\n const [extension, type] = item.split(\",\");\n if (ad.output[extension]) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: item,\n disabled: !ad.output[extension]?.url,\n icon: extensionIcons[extension],\n sx: {\n minWidth: \"50px\"\n },\n value: item\n });\n })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n ref: adPreviewCard,\n component: mediaType,\n style: {\n width: ad.width,\n height: ad.height\n },\n height: ad.height,\n width: ad.width,\n src: mediaSource,\n id: ad.bundleName,\n className: ad.bundleName,\n frameBorder: \"0\",\n autoPlay: true,\n controls: true\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_12__[\"default\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n marginBottom: \"20px\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n sx: {\n marginBottom: \"10px\"\n },\n noWrap: true,\n align: \"left\",\n variant: \"body2\"\n }, \"Bundle size:\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n title: \"Bundle size\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n icon: Math.round(ad.output.zip.size / 1024) <= maxFileSize ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_Done__WEBPACK_IMPORTED_MODULE_15__[\"default\"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_16__[\"default\"], null),\n label: `${Math.round(ad.output.zip.size / 1024)} KB`,\n color: Math.round(ad.output.zip.size / 1024) <= maxFileSize ? \"success\" : \"error\"\n })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n light: true,\n sx: {\n margin: \"20px 0\"\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n display: \"flex\",\n flexWrap: \"wrap\",\n justifyContent: \"space-between\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n title: \"Reload\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n onClick: e => {\n activeConfigTab === \"html,iframe\" ? adPreviewCard.current.src = ad.output.html.url : setActiveConfigTab(\"html,iframe\");\n },\n color: \"primary\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_Replay__WEBPACK_IMPORTED_MODULE_19__[\"default\"], null))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n title: \"Open in new window\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n onClick: () => window.open(ad.output.html.url),\n color: \"primary\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_OpenInNew__WEBPACK_IMPORTED_MODULE_20__[\"default\"], null)))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n display: \"flex\",\n flexWrap: \"wrap\"\n }, Object.keys(ad.output).map(extension => {\n if (ad.output[extension]) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n key: extension,\n title: `Download ${extension.toUpperCase()} ${!ad.output[extension]?.url ? \"(loading)\" : \"\"}`\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"span\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n disabled: !ad.output[extension]?.url,\n onClick: e => window.location.href = ad.output[extension]?.url,\n color: \"primary\"\n }, extensionIcons[extension])));\n }))))));\n};\n\n//# sourceURL=webpack://display-dev-server-preview/./src/components/AdPreview.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AdPreview\": () => (/* binding */ AdPreview)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Card/Card.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Typography/Typography.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Box/Box.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Tab/Tab.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/CardMedia/CardMedia.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/CardContent/CardContent.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Divider/Divider.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Tooltip/Tooltip.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Chip/Chip.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/IconButton/IconButton.js\");\n/* harmony import */ var _mui_lab_TabContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/lab/TabContext */ \"./node_modules/@mui/lab/TabContext/TabContext.js\");\n/* harmony import */ var _mui_lab_TabList__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/lab/TabList */ \"./node_modules/@mui/lab/TabList/TabList.js\");\n/* harmony import */ var _mui_icons_material_Replay__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @mui/icons-material/Replay */ \"./node_modules/@mui/icons-material/Replay.js\");\n/* harmony import */ var _mui_icons_material_Gif__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/Gif */ \"./node_modules/@mui/icons-material/Gif.js\");\n/* harmony import */ var _mui_icons_material_Image__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/icons-material/Image */ \"./node_modules/@mui/icons-material/Image.js\");\n/* harmony import */ var _mui_icons_material_Movie__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/icons-material/Movie */ \"./node_modules/@mui/icons-material/Movie.js\");\n/* harmony import */ var _mui_icons_material_OpenInNew__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @mui/icons-material/OpenInNew */ \"./node_modules/@mui/icons-material/OpenInNew.js\");\n/* harmony import */ var _mui_icons_material_FolderZip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/icons-material/FolderZip */ \"./node_modules/@mui/icons-material/FolderZip.js\");\n/* harmony import */ var _mui_icons_material_FolderOpen__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/FolderOpen */ \"./node_modules/@mui/icons-material/FolderOpen.js\");\n/* harmony import */ var _mui_icons_material_CameraEnhance__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/icons-material/CameraEnhance */ \"./node_modules/@mui/icons-material/CameraEnhance.js\");\n// import styles from \"./Previews.module.scss\";\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ngsap.registerPlugin(GSDevTools);\nconst AdPreview = props => {\n const {\n ad,\n gsdevtools,\n timestamp,\n maxFileSize = 150\n } = props;\n const cachedHTML = `${ad.output.html.url}?r=${timestamp}`;\n const [mediaType, setMediaType] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"iframe\");\n const [mediaSource, setMediaSource] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(cachedHTML);\n const [activeConfigTab, setActiveConfigTab] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"html,iframe\");\n const [animation, setAnimation] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();\n const adPreviewCard = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();\n const gsDevContainer = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();\n\n // add gsdevtools listeners\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {\n if (gsdevtools !== \"true\") return;\n gsDevContainer.current && (gsDevContainer.current.innerHTML = '');\n const ifr = adPreviewCard.current;\n\n // have to use onload in order to set events to the right element (React render thing)\n ifr.onload = () => {\n if (!ifr.contentWindow) return;\n ifr.contentWindow.addEventListener(\"getMainTimeline\", e => setAnimation(e.detail), false);\n ifr.contentWindow.dispatchEvent(new CustomEvent(\"previewReady\"));\n };\n }, [mediaSource]);\n\n // create devtools box with animation\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {\n if (!animation) return;\n animation.pause(0);\n const tl = gsap.timeline();\n tl.to(animation, {\n duration: animation.totalDuration(),\n totalProgress: 1,\n ease: Linear.easeNone\n });\n gsDevContainer.current && (gsDevContainer.current.innerHTML = '');\n GSDevTools.create({\n container: gsDevContainer.current,\n animation: tl,\n visibility: \"visible\",\n globalSync: false\n });\n }, [animation]);\n const extensionTypes = [\"jpg,img\", \"mp4,video\", \"gif,img\"];\n const extensionIcons = {\n html: \"\",\n zip: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_FolderZip__WEBPACK_IMPORTED_MODULE_1__[\"default\"], null),\n jpg: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_Image__WEBPACK_IMPORTED_MODULE_2__[\"default\"], null),\n mp4: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_Movie__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null),\n gif: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_Gif__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null)\n };\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {\n const [type, mediaType] = activeConfigTab.split(\",\");\n setMediaType(mediaType);\n if (type === \"html\") {\n setMediaSource(cachedHTML);\n } else {\n setMediaSource(ad.output[type].url);\n }\n }, [activeConfigTab]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n sx: {\n minWidth: `${ad.width}px`,\n maxWidth: `${ad.width}px`,\n height: \"fit-content\"\n },\n className: \"card\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n sx: {\n padding: \"0px 10px\",\n margin: \"10px 0\",\n wordBreak: \"break-all\"\n },\n align: \"center\",\n variant: \"body2\"\n }, ad.bundleName), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_lab_TabContext__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n value: activeConfigTab\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n sx: {\n borderColor: \"divider\"\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_lab_TabList__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n variant: \"fullWidth\",\n onChange: (event, newValue) => setActiveConfigTab(newValue),\n TabIndicatorProps: extensionTypes.filter(item => {\n const [extension, type] = item.split(\",\");\n return ad.output[extension];\n }).length ? {} : {\n style: {\n display: 'none'\n }\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n wrapped: true,\n sx: {\n minWidth: \"50px\"\n },\n label: \"html\",\n value: \"html,iframe\"\n }), extensionTypes.map(item => {\n const [extension, type] = item.split(\",\");\n if (ad.output[extension]) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n key: item,\n disabled: !ad.output[extension]?.url,\n icon: extensionIcons[extension],\n sx: {\n minWidth: \"50px\"\n },\n value: item\n });\n })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n ref: adPreviewCard,\n component: mediaType,\n scrolling: \"no\",\n style: {\n width: ad.width,\n height: ad.height\n },\n height: ad.height,\n width: ad.width,\n src: mediaSource,\n id: ad.bundleName,\n className: ad.bundleName,\n frameBorder: \"0\",\n autoPlay: true,\n controls: true\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_12__[\"default\"], null, gsdevtools === \"true\" && animation && activeConfigTab.split(\",\")[0] === \"html\" ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n ref: gsDevContainer\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n light: true,\n sx: {\n margin: \"20px 0\"\n }\n })) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null), ad.output?.zip?.size || ad.output?.unzip?.size || ad.quality ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n marginBottom: \"20px\",\n display: \"flex\",\n flexWrap: \"wrap\",\n gap: \"10px\",\n justifyContent: \"space-evenly\",\n className: \"chips\"\n }, ad.output?.zip?.size ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n title: `Compressed size: ${(ad.output.zip.size / 1024).toFixed(1)} KB`\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_FolderZip__WEBPACK_IMPORTED_MODULE_1__[\"default\"], null),\n label: `${Math.floor(ad.output.zip.size / 1024)} KB`,\n color: ad.output.zip.size / 1024 <= maxFileSize ? \"success\" : \"error\"\n })) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null), ad.output?.unzip?.size ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n title: `Uncompressed size: ${(ad.output.unzip.size / 1024).toFixed(1)} KB`\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_FolderOpen__WEBPACK_IMPORTED_MODULE_16__[\"default\"], null),\n label: `${Math.floor(ad.output.unzip.size / 1024)} KB`,\n color: ad.output.unzip.size / 1024 <= maxFileSize ? \"success\" : \"error\"\n })) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null), ad.quality && gsdevtools === \"true\" ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n title: \"Asset quality\",\n className: \"quality\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_CameraEnhance__WEBPACK_IMPORTED_MODULE_17__[\"default\"], null),\n label: `${ad.quality}`,\n color: ad.quality > 85 ? \"success\" : ad.quality > 70 ? \"warning\" : \"error\"\n })) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n light: true,\n sx: {\n margin: \"20px 0\"\n }\n })) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n display: \"flex\",\n flexWrap: \"wrap\",\n justifyContent: \"space-between\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n title: \"Reload\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n onClick: e => {\n activeConfigTab === \"html,iframe\" ? adPreviewCard.current.src = cachedHTML : setActiveConfigTab(\"html,iframe\");\n },\n color: \"primary\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_Replay__WEBPACK_IMPORTED_MODULE_19__[\"default\"], null))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n title: \"Open in new window\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n onClick: () => window.open(ad.output.html.url),\n color: \"primary\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_OpenInNew__WEBPACK_IMPORTED_MODULE_20__[\"default\"], null)))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n display: \"flex\",\n flexWrap: \"wrap\"\n }, Object.keys(ad.output).map(extension => {\n if (ad.output[extension] && ad.output[extension].url && extension != 'html') return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n key: extension,\n title: `Download ${extension.toUpperCase()} ${!ad.output[extension]?.url ? \"(loading)\" : \"\"}`\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"span\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n disabled: !ad.output[extension]?.url,\n onClick: e => window.location.href = ad.output[extension]?.url,\n color: \"primary\"\n }, extensionIcons[extension])));\n }))))));\n};\n\n//# sourceURL=webpack://display-dev-server-preview/./src/components/AdPreview.js?"); /***/ }), @@ -3426,7 +3437,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Previews)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Previews_module_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Previews.module.scss */ \"./src/components/Previews.module.scss\");\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router-dom/dist/index.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/AppBar/AppBar.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Toolbar/Toolbar.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Typography/Typography.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/FormControl/FormControl.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/InputLabel/InputLabel.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Select/Select.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/OutlinedInput/OutlinedInput.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Box/Box.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Chip/Chip.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/ListSubheader/ListSubheader.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/MenuItem/MenuItem.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/TablePagination/TablePagination.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Button/Button.js\");\n/* harmony import */ var _mui_icons_material_Cancel__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/icons-material/Cancel */ \"./node_modules/@mui/icons-material/Cancel.js\");\n/* harmony import */ var _AdPreview__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AdPreview */ \"./src/components/AdPreview.js\");\n\n\n\n\n\n\n\nconst paginate = (array, page_size, page_number) => {\n return array.slice((page_number - 1) * page_size, page_number * page_size);\n};\nconst getFiltersFromAds = (ads, searchParams) => {\n // returns array with all the filtergroup arrays containing all the unique filters\n // it also initially sets the filters based on the searchparams\n let filterGroups = [];\n ads.forEach(ad => {\n const bundleSplits = ad.bundleName.split(\"_\");\n bundleSplits.forEach((bundleSplit, index) => {\n if (!filterGroups[index]) filterGroups[index] = [];\n filterGroups[index].push(bundleSplit);\n });\n });\n filterGroups = filterGroups.map(filterGroup => [...new Set(filterGroup)]); // make them all unique\n\n // get the initial filter(s) from the searchParams ?filter=hk,en;friendsfamily;160x600\n const searchParamsArray = searchParams.get(\"filter\") ? searchParams.get(\"filter\").split(\";\").map(filterGroup => filterGroup.split(\",\")) : [];\n return filterGroups.map(filterGroup => {\n return filterGroup.map(filter => {\n return {\n value: filter,\n selected: searchParamsArray.flat().includes(filter)\n };\n });\n });\n};\nconst composeSearchParamsFromFilters = filters => {\n return filters.map(filterGroup => {\n return filterGroup.filter(filter => filter.selected).map(filter => filter.value).join(\",\");\n }).filter(filterGroup => filterGroup.length > 0).join(\";\");\n};\nconst getAdsListFromFilters = (adsList, filters) => {\n return adsList.filter(ad => {\n // en_friendsfamily_ill_300x250\n return ad.bundleName.split(\"_\").every((bundleSplit, index) => {\n const isFilteringOnGroup = filters[index].filter(filter => filter.selected).length > 0; // if any of the 'selected' keys are true in these objects, it means we're filtering on that group.\n\n if (isFilteringOnGroup) {\n const [filterValue] = filters[index].filter(filter => filter.value === bundleSplit).map(filter => filter.selected);\n return filterValue;\n } else {\n return true; // if we're not filtering on this group, all keys in this group are allowed (because no specific filter is selected in that group)\n }\n });\n });\n};\n\nconst getLabelFromFilterGroup = filterGroup => {\n if (filterGroup.every(filter => filter.value.match(/[0-9]+x[0-9]+/i))) return \"Dimensions\"; // if it matches dimensions, like 300x500 ;\n if (filterGroup.every(filter => filter.value.match(/^[a-z]{2}$/i))) return \"Language\"; // if string is 2 chars long and a-z or A-Z\n return \"Category\";\n};\nfunction Previews({\n data\n}) {\n const [searchParams, setSearchParams] = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_3__.useSearchParams)();\n const [ads, setAds] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);\n const [filters, setFilters] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(getFiltersFromAds(data.ads, searchParams));\n const [page, setPage] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0);\n const [itemsPerPage, setItemsPerPage] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(10);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {\n setAds(getAdsListFromFilters(data.ads, filters));\n setSearchParams({\n filter: decodeURI(composeSearchParamsFromFilters(filters))\n });\n setPage(0);\n }, [filters]);\n const getSelectedFilters = () => {\n // returns flat array of selected filters i.e. [\"en\",\"300x400\"] (the input element needs this as a value)\n return filters.flat().filter(filter => filter.selected).map(filter => filter.value);\n };\n const handleChangeFilter = event => {\n // make deep copy of filters state\n let updatedFilters = JSON.parse(JSON.stringify(filters));\n\n // set each filter's selected value based on the value from the event\n updatedFilters.flat().forEach(filter => {\n filter.selected = event.target.value.includes(filter.value);\n });\n setFilters(updatedFilters);\n };\n function handleFilterDelete(e, value) {\n let updatedFilters = JSON.parse(JSON.stringify(filters));\n\n // set each filter's selected value based on the value from the event\n updatedFilters.flat().forEach(filter => {\n if (filter.value === value) {\n console.log(\"found the one to be deleted\");\n console.log(filter);\n filter.selected = false;\n }\n });\n setFilters(updatedFilters);\n }\n\n // handle button(s)\n\n const handleDownloadZips = event => {\n console.log(event);\n window.open(\"all.zip\");\n };\n\n // handle pages\n const handleChangePage = (event, newPage) => {\n setPage(newPage);\n };\n const handleChangeRowsPerPage = event => {\n setItemsPerPage(parseInt(event.target.value, 10));\n setPage(0);\n };\n const pageAds = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {\n return paginate(ads, itemsPerPage, page + 1);\n }, [page, itemsPerPage, ads]);\n\n // generate page\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n position: \"sticky\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n className: _Previews_module_scss__WEBPACK_IMPORTED_MODULE_1__[\"default\"].toolbar\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n align: \"left\",\n variant: \"h5\",\n component: \"div\"\n }, \"Preview\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n sx: {\n m: 1,\n minWidth: 150,\n maxWidth: \"40%\"\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n id: \"demo-multiple-chip-label\"\n }, \"Filters\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n labelId: \"demo-multiple-chip-label\",\n id: \"demo-multiple-chip\",\n multiple: true,\n value: getSelectedFilters(),\n onChange: handleChangeFilter,\n input: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n id: \"select-multiple-chip\",\n label: \"Chip\"\n }),\n renderValue: selected => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n sx: {\n display: \"flex\",\n flexWrap: \"wrap\",\n gap: 0.5\n }\n }, selected.map(value => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n onDelete: e => handleFilterDelete(e, value),\n key: value,\n label: value,\n deleteIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_Cancel__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n onMouseDown: event => event.stopPropagation()\n })\n })))\n }, filters.filter(filterGroup => filterGroup.length > 1) // only show filtergroups with more than 1 filter\n .map((filterGroup, filterGroupIndex) => [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_14__[\"default\"], null, getLabelFromFilterGroup(filterGroup)), filterGroup.map((filter, filterIndex) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: filter.value,\n value: filter.value\n }, filter.value))]))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n labelRowsPerPage: \"Ads per page:\",\n component: \"div\",\n count: ads.length,\n page: page,\n onPageChange: handleChangePage,\n rowsPerPage: itemsPerPage,\n onRowsPerPageChange: handleChangeRowsPerPage\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n onClick: handleDownloadZips,\n color: \"inherit\"\n }, \"Download Zips\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n className: _Previews_module_scss__WEBPACK_IMPORTED_MODULE_1__[\"default\"].previews\n }, pageAds.length > 0 && pageAds.map(ad => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_AdPreview__WEBPACK_IMPORTED_MODULE_2__.AdPreview, {\n key: ad.bundleName,\n ad: ad,\n maxFileSize: data.maxFileSize\n })), pageAds.length < 1 && \"No ads found with the current combination of filters\"));\n}\n\n//# sourceURL=webpack://display-dev-server-preview/./src/components/Previews.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Previews)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Previews_module_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Previews.module.scss */ \"./src/components/Previews.module.scss\");\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router-dom/dist/index.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/AppBar/AppBar.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Toolbar/Toolbar.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Box/Box.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Tooltip/Tooltip.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Button/Button.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Typography/Typography.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/FormControl/FormControl.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/InputLabel/InputLabel.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Select/Select.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/OutlinedInput/OutlinedInput.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/Chip/Chip.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/ListSubheader/ListSubheader.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/MenuItem/MenuItem.js\");\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @mui/material */ \"./node_modules/@mui/material/TablePagination/TablePagination.js\");\n/* harmony import */ var _mui_icons_material_Cancel__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/Cancel */ \"./node_modules/@mui/icons-material/Cancel.js\");\n/* harmony import */ var _mui_icons_material_Cached__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/icons-material/Cached */ \"./node_modules/@mui/icons-material/Cached.js\");\n/* harmony import */ var _AdPreview__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AdPreview */ \"./src/components/AdPreview.js\");\n\n\n\n\n\n\n\n\nconst paginate = (array, page_size, page_number) => {\n return array.slice((page_number - 1) * page_size, page_number * page_size);\n};\nconst getFiltersFromAds = (ads, searchParams) => {\n // returns array with all the filtergroup arrays containing all the unique filters\n // it also initially sets the filters based on the searchparams\n let filterGroups = [];\n ads.forEach(ad => {\n const bundleSplits = ad.bundleName.split(\"_\");\n bundleSplits.forEach((bundleSplit, index) => {\n if (!filterGroups[index]) filterGroups[index] = [];\n filterGroups[index].push(bundleSplit);\n });\n });\n filterGroups = filterGroups.map(filterGroup => [...new Set(filterGroup)]); // make them all unique\n\n // get the initial filter(s) from the searchParams ?filter=hk,en;friendsfamily;160x600\n const searchParamsArray = searchParams.get(\"filter\") ? searchParams.get(\"filter\").split(\";\").map(filterGroup => filterGroup.split(\",\")) : [];\n return filterGroups.map(filterGroup => {\n return filterGroup.map(filter => {\n return {\n value: filter,\n selected: searchParamsArray.flat().includes(filter)\n };\n });\n });\n};\nconst composeSearchParamsFromFilters = filters => {\n return filters.map(filterGroup => {\n return filterGroup.filter(filter => filter.selected).map(filter => filter.value).join(\",\");\n }).filter(filterGroup => filterGroup.length > 0).join(\";\");\n};\nconst getAdsListFromFilters = (adsList, filters) => {\n return adsList.filter(ad => {\n // en_friendsfamily_ill_300x250\n return ad.bundleName.split(\"_\").every((bundleSplit, index) => {\n const isFilteringOnGroup = filters[index].filter(filter => filter.selected).length > 0; // if any of the 'selected' keys are true in these objects, it means we're filtering on that group.\n\n if (isFilteringOnGroup) {\n const [filterValue] = filters[index].filter(filter => filter.value === bundleSplit).map(filter => filter.selected);\n return filterValue;\n } else {\n return true; // if we're not filtering on this group, all keys in this group are allowed (because no specific filter is selected in that group)\n }\n });\n });\n};\n\nconst getLabelFromFilterGroup = filterGroup => {\n if (filterGroup.every(filter => filter.value.match(/[0-9]+x[0-9]+/i))) return \"Dimensions\"; // if it matches dimensions, like 300x500 ;\n if (filterGroup.every(filter => filter.value.match(/^[a-z]{2}$/i))) return \"Language\"; // if string is 2 chars long and a-z or A-Z\n return \"Category\";\n};\nfunction Previews({\n data\n}) {\n const [searchParams, setSearchParams] = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_3__.useSearchParams)();\n const gsdevtools = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => searchParams.get('gsdevtools'), []);\n const [ads, setAds] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);\n const [filters, setFilters] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(getFiltersFromAds(data.ads, searchParams));\n const [page, setPage] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(+searchParams.get('page') || 0);\n const [itemsPerPage, setItemsPerPage] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(+searchParams.get('perpage') || 10);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {\n setAds(getAdsListFromFilters(data.ads, filters));\n const filter = decodeURI(composeSearchParamsFromFilters(filters));\n const collectFilters = {};\n filter && (collectFilters.filter = filter);\n gsdevtools && (collectFilters.gsdevtools = gsdevtools);\n page && (collectFilters.page = page);\n itemsPerPage && itemsPerPage != 10 && (collectFilters.perpage = itemsPerPage);\n setSearchParams(collectFilters);\n }, [filters, page, itemsPerPage]);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {\n if (gsdevtools !== \"true\") return;\n window.addEventListener('keydown', e => {\n if (e.defaultPrevented) return;\n if (e.key === \" \") {\n e.preventDefault();\n }\n });\n }, []);\n const getSelectedFilters = () => {\n // returns flat array of selected filters i.e. [\"en\",\"300x400\"] (the input element needs this as a value)\n return filters.flat().filter(filter => filter.selected).map(filter => filter.value);\n };\n const handleChangeFilter = event => {\n // make deep copy of filters state\n let updatedFilters = JSON.parse(JSON.stringify(filters));\n\n // set each filter's selected value based on the value from the event\n updatedFilters.flat().forEach(filter => {\n filter.selected = event.target.value.includes(filter.value);\n });\n setFilters(updatedFilters);\n setPage(0);\n };\n function handleFilterDelete(e, value) {\n let updatedFilters = JSON.parse(JSON.stringify(filters));\n\n // set each filter's selected value based on the value from the event\n updatedFilters.flat().forEach(filter => {\n if (filter.value === value) {\n filter.selected = false;\n }\n });\n setFilters(updatedFilters);\n setPage(0);\n }\n\n // handle button(s)\n\n const handleDownloadZips = event => {\n // console.log(event);\n window.open(\"all.zip\");\n };\n const handleReloadDynamicData = async e => {\n const res = await fetch('reload_dynamic_data');\n if (res.status === 200) location.reload();\n };\n\n // handle pages\n const handleChangePage = (event, newPage) => {\n setPage(newPage);\n };\n const handleChangeRowsPerPage = event => {\n setItemsPerPage(parseInt(event.target.value, 10));\n setPage(0);\n };\n const pageAds = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {\n return paginate(ads, itemsPerPage, page + 1);\n }, [page, itemsPerPage, ads]);\n\n // generate page\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n position: \"sticky\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n className: _Previews_module_scss__WEBPACK_IMPORTED_MODULE_1__[\"default\"].toolbar\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n sx: {\n display: 'flex',\n gap: '10px'\n }\n }, data.isGoogleSpreadsheetBanner ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n title: \"Reload dynamic data\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n onClick: handleReloadDynamicData,\n color: \"inherit\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_Cached__WEBPACK_IMPORTED_MODULE_9__[\"default\"], null))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n title: new Date(data.timestamp).toLocaleString()\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n align: \"left\",\n variant: \"h5\",\n component: \"div\"\n }, \"Preview\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n sx: {\n m: 1,\n minWidth: 150,\n maxWidth: \"40%\"\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n id: \"demo-multiple-chip-label\"\n }, \"Filters\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n labelId: \"demo-multiple-chip-label\",\n id: \"demo-multiple-chip\",\n multiple: true,\n value: getSelectedFilters(),\n onChange: handleChangeFilter,\n input: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n id: \"select-multiple-chip\",\n label: \"Filters\"\n }),\n renderValue: selected => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n sx: {\n display: \"flex\",\n flexWrap: \"wrap\",\n gap: 0.5\n }\n }, selected.map(value => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n onDelete: e => handleFilterDelete(e, value),\n key: value,\n label: value,\n deleteIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material_Cancel__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n onMouseDown: event => event.stopPropagation()\n })\n })))\n }, filters.filter(filterGroup => filterGroup.length > 1) // only show filtergroups with more than 1 filter\n .map((filterGroup, filterGroupIndex) => [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__[\"default\"], null, getLabelFromFilterGroup(filterGroup)), filterGroup.map((filter, filterIndex) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n key: filter.value,\n value: filter.value\n }, filter.value))]))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n labelRowsPerPage: \"Ads per page:\",\n component: \"div\",\n count: ads.length,\n page: ads.length ? page : 0,\n onPageChange: handleChangePage,\n rowsPerPage: itemsPerPage,\n onRowsPerPageChange: handleChangeRowsPerPage\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n onClick: handleDownloadZips,\n color: \"inherit\"\n }, \"Download Zips\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n className: _Previews_module_scss__WEBPACK_IMPORTED_MODULE_1__[\"default\"].previews\n }, pageAds.length > 0 && pageAds.map(ad => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_AdPreview__WEBPACK_IMPORTED_MODULE_2__.AdPreview, {\n gsdevtools: gsdevtools,\n key: ad.bundleName,\n ad: ad,\n maxFileSize: ad.maxFileSize,\n timestamp: data.timestamp\n })), pageAds.length < 1 && \"No ads found with the current combination of filters\"));\n}\n\n//# sourceURL=webpack://display-dev-server-preview/./src/components/Previews.js?"); /***/ }), @@ -3448,7 +3459,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ getData)\n/* harmony export */ });\nasync function getData(url) {\n const data = await fetch(url, {\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\"\n }\n });\n return data.json();\n}\n\n//# sourceURL=webpack://display-dev-server-preview/./src/utils/getData.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ getData)\n/* harmony export */ });\nasync function getData(url) {\n const data = await fetch(url, {\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n \"Cache-Control\": \"no-cache\"\n }\n });\n return data.json();\n}\n\n//# sourceURL=webpack://display-dev-server-preview/./src/utils/getData.js?"); /***/ }), @@ -3514,7 +3525,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".App {\\n /*text-align: center;*/\\n height: 100%;\\n display: flex;\\n flex-wrap: wrap;\\n color: #fff;\\n}\\n\\n.App-logo {\\n height: 40vmin;\\n pointer-events: none;\\n}\\n\\n@media (prefers-reduced-motion: no-preference) {\\n .App-logo {\\n animation: App-logo-spin infinite 20s linear;\\n }\\n}\\n.App-header {\\n background-color: #282c34;\\n min-height: 100vh;\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n font-size: calc(10px + 2vmin);\\n color: white;\\n}\\n\\n.App-link {\\n color: #61dafb;\\n}\\n\\n@keyframes App-logo-spin {\\n from {\\n transform: rotate(0deg);\\n }\\n to {\\n transform: rotate(360deg);\\n }\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://display-dev-server-preview/./src/App.css?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"* {\\n scrollbar-width: thin;\\n scrollbar-color: #fff #121212;\\n}\\n*::-webkit-scrollbar {\\n width: 1rem;\\n height: 1rem;\\n}\\n*::-webkit-scrollbar-track {\\n background-color: #121212;\\n}\\n*::-webkit-scrollbar-thumb {\\n background-color: #fff;\\n border-radius: 1rem;\\n border: 3px solid #121212;\\n}\\n\\n.gs-dev-tools {\\n container-type: inline-size;\\n}\\n\\n.gs-dev-tools .in-point, .gs-dev-tools .out-point {\\n display: none !important;\\n}\\n\\n.gs-dev-tools .logo {\\n display: none !important;\\n}\\n\\n.gs-dev-tools label input, .gs-dev-tools label select {\\n display: none !important;\\n}\\n\\n.gs-dev-tools .time-scale {\\n display: none !important;\\n}\\n\\n.gs-dev-tools .select-animation {\\n display: none !important;\\n}\\n\\n.gs-dev-tools {\\n position: static !important;\\n}\\n\\n.gs-hit-area {\\n display: none !important;\\n}\\n\\n.gs-dev-tools.minimal {\\n display: block !important;\\n}\\n\\n.gs-dev-tools.minimal .gs-bottom {\\n display: flex !important;\\n align-items: center !important;\\n justify-content: center !important;\\n position: relative !important;\\n}\\n\\n.gs-dev-tools.minimal .play-pause {\\n margin: 0 !important;\\n}\\n\\n.gs-dev-tools .timeline {\\n margin: 0 !important;\\n}\\n\\n.gs-dev-tools .gs-bottom-right {\\n display: flex !important;\\n line-height: 1 !important;\\n}\\n\\n.gs-dev-tools .timeline {\\n top: unset !important;\\n transform: unset !important;\\n}\\n\\n.gs-dev-tools .gs-bottom {\\n overflow: hidden !important;\\n border-bottom-left-radius: 8px !important;\\n border-bottom-right-radius: 8px !important;\\n}\\n\\n.gs-dev-tools .timeline-track,\\n.gs-dev-tools .progress-bar {\\n overflow: hidden !important;\\n border-top-left-radius: 8px !important;\\n border-top-right-radius: 8px !important;\\n}\\n\\n.gs-dev-tools .timeline-track,\\n.gs-dev-tools .progress-bar {\\n background-color: #90caf9 !important;\\n}\\n\\n.gs-dev-tools .playhead {\\n background-color: #008cff !important;\\n height: 18px !important;\\n width: 18px !important;\\n border: none !important;\\n}\\n\\n/* all */\\n@container (min-width: 125px) {\\n .gs-dev-tools.minimal .rewind,\\n .gs-dev-tools.minimal .loop,\\n .gs-dev-tools.minimal .play-pause {\\n display: block !important;\\n flex-grow: 1 !important;\\n height: 18px !important;\\n }\\n .gs-dev-tools.minimal .play-pause {\\n height: 24px !important;\\n }\\n .gs-dev-tools .time-container {\\n font-size: 17px !important;\\n }\\n /* 160x600 */\\n @container (max-width: 265px) {\\n .gs-dev-tools .gs-bottom {\\n height: 64px !important;\\n }\\n .gs-dev-tools.minimal .rewind,\\n .gs-dev-tools.minimal .loop,\\n .gs-dev-tools.minimal .play-pause {\\n margin-bottom: 20px !important;\\n }\\n .gs-dev-tools.minimal .play-pause {\\n height: 24px !important;\\n }\\n .gs-dev-tools .gs-bottom-right {\\n width: 100% !important;\\n justify-content: center !important;\\n position: absolute !important;\\n bottom: 5px;\\n }\\n .gs-dev-tools .time-container {\\n font-size: 14px !important;\\n }\\n }\\n}\\n/* 120x600 */\\n@container (max-width: 124px) {\\n .gs-dev-tools .gs-bottom {\\n height: 48px !important;\\n }\\n .gs-dev-tools .gs-bottom-right {\\n width: 100% !important;\\n justify-content: center !important;\\n position: absolute !important;\\n bottom: 5px;\\n }\\n .gs-dev-tools .time-container {\\n font-size: 9px !important;\\n }\\n .gs-dev-tools.minimal .rewind,\\n .gs-dev-tools.minimal .loop,\\n .gs-dev-tools.minimal .play-pause {\\n margin-bottom: 15px !important;\\n }\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://display-dev-server-preview/./src/App.css?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js"); /***/ }), @@ -3536,7 +3547,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"body {\\n margin: 0;\\n font-family: -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", \\\"Roboto\\\", \\\"Oxygen\\\", \\\"Ubuntu\\\", \\\"Cantarell\\\", \\\"Fira Sans\\\", \\\"Droid Sans\\\", \\\"Helvetica Neue\\\", sans-serif;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n background-color: #0d1117;\\n}\\n\\ncode {\\n font-family: source-code-pro, Menlo, Monaco, Consolas, \\\"Courier New\\\", monospace;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://display-dev-server-preview/./src/index.css?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"body {\\n margin: 0;\\n font-family: -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", \\\"Roboto\\\", \\\"Oxygen\\\", \\\"Ubuntu\\\", \\\"Cantarell\\\", \\\"Fira Sans\\\", \\\"Droid Sans\\\", \\\"Helvetica Neue\\\", sans-serif;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n background-color: #0d1117;\\n}\\n\\ncode {\\n font-family: source-code-pro, Menlo, Monaco, Consolas, \\\"Courier New\\\", monospace;\\n}\\n\\n.card {\\n container-type: inline-size;\\n}\\n\\n@container (min-width: 360px) {\\n .chips {\\n position: relative;\\n justify-content: unset !important;\\n }\\n .chips .quality {\\n position: absolute;\\n right: 0;\\n }\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://display-dev-server-preview/./src/index.css?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js"); /***/ }), diff --git a/src/preview/dist/static/GSDevTools.min.js b/src/preview/dist/static/GSDevTools.min.js new file mode 100644 index 0000000..c6360c5 --- /dev/null +++ b/src/preview/dist/static/GSDevTools.min.js @@ -0,0 +1,11 @@ +/*! + * GSDevTools 3.12.2 + * https://greensock.com + * + * @license Copyright 2023, GreenSock. All rights reserved. + * This plugin is a membership benefit of Club GreenSock and is only authorized for use in sites/apps/products developed by individuals/companies with an active Club GreenSock membership. See https://greensock.com/club + * @author: Jack Doyle, jack@greensock.com + */ + +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e,t){if(e.parentNode&&(g||T(e))){var o=P(e),n=o?o.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i=o?t?"rect":"g":"div",r=2!==t?0:100,a=3===t?100:0,s="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",l=g.createElementNS?g.createElementNS(n.replace(/^https/,"http"),i):g.createElement(i);return t&&(o?(f=f||w(e),l.setAttribute("width",.01),l.setAttribute("height",.01),l.setAttribute("transform","translate("+r+","+a+")"),f.appendChild(l)):(h||((h=w(e)).style.cssText=s),l.style.cssText=s+"width:0.1px;height:0.1px;top:"+a+"px;left:"+r+"px",h.appendChild(l))),l}throw"Need document and parent."}function A(e,t,o,n,i,r,a){return e.a=t,e.b=o,e.c=n,e.d=i,e.e=r,e.f=a,e}var g,u,i,r,h,f,m,v,x,t,y="transform",b=y+"Origin",T=function _setDoc(e){var t=e.ownerDocument||e;!(y in e.style)&&"msTransform"in e.style&&(b=(y="msTransform")+"Origin");for(;t.parentNode&&(t=t.parentNode););if(u=window,m=new fe,t){i=(g=t).documentElement,r=t.body,(v=g.createElementNS("http://www.w3.org/2000/svg","g")).style.transform="none";var o=t.createElement("div"),n=t.createElement("div");r.appendChild(o),o.appendChild(n),o.style.position="static",o.style[y]="translate3d(0,0,1px)",x=n.offsetParent!==o,r.removeChild(o)}return t},k=function _forceNonZeroScale(e){for(var t,o;e&&e!==r;)(o=e._gsap)&&o.uncache&&o.get(e,"x"),o&&!o.scaleX&&!o.scaleY&&o.renderTransform&&(o.scaleX=o.scaleY=1e-4,o.renderTransform(1,o),t?t.push(o):t=[o]),e=e.parentNode;return t},M=[],D=[],S=function _getDocScrollTop(){return u.pageYOffset||g.scrollTop||i.scrollTop||r.scrollTop||0},E=function _getDocScrollLeft(){return u.pageXOffset||g.scrollLeft||i.scrollLeft||r.scrollLeft||0},P=function _svgOwner(e){return e.ownerSVGElement||("svg"===(e.tagName+"").toLowerCase()?e:null)},C=function _isFixed(e){return"fixed"===u.getComputedStyle(e).position||((e=e.parentNode)&&1===e.nodeType?_isFixed(e):void 0)},L=function _placeSiblings(e,t){var o,n,i,r,a,s,l=P(e),c=e===l,d=l?M:D,p=e.parentNode;if(e===u)return e;if(d.length||d.push(w(e,1),w(e,2),w(e,3)),o=l?f:h,l)c?(r=-(i=function _getCTM(e){var t,o=e.getCTM();return o||(t=e.style[y],e.style[y]="none",e.appendChild(v),o=v.getCTM(),e.removeChild(v),t?e.style[y]=t:e.style.removeProperty(y.replace(/([A-Z])/g,"-$1").toLowerCase())),o||m.clone()}(e)).e/i.a,a=-i.f/i.d,n=m):e.getBBox?(i=e.getBBox(),r=(n=(n=e.transform?e.transform.baseVal:{}).numberOfItems?1n.scrollHeight,a.removeChild(n),N=o,ke=function(e){for(var t=e.split(","),o=(("onpointerdown"in l?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in l?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":e).split(",")),n={},i=4;-1<--i;)n[t[i]]=o[i],n[o[i]]=t[i];try{ye.addEventListener("test",null,Object.defineProperty({},"passive",{get:function get(){d=1}}))}catch(e){}return n}("touchstart,touchmove,touchend,touchcancel"),za(xe,"touchcancel",aa),za(ve,"touchmove",aa),s&&s.addEventListener("touchstart",aa),za(xe,"contextmenu",function(){for(var e in He)He[e].isPressed&&He[e].endDrag()}),me=we=Y()}var o,n,i,r,a;me?(Se=me.plugins.inertia,Ce=me.core.context||function(){},c=me.utils.checkPrefix,R=c(R),ze=c(ze),_e=me.utils.toArray,Le=me.core.getStyleSaver,z=!!c("perspective")):e&&console.warn("Please gsap.registerPlugin(Draggable)")}var me,ve,xe,ye,s,l,be,we,c,_e,d,Te,ke,Me,De,Se,Ee,Pe,Ce,Le,z,N,o,Xe=0,R="transform",ze="transformOrigin",Ne=Array.isArray,Re=180/Math.PI,Ye=1e20,a=new fe,Ae=Date.now||function(){return(new Date).getTime()},Be=[],He={},Oe=0,n=/^(?:a|input|textarea|button|select)$/i,Ie=0,Fe={},We={},Ge=function _isRoot(e){return!(e&&e!==ye&&9!==e.nodeType&&e!==xe.body&&e!==ve&&e.nodeType&&e.parentNode)},p={},Qe={},B=function _getElementBounds(e,t){t=_e(t)[0];var o,n,i,r,a,s,l,c,d,p,u,g,h,f=e.getBBox&&e.ownerSVGElement,m=e.ownerDocument||xe;if(e===ve)i=Fa(m),n=(o=Ga(m))+(m.documentElement.clientWidth||e.innerWidth||m.body.clientWidth||0),r=i+((e.innerHeight||0)-20d||s.rightp||s.bottom=s.width*s.height*o:n.width>o&&n.height>o))},Draggable);function Draggable(g,p){var e;e=Ve.call(this)||this,we||_a(1),g=_e(g)[0],e.styles=Le&&Le(g,"transform,left,top"),Se=Se||me.plugins.inertia,e.vars=p=ra(p||{}),e.target=g,e.x=e.y=e.rotation=0,e.dragResistance=parseFloat(p.dragResistance)||0,e.edgeResistance=isNaN(p.edgeResistance)?1:parseFloat(p.edgeResistance)||0,e.lockAxis=p.lockAxis,e.autoScroll=p.autoScroll||0,e.lockedAxis=null,e.allowEventDefault=!!p.allowEventDefault,me.getProperty(g,"x");function Kh(e,t){return parseFloat(le.get(g,e,t))}function ri(e){return Ba(e),e.stopImmediatePropagation&&e.stopImmediatePropagation(),!1}function si(e){if(j.autoScroll&&j.isDragging&&(te||L)){var t,o,n,i,r,a,s,l,c=g,d=15*j.autoScroll;for(te=!1,We.scrollTop=null!=ve.pageYOffset?ve.pageYOffset:null!=de.documentElement.scrollTop?de.documentElement.scrollTop:de.body.scrollTop,We.scrollLeft=null!=ve.pageXOffset?ve.pageXOffset:null!=de.documentElement.scrollLeft?de.documentElement.scrollLeft:de.body.scrollLeft,i=j.pointerX-We.scrollLeft,r=j.pointerY-We.scrollTop;c&&!o;)t=(o=Ge(c.parentNode))?We:c.parentNode,n=o?{bottom:Math.max(ye.clientHeight,ve.innerHeight||0),right:Math.max(ye.clientWidth,ve.innerWidth||0),left:0,top:0}:t.getBoundingClientRect(),a=s=0,U&&((l=t._gsMaxScrollY-t.scrollTop)<0?s=l:r>n.bottom-ie&&l?(te=!0,s=Math.min(l,d*(1-Math.max(0,n.bottom-r)/ie)|0)):rn.right-ne&&l?(te=!0,a=Math.min(l,d*(1-Math.max(0,n.right-i)/ne)|0)):iq?(j.y=a,T+(k-a)*c):T):(R&&(l=e*R.a+t*R.c+R.e,t=e*R.b+t*R.d+R.f,e=l),(i=t-w)Math.abs(i)?"y":U?"x":null,l&&Z(j.vars.onLockAxis)&&j.vars.onLockAxis.call(j,j.pointerEvent)),"y"===l?i=0:"x"===l&&(n=0)),r=da(T+n*c),a=da(k+i*c)),(X||z||N)&&(j.x!==r||j.y!==a&&!G)&&(N&&(Fe.x=r,Fe.y=a,l=N(Fe),r=da(l.x),a=da(l.y)),X&&(r=da(X(r))),z&&(a=da(z(a)))),M&&(Da._gsMaxScrollY&&(a.scrollTop=a._gsMaxScrollY),K&&a.scrollLeft>a._gsMaxScrollX&&(a.scrollLeft=a._gsMaxScrollX),r=a;j.isThrowing&&(i||j.endX>D||j.endXE||j.endY=S/100){var t=v._targets&&v._targets[0];t===i&&t.seek(s+(l-s)*D/100),i._repeat&&!D&&100===S?v.totalProgress(0,!0):v.progress(D/100,!0),H()}}else X.reverse()}function Ro(){return Qo(!d)}function So(){var e,t,o=function _getChildrenOf(e,t){for(var o=[],n=0,i=V.core.Tween,r=e._first;r;)r instanceof i?r.vars.id&&(o[n++]=r):(t&&r.vars.id&&(o[n++]=r),n=(o=o.concat(_getChildrenOf(r,t))).length),r=r._next;return o}(a&&!r.globalSync?a:j,!0),n=E.children,i=0;for(a&&!r.globalSync?o.unshift(a):r.hideGlobalTimeline||o.unshift(j),t=0;t=S/100?((e=v._targets&&v._targets[0])===i&&e.seek(s+(l-s)*D/100),v.progress(D/100,!0).pause()):v.pause(),ie(.01,function(){return v.resume()})),N.innerHTML=t+"x",z.blur&&z.blur()}function Zo(e){Q.hitTest(e,n)||R.isDragging||Y.isDragging||A.isDragging||G.restart(!0)}function $o(){W||(F.play(),G.pause(),W=!0)}function _o(){G.pause(),W&&(F.reverse(),W=!1)}function cp(e){se&&!le&&(le=j._start),c=!e,(a=function _parseAnimation(e){return e instanceof J?e:e?V.getById(e):null}(r.animation))&&!a.vars.id&&(a.vars.id="[no id]"),Rb(),So();var t=Ub(Zn("animation"));t&&(t._inProgress=Zn("in")||0,t._outProgress=Zn("out")||100),r.paused&&O(),i=null,To(a||t||j);var o=r.timeScale||Zn("timeScale"),n=t===i;o&&(Pb(z,o,N,o+"x"),v.timeScale(o)),100===(D=("inTime"in r?Jb(r.inTime,i,0,0):n?t._inProgress:0)||0)&&!r.animation&&t&&(To(j),D=Jb(r.inTime,i,0,0)||0),D&&(k.style.left=D+"%",k.style.display=M.style.display="block"),(S=("outTime"in r?Jb(r.outTime,i,100,D):n?t._outProgress:0)||100)v._dur&&(e=v._dur),f||v.time(e),b.style.width=Math.min(S-D,Math.max(0,e/v._dur*100-D))+"%",w.innerHTML=e.toFixed(2)},onRelease:function onRelease(){C||v.resume()}})[0],Y=Q.create(k,{type:"x",cursor:"ew-resize",zIndexBoost:!1,allowNativeTouchScrolling:!1,allowEventDefault:!0,onPress:Fo(k,1,!0),onDoubleClick:Ho,onDrag:function onDrag(){D=(g+u*this.x)/v.duration()*100,v.progress(D/100),B(!0)},onRelease:function onRelease(){D<0&&(D=0),Fb(),k.style.left=D+"%",Yn("in",D),V.set(k,{x:0,data:"root",display:"block"}),C||v.resume()}})[0],A=Q.create(M,{type:"x",cursor:"ew-resize",allowNativeTouchScrolling:!1,allowEventDefault:!0,zIndexBoost:!1,onPress:Fo(M,0,!0),onDoubleClick:Ho,onDrag:function onDrag(){S=(g+u*this.x)/v.duration()*100,v.progress(S/100),B(!0)},onRelease:function onRelease(){100i.duration();100=S/100){Wb(v,r);var e=v._targets&&v._targets[0];e===i&&e.seek(s+(l-s)*D/100),v._repeat&&!D?v.totalProgress(0,!0):v.reversed()||v.progress(D/100,!0)}o.play(),v.resume(),C&&p.update(),C=!1},O=function pause(){o.reverse(),v&&v.pause(),C=!0},I=function togglePlayPause(){(C?H:O)()},F=V.to([Xn(".gs-bottom"),Xn(".gs-top")],{duration:.3,autoAlpha:0,y:50,ease:"power2.in",data:"root",paused:!0,parent:ne},ne._time),W=!1,G=ie(1.3,$o).pause();Nb(E,"change",Vo),Nb(E,"mousedown",So),Nb(t,"mousedown",I),Nb(Xn(".seek-bar"),"mousedown",Lo),Nb(Xn(".rewind"),"mousedown",Po),Nb(L,"mousedown",Ro),Nb(z,"change",Wo),"auto"===r.visibility?(Nb(n,"mouseout",Zo),Nb(n,"mouseover",_o)):"hidden"===r.visibility&&(W=!0,F.progress(1)),!1!==r.keyboard&&(oe&&r.keyboard?console.warn("[GSDevTools warning] only one instance can be affected by keyboard shortcuts. There is already one active."):(oe=p,Nb(q,"keydown",e=function keyboardHandler(e){var t,o=e.keyCode?e.keyCode:e.which;32===o?I():38===o?(t=parseFloat(Qb(z,-1,N)),v.timeScale(t),Yn("timeScale",t)):40===o?(t=parseFloat(Qb(z,1,N)),v.timeScale(t),Yn("timeScale",t)):37===o?Po():39===o?v.progress(S/100):76===o?Ro():72===o?function toggleHide(){(W?_o:$o)()}():73===o?(D=100*v.progress(),Yn("in",D),k.style.left=D+"%",B(!0)):79===o&&(S=100*v.progress(),Yn("out",S),M.style.left=S+"%",B(!0))}))),V.set(x,{xPercent:-50,x:0,data:"root"}),V.set(k,{xPercent:-100,x:0,data:"root"}),k._gsIgnore=M._gsIgnore=x._gsIgnore=t._gsIgnore=L._gsIgnore=!0,V.killTweensOf([k,M,x]),cp(se),se&&ie(1e-4,cp,[!1],this),V.ticker.add(B),this.update=function(e){te===p&&(ee.paused()&&!e||Rb(),function updateRootDuration(){var e,t,o;i===j&&(e=j._time,j.progress(1,!0).time(e,!0),e=(ee._dp._time-ee._start)*ee._ts,1e3===(o=Math.min(1e3,j.duration()))&&(o=Math.min(1e3,Hb(j))),1!=(t=ee.duration()/o)&&o&&(D*=t,S<100&&(S*=t),ee.seek(0),ee.vars.time=o,ee.invalidate(),ee.duration(o),ee.time(e),_.innerHTML=o.toFixed(2),k.style.left=D+"%",M.style.left=S+"%",B(!0)))}())},this.kill=this.revert=function(){Ob(E,"change",Vo),Ob(E,"mousedown",So),Ob(t,"mousedown",I),Ob(Xn(".seek-bar"),"mousedown",Lo),Ob(Xn(".rewind"),"mousedown",Po),Ob(L,"mousedown",Ro),Ob(z,"change",Wo),R.disable(),Y.disable(),A.disable(),V.ticker.remove(B),Ob(n,"mouseout",Zo),Ob(n,"mouseover",_o),n.parentNode.removeChild(n),te===p&&(te=null),oe===p&&(oe=null,Ob(q,"keydown",e)),delete de[r.id+""]},this.minimal=function(e){var t,o=n.classList.contains("minimal");if(!arguments.length||o===e)return o;e?n.classList.add("minimal"):n.classList.remove("minimal"),r.container&&(n.style.top=e?"calc(100% - 42px)":"calc(100% - 51px)"),R.isPressed&&(f=!0,R.endDrag(R.pointerEvent),f=!1,t=100*v.progress(),b.style.width=Math.max(0,t-D)+"%",x.style.left=t+"%",x.style.transform="translate(-50%,0)",x._gsap.x="0px",x._gsap.xPercent=-50,R.startDrag(R.pointerEvent,!0))},this.animation=To,this.updateList=So,re(this)};ue.version="3.12.2",ue.globalRecordingTime=2,ue.getById=function(e){return e?de[e]:te},ue.getByAnimation=function(e){for(var t in ub(e)&&(e=V.getById(e)),de)if(de[t].animation()===e)return de[t]},ue.create=function(e){return new ue(e)},ue.register=Vb,tb()&&V.registerPlugin(ue),e.GSDevTools=ue,e.default=ue;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}}); + diff --git a/src/preview/dist/static/gsap.min.js b/src/preview/dist/static/gsap.min.js new file mode 100644 index 0000000..63cb55c --- /dev/null +++ b/src/preview/dist/static/gsap.min.js @@ -0,0 +1,10 @@ +/*! + * GSAP 3.12.2 + * https://greensock.com + * + * @license Copyright 2023, GreenSock. All rights reserved. + * Subject to the terms at https://greensock.com/standard-license or for Club GreenSock members, the agreement issued with that membership. + * @author: Jack Doyle, jack@greensock.com + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return"string"==typeof t}function s(t){return"function"==typeof t}function t(t){return"number"==typeof t}function u(t){return void 0===t}function v(t){return"object"==typeof t}function w(t){return!1!==t}function x(){return"undefined"!=typeof window}function y(t){return s(t)||r(t)}function P(t){return(i=yt(t,ot))&&Ee}function Q(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function R(t,e){return!e&&console.warn(t)}function S(t,e){return t&&(ot[t]=e)&&i&&(i[t]=e)||ot}function T(){return 0}function ea(t){var e,r,i=t[0];if(v(i)||s(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=gt.length;r--&&!gt[r].targetTest(i););e=gt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Vt(t[r],e)))||t.splice(r,1);return t}function fa(t){return t._gsap||ea(Ot(t))[0]._gsap}function ga(t,e,r){return(r=t[e])&&s(r)?t[e]():u(r)&&t.getAttribute&&t.getAttribute(e)||r}function ha(t,e){return(t=t.split(",")).forEach(e)||t}function ia(t){return Math.round(1e5*t)/1e5||0}function ja(t){return Math.round(1e7*t)/1e7||0}function ka(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i}function la(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++ia;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function ya(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function za(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0}function Aa(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function Ca(t,e,r,i){return t._startAt&&(L?t._startAt.revert(ht):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))}function Ea(t){return t._repeat?Tt(t._tTime,t=t.duration()+t._rDelay)*t:0}function Ga(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Ha(t){return t._end=ja(t._start+(t._tDur/Math.abs(t._ts||t._rts||X)||0))}function Ia(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=ja(r._time-(0X)&&e.render(r,!0)),Aa(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur(n=Math.abs(n))&&(a=i,o=n);return a}function tb(t){return za(t),t.scrollTrigger&&t.scrollTrigger.kill(!!L),t.progress()<1&&At(t,"onInterrupt"),t}function wb(t){if(x()&&t){var e=(t=!t.name&&t.default||t).name,r=s(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:T,render:he,add:Qt,kill:ce,modifier:fe,rawVars:0},a={targetTest:0,get:0,getSetter:ne,aliases:{},register:0};if(Ft(),t!==i){if(pt[e])return;qa(i,qa(ua(t,n),a)),yt(i.prototype,yt(n,ua(t,a))),pt[i.prop=e]=i,t.targetTest&&(gt.push(i),ft[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}S(e,i),t.register&&t.register(Ee,i,_e)}else t&&Ct.push(t)}function zb(t,e,r){return(6*(t+=t<0?1:1>16,e>>8&St,e&St]:0:Et.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Et[e])p=Et[e];else if("#"===e.charAt(0)){if(e.length<6&&(e="#"+(n=e.charAt(1))+n+(a=e.charAt(2))+a+(s=e.charAt(3))+s+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(p=parseInt(e.substr(1,6),16))>>16,p>>8&St,p&St,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&St,e&St]}else if("hsl"===e.substr(0,3))if(p=d=e.match(tt),r){if(~e.indexOf("="))return p=e.match(et),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,u=p[1]/100,n=2*(h=p[2]/100)-(a=h<=.5?h*(u+1):h+u-h*u),3=U?u.endTime(!1):t._dur;return r(e)&&(isNaN(e)||e in o)?(a=e.charAt(0),s="%"===e.substr(-1),n=e.indexOf("="),"<"===a||">"===a?(0<=n&&(e=e.replace(/=/,"")),("<"===a?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(s?(n<0?u:i).totalDuration()/100:1)):n<0?(e in o||(o[e]=h),o[e]):(a=parseFloat(e.charAt(n-1)+e.substr(n+1)),s&&i&&(a=a/100*($(i)?i[0]:i).totalDuration()),1=r&&te)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0=this.totalDuration()||!v&&_)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0=i&&(a instanceof Zt?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return r(t)?this.removeLabel(t):s(t)?this.killTweensOf(t):(ya(this,t),t===this._recent&&(this._recent=this._last),Aa(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ja(Rt.time-(0r:!r||s.isActive())&&n.push(s):(i=s.getTweensOf(a,r)).length&&n.push.apply(n,i),s=s._next;return n},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=xt(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=Zt.to(i,qa({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||X,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ra(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,qa({startAt:{time:xt(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),rb(this,xt(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),rb(this,xt(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+X)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);for(var i,n=this._first,a=this.labels;n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return Aa(this)},e.invalidate=function invalidate(t){var e=this._first;for(this._lock=0;e;)e.invalidate(t),e=e._next;return i.prototype.invalidate.call(this,t)},e.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Aa(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=U;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Ka(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=r/a._ts,a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ra(a,a===I&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(I._ts&&(na(I,Ga(t,I)),f=Rt.frame),Rt.frame>=mt){mt+=q.autoSleep||120;var e=I._first;if((!e||!e._ts)&&q.autoSleep&&Rt._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Rt.sleep()}}},Timeline}(Ut);qa(Xt.prototype,{_lock:0,_hasPause:0,_forcing:0});function ac(t,e,i,n,a,o){var u,h,l,f;if(pt[t]&&!1!==(u=new pt[t]).init(a,u.rawVars?e[t]:function _processVars(t,e,i,n,a){if(s(t)&&(t=Kt(t,a,e,i,n)),!v(t)||t.style&&t.nodeType||$(t)||Z(t))return r(t)?Kt(t,a,e,i,n):t;var o,u={};for(o in t)u[o]=Kt(t[o],a,e,i,n);return u}(e[t],n,a,o,i),i,n,o)&&(i._pt=h=new _e(i._pt,a,t,0,1,u.render,u,0,u.priority),i!==c))for(l=i._ptLookup[i._targets.indexOf(a)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function gc(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if($(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Nt,Wt,Qt=function _addPropTween(t,e,i,n,a,o,u,h,l,f){s(n)&&(n=n(a||0,t,o));var c,d=t[e],p="get"!==i?i:s(d)?l?t[e.indexOf("set")||!s(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():d,_=s(d)?l?re:te:$t;if(r(n)&&(~n.indexOf("random(")&&(n=ob(n)),"="===n.charAt(1)&&(!(c=ka(p,n)+(Ya(p)||0))&&0!==c||(n=c))),!f||p!==n||Wt)return isNaN(p*n)||""===n?(d||e in t||Q(e,n),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,c,d,p,_=new _e(this._pt,t,e,0,1,ue,null,n),m=0,g=0;for(_.b=r,_.e=i,r+="",(d=~(i+="").indexOf("random("))&&(i=ob(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(it)||[];o=it.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(c=parseFloat(u[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:c,c:"="===l.charAt(1)?ka(c,l)-c:parseFloat(l)-c,m:h&&h<4?Math.round:0},m=it.lastIndex);return _.c=m")}),s.duration();else{for(l in u={},x)"ease"===l||"easeEach"===l||gc(l,x[l],u,x.easeEach);for(l in u)for(C=u[l].sort(function(t,e){return t.t-e.t}),o=D=0;o=t._tDur||e<0)&&t.ratio===u&&(u&&za(t,1),r||L||(At(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets},e.invalidate=function invalidate(t){return t&&this.vars.runBackwards||(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),z.prototype.invalidate.call(this,t)},e.resetTo=function resetTo(t,e,r,i){d||Rt.wake(),this._ts||this.play();var n,a=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Gt(this,a),n=this._ease(a/this._dur),function _updatePropTweens(t,e,r,i,n,a,s){var o,u,h,l,f=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!f)for(f=t._ptCache[e]=[],h=t._ptLookup,l=t._targets.length;l--;){if((o=h[l][e])&&o.d&&o.d._pt)for(o=o.d._pt;o&&o.p!==e&&o.fp!==e;)o=o._next;if(!o)return Wt=1,t.vars[e]="+=0",Gt(t,s),Wt=0,1;f.push(o)}for(l=f.length;l--;)(o=(u=f[l])._pt||u).s=!i&&0!==i||n?o.s+(i||0)+a*o.c:i,o.c=r-o.s,u.e&&(u.e=ia(r)+Ya(u.e)),u.b&&(u.b=o.s+Ya(u.b))}(this,t,e,r,i,n,a)?this.resetTo(t,e,r,i):(Ia(this,0),this.parent||xa(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?tb(this):this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Nt&&!0!==Nt.vars.overwrite)._first||tb(this),this.parent&&i!==this.timeline.totalDuration()&&Ra(this,this._dur*this.timeline._tDur/i,0,1),this}var n,a,s,o,u,h,l,f=this._targets,c=t?Ot(t):f,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,c))return"all"===e&&(this._pt=0),tb(this);for(n=this._op=this._op||[],"all"!==e&&(r(e)&&(u={},ha(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?fa(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=yt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~c.indexOf(f[l]))for(u in a=d[l],"all"===e?(n[l]=e,o=a,s={}):(s=n[l]=n[l]||{},o=e),o)(h=a&&a[u])&&("kill"in h.d&&!0!==h.d.kill(u)||ya(this,h,"_pt"),delete a[u]),"all"!==s&&(s[u]=1);return this._initted&&!this._pt&&p&&tb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Va(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Va(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return I.killTweensOf(t,e,r)},Tween}(Ut);qa(Zt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ha("staggerTo,staggerFrom,staggerFromTo",function(r){Zt[r]=function(){var t=new Xt,e=Mt.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function oc(t,e,r){return t.setAttribute(e,r)}function wc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var $t=function _setterPlain(t,e,r){return t[e]=r},te=function _setterFunc(t,e,r){return t[e](r)},re=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},ne=function _getSetter(t,e){return s(t[e])?te:u(t[e])&&t.setAttribute?oc:$t},ae=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},se=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},ue=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},he=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},fe=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},ce=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?ya(this,i,"_pt"):i.dep||(e=1),i=r;return!e},pe=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},_e=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=wc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||ae,this.d=s||this,this.set=o||$t,this.pr=u||0,(this._next=t)&&(t._prev=this)}ha(vt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(t){return ft[t]=1}),ot.TweenMax=ot.TweenLite=Zt,ot.TimelineLite=ot.TimelineMax=Xt,I=new Xt({sortChildren:!1,defaults:V,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),q.stringFilter=Fb;function Ec(t){return(ye[t]||Te).map(function(t){return t()})}function Fc(){var t=Date.now(),o=[];2=14.15.0" @@ -1468,9 +1468,9 @@ } }, "node_modules/@webpack-cli/info": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.1.tgz", - "integrity": "sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", "dev": true, "engines": { "node": ">=14.15.0" @@ -1481,9 +1481,9 @@ } }, "node_modules/@webpack-cli/serve": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.1.tgz", - "integrity": "sha512-0G7tNyS+yW8TdgHwZKlDWYXFA6OJQnoLCQvYKkQP0Q2X205PSQ6RNUj0M+1OB/9gRQaUZ/ccYfaxd0nhaWKfjw==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", "dev": true, "engines": { "node": ">=14.15.0" @@ -5371,17 +5371,17 @@ } }, "node_modules/webpack-cli": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz", - "integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", "dev": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.0.1", - "@webpack-cli/info": "^2.0.1", - "@webpack-cli/serve": "^2.0.1", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", "colorette": "^2.0.14", - "commander": "^9.4.1", + "commander": "^10.0.1", "cross-spawn": "^7.0.3", "envinfo": "^7.7.3", "fastest-levenshtein": "^1.0.12", @@ -5416,12 +5416,12 @@ } }, "node_modules/webpack-cli/node_modules/commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true, "engines": { - "node": "^12.20.0 || >=14" + "node": ">=14" } }, "node_modules/webpack-dev-middleware": { @@ -6811,23 +6811,23 @@ } }, "@webpack-cli/configtest": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.1.tgz", - "integrity": "sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", "dev": true, "requires": {} }, "@webpack-cli/info": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.1.tgz", - "integrity": "sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", "dev": true, "requires": {} }, "@webpack-cli/serve": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.1.tgz", - "integrity": "sha512-0G7tNyS+yW8TdgHwZKlDWYXFA6OJQnoLCQvYKkQP0Q2X205PSQ6RNUj0M+1OB/9gRQaUZ/ccYfaxd0nhaWKfjw==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", "dev": true, "requires": {} }, @@ -9733,17 +9733,17 @@ } }, "webpack-cli": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz", - "integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", "dev": true, "requires": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.0.1", - "@webpack-cli/info": "^2.0.1", - "@webpack-cli/serve": "^2.0.1", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", "colorette": "^2.0.14", - "commander": "^9.4.1", + "commander": "^10.0.1", "cross-spawn": "^7.0.3", "envinfo": "^7.7.3", "fastest-levenshtein": "^1.0.12", @@ -9754,9 +9754,9 @@ }, "dependencies": { "commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true } } diff --git a/src/preview/package.json b/src/preview/package.json index 2fb76c0..601f69d 100644 --- a/src/preview/package.json +++ b/src/preview/package.json @@ -19,12 +19,11 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.8.2", + "sass": "^1.58.3", "sass-loader": "^13.2.0", "style-loader": "^3.3.1", "webpack": "^5.75.0", - "webpack-cli": "^5.0.1", - "webpack-dev-server": "^4.11.1", - "sass": "^1.58.3" - }, - "dependencies": {} -} \ No newline at end of file + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^4.11.1" + } +} diff --git a/src/preview/public/data/ads.json b/src/preview/public/data/ads.json index af2d566..a79f238 100644 --- a/src/preview/public/data/ads.json +++ b/src/preview/public/data/ads.json @@ -1,15 +1,18 @@ { - "maxFileSize": 150, + "isGoogleSpreadsheetBanner": false, + "timestamp": 1691759644915, "ads": [ { - "url": "https://d34hktllpa7k5r.cloudfront.net/ads/a954ae8bf3ca88fc4a752adfa159c103da5479ff/index.html", - "zip": "https://d34hktllpa7k5r.cloudfront.net/ads/a954ae8bf3ca88fc4a752adfa159c103da5479ff/en_friendsfamily_ill_160x600.zip", + "url": "https://richmedia-previews-s3bucket-tu6a9uv81tss.s3.amazonaws.com/ao-price-comms-v/CENTRAL_MINI_BANN_U25-ICE_ALWAYS_ON_V1_-_NA_160X600_NA_ENG_PERF/index.html", + "zip": "https://richmedia-previews-s3bucket-tu6a9uv81tss.s3.amazonaws.com/ao-price-comms-v/CENTRAL_MINI_BANN_U25-ICE_ALWAYS_ON_V1_-_NA_160X600_NA_ENG_PERF.zip", "width": 160, "height": 600, + "quality": 85, + "maxFileSize": 85, "bundleName": "en_friendsfamily_ill_160x600", "output": { "html": { - "url": "https://d34hktllpa7k5r.cloudfront.net/ads/a954ae8bf3ca88fc4a752adfa159c103da5479ff/index.html", + "url": "https://richmedia-previews-s3bucket-tu6a9uv81tss.s3.amazonaws.com/ao-price-comms-v/CENTRAL_MINI_BANN_U25-ICE_ALWAYS_ON_V1_-_NA_160X600_NA_ENG_PERF/index.html", "optimizations": { "html": true, "css": true, @@ -18,23 +21,26 @@ } }, "zip": { - "url": "https://d34hktllpa7k5r.cloudfront.net/ads/a954ae8bf3ca88fc4a752adfa159c103da5479ff/en_friendsfamily_ill_160x600.zip", + "url": "https://richmedia-previews-s3bucket-tu6a9uv81tss.s3.amazonaws.com/ao-price-comms-v/CENTRAL_MINI_BANN_U25-ICE_ALWAYS_ON_V1_-_NA_160X600_NA_ENG_PERF.zip", "size": 81516 }, + "unzip": { + "size": 90804 + }, "jpg": { "url": "https://d34hktllpa7k5r.cloudfront.net/backups/2e573203-39f8-4a0e-a117-0c68e5b10279.png" } } }, { - "url": "https://d34hktllpa7k5r.cloudfront.net/ads/5d7948d8725dedbad6b8851c39a43f180272b5b2/index.html", - "zip": "https://d34hktllpa7k5r.cloudfront.net/ads/5d7948d8725dedbad6b8851c39a43f180272b5b2/br_friendsfamily_ill_160x600.zip", + "url": "https://richmedia-previews-s3bucket-tu6a9uv81tss.s3.amazonaws.com/ao-price-comms-v/CENTRAL_MINI_BANN_U25-ICE_ALWAYS_ON_V1_-_NA_160X600_NA_ENG_PERF/index.html", + "zip": "https://richmedia-previews-s3bucket-tu6a9uv81tss.s3.amazonaws.com/ao-price-comms-v/CENTRAL_MINI_BANN_U25-ICE_ALWAYS_ON_V1_-_NA_160X600_NA_ENG_PERF.zip", "width": 160, "height": 600, "bundleName": "br_friendsfamily_ill_160x600", "output": { "html": { - "url": "https://d34hktllpa7k5r.cloudfront.net/ads/5d7948d8725dedbad6b8851c39a43f180272b5b2/index.html", + "url": "https://richmedia-previews-s3bucket-tu6a9uv81tss.s3.amazonaws.com/ao-price-comms-v/CENTRAL_MINI_BANN_U25-ICE_ALWAYS_ON_V1_-_NA_160X600_NA_ENG_PERF/index.html", "optimizations": { "html": true, "css": true, @@ -43,7 +49,7 @@ } }, "zip": { - "url": "https://d34hktllpa7k5r.cloudfront.net/ads/5d7948d8725dedbad6b8851c39a43f180272b5b2/br_friendsfamily_ill_160x600.zip", + "url": "https://richmedia-previews-s3bucket-tu6a9uv81tss.s3.amazonaws.com/ao-price-comms-v/CENTRAL_MINI_BANN_U25-ICE_ALWAYS_ON_V1_-_NA_160X600_NA_ENG_PERF.zip", "size": 83414 }, "jpg": { diff --git a/src/preview/public/index.html b/src/preview/public/index.html index 994aae6..423daea 100644 --- a/src/preview/public/index.html +++ b/src/preview/public/index.html @@ -36,4 +36,6 @@ To create a production bundle, use `npm run build` or `yarn build`. --> + + diff --git a/src/preview/public/static/GSDevTools.min.js b/src/preview/public/static/GSDevTools.min.js new file mode 100644 index 0000000..c6360c5 --- /dev/null +++ b/src/preview/public/static/GSDevTools.min.js @@ -0,0 +1,11 @@ +/*! + * GSDevTools 3.12.2 + * https://greensock.com + * + * @license Copyright 2023, GreenSock. All rights reserved. + * This plugin is a membership benefit of Club GreenSock and is only authorized for use in sites/apps/products developed by individuals/companies with an active Club GreenSock membership. See https://greensock.com/club + * @author: Jack Doyle, jack@greensock.com + */ + +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e,t){if(e.parentNode&&(g||T(e))){var o=P(e),n=o?o.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i=o?t?"rect":"g":"div",r=2!==t?0:100,a=3===t?100:0,s="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",l=g.createElementNS?g.createElementNS(n.replace(/^https/,"http"),i):g.createElement(i);return t&&(o?(f=f||w(e),l.setAttribute("width",.01),l.setAttribute("height",.01),l.setAttribute("transform","translate("+r+","+a+")"),f.appendChild(l)):(h||((h=w(e)).style.cssText=s),l.style.cssText=s+"width:0.1px;height:0.1px;top:"+a+"px;left:"+r+"px",h.appendChild(l))),l}throw"Need document and parent."}function A(e,t,o,n,i,r,a){return e.a=t,e.b=o,e.c=n,e.d=i,e.e=r,e.f=a,e}var g,u,i,r,h,f,m,v,x,t,y="transform",b=y+"Origin",T=function _setDoc(e){var t=e.ownerDocument||e;!(y in e.style)&&"msTransform"in e.style&&(b=(y="msTransform")+"Origin");for(;t.parentNode&&(t=t.parentNode););if(u=window,m=new fe,t){i=(g=t).documentElement,r=t.body,(v=g.createElementNS("http://www.w3.org/2000/svg","g")).style.transform="none";var o=t.createElement("div"),n=t.createElement("div");r.appendChild(o),o.appendChild(n),o.style.position="static",o.style[y]="translate3d(0,0,1px)",x=n.offsetParent!==o,r.removeChild(o)}return t},k=function _forceNonZeroScale(e){for(var t,o;e&&e!==r;)(o=e._gsap)&&o.uncache&&o.get(e,"x"),o&&!o.scaleX&&!o.scaleY&&o.renderTransform&&(o.scaleX=o.scaleY=1e-4,o.renderTransform(1,o),t?t.push(o):t=[o]),e=e.parentNode;return t},M=[],D=[],S=function _getDocScrollTop(){return u.pageYOffset||g.scrollTop||i.scrollTop||r.scrollTop||0},E=function _getDocScrollLeft(){return u.pageXOffset||g.scrollLeft||i.scrollLeft||r.scrollLeft||0},P=function _svgOwner(e){return e.ownerSVGElement||("svg"===(e.tagName+"").toLowerCase()?e:null)},C=function _isFixed(e){return"fixed"===u.getComputedStyle(e).position||((e=e.parentNode)&&1===e.nodeType?_isFixed(e):void 0)},L=function _placeSiblings(e,t){var o,n,i,r,a,s,l=P(e),c=e===l,d=l?M:D,p=e.parentNode;if(e===u)return e;if(d.length||d.push(w(e,1),w(e,2),w(e,3)),o=l?f:h,l)c?(r=-(i=function _getCTM(e){var t,o=e.getCTM();return o||(t=e.style[y],e.style[y]="none",e.appendChild(v),o=v.getCTM(),e.removeChild(v),t?e.style[y]=t:e.style.removeProperty(y.replace(/([A-Z])/g,"-$1").toLowerCase())),o||m.clone()}(e)).e/i.a,a=-i.f/i.d,n=m):e.getBBox?(i=e.getBBox(),r=(n=(n=e.transform?e.transform.baseVal:{}).numberOfItems?1n.scrollHeight,a.removeChild(n),N=o,ke=function(e){for(var t=e.split(","),o=(("onpointerdown"in l?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in l?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":e).split(",")),n={},i=4;-1<--i;)n[t[i]]=o[i],n[o[i]]=t[i];try{ye.addEventListener("test",null,Object.defineProperty({},"passive",{get:function get(){d=1}}))}catch(e){}return n}("touchstart,touchmove,touchend,touchcancel"),za(xe,"touchcancel",aa),za(ve,"touchmove",aa),s&&s.addEventListener("touchstart",aa),za(xe,"contextmenu",function(){for(var e in He)He[e].isPressed&&He[e].endDrag()}),me=we=Y()}var o,n,i,r,a;me?(Se=me.plugins.inertia,Ce=me.core.context||function(){},c=me.utils.checkPrefix,R=c(R),ze=c(ze),_e=me.utils.toArray,Le=me.core.getStyleSaver,z=!!c("perspective")):e&&console.warn("Please gsap.registerPlugin(Draggable)")}var me,ve,xe,ye,s,l,be,we,c,_e,d,Te,ke,Me,De,Se,Ee,Pe,Ce,Le,z,N,o,Xe=0,R="transform",ze="transformOrigin",Ne=Array.isArray,Re=180/Math.PI,Ye=1e20,a=new fe,Ae=Date.now||function(){return(new Date).getTime()},Be=[],He={},Oe=0,n=/^(?:a|input|textarea|button|select)$/i,Ie=0,Fe={},We={},Ge=function _isRoot(e){return!(e&&e!==ye&&9!==e.nodeType&&e!==xe.body&&e!==ve&&e.nodeType&&e.parentNode)},p={},Qe={},B=function _getElementBounds(e,t){t=_e(t)[0];var o,n,i,r,a,s,l,c,d,p,u,g,h,f=e.getBBox&&e.ownerSVGElement,m=e.ownerDocument||xe;if(e===ve)i=Fa(m),n=(o=Ga(m))+(m.documentElement.clientWidth||e.innerWidth||m.body.clientWidth||0),r=i+((e.innerHeight||0)-20d||s.rightp||s.bottom=s.width*s.height*o:n.width>o&&n.height>o))},Draggable);function Draggable(g,p){var e;e=Ve.call(this)||this,we||_a(1),g=_e(g)[0],e.styles=Le&&Le(g,"transform,left,top"),Se=Se||me.plugins.inertia,e.vars=p=ra(p||{}),e.target=g,e.x=e.y=e.rotation=0,e.dragResistance=parseFloat(p.dragResistance)||0,e.edgeResistance=isNaN(p.edgeResistance)?1:parseFloat(p.edgeResistance)||0,e.lockAxis=p.lockAxis,e.autoScroll=p.autoScroll||0,e.lockedAxis=null,e.allowEventDefault=!!p.allowEventDefault,me.getProperty(g,"x");function Kh(e,t){return parseFloat(le.get(g,e,t))}function ri(e){return Ba(e),e.stopImmediatePropagation&&e.stopImmediatePropagation(),!1}function si(e){if(j.autoScroll&&j.isDragging&&(te||L)){var t,o,n,i,r,a,s,l,c=g,d=15*j.autoScroll;for(te=!1,We.scrollTop=null!=ve.pageYOffset?ve.pageYOffset:null!=de.documentElement.scrollTop?de.documentElement.scrollTop:de.body.scrollTop,We.scrollLeft=null!=ve.pageXOffset?ve.pageXOffset:null!=de.documentElement.scrollLeft?de.documentElement.scrollLeft:de.body.scrollLeft,i=j.pointerX-We.scrollLeft,r=j.pointerY-We.scrollTop;c&&!o;)t=(o=Ge(c.parentNode))?We:c.parentNode,n=o?{bottom:Math.max(ye.clientHeight,ve.innerHeight||0),right:Math.max(ye.clientWidth,ve.innerWidth||0),left:0,top:0}:t.getBoundingClientRect(),a=s=0,U&&((l=t._gsMaxScrollY-t.scrollTop)<0?s=l:r>n.bottom-ie&&l?(te=!0,s=Math.min(l,d*(1-Math.max(0,n.bottom-r)/ie)|0)):rn.right-ne&&l?(te=!0,a=Math.min(l,d*(1-Math.max(0,n.right-i)/ne)|0)):iq?(j.y=a,T+(k-a)*c):T):(R&&(l=e*R.a+t*R.c+R.e,t=e*R.b+t*R.d+R.f,e=l),(i=t-w)Math.abs(i)?"y":U?"x":null,l&&Z(j.vars.onLockAxis)&&j.vars.onLockAxis.call(j,j.pointerEvent)),"y"===l?i=0:"x"===l&&(n=0)),r=da(T+n*c),a=da(k+i*c)),(X||z||N)&&(j.x!==r||j.y!==a&&!G)&&(N&&(Fe.x=r,Fe.y=a,l=N(Fe),r=da(l.x),a=da(l.y)),X&&(r=da(X(r))),z&&(a=da(z(a)))),M&&(Da._gsMaxScrollY&&(a.scrollTop=a._gsMaxScrollY),K&&a.scrollLeft>a._gsMaxScrollX&&(a.scrollLeft=a._gsMaxScrollX),r=a;j.isThrowing&&(i||j.endX>D||j.endXE||j.endY=S/100){var t=v._targets&&v._targets[0];t===i&&t.seek(s+(l-s)*D/100),i._repeat&&!D&&100===S?v.totalProgress(0,!0):v.progress(D/100,!0),H()}}else X.reverse()}function Ro(){return Qo(!d)}function So(){var e,t,o=function _getChildrenOf(e,t){for(var o=[],n=0,i=V.core.Tween,r=e._first;r;)r instanceof i?r.vars.id&&(o[n++]=r):(t&&r.vars.id&&(o[n++]=r),n=(o=o.concat(_getChildrenOf(r,t))).length),r=r._next;return o}(a&&!r.globalSync?a:j,!0),n=E.children,i=0;for(a&&!r.globalSync?o.unshift(a):r.hideGlobalTimeline||o.unshift(j),t=0;t=S/100?((e=v._targets&&v._targets[0])===i&&e.seek(s+(l-s)*D/100),v.progress(D/100,!0).pause()):v.pause(),ie(.01,function(){return v.resume()})),N.innerHTML=t+"x",z.blur&&z.blur()}function Zo(e){Q.hitTest(e,n)||R.isDragging||Y.isDragging||A.isDragging||G.restart(!0)}function $o(){W||(F.play(),G.pause(),W=!0)}function _o(){G.pause(),W&&(F.reverse(),W=!1)}function cp(e){se&&!le&&(le=j._start),c=!e,(a=function _parseAnimation(e){return e instanceof J?e:e?V.getById(e):null}(r.animation))&&!a.vars.id&&(a.vars.id="[no id]"),Rb(),So();var t=Ub(Zn("animation"));t&&(t._inProgress=Zn("in")||0,t._outProgress=Zn("out")||100),r.paused&&O(),i=null,To(a||t||j);var o=r.timeScale||Zn("timeScale"),n=t===i;o&&(Pb(z,o,N,o+"x"),v.timeScale(o)),100===(D=("inTime"in r?Jb(r.inTime,i,0,0):n?t._inProgress:0)||0)&&!r.animation&&t&&(To(j),D=Jb(r.inTime,i,0,0)||0),D&&(k.style.left=D+"%",k.style.display=M.style.display="block"),(S=("outTime"in r?Jb(r.outTime,i,100,D):n?t._outProgress:0)||100)v._dur&&(e=v._dur),f||v.time(e),b.style.width=Math.min(S-D,Math.max(0,e/v._dur*100-D))+"%",w.innerHTML=e.toFixed(2)},onRelease:function onRelease(){C||v.resume()}})[0],Y=Q.create(k,{type:"x",cursor:"ew-resize",zIndexBoost:!1,allowNativeTouchScrolling:!1,allowEventDefault:!0,onPress:Fo(k,1,!0),onDoubleClick:Ho,onDrag:function onDrag(){D=(g+u*this.x)/v.duration()*100,v.progress(D/100),B(!0)},onRelease:function onRelease(){D<0&&(D=0),Fb(),k.style.left=D+"%",Yn("in",D),V.set(k,{x:0,data:"root",display:"block"}),C||v.resume()}})[0],A=Q.create(M,{type:"x",cursor:"ew-resize",allowNativeTouchScrolling:!1,allowEventDefault:!0,zIndexBoost:!1,onPress:Fo(M,0,!0),onDoubleClick:Ho,onDrag:function onDrag(){S=(g+u*this.x)/v.duration()*100,v.progress(S/100),B(!0)},onRelease:function onRelease(){100i.duration();100=S/100){Wb(v,r);var e=v._targets&&v._targets[0];e===i&&e.seek(s+(l-s)*D/100),v._repeat&&!D?v.totalProgress(0,!0):v.reversed()||v.progress(D/100,!0)}o.play(),v.resume(),C&&p.update(),C=!1},O=function pause(){o.reverse(),v&&v.pause(),C=!0},I=function togglePlayPause(){(C?H:O)()},F=V.to([Xn(".gs-bottom"),Xn(".gs-top")],{duration:.3,autoAlpha:0,y:50,ease:"power2.in",data:"root",paused:!0,parent:ne},ne._time),W=!1,G=ie(1.3,$o).pause();Nb(E,"change",Vo),Nb(E,"mousedown",So),Nb(t,"mousedown",I),Nb(Xn(".seek-bar"),"mousedown",Lo),Nb(Xn(".rewind"),"mousedown",Po),Nb(L,"mousedown",Ro),Nb(z,"change",Wo),"auto"===r.visibility?(Nb(n,"mouseout",Zo),Nb(n,"mouseover",_o)):"hidden"===r.visibility&&(W=!0,F.progress(1)),!1!==r.keyboard&&(oe&&r.keyboard?console.warn("[GSDevTools warning] only one instance can be affected by keyboard shortcuts. There is already one active."):(oe=p,Nb(q,"keydown",e=function keyboardHandler(e){var t,o=e.keyCode?e.keyCode:e.which;32===o?I():38===o?(t=parseFloat(Qb(z,-1,N)),v.timeScale(t),Yn("timeScale",t)):40===o?(t=parseFloat(Qb(z,1,N)),v.timeScale(t),Yn("timeScale",t)):37===o?Po():39===o?v.progress(S/100):76===o?Ro():72===o?function toggleHide(){(W?_o:$o)()}():73===o?(D=100*v.progress(),Yn("in",D),k.style.left=D+"%",B(!0)):79===o&&(S=100*v.progress(),Yn("out",S),M.style.left=S+"%",B(!0))}))),V.set(x,{xPercent:-50,x:0,data:"root"}),V.set(k,{xPercent:-100,x:0,data:"root"}),k._gsIgnore=M._gsIgnore=x._gsIgnore=t._gsIgnore=L._gsIgnore=!0,V.killTweensOf([k,M,x]),cp(se),se&&ie(1e-4,cp,[!1],this),V.ticker.add(B),this.update=function(e){te===p&&(ee.paused()&&!e||Rb(),function updateRootDuration(){var e,t,o;i===j&&(e=j._time,j.progress(1,!0).time(e,!0),e=(ee._dp._time-ee._start)*ee._ts,1e3===(o=Math.min(1e3,j.duration()))&&(o=Math.min(1e3,Hb(j))),1!=(t=ee.duration()/o)&&o&&(D*=t,S<100&&(S*=t),ee.seek(0),ee.vars.time=o,ee.invalidate(),ee.duration(o),ee.time(e),_.innerHTML=o.toFixed(2),k.style.left=D+"%",M.style.left=S+"%",B(!0)))}())},this.kill=this.revert=function(){Ob(E,"change",Vo),Ob(E,"mousedown",So),Ob(t,"mousedown",I),Ob(Xn(".seek-bar"),"mousedown",Lo),Ob(Xn(".rewind"),"mousedown",Po),Ob(L,"mousedown",Ro),Ob(z,"change",Wo),R.disable(),Y.disable(),A.disable(),V.ticker.remove(B),Ob(n,"mouseout",Zo),Ob(n,"mouseover",_o),n.parentNode.removeChild(n),te===p&&(te=null),oe===p&&(oe=null,Ob(q,"keydown",e)),delete de[r.id+""]},this.minimal=function(e){var t,o=n.classList.contains("minimal");if(!arguments.length||o===e)return o;e?n.classList.add("minimal"):n.classList.remove("minimal"),r.container&&(n.style.top=e?"calc(100% - 42px)":"calc(100% - 51px)"),R.isPressed&&(f=!0,R.endDrag(R.pointerEvent),f=!1,t=100*v.progress(),b.style.width=Math.max(0,t-D)+"%",x.style.left=t+"%",x.style.transform="translate(-50%,0)",x._gsap.x="0px",x._gsap.xPercent=-50,R.startDrag(R.pointerEvent,!0))},this.animation=To,this.updateList=So,re(this)};ue.version="3.12.2",ue.globalRecordingTime=2,ue.getById=function(e){return e?de[e]:te},ue.getByAnimation=function(e){for(var t in ub(e)&&(e=V.getById(e)),de)if(de[t].animation()===e)return de[t]},ue.create=function(e){return new ue(e)},ue.register=Vb,tb()&&V.registerPlugin(ue),e.GSDevTools=ue,e.default=ue;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}}); + diff --git a/src/preview/public/static/gsap.min.js b/src/preview/public/static/gsap.min.js new file mode 100644 index 0000000..63cb55c --- /dev/null +++ b/src/preview/public/static/gsap.min.js @@ -0,0 +1,10 @@ +/*! + * GSAP 3.12.2 + * https://greensock.com + * + * @license Copyright 2023, GreenSock. All rights reserved. + * Subject to the terms at https://greensock.com/standard-license or for Club GreenSock members, the agreement issued with that membership. + * @author: Jack Doyle, jack@greensock.com + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return"string"==typeof t}function s(t){return"function"==typeof t}function t(t){return"number"==typeof t}function u(t){return void 0===t}function v(t){return"object"==typeof t}function w(t){return!1!==t}function x(){return"undefined"!=typeof window}function y(t){return s(t)||r(t)}function P(t){return(i=yt(t,ot))&&Ee}function Q(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function R(t,e){return!e&&console.warn(t)}function S(t,e){return t&&(ot[t]=e)&&i&&(i[t]=e)||ot}function T(){return 0}function ea(t){var e,r,i=t[0];if(v(i)||s(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=gt.length;r--&&!gt[r].targetTest(i););e=gt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Vt(t[r],e)))||t.splice(r,1);return t}function fa(t){return t._gsap||ea(Ot(t))[0]._gsap}function ga(t,e,r){return(r=t[e])&&s(r)?t[e]():u(r)&&t.getAttribute&&t.getAttribute(e)||r}function ha(t,e){return(t=t.split(",")).forEach(e)||t}function ia(t){return Math.round(1e5*t)/1e5||0}function ja(t){return Math.round(1e7*t)/1e7||0}function ka(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i}function la(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++ia;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function ya(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function za(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0}function Aa(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function Ca(t,e,r,i){return t._startAt&&(L?t._startAt.revert(ht):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))}function Ea(t){return t._repeat?Tt(t._tTime,t=t.duration()+t._rDelay)*t:0}function Ga(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Ha(t){return t._end=ja(t._start+(t._tDur/Math.abs(t._ts||t._rts||X)||0))}function Ia(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=ja(r._time-(0X)&&e.render(r,!0)),Aa(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur(n=Math.abs(n))&&(a=i,o=n);return a}function tb(t){return za(t),t.scrollTrigger&&t.scrollTrigger.kill(!!L),t.progress()<1&&At(t,"onInterrupt"),t}function wb(t){if(x()&&t){var e=(t=!t.name&&t.default||t).name,r=s(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:T,render:he,add:Qt,kill:ce,modifier:fe,rawVars:0},a={targetTest:0,get:0,getSetter:ne,aliases:{},register:0};if(Ft(),t!==i){if(pt[e])return;qa(i,qa(ua(t,n),a)),yt(i.prototype,yt(n,ua(t,a))),pt[i.prop=e]=i,t.targetTest&&(gt.push(i),ft[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}S(e,i),t.register&&t.register(Ee,i,_e)}else t&&Ct.push(t)}function zb(t,e,r){return(6*(t+=t<0?1:1>16,e>>8&St,e&St]:0:Et.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Et[e])p=Et[e];else if("#"===e.charAt(0)){if(e.length<6&&(e="#"+(n=e.charAt(1))+n+(a=e.charAt(2))+a+(s=e.charAt(3))+s+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(p=parseInt(e.substr(1,6),16))>>16,p>>8&St,p&St,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&St,e&St]}else if("hsl"===e.substr(0,3))if(p=d=e.match(tt),r){if(~e.indexOf("="))return p=e.match(et),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,u=p[1]/100,n=2*(h=p[2]/100)-(a=h<=.5?h*(u+1):h+u-h*u),3=U?u.endTime(!1):t._dur;return r(e)&&(isNaN(e)||e in o)?(a=e.charAt(0),s="%"===e.substr(-1),n=e.indexOf("="),"<"===a||">"===a?(0<=n&&(e=e.replace(/=/,"")),("<"===a?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(s?(n<0?u:i).totalDuration()/100:1)):n<0?(e in o||(o[e]=h),o[e]):(a=parseFloat(e.charAt(n-1)+e.substr(n+1)),s&&i&&(a=a/100*($(i)?i[0]:i).totalDuration()),1=r&&te)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0=this.totalDuration()||!v&&_)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0=i&&(a instanceof Zt?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return r(t)?this.removeLabel(t):s(t)?this.killTweensOf(t):(ya(this,t),t===this._recent&&(this._recent=this._last),Aa(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ja(Rt.time-(0r:!r||s.isActive())&&n.push(s):(i=s.getTweensOf(a,r)).length&&n.push.apply(n,i),s=s._next;return n},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=xt(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=Zt.to(i,qa({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||X,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ra(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,qa({startAt:{time:xt(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),rb(this,xt(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),rb(this,xt(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+X)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);for(var i,n=this._first,a=this.labels;n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return Aa(this)},e.invalidate=function invalidate(t){var e=this._first;for(this._lock=0;e;)e.invalidate(t),e=e._next;return i.prototype.invalidate.call(this,t)},e.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Aa(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=U;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Ka(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=r/a._ts,a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ra(a,a===I&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(I._ts&&(na(I,Ga(t,I)),f=Rt.frame),Rt.frame>=mt){mt+=q.autoSleep||120;var e=I._first;if((!e||!e._ts)&&q.autoSleep&&Rt._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Rt.sleep()}}},Timeline}(Ut);qa(Xt.prototype,{_lock:0,_hasPause:0,_forcing:0});function ac(t,e,i,n,a,o){var u,h,l,f;if(pt[t]&&!1!==(u=new pt[t]).init(a,u.rawVars?e[t]:function _processVars(t,e,i,n,a){if(s(t)&&(t=Kt(t,a,e,i,n)),!v(t)||t.style&&t.nodeType||$(t)||Z(t))return r(t)?Kt(t,a,e,i,n):t;var o,u={};for(o in t)u[o]=Kt(t[o],a,e,i,n);return u}(e[t],n,a,o,i),i,n,o)&&(i._pt=h=new _e(i._pt,a,t,0,1,u.render,u,0,u.priority),i!==c))for(l=i._ptLookup[i._targets.indexOf(a)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function gc(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if($(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Nt,Wt,Qt=function _addPropTween(t,e,i,n,a,o,u,h,l,f){s(n)&&(n=n(a||0,t,o));var c,d=t[e],p="get"!==i?i:s(d)?l?t[e.indexOf("set")||!s(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():d,_=s(d)?l?re:te:$t;if(r(n)&&(~n.indexOf("random(")&&(n=ob(n)),"="===n.charAt(1)&&(!(c=ka(p,n)+(Ya(p)||0))&&0!==c||(n=c))),!f||p!==n||Wt)return isNaN(p*n)||""===n?(d||e in t||Q(e,n),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,c,d,p,_=new _e(this._pt,t,e,0,1,ue,null,n),m=0,g=0;for(_.b=r,_.e=i,r+="",(d=~(i+="").indexOf("random("))&&(i=ob(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(it)||[];o=it.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(c=parseFloat(u[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:c,c:"="===l.charAt(1)?ka(c,l)-c:parseFloat(l)-c,m:h&&h<4?Math.round:0},m=it.lastIndex);return _.c=m")}),s.duration();else{for(l in u={},x)"ease"===l||"easeEach"===l||gc(l,x[l],u,x.easeEach);for(l in u)for(C=u[l].sort(function(t,e){return t.t-e.t}),o=D=0;o=t._tDur||e<0)&&t.ratio===u&&(u&&za(t,1),r||L||(At(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets},e.invalidate=function invalidate(t){return t&&this.vars.runBackwards||(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),z.prototype.invalidate.call(this,t)},e.resetTo=function resetTo(t,e,r,i){d||Rt.wake(),this._ts||this.play();var n,a=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Gt(this,a),n=this._ease(a/this._dur),function _updatePropTweens(t,e,r,i,n,a,s){var o,u,h,l,f=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!f)for(f=t._ptCache[e]=[],h=t._ptLookup,l=t._targets.length;l--;){if((o=h[l][e])&&o.d&&o.d._pt)for(o=o.d._pt;o&&o.p!==e&&o.fp!==e;)o=o._next;if(!o)return Wt=1,t.vars[e]="+=0",Gt(t,s),Wt=0,1;f.push(o)}for(l=f.length;l--;)(o=(u=f[l])._pt||u).s=!i&&0!==i||n?o.s+(i||0)+a*o.c:i,o.c=r-o.s,u.e&&(u.e=ia(r)+Ya(u.e)),u.b&&(u.b=o.s+Ya(u.b))}(this,t,e,r,i,n,a)?this.resetTo(t,e,r,i):(Ia(this,0),this.parent||xa(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?tb(this):this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Nt&&!0!==Nt.vars.overwrite)._first||tb(this),this.parent&&i!==this.timeline.totalDuration()&&Ra(this,this._dur*this.timeline._tDur/i,0,1),this}var n,a,s,o,u,h,l,f=this._targets,c=t?Ot(t):f,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,c))return"all"===e&&(this._pt=0),tb(this);for(n=this._op=this._op||[],"all"!==e&&(r(e)&&(u={},ha(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?fa(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=yt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~c.indexOf(f[l]))for(u in a=d[l],"all"===e?(n[l]=e,o=a,s={}):(s=n[l]=n[l]||{},o=e),o)(h=a&&a[u])&&("kill"in h.d&&!0!==h.d.kill(u)||ya(this,h,"_pt"),delete a[u]),"all"!==s&&(s[u]=1);return this._initted&&!this._pt&&p&&tb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Va(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Va(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return I.killTweensOf(t,e,r)},Tween}(Ut);qa(Zt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ha("staggerTo,staggerFrom,staggerFromTo",function(r){Zt[r]=function(){var t=new Xt,e=Mt.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function oc(t,e,r){return t.setAttribute(e,r)}function wc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var $t=function _setterPlain(t,e,r){return t[e]=r},te=function _setterFunc(t,e,r){return t[e](r)},re=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},ne=function _getSetter(t,e){return s(t[e])?te:u(t[e])&&t.setAttribute?oc:$t},ae=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},se=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},ue=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},he=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},fe=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},ce=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?ya(this,i,"_pt"):i.dep||(e=1),i=r;return!e},pe=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},_e=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=wc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||ae,this.d=s||this,this.set=o||$t,this.pr=u||0,(this._next=t)&&(t._prev=this)}ha(vt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(t){return ft[t]=1}),ot.TweenMax=ot.TweenLite=Zt,ot.TimelineLite=ot.TimelineMax=Xt,I=new Xt({sortChildren:!1,defaults:V,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),q.stringFilter=Fb;function Ec(t){return(ye[t]||Te).map(function(t){return t()})}function Fc(){var t=Date.now(),o=[];2