PageSourceSearch

https://museodelcanal.com/wp-content/plugins/woocommerce-event-man…/front-mep-form-builder.js?ver=1790934458

js museodelcanal.com collected 2026-10-02 10:13:58 UTC 4,781 bytes, 133 lines download raw bytes

1(function ($) {
2	var p_f_height;
3	var is_collapse = true;
4	var show_row = 2;
5	var me = function (element, row, is_collapse) {
6		var p, c, c_height, init_height;
7		if (is_collapse) {
8			p = $(element);
9			p_f_height = p.height();
10			c = p.children();
11			if (c.length > 0) {
12				c_height = c.height();
13				row = parseInt(row);
14				// Is Mobile
15				if ($(window).width() <= 425) {
16					row = row + 3;
17				}
18				init_height = row * c_height;
19				p.height(init_height);
20			}
21		}
22	}
23	var expand_section = function (e) {
24		var ele = $('.mep-event-attendee--inner');
25		is_collapse = !is_collapse;
26		if (is_collapse) {
27			me('.mep-event-attendee--inner', show_row, is_collapse);
28			$(e).text('See all');
29		} else {
30			ele.height(p_f_height);
31			$(e).text('See less');
32		}
33	}
34	$('#attendee--see-all').on('click', function () {
35		expand_section($(this));
36	});
37	// init
38	me('.mep-event-attendee--inner', show_row, is_collapse);
39	$(document).on('click', '[data-radio]', function () {
40		let target = $(this).closest('label');
41		let value = $(this).attr('data-radio');
42		target.find('.customRadio').removeClass('active');
43		$(this).addClass('active');
44		target.find('input').val(value).trigger('change');
45	});
46	$(document).on('click', '#mage_event_submit .customCheckboxLabel', function () {
47		let parent = $(this).closest('.customCheckBoxArea');
48		let value = '';
49		let separator = ',';
50		parent.find(' input[type="checkbox"]').each(function () {
51			if ($(this).is(":checked")) {
52				let currentValue = $(this).attr('data-checked');
53				value = value + (value ? separator : '') + currentValue;
54			}
55		}).promise().done(function () {
56			parent.find('input[type="text"]').val(value);
57		});
58	});
59	$(document).on('DOMSubtreeModified', '#mage_event_submit #ttyttl', function () {
60		setTimeout(function () {
61			if (parseInt($('#ttyttl').html()) > 0) {
62				$('label.term_condition_area').slideDown(250);
63			} else {
64				$('label.term_condition_area').slideUp(250);
65			}
66		}, 1000);
67	});
68	/************File Upload*************/
69	$(document).on('click', '#mage_event_submit .attach_file_area .attach_file_view', function () {
70		let parent = $(this).closest('.attach_file_area');
71		parent.find('input[type="file"]').trigger('click');
72	});
73	$(document).on('change', '#mage_event_submit .attach_file_area input[type="file"]', function (e) {
74		let parent = $(this).closest('.attach_file_area');
75		let input = this;
76		let url = input.value;
77		let ext = url.substring(url.lastIndexOf('.') + 1).toLowerCase();
78		if (input.files && input.files[0] && (ext === "gif" || ext === "png" || ext === "jpg" || ext === "pdf")) {
79			if (input.files[0].size <= 1024000) {
80				let reader = new FileReader();
81				reader.onload = function (e) {
82					if (ext === "pdf") {
83						parent.find('.attach_file_view img').slideUp(250);
84						parent.find('.attach_file_view span').slideUp(250);
85						parent.find('.attach_file_view iframe').attr('src', e.target.result).slideDown(250);
86					} else {
87						parent.find('.attach_file_view iframe').slideUp(250);
88						parent.find('.attach_file_view span').slideUp(250);
89						parent.find('.attach_file_view img').attr('src', e.target.result).slideDown(250);
90					}
91				}
92				reader.readAsDataURL(input.files[0]);
93			} else {
94				alert('Maximum size 1MB');
95				parent.find('.attach_file_view img').slideUp(250);
96				parent.find('.attach_file_view span').slideDown(250);
97				parent.find('.attach_file_view iframe').slideUp(250);
98				$(this).val('');
99			}
100		} else {
101			parent.find('.attach_file_view img').slideUp(250);
102			parent.find('.attach_file_view span').slideDown(250);
103			parent.find('.attach_file_view iframe').slideUp(250);
104			$(this).val('');
105		}
106	});
107	/************conditional form*************/
108	$(document).on('change', '.mep-user-info-sec [data-target-condition-id]', function (e) {
109		//e.stopPropagation();
110		let child_id = $(this).find('option:selected').attr('data-target-child-id');
111		let parent = $(this).closest('.mep-user-info-sec');
112		$(this).find('option').each(function () {
113			let child_id_hidden = $(this).attr('data-target-child-id');
114			if (child_id_hidden) {
115				if (child_id === child_id_hidden) {
116					parent.find('[data-condition-id="' + child_id_hidden + '"]').removeClass('mep-hidden');
117				} else {
118					parent.find('[data-condition-id="' + child_id_hidden + '"]').addClass('mep-hidden');
119				}
120			}
121		});
122	});
123	$(document).on('change', '#mage_event_submit  [name="option_qty[]"]', function () {
124		let parent = $(this).closest('#mage_event_submit');
125		parent.find('[name="ticket_type[]"]').each(function () {
126			let ticket_name = $(this).val();
127			if (ticket_name) {
128				let current_parent = $(this).closest('.mep-user-info-sec');
129				current_parent.find('[data-condition-id="' + ticket_name + '"]').removeClass('mep-hidden');
130			}
131		});
132	});
133})(jQuery)

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.