1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ 2let window = _____WB$wombat$assign$function_____("window"); 3let self = _____WB$wombat$assign$function_____("self"); 4let document = _____WB$wombat$assign$function_____("document"); 5let location = _____WB$wombat$assign$function_____("location"); 6let top = _____WB$wombat$assign$function_____("top"); 7let parent = _____WB$wombat$assign$function_____("parent"); 8let frames = _____WB$wombat$assign$function_____("frames"); 9let opens = _____WB$wombat$assign$function_____("opens"); 10( function( $ ) { 11 12 'use strict'; 13 14 if ( typeof wpcf7 === 'undefined' || wpcf7 === null ) { 15 return; 16 } 17 18 wpcf7 = $.extend( { 19 cached: 0, 20 inputs: [] 21 }, wpcf7 ); 22 23 $( function() { 24 wpcf7.supportHtml5 = ( function() { 25 var features = {}; 26 var input = document.createElement( 'input' ); 27 28 features.placeholder = 'placeholder' in input; 29 30 var inputTypes = [ 'email', 'url', 'tel', 'number', 'range', 'date' ]; 31 32 $.each( inputTypes, function( index, value ) { 33 input.setAttribute( 'type', value ); 34 features[ value ] = input.type !== 'text'; 35 } ); 36 37 return features; 38 } )(); 39 40 $( 'div.wpcf7 > form' ).each( function() { 41 var $form = $( this ); 42 wpcf7.initForm( $form ); 43 44 if ( wpcf7.cached ) { 45 wpcf7.refill( $form ); 46 } 47 } ); 48 } ); 49 50 wpcf7.getId = function( form ) { 51 return parseInt( $( 'input[name="_wpcf7"]', form ).val(), 10 ); 52 }; 53 54 wpcf7.initForm = function( form ) { 55 var $form = $( form ); 56 57 $form.submit( function( event ) { 58 if ( typeof window.FormData !== 'function' ) { 59 return; 60 } 61 62 wpcf7.submit( $form ); 63 event.preventDefault(); 64 } ); 65 66 $( '.wpcf7-submit', $form ).after( '<span class="ajax-loader"></span>' ); 67 68 wpcf7.toggleSubmit( $form ); 69 70 $form.on( 'click', '.wpcf7-acceptance', function() { 71 wpcf7.toggleSubmit( $form ); 72 } ); 73 74 // Exclusive Checkbox 75 $( '.wpcf7-exclusive-checkbox', $form ).on( 'click', 'input:checkbox', function() { 76 var name = $( this ).attr( 'name' );
77 $form.find( 'input:checkbox[name="' + name + '"]' ).not( this ).prop( 'checked', false ); 78 } ); 79 80 // Free Text Option for Checkboxes and Radio Buttons 81 $( '.wpcf7-list-item.has-free-text', $form ).each( function() { 82 var $freetext = $( ':input.wpcf7-free-text', this ); 83 var $wrap = $( this ).closest( '.wpcf7-form-control' ); 84 85 if ( $( ':checkbox, :radio', this ).is( ':checked' ) ) { 86 $freetext.prop( 'disabled', false ); 87 } else { 88 $freetext.prop( 'disabled', true ); 89 } 90 91 $wrap.on( 'change', ':checkbox, :radio', function() { 92 var $cb = $( '.has-free-text', $wrap ).find( ':checkbox, :radio' ); 93 94 if ( $cb.is( ':checked' ) ) { 95 $freetext.prop( 'disabled', false ).focus(); 96 } else { 97 $freetext.prop( 'disabled', true ); 98 } 99 } ); 100 } ); 101 102 // Placeholder Fallback 103 if ( ! wpcf7.supportHtml5.placeholder ) { 104 $( '[placeholder]', $form ).each( function() { 105 $( this ).val( $( this ).attr( 'placeholder' ) ); 106 $( this ).addClass( 'placeheld' ); 107 108 $( this ).focus( function() { 109 if ( $( this ).hasClass( 'placeheld' ) ) { 110 $( this ).val( '' ).removeClass( 'placeheld' ); 111 } 112 } ); 113 114 $( this ).blur( function() { 115 if ( '' === $( this ).val() ) { 116 $( this ).val( $( this ).attr( 'placeholder' ) ); 117 $( this ).addClass( 'placeheld' ); 118 } 119 } ); 120 } ); 121 } 122 123 if ( wpcf7.jqueryUi && ! wpcf7.supportHtml5.date ) {
124 $form.find( 'input.wpcf7-date[type="date"]' ).each( function() { 125 $( this ).datepicker( { 126 dateFormat: 'yy-mm-dd', 127 minDate: new Date( $( this ).attr( 'min' ) ), 128 maxDate: new Date( $( this ).attr( 'max' ) ) 129 } ); 130 } ); 131 } 132 133 if ( wpcf7.jqueryUi && ! wpcf7.supportHtml5.number ) { 134 $form.find( 'input.wpcf7-number[type="number"]' ).each( function() { 135 $( this ).spinner( { 136 min: $( this ).attr( 'min' ), 137 max: $( this ).attr( 'max' ), 138 step: $( this ).attr( 'step' ) 139 } ); 140 } ); 141 } 142 143 // Character Count 144 $( '.wpcf7-character-count', $form ).each( function() { 145 var $count = $( this ); 146 var name = $count.attr( 'data-target-name' ); 147 var down = $count.hasClass( 'down' ); 148 var starting = parseInt( $count.attr( 'data-starting-value' ), 10 ); 149 var maximum = parseInt( $count.attr( 'data-maximum-value' ), 10 ); 150 var minimum = parseInt( $count.attr( 'data-minimum-value' ), 10 ); 151 152 var updateCount = function( target ) { 153 var $target = $( target ); 154 var length = $target.val().length; 155 var count = down ? starting - length : length; 156 $count.attr( 'data-current-value', count ); 157 $count.text( count ); 158 159 if ( maximum && maximum < length ) { 160 $count.addClass( 'too-long' ); 161 } else { 162 $count.removeClass( 'too-long' ); 163 } 164 165 if ( minimum && length < minimum ) { 166 $count.addClass( 'too-short' ); 167 } else { 168 $count.removeClass( 'too-short' ); 169 } 170 }; 171 172 $( ':input[name="' + name + '"]', $form ).each( function() { 173 updateCount( this ); 174 175 $( this ).keyup( function() { 176 updateCount( this ); 177 } ); 178 } ); 179 } ); 180 181 // URL Input Correction 182 $form.on( 'change', '.wpcf7-validates-as-url', function() { 183 var val = $.trim( $( this ).val() ); 184 185 if ( val 186 && ! val.match( /^[a-z][a-z0-9.+-]*:/i ) 187 && -1 !== val.indexOf( '.' ) ) { 188 val = val.replace( /^\/+/, '' ); 189 val = 'http://' + val; 190 } 191 192 $( this ).val( val ); 193 } ); 194 }; 195 196 wpcf7.submit = function( form ) { 197 if ( typeof window.FormData !== 'function' ) { 198 return; 199 } 200 201 var $form = $( form ); 202 203 $( '.ajax-loader', $form ).addClass( 'is-active' ); 204 205 $( '[placeholder].placeheld', $form ).each( function( i, n ) { 206 $( n ).val( '' ); 207 } ); 208 209 wpcf7.clearResponse( $form ); 210 211 var formData = new FormData( $form.get( 0 ) ); 212 213 var detail = { 214 id: $form.closest( 'div.wpcf7' ).attr( 'id' ), 215 status: 'init', 216 inputs: [], 217 formData: formData 218 }; 219 220 $.each( $form.serializeArray(), function( i, field ) { 221 if ( '_wpcf7' == field.name ) { 222 detail.contactFormId = field.value; 223 } else if ( '_wpcf7_version' == field.name ) { 224 detail.pluginVersion = field.value; 225 } else if ( '_wpcf7_locale' == field.name ) { 226 detail.contactFormLocale = field.value; 227 } else if ( '_wpcf7_unit_tag' == field.name ) { 228 detail.unitTag = field.value; 229 } else if ( '_wpcf7_container_post' == field.name ) { 230 detail.containerPostId = field.value; 231 } else if ( field.name.match( /^_wpcf7_\w+_free_text_/ ) ) { 232 var owner = field.name.replace( /^_wpcf7_\w+_free_text_/, '' ); 233 detail.inputs.push( { 234 name: owner + '-free-text', 235 value: field.value 236 } ); 237 } else if ( field.name.match( /^_/ ) ) { 238 // do nothing 239 } else { 240 detail.inputs.push( field ); 241 } 242 } ); 243 244 wpcf7.triggerEvent( $form.closest( 'div.wpcf7' ), 'beforesubmit', detail ); 245 246 var ajaxSuccess = function( data, status, xhr, $form ) { 247 detail.id = $( data.into ).attr( 'id' ); 248 detail.status = data.status; 249 250 var $message = $( '.wpcf7-response-output', $form ); 251 252 switch ( data.status ) { 253 case 'validation_failed': 254 $.each( data.invalidFields, function( i, n ) { 255 $( n.into, $form ).each( function() { 256 wpcf7.notValidTip( this, n.message ); 257 $( '.wpcf7-form-control', this ).addClass( 'wpcf7-not-valid' ); 258 $( '[aria-invalid]', this ).attr( 'aria-invalid', 'true' ); 259 } ); 260 } ); 261 262 $message.addClass( 'wpcf7-validation-errors' ); 263 $form.addClass( 'invalid' ); 264 265 wpcf7.triggerEvent( data.into, 'invalid', detail ); 266 break; 267 case 'spam': 268 $message.addClass( 'wpcf7-spam-blocked' ); 269 $form.addClass( 'spam' ); 270 271 $( '[name="g-recaptcha-response"]', $form ).each( function() { 272 if ( '' === $( this ).val() ) { 273 var $recaptcha = $( this ).closest( '.wpcf7-form-control-wrap' ); 274 wpcf7.notValidTip( $recaptcha, wpcf7.recaptcha.messages.empty ); 275 } 276 } ); 277 278 wpcf7.triggerEvent( data.into, 'spam', detail ); 279 break; 280 case 'mail_sent': 281 $message.addClass( 'wpcf7-mail-sent-ok' ); 282 $form.addClass( 'sent' ); 283 284 if ( data.onSentOk ) { 285 $.each( data.onSentOk, function( i, n ) { eval( n ) } ); 286 } 287 288 wpcf7.triggerEvent( data.into, 'mailsent', detail ); 289 break; 290 case 'mail_failed':
291 case 'acceptance_missing': 292 default: 293 $message.addClass( 'wpcf7-mail-sent-ng' ); 294 $form.addClass( 'failed' ); 295 296 wpcf7.triggerEvent( data.into, 'mailfailed', detail ); 297 } 298 299 wpcf7.refill( $form, data ); 300 301 if ( data.onSubmit ) { 302 $.each( data.onSubmit, function( i, n ) { eval( n ) } ); 303 } 304 305 wpcf7.triggerEvent( data.into, 'submit', detail ); 306 307 if ( 'mail_sent' == data.status ) { 308 $form.each( function() { 309 this.reset(); 310 } ); 311 } 312 313 $form.find( '[placeholder].placeheld' ).each( function( i, n ) { 314 $( n ).val( $( n ).attr( 'placeholder' ) ); 315 } ); 316 317 $message.html( '' ).append( data.message ).slideDown( 'fast' ); 318 $message.attr( 'role', 'alert' ); 319 320 $( '.screen-reader-response', $form.closest( '.wpcf7' ) ).each( function() { 321 var $response = $( this ); 322 $response.html( '' ).attr( 'role', '' ).append( data.message ); 323 324 if ( data.invalidFields ) { 325 var $invalids = $( '<ul></ul>' ); 326 327 $.each( data.invalidFields, function( i, n ) { 328 if ( n.idref ) { 329 var $li = $( '<li></li>' ).append( $( '<a></a>' ).attr( 'href', '#' + n.idref ).append( n.message ) ); 330 } else { 331 var $li = $( '<li></li>' ).append( n.message ); 332 } 333 334 $invalids.append( $li ); 335 } ); 336
337 $response.append( $invalids ); 338 } 339 340 $response.attr( 'role', 'alert' ).focus(); 341 } ); 342 }; 343 344 $.ajax( { 345 type: 'POST', 346 url: wpcf7.apiSettings.getRoute( 347 '/contact-forms/' + wpcf7.getId( $form ) + '/feedback' ), 348 data: formData, 349 dataType: 'json', 350 processData: false, 351 contentType: false 352 } ).done( function( data, status, xhr ) { 353 ajaxSuccess( data, status, xhr, $form ); 354 $( '.ajax-loader', $form ).removeClass( 'is-active' ); 355 } ).fail( function( xhr, status, error ) { 356 var $e = $( '<div class="ajax-error"></div>' ).text( error.message ); 357 $form.after( $e ); 358 } ); 359 }; 360 361 wpcf7.triggerEvent = function( target, name, detail ) { 362 var $target = $( target ); 363 364 /* DOM event */ 365 var event = new CustomEvent( 'wpcf7' + name, { 366 bubbles: true, 367 detail: detail 368 } ); 369 370 $target.get( 0 ).dispatchEvent( event ); 371 372 /* jQuery event */ 373 $target.trigger( 'wpcf7:' + name, detail ); 374 $target.trigger( name + '.wpcf7', detail ); // deprecated 375 }; 376 377 wpcf7.toggleSubmit = function( form, state ) { 378 var $form = $( form ); 379 var $submit = $( 'input:submit', $form ); 380 381 if ( typeof state !== 'undefined' ) { 382 $submit.prop( 'disabled', ! state ); 383 return; 384 } 385 386 if ( $form.hasClass( 'wpcf7-acceptance-as-validation' ) ) { 387 return; 388 } 389 390 $submit.prop( 'disabled', false ); 391 392 $( 'input:checkbox.wpcf7-acceptance', $form ).each( function() { 393 var $a = $( this ); 394 395 if ( $a.hasClass( 'wpcf7-invert' ) && $a.is( ':checked' ) 396 || ! $a.hasClass( 'wpcf7-invert' ) && ! $a.is( ':checked' ) ) { 397 $submit.prop( 'disabled', true ); 398 return false; 399 } 400 } ); 401 }; 402 403 wpcf7.notValidTip = function( target, message ) { 404 var $target = $( target ); 405 $( '.wpcf7-not-valid-tip', $target ).remove(); 406 $( '<span role="alert" class="wpcf7-not-valid-tip"></span>' ) 407 .text( message ).appendTo( $target ); 408 409 if ( $target.is( '.use-floating-validation-tip *' ) ) { 410 var fadeOut = function( target ) { 411 $( target ).not( ':hidden' ).animate( { 412 opacity: 0 413 }, 'fast', function() { 414 $( this ).css( { 'z-index': -100 } ); 415 } ); 416 }; 417 418 $target.on( 'mouseover', '.wpcf7-not-valid-tip', function() { 419 fadeOut( this ); 420 } ); 421 422 $target.on( 'focus', ':input', function() { 423 fadeOut( $( '.wpcf7-not-valid-tip', $target ) ); 424 } ); 425 } 426 }; 427 428 wpcf7.refill = function( form, data ) { 429 var $form = $( form ); 430 431 var refillCaptcha = function( $form, items ) { 432 $.each( items, function( i, n ) { 433 $form.find( ':input[name="' + i + '"]' ).val( '' );
434 $form.find( 'img.wpcf7-captcha-' + i ).attr( 'src', n ); 435 var match = /([0-9]+)\.(png|gif|jpeg)$/.exec( n ); 436 $form.find( 'input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]' ).attr( 'value', match[ 1 ] ); 437 } ); 438 }; 439 440 var refillQuiz = function( $form, items ) { 441 $.each( items, function( i, n ) { 442 $form.find( ':input[name="' + i + '"]' ).val( '' ); 443 $form.find( ':input[name="' + i + '"]' ).siblings( 'span.wpcf7-quiz-label' ).text( n[ 0 ] ); 444 $form.find( 'input:hidden[name="_wpcf7_quiz_answer_' + i + '"]' ).attr( 'value', n[ 1 ] ); 445 } ); 446 }; 447 448 if ( typeof data === 'undefined' ) { 449 $.ajax( { 450 type: 'GET', 451 url: wpcf7.apiSettings.getRoute( 452 '/contact-forms/' + wpcf7.getId( $form ) + '/refill' ), 453 beforeSend: function( xhr ) { 454 var nonce = $form.find( ':input[name="_wpnonce"]' ).val(); 455 456 if ( nonce ) { 457 xhr.setRequestHeader( 'X-WP-Nonce', nonce ); 458 } 459 }, 460 dataType: 'json' 461 } ).done( function( data, status, xhr ) { 462 if ( data.captcha ) { 463 refillCaptcha( $form, data.captcha ); 464 } 465 466 if ( data.quiz ) { 467 refillQuiz( $form, data.quiz ); 468 } 469 } ); 470 471 } else { 472 if ( data.captcha ) { 473 refillCaptcha( $form, data.captcha ); 474 } 475 476 if ( data.quiz ) { 477 refillQuiz( $form, data.quiz ); 478 } 479 } 480 }; 481 482 wpcf7.clearResponse = function( form ) { 483 var $form = $( form ); 484 $form.removeClass( 'invalid spam sent failed' ); 485 $form.siblings( '.screen-reader-response' ).html( '' ).attr( 'role', '' ); 486 487 $( '.wpcf7-not-valid-tip', $form ).remove(); 488 $( '[aria-invalid]', $form ).attr( 'aria-invalid', 'false' ); 489 $( '.wpcf7-form-control', $form ).removeClass( 'wpcf7-not-valid' ); 490 491 $( '.wpcf7-response-output', $form ) 492 .hide().empty().removeAttr( 'role' ) 493 .removeClass( 'wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked' ); 494 }; 495 496 wpcf7.apiSettings.getRoute = function( path ) { 497 var url = wpcf7.apiSettings.root; 498 499 url = url.replace( 500 wpcf7.apiSettings.namespace, 501 wpcf7.apiSettings.namespace + path ); 502 503 return url; 504 }; 505 506} )( jQuery ); 507 508/* 509 * Polyfill for Internet Explorer 510 * See https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent 511 */ 512( function () { 513 if ( typeof window.CustomEvent === "function" ) return false; 514 515 function CustomEvent ( event, params ) { 516 params = params || { bubbles: false, cancelable: false, detail: undefined }; 517 var evt = document.createEvent( 'CustomEvent' ); 518 evt.initCustomEvent( event, 519 params.bubbles, params.cancelable, params.detail ); 520 return evt; 521 } 522 523 CustomEvent.prototype = window.Event.prototype; 524 525 window.CustomEvent = CustomEvent; 526} )(); 527 528}
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.