|
1
|
|
-"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _readOnlyError(e){throw new TypeError('"'+e+'" is read-only')}function _superPropGet(e,t,n,r){var u=_get(_getPrototypeOf(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof u?function(e){return u.apply(n,e)}:u}function _get(){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=_superPropBase(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(null,arguments)}function _superPropBase(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_toPropertyKey(r.key),r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _callSuper(e,t,n){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,n||[],_getPrototypeOf(e).constructor):t.apply(e,n))}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}elementorCommon.elements.$window.on("elementor/nested-element-type-loaded",function(){var t=function(){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,$e.components.get("nested-elements").exports.NestedView),_createClass(e,[{key:"filter",value:function(e,t){return e.attributes.dataIndex=t+1,!0}},{key:"onAddChild",value:function(e){var t=null==(t=e._parent.$el.find(".e-n-tabs")[0])?void 0:t.dataset.widgetNumber,n=e.model.attributes.dataIndex,r=null==(r=e._parent.$el.find('.e-n-tab-title[data-tab-index="'.concat(n,'"]')))?void 0:r.attr("id");e.$el.attr({id:"ui-e-tab-content-"+t+n,role:"tabpanel","aria-labelledby":r,"data-tab-index":n,style:"--ui-e-tabs-order: "+n+";"}),elementor.previewView.isBuffering&&1===n&&e.$el.addClass("e-active")}}])}(),n=function(){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,$e.components.get("nested-elements").exports.NestedView),_createClass(e,[{key:"onAddChild",value:function(e){e.$el.addClass("ui-e-item")}}])}(),r=function(){function u(){var e;_classCallCheck(this,u);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=_callSuper(this,u,[].concat(n))).onRerenderRequest=e.onRerenderRequest.bind(e),elementor.channels.editor.on("ui-e-custom-table-rerender",e.onRerenderRequest),e}return _inherits(u,$e.components.get("nested-elements").exports.NestedView),_createClass(u,[{key:"getModelId",value:function(){var e,t;return(null==(e=this.model)||null==(t=e.get)?void 0:t.call(e,"id"))||(null==(t=this.model)||null==(t=t.attributes)?void 0:t.id)||null}},{key:"isEventTarget",value:function(e){var t,n;return((null==e||null==(t=e.options)||null==(t=t.element)||null==(t=t.model)||null==(n=t.get)?void 0:n.call(t,"id"))||(null==e||null==(n=e.options)||null==(n=n.element)||null==(n=n.model)||null==(n=n.attributes)?void 0:n.id)||null)===this.getModelId()}},{key:"onRerenderRequest",value:function(e){this.isEventTarget(e)&&("function"==typeof(null==(e=this.model)?void 0:e.renderRemoteServer)?this.model.renderRemoteServer():this.render())}},{key:"getExpectedCellCount",value:function(){var e=this.$el.find(".ui-e-table")[0];return e&&(e=Number.parseInt(e.dataset.cellCount||"",10),Number.isInteger(e))?e:null}},{key:"filter",value:function(e,t){e.attributes.dataIndex=t+1;e=this.getExpectedCellCount();return!Number.isInteger(e)||t<e}},{key:"onAddChild",value:function(e){var t=e._parent.$el.find(".ui-e-table")[0],t=Number.parseInt(t.style.getPropertyValue("--ui-e-cols-qty"),10)||1,n=e.$el,r=e.model.attributes.dataIndex||e._index+1,u=Math.floor((r-1)/t)%2!=0?"ui-e-even":"ui-e-odd";e.$el.addClass(u),n.addClass("ui-e-table-cell").addClass("ui-e-item"),(r-1)%t==0?e.$el.addClass("ui-e-first-row-cel"):r%t==0&&e.$el.addClass("ui-e-last-row-cel")}},{key:"onDestroy",value:function(){var e;elementor.channels.editor.off("ui-e-custom-table-rerender",this.onRerenderRequest),null!=(e=_superPropGet(u,"onDestroy",this,3))&&e([])}}])}(),u=function(){function i(){var e;_classCallCheck(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=_callSuper(this,i,[].concat(n))).menuObserver=null,e.menuSyncFrame=null,e}return _inherits(i,$e.components.get("nested-elements").exports.NestedView),_createClass(i,[{key:"events",value:function(){var e,r=this,u=(e=(null==(e=_superPropGet(i,"events",this,3))?void 0:e([]))||{}).click;return e.click=function(e){var t,n;return null!=(t=e.target)&&null!=(n=t.closest)&&null!=(n=n.call(t,".elementor"))&&null!=(n=n.dataset)&&n.elementorId&&"function"==typeof u?u.call(r,e):void 0},e}},{key:"filter",value:function(e,t){return e.attributes.dataIndex=t+1,!0}},{key:"getChildIndex",value:function(e){var t=null==e||null==(t=e.model)||null==(t=t.attributes)?void 0:t.dataIndex;return Number.isInteger(t)?t:Number.isInteger(null==e?void 0:e._index)?e._index+1:null}},{key:"getWidgetNumber",value:function(){return this.$el.closest("[data-widget-number]").attr("data-widget-number")}},{key:"getMenuList",value:function(){return this.$el.hasClass("ui-e-menu-list")?this.$el:this.$el.find(".ui-e-menu-list").first()}},{key:"getMenuContainer",value:function(){return this.getMenuList().parent(".ui-e-menu")}},{key:"getMenuScope",value:function(){return this.getMenuContainer().closest("[data-widget-number]").first()}},{key:"getWidgetElement",value:function(){return this.getMenuContainer().closest(".elementor-widget-uicore-advanced-menu, .ui-e-advanced-menu").first()}},{key:"isOwnedMenuNode",value:function(e){var t=this.getMenuScope()[0];return!(!t||!e)&&jQuery(e).closest("[data-widget-number]")[0]===t}},{key:"findOwnedMenuNodes",value:function(e){var n=this;return this.$el.find(e).filter(function(e,t){return n.isOwnedMenuNode(t)})}},{key:"getMenuItem",value:function(e){return this.getMenuList().children('.ui-e-menu-item[data-menu-index="'.concat(e,'"]:not(.ui-e-converted-widget-placeholder)')).first()}},{key:"getWidgetAreaPlaceholder",value:function(e){return this.getMenuList().siblings('.ui-e-widget-area-placeholder[data-menu-index="'.concat(e,'"]')).first()}},{key:"getMenuItemSubmenu",value:function(e){return this.getMenuItem(e).children(".ui-e-menu-content.ui-e-submenu[data-menu-index]").first()}},{key:"isMenuItemSubmenuEnabled",value:function(e){return this.getMenuItem(e).hasClass("ui-e-has-submenu")}},{key:"getSubmenuNodeScore",value:function(e){var t=jQuery(e);return 10*t.children(".e-con-inner").children(".elementor-element:not(.elementor-shape):not(.elementor-empty-view)").length+(!!Number.isInteger(Number.parseInt(t.attr("data-menu-index"),10))&&this.getMenuItem(Number.parseInt(t.attr("data-menu-index"),10))[0]===e.parentElement?1:0)}},{key:"syncMenuItemSubmenu",value:function(e){var t,n,r,u,i,l=this;Number.isInteger(e)&&(t=this.getMenuItem(e)).length&&(n=t.children(".ui-e-submenu-placeholder").first(),i=(r=this.findOwnedMenuNodes('.ui-e-menu-content.ui-e-submenu[data-menu-index="'.concat(e,'"]')).toArray()).length?r.slice().sort(function(e,t){return l.getSubmenuNodeScore(t)-l.getSubmenuNodeScore(e)})[0]:null,u=i?jQuery(i):n.length?n:jQuery("<div />",{class:"ui-e-menu-content ui-e-submenu","data-menu-index":e}),i=this.isMenuItemSubmenuEnabled(e),u.addClass("ui-e-menu-content ui-e-submenu").attr("data-menu-index",e).attr("id",n.attr("data-container-id")||u.attr("id")),i?u.removeAttr("hidden"):u.attr("hidden","hidden").removeClass("ui-e-open"),t[0].contains(u[0])||(n.length?n.replaceWith(u):t.append(u)),r.forEach(function(e){e=jQuery(e);e[0]!==u[0]&&e.remove()}),t.children(".ui-e-submenu-placeholder").not(u).remove())}},{key:"clearMenuSyncFrame",value:function(){this.menuSyncFrame&&(window.cancelAnimationFrame(this.menuSyncFrame),this.menuSyncFrame=null)}},{key:"scheduleMenuSync",value:function(){var e=this;this.clearMenuSyncFrame(),this.menuSyncFrame=window.requestAnimationFrame(function(){e.menuSyncFrame=null,e.syncMenuStructure()})}},{key:"syncMenuStructure",value:function(){var i=this,n=new Set;this.getMenuList().children(".ui-e-menu-item[data-menu-index]:not(.ui-e-converted-widget-placeholder)").each(function(e,t){t=Number.parseInt(jQuery(t).attr("data-menu-index"),10);Number.isInteger(t)&&n.add(t)}),this.findOwnedMenuNodes(".ui-e-menu-content.ui-e-submenu[data-menu-index]").each(function(e,t){t=Number.parseInt(jQuery(t).attr("data-menu-index"),10);Number.isInteger(t)&&n.add(t)}),n.forEach(function(e){return i.syncMenuItemSubmenu(e)}),this.findOwnedMenuNodes(".ui-e-widget-area[data-menu-index]").each(function(e,t){var n=jQuery(t),r=Number.parseInt(n.attr("data-menu-index"),10),u=i.getMenuContainer(),r=Number.isInteger(r)?i.getWidgetAreaPlaceholder(r):jQuery();u.length&&u[0]!==t.parentElement&&(r.length?r.replaceWith(n):u.append(n))})}},{key:"observeMenuStructure",value:function(){var t=this,e=this.getMenuContainer()[0];e&&!this.menuObserver&&(this.menuObserver=new MutationObserver(function(e){e.some(function(e){var t=e.addedNodes,e=e.target;return!!(e instanceof HTMLElement&&e.matches(".ui-e-menu, .ui-e-menu-list, .ui-e-menu-item"))||Array.from(t).some(function(e){return e instanceof HTMLElement&&(e.matches(".ui-e-menu-content.ui-e-submenu, .ui-e-widget-area")||e.querySelector(".ui-e-menu-content.ui-e-submenu, .ui-e-widget-area"))})})&&t.scheduleMenuSync()}),this.menuObserver.observe(e,{childList:!0,subtree:!0}),this.scheduleMenuSync())}},{key:"onRender",value:function(){_superPropGet(i,"onRender",this,3)([]),this.observeMenuStructure()}},{key:"onDestroy",value:function(){var e;this.clearMenuSyncFrame(),null!=(e=this.menuObserver)&&e.disconnect(),(this.menuObserver=null)!=(e=_superPropGet(i,"onDestroy",this,3))&&e([])}},{key:"getChildViewContainer",value:function(e,t){var n=this.getChildIndex(t),r=n?this.getWidgetAreaPlaceholder(n):jQuery(),n=n?this.getMenuItem(n):jQuery();return r.length?r.parent():n.length?n:_superPropGet(i,"getChildViewContainer",this,3)([e,t])}},{key:"onAddChild",value:function(e){var t=this.getChildIndex(e),n=this.getMenuItem(t),r=n.hasClass("ui-e-has-submenu"),u=this.getWidgetAreaPlaceholder(t),i=n.children(".ui-e-submenu-placeholder").first(),l=this.getWidgetNumber(),o=i.attr("data-container-id"),o=l?"ui-e-menu-content-".concat(l).concat(t):o||e.$el.attr("id");u.length?(l=u.attr("data-container-id")||(l?"ui-e-widget-area-".concat(l).concat(t):e.$el.attr("id")),e.$el.removeClass("ui-e-menu-content ui-e-submenu").addClass("ui-e-widget-area").attr({id:l,"data-menu-index":t}),u.replaceWith(e.$el)):(e.$el.attr({id:o,"data-menu-index":t}),e.$el.addClass("ui-e-menu-content ui-e-submenu"),r?e.$el.removeAttr("hidden"):e.$el.attr("hidden","hidden").removeClass("ui-e-open"),i.length?i.replaceWith(e.$el):n.length&&!n[0].contains(e.el)&&n.append(e.$el)),this.syncMenuStructure(),this.scheduleMenuSync()}}])}(),e=function(){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,elementor.modules.elements.types.NestedElementBase),_createClass(e,[{key:"getType",value:function(){return"uicore-tabs"}},{key:"getView",value:function(){return t}}])}(),i=function(){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,elementor.modules.elements.types.NestedElementBase),_createClass(e,[{key:"getType",value:function(){return"uicore-custom-carousel"}},{key:"getView",value:function(){return n}}])}(),l=function(){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,elementor.modules.elements.types.NestedElementBase),_createClass(e,[{key:"getType",value:function(){return"uicore-custom-slider"}},{key:"getView",value:function(){return n}}])}(),o=function(){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,elementor.modules.elements.types.NestedElementBase),_createClass(e,[{key:"getType",value:function(){return"uicore-custom-table"}},{key:"getView",value:function(){return r}}])}(),a=function(){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,elementor.modules.elements.types.NestedElementBase),_createClass(e,[{key:"getType",value:function(){return"uicore-advanced-menu"}},{key:"getView",value:function(){return u}}])}();elementor.elementsManager.registerElementType(new e),elementor.elementsManager.registerElementType(new i),elementor.elementsManager.registerElementType(new l),elementor.elementsManager.registerElementType(new o),elementor.elementsManager.registerElementType(new a)}); |
|
1
|
+"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _readOnlyError(e){throw new TypeError('"'+e+'" is read-only')}function _superPropGet(e,t,n,r){var u=_get(_getPrototypeOf(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof u?function(e){return u.apply(n,e)}:u}function _get(){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=_superPropBase(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(null,arguments)}function _superPropBase(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_toPropertyKey(r.key),r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _callSuper(e,t,n){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,n||[],_getPrototypeOf(e).constructor):t.apply(e,n))}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}!function(e){function d(){try{var e,t,n,r;null!=(e=window.elementor)&&null!=(e=e.elementsManager)&&null!=(e=e.elementTypes)&&e.widget&&"function"!=typeof(n=window.elementor.elementsManager.elementTypes.widget).getEmptyView&&(n.getEmptyView=function(){var e,t=null==(t=window.elementor)||null==(t=t.modules)||null==(t=t.elements)||null==(t=t.types)?void 0:t.NestedElementBase;return null!=t&&null!=(e=t.prototype)&&e.getEmptyView?t.prototype.getEmptyView.call(this):function(){return null}}),null!=(t=window.elementor)&&null!=(t=t.modules)&&null!=(t=t.elements)&&null!=(t=t.types)&&t.Widget&&(r=window.elementor.modules.elements.types.Widget).prototype&&!r.prototype.hasOwnProperty("getEmptyView")&&(r.prototype.getEmptyView=function(){var e,t=null==(t=window.elementor)||null==(t=t.modules)||null==(t=t.elements)||null==(t=t.types)?void 0:t.NestedElementBase;return null!=t&&null!=(e=t.prototype)&&e.getEmptyView?t.prototype.getEmptyView.call(this):function(){return null}})}catch(e){}}var m=!1;function t(){d();var t,n,r,u,i,e,l,o,a=null==(a=window.elementor)||null==(a=a.modules)||null==(a=a.elements)||null==(a=a.types)?void 0:a.NestedElementBase,s=null==(s=window.$e)||null==(s=s.components)||null==(s=s.get("nested-elements"))||null==(s=s.exports)?void 0:s.NestedView;function c(e){var t=e.getType();window.elementor.elementsManager.elementTypes[t]||window.elementor.elementsManager.registerElementType(e)}a&&"function"==typeof a&&s&&(m||null!=(a=window.elementor)&&a.elementsManager&&(a=null==(a=window.elementor)||null==(a=a.modules)||null==(a=a.elements)||null==(a=a.types)?void 0:a.NestedElementBase,t=null==(s=window.$e)||null==(s=s.components)||null==(s=s.get("nested-elements"))||null==(s=s.exports)?void 0:s.NestedView,a)&&"function"==typeof a&&t&&(d(),n=function(){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,t),_createClass(e,[{key:"filter",value:function(e,t){return e.attributes.dataIndex=t+1,!0}},{key:"onAddChild",value:function(e){var t=e._parent.$el,n=t.find(".ui-e-tabs, .e-n-tabs")[0],n=(null==n||null==(n=n.dataset)?void 0:n.widgetNumber)||"",r=e.model.attributes.dataIndex,t=null==(t=t.find('.ui-e-tab-title[data-tab-index="'.concat(r,'"], .e-n-tab-title[data-tab-index="').concat(r,'"]')))?void 0:t.attr("id");e.$el.attr({id:"ui-e-tab-content-"+n+r,role:"tabpanel","aria-labelledby":t,"data-tab-index":r,style:"--ui-e-tabs-order: "+r+";"}),1===r&&e.$el.addClass("ui-e-active")}}])}(),r=function(){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,$e.components.get("nested-elements").exports.NestedView),_createClass(e,[{key:"onAddChild",value:function(e){e.$el.addClass("ui-e-item")}}])}(),u=function(){function u(){var e;_classCallCheck(this,u);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=_callSuper(this,u,[].concat(n))).onRerenderRequest=e.onRerenderRequest.bind(e),elementor.channels.editor.on("ui-e-custom-table-rerender",e.onRerenderRequest),e}return _inherits(u,$e.components.get("nested-elements").exports.NestedView),_createClass(u,[{key:"getModelId",value:function(){var e,t;return(null==(e=this.model)||null==(t=e.get)?void 0:t.call(e,"id"))||(null==(t=this.model)||null==(t=t.attributes)?void 0:t.id)||null}},{key:"isEventTarget",value:function(e){var t,n;return((null==e||null==(t=e.options)||null==(t=t.element)||null==(t=t.model)||null==(n=t.get)?void 0:n.call(t,"id"))||(null==e||null==(n=e.options)||null==(n=n.element)||null==(n=n.model)||null==(n=n.attributes)?void 0:n.id)||null)===this.getModelId()}},{key:"onRerenderRequest",value:function(e){this.isEventTarget(e)&&("function"==typeof(null==(e=this.model)?void 0:e.renderRemoteServer)?this.model.renderRemoteServer():this.render())}},{key:"getExpectedCellCount",value:function(){var e=this.$el.find(".ui-e-table")[0];return e&&(e=Number.parseInt(e.dataset.cellCount||"",10),Number.isInteger(e))?e:null}},{key:"filter",value:function(e,t){e.attributes.dataIndex=t+1;e=this.getExpectedCellCount();return!Number.isInteger(e)||t<e}},{key:"onAddChild",value:function(e){var t=e._parent.$el.find(".ui-e-table")[0],t=Number.parseInt(t.style.getPropertyValue("--ui-e-cols-qty"),10)||1,n=e.$el,r=e.model.attributes.dataIndex||e._index+1,u=Math.floor((r-1)/t)%2!=0?"ui-e-even":"ui-e-odd";e.$el.addClass(u),n.addClass("ui-e-table-cell").addClass("ui-e-item"),(r-1)%t==0?e.$el.addClass("ui-e-first-row-cel"):r%t==0&&e.$el.addClass("ui-e-last-row-cel")}},{key:"onDestroy",value:function(){var e;elementor.channels.editor.off("ui-e-custom-table-rerender",this.onRerenderRequest),null!=(e=_superPropGet(u,"onDestroy",this,3))&&e([])}}])}(),i=function(){function i(){var e;_classCallCheck(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=_callSuper(this,i,[].concat(n))).menuObserver=null,e.menuSyncFrame=null,e}return _inherits(i,$e.components.get("nested-elements").exports.NestedView),_createClass(i,[{key:"events",value:function(){var e,r=this,u=(e=(null==(e=_superPropGet(i,"events",this,3))?void 0:e([]))||{}).click;return e.click=function(e){var t,n;return null!=(t=e.target)&&null!=(n=t.closest)&&null!=(n=n.call(t,".elementor"))&&null!=(n=n.dataset)&&n.elementorId&&"function"==typeof u?u.call(r,e):void 0},e}},{key:"filter",value:function(e,t){return e.attributes.dataIndex=t+1,!0}},{key:"getChildIndex",value:function(e){var t=null==e||null==(t=e.model)||null==(t=t.attributes)?void 0:t.dataIndex;return Number.isInteger(t)?t:Number.isInteger(null==e?void 0:e._index)?e._index+1:null}},{key:"getWidgetNumber",value:function(){return this.$el.closest("[data-widget-number]").attr("data-widget-number")}},{key:"getMenuList",value:function(){return this.$el.hasClass("ui-e-menu-list")?this.$el:this.$el.find(".ui-e-menu-list").first()}},{key:"getMenuContainer",value:function(){return this.getMenuList().parent(".ui-e-menu")}},{key:"getMenuScope",value:function(){return this.getMenuContainer().closest("[data-widget-number]").first()}},{key:"getWidgetElement",value:function(){return this.getMenuContainer().closest(".elementor-widget-uicore-advanced-menu, .ui-e-advanced-menu").first()}},{key:"isOwnedMenuNode",value:function(e){var t=this.getMenuScope()[0];return!(!t||!e)&&jQuery(e).closest("[data-widget-number]")[0]===t}},{key:"findOwnedMenuNodes",value:function(e){var n=this;return this.$el.find(e).filter(function(e,t){return n.isOwnedMenuNode(t)})}},{key:"getMenuItem",value:function(e){return this.getMenuList().children('.ui-e-menu-item[data-menu-index="'.concat(e,'"]:not(.ui-e-converted-widget-placeholder)')).first()}},{key:"getWidgetAreaPlaceholder",value:function(e){return this.getMenuList().siblings('.ui-e-widget-area-placeholder[data-menu-index="'.concat(e,'"]')).first()}},{key:"getMenuItemSubmenu",value:function(e){return this.getMenuItem(e).children(".ui-e-menu-content.ui-e-submenu[data-menu-index]").first()}},{key:"isMenuItemSubmenuEnabled",value:function(e){return this.getMenuItem(e).hasClass("ui-e-has-submenu")}},{key:"getSubmenuNodeScore",value:function(e){var t=jQuery(e);return 10*t.children(".e-con-inner").children(".elementor-element:not(.elementor-shape):not(.elementor-empty-view)").length+(!!Number.isInteger(Number.parseInt(t.attr("data-menu-index"),10))&&this.getMenuItem(Number.parseInt(t.attr("data-menu-index"),10))[0]===e.parentElement?1:0)}},{key:"syncMenuItemSubmenu",value:function(e){var t,n,r,u,i,l=this;Number.isInteger(e)&&(t=this.getMenuItem(e)).length&&(n=t.children(".ui-e-submenu-placeholder").first(),i=(r=this.findOwnedMenuNodes('.ui-e-menu-content.ui-e-submenu[data-menu-index="'.concat(e,'"]')).toArray()).length?r.slice().sort(function(e,t){return l.getSubmenuNodeScore(t)-l.getSubmenuNodeScore(e)})[0]:null,u=i?jQuery(i):n.length?n:jQuery("<div />",{class:"ui-e-menu-content ui-e-submenu","data-menu-index":e}),i=this.isMenuItemSubmenuEnabled(e),u.addClass("ui-e-menu-content ui-e-submenu").attr("data-menu-index",e).attr("id",n.attr("data-container-id")||u.attr("id")),i?u.removeAttr("hidden"):u.attr("hidden","hidden").removeClass("ui-e-open"),t[0].contains(u[0])||(n.length?n.replaceWith(u):t.append(u)),r.forEach(function(e){e=jQuery(e);e[0]!==u[0]&&e.remove()}),t.children(".ui-e-submenu-placeholder").not(u).remove())}},{key:"clearMenuSyncFrame",value:function(){this.menuSyncFrame&&(window.cancelAnimationFrame(this.menuSyncFrame),this.menuSyncFrame=null)}},{key:"scheduleMenuSync",value:function(){var e=this;this.clearMenuSyncFrame(),this.menuSyncFrame=window.requestAnimationFrame(function(){e.menuSyncFrame=null,e.syncMenuStructure()})}},{key:"syncMenuStructure",value:function(){var i=this,n=new Set;this.getMenuList().children(".ui-e-menu-item[data-menu-index]:not(.ui-e-converted-widget-placeholder)").each(function(e,t){t=Number.parseInt(jQuery(t).attr("data-menu-index"),10);Number.isInteger(t)&&n.add(t)}),this.findOwnedMenuNodes(".ui-e-menu-content.ui-e-submenu[data-menu-index]").each(function(e,t){t=Number.parseInt(jQuery(t).attr("data-menu-index"),10);Number.isInteger(t)&&n.add(t)}),n.forEach(function(e){return i.syncMenuItemSubmenu(e)}),this.findOwnedMenuNodes(".ui-e-widget-area[data-menu-index]").each(function(e,t){var n=jQuery(t),r=Number.parseInt(n.attr("data-menu-index"),10),u=i.getMenuContainer(),r=Number.isInteger(r)?i.getWidgetAreaPlaceholder(r):jQuery();u.length&&u[0]!==t.parentElement&&(r.length?r.replaceWith(n):u.append(n))})}},{key:"observeMenuStructure",value:function(){var t=this,e=this.getMenuContainer()[0];e&&!this.menuObserver&&(this.menuObserver=new MutationObserver(function(e){e.some(function(e){var t=e.addedNodes,e=e.target;return!!(e instanceof HTMLElement&&e.matches(".ui-e-menu, .ui-e-menu-list, .ui-e-menu-item"))||Array.from(t).some(function(e){return e instanceof HTMLElement&&(e.matches(".ui-e-menu-content.ui-e-submenu, .ui-e-widget-area")||e.querySelector(".ui-e-menu-content.ui-e-submenu, .ui-e-widget-area"))})})&&t.scheduleMenuSync()}),this.menuObserver.observe(e,{childList:!0,subtree:!0}),this.scheduleMenuSync())}},{key:"onRender",value:function(){_superPropGet(i,"onRender",this,3)([]),this.observeMenuStructure()}},{key:"onDestroy",value:function(){var e;this.clearMenuSyncFrame(),null!=(e=this.menuObserver)&&e.disconnect(),(this.menuObserver=null)!=(e=_superPropGet(i,"onDestroy",this,3))&&e([])}},{key:"getChildViewContainer",value:function(e,t){var n=this.getChildIndex(t),r=n?this.getWidgetAreaPlaceholder(n):jQuery(),n=n?this.getMenuItem(n):jQuery();return r.length?r.parent():n.length?n:_superPropGet(i,"getChildViewContainer",this,3)([e,t])}},{key:"onAddChild",value:function(e){var t=this.getChildIndex(e),n=this.getMenuItem(t),r=n.hasClass("ui-e-has-submenu"),u=this.getWidgetAreaPlaceholder(t),i=n.children(".ui-e-submenu-placeholder").first(),l=this.getWidgetNumber(),o=i.attr("data-container-id"),o=l?"ui-e-menu-content-".concat(l).concat(t):o||e.$el.attr("id");u.length?(l=u.attr("data-container-id")||(l?"ui-e-widget-area-".concat(l).concat(t):e.$el.attr("id")),e.$el.removeClass("ui-e-menu-content ui-e-submenu").addClass("ui-e-widget-area").attr({id:l,"data-menu-index":t}),u.replaceWith(e.$el)):(e.$el.attr({id:o,"data-menu-index":t}),e.$el.addClass("ui-e-menu-content ui-e-submenu"),r?e.$el.removeAttr("hidden"):e.$el.attr("hidden","hidden").removeClass("ui-e-open"),i.length?i.replaceWith(e.$el):n.length&&!n[0].contains(e.el)&&n.append(e.$el)),this.syncMenuStructure(),this.scheduleMenuSync()}}])}(),s=function(){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,elementor.modules.elements.types.NestedElementBase),_createClass(e,[{key:"getType",value:function(){return"uicore-tabs"}},{key:"getView",value:function(){return n}}])}(),a=function(){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,elementor.modules.elements.types.NestedElementBase),_createClass(e,[{key:"getType",value:function(){return"uicore-custom-carousel"}},{key:"getView",value:function(){return r}}])}(),e=function(){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,elementor.modules.elements.types.NestedElementBase),_createClass(e,[{key:"getType",value:function(){return"uicore-custom-slider"}},{key:"getView",value:function(){return r}}])}(),l=function(){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,elementor.modules.elements.types.NestedElementBase),_createClass(e,[{key:"getType",value:function(){return"uicore-custom-table"}},{key:"getView",value:function(){return u}}])}(),o=function(){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,elementor.modules.elements.types.NestedElementBase),_createClass(e,[{key:"getType",value:function(){return"uicore-advanced-menu"}},{key:"getView",value:function(){return i}}])}(),c(new s),c(new a),c(new e),c(new l),c(new o),m=!0))}t(),null!=(e=window.elementorCommon)&&null!=(e=e.elements)&&e.$window&&(window.elementorCommon.elements.$window.on("elementor/nested-element-type-loaded",t),window.elementorCommon.elements.$window.on("elementor:init-components",t)),window.addEventListener("elementor/init",t)}(); |