JezK
Edit File: common-modules.min.js
(function(t){var r=Object.create,i=Object.defineProperty,__name=(t,r)=>i(t,`name`,{value:r,configurable:!0}),a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,__esmMin=(t,r,i)=>()=>{if(i)throw i[0];try{return t&&(r=t(t=0)),r}catch(t){throw i=[t],t}},__commonJSMin=(t,r)=>()=>(r||(t((r={exports:{}}).exports,r),t=null),r.exports),__exportAll=(t,r)=>{let a={};for(var o in t)i(a,o,{get:t[o],enumerable:!0});return r||i(a,Symbol.toStringTag,{value:`Module`}),a},__copyProps=(t,r,c,u)=>{if(r&&typeof r==`object`||typeof r==`function`)for(var d=o(r),p=0,m=d.length,h;p<m;p++)h=d[p],!l.call(t,h)&&h!==c&&i(t,h,{get:(t=>r[t]).bind(null,h),enumerable:!(u=a(r,h))||u.enumerable});return t},__toESM=(t,a,o)=>(o=t==null?{}:r(c(t)),__copyProps(a||!t||!t.__esModule?i(o,`default`,{value:t,enumerable:!0}):o,t));function _typeof(t){"@babel/helpers - typeof";return _typeof=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(t){return typeof t}:function(t){return t&&typeof Symbol==`function`&&t.constructor===Symbol&&t!==Symbol.prototype?`symbol`:typeof t},_typeof(t)}var u=__esmMin((()=>{})),d=__toESM(__commonJSMin(((t,r)=>{u();var i=function Module(){var t=jQuery,r=arguments,i=this,a={},o,c=function ensureClosureMethods(){t.each(i,function(t){var r=i[t];typeof r==`function`&&(i[t]=function(){return r.apply(i,arguments)})})},l=function initSettings(){o=i.getDefaultSettings();var a=r[0];a&&t.extend(!0,o,a)},u=function init(){i.__construct.apply(i,r),c(),l(),i.trigger(`init`)};this.getItems=function(t,r){if(r){var i=r.split(`.`),a=i.splice(0,1);return i.length?t[a]?this.getItems(t[a],i.join(`.`)):void 0:t[a]}return t},this.getSettings=function(t){return this.getItems(o,t)},this.setSettings=function(r,a,c){if(c||(c=o),_typeof(r)===`object`)return t.extend(c,r),i;var l=r.split(`.`),u=l.splice(0,1);return l.length?(c[u]||(c[u]={}),i.setSettings(l.join(`.`),a,c[u])):(c[u]=a,i)},this.getErrorMessage=function(t,r){var i;switch(t){case`forceMethodImplementation`:i=`The method '${r}' must to be implemented in the inheritor child.`;break;default:i=`An error occurs`}return i},this.forceMethodImplementation=function(t){throw Error(this.getErrorMessage(`forceMethodImplementation`,t))},this.on=function(r,o){return _typeof(r)===`object`?(t.each(r,function(t){i.on(t,this)}),i):(r.split(` `).forEach(function(t){a[t]||(a[t]=[]),a[t].push(o)}),i)},this.off=function(t,r){if(!a[t])return i;if(!r)return delete a[t],i;var o=a[t].indexOf(r);return o!==-1&&(delete a[t][o],a[t]=a[t].filter(function(t){return t})),i},this.trigger=function(r){var o=`on`+r[0].toUpperCase()+r.slice(1),c=Array.prototype.slice.call(arguments,1);i[o]&&i[o].apply(i,c);var l=a[r];return l&&t.each(l,function(t,r){r.apply(i,c)}),i},u()};i.prototype.__construct=function(){},i.prototype.getDefaultSettings=function(){return{}},i.prototype.getConstructorID=function(){return this.constructor.name},i.extend=function(t){var r=jQuery,i=this,a=function child(){return i.apply(this,arguments)};return r.extend(a,i),a.prototype=Object.create(r.extend({},i.prototype,t)),a.prototype.constructor=a,a.__super__=i.prototype,a},r.exports=i}))()),p=d.default.extend({elements:null,getDefaultElements:function getDefaultElements(){return{}},bindEvents:function bindEvents(){},onInit:function onInit(){this.initElements(),this.bindEvents()},initElements:function initElements(){this.elements=this.getDefaultElements()}});function _classCallCheck(t,r){if(!(t instanceof r))throw TypeError(`Cannot call a class as a function`)}u();function toPrimitive(t,r){if(_typeof(t)!=`object`||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r||`default`);if(_typeof(a)!=`object`)return a;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(r===`string`?String:Number)(t)}u();function toPropertyKey(t){var r=toPrimitive(t,`string`);return _typeof(r)==`symbol`?r:r+``}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,`value`in a&&(a.writable=!0),Object.defineProperty(t,toPropertyKey(a.key),a)}}function _createClass(t,r,i){return r&&_defineProperties(t.prototype,r),i&&_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function _assertThisInitialized(t){if(t===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t}u();function _possibleConstructorReturn(t,r){if(r&&(_typeof(r)==`object`||typeof r==`function`))return r;if(r!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return _assertThisInitialized(t)}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _setPrototypeOf(t,r){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},_setPrototypeOf(t,r)}function _inherits(t,r){if(typeof r!=`function`&&r!==null)throw TypeError(`Super expression must either be null or a function`);t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&_setPrototypeOf(t,r)}function _superPropBase(t,r){for(;!{}.hasOwnProperty.call(t,r)&&(t=_getPrototypeOf(t))!==null;);return t}function _get(){return _get=typeof Reflect<`u`&&Reflect.get?Reflect.get.bind():function(t,r,i){var a=_superPropBase(t,r);if(a){var o=Object.getOwnPropertyDescriptor(a,r);return o.get?o.get.call(arguments.length<3?t:i):o.value}},_get.apply(null,arguments)}function _superPropGet$1(t,r,i,a){var o=_get(_getPrototypeOf(1&a?t.prototype:t),r,i);return 2&a&&typeof o==`function`?function(t){return o.apply(i,t)}:o}__name(_superPropGet$1,`_superPropGet`);var m=function(){function InstanceType(){var t=this;_classCallCheck(this,InstanceType);for(var r=this instanceof InstanceType?this.constructor:void 0,i=[];r.__proto__&&r.__proto__.name;)i.push(r.__proto__),r=r.__proto__;i.reverse().forEach(function(r){return t instanceof r})}return _createClass(InstanceType,null,[{key:Symbol.hasInstance,value:function value(t){var r=_superPropGet$1(InstanceType,Symbol.hasInstance,this,2)([t]);if(t&&!t.constructor.getInstanceType)return r;if(t&&(t.instanceTypes||(t.instanceTypes=[]),r||this.getInstanceType()===t.constructor.getInstanceType()&&(r=!0),r)){var i=this.getInstanceType===InstanceType.getInstanceType?`BaseInstanceType`:this.getInstanceType();t.instanceTypes.indexOf(i)===-1&&t.instanceTypes.push(i)}return!r&&t&&(r=t.instanceTypes&&Array.isArray(t.instanceTypes)&&t.instanceTypes.indexOf(this.getInstanceType())!==-1),r}},{key:`getInstanceType`,value:function getInstanceType(){elementorModules.ForceMethodImplementation()}}])}();function _createForOfIteratorHelper(t,r){var i=typeof Symbol<`u`&&t[Symbol.iterator]||t[`@@iterator`];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray$1(t))||r&&t&&typeof t.length==`number`){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c,l=!0,u=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();return l=t.done,t},e:function e(t){u=!0,c=t},f:function f(){try{l||i.return==null||i.return()}finally{if(u)throw c}}}}function _unsupportedIterableToArray$1(t,r){if(t){if(typeof t==`string`)return _arrayLikeToArray$1(t,r);var i={}.toString.call(t).slice(8,-1);return i===`Object`&&t.constructor&&(i=t.constructor.name),i===`Map`||i===`Set`?Array.from(t):i===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray$1(t,r):void 0}}__name(_unsupportedIterableToArray$1,`_unsupportedIterableToArray`);function _arrayLikeToArray$1(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=Array(r);i<r;i++)a[i]=t[i];return a}__name(_arrayLikeToArray$1,`_arrayLikeToArray`);var h=__name((function(t,r){r=Array.isArray(r)?r:[r];var i=_createForOfIteratorHelper(r),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;if(t.constructor.name===o.prototype[Symbol.toStringTag])return!0}}catch(t){i.e(t)}finally{i.f()}return!1}),`default`);u();function _callSuper$15(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$16()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$15,`_callSuper`);function _isNativeReflectConstruct$16(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$16=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$16,`_isNativeReflectConstruct`);var g=function(t){function ArgsObject(t){var r;return _classCallCheck(this,ArgsObject),r=_callSuper$15(this,ArgsObject),r.args=t,r}return _inherits(ArgsObject,t),_createClass(ArgsObject,[{key:`requireArgument`,value:function requireArgument(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.args;if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`${t} is required.`)}},{key:`requireArgumentType`,value:function requireArgumentType(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.args;if(this.requireArgument(t,i),_typeof(i[t])!==r)throw Error(`${t} invalid type: ${r}.`)}},{key:`requireArgumentInstance`,value:function requireArgumentInstance(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.args;if(this.requireArgument(t,i),!(i[t]instanceof r)&&!h(i[t],r))throw Error(`${t} invalid instance.`)}},{key:`requireArgumentConstructor`,value:function requireArgumentConstructor(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.args;if(this.requireArgument(t,i),i[t].constructor.toString()!==r.prototype.constructor.toString())throw Error(`${t} invalid constructor type.`)}}],[{key:`getInstanceType`,value:function getInstanceType(){return`ArgsObject`}}])}(m),v=p.extend({getDefaultSettings:function getDefaultSettings(){return{container:null,items:null,columnsCount:3,verticalSpaceBetween:30}},getDefaultElements:function getDefaultElements(){return{$container:jQuery(this.getSettings(`container`)),$items:jQuery(this.getSettings(`items`))}},run:function run(){var t=[],r=this.elements.$container.position().top,i=this.getSettings(),a=i.columnsCount;r+=parseInt(this.elements.$container.css(`margin-top`),10),this.elements.$items.each(function(o){var c=Math.floor(o/a),l=jQuery(this),u=l[0].getBoundingClientRect().height+i.verticalSpaceBetween;if(c){var d=l.position(),p=o%a,m=d.top-r-t[p];m-=parseInt(l.css(`margin-top`),10),m*=-1,l.css(`margin-top`,m+`px`),t[p]+=u}else t.push(u)})}}),y=function(){function Scroll(){_classCallCheck(this,Scroll)}return _createClass(Scroll,null,[{key:`scrollObserver`,value:function scrollObserver(t){var r=0,i={root:t.root||null,rootMargin:t.offset||`0px`,threshold:function buildThresholds(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=[];if(t>0&&t<=100)for(var i=100/t,a=0;a<=100;a+=i)r.push(a/100);else r.push(0);return r}(t.sensitivity)};function handleIntersect(i){var a=i[0].boundingClientRect.y,o=i[0].isIntersecting,c=a<r?`down`:`up`,l=Math.abs(parseFloat((i[0].intersectionRatio*100).toFixed(2)));t.callback({sensitivity:t.sensitivity,isInViewport:o,scrollPercentage:l,intersectionScrollDirection:c}),r=a}return new IntersectionObserver(handleIntersect,i)}},{key:`getElementViewportPercentage`,value:function getElementViewportPercentage(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t[0].getBoundingClientRect(),a=r.start||0,o=r.end||0,c=window.innerHeight*a/100,l=window.innerHeight*o/100,u=i.top-window.innerHeight,d=i.top+c+t.height(),p=0-u+c,m=d-u+l,h=Math.max(0,Math.min(p/m,1));return parseFloat((h*100).toFixed(2))}},{key:`getPageScrollPercentage`,value:function getPageScrollPercentage(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=t.start||0,a=t.end||0,o=r||document.documentElement.scrollHeight-document.documentElement.clientHeight,c=o*i/100,l=o+c+o*a/100;return(document.documentElement.scrollTop+document.body.scrollTop+c)/l*100}}])}();function _isNativeFunction(t){try{return Function.toString.call(t).indexOf(`[native code]`)!==-1}catch(r){return typeof t==`function`}}function _isNativeReflectConstruct$15(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$15=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$15,`_isNativeReflectConstruct`);function _construct(t,r,i){if(_isNativeReflectConstruct$15())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var o=new(t.bind.apply(t,a));return i&&_setPrototypeOf(o,i.prototype),o}function _wrapNativeSuper(t){var r=typeof Map==`function`?new Map:void 0;return _wrapNativeSuper=function _wrapNativeSuper(t){if(t===null||!_isNativeFunction(t))return t;if(typeof t!=`function`)throw TypeError(`Super expression must either be null or a function`);if(r!==void 0){if(r.has(t))return r.get(t);r.set(t,Wrapper)}function Wrapper(){return _construct(t,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(t.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,t)},_wrapNativeSuper(t)}function _callSuper$14(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$14()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$14,`_callSuper`);function _isNativeReflectConstruct$14(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$14=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$14,`_isNativeReflectConstruct`);var b=function(t){function ForceMethodImplementation(){var t,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return _classCallCheck(this,ForceMethodImplementation),t=_callSuper$14(this,ForceMethodImplementation,[`${r.isStatic?`static `:``}${r.fullName}() should be implemented, please provide '${r.functionName||r.fullName}' functionality.`,i]),Object.keys(i).length&&console.error(i),Error.captureStackTrace(t,ForceMethodImplementation),t}return _inherits(ForceMethodImplementation,t),_createClass(ForceMethodImplementation)}(_wrapNativeSuper(Error)),x=__name((function(t){var r=Error().stack.split(` `)[2].trim(),i=r.startsWith(`at new`)?`constructor`:r.split(` `)[1],a={};if(a.functionName=i,a.fullName=i,a.functionName.includes(`.`)){var o=a.functionName.split(`.`);a.className=o[0],a.functionName=o[1]}else a.isStatic=!0;throw new b(a,t)}),`default`);function _defineProperty(t,r,i){return(r=toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function ownKeys$2(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),i.push.apply(i,a)}return i}__name(ownKeys$2,`ownKeys`);function _objectSpread$2(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]==null?{}:arguments[r];r%2?ownKeys$2(Object(i),!0).forEach(function(r){_defineProperty(t,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys$2(Object(i)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))})}return t}__name(_objectSpread$2,`_objectSpread`);function createGetInitialState(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(i,a){var o=a;if(i.hasOwnProperty(`uploadedData`)){var c;o=!1;var l=i.uploadedData.manifest.templates,u=((c=elementorAppConfig)==null||(c=c[`import-export-customization`])==null?void 0:c.exportGroups)||{};for(var d in l)if(u[l[d].doc_type]===t){o=!0;break}}return _objectSpread$2({enabled:o},r)}}function _arrayLikeToArray(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=Array(r);i<r;i++)a[i]=t[i];return a}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _iterableToArray(t){if(typeof Symbol<`u`&&t[Symbol.iterator]!=null||t[`@@iterator`]!=null)return Array.from(t)}function _unsupportedIterableToArray(t,r){if(t){if(typeof t==`string`)return _arrayLikeToArray(t,r);var i={}.toString.call(t).slice(8,-1);return i===`Object`&&t.constructor&&(i=t.constructor.name),i===`Map`||i===`Set`?Array.from(t):i===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _nonIterableSpread(){throw TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _objectWithoutPropertiesLoose(t,r){if(t==null)return{};var i={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(r.indexOf(a)!==-1)continue;i[a]=t[a]}return i}function _objectWithoutProperties(t,r){if(t==null)return{};var i,a,o=_objectWithoutPropertiesLoose(t,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(a=0;a<c.length;a++)i=c[a],r.indexOf(i)===-1&&{}.propertyIsEnumerable.call(t,i)&&(o[i]=t[i])}return o}var S=[`children`];function ownKeys$1(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),i.push.apply(i,a)}return i}__name(ownKeys$1,`ownKeys`);function _objectSpread$1(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]==null?{}:arguments[r];r%2?ownKeys$1(Object(i),!0).forEach(function(r){_defineProperty(t,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys$1(Object(i)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))})}return t}__name(_objectSpread$1,`_objectSpread`);var C=new(function(){function BaseRegistry(){_classCallCheck(this,BaseRegistry),this.sections=new Map}return _createClass(BaseRegistry,[{key:`register`,value:function register(t){var r=this;if(!t.key||!t.title)throw Error(`Template type must have key and title`);var i=this.get(t.key)||this.formatSection(t);if(t.children)if(i.children){var a=new Map(i.children.map(function(t){return[t.key,t]}));t.children.forEach(function(t){var i=r.formatSection(t);a.set(t.key,i)}),i.children=Array.from(a.values())}else i.children=t.children.map(function(t){return r.formatSection(t)});this.sections.set(t.key,i)}},{key:`formatSection`,value:function formatSection(t){t.children;var r=_objectWithoutProperties(t,S);return _objectSpread$1({key:r.key,title:r.title,description:r.description||``,useParentDefault:r.useParentDefault!==!1,getInitialState:r.getInitialState||null,component:r.component||null,order:r.order||10,isAvailable:r.isAvailable||function(){return!0}},r)}},{key:`getAll`,value:function getAll(){return Array.from(this.sections.values()).filter(function(t){return t.isAvailable()}).map(function(t){return t.children?_objectSpread$1(_objectSpread$1({},t),{},{children:_toConsumableArray(t.children).sort(function(t,r){return t.order-r.order})}):t}).sort(function(t,r){return t.order-r.order})}},{key:`get`,value:function get(t){return this.sections.get(t)}}])}()),w={Module:d.default,ViewModule:p,ArgsObject:g,ForceMethodImplementation:x,utils:{Masonry:v,Scroll:y},importExport:{createGetInitialState,customizationDialogsRegistry:C}};window.elementorModules?Object.assign(window.elementorModules,w):window.elementorModules=w;var T=window.elementorModules;function _callSuper$13(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$13()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$13,`_callSuper`);function _isNativeReflectConstruct$13(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$13=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$13,`_isNativeReflectConstruct`);var E=function(t){function _default(){return _classCallCheck(this,_default),_callSuper$13(this,_default,arguments)}return _inherits(_default,t),_createClass(_default,[{key:`tagName`,value:function tagName(){return`header`}},{key:`className`,value:function className(){return`elementor-templates-modal__header`}},{key:`getTemplate`,value:function getTemplate(){return`#tmpl-elementor-templates-modal__header`}},{key:`regions`,value:function regions(){return{logoArea:`.elementor-templates-modal__header__logo-area`,tools:`#elementor-template-library-header-tools`,menuArea:`.elementor-templates-modal__header__menu-area`}}},{key:`ui`,value:function ui(){return{closeModal:`.elementor-templates-modal__header__close`}}},{key:`events`,value:function events(){return{"click @ui.closeModal":`onCloseModalClick`}}},{key:`onRender`,value:function onRender(){this.bindEscapeKey()}},{key:`bindEscapeKey`,value:function bindEscapeKey(){var t=this;this.onDocumentKeyDown=function(r){r.key===`Escape`&&t.onCloseModalClick()},document.addEventListener(`keydown`,this.onDocumentKeyDown)}},{key:`onDestroy`,value:function onDestroy(){this.onDocumentKeyDown&&document.removeEventListener(`keydown`,this.onDocumentKeyDown)}},{key:`templateHelpers`,value:function templateHelpers(){return{closeType:this.getOption(`closeType`)}}},{key:`onCloseModalClick`,value:function onCloseModalClick(){this._parent._parent._parent.hideModal();var t=this.getDocumentType(),r=new CustomEvent(`core/modal/close/${t}`);window.dispatchEvent(r),this.isFloatingButtonLibraryClose()&&($e.internal(`document/save/set-is-modified`,{status:!1}),window.location.href=elementor.config.admin_floating_button_admin_url)}},{key:`getDocumentType`,value:function getDocumentType(){var t,r;return window.elementor===void 0||(t=(r=elementor)==null||(r=r.config)==null||(r=r.document)==null?void 0:r.type)==null?`default`:t}},{key:`isFloatingButtonLibraryClose`,value:function isFloatingButtonLibraryClose(){var t,r;return window.elementor&&((t=elementor.config)==null?void 0:t.admin_floating_button_admin_url)&&((r=elementor.config)==null||(r=r.document)==null?void 0:r.type)===`floating-buttons`&&(this.$el.closest(`.dialog-lightbox-widget-content`).find(`.elementor-template-library-template-floating_button`).length||this.$el.closest(`.dialog-lightbox-widget-content`).find(`#elementor-template-library-preview`).length||this.$el.closest(`.dialog-lightbox-widget-content`).find(`#elementor-template-library-templates-empty`).length)}}])}(Marionette.LayoutView);function _callSuper$12(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$12()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$12,`_callSuper`);function _isNativeReflectConstruct$12(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$12=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$12,`_isNativeReflectConstruct`);var D=function(t){function _default(){return _classCallCheck(this,_default),_callSuper$12(this,_default,arguments)}return _inherits(_default,t),_createClass(_default,[{key:`getTemplate`,value:function getTemplate(){return`#tmpl-elementor-templates-modal__header__logo`}},{key:`className`,value:function className(){return`elementor-templates-modal__header__logo`}},{key:`events`,value:function events(){return{click:`onClick`}}},{key:`templateHelpers`,value:function templateHelpers(){return{title:this.getOption(`title`)}}},{key:`onClick`,value:function onClick(){var t=this.getOption(`click`);t&&t()}}])}(Marionette.ItemView);function _callSuper$11(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$11()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$11,`_callSuper`);function _isNativeReflectConstruct$11(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$11=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$11,`_isNativeReflectConstruct`);var O=function(t){function _default(){return _classCallCheck(this,_default),_callSuper$11(this,_default,arguments)}return _inherits(_default,t),_createClass(_default,[{key:`id`,value:function id(){return`elementor-template-library-loading`}},{key:`getTemplate`,value:function getTemplate(){return`#tmpl-elementor-template-library-loading`}}])}(Marionette.ItemView);function _callSuper$10(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$10()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$10,`_callSuper`);function _isNativeReflectConstruct$10(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$10=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$10,`_isNativeReflectConstruct`);var k=function(t){function _default(){return _classCallCheck(this,_default),_callSuper$10(this,_default,arguments)}return _inherits(_default,t),_createClass(_default,[{key:`el`,value:function el(){return this.getModal().getElements(`widget`)}},{key:`regions`,value:function regions(){return{modalHeader:`.dialog-header`,modalContent:`.dialog-lightbox-content`,modalLoading:`.dialog-lightbox-loading`}}},{key:`initialize`,value:function initialize(){this.modalHeader.show(new E(this.getHeaderOptions()))}},{key:`getModal`,value:function getModal(){return this.modal||this.initModal(),this.modal}},{key:`initModal`,value:function initModal(){var t={className:`elementor-templates-modal`,closeButton:!1,draggable:!1,hide:{onOutsideClick:!1,onEscKeyPress:!1}};jQuery.extend(!0,t,this.getModalOptions()),this.modal=elementorCommon.dialogsManager.createWidget(`lightbox`,t),this.modal.getElements(`message`).append(this.modal.addElement(`content`),this.modal.addElement(`loading`)),t.draggable&&this.draggableModal()}},{key:`showModal`,value:function showModal(){this.getModal().show()}},{key:`hideModal`,value:function hideModal(){this.getModal().hide()}},{key:`draggableModal`,value:function draggableModal(){var t=this.getModal().getElements(`widgetContent`);t.draggable({containment:`parent`,stop:function stop(){t.height(``)}}),t.css(`position`,`absolute`)}},{key:`getModalOptions`,value:function getModalOptions(){return{}}},{key:`getLogoOptions`,value:function getLogoOptions(){return{}}},{key:`getHeaderOptions`,value:function getHeaderOptions(){return{closeType:`normal`}}},{key:`getHeaderView`,value:function getHeaderView(){return this.modalHeader.currentView}},{key:`showLoadingView`,value:function showLoadingView(){this.modalLoading.show(new O),this.modalLoading.$el.show(),this.modalContent.$el.hide()}},{key:`hideLoadingView`,value:function hideLoadingView(){this.modalContent.$el.show(),this.modalLoading.$el.hide()}},{key:`showLogo`,value:function showLogo(){this.getHeaderView().logoArea.show(new D(this.getLogoOptions()))}}])}(Marionette.LayoutView);function _arrayWithHoles(t){if(Array.isArray(t))return t}function _iterableToArrayLimit(t,r){var i=t==null?null:typeof Symbol<`u`&&t[Symbol.iterator]||t[`@@iterator`];if(i!=null){var a,o,c,l,u=[],d=!0,p=!1;try{if(c=(i=i.call(t)).next,r===0){if(Object(i)!==i)return;d=!1}else for(;!(d=(a=c.call(i)).done)&&(u.push(a.value),u.length!==r);d=!0);}catch(t){p=!0,o=t}finally{try{if(!d&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(p)throw o}}return u}}function _nonIterableRest(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _slicedToArray(t,r){return _arrayWithHoles(t)||_iterableToArrayLimit(t,r)||_unsupportedIterableToArray(t,r)||_nonIterableRest()}var A=function(){function Console(){_classCallCheck(this,Console)}return _createClass(Console,null,[{key:`error`,value:function error(t){$e.devTools&&$e.devTools.log.error(t),t instanceof $e.modules.HookBreak||console.error(t)}},{key:`warn`,value:function warn(){for(var t,r=`font-size: 12px; background-image: url("${elementorWebCliConfig.urls.assets}images/logo-icon.png"); background-repeat: no-repeat; background-size: contain;`,i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];a.unshift(`%c %c`,r,``),(t=console).warn.apply(t,a)}}])}(),j=function softDeprecated(t,r,i){elementorWebCliConfig.isDebug&&N(`soft`,t,r,i)},M=function hardDeprecated(t,r,i){N(`hard`,t,r,i)},N=function deprecatedMessage(t,r,i,a){var o=`\`${r}\` is ${t} deprecated since ${i}`;a&&(o+=` - Use \`${a}\` instead`),A.warn(o)},P=function(){function Deprecation(){_classCallCheck(this,Deprecation)}return _createClass(Deprecation,null,[{key:`deprecated`,value:function deprecated(t,r,i){this.isHardDeprecated(r)?M(t,r,i):j(t,r,i)}},{key:`parseVersion`,value:function parseVersion(t){var r=t.split(`.`);if(r.length<3||r.length>4)throw RangeError(`Invalid Semantic Version string provided`);var i=_slicedToArray(r,4),a=i[0],o=i[1],c=i[2],l=i[3];return{major1:parseInt(a),major2:parseInt(o),minor:parseInt(c),build:l===void 0?``:l}}},{key:`getTotalMajor`,value:function getTotalMajor(t){var r=parseInt(`${t.major1}${t.major2}0`);return r=Number((r/10).toFixed(0)),t.major2>9&&(r=t.major2-9),r}},{key:`compareVersion`,value:function compareVersion(t,r){var i=this;return[this.parseVersion(t),this.parseVersion(r)].map(function(t){return i.getTotalMajor(t)}).reduce(function(t,r){return t-r})}},{key:`isSoftDeprecated`,value:function isSoftDeprecated(t){return this.compareVersion(t,elementorWebCliConfig.version)<=4}},{key:`isHardDeprecated`,value:function isHardDeprecated(t){var r=this.compareVersion(t,elementorWebCliConfig.version);return r<0||r>=8}}])}();function _callSuper$9(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$9()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$9,`_callSuper`);function _isNativeReflectConstruct$9(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$9=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$9,`_isNativeReflectConstruct`);var I=function(t){function CommandInfra(){var t,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(_classCallCheck(this,CommandInfra),t=_callSuper$9(this,CommandInfra,[r]),!t.constructor.registerConfig)throw RangeError("Doing it wrong: Each command type should have `registerConfig`.");return t.command=t.constructor.getCommand(),t.component=t.constructor.getComponent(),t.initialize(r),r=t.args,t.validateArgs(r),t}return _inherits(CommandInfra,t),_createClass(CommandInfra,[{key:`currentCommand`,get:function get(){return P.deprecated(`this.currentCommand`,`3.7.0`,`this.command`),this.command}},{key:`initialize`,value:function initialize(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]}},{key:`validateArgs`,value:function validateArgs(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]}},{key:`apply`,value:function apply(){arguments.length>0&&arguments[0]!==void 0&&arguments[0],elementorModules.ForceMethodImplementation()}},{key:`run`,value:function run(){return this.apply(this.args)}},{key:`onBeforeRun`,value:function onBeforeRun(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]}},{key:`onAfterRun`,value:function onAfterRun(){arguments.length>0&&arguments[0]!==void 0&&arguments[0],arguments.length>1&&arguments[1]}},{key:`onBeforeApply`,value:function onBeforeApply(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]}},{key:`onAfterApply`,value:function onAfterApply(){arguments.length>0&&arguments[0]!==void 0&&arguments[0],arguments.length>1&&arguments[1]}},{key:`onCatchApply`,value:function onCatchApply(t){}}],[{key:`getInstanceType`,value:function getInstanceType(){return`CommandInfra`}},{key:`getInfo`,value:function getInfo(){return{}}},{key:`getCommand`,value:function getCommand(){return this.registerConfig.command}},{key:`getComponent`,value:function getComponent(){return this.registerConfig.component}},{key:`setRegisterConfig`,value:function setRegisterConfig(t){this.registerConfig=Object.freeze(t)}}])}(g);_defineProperty(I,`registerConfig`,null);function _callSuper$8(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$8()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$8,`_callSuper`);function _isNativeReflectConstruct$8(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$8=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$8,`_isNativeReflectConstruct`);var L=function(t){function CommandBase(){return _classCallCheck(this,CommandBase),_callSuper$8(this,CommandBase,arguments)}return _inherits(CommandBase,t),_createClass(CommandBase,[{key:`onBeforeRun`,value:function onBeforeRun(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$e.hooks.runUIBefore(this.command,t)}},{key:`onAfterRun`,value:function onAfterRun(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;$e.hooks.runUIAfter(this.command,t,r)}},{key:`onBeforeApply`,value:function onBeforeApply(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$e.hooks.runDataDependency(this.command,t)}},{key:`onAfterApply`,value:function onAfterApply(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return $e.hooks.runDataAfter(this.command,t,r)}},{key:`onCatchApply`,value:function onCatchApply(t){this.runCatchHooks(t)}},{key:`runCatchHooks`,value:function runCatchHooks(t){$e.hooks.runDataCatch(this.command,this.args,t),$e.hooks.runUICatch(this.command,this.args,t)}},{key:`requireContainer`,value:function requireContainer(){var t=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.args;if(P.deprecated(`requireContainer()`,`3.7.0`,"Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`"),!r.container&&!r.containers)throw Error(`container or containers are required.`);if(r.container&&r.containers)throw Error(`container and containers cannot go together please select one of them.`);(r.containers||[r.container]).forEach(function(r){t.requireArgumentInstance(`container`,elementorModules.editor.Container,{container:r})})}}],[{key:`getInstanceType`,value:function getInstanceType(){return`CommandBase`}}])}(I);function _callSuper$7(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$7()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$7,`_callSuper`);function _isNativeReflectConstruct$7(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$7=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$7,`_isNativeReflectConstruct`);var R=function(t){function CommandCallbackBase(){return _classCallCheck(this,CommandCallbackBase),_callSuper$7(this,CommandCallbackBase,arguments)}return _inherits(CommandCallbackBase,t),_createClass(CommandCallbackBase,[{key:`apply`,value:function apply(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.constructor.getCallback()(t)}}],[{key:`getInstanceType`,value:function getInstanceType(){return`CommandCallbackBase`}},{key:`getCallback`,value:function getCallback(){return this.registerConfig.callback}}])}(L);function _callSuper$6(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$6()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$6,`_callSuper`);function _isNativeReflectConstruct$6(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$6=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$6,`_isNativeReflectConstruct`);var z=function(t){function ForceMethodImplementation(){var t,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return _classCallCheck(this,ForceMethodImplementation),t=_callSuper$6(this,ForceMethodImplementation,[`${r.isStatic?`static `:``}${r.fullName}() should be implemented, please provide '${r.functionName||r.fullName}' functionality.`]),Error.captureStackTrace(t,ForceMethodImplementation),t}return _inherits(ForceMethodImplementation,t),_createClass(ForceMethodImplementation)}(_wrapNativeSuper(Error)),B=__name((function(){var t=Error().stack.split(` `)[2].trim(),r=t.startsWith(`at new`)?`constructor`:t.split(` `)[1],i={};if(i.functionName=r,i.fullName=r,i.functionName.includes(`.`)){var a=i.functionName.split(`.`);i.className=a[0],i.functionName=a[1]}else i.isStatic=!0;throw new z(i)}),`default`);function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),i.push.apply(i,a)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]==null?{}:arguments[r];r%2?ownKeys(Object(i),!0).forEach(function(r){_defineProperty(t,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))})}return t}function _callSuper$5(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$5()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$5,`_callSuper`);function _isNativeReflectConstruct$5(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$5=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$5,`_isNativeReflectConstruct`);var V=function(r){function ComponentBase(){return _classCallCheck(this,ComponentBase),_callSuper$5(this,ComponentBase,arguments)}return _inherits(ComponentBase,r),_createClass(ComponentBase,[{key:`__construct`,value:function __construct(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.manager&&(this.manager=t.manager),this.commands=this.defaultCommands(),this.commandsInternal=this.defaultCommandsInternal(),this.hooks=this.defaultHooks(),this.routes=this.defaultRoutes(),this.tabs=this.defaultTabs(),this.shortcuts=this.defaultShortcuts(),this.utils=this.defaultUtils(),this.data=this.defaultData(),this.uiStates=this.defaultUiStates(),this.states=this.defaultStates(),this.defaultRoute=``,this.currentTab=``}},{key:`registerAPI`,value:function registerAPI(){var t=this;Object.entries(this.getTabs()).forEach(function(r){return t.registerTabRoute(r[0])}),Object.entries(this.getRoutes()).forEach(function(r){var i=_slicedToArray(r,2),a=i[0],o=i[1];return t.registerRoute(a,o)}),Object.entries(this.getCommands()).forEach(function(r){var i=_slicedToArray(r,2),a=i[0],o=i[1];return t.registerCommand(a,o)}),Object.entries(this.getCommandsInternal()).forEach(function(r){var i=_slicedToArray(r,2),a=i[0],o=i[1];return t.registerCommandInternal(a,o)}),Object.values(this.getHooks()).forEach(function(r){return t.registerHook(r)}),Object.entries(this.getData()).forEach(function(r){var i=_slicedToArray(r,2),a=i[0],o=i[1];return t.registerData(a,o)}),Object.values(this.getUiStates()).forEach(function(r){return t.registerUiState(r)}),Object.entries(this.getStates()).forEach(function(r){var i=_slicedToArray(r,2),a=i[0],o=i[1];return t.registerState(a,o)})}},{key:`getNamespace`,value:function getNamespace(){B()}},{key:`getRootContainer`,value:function getRootContainer(){return P.deprecated(`getRootContainer()`,`3.7.0`,`getServiceName()`),this.getServiceName()}},{key:`getServiceName`,value:function getServiceName(){return this.getNamespace().split(`/`)[0]}},{key:`store`,get:function get(){return $e.store.get(this.getNamespace())}},{key:`defaultTabs`,value:function defaultTabs(){return{}}},{key:`defaultRoutes`,value:function defaultRoutes(){return{}}},{key:`defaultCommands`,value:function defaultCommands(){return{}}},{key:`defaultCommandsInternal`,value:function defaultCommandsInternal(){return{}}},{key:`defaultHooks`,value:function defaultHooks(){return{}}},{key:`defaultUiStates`,value:function defaultUiStates(){return{}}},{key:`defaultStates`,value:function defaultStates(){return{}}},{key:`defaultShortcuts`,value:function defaultShortcuts(){return{}}},{key:`defaultUtils`,value:function defaultUtils(){return{}}},{key:`defaultData`,value:function defaultData(){return{}}},{key:`getCommands`,value:function getCommands(){return this.commands}},{key:`getCommandsInternal`,value:function getCommandsInternal(){return this.commandsInternal}},{key:`getHooks`,value:function getHooks(){return this.hooks}},{key:`getUiStates`,value:function getUiStates(){return this.uiStates}},{key:`getStates`,value:function getStates(){return this.states}},{key:`getRoutes`,value:function getRoutes(){return this.routes}},{key:`getTabs`,value:function getTabs(){return this.tabs}},{key:`getShortcuts`,value:function getShortcuts(){return this.shortcuts}},{key:`getData`,value:function getData(){return this.data}},{key:`registerCommand`,value:function registerCommand(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`default`,a;switch(i){case`default`:a=$e.commands;break;case`internal`:a=$e.commandsInternal;break;case`data`:a=$e.data;break;default:throw Error(`Invalid commands type: '${t}'`)}var o=this.getNamespace()+`/`+t,c=r.getInstanceType?r.getInstanceType():!1,l={command:o,component:this};c||($e.devTools&&$e.devTools.log.warn(`Attach command-callback-base, on command: '${o}', context is unknown type.`),l.callback=r,r=function(t){function context(){return _classCallCheck(this,context),_callSuper$5(this,context,arguments)}return _inherits(context,t),_createClass(context)}(R)),r.setRegisterConfig(l),a.register(this,t,r)}},{key:`registerHook`,value:function registerHook(t){return t.register()}},{key:`registerCommandInternal`,value:function registerCommandInternal(t,r){this.registerCommand(t,r,`internal`)}},{key:`registerUiState`,value:function registerUiState(t){$e.uiStates.register(t)}},{key:`registerState`,value:function registerState(r,i){r=this.getNamespace()+(r?`/${r}`:``);var a=(0,t.createSlice)(_objectSpread(_objectSpread({},i),{},{name:r}));$e.store.register(r,a)}},{key:`registerRoute`,value:function registerRoute(t,r){$e.routes.register(this,t,r)}},{key:`registerData`,value:function registerData(t,r){this.registerCommand(t,r,`data`)}},{key:`unregisterRoute`,value:function unregisterRoute(t){$e.routes.unregister(this,t)}},{key:`registerTabRoute`,value:function registerTabRoute(t){var r=this;this.registerRoute(t,function(i){return r.activateTab(t,i)})}},{key:`dependency`,value:function dependency(){return!0}},{key:`open`,value:function open(){return!0}},{key:`close`,value:function close(){return this.isOpen?(this.isOpen=!1,this.inactivate(),$e.routes.clearCurrent(this.getNamespace()),$e.routes.clearHistory(this.getServiceName()),!0):!1}},{key:`activate`,value:function activate(){$e.components.activate(this.getNamespace())}},{key:`inactivate`,value:function inactivate(){$e.components.inactivate(this.getNamespace())}},{key:`isActive`,value:function isActive(){return $e.components.isActive(this.getNamespace())}},{key:`onRoute`,value:function onRoute(t){this.toggleRouteClass(t,!0),this.toggleHistoryClass(),this.activate(),this.trigger(`route/open`,t)}},{key:`onCloseRoute`,value:function onCloseRoute(t){this.toggleRouteClass(t,!1),this.inactivate(),this.trigger(`route/close`,t)}},{key:`setDefaultRoute`,value:function setDefaultRoute(t){this.defaultRoute=this.getNamespace()+`/`+t}},{key:`getDefaultRoute`,value:function getDefaultRoute(){return this.defaultRoute}},{key:`removeTab`,value:function removeTab(t){delete this.tabs[t],this.unregisterRoute(t)}},{key:`hasTab`,value:function hasTab(t){return!!this.tabs[t]}},{key:`addTab`,value:function addTab(t,r,i){var a=this;if(this.tabs[t]=r,i!==void 0){var o={},c=Object.keys(this.tabs);c.pop(),c.splice(i,0,t),c.forEach(function(t){o[t]=a.tabs[t]}),this.tabs=o}this.registerTabRoute(t)}},{key:`getTabsWrapperSelector`,value:function getTabsWrapperSelector(){return``}},{key:`getTabRoute`,value:function getTabRoute(t){return this.getNamespace()+`/`+t}},{key:`renderTab`,value:function renderTab(t){}},{key:`activateTab`,value:function activateTab(t,r){var i=this;this.renderTab(t,r),jQuery(this.getTabsWrapperSelector()+` .elementor-component-tab`).off(`click`).on(`click`,function(t){$e.route(i.getTabRoute(t.currentTarget.dataset.tab),r)}).removeClass(`elementor-active`).filter(`[data-tab="`+t+`"]`).addClass(`elementor-active`)}},{key:`getActiveTabConfig`,value:function getActiveTabConfig(){return this.tabs[this.currentTab]||{}}},{key:`getBodyClass`,value:function getBodyClass(t){return`e-route-`+t.replace(/\//g,`-`)}},{key:`normalizeCommandName`,value:function normalizeCommandName(t){return t.replace(/[A-Z]/g,function(t,r){return(r>0?`-`:``)+t.toLowerCase()})}},{key:`importCommands`,value:function importCommands(t){var r=this,i={};return Object.entries(t).forEach(function(t){var a=_slicedToArray(t,2),o=a[0],c=a[1],l=r.normalizeCommandName(o);i[l]=c}),i}},{key:`importHooks`,value:function importHooks(t){var r={};for(var i in t){var a=new t[i];r[a.getId()]=a}return r}},{key:`importUiStates`,value:function importUiStates(t){var r=this,i={};return Object.values(t).forEach(function(t){var a=new t(r);i[a.getId()]=a}),i}},{key:`setUiState`,value:function setUiState(t,r){$e.uiStates.set(`${this.getNamespace()}/${t}`,r)}},{key:`toggleRouteClass`,value:function toggleRouteClass(t,r){document.body.classList.toggle(this.getBodyClass(t),r)}},{key:`toggleHistoryClass`,value:function toggleHistoryClass(){document.body.classList.toggle(`e-routes-has-history`,!!$e.routes.getHistory(this.getServiceName()).length)}}])}(d.default);function _callSuper$4(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$4()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$4,`_callSuper`);function _isNativeReflectConstruct$4(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$4=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$4,`_isNativeReflectConstruct`);var H=function(t){function Close(){return _classCallCheck(this,Close),_callSuper$4(this,Close,arguments)}return _inherits(Close,t),_createClass(Close,[{key:`apply`,value:function apply(){this.component.close()}}])}(L);function _callSuper$3(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$3()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$3,`_callSuper`);function _isNativeReflectConstruct$3(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$3=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$3,`_isNativeReflectConstruct`);var U=function(t){function Open(){return _classCallCheck(this,Open),_callSuper$3(this,Open,arguments)}return _inherits(Open,t),_createClass(Open,[{key:`apply`,value:function apply(){$e.route(this.component.getNamespace())}}])}(L);function _callSuper$2(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$2()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$2,`_callSuper`);function _isNativeReflectConstruct$2(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$2=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$2,`_isNativeReflectConstruct`);var W=function(t){function Toggle(){return _classCallCheck(this,Toggle),_callSuper$2(this,Toggle,arguments)}return _inherits(Toggle,t),_createClass(Toggle,[{key:`apply`,value:function apply(){this.component.isOpen?this.component.close():$e.route(this.component.getNamespace())}}])}(L),G=__exportAll({Close:()=>H,Open:()=>U,Toggle:()=>W});function _callSuper$1(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$1()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$1,`_callSuper`);function _isNativeReflectConstruct$1(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$1=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$1,`_isNativeReflectConstruct`);function _superPropGet(t,r,i,a){var o=_get(_getPrototypeOf(1&a?t.prototype:t),r,i);return 2&a&&typeof o==`function`?function(t){return o.apply(i,t)}:o}var K=function(t){function ComponentModalBase(){return _classCallCheck(this,ComponentModalBase),_callSuper$1(this,ComponentModalBase,arguments)}return _inherits(ComponentModalBase,t),_createClass(ComponentModalBase,[{key:`registerAPI`,value:function registerAPI(){var t=this;_superPropGet(ComponentModalBase,`registerAPI`,this,3)([]),$e.shortcuts.register(`esc`,{scopes:[this.getNamespace()],callback:function callback(){return t.close()}})}},{key:`defaultCommands`,value:function defaultCommands(){return this.importCommands(G)}},{key:`defaultRoutes`,value:function defaultRoutes(){return{"":function _(){}}}},{key:`open`,value:function open(){var t=this;if(!this.layout){var r=this.getModalLayout();this.layout=new r({component:this}),this.layout.getModal().on(`hide`,function(){return t.close()})}return this.layout.showModal(),!0}},{key:`close`,value:function close(){return _superPropGet(ComponentModalBase,`close`,this,3)([])?(elementor.hooks.applyFilters(`component/modal/close`,this.layout.getModal().hide.bind(this.layout.getModal()),this)(),!0):!1}},{key:`getModalLayout`,value:function getModalLayout(){B()}}])}(V);function _callSuper(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}var q=function(t){function HookBreak(){return _classCallCheck(this,HookBreak),_callSuper(this,HookBreak,[`HookBreak`])}return _inherits(HookBreak,t),_createClass(HookBreak)}(_wrapNativeSuper(Error));T.common={get Component(){return setTimeout(function(){elementorDevTools.deprecation.deprecated(`elementorModules.common.Component`,`2.9.0`,`$e.modules.ComponentBase`)},2e3),V},get ComponentModal(){return setTimeout(function(){elementorDevTools.deprecation.deprecated(`elementorModules.common.ComponentModal`,`2.9.0`,`$e.modules.ComponentModalBase`)},2e3),K},get HookBreak(){return setTimeout(function(){elementorDevTools.deprecation.deprecated(`elementorModules.common.HookBreak`,`2.9.0`,`$e.modules.HookBreak`)},2e3),q},views:{modal:{Layout:k}}}})(elementorVendors.reduxToolkit);