(()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e){var r=function(e){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(r)?r:r+""}function r(t,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,e(o.key),o)}}function n(t){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}const i=gutenverseCoreFrontend;function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}var u=function(e){function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),e=this,o=arguments,r=n(r=u),function(e,r){if(r&&("object"==t(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}(e,a()?Reflect.construct(r,o||[],n(e).constructor):r.apply(e,o));var e,r,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(u,e),c=u,f=[{key:"init",value:function(){var t=this;this._elements.map(function(e){t.__handleAction(e)})}},{key:"__handleAction",value:function(t){var e=(0,i.u)(t),r=e.data("behavior"),n=e.find(".row-item");"onclick"===r?this.__handleBehavior("click",n,e):this.__handleBehavior("mouseover",n,e)}},{key:"__handleBehavior",value:function(t,e,r){var n=this;e.on(t,function(t){n.__removeClass(e,r),n.__addClass(t.currentTarget,r)})}},{key:"__removeClass",value:function(t,e){t.each(function(t){var r=(0,i.u)(t);if(r.hasClass("current-item")){r.removeClass("current-item");var n=r.data("tab"),o=e.find("#".concat(n));o&&o.hasClass("current-item")&&o.removeClass("current-item")}})}},{key:"__addClass",value:function(t,e){var r=(0,i.u)(t);r.addClass("current-item");var n=r.data("tab"),o=e.find("#".concat(n));o&&!o.hasClass("current-item")&&o.addClass("current-item")}}],f&&r(c.prototype,f),Object.defineProperty(c,"prototype",{writable:!1}),c;var c,f}(i.Default),c=(0,i.u)(".guten-portfolio-gallery");c&&new u(c)})();