PageSourceSearch

https://www.larucheimports.com/wp-content/cache/speedycache/www.la…/assets/f89263c0c2f24398-scripts.js

js larucheimports.com collected 2026-09-26 11:41:25 UTC 11,401 bytes, 404 lines download raw bytes

1(function($){
2'use strict';
3if(typeof wpcf7==='undefined'||wpcf7===null){
4return;
5}
6wpcf7=$.extend({
7cached: 0,
8inputs: []
9}, wpcf7);
10$(function(){
11wpcf7.supportHtml5=(function(){
12var features={};
13var input=document.createElement('input');
14features.placeholder='placeholder' in input;
15var inputTypes=[ 'email', 'url', 'tel', 'number', 'range', 'date' ];
16$.each(inputTypes, function(index, value){
17input.setAttribute('type', value);
18features[ value ]=input.type!=='text';
19});
20return features;
21})();
22$('div.wpcf7 > form').each(function(){
23var $form=$(this);
24wpcf7.initForm($form);
25if(wpcf7.cached){
26wpcf7.refill($form);
27}});
28});
29wpcf7.getId=function(form){
30return parseInt($('input[name="_wpcf7"]', form).val(), 10);
31};
32wpcf7.initForm=function(form){
33var $form=$(form);
34wpcf7.setStatus($form, 'init');
35$form.submit(function(event){
36if(! wpcf7.supportHtml5.placeholder){
37$('[placeholder].placeheld', $form).each(function(i, n){
38$(n).val('').removeClass('placeheld');
39});
40}
41if(typeof window.FormData==='function'){
42wpcf7.submit($form);
43event.preventDefault();
44}});
45$('.wpcf7-submit', $form).after('<span class="ajax-loader"></span>');
46wpcf7.toggleSubmit($form);
47$form.on('click', '.wpcf7-acceptance', function(){
48wpcf7.toggleSubmit($form);
49});
50$('.wpcf7-exclusive-checkbox', $form).on('click', 'input:checkbox', function(){
51var name=$(this).attr('name');
52$form.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false);
53});
54$('.wpcf7-list-item.has-free-text', $form).each(function(){
55var $freetext=$(':input.wpcf7-free-text', this);
56var $wrap=$(this).closest('.wpcf7-form-control');
57if($(':checkbox, :radio', this).is(':checked')){
58$freetext.prop('disabled', false);
59}else{
60$freetext.prop('disabled', true);
61}
62$wrap.on('change', ':checkbox, :radio', function(){
63var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio');
64if($cb.is(':checked')){
65$freetext.prop('disabled', false).focus();
66}else{
67$freetext.prop('disabled', true);
68}});
69});
70if(! wpcf7.supportHtml5.placeholder){
71$('[placeholder]', $form).each(function(){
72$(this).val($(this).attr('placeholder'));
73$(this).addClass('placeheld');
74$(this).focus(function(){
75if($(this).hasClass('placeheld')){
76$(this).val('').removeClass('placeheld');
77}});
78$(this).blur(function(){
79if(''===$(this).val()){
80$(this).val($(this).attr('placeholder'));
81$(this).addClass('placeheld');
82}});
83});
84}
85if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.date){
86$form.find('input.wpcf7-date[type="date"]').each(function(){
87$(this).datepicker({
88dateFormat: 'yy-mm-dd',
89minDate: new Date($(this).attr('min')),
90maxDate: new Date($(this).attr('max'))
91});
92});
93}
94if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.number){
95$form.find('input.wpcf7-number[type="number"]').each(function(){
96$(this).spinner({
97min: $(this).attr('min'),
98max: $(this).attr('max'),
99step: $(this).attr('step')
100});
101});
102}
103wpcf7.resetCounter($form);
104$form.on('change', '.wpcf7-validates-as-url', function(){
105var val=$.trim($(this).val());
106if(val
107&& ! val.match(/^[a-z][a-z0-9.+-]*:/i)
108&& -1!==val.indexOf('.')){
109val=val.replace(/^\/+/, '');
110val='http://' + val;
111}
112$(this).val(val);
113});
114};
115wpcf7.submit=function(form){
116if(typeof window.FormData!=='function'){
117return;
118}
119var $form=$(form);
120$('.ajax-loader', $form).addClass('is-active');
121wpcf7.clearResponse($form);
122var formData=new FormData($form.get(0));
123var detail={
124id: $form.closest('div.wpcf7').attr('id'),
125status: 'init',
126inputs: [],
127formData: formData
128};
129$.each($form.serializeArray(), function(i, field){
130if('_wpcf7'==field.name){
131detail.contactFormId=field.value;
132}else if('_wpcf7_version'==field.name){
133detail.pluginVersion=field.value;
134}else if('_wpcf7_locale'==field.name){
135detail.contactFormLocale=field.value;
136}else if('_wpcf7_unit_tag'==field.name){
137detail.unitTag=field.value;
138}else if('_wpcf7_container_post'==field.name){
139detail.containerPostId=field.value;
140}else if(field.name.match(/^_/)){
141}else{
142detail.inputs.push(field);
143}});
144wpcf7.triggerEvent($form.closest('div.wpcf7'), 'beforesubmit', detail);
145var ajaxSuccess=function(data, status, xhr, $form){
146detail.id=$(data.into).attr('id');
147detail.status=data.status;
148detail.apiResponse=data;
149switch(data.status){
150case 'init':
151wpcf7.setStatus($form, 'init');
152break;
153case 'validation_failed':
154$.each(data.invalid_fields, function(i, n){
155$(n.into, $form).each(function(){
156wpcf7.notValidTip(this, n.message);
157$('.wpcf7-form-control', this).addClass('wpcf7-not-valid');
158$('.wpcf7-form-control', this).attr('aria-describedby',
159n.error_id
160);
161$('[aria-invalid]', this).attr('aria-invalid', 'true');
162});
163});
164wpcf7.setStatus($form, 'invalid');
165wpcf7.triggerEvent(data.into, 'invalid', detail);
166break;
167case 'acceptance_missing':
168wpcf7.setStatus($form, 'unaccepted');
169wpcf7.triggerEvent(data.into, 'unaccepted', detail);
170break;
171case 'spam':
172wpcf7.setStatus($form, 'spam');
173wpcf7.triggerEvent(data.into, 'spam', detail);
174break;
175case 'aborted':
176wpcf7.setStatus($form, 'aborted');
177wpcf7.triggerEvent(data.into, 'aborted', detail);
178break;
179case 'mail_sent':
180wpcf7.setStatus($form, 'sent');
181wpcf7.triggerEvent(data.into, 'mailsent', detail);
182break;
183case 'mail_failed':
184wpcf7.setStatus($form, 'failed');
185wpcf7.triggerEvent(data.into, 'mailfailed', detail);
186break;
187default:
188wpcf7.setStatus($form,
189'custom-' + data.status.replace(/[^0-9a-z]+/i, '-')
190);
191}
192wpcf7.refill($form, data);
193wpcf7.triggerEvent(data.into, 'submit', detail);
194if('mail_sent'==data.status){
195$form.each(function(){
196this.reset();
197});
198wpcf7.toggleSubmit($form);
199wpcf7.resetCounter($form);
200}
201if(! wpcf7.supportHtml5.placeholder){
202$form.find('[placeholder].placeheld').each(function(i, n){
203$(n).val($(n).attr('placeholder'));
204});
205}
206$('.wpcf7-response-output', $form)
207.html('').append(data.message).slideDown('fast');
208$('.screen-reader-response', $form.closest('.wpcf7')).each(function(){
209var $response=$(this);
210$('[role="status"]', $response).html(data.message);
211if(data.invalid_fields){
212$.each(data.invalid_fields, function(i, n){
213if(n.idref){
214var $li=$('<li></li>').append($('<a></a>').attr('href', '#' + n.idref).append(n.message));
215}else{
216var $li=$('<li></li>').append(n.message);
217}
218$li.attr('id', n.error_id);
219$('ul', $response).append($li);
220});
221}});
222if(data.posted_data_hash){
223$form.find('input[name="_wpcf7_posted_data_hash"]').first()
224.val(data.posted_data_hash);
225}};
226$.ajax({
227type: 'POST',
228url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/feedback'),
229data: formData,
230dataType: 'json',
231processData: false,
232contentType: false
233}).done(function(data, status, xhr){
234ajaxSuccess(data, status, xhr, $form);
235$('.ajax-loader', $form).removeClass('is-active');
236}).fail(function(xhr, status, error){
237var $e=$('<div class="ajax-error"></div>').text(error.message);
238$form.after($e);
239});
240};
241wpcf7.triggerEvent=function(target, name, detail){
242var event=new CustomEvent('wpcf7' + name, {
243bubbles: true,
244detail: detail
245});
246$(target).get(0).dispatchEvent(event);
247};
248wpcf7.setStatus=function(form, status){
249var $form=$(form);
250var prevStatus=$form.attr('data-status');
251$form.data('status', status);
252$form.addClass(status);
253$form.attr('data-status', status);
254if(prevStatus&&prevStatus!==status){
255$form.removeClass(prevStatus);
256}}
257wpcf7.toggleSubmit=function(form, state){
258var $form=$(form);
259var $submit=$('input:submit', $form);
260if(typeof state!=='undefined'){
261$submit.prop('disabled', ! state);
262return;
263}
264if($form.hasClass('wpcf7-acceptance-as-validation')){
265return;
266}
267$submit.prop('disabled', false);
268$('.wpcf7-acceptance', $form).each(function(){
269var $span=$(this);
270var $input=$('input:checkbox', $span);
271if(! $span.hasClass('optional')){
272if($span.hasClass('invert')&&$input.is(':checked')
273|| ! $span.hasClass('invert')&&! $input.is(':checked')){
274$submit.prop('disabled', true);
275return false;
276}}
277});
278};
279wpcf7.resetCounter=function(form){
280var $form=$(form);
281$('.wpcf7-character-count', $form).each(function(){
282var $count=$(this);
283var name=$count.attr('data-target-name');
284var down=$count.hasClass('down');
285var starting=parseInt($count.attr('data-starting-value'), 10);
286var maximum=parseInt($count.attr('data-maximum-value'), 10);
287var minimum=parseInt($count.attr('data-minimum-value'), 10);
288var updateCount=function(target){
289var $target=$(target);
290var length=$target.val().length;
291var count=down ? starting - length:length;
292$count.attr('data-current-value', count);
293$count.text(count);
294if(maximum&&maximum < length){
295$count.addClass('too-long');
296}else{
297$count.removeClass('too-long');
298}
299if(minimum&&length < minimum){
300$count.addClass('too-short');
301}else{
302$count.removeClass('too-short');
303}};
304$(':input[name="' + name + '"]', $form).each(function(){
305updateCount(this);
306$(this).keyup(function(){
307updateCount(this);
308});
309});
310});
311};
312wpcf7.notValidTip=function(target, message){
313var $target=$(target);
314$('.wpcf7-not-valid-tip', $target).remove();
315$('<span></span>').attr({
316'class': 'wpcf7-not-valid-tip',
317'aria-hidden': 'true',
318}).text(message).appendTo($target);
319if($target.is('.use-floating-validation-tip *')){
320var fadeOut=function(target){
321$(target).not(':hidden').animate({
322opacity: 0
323}, 'fast', function(){
324$(this).css({ 'z-index': -100 });
325});
326};
327$target.on('mouseover', '.wpcf7-not-valid-tip', function(){
328fadeOut(this);
329});
330$target.on('focus', ':input', function(){
331fadeOut($('.wpcf7-not-valid-tip', $target));
332});
333}};
334wpcf7.refill=function(form, data){
335var $form=$(form);
336var refillCaptcha=function($form, items){
337$.each(items, function(i, n){
338$form.find(':input[name="' + i + '"]').val('');
339$form.find('img.wpcf7-captcha-' + i).attr('src', n);
340var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n);
341$form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[ 1 ]);
342});
343};
344var refillQuiz=function($form, items){
345$.each(items, function(i, n){
346$form.find(':input[name="' + i + '"]').val('');
347$form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[ 0 ]);
348$form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[ 1 ]);
349});
350};
351if(typeof data==='undefined'){
352$.ajax({
353type: 'GET',
354url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/refill'),
355beforeSend: function(xhr){
356var nonce=$form.find(':input[name="_wpnonce"]').val();
357if(nonce){
358xhr.setRequestHeader('X-WP-Nonce', nonce);
359}},
360dataType: 'json'
361}).done(function(data, status, xhr){
362if(data.captcha){
363refillCaptcha($form, data.captcha);
364}
365if(data.quiz){
366refillQuiz($form, data.quiz);
367}});
368}else{
369if(data.captcha){
370refillCaptcha($form, data.captcha);
371}
372if(data.quiz){
373refillQuiz($form, data.quiz);
374}}
375};
376wpcf7.clearResponse=function(form){
377var $form=$(form);
378$form.siblings('.screen-reader-response').each(function(){
379$('[role="status"]', this).html('');
380$('ul', this).html('');
381});
382$('.wpcf7-not-valid-tip', $form).remove();
383$('[aria-invalid]', $form).attr('aria-invalid', 'false');
384$('.wpcf7-form-control', $form).removeClass('wpcf7-not-valid');
385$('.wpcf7-response-output', $form).hide().empty();
386};
387wpcf7.apiSettings.getRoute=function(path){
388var url=wpcf7.apiSettings.root;
389url=url.replace(wpcf7.apiSettings.namespace,
390wpcf7.apiSettings.namespace + path);
391return url;
392};})(jQuery);
393(function (){
394if(typeof window.CustomEvent==="function") return false;
395function CustomEvent(event, params){
396params=params||{ bubbles: false, cancelable: false, detail: undefined };
397var evt=document.createEvent('CustomEvent');
398evt.initCustomEvent(event,
399params.bubbles, params.cancelable, params.detail);
400return evt;
401}
402CustomEvent.prototype=window.Event.prototype;
403window.CustomEvent=CustomEvent;
404})();

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.