| 1 |
(function(_wordpress_i18n) { |
| 2 |
|
| 3 |
//#region \0rolldown/runtime.js |
| 4 |
var __defProp = Object.defineProperty; |
| 5 |
var __name = (target, value) => __defProp(target, "name", { |
| 6 |
value, |
| 7 |
configurable: true |
| 8 |
}); |
| 9 |
|
| 10 |
//#endregion |
| 11 |
|
| 12 |
//#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js |
| 13 |
function _classCallCheck(a, n) { |
| 14 |
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); |
| 15 |
} |
| 16 |
|
| 17 |
//#endregion |
| 18 |
//#region node_modules/@babel/runtime/helpers/esm/typeof.js |
| 19 |
function _typeof(o) { |
| 20 |
"@babel/helpers - typeof"; |
| 21 |
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { |
| 22 |
return typeof o; |
| 23 |
} : function(o) { |
| 24 |
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 25 |
}, _typeof(o); |
| 26 |
} |
| 27 |
|
| 28 |
//#endregion |
| 29 |
//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js |
| 30 |
function toPrimitive(t, r) { |
| 31 |
if ("object" != _typeof(t) || !t) return t; |
| 32 |
var e = t[Symbol.toPrimitive]; |
| 33 |
if (void 0 !== e) { |
| 34 |
var i = e.call(t, r || "default"); |
| 35 |
if ("object" != _typeof(i)) return i; |
| 36 |
throw new TypeError("@@toPrimitive must return a primitive value."); |
| 37 |
} |
| 38 |
return ("string" === r ? String : Number)(t); |
| 39 |
} |
| 40 |
|
| 41 |
//#endregion |
| 42 |
//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js |
| 43 |
function toPropertyKey(t) { |
| 44 |
var i = toPrimitive(t, "string"); |
| 45 |
return "symbol" == _typeof(i) ? i : i + ""; |
| 46 |
} |
| 47 |
|
| 48 |
//#endregion |
| 49 |
//#region node_modules/@babel/runtime/helpers/esm/createClass.js |
| 50 |
function _defineProperties(e, r) { |
| 51 |
for (var t = 0; t < r.length; t++) { |
| 52 |
var o = r[t]; |
| 53 |
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); |
| 54 |
} |
| 55 |
} |
| 56 |
function _createClass(e, r, t) { |
| 57 |
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; |
| 58 |
} |
| 59 |
|
| 60 |
//#endregion |
| 61 |
//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js |
| 62 |
function _assertThisInitialized(e) { |
| 63 |
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 64 |
return e; |
| 65 |
} |
| 66 |
|
| 67 |
//#endregion |
| 68 |
//#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js |
| 69 |
function _possibleConstructorReturn(t, e) { |
| 70 |
if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; |
| 71 |
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); |
| 72 |
return _assertThisInitialized(t); |
| 73 |
} |
| 74 |
|
| 75 |
//#endregion |
| 76 |
//#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js |
| 77 |
function _getPrototypeOf(t) { |
| 78 |
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { |
| 79 |
return t.__proto__ || Object.getPrototypeOf(t); |
| 80 |
}, _getPrototypeOf(t); |
| 81 |
} |
| 82 |
|
| 83 |
//#endregion |
| 84 |
//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js |
| 85 |
function _setPrototypeOf(t, e) { |
| 86 |
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) { |
| 87 |
return t.__proto__ = e, t; |
| 88 |
}, _setPrototypeOf(t, e); |
| 89 |
} |
| 90 |
|
| 91 |
//#endregion |
| 92 |
//#region node_modules/@babel/runtime/helpers/esm/inherits.js |
| 93 |
function _inherits(t, e) { |
| 94 |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); |
| 95 |
t.prototype = Object.create(e && e.prototype, { constructor: { |
| 96 |
value: t, |
| 97 |
writable: !0, |
| 98 |
configurable: !0 |
| 99 |
} }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); |
| 100 |
} |
| 101 |
|
| 102 |
//#endregion |
| 103 |
//#region assets/dev/js/admin/beta-tester/view.js |
| 104 |
function _callSuper$2(t, o, e) { |
| 105 |
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); |
| 106 |
} |
| 107 |
__name(_callSuper$2, "_callSuper"); |
| 108 |
function _isNativeReflectConstruct$2() { |
| 109 |
try { |
| 110 |
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); |
| 111 |
} catch (t) {} |
| 112 |
return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { |
| 113 |
return !!t; |
| 114 |
})(); |
| 115 |
} |
| 116 |
__name(_isNativeReflectConstruct$2, "_isNativeReflectConstruct"); |
| 117 |
var BetaTesterView = /*#__PURE__*/ function(_Marionette$ItemView) { |
| 118 |
function BetaTesterView() { |
| 119 |
var _this; |
| 120 |
_classCallCheck(this, BetaTesterView); |
| 121 |
_this = _callSuper$2(this, BetaTesterView); |
| 122 |
_this.id = "elementor-beta-tester-dialog-content"; |
| 123 |
_this.template = "#tmpl-elementor-beta-tester"; |
| 124 |
return _this; |
| 125 |
} |
| 126 |
_inherits(BetaTesterView, _Marionette$ItemView); |
| 127 |
return _createClass(BetaTesterView, [ |
| 128 |
{ |
| 129 |
key: "ui", |
| 130 |
value: function ui() { |
| 131 |
return { |
| 132 |
betaForm: "#elementor-beta-tester-form", |
| 133 |
betaEmail: "#elementor-beta-tester-form__email", |
| 134 |
betaButton: "#elementor-beta-tester-form__submit" |
| 135 |
}; |
| 136 |
} |
| 137 |
}, |
| 138 |
{ |
| 139 |
key: "events", |
| 140 |
value: function events() { |
| 141 |
return { "submit @ui.betaForm": "onBetaFormSubmit" }; |
| 142 |
} |
| 143 |
}, |
| 144 |
{ |
| 145 |
key: "onBetaFormSubmit", |
| 146 |
value: function onBetaFormSubmit(event) { |
| 147 |
event.preventDefault(); |
| 148 |
var email = this.ui.betaEmail.val(); |
| 149 |
this.ui.betaButton.addClass("elementor-button-state"); |
| 150 |
elementorCommon.ajax.addRequest("beta_tester_signup", { data: { betaTesterEmail: email } }); |
| 151 |
elementorBetaTester.layout.hideModal(); |
| 152 |
} |
| 153 |
}, |
| 154 |
{ |
| 155 |
key: "onRender", |
| 156 |
value: function onRender() {} |
| 157 |
} |
| 158 |
]); |
| 159 |
}(Marionette.ItemView); |
| 160 |
|
| 161 |
//#endregion |
| 162 |
//#region assets/dev/js/admin/beta-tester/layout.js |
| 163 |
function _callSuper$1(t, o, e) { |
| 164 |
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); |
| 165 |
} |
| 166 |
__name(_callSuper$1, "_callSuper"); |
| 167 |
function _isNativeReflectConstruct$1() { |
| 168 |
try { |
| 169 |
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); |
| 170 |
} catch (t) {} |
| 171 |
return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { |
| 172 |
return !!t; |
| 173 |
})(); |
| 174 |
} |
| 175 |
__name(_isNativeReflectConstruct$1, "_isNativeReflectConstruct"); |
| 176 |
var BetaTesterLayout = /*#__PURE__*/ function(_elementorModules$com) { |
| 177 |
function BetaTesterLayout() { |
| 178 |
_classCallCheck(this, BetaTesterLayout); |
| 179 |
return _callSuper$1(this, BetaTesterLayout, arguments); |
| 180 |
} |
| 181 |
_inherits(BetaTesterLayout, _elementorModules$com); |
| 182 |
return _createClass(BetaTesterLayout, [ |
| 183 |
{ |
| 184 |
key: "ui", |
| 185 |
value: function ui() { |
| 186 |
return { |
| 187 |
closeModal: ".elementor-templates-modal__header__close", |
| 188 |
dontShowAgain: ".elementor-beta-tester-do-not-show-again" |
| 189 |
}; |
| 190 |
} |
| 191 |
}, |
| 192 |
{ |
| 193 |
key: "events", |
| 194 |
value: function events() { |
| 195 |
return { |
| 196 |
"click @ui.closeModal": this.onCloseModalClick, |
| 197 |
"click @ui.dontShowAgain": this.onDontShowAgainClick |
| 198 |
}; |
| 199 |
} |
| 200 |
}, |
| 201 |
{ |
| 202 |
key: "getModalOptions", |
| 203 |
value: function getModalOptions() { |
| 204 |
return { |
| 205 |
id: "elementor-beta-tester-modal", |
| 206 |
hide: { onBackgroundClick: false } |
| 207 |
}; |
| 208 |
} |
| 209 |
}, |
| 210 |
{ |
| 211 |
key: "getLogoOptions", |
| 212 |
value: function getLogoOptions() { |
| 213 |
return { title: (0, _wordpress_i18n.__)("Sign Up", "elementor") }; |
| 214 |
} |
| 215 |
}, |
| 216 |
{ |
| 217 |
key: "initialize", |
| 218 |
value: function initialize() { |
| 219 |
elementorModules.common.views.modal.Layout.prototype.initialize.apply(this, arguments); |
| 220 |
this.showLogo(); |
| 221 |
this.showContentView(); |
| 222 |
var doNotShowAgain = (0, _wordpress_i18n.__)("Don't Show Again", "elementor"); |
| 223 |
this.modalHeader.currentView.ui.closeModal.after(jQuery("<div>", { class: "elementor-beta-tester-do-not-show-again" }).text(doNotShowAgain)); |
| 224 |
} |
| 225 |
}, |
| 226 |
{ |
| 227 |
key: "showContentView", |
| 228 |
value: function showContentView() { |
| 229 |
this.modalContent.show(new BetaTesterView()); |
| 230 |
} |
| 231 |
}, |
| 232 |
{ |
| 233 |
key: "onDontShowAgainClick", |
| 234 |
value: function onDontShowAgainClick() { |
| 235 |
this.hideModal(); |
| 236 |
this.onCloseModalClick(); |
| 237 |
} |
| 238 |
}, |
| 239 |
{ |
| 240 |
key: "onCloseModalClick", |
| 241 |
value: function onCloseModalClick() { |
| 242 |
elementorCommon.ajax.addRequest("introduction_viewed", { data: { introductionKey: elementorAdmin.config.beta_tester.beta_tester_signup } }); |
| 243 |
} |
| 244 |
} |
| 245 |
]); |
| 246 |
}(elementorModules.common.views.modal.Layout); |
| 247 |
|
| 248 |
//#endregion |
| 249 |
//#region assets/dev/js/admin/beta-tester/beta-tester.js |
| 250 |
function _callSuper(t, o, e) { |
| 251 |
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); |
| 252 |
} |
| 253 |
function _isNativeReflectConstruct() { |
| 254 |
try { |
| 255 |
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); |
| 256 |
} catch (t) {} |
| 257 |
return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { |
| 258 |
return !!t; |
| 259 |
})(); |
| 260 |
} |
| 261 |
var BetaTesterModule = /*#__PURE__*/ function(_elementorModules$Vie) { |
| 262 |
function BetaTesterModule() { |
| 263 |
_classCallCheck(this, BetaTesterModule); |
| 264 |
return _callSuper(this, BetaTesterModule, arguments); |
| 265 |
} |
| 266 |
_inherits(BetaTesterModule, _elementorModules$Vie); |
| 267 |
return _createClass(BetaTesterModule, [ |
| 268 |
{ |
| 269 |
key: "onInit", |
| 270 |
value: function onInit() { |
| 271 |
elementorModules.ViewModule.prototype.onInit.apply(this, arguments); |
| 272 |
this.showLayout(false); |
| 273 |
} |
| 274 |
}, |
| 275 |
{ |
| 276 |
key: "showLayout", |
| 277 |
value: function showLayout() { |
| 278 |
if (!(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true) && (!elementorAdmin.config.beta_tester.option_enabled || elementorAdmin.config.beta_tester.signup_dismissed || "#tab-fontawesome4_migration" === location.hash)) return; |
| 279 |
this.layout = new BetaTesterLayout(); |
| 280 |
this.layout.showModal(); |
| 281 |
} |
| 282 |
}, |
| 283 |
{ |
| 284 |
key: "getDefaultSettings", |
| 285 |
value: function getDefaultSettings() { |
| 286 |
return { selectors: { betaTesterFirstToKnow: "#beta-tester-first-to-know" } }; |
| 287 |
} |
| 288 |
}, |
| 289 |
{ |
| 290 |
key: "getDefaultElements", |
| 291 |
value: function getDefaultElements() { |
| 292 |
var elements = {}; |
| 293 |
var selectors = this.getSettings("selectors"); |
| 294 |
elements.$betaTesterFirstToKnow = jQuery(selectors.betaTesterFirstToKnow); |
| 295 |
return elements; |
| 296 |
} |
| 297 |
}, |
| 298 |
{ |
| 299 |
key: "bindEvents", |
| 300 |
value: function bindEvents() { |
| 301 |
this.elements.$betaTesterFirstToKnow.on("click", this.showLayout.bind(this)); |
| 302 |
} |
| 303 |
} |
| 304 |
]); |
| 305 |
}(elementorModules.ViewModule); |
| 306 |
jQuery(function() { |
| 307 |
window.elementorBetaTester = new BetaTesterModule(); |
| 308 |
}); |
| 309 |
|
| 310 |
//#endregion |
| 311 |
})(wp.i18n); |
| 312 |
//# sourceMappingURL=beta-tester.js.map |