| 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 |
var __exportAll = (all, no_symbols) => { |
| 10 |
let target = {}; |
| 11 |
for (var name in all) { |
| 12 |
__defProp(target, name, { |
| 13 |
get: all[name], |
| 14 |
enumerable: true |
| 15 |
}); |
| 16 |
} |
| 17 |
if (!no_symbols) { |
| 18 |
__defProp(target, Symbol.toStringTag, { value: "Module" }); |
| 19 |
} |
| 20 |
return target; |
| 21 |
}; |
| 22 |
|
| 23 |
//#endregion |
| 24 |
|
| 25 |
//#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js |
| 26 |
function _classCallCheck(a, n) { |
| 27 |
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); |
| 28 |
} |
| 29 |
|
| 30 |
//#endregion |
| 31 |
//#region node_modules/@babel/runtime/helpers/esm/typeof.js |
| 32 |
function _typeof(o) { |
| 33 |
"@babel/helpers - typeof"; |
| 34 |
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { |
| 35 |
return typeof o; |
| 36 |
} : function(o) { |
| 37 |
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 38 |
}, _typeof(o); |
| 39 |
} |
| 40 |
|
| 41 |
//#endregion |
| 42 |
//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js |
| 43 |
function toPrimitive(t, r) { |
| 44 |
if ("object" != _typeof(t) || !t) return t; |
| 45 |
var e = t[Symbol.toPrimitive]; |
| 46 |
if (void 0 !== e) { |
| 47 |
var i = e.call(t, r || "default"); |
| 48 |
if ("object" != _typeof(i)) return i; |
| 49 |
throw new TypeError("@@toPrimitive must return a primitive value."); |
| 50 |
} |
| 51 |
return ("string" === r ? String : Number)(t); |
| 52 |
} |
| 53 |
|
| 54 |
//#endregion |
| 55 |
//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js |
| 56 |
function toPropertyKey(t) { |
| 57 |
var i = toPrimitive(t, "string"); |
| 58 |
return "symbol" == _typeof(i) ? i : i + ""; |
| 59 |
} |
| 60 |
|
| 61 |
//#endregion |
| 62 |
//#region node_modules/@babel/runtime/helpers/esm/createClass.js |
| 63 |
function _defineProperties(e, r) { |
| 64 |
for (var t = 0; t < r.length; t++) { |
| 65 |
var o = r[t]; |
| 66 |
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); |
| 67 |
} |
| 68 |
} |
| 69 |
function _createClass(e, r, t) { |
| 70 |
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; |
| 71 |
} |
| 72 |
|
| 73 |
//#endregion |
| 74 |
//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js |
| 75 |
function _assertThisInitialized(e) { |
| 76 |
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 77 |
return e; |
| 78 |
} |
| 79 |
|
| 80 |
//#endregion |
| 81 |
//#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js |
| 82 |
function _possibleConstructorReturn(t, e) { |
| 83 |
if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; |
| 84 |
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); |
| 85 |
return _assertThisInitialized(t); |
| 86 |
} |
| 87 |
|
| 88 |
//#endregion |
| 89 |
//#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js |
| 90 |
function _getPrototypeOf(t) { |
| 91 |
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { |
| 92 |
return t.__proto__ || Object.getPrototypeOf(t); |
| 93 |
}, _getPrototypeOf(t); |
| 94 |
} |
| 95 |
|
| 96 |
//#endregion |
| 97 |
//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js |
| 98 |
function _setPrototypeOf(t, e) { |
| 99 |
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) { |
| 100 |
return t.__proto__ = e, t; |
| 101 |
}, _setPrototypeOf(t, e); |
| 102 |
} |
| 103 |
|
| 104 |
//#endregion |
| 105 |
//#region node_modules/@babel/runtime/helpers/esm/inherits.js |
| 106 |
function _inherits(t, e) { |
| 107 |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); |
| 108 |
t.prototype = Object.create(e && e.prototype, { constructor: { |
| 109 |
value: t, |
| 110 |
writable: !0, |
| 111 |
configurable: !0 |
| 112 |
} }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); |
| 113 |
} |
| 114 |
|
| 115 |
//#endregion |
| 116 |
//#region modules/notes/assets/js/modules/context-menu/notes-context-menu.js |
| 117 |
function _callSuper$2(t, o, e) { |
| 118 |
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); |
| 119 |
} |
| 120 |
__name(_callSuper$2, "_callSuper"); |
| 121 |
function _isNativeReflectConstruct$2() { |
| 122 |
try { |
| 123 |
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); |
| 124 |
} catch (t) {} |
| 125 |
return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { |
| 126 |
return !!t; |
| 127 |
})(); |
| 128 |
} |
| 129 |
__name(_isNativeReflectConstruct$2, "_isNativeReflectConstruct"); |
| 130 |
var NotesContextMenu = /*#__PURE__*/ function(_elementorModules$edi) { |
| 131 |
function NotesContextMenu() { |
| 132 |
_classCallCheck(this, NotesContextMenu); |
| 133 |
return _callSuper$2(this, NotesContextMenu, arguments); |
| 134 |
} |
| 135 |
_inherits(NotesContextMenu, _elementorModules$edi); |
| 136 |
return _createClass(NotesContextMenu, [ |
| 137 |
{ |
| 138 |
key: "onInit", |
| 139 |
value: function onInit() { |
| 140 |
this.contextMenuNotesGroup(); |
| 141 |
} |
| 142 |
}, |
| 143 |
{ |
| 144 |
key: "contextMenuNotesGroup", |
| 145 |
value: function contextMenuNotesGroup() { |
| 146 |
var _this = this; |
| 147 |
[ |
| 148 |
"widget", |
| 149 |
"section", |
| 150 |
"column", |
| 151 |
"container" |
| 152 |
].forEach(function(type) { |
| 153 |
elementor.hooks.addFilter("elements/".concat(type, "/contextMenuGroups"), _this.contextMenuAddGroup); |
| 154 |
}); |
| 155 |
} |
| 156 |
}, |
| 157 |
{ |
| 158 |
key: "contextMenuAddGroup", |
| 159 |
value: function contextMenuAddGroup(groups) { |
| 160 |
var deleteGroup = _.findWhere(groups, { name: "delete" }); |
| 161 |
var deleteGroupIndex = groups.indexOf(deleteGroup); |
| 162 |
if (-1 === deleteGroupIndex) deleteGroupIndex = groups.length; |
| 163 |
groups.splice(deleteGroupIndex, 0, { |
| 164 |
name: "notes", |
| 165 |
actions: [{ |
| 166 |
name: "open_notes", |
| 167 |
title: (0, _wordpress_i18n.__)("Notes", "elementor"), |
| 168 |
shortcut: "<i class=\"eicon-pro-icon\"></i>", |
| 169 |
promotionURL: "https://go.elementor.com/go-pro-notes-context-menu/", |
| 170 |
isEnabled: function isEnabled() { |
| 171 |
return false; |
| 172 |
}, |
| 173 |
callback: function callback() {} |
| 174 |
}] |
| 175 |
}); |
| 176 |
return groups; |
| 177 |
} |
| 178 |
} |
| 179 |
]); |
| 180 |
}(elementorModules.editor.utils.Module); |
| 181 |
|
| 182 |
//#endregion |
| 183 |
//#region modules/notes/assets/js/modules/index.js |
| 184 |
var modules_exports = /* @__PURE__ */ __exportAll({ NotesContextMenu: () => NotesContextMenu }); |
| 185 |
|
| 186 |
//#endregion |
| 187 |
//#region modules/notes/assets/js/hooks/ui/panel/state-ready/notes-add-panel-menu-item.js |
| 188 |
function _callSuper$1(t, o, e) { |
| 189 |
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); |
| 190 |
} |
| 191 |
__name(_callSuper$1, "_callSuper"); |
| 192 |
function _isNativeReflectConstruct$1() { |
| 193 |
try { |
| 194 |
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); |
| 195 |
} catch (t) {} |
| 196 |
return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { |
| 197 |
return !!t; |
| 198 |
})(); |
| 199 |
} |
| 200 |
__name(_isNativeReflectConstruct$1, "_isNativeReflectConstruct"); |
| 201 |
var NotesAddPanelMenuItem = /*#__PURE__*/ function(_$e$modules$hookUI$Af) { |
| 202 |
function NotesAddPanelMenuItem() { |
| 203 |
_classCallCheck(this, NotesAddPanelMenuItem); |
| 204 |
return _callSuper$1(this, NotesAddPanelMenuItem, arguments); |
| 205 |
} |
| 206 |
_inherits(NotesAddPanelMenuItem, _$e$modules$hookUI$Af); |
| 207 |
return _createClass(NotesAddPanelMenuItem, [ |
| 208 |
{ |
| 209 |
key: "getCommand", |
| 210 |
value: function getCommand() { |
| 211 |
return "panel/state-ready"; |
| 212 |
} |
| 213 |
}, |
| 214 |
{ |
| 215 |
key: "getId", |
| 216 |
value: function getId() { |
| 217 |
return "notes-add-panel-menu-item"; |
| 218 |
} |
| 219 |
}, |
| 220 |
{ |
| 221 |
key: "apply", |
| 222 |
value: function apply() { |
| 223 |
elementor.modules.layouts.panel.pages.menu.Menu.addItem({ |
| 224 |
name: "notes", |
| 225 |
icon: "eicon-commenting-o", |
| 226 |
title: (0, _wordpress_i18n.__)("Notes", "elementor") + "<i class=\"elementor-panel-menu-item-title-badge eicon-pro-icon\"></i>", |
| 227 |
callback: function callback() { |
| 228 |
var hasProAndNotConnected = elementor.helpers.hasProAndNotConnected(); |
| 229 |
elementor.promotion.showDialog({ |
| 230 |
title: (0, _wordpress_i18n.__)("Notes", "elementor"), |
| 231 |
content: (0, _wordpress_i18n.__)("With Notes, teamwork gets even better. Stay in sync with comments, feedback & more on your website.", "elementor"), |
| 232 |
position: { |
| 233 |
blockStart: "-3", |
| 234 |
inlineStart: "+10" |
| 235 |
}, |
| 236 |
targetElement: this.$el, |
| 237 |
actionButton: { |
| 238 |
url: hasProAndNotConnected ? elementorProEditorConfig.urls.connect : elementor.config.promotions.notes.upgrade_url || "https://go.elementor.com/go-pro-notes/", |
| 239 |
text: hasProAndNotConnected ? (0, _wordpress_i18n.__)("Connect & Activate", "elementor") : (0, _wordpress_i18n.__)("Upgrade", "elementor") |
| 240 |
} |
| 241 |
}); |
| 242 |
} |
| 243 |
}, "navigate_from_page", "finder"); |
| 244 |
} |
| 245 |
} |
| 246 |
]); |
| 247 |
}($e.modules.hookUI.After); |
| 248 |
|
| 249 |
//#endregion |
| 250 |
//#region modules/notes/assets/js/hooks/index.js |
| 251 |
var hooks_exports = /* @__PURE__ */ __exportAll({ NotesAddPanelMenuItem: () => NotesAddPanelMenuItem }); |
| 252 |
|
| 253 |
//#endregion |
| 254 |
//#region modules/notes/assets/js/e-component.js |
| 255 |
function _callSuper(t, o, e) { |
| 256 |
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); |
| 257 |
} |
| 258 |
function _isNativeReflectConstruct() { |
| 259 |
try { |
| 260 |
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); |
| 261 |
} catch (t) {} |
| 262 |
return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { |
| 263 |
return !!t; |
| 264 |
})(); |
| 265 |
} |
| 266 |
var EComponent = /*#__PURE__*/ function(_$e$modules$Component) { |
| 267 |
function EComponent(args) { |
| 268 |
var _this; |
| 269 |
_classCallCheck(this, EComponent); |
| 270 |
_this = _callSuper(this, EComponent, [args]); |
| 271 |
_this.loadModules(); |
| 272 |
return _this; |
| 273 |
} |
| 274 |
/** |
| 275 |
* @return {string} The namespace of the component |
| 276 |
*/ |
| 277 |
_inherits(EComponent, _$e$modules$Component); |
| 278 |
return _createClass(EComponent, [ |
| 279 |
{ |
| 280 |
key: "getNamespace", |
| 281 |
value: function getNamespace() { |
| 282 |
return "notes"; |
| 283 |
} |
| 284 |
}, |
| 285 |
{ |
| 286 |
key: "defaultHooks", |
| 287 |
value: function defaultHooks() { |
| 288 |
return this.importHooks(hooks_exports); |
| 289 |
} |
| 290 |
}, |
| 291 |
{ |
| 292 |
key: "loadModules", |
| 293 |
value: function loadModules() { |
| 294 |
for (var key in modules_exports) new modules_exports[key](); |
| 295 |
} |
| 296 |
} |
| 297 |
]); |
| 298 |
}($e.modules.ComponentBase); |
| 299 |
|
| 300 |
//#endregion |
| 301 |
//#region modules/notes/assets/js/notes.js |
| 302 |
window.top.$e.components.register(new EComponent()); |
| 303 |
|
| 304 |
//#endregion |
| 305 |
})(wp.i18n); |
| 306 |
//# sourceMappingURL=notes.js.map |