← All changes
|
assets/js/import-export-customization-admin.js
+1444
-1791
4.1.1
→
4.3.1
View file →
| @@ -1,1829 +1,1482 @@ | ||
| 1 | -/******/ (() => { // webpackBootstrap | |
| 2 | -/******/ var __webpack_modules__ = ({ | |
| 1 | +(function(_wordpress_i18n, _wordpress_api_fetch) { | |
| 3 | 2 | |
| 4 | -/***/ "../app/assets/js/event-track/apps-event-tracking.js": | |
| 5 | -/*!***********************************************************!*\ | |
| 6 | - !*** ../app/assets/js/event-track/apps-event-tracking.js ***! | |
| 7 | - \***********************************************************/ | |
| 8 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 3 | +//#region \0rolldown/runtime.js | |
| 4 | + var __create = Object.create; | |
| 5 | + var __defProp = Object.defineProperty; | |
| 6 | + var __name = (target, value) => __defProp(target, "name", { | |
| 7 | + value, | |
| 8 | + configurable: true | |
| 9 | + }); | |
| 10 | + var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 11 | + var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 12 | + var __getProtoOf = Object.getPrototypeOf; | |
| 13 | + var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 14 | + var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); | |
| 15 | + var __copyProps = (to, from, except, desc) => { | |
| 16 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 17 | + for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { | |
| 18 | + key = keys[i]; | |
| 19 | + if (!__hasOwnProp.call(to, key) && key !== except) { | |
| 20 | + __defProp(to, key, { | |
| 21 | + get: ((k) => from[k]).bind(null, key), | |
| 22 | + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable | |
| 23 | + }); | |
| 24 | + } | |
| 25 | + } | |
| 26 | + } | |
| 27 | + return to; | |
| 28 | + }; | |
| 29 | + var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { | |
| 30 | + value: mod, | |
| 31 | + enumerable: true | |
| 32 | + }) : target, mod)); | |
| 9 | 33 | |
| 10 | -"use strict"; | |
| 34 | +//#endregion | |
| 35 | +_wordpress_api_fetch = __toESM(_wordpress_api_fetch); | |
| 11 | 36 | |
| 37 | +//#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js | |
| 38 | + function _classCallCheck(a, n) { | |
| 39 | + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 40 | + } | |
| 12 | 41 | |
| 13 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 14 | -Object.defineProperty(exports, "__esModule", ({ | |
| 15 | - value: true | |
| 16 | -})); | |
| 17 | -exports.appsEventTrackingDispatch = exports.AppsEventTracking = void 0; | |
| 18 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 19 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 20 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 21 | -var _eventsConfig = _interopRequireDefault(__webpack_require__(/*! ../../../../core/common/modules/events-manager/assets/js/events-config */ "../core/common/modules/events-manager/assets/js/events-config.js")); | |
| 22 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 23 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 24 | -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } | |
| 25 | -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } | |
| 26 | -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } | |
| 27 | -var EVENTS_MAP = { | |
| 28 | - PAGE_VIEWS_WEBSITE_TEMPLATES: 'page_views_website_templates', | |
| 29 | - KITS_CLOUD_UPGRADE_CLICKED: 'kits_cloud_upgrade_clicked', | |
| 30 | - EXPORT_KIT_CUSTOMIZATION: 'export_kit_customization', | |
| 31 | - IMPORT_KIT_CUSTOMIZATION: 'import_kit_customization', | |
| 32 | - KIT_IMPORT_STATUS: 'kit_import_status', | |
| 33 | - KIT_CLOUD_LIBRARY_APPLY: 'kit_cloud_library_apply', | |
| 34 | - KIT_CLOUD_LIBRARY_DELETE: 'kit_cloud_library_delete', | |
| 35 | - IMPORT_EXPORT_ADMIN_ACTION: 'ie_admin_action', | |
| 36 | - KIT_IMPORT_UPLOAD_FILE: 'kit_import_upload_file' | |
| 37 | -}; | |
| 38 | -var appsEventTrackingDispatch = exports.appsEventTrackingDispatch = function appsEventTrackingDispatch(command, eventParams) { | |
| 39 | - // Add existing eventParams key value pair to the data/details object. | |
| 40 | - var objectCreator = function objectCreator(array, obj) { | |
| 41 | - var _iterator = _createForOfIteratorHelper(array), | |
| 42 | - _step; | |
| 43 | - try { | |
| 44 | - for (_iterator.s(); !(_step = _iterator.n()).done;) { | |
| 45 | - var key = _step.value; | |
| 46 | - if (eventParams.hasOwnProperty(key) && eventParams[key] !== null) { | |
| 47 | - obj[key] = eventParams[key]; | |
| 48 | - } | |
| 49 | - } | |
| 50 | - } catch (err) { | |
| 51 | - _iterator.e(err); | |
| 52 | - } finally { | |
| 53 | - _iterator.f(); | |
| 54 | - } | |
| 55 | - return obj; | |
| 56 | - }; | |
| 57 | - var dataKeys = []; | |
| 58 | - var detailsKeys = ['layout', 'site_part', 'error', 'document_name', 'document_type', 'view_type_clicked', 'tag', 'sort_direction', 'sort_type', 'action', 'grid_location', 'kit_name', 'page_source', 'element_position', 'element', 'event_type', 'modal_type', 'method', 'status', 'step', 'item', 'category', 'element_location', 'search_term', 'section', 'site_area']; | |
| 59 | - var data = {}; | |
| 60 | - var details = {}; | |
| 61 | - var init = function init() { | |
| 62 | - objectCreator(detailsKeys, details); | |
| 63 | - objectCreator(dataKeys, data); | |
| 64 | - var commandSplit = command.split('/'); | |
| 65 | - data.placement = commandSplit[0]; | |
| 66 | - data.event = commandSplit[1]; | |
| 42 | +//#endregion | |
| 43 | +//#region node_modules/@babel/runtime/helpers/esm/typeof.js | |
| 44 | + function _typeof(o) { | |
| 45 | + "@babel/helpers - typeof"; | |
| 46 | + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 47 | + return typeof o; | |
| 48 | + } : function(o) { | |
| 49 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 50 | + }, _typeof(o); | |
| 51 | + } | |
| 67 | 52 | |
| 68 | - // If 'details' is not empty, add the details object to the data object. | |
| 69 | - if (Object.keys(details).length) { | |
| 70 | - data.details = details; | |
| 71 | - } | |
| 72 | - }; | |
| 73 | - init(); | |
| 74 | - $e.run(command, data); | |
| 75 | -}; | |
| 76 | -var AppsEventTracking = exports.AppsEventTracking = /*#__PURE__*/function () { | |
| 77 | - function AppsEventTracking() { | |
| 78 | - (0, _classCallCheck2.default)(this, AppsEventTracking); | |
| 79 | - } | |
| 80 | - return (0, _createClass2.default)(AppsEventTracking, null, [{ | |
| 81 | - key: "dispatchEvent", | |
| 82 | - value: function dispatchEvent(eventName, payload) { | |
| 83 | - var _window$elementorComm, _window$elementorComm2; | |
| 84 | - return (_window$elementorComm = window.elementorCommon) === null || _window$elementorComm === void 0 || (_window$elementorComm = _window$elementorComm.eventsManager) === null || _window$elementorComm === void 0 || (_window$elementorComm2 = _window$elementorComm.dispatchEvent) === null || _window$elementorComm2 === void 0 ? void 0 : _window$elementorComm2.call(_window$elementorComm, eventName, payload); | |
| 85 | - } | |
| 86 | - }, { | |
| 87 | - key: "sendPageViewsWebsiteTemplates", | |
| 88 | - value: function sendPageViewsWebsiteTemplates(page) { | |
| 89 | - return this.dispatchEvent(EVENTS_MAP.PAGE_VIEWS_WEBSITE_TEMPLATES, { | |
| 90 | - trigger: _eventsConfig.default.triggers.pageLoaded, | |
| 91 | - page_loaded: page, | |
| 92 | - secondary_location: page | |
| 93 | - }); | |
| 94 | - } | |
| 95 | - }, { | |
| 96 | - key: "sendKitsCloudUpgradeClicked", | |
| 97 | - value: function sendKitsCloudUpgradeClicked(upgradeLocation) { | |
| 98 | - return this.dispatchEvent(EVENTS_MAP.KITS_CLOUD_UPGRADE_CLICKED, { | |
| 99 | - trigger: _eventsConfig.default.triggers.click, | |
| 100 | - secondary_location: upgradeLocation, | |
| 101 | - upgrade_location: upgradeLocation | |
| 102 | - }); | |
| 103 | - } | |
| 104 | - }, { | |
| 105 | - key: "sendExportKitCustomization", | |
| 106 | - value: function sendExportKitCustomization(payload) { | |
| 107 | - return this.dispatchEvent(EVENTS_MAP.EXPORT_KIT_CUSTOMIZATION, _objectSpread({ | |
| 108 | - trigger: _eventsConfig.default.triggers.click | |
| 109 | - }, payload)); | |
| 110 | - } | |
| 111 | - }, { | |
| 112 | - key: "sendImportKitCustomization", | |
| 113 | - value: function sendImportKitCustomization(payload) { | |
| 114 | - return this.dispatchEvent(EVENTS_MAP.IMPORT_KIT_CUSTOMIZATION, _objectSpread({ | |
| 115 | - trigger: _eventsConfig.default.triggers.click | |
| 116 | - }, payload)); | |
| 117 | - } | |
| 118 | - }, { | |
| 119 | - key: "sendKitImportStatus", | |
| 120 | - value: function sendKitImportStatus() { | |
| 121 | - var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; | |
| 122 | - var isError = !!error; | |
| 123 | - return this.dispatchEvent(EVENTS_MAP.KIT_IMPORT_STATUS, _objectSpread({ | |
| 124 | - kit_import_status: !isError | |
| 125 | - }, isError && { | |
| 126 | - kit_import_error: error.message | |
| 127 | - })); | |
| 128 | - } | |
| 129 | - }, { | |
| 130 | - key: "sendKitCloudLibraryApply", | |
| 131 | - value: function sendKitCloudLibraryApply(kitId, kitApplyUrl) { | |
| 132 | - return this.dispatchEvent(EVENTS_MAP.KIT_CLOUD_LIBRARY_APPLY, _objectSpread({ | |
| 133 | - trigger: _eventsConfig.default.triggers.click, | |
| 134 | - kit_cloud_id: kitId | |
| 135 | - }, kitApplyUrl && { | |
| 136 | - kit_apply_url: kitApplyUrl | |
| 137 | - })); | |
| 138 | - } | |
| 139 | - }, { | |
| 140 | - key: "sendKitCloudLibraryDelete", | |
| 141 | - value: function sendKitCloudLibraryDelete() { | |
| 142 | - return this.dispatchEvent(EVENTS_MAP.KIT_CLOUD_LIBRARY_DELETE, { | |
| 143 | - trigger: _eventsConfig.default.triggers.click | |
| 144 | - }); | |
| 145 | - } | |
| 146 | - }, { | |
| 147 | - key: "sendImportExportAdminAction", | |
| 148 | - value: function sendImportExportAdminAction(actionType) { | |
| 149 | - return this.dispatchEvent(EVENTS_MAP.IMPORT_EXPORT_ADMIN_ACTION, { | |
| 150 | - trigger: _eventsConfig.default.triggers.click, | |
| 151 | - action_type: actionType | |
| 152 | - }); | |
| 153 | - } | |
| 154 | - }, { | |
| 155 | - key: "sendKitImportUploadFile", | |
| 156 | - value: function sendKitImportUploadFile(status) { | |
| 157 | - return this.dispatchEvent(EVENTS_MAP.KIT_IMPORT_UPLOAD_FILE, { | |
| 158 | - kit_import_upload_file_status: status | |
| 159 | - }); | |
| 160 | - } | |
| 161 | - }]); | |
| 162 | -}(); | |
| 53 | +//#endregion | |
| 54 | +//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js | |
| 55 | + function toPrimitive(t, r) { | |
| 56 | + if ("object" != _typeof(t) || !t) return t; | |
| 57 | + var e = t[Symbol.toPrimitive]; | |
| 58 | + if (void 0 !== e) { | |
| 59 | + var i = e.call(t, r || "default"); | |
| 60 | + if ("object" != _typeof(i)) return i; | |
| 61 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 62 | + } | |
| 63 | + return ("string" === r ? String : Number)(t); | |
| 64 | + } | |
| 163 | 65 | |
| 164 | -/***/ }), | |
| 66 | +//#endregion | |
| 67 | +//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js | |
| 68 | + function toPropertyKey(t) { | |
| 69 | + var i = toPrimitive(t, "string"); | |
| 70 | + return "symbol" == _typeof(i) ? i : i + ""; | |
| 71 | + } | |
| 165 | 72 | |
| 166 | -/***/ "../app/modules/import-export-customization/assets/js/shared/error/import-export-error.js": | |
| 167 | -/*!************************************************************************************************!*\ | |
| 168 | - !*** ../app/modules/import-export-customization/assets/js/shared/error/import-export-error.js ***! | |
| 169 | - \************************************************************************************************/ | |
| 170 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 73 | +//#endregion | |
| 74 | +//#region node_modules/@babel/runtime/helpers/esm/createClass.js | |
| 75 | + function _defineProperties(e, r) { | |
| 76 | + for (var t = 0; t < r.length; t++) { | |
| 77 | + var o = r[t]; | |
| 78 | + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 79 | + } | |
| 80 | + } | |
| 81 | + function _createClass(e, r, t) { | |
| 82 | + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; | |
| 83 | + } | |
| 171 | 84 | |
| 172 | -"use strict"; | |
| 85 | +//#endregion | |
| 86 | +//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js | |
| 87 | + function _defineProperty(e, r, t) { | |
| 88 | + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 89 | + value: t, | |
| 90 | + enumerable: !0, | |
| 91 | + configurable: !0, | |
| 92 | + writable: !0 | |
| 93 | + }) : e[r] = t, e; | |
| 94 | + } | |
| 173 | 95 | |
| 96 | +//#endregion | |
| 97 | +//#region core/common/modules/events-manager/assets/js/events-config.js | |
| 98 | + var eventsConfig = { | |
| 99 | + appTypes: { | |
| 100 | + editor: "editor", | |
| 101 | + wpAdmin: "wpadmin", | |
| 102 | + wpDash: "wpdash" | |
| 103 | + }, | |
| 104 | + windowNames: { sidebarMenu: "sidebar_menu" }, | |
| 105 | + targetTypes: { | |
| 106 | + dropdownItem: "dropdown_item", | |
| 107 | + button: "button", | |
| 108 | + tab: "tab", | |
| 109 | + toggle: "toggle", | |
| 110 | + searchInput: "search_input", | |
| 111 | + searchResult: "search_result", | |
| 112 | + buttons: "buttons", | |
| 113 | + searchWidget: "search_widget", | |
| 114 | + wpDashAdminMenuItem: "wpdash_admin_menu_item", | |
| 115 | + wpDashEditorMenu: "wpdash_editor_menu", | |
| 116 | + wpDashSubMenuItem: "wpdash_sub_menu_item", | |
| 117 | + link: "link" | |
| 118 | + }, | |
| 119 | + interactionResults: { | |
| 120 | + actionSelected: "action_selected", | |
| 121 | + navigate: "navigate", | |
| 122 | + create: "create", | |
| 123 | + sessionEnd: "session_end", | |
| 124 | + tabChanged: "tab_changed", | |
| 125 | + assetInserted: "asset_inserted", | |
| 126 | + assetFavorite: "asset_favorite", | |
| 127 | + aiGenerate: "ai_generate", | |
| 128 | + resultsUpdated: "results_updated", | |
| 129 | + noResults: "no_results", | |
| 130 | + selected: "selected", | |
| 131 | + promotionViewed: "promotion_viewed", | |
| 132 | + upgradeNow: "upgrade_now", | |
| 133 | + elementorSideMenuOpened: "elementor_side_menu_opened", | |
| 134 | + editorSubMenuOpened: "wpdash_editor_sub_menu_opened", | |
| 135 | + themeBuilderPromotionWindow: "theme_builder_promotion_window", | |
| 136 | + pageOpened: "page_opened", | |
| 137 | + expanded: "expanded", | |
| 138 | + collapsed: "collapsed" | |
| 139 | + }, | |
| 140 | + targetNames: { | |
| 141 | + publishDropdown: { | |
| 142 | + saveDraft: "save_draft", | |
| 143 | + saveAsTemplate: "save_as_template", | |
| 144 | + viewPage: "view_page", | |
| 145 | + copyAndShare: "copy_and_share" | |
| 146 | + }, | |
| 147 | + pageList: { addNewPage: "add_new_page" } | |
| 148 | + }, | |
| 149 | + triggers: { | |
| 150 | + click: "Click", | |
| 151 | + rightClick: "Right Click", | |
| 152 | + doubleClick: "Double Click", | |
| 153 | + accordionClick: "Accordion Click", | |
| 154 | + toggleClick: "Toggle Click", | |
| 155 | + dropdownClick: "Click Dropdown", | |
| 156 | + editorLoaded: "Editor Loaded", | |
| 157 | + visible: "Visible", | |
| 158 | + pageLoaded: "Page Loaded", | |
| 159 | + typing: "Typing", | |
| 160 | + tabSelect: "Tab Select", | |
| 161 | + insert: "Insert", | |
| 162 | + hover: "Hover" | |
| 163 | + }, | |
| 164 | + locations: { | |
| 165 | + widgetPanel: "Widget Panel", | |
| 166 | + topBar: "Top Bar", | |
| 167 | + sidebar: "Sidebar", | |
| 168 | + elementorEditor: "Elementor Editor", | |
| 169 | + templatesLibrary: { library: "Templates Library" }, | |
| 170 | + app: { | |
| 171 | + import: "Import Kit", | |
| 172 | + export: "Export Kit", | |
| 173 | + kitLibrary: "Kit Library", | |
| 174 | + cloudKitLibrary: "Cloud Kit Library" | |
| 175 | + }, | |
| 176 | + variables: "Variables Panel", | |
| 177 | + variablesManager: "Variables Manager", | |
| 178 | + admin: "WP admin", | |
| 179 | + wpDashAdmin: "wpdash_admin", | |
| 180 | + structurePanel: "Structure Panel", | |
| 181 | + canvas: "Canvas", | |
| 182 | + leftPanel: "Left Panel", | |
| 183 | + elementorLibrary: "Elementor Library", | |
| 184 | + components: { instanceEditingPanel: "Instance Editing Panel" } | |
| 185 | + }, | |
| 186 | + secondaryLocations: { | |
| 187 | + layout: "Layout Section", | |
| 188 | + basic: "Basic Section", | |
| 189 | + "pro-elements": "Pro Section", | |
| 190 | + general: "General Section", | |
| 191 | + "theme-elements": "Site Section", | |
| 192 | + "theme-elements-single": "Single Section", | |
| 193 | + "woocommerce-elements": "WooCommerce Section", | |
| 194 | + wordpress: "WordPress Section", | |
| 195 | + categories: "Widgets Tab", | |
| 196 | + global: "Globals Tab", | |
| 197 | + "whats-new": "What's New", | |
| 198 | + "document-settings": "Document Settings icon", | |
| 199 | + "preview-page": "Preview Page", | |
| 200 | + "publish-button": "Publish Button", | |
| 201 | + "widget-panel": "Widget Panel Icon", | |
| 202 | + finder: "Finder", | |
| 203 | + help: "Help", | |
| 204 | + elementorLogoDropdown: "top_bar_elementor_logo_dropdown", | |
| 205 | + elementorLogo: "Elementor Logo", | |
| 206 | + eLogoMenu: "E-logo Menu", | |
| 207 | + notes: "Notes", | |
| 208 | + siteSettings: "Site Settings", | |
| 209 | + structure: "Structure", | |
| 210 | + documentNameDropdown: "Document Name dropdown", | |
| 211 | + responsiveControls: "Responsive controls", | |
| 212 | + launchpad: "launchpad", | |
| 213 | + checklistHeader: "Checklist Header", | |
| 214 | + checklistSteps: "Checklist Steps", | |
| 215 | + userPreferences: "User Preferences", | |
| 216 | + contextMenu: "Context Menu", | |
| 217 | + templateLibrary: { | |
| 218 | + saveModal: "Save to Modal", | |
| 219 | + moveModal: "Move to Modal", | |
| 220 | + bulkMoveModal: "Bulk Move to Modal", | |
| 221 | + copyModal: "Copy to Modal", | |
| 222 | + bulkCopyModal: "Bulk Copy to Modal", | |
| 223 | + saveModalSelectFolder: "Save to Modal - select folder", | |
| 224 | + saveModalSelectConnect: "Save to Modal - connect", | |
| 225 | + saveModalSelectUpgrade: "Save to Modal - upgrade", | |
| 226 | + importModal: "Import Modal", | |
| 227 | + newFolderModal: "New Folder Modal", | |
| 228 | + deleteDialog: "Delete Dialog", | |
| 229 | + deleteFolderDialog: "Delete Folder Dialog", | |
| 230 | + renameDialog: "Rename Dialog", | |
| 231 | + createFolderDialog: "Create Folder Dialog", | |
| 232 | + applySettingsDialog: "Apply Settings Dialog", | |
| 233 | + cloudTab: "Cloud Tab", | |
| 234 | + siteTab: "Site Tab", | |
| 235 | + cloudTabFolder: "Cloud Tab - Folder", | |
| 236 | + cloudTabConnect: "Cloud Tab - Connect", | |
| 237 | + cloudTabUpgrade: "Cloud Tab - Upgrade", | |
| 238 | + morePopup: "Context Menu", | |
| 239 | + quotaBar: "Quota Bar" | |
| 240 | + }, | |
| 241 | + kitLibrary: { | |
| 242 | + cloudKitLibrary: "kits_cloud_library", | |
| 243 | + cloudKitLibraryConnect: "kits_cloud_library_connect", | |
| 244 | + cloudKitLibraryUpgrade: "kits_cloud_library_upgrade", | |
| 245 | + kitExportCustomization: "kit_export_customization", | |
| 246 | + kitExport: "kit_export", | |
| 247 | + kitExportCustomizationEdit: "kit_export_customization_edit", | |
| 248 | + kitExportSummary: "kit_export_summary", | |
| 249 | + kitImportUploadBox: "kit_import_upload_box", | |
| 250 | + kitImportCustomization: "kit_import_customization", | |
| 251 | + kitImportSummary: "kit_import_summary" | |
| 252 | + }, | |
| 253 | + variablesPopover: "Variables Popover", | |
| 254 | + admin: { | |
| 255 | + pluginToolsTab: "plugin_tools_tab", | |
| 256 | + pluginWebsiteTemplatesTab: "plugin_website_templates_tab" | |
| 257 | + }, | |
| 258 | + componentsTab: "Components Tab", | |
| 259 | + canvasElement: "Canvas Element", | |
| 260 | + publishDropdown: "Publish Dropdown", | |
| 261 | + pageListDropdown: "Page List Dropdown", | |
| 262 | + emptyBox: "Empty Box", | |
| 263 | + searchBar: "Search Bar", | |
| 264 | + finderResults: "Finder Results", | |
| 265 | + libraryTabs: "Library Tabs", | |
| 266 | + assetCard: "Asset Card", | |
| 267 | + wpDashElementorCoreMenu: "elementor_editor_core_menu", | |
| 268 | + wpDashElementorCoreSubMenu: "elementor_editor_core_sub_menu", | |
| 269 | + wpDashThemeBuilder: "wpdash_core_sub_menu_theme_builder" | |
| 270 | + }, | |
| 271 | + elements: { | |
| 272 | + accordionSection: "Accordion section", | |
| 273 | + buttonIcon: "Button Icon", | |
| 274 | + mainCta: "Main CTA", | |
| 275 | + button: "Button", | |
| 276 | + link: "Link", | |
| 277 | + dropdown: "Dropdown", | |
| 278 | + toggle: "Toggle", | |
| 279 | + launchpadChecklist: "Checklist popup" | |
| 280 | + }, | |
| 281 | + names: { | |
| 282 | + v1: { | |
| 283 | + layout: "v1_widgets_tab_layout_section", | |
| 284 | + basic: "v1_widgets_tab_basic_section", | |
| 285 | + "pro-elements": "v1_widgets_tab_pro_section", | |
| 286 | + general: "v1_widgets_tab_general_section", | |
| 287 | + "theme-elements": "v1_widgets_tab_site_section", | |
| 288 | + "theme-elements-single": "v1_widgets_tab_single_section", | |
| 289 | + "woocommerce-elements": "v1_widgets_tab_woocommerce_section", | |
| 290 | + wordpress: "v1_widgets_tab_wordpress_section", | |
| 291 | + categories: "v1_widgets_tab", | |
| 292 | + global: "v1_globals_tab" | |
| 293 | + }, | |
| 294 | + topBar: { | |
| 295 | + whatsNew: "top_bar_whats_new", | |
| 296 | + documentSettings: "top_bar_document_settings_icon", | |
| 297 | + previewPage: "top_bar_preview_page", | |
| 298 | + publishButton: "top_bar_publish_button", | |
| 299 | + widgetPanel: "top_bar_widget_panel_icon", | |
| 300 | + finder: "top_bar_finder", | |
| 301 | + help: "top_bar_help", | |
| 302 | + history: "top_bar_elementor_logo_dropdown_history", | |
| 303 | + userPreferences: "top_bar_elementor_logo_dropdown_user_preferences", | |
| 304 | + keyboardShortcuts: "top_bar_elementor_logo_dropdown_keyboard_shortcuts", | |
| 305 | + exitToWordpress: "top_bar_elementor_logo_dropdown_exit_to_wordpress", | |
| 306 | + themeBuilder: "top_bar_elementor_logo_dropdown_theme_builder", | |
| 307 | + notes: "top_bar_notes", | |
| 308 | + siteSettings: "top_bar_site_setting", | |
| 309 | + structure: "top_bar_structure", | |
| 310 | + documentNameDropdown: "top_bar_document_name_dropdown", | |
| 311 | + responsiveControls: "top_bar_responsive_controls", | |
| 312 | + launchpadOn: "top_bar_checklist_icon_show", | |
| 313 | + launchpadOff: "top_bar_checklist_icon_hide", | |
| 314 | + elementorLogoDropdown: "open_e_menu", | |
| 315 | + connectAccount: "connect_account", | |
| 316 | + accountConnected: "account_connected" | |
| 317 | + }, | |
| 318 | + elementorEditor: { | |
| 319 | + editorLoaded: "editor_loaded", | |
| 320 | + checklist: { | |
| 321 | + checklistHeaderClose: "checklist_header_close_icon", | |
| 322 | + checklistFirstPopup: "checklist popup triggered" | |
| 323 | + }, | |
| 324 | + userPreferences: { | |
| 325 | + checklistShow: "checklist_userpreferences_toggle_show", | |
| 326 | + checklistHide: "checklist_userpreferences_toggle_hide" | |
| 327 | + } | |
| 328 | + }, | |
| 329 | + variables: { | |
| 330 | + open: "open_variables_popover", | |
| 331 | + add: "add_new_variable", | |
| 332 | + connect: "connect_variable", | |
| 333 | + save: "save_new_variable", | |
| 334 | + update: "update_variable", | |
| 335 | + openManager: "open_variables_manager", | |
| 336 | + saveChanges: "save_variables_changes", | |
| 337 | + delete: "delete_variable", | |
| 338 | + variableSyncToV3: "variable_sync_to_v3" | |
| 339 | + }, | |
| 340 | + design_system: { | |
| 341 | + importOpened: "design_system_import_opened", | |
| 342 | + fileSelected: "design_system_file_selected", | |
| 343 | + validationFailed: "design_system_validation_failed", | |
| 344 | + conflictChoice: "design_system_conflict_choice", | |
| 345 | + confirmed: "design_system_import_confirmed", | |
| 346 | + imported: "design_system_imported", | |
| 347 | + importFailed: "design_system_import_failed", | |
| 348 | + export: "design_system_export", | |
| 349 | + opened: "design_system_opened" | |
| 350 | + }, | |
| 351 | + components: { | |
| 352 | + createClicked: "component_create_clicked", | |
| 353 | + createCancelled: "component_creation_cancelled", | |
| 354 | + created: "component_created", | |
| 355 | + instanceAdded: "component_instance_added", | |
| 356 | + edited: "component_edited", | |
| 357 | + propertiesPanelOpened: "component_properties_panel_opened", | |
| 358 | + propertiesGroupCreated: "component_properties_group_created", | |
| 359 | + propertyExposed: "component_property_exposed", | |
| 360 | + propertyRemoved: "component_property_removed", | |
| 361 | + detached: "component_detached" | |
| 362 | + }, | |
| 363 | + global_classes: { | |
| 364 | + classApplied: "class_applied", | |
| 365 | + classRemoved: "class_removed", | |
| 366 | + classManagerFilterCleared: "class_manager_filter_cleared", | |
| 367 | + classDeleted: "class_deleted", | |
| 368 | + classPublishConflict: "class_publish_conflict", | |
| 369 | + classRenamed: "class_renamed", | |
| 370 | + classCreated: "class_created", | |
| 371 | + classManagerSearched: "class_manager_searched", | |
| 372 | + classManagerFiltersOpened: "class_manager_filters_opened", | |
| 373 | + classManagerOpened: "class_manager_opened", | |
| 374 | + classManagerReorder: "class_manager_reorder", | |
| 375 | + classManagerFilterUsed: "class_manager_filter_used", | |
| 376 | + classUsageLocate: "class_usage_locate", | |
| 377 | + classUsageHovered: "class_usage_hovered", | |
| 378 | + classStyled: "class_styled", | |
| 379 | + classStateClicked: "class_state_clicked", | |
| 380 | + classUsageClicked: "class_usage_clicked", | |
| 381 | + classDuplicate: "class_duplicate", | |
| 382 | + classSyncToV3PopupShown: "class_sync_to_v3_popup_shown", | |
| 383 | + classSyncToV3: "class_sync_to_v3", | |
| 384 | + classSyncToV3PopupClick: "class_sync_to_v3_popup_click" | |
| 385 | + }, | |
| 386 | + editorOne: { | |
| 387 | + topBarPublishDropdown: "top_bar_publish_dropdown", | |
| 388 | + topBarPageList: "top_bar_page_list", | |
| 389 | + siteSettingsSession: "site_settings_session", | |
| 390 | + eLibraryNav: "e_library_nav", | |
| 391 | + eLibraryInsert: "e_library_insert", | |
| 392 | + eLibraryFavorite: "e_library_favorite", | |
| 393 | + eLibraryGenerateAi: "e_library_generate_ai", | |
| 394 | + finderSearchInput: "finder_search_input", | |
| 395 | + finderResultSelect: "finder_result_select", | |
| 396 | + canvasEmptyBoxAction: "canvas_empty_box_action", | |
| 397 | + widgetPanelSearch: "widget_panel_search", | |
| 398 | + wpDashElementorMenuClick: "wpdash_elementor_menu_click", | |
| 399 | + wpDashEditorSubMenuHover: "wpdash_editor_sub_menu_hover", | |
| 400 | + wpDashThemeBuilderClick: "wpdash_theme_builder_click", | |
| 401 | + sidebarMenuItemClicked: "sidebar_menu_item_clicked", | |
| 402 | + sidebarMenuGroupToggled: "sidebar_menu_group_toggled" | |
| 403 | + }, | |
| 404 | + interactions: { created: "interactions_created" }, | |
| 405 | + promotions: { | |
| 406 | + viewPromotion: "view_promotion", | |
| 407 | + upgradePromotionClick: "upgrade_promotion_click" | |
| 408 | + } | |
| 409 | + } | |
| 410 | + }; | |
| 174 | 411 | |
| 175 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 176 | -Object.defineProperty(exports, "__esModule", ({ | |
| 177 | - value: true | |
| 178 | -})); | |
| 179 | -exports.ImportExportError = void 0; | |
| 180 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 181 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 182 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 183 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 184 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 185 | -var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js")); | |
| 186 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 187 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 188 | -var ImportExportError = exports.ImportExportError = /*#__PURE__*/function (_Error) { | |
| 189 | - function ImportExportError(errorMessage, errorCode) { | |
| 190 | - var _this; | |
| 191 | - (0, _classCallCheck2.default)(this, ImportExportError); | |
| 192 | - _this = _callSuper(this, ImportExportError, ['string' === typeof errorMessage ? errorMessage : '']); | |
| 193 | - _this.code = errorCode || 'general'; | |
| 194 | - _this.details = errorMessage; | |
| 195 | - return _this; | |
| 196 | - } | |
| 197 | - (0, _inherits2.default)(ImportExportError, _Error); | |
| 198 | - return (0, _createClass2.default)(ImportExportError); | |
| 199 | -}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 412 | +//#endregion | |
| 413 | +//#region app/assets/js/event-track/apps-event-tracking.js | |
| 414 | + function ownKeys(e, r) { | |
| 415 | + var t = Object.keys(e); | |
| 416 | + if (Object.getOwnPropertySymbols) { | |
| 417 | + var o = Object.getOwnPropertySymbols(e); | |
| 418 | + r && (o = o.filter(function(r) { | |
| 419 | + return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 420 | + })), t.push.apply(t, o); | |
| 421 | + } | |
| 422 | + return t; | |
| 423 | + } | |
| 424 | + function _objectSpread(e) { | |
| 425 | + for (var r = 1; r < arguments.length; r++) { | |
| 426 | + var t = null != arguments[r] ? arguments[r] : {}; | |
| 427 | + r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { | |
| 428 | + _defineProperty(e, r, t[r]); | |
| 429 | + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { | |
| 430 | + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 431 | + }); | |
| 432 | + } | |
| 433 | + return e; | |
| 434 | + } | |
| 435 | + var EVENTS_MAP = { | |
| 436 | + PAGE_VIEWS_WEBSITE_TEMPLATES: "page_views_website_templates", | |
| 437 | + KITS_CLOUD_UPGRADE_CLICKED: "kits_cloud_upgrade_clicked", | |
| 438 | + EXPORT_KIT_CUSTOMIZATION: "export_kit_customization", | |
| 439 | + IMPORT_KIT_CUSTOMIZATION: "import_kit_customization", | |
| 440 | + KIT_IMPORT_STATUS: "kit_import_status", | |
| 441 | + KIT_CLOUD_LIBRARY_APPLY: "kit_cloud_library_apply", | |
| 442 | + KIT_CLOUD_LIBRARY_DELETE: "kit_cloud_library_delete", | |
| 443 | + IMPORT_EXPORT_ADMIN_ACTION: "ie_admin_action", | |
| 444 | + KIT_IMPORT_UPLOAD_FILE: "kit_import_upload_file" | |
| 445 | + }; | |
| 446 | + var AppsEventTracking = /*#__PURE__*/ function() { | |
| 447 | + function AppsEventTracking() { | |
| 448 | + _classCallCheck(this, AppsEventTracking); | |
| 449 | + } | |
| 450 | + return _createClass(AppsEventTracking, null, [ | |
| 451 | + { | |
| 452 | + key: "dispatchEvent", | |
| 453 | + value: function dispatchEvent(eventName, payload) { | |
| 454 | + var _window$elementorComm; | |
| 455 | + var _window$elementorComm2; | |
| 456 | + return (_window$elementorComm = window.elementorCommon) === null || _window$elementorComm === void 0 || (_window$elementorComm = _window$elementorComm.eventsManager) === null || _window$elementorComm === void 0 || (_window$elementorComm2 = _window$elementorComm.dispatchEvent) === null || _window$elementorComm2 === void 0 ? void 0 : _window$elementorComm2.call(_window$elementorComm, eventName, payload); | |
| 457 | + } | |
| 458 | + }, | |
| 459 | + { | |
| 460 | + key: "sendPageViewsWebsiteTemplates", | |
| 461 | + value: function sendPageViewsWebsiteTemplates(page) { | |
| 462 | + return this.dispatchEvent(EVENTS_MAP.PAGE_VIEWS_WEBSITE_TEMPLATES, { | |
| 463 | + trigger: eventsConfig.triggers.pageLoaded, | |
| 464 | + page_loaded: page, | |
| 465 | + secondary_location: page | |
| 466 | + }); | |
| 467 | + } | |
| 468 | + }, | |
| 469 | + { | |
| 470 | + key: "sendKitsCloudUpgradeClicked", | |
| 471 | + value: function sendKitsCloudUpgradeClicked(upgradeLocation) { | |
| 472 | + return this.dispatchEvent(EVENTS_MAP.KITS_CLOUD_UPGRADE_CLICKED, { | |
| 473 | + trigger: eventsConfig.triggers.click, | |
| 474 | + secondary_location: upgradeLocation, | |
| 475 | + upgrade_location: upgradeLocation | |
| 476 | + }); | |
| 477 | + } | |
| 478 | + }, | |
| 479 | + { | |
| 480 | + key: "sendExportKitCustomization", | |
| 481 | + value: function sendExportKitCustomization(payload) { | |
| 482 | + return this.dispatchEvent(EVENTS_MAP.EXPORT_KIT_CUSTOMIZATION, _objectSpread({ trigger: eventsConfig.triggers.click }, payload)); | |
| 483 | + } | |
| 484 | + }, | |
| 485 | + { | |
| 486 | + key: "sendImportKitCustomization", | |
| 487 | + value: function sendImportKitCustomization(payload) { | |
| 488 | + return this.dispatchEvent(EVENTS_MAP.IMPORT_KIT_CUSTOMIZATION, _objectSpread({ trigger: eventsConfig.triggers.click }, payload)); | |
| 489 | + } | |
| 490 | + }, | |
| 491 | + { | |
| 492 | + key: "sendKitImportStatus", | |
| 493 | + value: function sendKitImportStatus() { | |
| 494 | + var error = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null; | |
| 495 | + var isError = !!error; | |
| 496 | + return this.dispatchEvent(EVENTS_MAP.KIT_IMPORT_STATUS, _objectSpread({ kit_import_status: !isError }, isError && { kit_import_error: error.message })); | |
| 497 | + } | |
| 498 | + }, | |
| 499 | + { | |
| 500 | + key: "sendKitCloudLibraryApply", | |
| 501 | + value: function sendKitCloudLibraryApply(kitId, kitApplyUrl) { | |
| 502 | + return this.dispatchEvent(EVENTS_MAP.KIT_CLOUD_LIBRARY_APPLY, _objectSpread({ | |
| 503 | + trigger: eventsConfig.triggers.click, | |
| 504 | + kit_cloud_id: kitId | |
| 505 | + }, kitApplyUrl && { kit_apply_url: kitApplyUrl })); | |
| 506 | + } | |
| 507 | + }, | |
| 508 | + { | |
| 509 | + key: "sendKitCloudLibraryDelete", | |
| 510 | + value: function sendKitCloudLibraryDelete() { | |
| 511 | + return this.dispatchEvent(EVENTS_MAP.KIT_CLOUD_LIBRARY_DELETE, { trigger: eventsConfig.triggers.click }); | |
| 512 | + } | |
| 513 | + }, | |
| 514 | + { | |
| 515 | + key: "sendImportExportAdminAction", | |
| 516 | + value: function sendImportExportAdminAction(actionType) { | |
| 517 | + return this.dispatchEvent(EVENTS_MAP.IMPORT_EXPORT_ADMIN_ACTION, { | |
| 518 | + trigger: eventsConfig.triggers.click, | |
| 519 | + action_type: actionType | |
| 520 | + }); | |
| 521 | + } | |
| 522 | + }, | |
| 523 | + { | |
| 524 | + key: "sendKitImportUploadFile", | |
| 525 | + value: function sendKitImportUploadFile(status) { | |
| 526 | + return this.dispatchEvent(EVENTS_MAP.KIT_IMPORT_UPLOAD_FILE, { kit_import_upload_file_status: status }); | |
| 527 | + } | |
| 528 | + } | |
| 529 | + ]); | |
| 530 | + }(); | |
| 200 | 531 | |
| 201 | -/***/ }), | |
| 532 | +//#endregion | |
| 533 | +//#region node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js | |
| 534 | + function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 535 | + try { | |
| 536 | + var i = n[a](c); | |
| 537 | + var u = i.value; | |
| 538 | + } catch (n) { | |
| 539 | + e(n); | |
| 540 | + return; | |
| 541 | + } | |
| 542 | + i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 543 | + } | |
| 544 | + function _asyncToGenerator(n) { | |
| 545 | + return function() { | |
| 546 | + var t = this; | |
| 547 | + var e = arguments; | |
| 548 | + return new Promise(function(r, o) { | |
| 549 | + var a = n.apply(t, e); | |
| 550 | + function _next(n) { | |
| 551 | + asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 552 | + } | |
| 553 | + function _throw(n) { | |
| 554 | + asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 555 | + } | |
| 556 | + _next(void 0); | |
| 557 | + }); | |
| 558 | + }; | |
| 559 | + } | |
| 202 | 560 | |
| 203 | -/***/ "../app/modules/import-export-customization/assets/js/shared/revert-kit-handler.js": | |
| 204 | -/*!*****************************************************************************************!*\ | |
| 205 | - !*** ../app/modules/import-export-customization/assets/js/shared/revert-kit-handler.js ***! | |
| 206 | - \*****************************************************************************************/ | |
| 207 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 561 | +//#endregion | |
| 562 | +//#region node_modules/@babel/runtime/helpers/OverloadYield.js | |
| 563 | + var require_OverloadYield = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 564 | + function _OverloadYield(e, d) { | |
| 565 | + this.v = e, this.k = d; | |
| 566 | + } | |
| 567 | + module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 568 | + })); | |
| 208 | 569 | |
| 209 | -"use strict"; | |
| 210 | -/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 570 | +//#endregion | |
| 571 | +//#region node_modules/@babel/runtime/helpers/regeneratorDefine.js | |
| 572 | + var require_regeneratorDefine = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 573 | + function _regeneratorDefine(e, r, n, t) { | |
| 574 | + var i = Object.defineProperty; | |
| 575 | + try { | |
| 576 | + i({}, "", {}); | |
| 577 | + } catch (e) { | |
| 578 | + i = 0; | |
| 579 | + } | |
| 580 | + module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 581 | + function o(r, n) { | |
| 582 | + _regeneratorDefine(e, r, function(e) { | |
| 583 | + return this._invoke(r, n, e); | |
| 584 | + }); | |
| 585 | + } | |
| 586 | + r ? i ? i(e, r, { | |
| 587 | + value: n, | |
| 588 | + enumerable: !t, | |
| 589 | + configurable: !t, | |
| 590 | + writable: !t | |
| 591 | + }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 592 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 593 | + } | |
| 594 | + module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 595 | + })); | |
| 211 | 596 | |
| 597 | +//#endregion | |
| 598 | +//#region node_modules/@babel/runtime/helpers/regenerator.js | |
| 599 | + var require_regenerator$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 600 | + var regeneratorDefine = require_regeneratorDefine(); | |
| 601 | + function _regenerator() { | |
| 602 | + /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 603 | + var e; | |
| 604 | + var t; | |
| 605 | + var r = "function" == typeof Symbol ? Symbol : {}; | |
| 606 | + var n = r.iterator || "@@iterator"; | |
| 607 | + var o = r.toStringTag || "@@toStringTag"; | |
| 608 | + function i(r, n, o, i) { | |
| 609 | + var c = n && n.prototype instanceof Generator ? n : Generator; | |
| 610 | + var u = Object.create(c.prototype); | |
| 611 | + return regeneratorDefine(u, "_invoke", function(r, n, o) { | |
| 612 | + var i; | |
| 613 | + var c; | |
| 614 | + var u; | |
| 615 | + var f = 0; | |
| 616 | + var p = o || []; | |
| 617 | + var y = !1; | |
| 618 | + var G = { | |
| 619 | + p: 0, | |
| 620 | + n: 0, | |
| 621 | + v: e, | |
| 622 | + a: d, | |
| 623 | + f: d.bind(e, 4), | |
| 624 | + d: function d(t, r) { | |
| 625 | + return i = t, c = 0, u = e, G.n = r, a; | |
| 626 | + } | |
| 627 | + }; | |
| 628 | + function d(r, n) { | |
| 629 | + for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 630 | + var o; | |
| 631 | + var i = p[t]; | |
| 632 | + var d = G.p; | |
| 633 | + var l = i[2]; | |
| 634 | + r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); | |
| 635 | + } | |
| 636 | + if (o || r > 1) return a; | |
| 637 | + throw y = !0, n; | |
| 638 | + } | |
| 639 | + return function(o, p, l) { | |
| 640 | + if (f > 1) throw TypeError("Generator is already running"); | |
| 641 | + for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 642 | + i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 643 | + try { | |
| 644 | + if (f = 2, i) { | |
| 645 | + if (c || (o = "next"), t = i[o]) { | |
| 646 | + if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 647 | + if (!t.done) return t; | |
| 648 | + u = t.value, c < 2 && (c = 0); | |
| 649 | + } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 650 | + i = e; | |
| 651 | + } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 652 | + } catch (t) { | |
| 653 | + i = e, c = 1, u = t; | |
| 654 | + } finally { | |
| 655 | + f = 1; | |
| 656 | + } | |
| 657 | + } | |
| 658 | + return { | |
| 659 | + value: t, | |
| 660 | + done: y | |
| 661 | + }; | |
| 662 | + }; | |
| 663 | + }(r, o, i), !0), u; | |
| 664 | + } | |
| 665 | + var a = {}; | |
| 666 | + function Generator() {} | |
| 667 | + function GeneratorFunction() {} | |
| 668 | + function GeneratorFunctionPrototype() {} | |
| 669 | + t = Object.getPrototypeOf; | |
| 670 | + var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function() { | |
| 671 | + return this; | |
| 672 | + }), t); | |
| 673 | + var u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 674 | + function f(e) { | |
| 675 | + return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 676 | + } | |
| 677 | + return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function() { | |
| 678 | + return this; | |
| 679 | + }), regeneratorDefine(u, "toString", function() { | |
| 680 | + return "[object Generator]"; | |
| 681 | + }), (module.exports = _regenerator = function _regenerator() { | |
| 682 | + return { | |
| 683 | + w: i, | |
| 684 | + m: f | |
| 685 | + }; | |
| 686 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 687 | + } | |
| 688 | + module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 689 | + })); | |
| 212 | 690 | |
| 213 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 214 | -Object.defineProperty(exports, "__esModule", ({ | |
| 215 | - value: true | |
| 216 | -})); | |
| 217 | -exports.RevertKitHandler = void 0; | |
| 218 | -var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 219 | -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 220 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 221 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 222 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 223 | -var _apiRequest = __webpack_require__(/*! ./utils/api-request */ "../app/modules/import-export-customization/assets/js/shared/utils/api-request.js"); | |
| 224 | -var RevertKitHandler = exports.RevertKitHandler = /*#__PURE__*/function () { | |
| 225 | - function RevertKitHandler() { | |
| 226 | - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, | |
| 227 | - revertButton = _ref.revertButton, | |
| 228 | - onError = _ref.onError; | |
| 229 | - (0, _classCallCheck2.default)(this, RevertKitHandler); | |
| 230 | - this.revertButton = revertButton; | |
| 231 | - this.onError = onError || this.defaultErrorHandler.bind(this); | |
| 232 | - } | |
| 233 | - return (0, _createClass2.default)(RevertKitHandler, [{ | |
| 234 | - key: "revertKit", | |
| 235 | - value: function () { | |
| 236 | - var _revertKit = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 237 | - var activeKitName, confirmed, referrerKitId, returnTo, noAutomaticRedirect, _yield$this$callRever, data, _t; | |
| 238 | - return _regenerator.default.wrap(function (_context) { | |
| 239 | - while (1) switch (_context.prev = _context.next) { | |
| 240 | - case 0: | |
| 241 | - activeKitName = this.getActiveKitName(); | |
| 242 | - _context.next = 1; | |
| 243 | - return this.showConfirmationDialog(activeKitName); | |
| 244 | - case 1: | |
| 245 | - confirmed = _context.sent; | |
| 246 | - if (confirmed) { | |
| 247 | - _context.next = 2; | |
| 248 | - break; | |
| 249 | - } | |
| 250 | - return _context.abrupt("return"); | |
| 251 | - case 2: | |
| 252 | - _context.prev = 2; | |
| 253 | - referrerKitId = this.getReferrerKitId(); | |
| 254 | - returnTo = this.getReturnTo(); | |
| 255 | - noAutomaticRedirect = this.getNoAutomaticRedirect(); | |
| 256 | - this.saveToCache(referrerKitId, activeKitName, returnTo, noAutomaticRedirect); | |
| 257 | - _context.next = 3; | |
| 258 | - return this.callRevertAPI(); | |
| 259 | - case 3: | |
| 260 | - _yield$this$callRever = _context.sent; | |
| 261 | - data = _yield$this$callRever.data; | |
| 262 | - this.handleRevertResponse(data); | |
| 263 | - _context.next = 5; | |
| 264 | - break; | |
| 265 | - case 4: | |
| 266 | - _context.prev = 4; | |
| 267 | - _t = _context["catch"](2); | |
| 268 | - this.onError(_t); | |
| 269 | - case 5: | |
| 270 | - case "end": | |
| 271 | - return _context.stop(); | |
| 272 | - } | |
| 273 | - }, _callee, this, [[2, 4]]); | |
| 274 | - })); | |
| 275 | - function revertKit() { | |
| 276 | - return _revertKit.apply(this, arguments); | |
| 277 | - } | |
| 278 | - return revertKit; | |
| 279 | - }() | |
| 280 | - }, { | |
| 281 | - key: "callRevertAPI", | |
| 282 | - value: function () { | |
| 283 | - var _callRevertAPI = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { | |
| 284 | - var result; | |
| 285 | - return _regenerator.default.wrap(function (_context2) { | |
| 286 | - while (1) switch (_context2.prev = _context2.next) { | |
| 287 | - case 0: | |
| 288 | - _context2.next = 1; | |
| 289 | - return (0, _apiRequest.apiRequest)({ | |
| 290 | - path: RevertKitHandler.API_PATH | |
| 291 | - }); | |
| 292 | - case 1: | |
| 293 | - result = _context2.sent; | |
| 294 | - return _context2.abrupt("return", result); | |
| 295 | - case 2: | |
| 296 | - case "end": | |
| 297 | - return _context2.stop(); | |
| 298 | - } | |
| 299 | - }, _callee2); | |
| 300 | - })); | |
| 301 | - function callRevertAPI() { | |
| 302 | - return _callRevertAPI.apply(this, arguments); | |
| 303 | - } | |
| 304 | - return callRevertAPI; | |
| 305 | - }() | |
| 306 | - }, { | |
| 307 | - key: "handleRevertResponse", | |
| 308 | - value: function handleRevertResponse(data) { | |
| 309 | - if (!data.revert_completed) { | |
| 310 | - this.handleRevertNoSessions(data); | |
| 311 | - return; | |
| 312 | - } | |
| 313 | - this.showRevertCompletedDialog(data); | |
| 314 | - } | |
| 315 | - }, { | |
| 316 | - key: "showRevertCompletedDialog", | |
| 317 | - value: function showRevertCompletedDialog() { | |
| 318 | - var referrerKitId = this.getReferrerKitId(); | |
| 319 | - if (referrerKitId) { | |
| 320 | - this.showReferrerKitDialog(referrerKitId); | |
| 321 | - return; | |
| 322 | - } | |
| 323 | - this.showRevertSuccessDialog(); | |
| 324 | - } | |
| 325 | - }, { | |
| 326 | - key: "handleRevertNoSessions", | |
| 327 | - value: function handleRevertNoSessions(responseData) { | |
| 328 | - elementorCommon.dialogsManager.createWidget('alert', { | |
| 329 | - message: responseData.message || __('No import sessions available to revert.', 'elementor') | |
| 330 | - }).show(); | |
| 331 | - } | |
| 332 | - }, { | |
| 333 | - key: "showConfirmationDialog", | |
| 334 | - value: function () { | |
| 335 | - var _showConfirmationDialog = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(activeKitName) { | |
| 336 | - return _regenerator.default.wrap(function (_context3) { | |
| 337 | - while (1) switch (_context3.prev = _context3.next) { | |
| 338 | - case 0: | |
| 339 | - return _context3.abrupt("return", new Promise(function (resolve) { | |
| 340 | - elementorCommon.dialogsManager.createWidget('confirm', { | |
| 341 | - headerMessage: __('Are you sure?', 'elementor'), | |
| 342 | - /* Translators: %s: Kit name */ | |
| 343 | - message: __("Removing %s will permanently delete changes made to the Website Template's content and site settings", 'elementor').replace('%s', activeKitName), | |
| 344 | - strings: { | |
| 345 | - confirm: __('Delete', 'elementor'), | |
| 346 | - cancel: __('Cancel', 'elementor') | |
| 347 | - }, | |
| 348 | - onConfirm: function onConfirm() { | |
| 349 | - return resolve(true); | |
| 350 | - }, | |
| 351 | - onCancel: function onCancel() { | |
| 352 | - return resolve(false); | |
| 353 | - } | |
| 354 | - }).show(); | |
| 355 | - })); | |
| 356 | - case 1: | |
| 357 | - case "end": | |
| 358 | - return _context3.stop(); | |
| 359 | - } | |
| 360 | - }, _callee3); | |
| 361 | - })); | |
| 362 | - function showConfirmationDialog(_x) { | |
| 363 | - return _showConfirmationDialog.apply(this, arguments); | |
| 364 | - } | |
| 365 | - return showConfirmationDialog; | |
| 366 | - }() | |
| 367 | - }, { | |
| 368 | - key: "createSuccessHeaderMessage", | |
| 369 | - value: function createSuccessHeaderMessage() { | |
| 370 | - var _this$getDataFromCach = this.getDataFromCache(), | |
| 371 | - activeKitName = _this$getDataFromCach.activeKitName; | |
| 691 | +//#endregion | |
| 692 | +//#region node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js | |
| 693 | + var require_regeneratorAsyncIterator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 694 | + var OverloadYield = require_OverloadYield(); | |
| 695 | + var regeneratorDefine = require_regeneratorDefine(); | |
| 696 | + function AsyncIterator(t, e) { | |
| 697 | + function n(r, o, i, f) { | |
| 698 | + try { | |
| 699 | + var c = t[r](o); | |
| 700 | + var u = c.value; | |
| 701 | + return u instanceof OverloadYield ? e.resolve(u.v).then(function(t) { | |
| 702 | + n("next", t, i, f); | |
| 703 | + }, function(t) { | |
| 704 | + n("throw", t, i, f); | |
| 705 | + }) : e.resolve(u).then(function(t) { | |
| 706 | + c.value = t, i(c); | |
| 707 | + }, function(t) { | |
| 708 | + return n("throw", t, i, f); | |
| 709 | + }); | |
| 710 | + } catch (t) { | |
| 711 | + f(t); | |
| 712 | + } | |
| 713 | + } | |
| 714 | + var r; | |
| 715 | + this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function() { | |
| 716 | + return this; | |
| 717 | + })), regeneratorDefine(this, "_invoke", function(t, o, i) { | |
| 718 | + function f() { | |
| 719 | + return new e(function(e, r) { | |
| 720 | + n(t, i, e, r); | |
| 721 | + }); | |
| 722 | + } | |
| 723 | + return r = r ? r.then(f, f) : f(); | |
| 724 | + }, !0); | |
| 725 | + } | |
| 726 | + module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 727 | + })); | |
| 372 | 728 | |
| 373 | - /* Translators: %s: Kit name */ | |
| 374 | - return __('%s was successfully deleted', 'elementor').replace('%s', activeKitName); | |
| 375 | - } | |
| 376 | - }, { | |
| 377 | - key: "showRevertSuccessDialog", | |
| 378 | - value: function showRevertSuccessDialog() { | |
| 379 | - elementorCommon.dialogsManager.createWidget('confirm', { | |
| 380 | - id: RevertKitHandler.DIALOG_ID, | |
| 381 | - headerMessage: this.createSuccessHeaderMessage(), | |
| 382 | - message: __('Try a different Website Template or build your site from scratch.', 'elementor'), | |
| 383 | - strings: { | |
| 384 | - confirm: __('OK', 'elementor'), | |
| 385 | - cancel: __('Library', 'elementor') | |
| 386 | - }, | |
| 387 | - onConfirm: function onConfirm() { | |
| 388 | - location.reload(); | |
| 389 | - }, | |
| 390 | - onCancel: function onCancel() { | |
| 391 | - location.href = elementorImportExport.appUrl; | |
| 392 | - } | |
| 393 | - }).show(); | |
| 394 | - this.clearCache(); | |
| 395 | - } | |
| 396 | - }, { | |
| 397 | - key: "showReferrerKitDialog", | |
| 398 | - value: function showReferrerKitDialog(referrerKitId) { | |
| 399 | - var _this = this; | |
| 400 | - var _this$getDataFromCach2 = this.getDataFromCache(), | |
| 401 | - returnTo = _this$getDataFromCach2.returnTo, | |
| 402 | - noAutomaticRedirect = _this$getDataFromCach2.noAutomaticRedirect; | |
| 403 | - elementorCommon.dialogsManager.createWidget('confirm', { | |
| 404 | - id: RevertKitHandler.DIALOG_ID, | |
| 405 | - headerMessage: this.createSuccessHeaderMessage(), | |
| 406 | - message: __("You're ready to apply a new Kit!", 'elementor'), | |
| 407 | - strings: { | |
| 408 | - confirm: __('Continue to new Kit', 'elementor'), | |
| 409 | - cancel: __('Close', 'elementor') | |
| 410 | - }, | |
| 411 | - onConfirm: function onConfirm() { | |
| 412 | - location.href = _this.buildPreviewUrl(referrerKitId, returnTo, noAutomaticRedirect); | |
| 413 | - }, | |
| 414 | - onCancel: function onCancel() { | |
| 415 | - location.reload(); | |
| 416 | - } | |
| 417 | - }).show(); | |
| 418 | - this.clearCache(); | |
| 419 | - } | |
| 420 | - }, { | |
| 421 | - key: "buildPreviewUrl", | |
| 422 | - value: function buildPreviewUrl(referrerKitId, returnTo, noAutomaticRedirect) { | |
| 423 | - var baseUrl = elementorImportExport.appUrl + '/preview/' + referrerKitId; | |
| 424 | - var url = new URL(baseUrl); | |
| 425 | - if (returnTo) { | |
| 426 | - url.searchParams.append(RevertKitHandler.URL_PARAM_RETURN_TO, returnTo); | |
| 427 | - } | |
| 428 | - if (noAutomaticRedirect) { | |
| 429 | - url.searchParams.append(RevertKitHandler.URL_PARAM_NO_AUTOMATIC_REDIRECT, noAutomaticRedirect); | |
| 430 | - } | |
| 431 | - return url.toString(); | |
| 432 | - } | |
| 433 | - }, { | |
| 434 | - key: "maybeShowReferrerKitDialog", | |
| 435 | - value: function maybeShowReferrerKitDialog() { | |
| 436 | - var _this$getDataFromCach3 = this.getDataFromCache(), | |
| 437 | - referrerKitId = _this$getDataFromCach3.referrerKitId; | |
| 438 | - if (undefined === referrerKitId) { | |
| 439 | - return; | |
| 440 | - } | |
| 441 | - if (0 === referrerKitId.length) { | |
| 442 | - this.showRevertSuccessDialog(); | |
| 443 | - return; | |
| 444 | - } | |
| 445 | - this.showReferrerKitDialog(referrerKitId); | |
| 446 | - } | |
| 447 | - }, { | |
| 448 | - key: "getActiveKitName", | |
| 449 | - value: function getActiveKitName() { | |
| 450 | - var lastKit = elementorImportExport.lastImportedSession; | |
| 451 | - if (lastKit.kit_title) { | |
| 452 | - return lastKit.kit_title; | |
| 453 | - } | |
| 454 | - if (lastKit.kit_name) { | |
| 455 | - return this.convertNameToTitle(lastKit.kit_name); | |
| 456 | - } | |
| 457 | - return __('Your Kit', 'elementor'); | |
| 458 | - } | |
| 459 | - }, { | |
| 460 | - key: "convertNameToTitle", | |
| 461 | - value: function convertNameToTitle(name) { | |
| 462 | - var words = name.split(RevertKitHandler.NAME_SEPARATOR_PATTERN).filter(function (word) { | |
| 463 | - return word.length > 0; | |
| 464 | - }); | |
| 465 | - if (0 === words.length) { | |
| 466 | - return __('Your Kit', 'elementor'); | |
| 467 | - } | |
| 468 | - return words.map(function (word) { | |
| 469 | - return word[0].toUpperCase() + word.substring(1); | |
| 470 | - }).join(' '); | |
| 471 | - } | |
| 472 | - }, { | |
| 473 | - key: "getReferrerKitId", | |
| 474 | - value: function getReferrerKitId() { | |
| 475 | - var urlParams = new URLSearchParams(window.location.search); | |
| 476 | - var pageReferrerKit = urlParams.get(RevertKitHandler.URL_PARAM_REFERRER_KIT); | |
| 477 | - if (pageReferrerKit) { | |
| 478 | - return pageReferrerKit; | |
| 479 | - } | |
| 480 | - if (!this.revertButton) { | |
| 481 | - return ''; | |
| 482 | - } | |
| 483 | - return new URL(this.revertButton.href).searchParams.get(RevertKitHandler.URL_PARAM_REFERRER_KIT) || ''; | |
| 484 | - } | |
| 485 | - }, { | |
| 486 | - key: "getReturnTo", | |
| 487 | - value: function getReturnTo() { | |
| 488 | - var urlParams = new URLSearchParams(window.location.search); | |
| 489 | - return urlParams.get(RevertKitHandler.URL_PARAM_RETURN_TO) || ''; | |
| 490 | - } | |
| 491 | - }, { | |
| 492 | - key: "getNoAutomaticRedirect", | |
| 493 | - value: function getNoAutomaticRedirect() { | |
| 494 | - var urlParams = new URLSearchParams(window.location.search); | |
| 495 | - return urlParams.get(RevertKitHandler.URL_PARAM_NO_AUTOMATIC_REDIRECT) || ''; | |
| 496 | - } | |
| 497 | - }, { | |
| 498 | - key: "saveToCache", | |
| 499 | - value: function saveToCache(referrerKitId, activeKitName, returnTo, noAutomaticRedirect) { | |
| 500 | - sessionStorage.setItem(RevertKitHandler.KIT_DATA_KEY, JSON.stringify({ | |
| 501 | - referrerKitId: referrerKitId || '', | |
| 502 | - activeKitName: activeKitName || '', | |
| 503 | - returnTo: returnTo || '', | |
| 504 | - noAutomaticRedirect: noAutomaticRedirect || '' | |
| 505 | - })); | |
| 506 | - } | |
| 507 | - }, { | |
| 508 | - key: "getDataFromCache", | |
| 509 | - value: function getDataFromCache() { | |
| 510 | - try { | |
| 511 | - return JSON.parse(sessionStorage.getItem(RevertKitHandler.KIT_DATA_KEY)) || {}; | |
| 512 | - } catch (e) { | |
| 513 | - return {}; | |
| 514 | - } | |
| 515 | - } | |
| 516 | - }, { | |
| 517 | - key: "clearCache", | |
| 518 | - value: function clearCache() { | |
| 519 | - sessionStorage.removeItem(RevertKitHandler.KIT_DATA_KEY); | |
| 520 | - } | |
| 521 | - }, { | |
| 522 | - key: "defaultErrorHandler", | |
| 523 | - value: function defaultErrorHandler() { | |
| 524 | - elementorCommon.dialogsManager.createWidget('alert', { | |
| 525 | - message: __('An error occurred while reverting the kit. Please try again.', 'elementor') | |
| 526 | - }).show(); | |
| 527 | - } | |
| 528 | - }]); | |
| 529 | -}(); | |
| 530 | -(0, _defineProperty2.default)(RevertKitHandler, "API_PATH", 'revert'); | |
| 531 | -(0, _defineProperty2.default)(RevertKitHandler, "DIALOG_ID", 'e-revert-kit-deleted-dialog'); | |
| 532 | -(0, _defineProperty2.default)(RevertKitHandler, "URL_PARAM_REFERRER_KIT", 'referrer_kit'); | |
| 533 | -(0, _defineProperty2.default)(RevertKitHandler, "URL_PARAM_RETURN_TO", 'return_to'); | |
| 534 | -(0, _defineProperty2.default)(RevertKitHandler, "URL_PARAM_NO_AUTOMATIC_REDIRECT", 'no_automatic_redirect'); | |
| 535 | -(0, _defineProperty2.default)(RevertKitHandler, "KIT_DATA_KEY", 'elementor-kit-data'); | |
| 536 | -(0, _defineProperty2.default)(RevertKitHandler, "NAME_SEPARATOR_PATTERN", /[-_]+/); | |
| 729 | +//#endregion | |
| 730 | +//#region node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js | |
| 731 | + var require_regeneratorAsyncGen = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 732 | + var regenerator = require_regenerator$1(); | |
| 733 | + var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); | |
| 734 | + function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 735 | + return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 736 | + } | |
| 737 | + module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 738 | + })); | |
| 537 | 739 | |
| 538 | -/***/ }), | |
| 740 | +//#endregion | |
| 741 | +//#region node_modules/@babel/runtime/helpers/regeneratorAsync.js | |
| 742 | + var require_regeneratorAsync = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 743 | + var regeneratorAsyncGen = require_regeneratorAsyncGen(); | |
| 744 | + function _regeneratorAsync(n, e, r, t, o) { | |
| 745 | + var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 746 | + return a.next().then(function(n) { | |
| 747 | + return n.done ? n.value : a.next(); | |
| 748 | + }); | |
| 749 | + } | |
| 750 | + module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 751 | + })); | |
| 539 | 752 | |
| 540 | -/***/ "../app/modules/import-export-customization/assets/js/shared/utils/api-fetch-config.js": | |
| 541 | -/*!*********************************************************************************************!*\ | |
| 542 | - !*** ../app/modules/import-export-customization/assets/js/shared/utils/api-fetch-config.js ***! | |
| 543 | - \*********************************************************************************************/ | |
| 544 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 753 | +//#endregion | |
| 754 | +//#region node_modules/@babel/runtime/helpers/regeneratorKeys.js | |
| 755 | + var require_regeneratorKeys = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 756 | + function _regeneratorKeys(e) { | |
| 757 | + var n = Object(e); | |
| 758 | + var r = []; | |
| 759 | + for (var t in n) r.unshift(t); | |
| 760 | + return function e() { | |
| 761 | + for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 762 | + return e.done = !0, e; | |
| 763 | + }; | |
| 764 | + } | |
| 765 | + module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 766 | + })); | |
| 545 | 767 | |
| 546 | -"use strict"; | |
| 768 | +//#endregion | |
| 769 | +//#region node_modules/@babel/runtime/helpers/typeof.js | |
| 770 | + var require_typeof = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 771 | + function _typeof(o) { | |
| 772 | + "@babel/helpers - typeof"; | |
| 773 | + return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 774 | + return typeof o; | |
| 775 | + } : function(o) { | |
| 776 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 777 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 778 | + } | |
| 779 | + module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 780 | + })); | |
| 547 | 781 | |
| 782 | +//#endregion | |
| 783 | +//#region node_modules/@babel/runtime/helpers/regeneratorValues.js | |
| 784 | + var require_regeneratorValues = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 785 | + var _typeof = require_typeof()["default"]; | |
| 786 | + function _regeneratorValues(e) { | |
| 787 | + if (null != e) { | |
| 788 | + var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"]; | |
| 789 | + var r = 0; | |
| 790 | + if (t) return t.call(e); | |
| 791 | + if ("function" == typeof e.next) return e; | |
| 792 | + if (!isNaN(e.length)) return { next: function next() { | |
| 793 | + return e && r >= e.length && (e = void 0), { | |
| 794 | + value: e && e[r++], | |
| 795 | + done: !e | |
| 796 | + }; | |
| 797 | + } }; | |
| 798 | + } | |
| 799 | + throw new TypeError(_typeof(e) + " is not iterable"); | |
| 800 | + } | |
| 801 | + module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 802 | + })); | |
| 548 | 803 | |
| 549 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 550 | -Object.defineProperty(exports, "__esModule", ({ | |
| 551 | - value: true | |
| 552 | -})); | |
| 553 | -exports.configureApiFetch = configureApiFetch; | |
| 554 | -exports.resetApiFetchConfig = resetApiFetchConfig; | |
| 555 | -var _apiFetch = _interopRequireDefault(__webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch")); | |
| 556 | -var _importExportError = __webpack_require__(/*! ../error/import-export-error */ "../app/modules/import-export-customization/assets/js/shared/error/import-export-error.js"); | |
| 557 | -var isApiConfigured = false; | |
| 558 | -function configureApiFetch() { | |
| 559 | - var _window$elementorAppC; | |
| 560 | - if (isApiConfigured) { | |
| 561 | - return; | |
| 562 | - } | |
| 563 | - var config = (_window$elementorAppC = window.elementorAppConfig) === null || _window$elementorAppC === void 0 ? void 0 : _window$elementorAppC['import-export-customization']; | |
| 564 | - if (!config) { | |
| 565 | - throw new _importExportError.ImportExportError('Configuration not found. Please refresh the page.', 'config_missing'); | |
| 566 | - } | |
| 567 | - if (config.restNonce) { | |
| 568 | - _apiFetch.default.use(_apiFetch.default.createNonceMiddleware(config.restNonce)); | |
| 569 | - } | |
| 570 | - if (config.restUrl) { | |
| 571 | - _apiFetch.default.use(_apiFetch.default.createRootURLMiddleware(config.restUrl)); | |
| 572 | - } | |
| 573 | - isApiConfigured = true; | |
| 574 | -} | |
| 575 | -function resetApiFetchConfig() { | |
| 576 | - isApiConfigured = false; | |
| 577 | -} | |
| 804 | +//#endregion | |
| 805 | +//#region node_modules/@babel/runtime/helpers/regeneratorRuntime.js | |
| 806 | + var require_regeneratorRuntime = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 807 | + var OverloadYield = require_OverloadYield(); | |
| 808 | + var regenerator = require_regenerator$1(); | |
| 809 | + var regeneratorAsync = require_regeneratorAsync(); | |
| 810 | + var regeneratorAsyncGen = require_regeneratorAsyncGen(); | |
| 811 | + var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); | |
| 812 | + var regeneratorKeys = require_regeneratorKeys(); | |
| 813 | + var regeneratorValues = require_regeneratorValues(); | |
| 814 | + function _regeneratorRuntime() { | |
| 815 | + "use strict"; | |
| 816 | + var r = regenerator(); | |
| 817 | + var e = r.m(_regeneratorRuntime); | |
| 818 | + var t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 819 | + function n(r) { | |
| 820 | + var e = "function" == typeof r && r.constructor; | |
| 821 | + return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 822 | + } | |
| 823 | + var o = { | |
| 824 | + "throw": 1, | |
| 825 | + "return": 2, | |
| 826 | + "break": 3, | |
| 827 | + "continue": 3 | |
| 828 | + }; | |
| 829 | + function a(r) { | |
| 830 | + var e; | |
| 831 | + var t; | |
| 832 | + return function(n) { | |
| 833 | + e || (e = { | |
| 834 | + stop: function stop() { | |
| 835 | + return t(n.a, 2); | |
| 836 | + }, | |
| 837 | + "catch": function _catch() { | |
| 838 | + return n.v; | |
| 839 | + }, | |
| 840 | + abrupt: function abrupt(r, e) { | |
| 841 | + return t(n.a, o[r], e); | |
| 842 | + }, | |
| 843 | + delegateYield: function delegateYield(r, o, a) { | |
| 844 | + return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 845 | + }, | |
| 846 | + finish: function finish(r) { | |
| 847 | + return t(n.f, r); | |
| 848 | + } | |
| 849 | + }, t = function t(r, _t, o) { | |
| 850 | + n.p = e.prev, n.n = e.next; | |
| 851 | + try { | |
| 852 | + return r(_t, o); | |
| 853 | + } finally { | |
| 854 | + e.next = n.n; | |
| 855 | + } | |
| 856 | + }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 857 | + try { | |
| 858 | + return r.call(this, e); | |
| 859 | + } finally { | |
| 860 | + n.p = e.prev, n.n = e.next; | |
| 861 | + } | |
| 862 | + }; | |
| 863 | + } | |
| 864 | + return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 865 | + return { | |
| 866 | + wrap: function wrap(e, t, n, o) { | |
| 867 | + return r.w(a(e), t, n, o && o.reverse()); | |
| 868 | + }, | |
| 869 | + isGeneratorFunction: n, | |
| 870 | + mark: r.m, | |
| 871 | + awrap: function awrap(r, e) { | |
| 872 | + return new OverloadYield(r, e); | |
| 873 | + }, | |
| 874 | + AsyncIterator: regeneratorAsyncIterator, | |
| 875 | + async: function async(r, e, t, o, u) { | |
| 876 | + return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 877 | + }, | |
| 878 | + keys: regeneratorKeys, | |
| 879 | + values: regeneratorValues | |
| 880 | + }; | |
| 881 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 882 | + } | |
| 883 | + module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 884 | + })); | |
| 578 | 885 | |
| 579 | -/***/ }), | |
| 886 | +//#endregion | |
| 887 | +//#region node_modules/@babel/runtime/regenerator/index.js | |
| 888 | + var require_regenerator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 889 | + var runtime = require_regeneratorRuntime()(); | |
| 890 | + module.exports = runtime; | |
| 891 | + try { | |
| 892 | + regeneratorRuntime = runtime; | |
| 893 | + } catch (accidentalStrictMode) { | |
| 894 | + if (typeof globalThis === "object") globalThis.regeneratorRuntime = runtime; | |
| 895 | + else Function("r", "regeneratorRuntime = r")(runtime); | |
| 896 | + } | |
| 897 | + })); | |
| 580 | 898 | |
| 581 | -/***/ "../app/modules/import-export-customization/assets/js/shared/utils/api-request.js": | |
| 582 | -/*!****************************************************************************************!*\ | |
| 583 | - !*** ../app/modules/import-export-customization/assets/js/shared/utils/api-request.js ***! | |
| 584 | - \****************************************************************************************/ | |
| 585 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 899 | +//#endregion | |
| 900 | +//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js | |
| 901 | +var import_regenerator = /* @__PURE__ */ __toESM(require_regenerator()); | |
| 902 | + function _assertThisInitialized(e) { | |
| 903 | + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 904 | + return e; | |
| 905 | + } | |
| 586 | 906 | |
| 587 | -"use strict"; | |
| 907 | +//#endregion | |
| 908 | +//#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js | |
| 909 | + function _possibleConstructorReturn(t, e) { | |
| 910 | + if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 911 | + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 912 | + return _assertThisInitialized(t); | |
| 913 | + } | |
| 588 | 914 | |
| 915 | +//#endregion | |
| 916 | +//#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js | |
| 917 | + function _getPrototypeOf(t) { | |
| 918 | + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { | |
| 919 | + return t.__proto__ || Object.getPrototypeOf(t); | |
| 920 | + }, _getPrototypeOf(t); | |
| 921 | + } | |
| 589 | 922 | |
| 590 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 591 | -Object.defineProperty(exports, "__esModule", ({ | |
| 592 | - value: true | |
| 593 | -})); | |
| 594 | -exports.apiRequest = apiRequest; | |
| 595 | -var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 596 | -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 597 | -var _apiFetch = _interopRequireDefault(__webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch")); | |
| 598 | -var _importExportError = __webpack_require__(/*! ../error/import-export-error */ "../app/modules/import-export-customization/assets/js/shared/error/import-export-error.js"); | |
| 599 | -var _apiFetchConfig = __webpack_require__(/*! ./api-fetch-config */ "../app/modules/import-export-customization/assets/js/shared/utils/api-fetch-config.js"); | |
| 600 | -var HTTP_STATUS = { | |
| 601 | - REQUEST_TIMEOUT: 408 | |
| 602 | -}; | |
| 603 | -var HTTP_METHODS = { | |
| 604 | - CREATABLE: 'POST' | |
| 605 | -}; | |
| 606 | -function apiRequest(_x) { | |
| 607 | - return _apiRequest.apply(this, arguments); | |
| 608 | -} | |
| 609 | -function _apiRequest() { | |
| 610 | - _apiRequest = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(_ref) { | |
| 611 | - var _ref$data, data, path, _ref$method, method, requestOptions, _t; | |
| 612 | - return _regenerator.default.wrap(function (_context) { | |
| 613 | - while (1) switch (_context.prev = _context.next) { | |
| 614 | - case 0: | |
| 615 | - _ref$data = _ref.data, data = _ref$data === void 0 ? null : _ref$data, path = _ref.path, _ref$method = _ref.method, method = _ref$method === void 0 ? HTTP_METHODS.CREATABLE : _ref$method; | |
| 616 | - (0, _apiFetchConfig.configureApiFetch)(); | |
| 617 | - _context.prev = 1; | |
| 618 | - requestOptions = { | |
| 619 | - path: "/elementor/v1/import-export-customization/".concat(path), | |
| 620 | - method: method | |
| 621 | - }; | |
| 622 | - if (data && HTTP_METHODS.CREATABLE === method) { | |
| 623 | - requestOptions.data = data; | |
| 624 | - } | |
| 625 | - _context.next = 2; | |
| 626 | - return (0, _apiFetch.default)(requestOptions); | |
| 627 | - case 2: | |
| 628 | - return _context.abrupt("return", _context.sent); | |
| 629 | - case 3: | |
| 630 | - _context.prev = 3; | |
| 631 | - _t = _context["catch"](1); | |
| 632 | - handleApiFetchError(_t); | |
| 633 | - case 4: | |
| 634 | - case "end": | |
| 635 | - return _context.stop(); | |
| 636 | - } | |
| 637 | - }, _callee, null, [[1, 3]]); | |
| 638 | - })); | |
| 639 | - return _apiRequest.apply(this, arguments); | |
| 640 | -} | |
| 641 | -function handleApiFetchError(error) { | |
| 642 | - var errorMessage = (error === null || error === void 0 ? void 0 : error.message) || 'An unknown error occurred'; | |
| 643 | - var errorCode = 'general'; | |
| 644 | - if (error !== null && error !== void 0 && error.code) { | |
| 645 | - errorCode = error.code; | |
| 646 | - } else if (error !== null && error !== void 0 && error.status) { | |
| 647 | - errorCode = HTTP_STATUS.REQUEST_TIMEOUT === error.status ? 'timeout' : error.status; | |
| 648 | - } | |
| 649 | - throw new _importExportError.ImportExportError(errorMessage, errorCode); | |
| 650 | -} | |
| 923 | +//#endregion | |
| 924 | +//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js | |
| 925 | + function _setPrototypeOf(t, e) { | |
| 926 | + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) { | |
| 927 | + return t.__proto__ = e, t; | |
| 928 | + }, _setPrototypeOf(t, e); | |
| 929 | + } | |
| 651 | 930 | |
| 652 | -/***/ }), | |
| 931 | +//#endregion | |
| 932 | +//#region node_modules/@babel/runtime/helpers/esm/inherits.js | |
| 933 | + function _inherits(t, e) { | |
| 934 | + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 935 | + t.prototype = Object.create(e && e.prototype, { constructor: { | |
| 936 | + value: t, | |
| 937 | + writable: !0, | |
| 938 | + configurable: !0 | |
| 939 | + } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); | |
| 940 | + } | |
| 653 | 941 | |
| 654 | -/***/ "../core/common/modules/events-manager/assets/js/events-config.js": | |
| 655 | -/*!************************************************************************!*\ | |
| 656 | - !*** ../core/common/modules/events-manager/assets/js/events-config.js ***! | |
| 657 | - \************************************************************************/ | |
| 658 | -/***/ ((__unused_webpack_module, exports) => { | |
| 942 | +//#endregion | |
| 943 | +//#region node_modules/@babel/runtime/helpers/esm/isNativeFunction.js | |
| 944 | + function _isNativeFunction(t) { | |
| 945 | + try { | |
| 946 | + return -1 !== Function.toString.call(t).indexOf("[native code]"); | |
| 947 | + } catch (n) { | |
| 948 | + return "function" == typeof t; | |
| 949 | + } | |
| 950 | + } | |
| 659 | 951 | |
| 660 | -"use strict"; | |
| 952 | +//#endregion | |
| 953 | +//#region node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js | |
| 954 | + function _isNativeReflectConstruct$1() { | |
| 955 | + try { | |
| 956 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 957 | + } catch (t) {} | |
| 958 | + return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { | |
| 959 | + return !!t; | |
| 960 | + })(); | |
| 961 | + } | |
| 962 | + __name(_isNativeReflectConstruct$1, "_isNativeReflectConstruct"); | |
| 661 | 963 | |
| 964 | +//#endregion | |
| 965 | +//#region node_modules/@babel/runtime/helpers/esm/construct.js | |
| 966 | + function _construct(t, e, r) { | |
| 967 | + if (_isNativeReflectConstruct$1()) return Reflect.construct.apply(null, arguments); | |
| 968 | + var o = [null]; | |
| 969 | + o.push.apply(o, e); | |
| 970 | + var p = new (t.bind.apply(t, o))(); | |
| 971 | + return r && _setPrototypeOf(p, r.prototype), p; | |
| 972 | + } | |
| 662 | 973 | |
| 663 | -Object.defineProperty(exports, "__esModule", ({ | |
| 664 | - value: true | |
| 665 | -})); | |
| 666 | -exports["default"] = void 0; | |
| 667 | -var eventsConfig = { | |
| 668 | - appTypes: { | |
| 669 | - editor: 'editor', | |
| 670 | - wpAdmin: 'wpadmin' | |
| 671 | - }, | |
| 672 | - targetTypes: { | |
| 673 | - dropdownItem: 'dropdown_item', | |
| 674 | - button: 'button', | |
| 675 | - tab: 'tab', | |
| 676 | - toggle: 'toggle', | |
| 677 | - searchInput: 'search_input', | |
| 678 | - searchResult: 'search_result', | |
| 679 | - buttons: 'buttons', | |
| 680 | - searchWidget: 'search_widget' | |
| 681 | - }, | |
| 682 | - interactionResults: { | |
| 683 | - actionSelected: 'action_selected', | |
| 684 | - navigate: 'navigate', | |
| 685 | - create: 'create', | |
| 686 | - sessionEnd: 'session_end', | |
| 687 | - tabChanged: 'tab_changed', | |
| 688 | - assetInserted: 'asset_inserted', | |
| 689 | - assetFavorite: 'asset_favorite', | |
| 690 | - aiGenerate: 'ai_generate', | |
| 691 | - resultsUpdated: 'results_updated', | |
| 692 | - noResults: 'no_results', | |
| 693 | - selected: 'selected', | |
| 694 | - promotionViewed: 'promotion_viewed', | |
| 695 | - upgradeNow: 'upgrade_now' | |
| 696 | - }, | |
| 697 | - targetNames: { | |
| 698 | - publishDropdown: { | |
| 699 | - saveDraft: 'save_draft', | |
| 700 | - saveAsTemplate: 'save_as_template', | |
| 701 | - viewPage: 'view_page', | |
| 702 | - copyAndShare: 'copy_and_share' | |
| 703 | - }, | |
| 704 | - pageList: { | |
| 705 | - addNewPage: 'add_new_page' | |
| 706 | - } | |
| 707 | - }, | |
| 708 | - triggers: { | |
| 709 | - click: 'Click', | |
| 710 | - rightClick: 'Right Click', | |
| 711 | - doubleClick: 'Double Click', | |
| 712 | - accordionClick: 'Accordion Click', | |
| 713 | - toggleClick: 'Toggle Click', | |
| 714 | - dropdownClick: 'Click Dropdown', | |
| 715 | - editorLoaded: 'Editor Loaded', | |
| 716 | - visible: 'Visible', | |
| 717 | - pageLoaded: 'Page Loaded', | |
| 718 | - typing: 'Typing', | |
| 719 | - tabSelect: 'Tab Select', | |
| 720 | - insert: 'Insert' | |
| 721 | - }, | |
| 722 | - locations: { | |
| 723 | - widgetPanel: 'Widget Panel', | |
| 724 | - topBar: 'Top Bar', | |
| 725 | - sidebar: 'Sidebar', | |
| 726 | - elementorEditor: 'Elementor Editor', | |
| 727 | - templatesLibrary: { | |
| 728 | - library: 'Templates Library' | |
| 729 | - }, | |
| 730 | - app: { | |
| 731 | - import: 'Import Kit', | |
| 732 | - export: 'Export Kit', | |
| 733 | - kitLibrary: 'Kit Library', | |
| 734 | - cloudKitLibrary: 'Cloud Kit Library' | |
| 735 | - }, | |
| 736 | - variables: 'Variables Panel', | |
| 737 | - variablesManager: 'Variables Manager', | |
| 738 | - admin: 'WP admin', | |
| 739 | - structurePanel: 'Structure Panel', | |
| 740 | - canvas: 'Canvas', | |
| 741 | - leftPanel: 'Left Panel', | |
| 742 | - elementorLibrary: 'Elementor Library', | |
| 743 | - components: { | |
| 744 | - instanceEditingPanel: 'Instance Editing Panel' | |
| 745 | - } | |
| 746 | - }, | |
| 747 | - secondaryLocations: { | |
| 748 | - layout: 'Layout Section', | |
| 749 | - basic: 'Basic Section', | |
| 750 | - 'pro-elements': 'Pro Section', | |
| 751 | - general: 'General Section', | |
| 752 | - 'theme-elements': 'Site Section', | |
| 753 | - 'theme-elements-single': 'Single Section', | |
| 754 | - 'woocommerce-elements': 'WooCommerce Section', | |
| 755 | - wordpress: 'WordPress Section', | |
| 756 | - categories: 'Widgets Tab', | |
| 757 | - global: 'Globals Tab', | |
| 758 | - 'whats-new': 'What\'s New', | |
| 759 | - 'document-settings': 'Document Settings icon', | |
| 760 | - 'preview-page': 'Preview Page', | |
| 761 | - 'publish-button': 'Publish Button', | |
| 762 | - 'widget-panel': 'Widget Panel Icon', | |
| 763 | - finder: 'Finder', | |
| 764 | - help: 'Help', | |
| 765 | - elementorLogoDropdown: 'top_bar_elementor_logo_dropdown', | |
| 766 | - elementorLogo: 'Elementor Logo', | |
| 767 | - eLogoMenu: 'E-logo Menu', | |
| 768 | - notes: 'Notes', | |
| 769 | - siteSettings: 'Site Settings', | |
| 770 | - structure: 'Structure', | |
| 771 | - documentNameDropdown: 'Document Name dropdown', | |
| 772 | - responsiveControls: 'Responsive controls', | |
| 773 | - launchpad: 'launchpad', | |
| 774 | - checklistHeader: 'Checklist Header', | |
| 775 | - checklistSteps: 'Checklist Steps', | |
| 776 | - userPreferences: 'User Preferences', | |
| 777 | - contextMenu: 'Context Menu', | |
| 778 | - templateLibrary: { | |
| 779 | - saveModal: 'Save to Modal', | |
| 780 | - moveModal: 'Move to Modal', | |
| 781 | - bulkMoveModal: 'Bulk Move to Modal', | |
| 782 | - copyModal: 'Copy to Modal', | |
| 783 | - bulkCopyModal: 'Bulk Copy to Modal', | |
| 784 | - saveModalSelectFolder: 'Save to Modal - select folder', | |
| 785 | - saveModalSelectConnect: 'Save to Modal - connect', | |
| 786 | - saveModalSelectUpgrade: 'Save to Modal - upgrade', | |
| 787 | - importModal: 'Import Modal', | |
| 788 | - newFolderModal: 'New Folder Modal', | |
| 789 | - deleteDialog: 'Delete Dialog', | |
| 790 | - deleteFolderDialog: 'Delete Folder Dialog', | |
| 791 | - renameDialog: 'Rename Dialog', | |
| 792 | - createFolderDialog: 'Create Folder Dialog', | |
| 793 | - applySettingsDialog: 'Apply Settings Dialog', | |
| 794 | - cloudTab: 'Cloud Tab', | |
| 795 | - siteTab: 'Site Tab', | |
| 796 | - cloudTabFolder: 'Cloud Tab - Folder', | |
| 797 | - cloudTabConnect: 'Cloud Tab - Connect', | |
| 798 | - cloudTabUpgrade: 'Cloud Tab - Upgrade', | |
| 799 | - morePopup: 'Context Menu', | |
| 800 | - quotaBar: 'Quota Bar' | |
| 801 | - }, | |
| 802 | - kitLibrary: { | |
| 803 | - cloudKitLibrary: 'kits_cloud_library', | |
| 804 | - cloudKitLibraryConnect: 'kits_cloud_library_connect', | |
| 805 | - cloudKitLibraryUpgrade: 'kits_cloud_library_upgrade', | |
| 806 | - kitExportCustomization: 'kit_export_customization', | |
| 807 | - kitExport: 'kit_export', | |
| 808 | - kitExportCustomizationEdit: 'kit_export_customization_edit', | |
| 809 | - kitExportSummary: 'kit_export_summary', | |
| 810 | - kitImportUploadBox: 'kit_import_upload_box', | |
| 811 | - kitImportCustomization: 'kit_import_customization', | |
| 812 | - kitImportSummary: 'kit_import_summary' | |
| 813 | - }, | |
| 814 | - variablesPopover: 'Variables Popover', | |
| 815 | - admin: { | |
| 816 | - pluginToolsTab: 'plugin_tools_tab', | |
| 817 | - pluginWebsiteTemplatesTab: 'plugin_website_templates_tab' | |
| 818 | - }, | |
| 819 | - componentsTab: 'Components Tab', | |
| 820 | - canvasElement: 'Canvas Element', | |
| 821 | - publishDropdown: 'Publish Dropdown', | |
| 822 | - pageListDropdown: 'Page List Dropdown', | |
| 823 | - emptyBox: 'Empty Box', | |
| 824 | - searchBar: 'Search Bar', | |
| 825 | - finderResults: 'Finder Results', | |
| 826 | - libraryTabs: 'Library Tabs', | |
| 827 | - assetCard: 'Asset Card' | |
| 828 | - }, | |
| 829 | - elements: { | |
| 830 | - accordionSection: 'Accordion section', | |
| 831 | - buttonIcon: 'Button Icon', | |
| 832 | - mainCta: 'Main CTA', | |
| 833 | - button: 'Button', | |
| 834 | - link: 'Link', | |
| 835 | - dropdown: 'Dropdown', | |
| 836 | - toggle: 'Toggle', | |
| 837 | - launchpadChecklist: 'Checklist popup' | |
| 838 | - }, | |
| 839 | - names: { | |
| 840 | - v1: { | |
| 841 | - layout: 'v1_widgets_tab_layout_section', | |
| 842 | - basic: 'v1_widgets_tab_basic_section', | |
| 843 | - 'pro-elements': 'v1_widgets_tab_pro_section', | |
| 844 | - general: 'v1_widgets_tab_general_section', | |
| 845 | - 'theme-elements': 'v1_widgets_tab_site_section', | |
| 846 | - 'theme-elements-single': 'v1_widgets_tab_single_section', | |
| 847 | - 'woocommerce-elements': 'v1_widgets_tab_woocommerce_section', | |
| 848 | - wordpress: 'v1_widgets_tab_wordpress_section', | |
| 849 | - categories: 'v1_widgets_tab', | |
| 850 | - global: 'v1_globals_tab' | |
| 851 | - }, | |
| 852 | - topBar: { | |
| 853 | - whatsNew: 'top_bar_whats_new', | |
| 854 | - documentSettings: 'top_bar_document_settings_icon', | |
| 855 | - previewPage: 'top_bar_preview_page', | |
| 856 | - publishButton: 'top_bar_publish_button', | |
| 857 | - widgetPanel: 'top_bar_widget_panel_icon', | |
| 858 | - finder: 'top_bar_finder', | |
| 859 | - help: 'top_bar_help', | |
| 860 | - history: 'top_bar_elementor_logo_dropdown_history', | |
| 861 | - userPreferences: 'top_bar_elementor_logo_dropdown_user_preferences', | |
| 862 | - keyboardShortcuts: 'top_bar_elementor_logo_dropdown_keyboard_shortcuts', | |
| 863 | - exitToWordpress: 'top_bar_elementor_logo_dropdown_exit_to_wordpress', | |
| 864 | - themeBuilder: 'top_bar_elementor_logo_dropdown_theme_builder', | |
| 865 | - notes: 'top_bar_notes', | |
| 866 | - siteSettings: 'top_bar_site_setting', | |
| 867 | - structure: 'top_bar_structure', | |
| 868 | - documentNameDropdown: 'top_bar_document_name_dropdown', | |
| 869 | - responsiveControls: 'top_bar_responsive_controls', | |
| 870 | - launchpadOn: 'top_bar_checklist_icon_show', | |
| 871 | - launchpadOff: 'top_bar_checklist_icon_hide', | |
| 872 | - elementorLogoDropdown: 'open_e_menu', | |
| 873 | - connectAccount: 'connect_account', | |
| 874 | - accountConnected: 'account_connected' | |
| 875 | - }, | |
| 876 | - // ChecklistSteps event names are generated dynamically, based on stepId and action type taken: title, action, done, undone, upgrade | |
| 877 | - elementorEditor: { | |
| 878 | - editorLoaded: 'editor_loaded', | |
| 879 | - checklist: { | |
| 880 | - checklistHeaderClose: 'checklist_header_close_icon', | |
| 881 | - checklistFirstPopup: 'checklist popup triggered' | |
| 882 | - }, | |
| 883 | - userPreferences: { | |
| 884 | - checklistShow: 'checklist_userpreferences_toggle_show', | |
| 885 | - checklistHide: 'checklist_userpreferences_toggle_hide' | |
| 886 | - } | |
| 887 | - }, | |
| 888 | - variables: { | |
| 889 | - open: 'open_variables_popover', | |
| 890 | - add: 'add_new_variable', | |
| 891 | - connect: 'connect_variable', | |
| 892 | - save: 'save_new_variable', | |
| 893 | - openManager: 'open_variables_manager', | |
| 894 | - saveChanges: 'save_variables_changes', | |
| 895 | - delete: 'delete_variable', | |
| 896 | - variableSyncToV3: 'variable_sync_to_v3' | |
| 897 | - }, | |
| 898 | - design_system: { | |
| 899 | - importOpened: 'design_system_import_opened', | |
| 900 | - fileSelected: 'design_system_file_selected', | |
| 901 | - validationFailed: 'design_system_validation_failed', | |
| 902 | - conflictChoice: 'design_system_conflict_choice', | |
| 903 | - confirmed: 'design_system_import_confirmed', | |
| 904 | - imported: 'design_system_imported', | |
| 905 | - importFailed: 'design_system_import_failed' | |
| 906 | - }, | |
| 907 | - components: { | |
| 908 | - createClicked: 'component_create_clicked', | |
| 909 | - createCancelled: 'component_creation_cancelled', | |
| 910 | - created: 'component_created', | |
| 911 | - instanceAdded: 'component_instance_added', | |
| 912 | - edited: 'component_edited', | |
| 913 | - propertiesPanelOpened: 'component_properties_panel_opened', | |
| 914 | - propertiesGroupCreated: 'component_properties_group_created', | |
| 915 | - propertyExposed: 'component_property_exposed', | |
| 916 | - propertyRemoved: 'component_property_removed', | |
| 917 | - detached: 'component_detached' | |
| 918 | - }, | |
| 919 | - global_classes: { | |
| 920 | - classApplied: 'class_applied', | |
| 921 | - classRemoved: 'class_removed', | |
| 922 | - classManagerFilterCleared: 'class_manager_filter_cleared', | |
| 923 | - classDeleted: 'class_deleted', | |
| 924 | - classPublishConflict: 'class_publish_conflict', | |
| 925 | - classRenamed: 'class_renamed', | |
| 926 | - classCreated: 'class_created', | |
| 927 | - classManagerSearched: 'class_manager_searched', | |
| 928 | - classManagerFiltersOpened: 'class_manager_filters_opened', | |
| 929 | - classManagerOpened: 'class_manager_opened', | |
| 930 | - classManagerReorder: 'class_manager_reorder', | |
| 931 | - classManagerFilterUsed: 'class_manager_filter_used', | |
| 932 | - classUsageLocate: 'class_usage_locate', | |
| 933 | - classUsageHovered: 'class_usage_hovered', | |
| 934 | - classStyled: 'class_styled', | |
| 935 | - classStateClicked: 'class_state_clicked', | |
| 936 | - classUsageClicked: 'class_usage_clicked', | |
| 937 | - classDuplicate: 'class_duplicate', | |
| 938 | - classSyncToV3PopupShown: 'class_sync_to_v3_popup_shown', | |
| 939 | - classSyncToV3: 'class_sync_to_v3', | |
| 940 | - classSyncToV3PopupClick: 'class_sync_to_v3_popup_click' | |
| 941 | - }, | |
| 942 | - editorOne: { | |
| 943 | - topBarPublishDropdown: 'top_bar_publish_dropdown', | |
| 944 | - topBarPageList: 'top_bar_page_list', | |
| 945 | - siteSettingsSession: 'site_settings_session', | |
| 946 | - eLibraryNav: 'e_library_nav', | |
| 947 | - eLibraryInsert: 'e_library_insert', | |
| 948 | - eLibraryFavorite: 'e_library_favorite', | |
| 949 | - eLibraryGenerateAi: 'e_library_generate_ai', | |
| 950 | - finderSearchInput: 'finder_search_input', | |
| 951 | - finderResultSelect: 'finder_result_select', | |
| 952 | - canvasEmptyBoxAction: 'canvas_empty_box_action', | |
| 953 | - widgetPanelSearch: 'widget_panel_search' | |
| 954 | - }, | |
| 955 | - interactions: { | |
| 956 | - created: 'interactions_created' | |
| 957 | - }, | |
| 958 | - promotions: { | |
| 959 | - viewPromotion: 'view_promotion', | |
| 960 | - upgradePromotionClick: 'upgrade_promotion_click' | |
| 961 | - } | |
| 962 | - } | |
| 963 | -}; | |
| 964 | -var _default = exports["default"] = eventsConfig; | |
| 974 | +//#endregion | |
| 975 | +//#region node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js | |
| 976 | + function _wrapNativeSuper(t) { | |
| 977 | + var r = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0; | |
| 978 | + return _wrapNativeSuper = function _wrapNativeSuper(t) { | |
| 979 | + if (null === t || !_isNativeFunction(t)) return t; | |
| 980 | + if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); | |
| 981 | + if (void 0 !== r) { | |
| 982 | + if (r.has(t)) return r.get(t); | |
| 983 | + r.set(t, Wrapper); | |
| 984 | + } | |
| 985 | + function Wrapper() { | |
| 986 | + return _construct(t, arguments, _getPrototypeOf(this).constructor); | |
| 987 | + } | |
| 988 | + return Wrapper.prototype = Object.create(t.prototype, { constructor: { | |
| 989 | + value: Wrapper, | |
| 990 | + enumerable: !1, | |
| 991 | + writable: !0, | |
| 992 | + configurable: !0 | |
| 993 | + } }), _setPrototypeOf(Wrapper, t); | |
| 994 | + }, _wrapNativeSuper(t); | |
| 995 | + } | |
| 965 | 996 | |
| 966 | -/***/ }), | |
| 997 | +//#endregion | |
| 998 | +//#region app/modules/import-export-customization/assets/js/shared/error/import-export-error.js | |
| 999 | + function _callSuper(t, o, e) { | |
| 1000 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1001 | + } | |
| 1002 | + function _isNativeReflectConstruct() { | |
| 1003 | + try { | |
| 1004 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1005 | + } catch (t) {} | |
| 1006 | + return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 1007 | + return !!t; | |
| 1008 | + })(); | |
| 1009 | + } | |
| 1010 | + var ImportExportError = /*#__PURE__*/ function(_Error) { | |
| 1011 | + function ImportExportError(errorMessage, errorCode) { | |
| 1012 | + var _this; | |
| 1013 | + _classCallCheck(this, ImportExportError); | |
| 1014 | + _this = _callSuper(this, ImportExportError, ["string" === typeof errorMessage ? errorMessage : ""]); | |
| 1015 | + _this.code = errorCode || "general"; | |
| 1016 | + _this.details = errorMessage; | |
| 1017 | + return _this; | |
| 1018 | + } | |
| 1019 | + _inherits(ImportExportError, _Error); | |
| 1020 | + return _createClass(ImportExportError); | |
| 1021 | + }(/*#__PURE__*/ _wrapNativeSuper(Error)); | |
| 967 | 1022 | |
| 968 | -/***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js": | |
| 969 | -/*!***************************************************************!*\ | |
| 970 | - !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***! | |
| 971 | - \***************************************************************/ | |
| 972 | -/***/ ((module) => { | |
| 1023 | +//#endregion | |
| 1024 | +//#region app/modules/import-export-customization/assets/js/shared/utils/api-fetch-config.js | |
| 1025 | + var isApiConfigured = false; | |
| 1026 | + function configureApiFetch() { | |
| 1027 | + var _window$elementorAppC; | |
| 1028 | + if (isApiConfigured) return; | |
| 1029 | + var config = (_window$elementorAppC = window.elementorAppConfig) === null || _window$elementorAppC === void 0 ? void 0 : _window$elementorAppC["import-export-customization"]; | |
| 1030 | + if (!config) throw new ImportExportError("Configuration not found. Please refresh the page.", "config_missing"); | |
| 1031 | + if (config.restNonce) _wordpress_api_fetch.default.use(_wordpress_api_fetch.default.createNonceMiddleware(config.restNonce)); | |
| 1032 | + if (config.restUrl) _wordpress_api_fetch.default.use(_wordpress_api_fetch.default.createRootURLMiddleware(config.restUrl)); | |
| 1033 | + isApiConfigured = true; | |
| 1034 | + } | |
| 973 | 1035 | |
| 974 | -function _OverloadYield(e, d) { | |
| 975 | - this.v = e, this.k = d; | |
| 976 | -} | |
| 977 | -module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1036 | +//#endregion | |
| 1037 | +//#region app/modules/import-export-customization/assets/js/shared/utils/api-request.js | |
| 1038 | + var HTTP_STATUS = { REQUEST_TIMEOUT: 408 }; | |
| 1039 | + var HTTP_METHODS = { CREATABLE: "POST" }; | |
| 1040 | + function apiRequest(_x) { | |
| 1041 | + return _apiRequest.apply(this, arguments); | |
| 1042 | + } | |
| 1043 | + function _apiRequest() { | |
| 1044 | + _apiRequest = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee(_ref) { | |
| 1045 | + var _ref$data; | |
| 1046 | + var data; | |
| 1047 | + var path; | |
| 1048 | + var _ref$method; | |
| 1049 | + var method; | |
| 1050 | + var requestOptions; | |
| 1051 | + var _t; | |
| 1052 | + return import_regenerator.default.wrap(function(_context) { | |
| 1053 | + while (1) switch (_context.prev = _context.next) { | |
| 1054 | + case 0: | |
| 1055 | + _ref$data = _ref.data, data = _ref$data === void 0 ? null : _ref$data, path = _ref.path, _ref$method = _ref.method, method = _ref$method === void 0 ? HTTP_METHODS.CREATABLE : _ref$method; | |
| 1056 | + configureApiFetch(); | |
| 1057 | + _context.prev = 1; | |
| 1058 | + requestOptions = { | |
| 1059 | + path: "/elementor/v1/import-export-customization/".concat(path), | |
| 1060 | + method | |
| 1061 | + }; | |
| 1062 | + if (data && HTTP_METHODS.CREATABLE === method) requestOptions.data = data; | |
| 1063 | + _context.next = 2; | |
| 1064 | + return (0, _wordpress_api_fetch.default)(requestOptions); | |
| 1065 | + case 2: return _context.abrupt("return", _context.sent); | |
| 1066 | + case 3: | |
| 1067 | + _context.prev = 3; | |
| 1068 | + _t = _context["catch"](1); | |
| 1069 | + handleApiFetchError(_t); | |
| 1070 | + case 4: | |
| 1071 | + case "end": return _context.stop(); | |
| 1072 | + } | |
| 1073 | + }, _callee, null, [[1, 3]]); | |
| 1074 | + })); | |
| 1075 | + return _apiRequest.apply(this, arguments); | |
| 1076 | + } | |
| 1077 | + function handleApiFetchError(error) { | |
| 1078 | + var errorMessage = (error === null || error === void 0 ? void 0 : error.message) || "An unknown error occurred"; | |
| 1079 | + var errorCode = "general"; | |
| 1080 | + if (error !== null && error !== void 0 && error.code) errorCode = error.code; | |
| 1081 | + else if (error !== null && error !== void 0 && error.status) errorCode = HTTP_STATUS.REQUEST_TIMEOUT === error.status ? "timeout" : error.status; | |
| 1082 | + throw new ImportExportError(errorMessage, errorCode); | |
| 1083 | + } | |
| 978 | 1084 | |
| 979 | -/***/ }), | |
| 1085 | +//#endregion | |
| 1086 | +//#region app/modules/import-export-customization/assets/js/shared/revert-kit-handler.js | |
| 1087 | + var RevertKitHandler = /*#__PURE__*/ function() { | |
| 1088 | + function RevertKitHandler() { | |
| 1089 | + var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 1090 | + var revertButton = _ref.revertButton; | |
| 1091 | + var onError = _ref.onError; | |
| 1092 | + _classCallCheck(this, RevertKitHandler); | |
| 1093 | + this.revertButton = revertButton; | |
| 1094 | + this.onError = onError || this.defaultErrorHandler.bind(this); | |
| 1095 | + } | |
| 1096 | + return _createClass(RevertKitHandler, [ | |
| 1097 | + { | |
| 1098 | + key: "revertKit", | |
| 1099 | + value: function() { | |
| 1100 | + var _revertKit = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() { | |
| 1101 | + var activeKitName; | |
| 1102 | + var confirmed; | |
| 1103 | + var referrerKitId; | |
| 1104 | + var returnTo; | |
| 1105 | + var noAutomaticRedirect; | |
| 1106 | + var _yield$this$callRever; | |
| 1107 | + var data; | |
| 1108 | + var _t; | |
| 1109 | + return import_regenerator.default.wrap(function(_context) { | |
| 1110 | + while (1) switch (_context.prev = _context.next) { | |
| 1111 | + case 0: | |
| 1112 | + activeKitName = this.getActiveKitName(); | |
| 1113 | + _context.next = 1; | |
| 1114 | + return this.showConfirmationDialog(activeKitName); | |
| 1115 | + case 1: | |
| 1116 | + confirmed = _context.sent; | |
| 1117 | + if (confirmed) { | |
| 1118 | + _context.next = 2; | |
| 1119 | + break; | |
| 1120 | + } | |
| 1121 | + return _context.abrupt("return"); | |
| 1122 | + case 2: | |
| 1123 | + _context.prev = 2; | |
| 1124 | + referrerKitId = this.getReferrerKitId(); | |
| 1125 | + returnTo = this.getReturnTo(); | |
| 1126 | + noAutomaticRedirect = this.getNoAutomaticRedirect(); | |
| 1127 | + this.saveToCache(referrerKitId, activeKitName, returnTo, noAutomaticRedirect); | |
| 1128 | + _context.next = 3; | |
| 1129 | + return this.callRevertAPI(); | |
| 1130 | + case 3: | |
| 1131 | + _yield$this$callRever = _context.sent; | |
| 1132 | + data = _yield$this$callRever.data; | |
| 1133 | + this.handleRevertResponse(data); | |
| 1134 | + _context.next = 5; | |
| 1135 | + break; | |
| 1136 | + case 4: | |
| 1137 | + _context.prev = 4; | |
| 1138 | + _t = _context["catch"](2); | |
| 1139 | + this.onError(_t); | |
| 1140 | + case 5: | |
| 1141 | + case "end": return _context.stop(); | |
| 1142 | + } | |
| 1143 | + }, _callee, this, [[2, 4]]); | |
| 1144 | + })); | |
| 1145 | + function revertKit() { | |
| 1146 | + return _revertKit.apply(this, arguments); | |
| 1147 | + } | |
| 1148 | + return revertKit; | |
| 1149 | + }() | |
| 1150 | + }, | |
| 1151 | + { | |
| 1152 | + key: "callRevertAPI", | |
| 1153 | + value: function() { | |
| 1154 | + var _callRevertAPI = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee2() { | |
| 1155 | + var result; | |
| 1156 | + return import_regenerator.default.wrap(function(_context2) { | |
| 1157 | + while (1) switch (_context2.prev = _context2.next) { | |
| 1158 | + case 0: | |
| 1159 | + _context2.next = 1; | |
| 1160 | + return apiRequest({ path: RevertKitHandler.API_PATH }); | |
| 1161 | + case 1: | |
| 1162 | + result = _context2.sent; | |
| 1163 | + return _context2.abrupt("return", result); | |
| 1164 | + case 2: | |
| 1165 | + case "end": return _context2.stop(); | |
| 1166 | + } | |
| 1167 | + }, _callee2); | |
| 1168 | + })); | |
| 1169 | + function callRevertAPI() { | |
| 1170 | + return _callRevertAPI.apply(this, arguments); | |
| 1171 | + } | |
| 1172 | + return callRevertAPI; | |
| 1173 | + }() | |
| 1174 | + }, | |
| 1175 | + { | |
| 1176 | + key: "handleRevertResponse", | |
| 1177 | + value: function handleRevertResponse(data) { | |
| 1178 | + if (!data.revert_completed) { | |
| 1179 | + this.handleRevertNoSessions(data); | |
| 1180 | + return; | |
| 1181 | + } | |
| 1182 | + this.showRevertCompletedDialog(data); | |
| 1183 | + } | |
| 1184 | + }, | |
| 1185 | + { | |
| 1186 | + key: "showRevertCompletedDialog", | |
| 1187 | + value: function showRevertCompletedDialog() { | |
| 1188 | + var referrerKitId = this.getReferrerKitId(); | |
| 1189 | + if (referrerKitId) { | |
| 1190 | + this.showReferrerKitDialog(referrerKitId); | |
| 1191 | + return; | |
| 1192 | + } | |
| 1193 | + this.showRevertSuccessDialog(); | |
| 1194 | + } | |
| 1195 | + }, | |
| 1196 | + { | |
| 1197 | + key: "handleRevertNoSessions", | |
| 1198 | + value: function handleRevertNoSessions(responseData) { | |
| 1199 | + elementorCommon.dialogsManager.createWidget("alert", { message: responseData.message || (0, _wordpress_i18n.__)("No import sessions available to revert.", "elementor") }).show(); | |
| 1200 | + } | |
| 1201 | + }, | |
| 1202 | + { | |
| 1203 | + key: "showConfirmationDialog", | |
| 1204 | + value: function() { | |
| 1205 | + var _showConfirmationDialog = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee3(activeKitName) { | |
| 1206 | + return import_regenerator.default.wrap(function(_context3) { | |
| 1207 | + while (1) switch (_context3.prev = _context3.next) { | |
| 1208 | + case 0: return _context3.abrupt("return", new Promise(function(resolve) { | |
| 1209 | + elementorCommon.dialogsManager.createWidget("confirm", { | |
| 1210 | + headerMessage: (0, _wordpress_i18n.__)("Are you sure?", "elementor"), | |
| 1211 | + message: (0, _wordpress_i18n.__)("Removing %s will permanently delete changes made to the Website Template's content and site settings", "elementor").replace("%s", activeKitName), | |
| 1212 | + strings: { | |
| 1213 | + confirm: (0, _wordpress_i18n.__)("Delete", "elementor"), | |
| 1214 | + cancel: (0, _wordpress_i18n.__)("Cancel", "elementor") | |
| 1215 | + }, | |
| 1216 | + onConfirm: function onConfirm() { | |
| 1217 | + return resolve(true); | |
| 1218 | + }, | |
| 1219 | + onCancel: function onCancel() { | |
| 1220 | + return resolve(false); | |
| 1221 | + } | |
| 1222 | + }).show(); | |
| 1223 | + })); | |
| 1224 | + case 1: | |
| 1225 | + case "end": return _context3.stop(); | |
| 1226 | + } | |
| 1227 | + }, _callee3); | |
| 1228 | + })); | |
| 1229 | + function showConfirmationDialog(_x) { | |
| 1230 | + return _showConfirmationDialog.apply(this, arguments); | |
| 1231 | + } | |
| 1232 | + return showConfirmationDialog; | |
| 1233 | + }() | |
| 1234 | + }, | |
| 1235 | + { | |
| 1236 | + key: "createSuccessHeaderMessage", | |
| 1237 | + value: function createSuccessHeaderMessage() { | |
| 1238 | + var activeKitName = this.getDataFromCache().activeKitName; | |
| 1239 | + return (0, _wordpress_i18n.__)("%s was successfully deleted", "elementor").replace("%s", activeKitName); | |
| 1240 | + } | |
| 1241 | + }, | |
| 1242 | + { | |
| 1243 | + key: "showRevertSuccessDialog", | |
| 1244 | + value: function showRevertSuccessDialog() { | |
| 1245 | + elementorCommon.dialogsManager.createWidget("confirm", { | |
| 1246 | + id: RevertKitHandler.DIALOG_ID, | |
| 1247 | + headerMessage: this.createSuccessHeaderMessage(), | |
| 1248 | + message: (0, _wordpress_i18n.__)("Try a different Website Template or build your site from scratch.", "elementor"), | |
| 1249 | + strings: { | |
| 1250 | + confirm: (0, _wordpress_i18n.__)("OK", "elementor"), | |
| 1251 | + cancel: (0, _wordpress_i18n.__)("Library", "elementor") | |
| 1252 | + }, | |
| 1253 | + onConfirm: function onConfirm() { | |
| 1254 | + location.reload(); | |
| 1255 | + }, | |
| 1256 | + onCancel: function onCancel() { | |
| 1257 | + location.href = elementorImportExport.appUrl; | |
| 1258 | + } | |
| 1259 | + }).show(); | |
| 1260 | + this.clearCache(); | |
| 1261 | + } | |
| 1262 | + }, | |
| 1263 | + { | |
| 1264 | + key: "showReferrerKitDialog", | |
| 1265 | + value: function showReferrerKitDialog(referrerKitId) { | |
| 1266 | + var _this = this; | |
| 1267 | + var _this$getDataFromCach2 = this.getDataFromCache(); | |
| 1268 | + var returnTo = _this$getDataFromCach2.returnTo; | |
| 1269 | + var noAutomaticRedirect = _this$getDataFromCach2.noAutomaticRedirect; | |
| 1270 | + elementorCommon.dialogsManager.createWidget("confirm", { | |
| 1271 | + id: RevertKitHandler.DIALOG_ID, | |
| 1272 | + headerMessage: this.createSuccessHeaderMessage(), | |
| 1273 | + message: (0, _wordpress_i18n.__)("You're ready to apply a new Kit!", "elementor"), | |
| 1274 | + strings: { | |
| 1275 | + confirm: (0, _wordpress_i18n.__)("Continue to new Kit", "elementor"), | |
| 1276 | + cancel: (0, _wordpress_i18n.__)("Close", "elementor") | |
| 1277 | + }, | |
| 1278 | + onConfirm: function onConfirm() { | |
| 1279 | + location.href = _this.buildPreviewUrl(referrerKitId, returnTo, noAutomaticRedirect); | |
| 1280 | + }, | |
| 1281 | + onCancel: function onCancel() { | |
| 1282 | + location.reload(); | |
| 1283 | + } | |
| 1284 | + }).show(); | |
| 1285 | + this.clearCache(); | |
| 1286 | + } | |
| 1287 | + }, | |
| 1288 | + { | |
| 1289 | + key: "buildPreviewUrl", | |
| 1290 | + value: function buildPreviewUrl(referrerKitId, returnTo, noAutomaticRedirect) { | |
| 1291 | + var baseUrl = elementorImportExport.appUrl + "/preview/" + referrerKitId; | |
| 1292 | + var url = new URL(baseUrl); | |
| 1293 | + if (returnTo) url.searchParams.append(RevertKitHandler.URL_PARAM_RETURN_TO, returnTo); | |
| 1294 | + if (noAutomaticRedirect) url.searchParams.append(RevertKitHandler.URL_PARAM_NO_AUTOMATIC_REDIRECT, noAutomaticRedirect); | |
| 1295 | + return url.toString(); | |
| 1296 | + } | |
| 1297 | + }, | |
| 1298 | + { | |
| 1299 | + key: "maybeShowReferrerKitDialog", | |
| 1300 | + value: function maybeShowReferrerKitDialog() { | |
| 1301 | + var referrerKitId = this.getDataFromCache().referrerKitId; | |
| 1302 | + if (void 0 === referrerKitId) return; | |
| 1303 | + if (0 === referrerKitId.length) { | |
| 1304 | + this.showRevertSuccessDialog(); | |
| 1305 | + return; | |
| 1306 | + } | |
| 1307 | + this.showReferrerKitDialog(referrerKitId); | |
| 1308 | + } | |
| 1309 | + }, | |
| 1310 | + { | |
| 1311 | + key: "getActiveKitName", | |
| 1312 | + value: function getActiveKitName() { | |
| 1313 | + var lastKit = elementorImportExport.lastImportedSession; | |
| 1314 | + if (lastKit.kit_title) return lastKit.kit_title; | |
| 1315 | + if (lastKit.kit_name) return this.convertNameToTitle(lastKit.kit_name); | |
| 1316 | + return (0, _wordpress_i18n.__)("Your Kit", "elementor"); | |
| 1317 | + } | |
| 1318 | + }, | |
| 1319 | + { | |
| 1320 | + key: "convertNameToTitle", | |
| 1321 | + value: function convertNameToTitle(name) { | |
| 1322 | + var words = name.split(RevertKitHandler.NAME_SEPARATOR_PATTERN).filter(function(word) { | |
| 1323 | + return word.length > 0; | |
| 1324 | + }); | |
| 1325 | + if (0 === words.length) return (0, _wordpress_i18n.__)("Your Kit", "elementor"); | |
| 1326 | + return words.map(function(word) { | |
| 1327 | + return word[0].toUpperCase() + word.substring(1); | |
| 1328 | + }).join(" "); | |
| 1329 | + } | |
| 1330 | + }, | |
| 1331 | + { | |
| 1332 | + key: "getReferrerKitId", | |
| 1333 | + value: function getReferrerKitId() { | |
| 1334 | + var pageReferrerKit = new URLSearchParams(window.location.search).get(RevertKitHandler.URL_PARAM_REFERRER_KIT); | |
| 1335 | + if (pageReferrerKit) return pageReferrerKit; | |
| 1336 | + if (!this.revertButton) return ""; | |
| 1337 | + return new URL(this.revertButton.href).searchParams.get(RevertKitHandler.URL_PARAM_REFERRER_KIT) || ""; | |
| 1338 | + } | |
| 1339 | + }, | |
| 1340 | + { | |
| 1341 | + key: "getReturnTo", | |
| 1342 | + value: function getReturnTo() { | |
| 1343 | + return new URLSearchParams(window.location.search).get(RevertKitHandler.URL_PARAM_RETURN_TO) || ""; | |
| 1344 | + } | |
| 1345 | + }, | |
| 1346 | + { | |
| 1347 | + key: "getNoAutomaticRedirect", | |
| 1348 | + value: function getNoAutomaticRedirect() { | |
| 1349 | + return new URLSearchParams(window.location.search).get(RevertKitHandler.URL_PARAM_NO_AUTOMATIC_REDIRECT) || ""; | |
| 1350 | + } | |
| 1351 | + }, | |
| 1352 | + { | |
| 1353 | + key: "saveToCache", | |
| 1354 | + value: function saveToCache(referrerKitId, activeKitName, returnTo, noAutomaticRedirect) { | |
| 1355 | + sessionStorage.setItem(RevertKitHandler.KIT_DATA_KEY, JSON.stringify({ | |
| 1356 | + referrerKitId: referrerKitId || "", | |
| 1357 | + activeKitName: activeKitName || "", | |
| 1358 | + returnTo: returnTo || "", | |
| 1359 | + noAutomaticRedirect: noAutomaticRedirect || "" | |
| 1360 | + })); | |
| 1361 | + } | |
| 1362 | + }, | |
| 1363 | + { | |
| 1364 | + key: "getDataFromCache", | |
| 1365 | + value: function getDataFromCache() { | |
| 1366 | + try { | |
| 1367 | + return JSON.parse(sessionStorage.getItem(RevertKitHandler.KIT_DATA_KEY)) || {}; | |
| 1368 | + } catch (e) { | |
| 1369 | + return {}; | |
| 1370 | + } | |
| 1371 | + } | |
| 1372 | + }, | |
| 1373 | + { | |
| 1374 | + key: "clearCache", | |
| 1375 | + value: function clearCache() { | |
| 1376 | + sessionStorage.removeItem(RevertKitHandler.KIT_DATA_KEY); | |
| 1377 | + } | |
| 1378 | + }, | |
| 1379 | + { | |
| 1380 | + key: "defaultErrorHandler", | |
| 1381 | + value: function defaultErrorHandler() { | |
| 1382 | + elementorCommon.dialogsManager.createWidget("alert", { message: (0, _wordpress_i18n.__)("An error occurred while reverting the kit. Please try again.", "elementor") }).show(); | |
| 1383 | + } | |
| 1384 | + } | |
| 1385 | + ]); | |
| 1386 | + }(); | |
| 1387 | + _defineProperty(RevertKitHandler, "API_PATH", "revert"); | |
| 1388 | + _defineProperty(RevertKitHandler, "DIALOG_ID", "e-revert-kit-deleted-dialog"); | |
| 1389 | + _defineProperty(RevertKitHandler, "URL_PARAM_REFERRER_KIT", "referrer_kit"); | |
| 1390 | + _defineProperty(RevertKitHandler, "URL_PARAM_RETURN_TO", "return_to"); | |
| 1391 | + _defineProperty(RevertKitHandler, "URL_PARAM_NO_AUTOMATIC_REDIRECT", "no_automatic_redirect"); | |
| 1392 | + _defineProperty(RevertKitHandler, "KIT_DATA_KEY", "elementor-kit-data"); | |
| 1393 | + _defineProperty(RevertKitHandler, "NAME_SEPARATOR_PATTERN", /[-_]+/); | |
| 980 | 1394 | |
| 981 | -/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 982 | -/*!***********************************************************************!*\ | |
| 983 | - !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 984 | - \***********************************************************************/ | |
| 985 | -/***/ ((module) => { | |
| 1395 | +//#endregion | |
| 1396 | +//#region app/modules/import-export-customization/assets/js/admin.js | |
| 1397 | + var Admin = /*#__PURE__*/ function() { | |
| 1398 | + function Admin() { | |
| 1399 | + var _this = this; | |
| 1400 | + _classCallCheck(this, Admin); | |
| 1401 | + if ("elementor-tools" === new URLSearchParams(window.location.search).get("page")) { | |
| 1402 | + this.sendPageToolsViewedEvent(); | |
| 1403 | + elementorAdmin.elements.$settingsTabs.on("focus", function() { | |
| 1404 | + var location = window.location.hash.slice(1); | |
| 1405 | + _this.maybeSendImportExportLocationEvent(location); | |
| 1406 | + }); | |
| 1407 | + this.maybeSendImportExportLocationEvent(window.location.hash.slice(1)); | |
| 1408 | + } | |
| 1409 | + this.revertButton = document.getElementById("elementor-import-export__revert_kit"); | |
| 1410 | + this.importFroLibraryButton = document.getElementById("elementor-import-export__import_from_library"); | |
| 1411 | + this.importButton = document.getElementById("elementor-import-export__import"); | |
| 1412 | + this.exportButton = document.getElementById("elementor-import-export__export"); | |
| 1413 | + this.initializeRevertHandler(); | |
| 1414 | + this.bindEventListeners(); | |
| 1415 | + } | |
| 1416 | + return _createClass(Admin, [ | |
| 1417 | + { | |
| 1418 | + key: "initializeRevertHandler", | |
| 1419 | + value: function initializeRevertHandler() { | |
| 1420 | + if (this.revertButton) { | |
| 1421 | + this.revertHandler = new RevertKitHandler({ revertButton: this.revertButton }); | |
| 1422 | + this.revertHandler.maybeShowReferrerKitDialog(); | |
| 1423 | + } | |
| 1424 | + } | |
| 1425 | + }, | |
| 1426 | + { | |
| 1427 | + key: "bindEventListeners", | |
| 1428 | + value: function bindEventListeners() { | |
| 1429 | + if (this.revertButton) this.revertButton.addEventListener("click", this.onRevertButtonClick.bind(this)); | |
| 1430 | + if (this.importFroLibraryButton) this.importFroLibraryButton.addEventListener("click", this.onImportFromLibraryButtonClick.bind(this)); | |
| 1431 | + if (this.importButton) this.importButton.addEventListener("click", this.onImportButtonClick.bind(this)); | |
| 1432 | + if (this.exportButton) this.exportButton.addEventListener("click", this.onExportButtonClick.bind(this)); | |
| 1433 | + } | |
| 1434 | + }, | |
| 1435 | + { | |
| 1436 | + key: "sendPageToolsViewedEvent", | |
| 1437 | + value: function sendPageToolsViewedEvent() { | |
| 1438 | + AppsEventTracking.sendPageViewsWebsiteTemplates(elementorCommon.eventsManager.config.secondaryLocations.admin.pluginToolsTab); | |
| 1439 | + } | |
| 1440 | + }, | |
| 1441 | + { | |
| 1442 | + key: "maybeSendImportExportLocationEvent", | |
| 1443 | + value: function maybeSendImportExportLocationEvent(location) { | |
| 1444 | + if ("tab-import-export-kit" === location) AppsEventTracking.sendPageViewsWebsiteTemplates(elementorCommon.eventsManager.config.secondaryLocations.admin.pluginWebsiteTemplatesTab); | |
| 1445 | + } | |
| 1446 | + }, | |
| 1447 | + { | |
| 1448 | + key: "onRevertButtonClick", | |
| 1449 | + value: function onRevertButtonClick(event) { | |
| 1450 | + var _this$revertHandler; | |
| 1451 | + event.preventDefault(); | |
| 1452 | + AppsEventTracking.sendImportExportAdminAction("Revert"); | |
| 1453 | + (_this$revertHandler = this.revertHandler) === null || _this$revertHandler === void 0 || _this$revertHandler.revertKit(); | |
| 1454 | + } | |
| 1455 | + }, | |
| 1456 | + { | |
| 1457 | + key: "onExportButtonClick", | |
| 1458 | + value: function onExportButtonClick() { | |
| 1459 | + AppsEventTracking.sendImportExportAdminAction("Export"); | |
| 1460 | + } | |
| 1461 | + }, | |
| 1462 | + { | |
| 1463 | + key: "onImportButtonClick", | |
| 1464 | + value: function onImportButtonClick() { | |
| 1465 | + AppsEventTracking.sendImportExportAdminAction("Import"); | |
| 1466 | + } | |
| 1467 | + }, | |
| 1468 | + { | |
| 1469 | + key: "onImportFromLibraryButtonClick", | |
| 1470 | + value: function onImportFromLibraryButtonClick() { | |
| 1471 | + AppsEventTracking.sendImportExportAdminAction("Import from Library"); | |
| 1472 | + } | |
| 1473 | + } | |
| 1474 | + ]); | |
| 1475 | + }(); | |
| 1476 | + window.addEventListener("load", function() { | |
| 1477 | + new Admin(); | |
| 1478 | + }); | |
| 986 | 1479 | |
| 987 | -function _assertThisInitialized(e) { | |
| 988 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 989 | - return e; | |
| 990 | -} | |
| 991 | -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 992 | - | |
| 993 | -/***/ }), | |
| 994 | - | |
| 995 | -/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": | |
| 996 | -/*!******************************************************************!*\ | |
| 997 | - !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! | |
| 998 | - \******************************************************************/ | |
| 999 | -/***/ ((module) => { | |
| 1000 | - | |
| 1001 | -function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 1002 | - try { | |
| 1003 | - var i = n[a](c), | |
| 1004 | - u = i.value; | |
| 1005 | - } catch (n) { | |
| 1006 | - return void e(n); | |
| 1007 | - } | |
| 1008 | - i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 1009 | -} | |
| 1010 | -function _asyncToGenerator(n) { | |
| 1011 | - return function () { | |
| 1012 | - var t = this, | |
| 1013 | - e = arguments; | |
| 1014 | - return new Promise(function (r, o) { | |
| 1015 | - var a = n.apply(t, e); | |
| 1016 | - function _next(n) { | |
| 1017 | - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 1018 | - } | |
| 1019 | - function _throw(n) { | |
| 1020 | - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 1021 | - } | |
| 1022 | - _next(void 0); | |
| 1023 | - }); | |
| 1024 | - }; | |
| 1025 | -} | |
| 1026 | -module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1027 | - | |
| 1028 | -/***/ }), | |
| 1029 | - | |
| 1030 | -/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 1031 | -/*!****************************************************************!*\ | |
| 1032 | - !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 1033 | - \****************************************************************/ | |
| 1034 | -/***/ ((module) => { | |
| 1035 | - | |
| 1036 | -function _classCallCheck(a, n) { | |
| 1037 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 1038 | -} | |
| 1039 | -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1040 | - | |
| 1041 | -/***/ }), | |
| 1042 | - | |
| 1043 | -/***/ "../node_modules/@babel/runtime/helpers/construct.js": | |
| 1044 | -/*!***********************************************************!*\ | |
| 1045 | - !*** ../node_modules/@babel/runtime/helpers/construct.js ***! | |
| 1046 | - \***********************************************************/ | |
| 1047 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1048 | - | |
| 1049 | -var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js"); | |
| 1050 | -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 1051 | -function _construct(t, e, r) { | |
| 1052 | - if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); | |
| 1053 | - var o = [null]; | |
| 1054 | - o.push.apply(o, e); | |
| 1055 | - var p = new (t.bind.apply(t, o))(); | |
| 1056 | - return r && setPrototypeOf(p, r.prototype), p; | |
| 1057 | -} | |
| 1058 | -module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1059 | - | |
| 1060 | -/***/ }), | |
| 1061 | - | |
| 1062 | -/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 1063 | -/*!*************************************************************!*\ | |
| 1064 | - !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 1065 | - \*************************************************************/ | |
| 1066 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1067 | - | |
| 1068 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 1069 | -function _defineProperties(e, r) { | |
| 1070 | - for (var t = 0; t < r.length; t++) { | |
| 1071 | - var o = r[t]; | |
| 1072 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 1073 | - } | |
| 1074 | -} | |
| 1075 | -function _createClass(e, r, t) { | |
| 1076 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 1077 | - writable: !1 | |
| 1078 | - }), e; | |
| 1079 | -} | |
| 1080 | -module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1081 | - | |
| 1082 | -/***/ }), | |
| 1083 | - | |
| 1084 | -/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 1085 | -/*!****************************************************************!*\ | |
| 1086 | - !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 1087 | - \****************************************************************/ | |
| 1088 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1089 | - | |
| 1090 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 1091 | -function _defineProperty(e, r, t) { | |
| 1092 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 1093 | - value: t, | |
| 1094 | - enumerable: !0, | |
| 1095 | - configurable: !0, | |
| 1096 | - writable: !0 | |
| 1097 | - }) : e[r] = t, e; | |
| 1098 | -} | |
| 1099 | -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1100 | - | |
| 1101 | -/***/ }), | |
| 1102 | - | |
| 1103 | -/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 1104 | -/*!****************************************************************!*\ | |
| 1105 | - !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 1106 | - \****************************************************************/ | |
| 1107 | -/***/ ((module) => { | |
| 1108 | - | |
| 1109 | -function _getPrototypeOf(t) { | |
| 1110 | - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 1111 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 1112 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 1113 | -} | |
| 1114 | -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1115 | - | |
| 1116 | -/***/ }), | |
| 1117 | - | |
| 1118 | -/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 1119 | -/*!**********************************************************!*\ | |
| 1120 | - !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 1121 | - \**********************************************************/ | |
| 1122 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1123 | - | |
| 1124 | -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 1125 | -function _inherits(t, e) { | |
| 1126 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 1127 | - t.prototype = Object.create(e && e.prototype, { | |
| 1128 | - constructor: { | |
| 1129 | - value: t, | |
| 1130 | - writable: !0, | |
| 1131 | - configurable: !0 | |
| 1132 | - } | |
| 1133 | - }), Object.defineProperty(t, "prototype", { | |
| 1134 | - writable: !1 | |
| 1135 | - }), e && setPrototypeOf(t, e); | |
| 1136 | -} | |
| 1137 | -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1138 | - | |
| 1139 | -/***/ }), | |
| 1140 | - | |
| 1141 | -/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 1142 | -/*!***********************************************************************!*\ | |
| 1143 | - !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 1144 | - \***********************************************************************/ | |
| 1145 | -/***/ ((module) => { | |
| 1146 | - | |
| 1147 | -function _interopRequireDefault(e) { | |
| 1148 | - return e && e.__esModule ? e : { | |
| 1149 | - "default": e | |
| 1150 | - }; | |
| 1151 | -} | |
| 1152 | -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1153 | - | |
| 1154 | -/***/ }), | |
| 1155 | - | |
| 1156 | -/***/ "../node_modules/@babel/runtime/helpers/isNativeFunction.js": | |
| 1157 | -/*!******************************************************************!*\ | |
| 1158 | - !*** ../node_modules/@babel/runtime/helpers/isNativeFunction.js ***! | |
| 1159 | - \******************************************************************/ | |
| 1160 | -/***/ ((module) => { | |
| 1161 | - | |
| 1162 | -function _isNativeFunction(t) { | |
| 1163 | - try { | |
| 1164 | - return -1 !== Function.toString.call(t).indexOf("[native code]"); | |
| 1165 | - } catch (n) { | |
| 1166 | - return "function" == typeof t; | |
| 1167 | - } | |
| 1168 | -} | |
| 1169 | -module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1170 | - | |
| 1171 | -/***/ }), | |
| 1172 | - | |
| 1173 | -/***/ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js": | |
| 1174 | -/*!**************************************************************************!*\ | |
| 1175 | - !*** ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***! | |
| 1176 | - \**************************************************************************/ | |
| 1177 | -/***/ ((module) => { | |
| 1178 | - | |
| 1179 | -function _isNativeReflectConstruct() { | |
| 1180 | - try { | |
| 1181 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); | |
| 1182 | - } catch (t) {} | |
| 1183 | - return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 1184 | - return !!t; | |
| 1185 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 1186 | -} | |
| 1187 | -module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1188 | - | |
| 1189 | -/***/ }), | |
| 1190 | - | |
| 1191 | -/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 1192 | -/*!***************************************************************************!*\ | |
| 1193 | - !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 1194 | - \***************************************************************************/ | |
| 1195 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1196 | - | |
| 1197 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1198 | -var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 1199 | -function _possibleConstructorReturn(t, e) { | |
| 1200 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 1201 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 1202 | - return assertThisInitialized(t); | |
| 1203 | -} | |
| 1204 | -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1205 | - | |
| 1206 | -/***/ }), | |
| 1207 | - | |
| 1208 | -/***/ "../node_modules/@babel/runtime/helpers/regenerator.js": | |
| 1209 | -/*!*************************************************************!*\ | |
| 1210 | - !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***! | |
| 1211 | - \*************************************************************/ | |
| 1212 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1213 | - | |
| 1214 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 1215 | -function _regenerator() { | |
| 1216 | - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 1217 | - var e, | |
| 1218 | - t, | |
| 1219 | - r = "function" == typeof Symbol ? Symbol : {}, | |
| 1220 | - n = r.iterator || "@@iterator", | |
| 1221 | - o = r.toStringTag || "@@toStringTag"; | |
| 1222 | - function i(r, n, o, i) { | |
| 1223 | - var c = n && n.prototype instanceof Generator ? n : Generator, | |
| 1224 | - u = Object.create(c.prototype); | |
| 1225 | - return regeneratorDefine(u, "_invoke", function (r, n, o) { | |
| 1226 | - var i, | |
| 1227 | - c, | |
| 1228 | - u, | |
| 1229 | - f = 0, | |
| 1230 | - p = o || [], | |
| 1231 | - y = !1, | |
| 1232 | - G = { | |
| 1233 | - p: 0, | |
| 1234 | - n: 0, | |
| 1235 | - v: e, | |
| 1236 | - a: d, | |
| 1237 | - f: d.bind(e, 4), | |
| 1238 | - d: function d(t, r) { | |
| 1239 | - return i = t, c = 0, u = e, G.n = r, a; | |
| 1240 | - } | |
| 1241 | - }; | |
| 1242 | - function d(r, n) { | |
| 1243 | - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 1244 | - var o, | |
| 1245 | - i = p[t], | |
| 1246 | - d = G.p, | |
| 1247 | - l = i[2]; | |
| 1248 | - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); | |
| 1249 | - } | |
| 1250 | - if (o || r > 1) return a; | |
| 1251 | - throw y = !0, n; | |
| 1252 | - } | |
| 1253 | - return function (o, p, l) { | |
| 1254 | - if (f > 1) throw TypeError("Generator is already running"); | |
| 1255 | - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 1256 | - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 1257 | - try { | |
| 1258 | - if (f = 2, i) { | |
| 1259 | - if (c || (o = "next"), t = i[o]) { | |
| 1260 | - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 1261 | - if (!t.done) return t; | |
| 1262 | - u = t.value, c < 2 && (c = 0); | |
| 1263 | - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 1264 | - i = e; | |
| 1265 | - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 1266 | - } catch (t) { | |
| 1267 | - i = e, c = 1, u = t; | |
| 1268 | - } finally { | |
| 1269 | - f = 1; | |
| 1270 | - } | |
| 1271 | - } | |
| 1272 | - return { | |
| 1273 | - value: t, | |
| 1274 | - done: y | |
| 1275 | - }; | |
| 1276 | - }; | |
| 1277 | - }(r, o, i), !0), u; | |
| 1278 | - } | |
| 1279 | - var a = {}; | |
| 1280 | - function Generator() {} | |
| 1281 | - function GeneratorFunction() {} | |
| 1282 | - function GeneratorFunctionPrototype() {} | |
| 1283 | - t = Object.getPrototypeOf; | |
| 1284 | - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { | |
| 1285 | - return this; | |
| 1286 | - }), t), | |
| 1287 | - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 1288 | - function f(e) { | |
| 1289 | - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 1290 | - } | |
| 1291 | - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () { | |
| 1292 | - return this; | |
| 1293 | - }), regeneratorDefine(u, "toString", function () { | |
| 1294 | - return "[object Generator]"; | |
| 1295 | - }), (module.exports = _regenerator = function _regenerator() { | |
| 1296 | - return { | |
| 1297 | - w: i, | |
| 1298 | - m: f | |
| 1299 | - }; | |
| 1300 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 1301 | -} | |
| 1302 | -module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1303 | - | |
| 1304 | -/***/ }), | |
| 1305 | - | |
| 1306 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js": | |
| 1307 | -/*!******************************************************************!*\ | |
| 1308 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***! | |
| 1309 | - \******************************************************************/ | |
| 1310 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1311 | - | |
| 1312 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 1313 | -function _regeneratorAsync(n, e, r, t, o) { | |
| 1314 | - var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 1315 | - return a.next().then(function (n) { | |
| 1316 | - return n.done ? n.value : a.next(); | |
| 1317 | - }); | |
| 1318 | -} | |
| 1319 | -module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1320 | - | |
| 1321 | -/***/ }), | |
| 1322 | - | |
| 1323 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js": | |
| 1324 | -/*!*********************************************************************!*\ | |
| 1325 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***! | |
| 1326 | - \*********************************************************************/ | |
| 1327 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1328 | - | |
| 1329 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 1330 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 1331 | -function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 1332 | - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 1333 | -} | |
| 1334 | -module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1335 | - | |
| 1336 | -/***/ }), | |
| 1337 | - | |
| 1338 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js": | |
| 1339 | -/*!**************************************************************************!*\ | |
| 1340 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***! | |
| 1341 | - \**************************************************************************/ | |
| 1342 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1343 | - | |
| 1344 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 1345 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 1346 | -function AsyncIterator(t, e) { | |
| 1347 | - function n(r, o, i, f) { | |
| 1348 | - try { | |
| 1349 | - var c = t[r](o), | |
| 1350 | - u = c.value; | |
| 1351 | - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { | |
| 1352 | - n("next", t, i, f); | |
| 1353 | - }, function (t) { | |
| 1354 | - n("throw", t, i, f); | |
| 1355 | - }) : e.resolve(u).then(function (t) { | |
| 1356 | - c.value = t, i(c); | |
| 1357 | - }, function (t) { | |
| 1358 | - return n("throw", t, i, f); | |
| 1359 | - }); | |
| 1360 | - } catch (t) { | |
| 1361 | - f(t); | |
| 1362 | - } | |
| 1363 | - } | |
| 1364 | - var r; | |
| 1365 | - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { | |
| 1366 | - return this; | |
| 1367 | - })), regeneratorDefine(this, "_invoke", function (t, o, i) { | |
| 1368 | - function f() { | |
| 1369 | - return new e(function (e, r) { | |
| 1370 | - n(t, i, e, r); | |
| 1371 | - }); | |
| 1372 | - } | |
| 1373 | - return r = r ? r.then(f, f) : f(); | |
| 1374 | - }, !0); | |
| 1375 | -} | |
| 1376 | -module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1377 | - | |
| 1378 | -/***/ }), | |
| 1379 | - | |
| 1380 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js": | |
| 1381 | -/*!*******************************************************************!*\ | |
| 1382 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***! | |
| 1383 | - \*******************************************************************/ | |
| 1384 | -/***/ ((module) => { | |
| 1385 | - | |
| 1386 | -function _regeneratorDefine(e, r, n, t) { | |
| 1387 | - var i = Object.defineProperty; | |
| 1388 | - try { | |
| 1389 | - i({}, "", {}); | |
| 1390 | - } catch (e) { | |
| 1391 | - i = 0; | |
| 1392 | - } | |
| 1393 | - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 1394 | - function o(r, n) { | |
| 1395 | - _regeneratorDefine(e, r, function (e) { | |
| 1396 | - return this._invoke(r, n, e); | |
| 1397 | - }); | |
| 1398 | - } | |
| 1399 | - r ? i ? i(e, r, { | |
| 1400 | - value: n, | |
| 1401 | - enumerable: !t, | |
| 1402 | - configurable: !t, | |
| 1403 | - writable: !t | |
| 1404 | - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 1405 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 1406 | -} | |
| 1407 | -module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1408 | - | |
| 1409 | -/***/ }), | |
| 1410 | - | |
| 1411 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js": | |
| 1412 | -/*!*****************************************************************!*\ | |
| 1413 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***! | |
| 1414 | - \*****************************************************************/ | |
| 1415 | -/***/ ((module) => { | |
| 1416 | - | |
| 1417 | -function _regeneratorKeys(e) { | |
| 1418 | - var n = Object(e), | |
| 1419 | - r = []; | |
| 1420 | - for (var t in n) r.unshift(t); | |
| 1421 | - return function e() { | |
| 1422 | - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 1423 | - return e.done = !0, e; | |
| 1424 | - }; | |
| 1425 | -} | |
| 1426 | -module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1427 | - | |
| 1428 | -/***/ }), | |
| 1429 | - | |
| 1430 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 1431 | -/*!********************************************************************!*\ | |
| 1432 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 1433 | - \********************************************************************/ | |
| 1434 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1435 | - | |
| 1436 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 1437 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 1438 | -var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js"); | |
| 1439 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 1440 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 1441 | -var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js"); | |
| 1442 | -var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js"); | |
| 1443 | -function _regeneratorRuntime() { | |
| 1444 | - "use strict"; | |
| 1445 | - | |
| 1446 | - var r = regenerator(), | |
| 1447 | - e = r.m(_regeneratorRuntime), | |
| 1448 | - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 1449 | - function n(r) { | |
| 1450 | - var e = "function" == typeof r && r.constructor; | |
| 1451 | - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 1452 | - } | |
| 1453 | - var o = { | |
| 1454 | - "throw": 1, | |
| 1455 | - "return": 2, | |
| 1456 | - "break": 3, | |
| 1457 | - "continue": 3 | |
| 1458 | - }; | |
| 1459 | - function a(r) { | |
| 1460 | - var e, t; | |
| 1461 | - return function (n) { | |
| 1462 | - e || (e = { | |
| 1463 | - stop: function stop() { | |
| 1464 | - return t(n.a, 2); | |
| 1465 | - }, | |
| 1466 | - "catch": function _catch() { | |
| 1467 | - return n.v; | |
| 1468 | - }, | |
| 1469 | - abrupt: function abrupt(r, e) { | |
| 1470 | - return t(n.a, o[r], e); | |
| 1471 | - }, | |
| 1472 | - delegateYield: function delegateYield(r, o, a) { | |
| 1473 | - return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 1474 | - }, | |
| 1475 | - finish: function finish(r) { | |
| 1476 | - return t(n.f, r); | |
| 1477 | - } | |
| 1478 | - }, t = function t(r, _t, o) { | |
| 1479 | - n.p = e.prev, n.n = e.next; | |
| 1480 | - try { | |
| 1481 | - return r(_t, o); | |
| 1482 | - } finally { | |
| 1483 | - e.next = n.n; | |
| 1484 | - } | |
| 1485 | - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 1486 | - try { | |
| 1487 | - return r.call(this, e); | |
| 1488 | - } finally { | |
| 1489 | - n.p = e.prev, n.n = e.next; | |
| 1490 | - } | |
| 1491 | - }; | |
| 1492 | - } | |
| 1493 | - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 1494 | - return { | |
| 1495 | - wrap: function wrap(e, t, n, o) { | |
| 1496 | - return r.w(a(e), t, n, o && o.reverse()); | |
| 1497 | - }, | |
| 1498 | - isGeneratorFunction: n, | |
| 1499 | - mark: r.m, | |
| 1500 | - awrap: function awrap(r, e) { | |
| 1501 | - return new OverloadYield(r, e); | |
| 1502 | - }, | |
| 1503 | - AsyncIterator: regeneratorAsyncIterator, | |
| 1504 | - async: function async(r, e, t, o, u) { | |
| 1505 | - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 1506 | - }, | |
| 1507 | - keys: regeneratorKeys, | |
| 1508 | - values: regeneratorValues | |
| 1509 | - }; | |
| 1510 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 1511 | -} | |
| 1512 | -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1513 | - | |
| 1514 | -/***/ }), | |
| 1515 | - | |
| 1516 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js": | |
| 1517 | -/*!*******************************************************************!*\ | |
| 1518 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***! | |
| 1519 | - \*******************************************************************/ | |
| 1520 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1521 | - | |
| 1522 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1523 | -function _regeneratorValues(e) { | |
| 1524 | - if (null != e) { | |
| 1525 | - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], | |
| 1526 | - r = 0; | |
| 1527 | - if (t) return t.call(e); | |
| 1528 | - if ("function" == typeof e.next) return e; | |
| 1529 | - if (!isNaN(e.length)) return { | |
| 1530 | - next: function next() { | |
| 1531 | - return e && r >= e.length && (e = void 0), { | |
| 1532 | - value: e && e[r++], | |
| 1533 | - done: !e | |
| 1534 | - }; | |
| 1535 | - } | |
| 1536 | - }; | |
| 1537 | - } | |
| 1538 | - throw new TypeError(_typeof(e) + " is not iterable"); | |
| 1539 | -} | |
| 1540 | -module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1541 | - | |
| 1542 | -/***/ }), | |
| 1543 | - | |
| 1544 | -/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 1545 | -/*!****************************************************************!*\ | |
| 1546 | - !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 1547 | - \****************************************************************/ | |
| 1548 | -/***/ ((module) => { | |
| 1549 | - | |
| 1550 | -function _setPrototypeOf(t, e) { | |
| 1551 | - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 1552 | - return t.__proto__ = e, t; | |
| 1553 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 1554 | -} | |
| 1555 | -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1556 | - | |
| 1557 | -/***/ }), | |
| 1558 | - | |
| 1559 | -/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 1560 | -/*!*************************************************************!*\ | |
| 1561 | - !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 1562 | - \*************************************************************/ | |
| 1563 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1564 | - | |
| 1565 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1566 | -function toPrimitive(t, r) { | |
| 1567 | - if ("object" != _typeof(t) || !t) return t; | |
| 1568 | - var e = t[Symbol.toPrimitive]; | |
| 1569 | - if (void 0 !== e) { | |
| 1570 | - var i = e.call(t, r || "default"); | |
| 1571 | - if ("object" != _typeof(i)) return i; | |
| 1572 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 1573 | - } | |
| 1574 | - return ("string" === r ? String : Number)(t); | |
| 1575 | -} | |
| 1576 | -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1577 | - | |
| 1578 | -/***/ }), | |
| 1579 | - | |
| 1580 | -/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 1581 | -/*!***************************************************************!*\ | |
| 1582 | - !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 1583 | - \***************************************************************/ | |
| 1584 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1585 | - | |
| 1586 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1587 | -var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 1588 | -function toPropertyKey(t) { | |
| 1589 | - var i = toPrimitive(t, "string"); | |
| 1590 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 1591 | -} | |
| 1592 | -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1593 | - | |
| 1594 | -/***/ }), | |
| 1595 | - | |
| 1596 | -/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 1597 | -/*!********************************************************!*\ | |
| 1598 | - !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 1599 | - \********************************************************/ | |
| 1600 | -/***/ ((module) => { | |
| 1601 | - | |
| 1602 | -function _typeof(o) { | |
| 1603 | - "@babel/helpers - typeof"; | |
| 1604 | - | |
| 1605 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 1606 | - return typeof o; | |
| 1607 | - } : function (o) { | |
| 1608 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 1609 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 1610 | -} | |
| 1611 | -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1612 | - | |
| 1613 | -/***/ }), | |
| 1614 | - | |
| 1615 | -/***/ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js": | |
| 1616 | -/*!*****************************************************************!*\ | |
| 1617 | - !*** ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***! | |
| 1618 | - \*****************************************************************/ | |
| 1619 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1620 | - | |
| 1621 | -var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); | |
| 1622 | -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 1623 | -var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ "../node_modules/@babel/runtime/helpers/isNativeFunction.js"); | |
| 1624 | -var construct = __webpack_require__(/*! ./construct.js */ "../node_modules/@babel/runtime/helpers/construct.js"); | |
| 1625 | -function _wrapNativeSuper(t) { | |
| 1626 | - var r = "function" == typeof Map ? new Map() : void 0; | |
| 1627 | - return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) { | |
| 1628 | - if (null === t || !isNativeFunction(t)) return t; | |
| 1629 | - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); | |
| 1630 | - if (void 0 !== r) { | |
| 1631 | - if (r.has(t)) return r.get(t); | |
| 1632 | - r.set(t, Wrapper); | |
| 1633 | - } | |
| 1634 | - function Wrapper() { | |
| 1635 | - return construct(t, arguments, getPrototypeOf(this).constructor); | |
| 1636 | - } | |
| 1637 | - return Wrapper.prototype = Object.create(t.prototype, { | |
| 1638 | - constructor: { | |
| 1639 | - value: Wrapper, | |
| 1640 | - enumerable: !1, | |
| 1641 | - writable: !0, | |
| 1642 | - configurable: !0 | |
| 1643 | - } | |
| 1644 | - }), setPrototypeOf(Wrapper, t); | |
| 1645 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t); | |
| 1646 | -} | |
| 1647 | -module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1648 | - | |
| 1649 | -/***/ }), | |
| 1650 | - | |
| 1651 | -/***/ "../node_modules/@babel/runtime/regenerator/index.js": | |
| 1652 | -/*!***********************************************************!*\ | |
| 1653 | - !*** ../node_modules/@babel/runtime/regenerator/index.js ***! | |
| 1654 | - \***********************************************************/ | |
| 1655 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1656 | - | |
| 1657 | -// TODO(Babel 8): Remove this file. | |
| 1658 | - | |
| 1659 | -var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); | |
| 1660 | -module.exports = runtime; | |
| 1661 | - | |
| 1662 | -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= | |
| 1663 | -try { | |
| 1664 | - regeneratorRuntime = runtime; | |
| 1665 | -} catch (accidentalStrictMode) { | |
| 1666 | - if (typeof globalThis === "object") { | |
| 1667 | - globalThis.regeneratorRuntime = runtime; | |
| 1668 | - } else { | |
| 1669 | - Function("r", "regeneratorRuntime = r")(runtime); | |
| 1670 | - } | |
| 1671 | -} | |
| 1672 | - | |
| 1673 | - | |
| 1674 | -/***/ }), | |
| 1675 | - | |
| 1676 | -/***/ "@wordpress/api-fetch": | |
| 1677 | -/*!******************************!*\ | |
| 1678 | - !*** external "wp.apiFetch" ***! | |
| 1679 | - \******************************/ | |
| 1680 | -/***/ ((module) => { | |
| 1681 | - | |
| 1682 | -"use strict"; | |
| 1683 | -module.exports = wp.apiFetch; | |
| 1684 | - | |
| 1685 | -/***/ }), | |
| 1686 | - | |
| 1687 | -/***/ "@wordpress/i18n": | |
| 1688 | -/*!**************************!*\ | |
| 1689 | - !*** external "wp.i18n" ***! | |
| 1690 | - \**************************/ | |
| 1691 | -/***/ ((module) => { | |
| 1692 | - | |
| 1693 | -"use strict"; | |
| 1694 | -module.exports = wp.i18n; | |
| 1695 | - | |
| 1696 | -/***/ }) | |
| 1697 | - | |
| 1698 | -/******/ }); | |
| 1699 | -/************************************************************************/ | |
| 1700 | -/******/ // The module cache | |
| 1701 | -/******/ var __webpack_module_cache__ = {}; | |
| 1702 | -/******/ | |
| 1703 | -/******/ // The require function | |
| 1704 | -/******/ function __webpack_require__(moduleId) { | |
| 1705 | -/******/ // Check if module is in cache | |
| 1706 | -/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 1707 | -/******/ if (cachedModule !== undefined) { | |
| 1708 | -/******/ return cachedModule.exports; | |
| 1709 | -/******/ } | |
| 1710 | -/******/ // Create a new module (and put it into the cache) | |
| 1711 | -/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 1712 | -/******/ // no module.id needed | |
| 1713 | -/******/ // no module.loaded needed | |
| 1714 | -/******/ exports: {} | |
| 1715 | -/******/ }; | |
| 1716 | -/******/ | |
| 1717 | -/******/ // Execute the module function | |
| 1718 | -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 1719 | -/******/ | |
| 1720 | -/******/ // Return the exports of the module | |
| 1721 | -/******/ return module.exports; | |
| 1722 | -/******/ } | |
| 1723 | -/******/ | |
| 1724 | -/************************************************************************/ | |
| 1725 | -var __webpack_exports__ = {}; | |
| 1726 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 1727 | -(() => { | |
| 1728 | -"use strict"; | |
| 1729 | -/*!*********************************************************************!*\ | |
| 1730 | - !*** ../app/modules/import-export-customization/assets/js/admin.js ***! | |
| 1731 | - \*********************************************************************/ | |
| 1732 | - | |
| 1733 | - | |
| 1734 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1735 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1736 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1737 | -var _appsEventTracking = __webpack_require__(/*! ../../../../assets/js/event-track/apps-event-tracking */ "../app/assets/js/event-track/apps-event-tracking.js"); | |
| 1738 | -var _revertKitHandler = __webpack_require__(/*! ./shared/revert-kit-handler */ "../app/modules/import-export-customization/assets/js/shared/revert-kit-handler.js"); | |
| 1739 | -var Admin = /*#__PURE__*/function () { | |
| 1740 | - function Admin() { | |
| 1741 | - var _this = this; | |
| 1742 | - (0, _classCallCheck2.default)(this, Admin); | |
| 1743 | - var urlParams = new URLSearchParams(window.location.search); | |
| 1744 | - if ('elementor-tools' === urlParams.get('page')) { | |
| 1745 | - this.sendPageToolsViewedEvent(); | |
| 1746 | - elementorAdmin.elements.$settingsTabs.on('focus', function () { | |
| 1747 | - var location = window.location.hash.slice(1); | |
| 1748 | - _this.maybeSendImportExportLocationEvent(location); | |
| 1749 | - }); | |
| 1750 | - this.maybeSendImportExportLocationEvent(window.location.hash.slice(1)); | |
| 1751 | - } | |
| 1752 | - this.revertButton = document.getElementById('elementor-import-export__revert_kit'); | |
| 1753 | - this.importFroLibraryButton = document.getElementById('elementor-import-export__import_from_library'); | |
| 1754 | - this.importButton = document.getElementById('elementor-import-export__import'); | |
| 1755 | - this.exportButton = document.getElementById('elementor-import-export__export'); | |
| 1756 | - this.initializeRevertHandler(); | |
| 1757 | - this.bindEventListeners(); | |
| 1758 | - } | |
| 1759 | - return (0, _createClass2.default)(Admin, [{ | |
| 1760 | - key: "initializeRevertHandler", | |
| 1761 | - value: function initializeRevertHandler() { | |
| 1762 | - if (this.revertButton) { | |
| 1763 | - this.revertHandler = new _revertKitHandler.RevertKitHandler({ | |
| 1764 | - revertButton: this.revertButton | |
| 1765 | - }); | |
| 1766 | - this.revertHandler.maybeShowReferrerKitDialog(); | |
| 1767 | - } | |
| 1768 | - } | |
| 1769 | - }, { | |
| 1770 | - key: "bindEventListeners", | |
| 1771 | - value: function bindEventListeners() { | |
| 1772 | - if (this.revertButton) { | |
| 1773 | - this.revertButton.addEventListener('click', this.onRevertButtonClick.bind(this)); | |
| 1774 | - } | |
| 1775 | - if (this.importFroLibraryButton) { | |
| 1776 | - this.importFroLibraryButton.addEventListener('click', this.onImportFromLibraryButtonClick.bind(this)); | |
| 1777 | - } | |
| 1778 | - if (this.importButton) { | |
| 1779 | - this.importButton.addEventListener('click', this.onImportButtonClick.bind(this)); | |
| 1780 | - } | |
| 1781 | - if (this.exportButton) { | |
| 1782 | - this.exportButton.addEventListener('click', this.onExportButtonClick.bind(this)); | |
| 1783 | - } | |
| 1784 | - } | |
| 1785 | - }, { | |
| 1786 | - key: "sendPageToolsViewedEvent", | |
| 1787 | - value: function sendPageToolsViewedEvent() { | |
| 1788 | - _appsEventTracking.AppsEventTracking.sendPageViewsWebsiteTemplates(elementorCommon.eventsManager.config.secondaryLocations.admin.pluginToolsTab); | |
| 1789 | - } | |
| 1790 | - }, { | |
| 1791 | - key: "maybeSendImportExportLocationEvent", | |
| 1792 | - value: function maybeSendImportExportLocationEvent(location) { | |
| 1793 | - if ('tab-import-export-kit' === location) { | |
| 1794 | - _appsEventTracking.AppsEventTracking.sendPageViewsWebsiteTemplates(elementorCommon.eventsManager.config.secondaryLocations.admin.pluginWebsiteTemplatesTab); | |
| 1795 | - } | |
| 1796 | - } | |
| 1797 | - }, { | |
| 1798 | - key: "onRevertButtonClick", | |
| 1799 | - value: function onRevertButtonClick(event) { | |
| 1800 | - var _this$revertHandler; | |
| 1801 | - event.preventDefault(); | |
| 1802 | - _appsEventTracking.AppsEventTracking.sendImportExportAdminAction('Revert'); | |
| 1803 | - (_this$revertHandler = this.revertHandler) === null || _this$revertHandler === void 0 || _this$revertHandler.revertKit(); | |
| 1804 | - } | |
| 1805 | - }, { | |
| 1806 | - key: "onExportButtonClick", | |
| 1807 | - value: function onExportButtonClick() { | |
| 1808 | - _appsEventTracking.AppsEventTracking.sendImportExportAdminAction('Export'); | |
| 1809 | - } | |
| 1810 | - }, { | |
| 1811 | - key: "onImportButtonClick", | |
| 1812 | - value: function onImportButtonClick() { | |
| 1813 | - _appsEventTracking.AppsEventTracking.sendImportExportAdminAction('Import'); | |
| 1814 | - } | |
| 1815 | - }, { | |
| 1816 | - key: "onImportFromLibraryButtonClick", | |
| 1817 | - value: function onImportFromLibraryButtonClick() { | |
| 1818 | - _appsEventTracking.AppsEventTracking.sendImportExportAdminAction('Import from Library'); | |
| 1819 | - } | |
| 1820 | - }]); | |
| 1821 | -}(); | |
| 1822 | -window.addEventListener('load', function () { | |
| 1823 | - new Admin(); | |
| 1824 | -}); | |
| 1825 | -})(); | |
| 1826 | - | |
| 1827 | -/******/ })() | |
| 1828 | -; | |
| 1480 | +//#endregion | |
| 1481 | +})(wp.i18n, wp.apiFetch); | |
| 1829 | 1482 | //# sourceMappingURL=import-export-customization-admin.js.map |