(function(){
//#region dev/js/common/utils.js
/**
* Master Addons - Shared Utilities
*
* Common helper functions used across all widget handlers.
*/
/**
* Get element settings from Elementor
*
* @param {jQuery} $element - The jQuery element
* @param {string} setting - Optional specific setting key
* @returns {*} Settings object or specific setting value
*/
function getElementSettings($element, setting) {
	var elementSettings = {}, modelCID = $element.data("model-cid");
	if (typeof elementorFrontend !== "undefined" && elementorFrontend.isEditMode() && modelCID) {
		var settings = elementorFrontend.config.elements.data[modelCID], type = settings.attributes.widgetType || settings.attributes.elType, settingsKeys = elementorFrontend.config.elements.keys[type];
		if (!settingsKeys) {
			settingsKeys = elementorFrontend.config.elements.keys[type] = [];
			jQuery.each(settings.controls, function(name, control) {
				if (control.frontend_available) settingsKeys.push(name);
			});
		}
		jQuery.each(settings.getActiveControls(), function(controlKey) {
			if (-1 !== settingsKeys.indexOf(controlKey)) elementSettings[controlKey] = settings.attributes[controlKey];
		});
	} else elementSettings = $element.data("settings") || {};
	return getItems(elementSettings, setting);
}
/**
* Get nested items from an object
*
* @param {Object} items - The items object
* @param {string} itemKey - Dot-notation key path
* @returns {*} The value at the key path
*/
function getItems(items, itemKey) {
	if (itemKey) {
		var keyStack = itemKey.split("."), currentKey = keyStack.splice(0, 1);
		if (!keyStack.length) return items[currentKey];
		if (!items[currentKey]) return;
		return getItems(items[currentKey], keyStack.join("."));
	}
	return items;
}
/**
* Get unique loop scope ID
*
* @param {jQuery} $scope - The scope element
* @returns {string} The unique ID
*/
function getUniqueLoopScopeId($scope) {
	if ($scope.data("jltma-template-widget-id")) return $scope.data("jltma-template-widget-id");
	return $scope.data("id");
}
/**
* Observe target element with IntersectionObserver
*
* @param {Element} target - The target element to observe
* @param {Function} callback - Callback when element intersects
* @param {Object} options - IntersectionObserver options
*/
function jltMAObserveTarget(target, callback, options = {}) {
	new IntersectionObserver(function(entries, observer) {
		entries.forEach(function(entry) {
			if (entry.isIntersecting) callback(entry);
		});
	}, options).observe(target);
}
/**
* Strip HTML tags from text
*
* @param {string} text - Text to strip
* @returns {string} Text without HTML tags
*/
function stripTags(text) {
	return text.replace(/<\/?[^>]+(>|$)/g, "");
}
/**
* Check if in Elementor edit mode
*
* @returns {boolean} True if in edit mode
*/
function isEditMode() {
	return typeof elementorFrontend !== "undefined" && elementorFrontend.isEditMode();
}
//#endregion
//#region node_modules/counterup2/index.js
var counterUp = (el, options = {}) => {
	const { action = "start", duration = 1e3, delay = 16 } = options;
	if (action === "stop") {
		stopCountUp(el);
		return;
	}
	stopCountUp(el);
	if (!/[0-9]/.test(el.innerHTML)) return;
	const nums = divideNumbers(el.innerHTML, {
		duration: duration || el.getAttribute("data-duration"),
		delay: delay || el.getAttribute("data-delay")
	});
	el._countUpOrigInnerHTML = el.innerHTML;
	el.innerHTML = nums[0] || "&nbsp;";
	el.style.visibility = "visible";
	const output = function() {
		el.innerHTML = nums.shift() || "&nbsp;";
		if (nums.length) {
			clearTimeout(el.countUpTimeout);
			el.countUpTimeout = setTimeout(output, delay);
		} else el._countUpOrigInnerHTML = void 0;
	};
	el.countUpTimeout = setTimeout(output, delay);
};
var stopCountUp = (el) => {
	clearTimeout(el.countUpTimeout);
	if (el._countUpOrigInnerHTML) {
		el.innerHTML = el._countUpOrigInnerHTML;
		el._countUpOrigInnerHTML = void 0;
	}
	el.style.visibility = "";
};
var divideNumbers = (numToDivide, options = {}) => {
	const { duration = 1e3, delay = 16 } = options;
	const divisions = duration / delay;
	const splitValues = numToDivide.toString().split(/(<[^>]+>|[0-9.][,.0-9]*[0-9]*)/);
	const nums = [];
	for (let k = 0; k < divisions; k++) nums.push("");
	for (let i = 0; i < splitValues.length; i++) if (/([0-9.][,.0-9]*[0-9]*)/.test(splitValues[i]) && !/<[^>]+>/.test(splitValues[i])) {
		let num = splitValues[i];
		const symbols = [...num.matchAll(/[.,]/g)].map((m) => ({
			char: m[0],
			i: num.length - m.index - 1
		})).sort((a, b) => a.i - b.i);
		num = num.replace(/[.,]/g, "");
		let k = nums.length - 1;
		for (let val = divisions; val >= 1; val--) {
			let newNum = parseInt(num / divisions * val, 10);
			newNum = symbols.reduce((num, { char, i }) => {
				return num.length <= i ? num : num.slice(0, -i) + char + num.slice(-i);
			}, newNum.toString());
			nums[k--] += newNum;
		}
	} else for (let k = 0; k < divisions; k++) nums[k] += splitValues[i];
	nums[nums.length] = numToDivide.toString();
	return nums;
};
//#endregion
//#region dev/js/addons/free/ma-counter-up.js
/**
* Start counter up widget script
*/
(function($, elementor) {
	"use strict";
	var JLTMA_CounterUp = function($scope, $) {
		var $counterup = $scope.find(".jltma-counter-up-number");
		$counterup.each(function(el) {
			if ($counterup[el]) counterUp($counterup[el], {
				duration: 2e3,
				delay: 15
			});
		});
	};
	$(window).on("elementor/frontend/init", function() {
		elementorFrontend.hooks.addAction("frontend/element_ready/jltma-counter-up.default", JLTMA_CounterUp);
	});
})(jQuery, window.elementorFrontend);
/**
* End counter up widget script
*/
//#endregion
})();
