1!function(e){"use strict";e.WS_Form.prototype.form_conditional=function(t){var a=this;if(void 0===t&&(t=!1),!1===this.conditional_cache){if(void 0===(u=this.get_object_meta_value(this.form,"conditional",!1)).groups)return!1;if(void 0===u.groups[0])return!1;if(void 0===u.groups[0].rows)return!1;for(var i in u.groups[0].rows)if(u.groups[0].rows.hasOwnProperty(i)){var s=u.groups[0].rows[i];if(null!==s&&"object"==typeof s&&(void 0===s.disabled||!s.disabled)&&void 0!==s.data&&void 0!==s.data[0]&&void 0!==s.data[1]){var o=s.data[0],r=s.data[1];try{r=JSON.parse(r)}catch(e){r=!1}!1!==r&&(r.label=o,r.last_state=[],this.conditional_events(r,t),!1===this.conditional_cache&&(this.conditional_cache=[]),this.conditional_cache.push(r))}}}else for(var i in this.conditional_cache){if(this.conditional_cache.hasOwnProperty(i))(r=this.conditional_cache[i]).last_state=[],this.conditional_events(r,t)}var c=[];for(var _ in this.conditional_event_selector_to_condition)if(this.conditional_event_selector_to_condition.hasOwnProperty(_)){var n=this.conditional_event_selector_to_condition[_];for(var d in n)if(n.hasOwnProperty(d)){var l=n[d],h=l.object_event_selector,f=l.object_event_obj,u=l.conditionals;if(t){"null"===_&&(_=null);f.each(function(){e(this).on(d,_,{conditionals:u},function(t,i,s,o){if(void 0===s||void 0===o||a.form_id===s||a.form_instance_id===o){var r=e(this).closest("[data-repeatable-index]"),c=r.length?r.attr("data-repeatable-index"):0;for(var _ in t.data.conditionals)if(t.data.conditionals.hasOwnProperty(_)){var n=t.data.conditionals[_];a.conditional_process(n,!1,e(this),c,t)}}}),a.form_events_reset.push({obj:e(this),event:d})}),this.log("log_conditional_event",(null===_?this.language("debug_form"):_)+" ("+d+")","conditional")}var v=e(h,this.form_canvas_obj),b=[],p=[];for(var m in v.each(function(){if(void 0!==e(this).attr("name")){var t=e(this).attr("name");p.includes(t)||(p.push(t),b.push(e(this)))}}),b)if(b.hasOwnProperty(m)){var g=b[m];if(void 0===g.attr("data-wsf-conditional-initialize-once")){var k=g.closest("[data-repeatable-index]"),w=k.length?k.attr("data-repeatable-index"):0,y=!1;for(var i in u)if(u.hasOwnProperty(i)){r=u[i];if(a.conditional_destination_repeatable(r))y=!0;a.conditional_process(r,!0,g,w,!1)}y||c.includes(g)||c.push(g)}}}}for(var j in c){if(c.hasOwnProperty(j))c[j].attr("data-wsf-conditional-initialize-once","")}},e.WS_Form.prototype.conditional_destination_repeatable=function(e){return this.conditional_destination_repeatable_then_else(e,"then")||this.conditional_destination_repeatable_then_else(e,"else")},e.WS_Form.prototype.conditional_destination_repeatable_then_else=function(e,t){var a=e[t];for(var i in a)if(a.hasOwnProperty(i)){var s=a[i];if(this.conditional_action_check(s)){var o=s.object,r=s.object_id;switch(o){case"section":if(void 0===this.section_data_cache[r])continue;var c=this.section_data_cache[r];break;case"field":if(void 0===this.field_data_cache[r])continue;var _=this.field_data_cache[r].section_id;if(void 0===this.section_data_cache[_])continue;c=this.section_data_cache[_]}if(this.get_object_meta_value(c,"section_repeatable"))return!0}}return!1},e.WS_Form.prototype.conditional_events=function(t,a){void 0===a&&(a=!0);var i=this,s=void 0!==this.framework.tabs.public.selector_href?this.framework.tabs.public.selector_href:"href";for(var o in t.if)if(t.if.hasOwnProperty(o)){var r=t.if[o];if(void 0!==r.conditions)for(var c in r.conditions)if(r.conditions.hasOwnProperty(c)){var _=r.conditions[c];if(this.conditional_condition_check(_)){var n=_.object,d=_.object_id,l=_.logic,h=_.value,f=[];switch(n){case"form":f.push(this.conditional_event_get(n,this.form_id,0,this.form,l));break;case"group":if(void 0===this.group_data_cache[d])break;var u=this.group_data_cache[d];f.push(this.conditional_event_get(n,d,!1,u,l));break;case"section":if(void 0===this.section_data_cache[d])break;u=this.section_data_cache[d];f.push(this.conditional_event_get(n,d,!1,u,l));break;case"field":if(void 0===this.field_data_cache[d])break;u=this.field_data_cache[d];var v=e.WS_Form.field_type_cache[u.type],b=this.get_object_row_id(_),p=void 0!==u.section_repeatable_section_id;f.push(this.conditional_event_get(n,d,b,u,l,p));var m=[];switch(l){case"field_match":case"field_match_not":var g=h;if(0==parseInt(g,10))break;if(void 0===this.field_data_cache[g])break;var k=this.field_data_cache[g];p=void 0!==k.section_repeatable_section_id;f.push(this.conditional_event_get("field",g,!1,k,l,p)),m.field_match_id=this.form_id_prefix+"field-"+g}var w=this.get_field_value_fallback(v,!1,"attribute_"+l,!1);if("object"==typeof w){var y="#"+this.form_id_prefix+n+"-"+d;for(var j in w)if(w.hasOwnProperty(j)){var x=w[j];x=this.mask_parse(x,m),e(y,this.form_canvas_obj).attr(j,x)}}break;case"submit":f.push(this.conditional_event_get(n,0,!1,this.submit,l));break;case"user":f.push(this.conditional_event_get(n,0,!1,!1,l))}for(var O in f)if(f.hasOwnProperty(O)){var q=f[O],A=(y=null,q.repeatable);if("wsf-group-index"==q.event||"wsf-section-repeatable"==q.event||"wsf-validate"==q.event||"wsf-validate-silent"==q.event){if(!a)continue;"wsf-section-repeatable"==q.event&&(q.event="wsf-section-repeatable-"+d);var S=this.form_canvas_obj;y=null}else if("wsf-rendered"==q.event||"wsf-submit"==q.event||"wsf-save"==q.event||"wsf-submit wsf-save"==q.event||"wsf-submit-complete"==q.event||"wsf-save-complete"==q.event||"wsf-complete"==q.event||"wsf-submit-error"==q.event||"wsf-save-error"==q.event||"wsf-error"==q.event||"wsf-submit-success"==q.event||"wsf-save-success"==q.event||"wsf-success"==q.event)S=e(document),y=null;else{S=this.form_canvas_obj;switch(q.object){case"form":y=null;break;case"group":y="["+s+'="#'+this.form_id_prefix+"group-"+d+'"]';break;case"section":y='[id^="'+this.esc_selector(this.form_id_prefix+q.object+"-"+q.object_id)+'"][data-id="'+this.esc_selector(q.object_id)+'"]';break;case"field":var W=this.field_data_cache[d];switch(W.type){case"radio":case"price_radio":case"checkbox":case"price_checkbox":y='[name^="'+this.esc_selector(ws_form_settings.field_prefix+d)+'["],[name^="'+this.esc_selector(ws_form_settings.field_prefix+d)+'["] ~ label';break;case"select":case"price_select":if(this.get_object_meta_value(W,"select2",!1)&&-1!==["click","mousedown","mouseup","mouseover","mouseout","touchstart","touchmove","touchend","touchcancel"].indexOf(q.event))if(A)y='[id^
1="'+this.esc_selector(this.form_id_prefix+q.object+"-wrapper-"+q.object_id)+'-repeat-"] .select2';else y="#"+this.esc_selector(this.form_id_prefix+q.object+"-wrapper-"+q.object_id)+" .select2";else if(A)y='[id^="'+this.esc_selector(this.form_id_prefix+q.object+"-"+q.object_id)+'-repeat-"]';else y="#"+this.esc_selector(this.form_id_prefix+q.object+"-"+q.object_id);break;default:if(A)y='[id^="'+this.esc_selector(this.form_id_prefix+q.object+"-"+q.object_id)+'-repeat-"]';else y="#"+this.esc_selector(this.form_id_prefix+q.object+"-"+q.object_id)}}}if(q.create&&!1!==q.event&&!1!==y){var F=0,P=e(y);if(P.each(function(){e(this).attr("data-init-conditional")&&F++}),0===F)switch(q.event){case"recaptcha":this.recaptchas_conditions.push(function(){i.conditional_process(t,!1,P,0,!1)});break;case"hcaptcha":this.hcaptchas_conditions.push(function(){i.conditional_process(t,!1,P,0,!1)});break;case"turnstile":this.turnstiles_conditions.push(function(){i.conditional_process(t,!1,P,0,!1)});break;default:if(null===y&&(y="null"),void 0===this.conditional_event_selector_to_condition[y]&&(this.conditional_event_selector_to_condition[y]=[]),void 0===this.conditional_event_selector_to_condition[y][q.event]&&(this.conditional_event_selector_to_condition[y][q.event]={object_event_selector:y,object_event_obj:S,conditionals:[],event_processed:!1}),-1===this.conditional_event_selector_to_condition[y][q.event].conditionals.indexOf(t)&&this.conditional_event_selector_to_condition[y][q.event].conditionals.push(t),ws_form_settings.debug){var C=e(y,this.form_canvas_obj).attr("data-populate-event"),D=C?C.split(" "):[];D.push(q.event),C=(D=D.filter(function(e,t,a){return a.indexOf(e)===t})).join(" "),e(y,this.form_canvas_obj).attr("data-populate-event",C)}}}}}}}},e.WS_Form.prototype.conditional_event_get=function(t,a,i,s,o,r){void 0===r&&(r=!1);var c={object:t,object_id:a,object_row_id:i,create:!0,event:!1,row:!1,repeatable:r};switch(t){case"field":var _=e.WS_Form.field_type_cache[s.type];void 0!==_.conditional&&(void 0!==_.conditional.exclude_condition&&(c.create=!_.conditional.exclude_condition),void 0!==_.conditional.condition_event&&(c.event=_.conditional.condition_event),void 0!==_.conditional.condition_event_row&&_.conditional.condition_event_row&&!1!==i&&(c.row=!0))}var n=e.WS_Form.settings_form.conditional.objects[t].logic;return void 0!==n[o]&&void 0!==n[o].event&&(c.event=n[o].event),c},e.WS_Form.prototype.conditional_process=function(t,a,i,s,o){if(void 0===t.if)return!1;if(void 0===t.then)return!1;if(void 0===t.else)return!1;var r=!1;for(var c in t.if)if(t.if.hasOwnProperty(c)){var _=t.if[c];if(void 0!==_.conditions){var n=!1,d=[];for(var l in _.conditions)if(_.conditions.hasOwnProperty(l)){var h=_.conditions[l];if(this.conditional_condition_check(h)){var f=h.object,u=h.object_id,v=h.logic,b=h.value,p=void 0===h.case_sensitive||h.case_sensitive,m=l>0?void 0===h.logic_previous?"||":h.logic_previous:"||",g=ws_form_settings.field_prefix+u,k=void 0===h.force_result?null:h.force_result;switch(f){case"form":var w=!1,y="#"+this.esc_selector(this.form_obj_id);break;case"group":w=!1,y="#"+this.esc_selector(this.form_id_prefix+"group-"+u);break;case"section":w=!1,y="#"+this.esc_selector(this.form_id_prefix+f+"-"+u);break;case"field":w=this.get_object_row_id(h);if(!s){var j=this.field_data_cache[u];if("object"==typeof j&&void 0!==j.section_id&&"object"==typeof this.section_data_cache[j.section_id]){var x=this.section_data_cache[j.section_id];if(this.get_object_meta_value(x,"section_repeatable"))return}}var O=s>0?"-repeat-"+s:"",q=(y="#"+this.esc_selector(this.form_id_prefix+f+"-"+u+O),e('[data-type][data-id="'+this.esc_selector(u)+'"]'+(s>0?'[data-repeatable-index="'+this.esc_selector(s)+'"]':""),this.form_canvas_obj))}if(e.WS_Form.debug_rendered){switch(f){case"form":var A=this.form;break;case"group":A=this.group_data_cache[u];break;case"section":A=this.section_data_cache[u];break;case"field":A=this.field_data_cache[u]}if(void 0!==A){var S=e.WS_Form.settings_form.conditional,W=S.logic_previous,F=S.objects[f].logic;if(void 0!==F[v])var P=F[v].text.toUpperCase();else P="";if(void 0!==W[m])var C=W[m].text.toUpperCase();else C="";d.push("<strong>"+(l>0?C+" ":"")+"["+this.esc_html(A.label)+"] "+P+(""!=b?" '"+this.esc_html(b)+"'":"")+"</strong> ("+(void 0!==A.type?"Type: "+A.type+" | ":"")+"ID: "+u+(!1!==w?" | Row ID: "+w.join(", "):"")+")")}}var D=e(y,this.form_canvas_obj),I=D.length?D.val():"";p||(I&&"string"==typeof I&&(I=I.toLowerCase()),b&&"string"==typeof b&&(b=b.toLowerCase()));if(-1!==["r==","r!=","r>","r<","r>=","r<="].indexOf(v)){var z=e('[data-repeatable][data-id="'+this.esc_selector(u)+'"]',this.form_canvas_obj);if(!z.length)continue;I=z.length}b=this.parse_variables_process(b).output;switch(v){case"d==":case"d!=":case"d>":case"d<":case"d>=":case"d<=":if(!1!==(N=void 0!==this.field_data_cache[u]&&this.field_data_cache[u])){var T=this.get_object_meta_value(N,"input_type_datetime","date"),L=this.get_object_meta_value(N,"format_date",ws_form_settings.date_format);L||(L=ws_form_settings.date_format),b=this.get_date(b,T,L),I=this.get_date(I,T,L)}break;case"==":case"!=":case">":case"<":case">=":case"<=":var N;if(!1!==(N=void 0!==this.field_data_cache[u]&&this.field_data_cache[u])){switch(N.type){case"price":case"price_subtotal":case"cart_price":case"cart_total":I=this.get_number(I,0,!0);break;default:I=this.get_number(I,0,!1)}b=parseFloat(b)}}var Z=!1;switch(v){case"==":Z=I==b;break;case"!=":Z=I!=b;break;case">":Z=I>b;break;case"<":Z=I<b;break;case">=":Z=I>=b;break;case"<=":Z=I<=b;break;case"d==":""!=I&&""!=b&&(Z=Date.parse(I)==Date.parse(b));break;case"d!=":""!=I&&""!=b&&(Z=Date.parse(I)!=Date.parse(b));break;case"d>":""!=I&&""!=b&&(Z=Date.parse(I)>Date.parse(b));break;case"d<":""!=I&&""!=b&&(Z=Date.parse(I)<Date.parse(b));break;case"d>=":""!=I&&""!=b&&(Z=Date.parse(I)>=Date.parse(b));break;case"d<=":""!=I&&""!=b&&(Z=Date.parse(I)<=Date.parse(b));break;case"rc==":case"rc!=":I=e('input[type="checkbox"]:not([data-wsf-select-all]):checked',q).length;Z=I==this.get_number(b),"rc!="==v&&(Z=!Z);break;case"rc>":I=e('input[type="checkbox"]:not([data-wsf-select-all]):checked',q).length;Z=I>this.get_number(b);break;case"rc<":I=e('input[type="checkbox"]:not([data-wsf-select-all]):checked',q).length;Z=I<this.get_number(b);break;case"rs==":case"rs!=":I=e("option:not([data-placeholder]):selected",q).length;Z=I==this.get_number(b),"rs!="==v&&(Z=!Z);break;case"rs>":I=e("option:not([data-placeholder]):selected",q).length;Z=I>this.get_number(b);break;case"rs<":I=e("option:not([data-placeholder]):selected",q).length;Z=I<this.get_number(b);break;case"r==":Z=this.get_number(I)==this.get_number(b);break;case"r!=":Z=this.get_number(I)!=this.get_number(b);break;case"r>":""!=I&&(Z=this.get_number(I)>this.get_number(b));break;case"r<":""!=I&&(Z=this.get_number(I)<this.get_number(b));break;case"r>=":""!=I&&(Z=this.get_number(I)>=this.get_number(b));break;case"r<=":""!=I&&(Z=this.get_number(I)<=this.get_number(b));break;case"section_repeatable":t.last_state[s]="",Z=o.type=="wsf-section-repeatable-"+u;break;case"equals":case"c==":Z=I==b;break;case"equals_not":case"c!=":Z=I!=b;break;case"contains":case"contains_not":Z=-1!=I.indexOf(b),"contains_not"==v&&(Z=!Z);break;case"starts":case"starts_not":Z=I.startsWith(b),"starts_not"==v&&(Z=!Z);break;case"ends":case"ends_not":Z=I.endsWith(b),"ends_not"==v&&(Z=!Z);break;case"blank":case"blank_not":Z=""==I,"blank_not"==v&&(Z=!Z);break;case"checked":case"checked_not":Z=!1;if("object"!=typeof w)break;for(var E in w)if(w.hasOwnProperty(E)){var R=w[E],U="#"+this.esc_selector(this.form_id_prefix+f+"-"+u+"-row-"+R+O),Q=e(U,this.form_canvas_obj).is(":checked");Z|=Q}"checked_not"==v&&(Z=!Z);break;case"checked_any":case"checked_any_not":Z=e("input:checked",q).length>0,"checked_any_not"==v&&(Z=!Z);break;case"checked_all":case"checked_all_not":var $=e("input:not([disabled])",q),J=$.filter(":checked");Z=$.length==J.length;"checked_all_not"==v&&(Z=!Z);break;case"checked_value_equals":case"checked_value_equals_not":e("input:checked",q).each(function(){var t=e(this).val();if(p||(t=t.toLowerCase()),t===b)return Z=!0,!1}),"checked_value_equals_not"==v&&(Z=!Z);break;case"selected":case"selected_not":Z=!1;if("object"!=typeof w)break;for(var E in w)if(w.hasOwnProperty(E)){R=w[E],Q=e('option[data-id="'+this.esc_selector(R)+'"]',e(y,this.form_canvas_obj)).prop("selected");Z|=Q}"selected_not"==v&&(Z=!Z);break;case"selected_any":case"selected_any_not":Z=e("option:not([data-placeholder]):selected",e
1(y,this.form_canvas_obj)).length>0;"selected_any_not"==v&&(Z=!Z);break;case"selected_all":case"selected_all_not":var K=e("option:not([data-placeholder],[disabled])",e(y,this.form_canvas_obj)),B=K.filter(":selected");Z=K.length==B.length;"selected_all_not"==v&&(Z=!Z);break;case"selected_value_equals":case"selected_value_equals_not":e("option:selected",e(y,this.form_canvas_obj)).each(function(){var t=e(this).val();if(p||(t=t.toLowerCase()),t===b)return Z=!0,!1}),"selected_value_equals_not"==v&&(Z=!Z);break;case"regex_email":case"regex_email_not":Z=(G=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(I),"regex_email_not"==v&&(Z=!Z);break;case"regex_url":case"regex_url_not":Z=(G=/[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi).test(I),"regex_url_not"==v&&(Z=!Z);break;case"regex":case"regex_not":var G=new RegExp(b);Z=G.test(I),"regex_not"==v&&(Z=!Z);break;case"wsf-rendered":case"wsf-submit":case"wsf-submit-complete":case"wsf-submit-success":case"wsf-submit-error":case"wsf-save":case"wsf-save-complete":case"wsf-save-success":case"wsf-save-error":case"wsf-submit-save":case"wsf-complete":case"wsf-success":case"wsf-error":(Z=v==o.type||"wsf-submit-save"==v&&-1!=["wsf-submit","wsf-save"].indexOf(o.type))&&(t.last_state[s]="");break;case"click":case"mousedown":case"mouseup":case"mouseover":case"mouseout":case"touchstart":case"touchmove":case"touchend":case"touchcancel":case"focus":case"blur":case"change":case"change_input":case"input":case"keyup":case"keydown":if(!o||!o.target){Z=!1;break}var H=e(o.target),M=!1;switch(f){case"form":M=!0;break;case"group":M=this.get_group_id(H)==u;break;case"section":M=this.get_section_id(H)==u;break;case"field":M=this.get_field_id(H)==u}(Z=M&&(v==o.type||void 0!==o.handleObj&&void 0!==o.handleObj.origType&&v==o.handleObj.origType||"change_input"==v&&-1!=["change","input"].indexOf(o.type)||"click"==v&&-1!=["click","wsf-click"].indexOf(o.type)))&&(t.last_state[s]="");break;case"token_validated":case"token_validated_not":Z=!1!==this.submit&&void 0!==this.submit.token_validated&&this.submit.token_validated,"token_validated_not"==v&&(Z=!Z);break;case"user_logged_in":case"user_logged_in_not":case"user_role":case"user_role_not":case"user_capability":case"user_capability_not":Z=k;break;case"ch>":case"ch<":case"cs>":case"cs<":case"cl>":case"cl<":case"ca>":case"ca<":if("function"!=typeof this.color_to_hsla_array){Z=!1;break}var V=this.color_to_hsla_array(I);switch(v){case"ch>":Z=V.h>b;break;case"ch<":Z=V.h<b;break;case"cs>":Z=V.s>b;break;case"cs<":Z=V.s<b;break;case"cl>":Z=V.l>b;break;case"cl<":Z=V.l<b;break;case"ca>":Z=V.a>b;break;case"ca<":Z=V.a<b}break;case"recaptcha":case"recaptcha_not":if("function"==typeof this.recaptcha_get_response_by_name){var X=this.recaptcha_get_response_by_name(g);Z="string"==typeof X&&X.length>0,"recaptcha_not"==v&&(Z=!Z)}break;case"hcaptcha":case"hcaptcha_not":if("function"==typeof this.hcaptcha_get_response_by_name){X=this.hcaptcha_get_response_by_name(g);Z="string"==typeof X&&X.length>0,"hcaptcha_not"==v&&(Z=!Z)}break;case"turnstile":case"turnstile_not":if("function"==typeof this.turnstile_get_response_by_name){X=this.turnstile_get_response_by_name(g);Z="string"==typeof X&&X.length>0,"turnstile_not"==v&&(Z=!Z)}break;case"media_capture":case"media_capture_not":"function"==typeof this.media_capture_get_response_by_name&&(Z=this.media_capture_get_response_by_name(g),"media_capture_not"==v&&(Z=!Z));break;case"signature":case"signature_not":"function"==typeof this.signature_get_response_by_name&&(Z=this.signature_get_response_by_name(g),"signature_not"==v&&(Z=!Z));break;case"file":case"file_not":"function"==typeof this.file_get_count_by_field_id&&(Z=this.file_get_count_by_field_id(u)>0,"file_not"==v&&(Z=!Z));break;case"f>":"function"==typeof this.file_get_count_by_field_id&&(Z=this.file_get_count_by_field_id(u)>b);break;case"f<":"function"==typeof this.file_get_count_by_field_id&&(Z=this.file_get_count_by_field_id(u)<b);break;case"f==":case"f!=":"function"==typeof this.file_get_count_by_field_id&&(Z=this.file_get_count_by_field_id(u)==b,"f!="==v&&(Z=!Z));break;case"field_match":case"field_match_not":var Y=parseInt(b,10);if(Y>0){var ee="#"+this.form_id_prefix+"field-"+Y+(s>0?"-repeat-"+s:""),te=e(ee,this.form_canvas_obj).val();p||te&&"string"==typeof te&&(te=te.toLowerCase()),Z=te==I,"field_match_not"==v&&(Z=!Z)}break;case"cc==":Z=I.length==parseInt(b,10);break;case"cc!=":Z=I.length!=parseInt(b,10);break;case"cc>":Z=I.length>parseInt(b,10);break;case"cc<":Z=I.length<parseInt(b,10);break;case"cw==":Z=this.get_word_count(I)==parseInt(b,10);break;case"cw!=":Z=this.get_word_count(I)!=parseInt(b,10);break;case"cw>":Z=this.get_word_count(I)>parseInt(b,10);break;case"cw<":Z=this.get_word_count(I)<parseInt(b,10);break;case"select2_ajax_results":case"select2_ajax_results_not":if(a)return;t.last_state[s]="",Z=void 0!==e(y,this.form_canvas_obj).attr("data-select2-ajax-results"),"select2_ajax_results_not"==v&&(Z=!Z);break;case"google_route_status_ok":if(a)return;t.last_state[s]="",Z=void 0!==e(y,this.form_canvas_obj).attr("data-google-route-status")&&"OK"==e(y,this.form_canvas_obj).attr("data-google-route-status");break;case"google_route_status_zero_results":if(a)return;t.last_state[s]="",Z=void 0!==e(y,this.form_canvas_obj).attr("data-google-route-status")&&"ZERO_RESULTS"==e(y,this.form_canvas_obj).attr("data-google-route-status");break;case"active":case"active_not":Z=e(y,this.form_canvas_obj).attr("data-group-index")==this.group_index,"active_not"==v&&(Z=!Z);break;case"validate":case"validate_not":switch(f){case"form":Z=this.form_valid;break;case"group":case"section":Z=this.object_validate(e(y,this.form_canvas_obj));break;case"field":Z=this.object_validate(q)}"validate_not"==v&&(Z=!Z)}n=this.conditional_logic_previous(n,Z,m)}}m=c>0?void 0===_.logic_previous?"||":_.logic_previous:"||";r=this.conditional_logic_previous(r,n,m)}}var ae=!1;if(r?!0===t.last_state[s]&&void 0!==t.last_state[s]||(ae="then",t.last_state[s]=!0):!1===t.last_state[s]&&void 0!==t.last_state[s]||(ae="else",t.last_state[s]=!1),!1!==ae){var ie=t[ae];ie.length&&(this.log("log_conditional_fired_"+ae,"("+this.esc_html(t.label)+") "+d.join(" "),"conditional"),this.conditional_process_actions(ie,ae,i,s))}!a&&this.has_ecommerce&&"function"==typeof this.form_ecommerce_calculate&&this.form_ecommerce_calculate()},e.WS_Form.prototype.conditional_process_actions=function(t,a,i,s){var o=0,r=!1,c=!1,_=!1,n=this;for(var d in t)if(t.hasOwnProperty(d)){var l=t[d];if(this.conditional_action_check(l)){var h=l.object,f=l.object_id,u=this.get_object_row_id(l),v=l.action;switch(h){case"form":var b=n.form_obj,p=n.form_obj,m=void 0!==l.value&&this.parse_variables_process(l.value,!1,!1,!1,!1,!1).output,g=this.conditional_process_action(a,v,b,p,h,f,!1,m,!1);
1r=r||g.process_required,c=c||g.process_bypass,_=_||g.process_navigation;break;case"group":var k="#"+this.esc_selector(this.form_id_prefix+"group-"+f);b=p=e(k,this.form_canvas_obj),m=void 0!==l.value&&this.parse_variables_process(l.value,!1,!1,!1,!1,!1).output,g=this.conditional_process_action(a,v,b,p,h,f,!1,m,!1);r=r||g.process_required,c=c||g.process_bypass,_=_||g.process_navigation;break;case"section":var w=this.get_section_id(i);if(!(j=e('[id^="'+this.esc_selector(this.form_id_prefix)+'section-"][data-id="'+this.esc_selector(f)+'"]',this.form_canvas_obj)).length)break;var y=j.first();w===parseInt(f,10)&&y.attr("data-repeatable-index")&&(j=j.filter('[data-repeatable-index="'+this.esc_selector(s)+'"]')),j.each(function(){var t=void 0!==e(this).attr("data-repeatable-index")&&e(this).attr("data-repeatable-index"),i=void 0!==l.value&&n.parse_variables_process(l.value,t,!1,!1,!1,!1,!1).output,s=n.conditional_process_action(a,v,e(this),e(this),h,f,!1,i,t);r=r||s.process_required,c=c||s.process_bypass,_=_||s.process_navigation});break;case"field":var j;w=this.get_section_id(i);if(!(j=e('[id^="'+this.esc_selector(this.form_id_prefix)+'field-wrapper-"][data-id="'+this.esc_selector(f)+'"],input[type="hidden"][data-id-hidden="'+this.esc_selector(f)+'"]',this.form_canvas_obj)).length)break;y=j.first();w===this.get_section_id(y.first())&&y.attr("data-repeatable-index")&&(j=j.filter('[data-repeatable-index="'+this.esc_selector(s)+'"]')),j.each(function(){var t=void 0!==e(this).attr("data-repeatable-index")&&e(this).attr("data-repeatable-index"),i=!1!==t?"-repeat-"+t:"";if("object"==typeof u){var s=[];for(var o in u)if(u.hasOwnProperty(o)){var d=u[o];s.push("#"+n.esc_selector(n.form_id_prefix+"field-"+f+"-row-"+d+i))}var b=s.join(", ")}else b="#"+n.esc_selector(n.form_id_prefix+"field-"+f+i);var p=e(b,n.form_canvas_obj),m=void 0!==n.field_data_cache[f]&&n.field_data_cache[f],g=void 0!==l.value&&n.parse_variables_process(l.value,t,!1,m,!1,!1,!1).output,k=n.conditional_process_action(a,v,e(this),p,h,f,u,g,t);r=r||k.process_required,c=c||k.process_bypass,_=_||k.process_navigation});break;case"action":m=void 0!==l.value&&n.parse_variables_process(l.value,!1,!1,!1,!1,!1).output,g=n.conditional_process_action(a,v,e(this),!1,h,f,!1,m,!1);r=r||g.process_required,c=c||g.process_bypass,_=_||g.process_navigation}o++}}return r&&("function"==typeof this.form_progress&&this.form_progress(),this.form_required()),c&&this.form_bypass(!0)&&"function"==typeof this.form_tab_validation_process&&this.form_tab_validation_process(),_&&this.form_navigation(),o},e.WS_Form.prototype.conditional_process_action=function(t,a,i,s,o,r,c,_,n){void 0===_&&(_="");var d=void 0!==this.framework.tabs.public.selector_href?this.framework.tabs.public.selector_href:"href",l=ws_form_settings.field_prefix+r+(n?"["+n+"]":""),h=_,f=!1,u=!1,v=!1,b=!1;switch(a){case"value":case"value_number":case"value_datetime":case"value_tel":case"value_email":case"value_textarea":case"value_url":case"value_range":case"value_rating":case"value_color":case"html":case"text_editor":case"button_html":this.field_value_set(i,s,_);break;case"value_increase":case"value_decrease":var p=this.get_number(s.val());_=this.get_number(this.parse_variables_process(_).output),p+="value_decrease"==a?-_:_;var m=s.attr("min");if(m&&p<m)break;var g=s.attr("max");if(g&&p>g)break;this.field_value_set(i,s,p);break;case"class_add_wrapper":i.addClass(_),f="debug_action_added";break;case"class_remove_wrapper":i.removeClass(_),f="debug_action_removed";break;case"class_add_field":s.addClass(_),f="debug_action_added";break;case"class_remove_field":s.removeClass(_),f="debug_action_removed";break;case"reset_signature":"function"==typeof this.signature_clear_by_name&&(this.signature_clear_by_name(l),f="debug_action_reset");break;case"value_row_select":case"value_row_deselect":s.each(function(){if(e(this).is(":enabled")){var t=e(this).prop("selected")!==("value_row_select"==a);e(this).prop("selected",!1).prop("selected","value_row_select"==a),t&&e(this).closest("select").trigger("change")}}),f="debug_action_"+("value_row_select"==a?"selected":"deselected");break;case"value_row_select_value":case"value_row_deselect_value":var k="value_row_select_value"==a;this.field_value_set(i,s,_,k),f="debug_action_"+(k?"selected_value":"deselected_value");break;case"value_row_select_all":case"value_row_deselect_all":e("option",i).each(function(){if(e(this).is(":enabled")){var t=e(this).prop("selected")!==("value_row_select_all"==a);e(this).prop("selected",!1).prop("selected","value_row_select_all"==a),t&&e(this).closest("select").trigger("change"),f="debug_action_"+("value_row_select_all"==a?"selected":"deselected")}});break;case"value_row_reset":e("option:selected:enabled",i).prop("selected",!1).trigger("change"),f="debug_action_reset";break;case"value_row_check":case"value_row_uncheck":s.each(function(){var t=e(this).prop("checked")!==("value_row_check"==a);e(this).prop("checked","value_row_check"==a),t&&e(this).trigger("change")}),f="debug_action_"+("value_row_check"==a?"checked":"unchecked");break;case"value_row_check_value":case"value_row_uncheck_value":k="value_row_check_value"==a;this.field_value_set(i,s,_,k),f="debug_action_"+(k?"checked":"unchecked");break;case"value_row_check_all":case"value_row_uncheck_all":e('input[type="checkbox"]',i).each(function(){if(e(this).is(":enabled")){var t=e(this).prop("checked")!==("value_row_check_all"==a);e(this).prop("checked","value_row_check_all"==a),t&&e(this).trigger("change"),f="debug_action_"+("value_row_check_all"==a?"checked":"unchecked")}});break;case"value_row_required":case"value_row_not_required":s.prop("required","value_row_required"==a).removeAttr("data-init-required"),"value_row_required"==a?s.attr("data-required","").attr("aria-required","true").removeAttr("data-conditional-logic-bypass"):s.removeAttr("data-required").removeAttr("aria-required").attr("data-conditional-logic-bypass",""),f="debug_action_"+("value_row_required"==a?"required":"not_required"),this.form_bypass_obj_reset(s),u=!0,v=!0;break;case"value_row_disabled":case"value_row_not_disabled":s.attr("disabled","value_row_disabled"==a),void 0!==s.parent().attr("data-wsf-select2")&&"function"==typeof this.form_select2&&this.form_select2(s.parent()),f="debug_action_"+("value_row_disabled"==a?"disabled":"enabled");break;case"value_row_visible":case"value_row_not_visible":"value_row_not_visible"===a?s.parent().hide():s.parent().show(),s.trigger("change"),f="debug_action_"+("value_row_not_visible"==a?"hide":"show"),v=!0;break;case"value_row_focus":s.trigger("focus"),f="debug_action_focussed";break;case"value_row_class_add":s.addClass(_),f="debug_action_added";break;case"value_row_class_remove":s.removeClass(_),f="debug_action_removed";break;case"value_row_set_custom_validity":this.set_invalid_feedback(s,_,c),v=!0;break;case"min":case"max":case"step":case"low":case"high":case"optimum":_=""!=_&&this.get_float(_,0),this.obj_set_attribute(s,a,_),this.form_bypass_obj_reset(s),v=!0;break;case"min_int":case"max_int":case"step_int":var w=a.replace("_int","");_=""!=_&&this.get_number(_,0,!1),this.obj_set_attribute(s,w,_),this.form_bypass_obj_reset(s),v=!0;break;case"min_date":case"max_date":case"min_time":case"max_time":if("function"==typeof s.datetimepicker)switch(a){case"min_date":s.datetimepicker("setOptions",{minDate:_});break;case"max_date":s.datetimepicker("setOptions",{maxDate:_});break;case"min_time":s.datetimepicker("setOptions",{minTime:_});break;case"max_time":s.datetimepicker("setOptions",{maxTime:_})}break;case"ecommerce_price_min":case"ecommerce_price_max":_=""!=_&&this.get_float(_,0);var y=s.val();this.obj_set_attribute(s,"data-ecommerce-"+("ecommerce_price_min"===a?"min":"max"),_),"function"==typeof this.form_ecommerce_input_mask_currency&&this.form_ecommerce_input_mask_currency(s),s.val()!==y&&s.trigger("change");break;case"select_min":case"select_max":var j="select_min"===a?"min":"max";_=""!=_&&this.get_number(_,0,!1);var x=void 0===i.attr("data-select-min-max-init");if(!1!==_?i.attr("data-select-"+j,_):i.removeAttr("data-select-"+j),x)"function"==typeof this.form_select_min_max&&this.form_select_min_max();else{var O=e('input[type="number"]',i);this.obj_set_attribute(O,j,_)}break;case"checkbox_min":case"checkbox_max":j="checkbox_min"===a?"min":"max";_=""!=_&&this.get_number(_,0,!1);var q=void 0===i.attr("data-checkbox-min-max-init");if(!1!==_?i.attr("data-checkbox-"+j,_):i.removeAttr("data-checkbox-"+j),q)"function"==typeof this.form_checkbox_min_max&&this.form_checkbox_min_max();else{O=e('input[type="number"]',i);this.obj_set_attribute(O,j,_)}break;case"visibility":switch(o){case"group":var A=e("["+d+'="#'+this.esc_selector(this.form_id_prefix+"group-"+r)+'"]',this.form_canvas_obj).parent();if("off"===_){if(i.is(":visible")){var S=e('[id^="'+this.esc_selector(this.form_id_prefix)+'group-"]:not([data-wsf-group-hidden])');if(S.length){var W=S.first().attr("id");e("["+d+'="#'+this.esc_selector(W)+'"]').trigger("click")}}A.attr("data-wsf-group-hidden","").hide().attr("aria-live","polite").attr("aria-hidden","true"),i.attr("data-wsf-group-hidden","").attr("aria-live","polite").attr("aria-hidden","true"),f="debug_action_hide"}else A.removeAttr("data-wsf-group-hidden").show().removeAttr("aria-hidden"),i.removeAttr("data-wsf-group-hidden").removeAttr("aria-hidden"),f="debug_action_show";v=!0,b=!0;break;case"section":case"field":"off"===_?(i.hide().attr("aria-live","polite").attr("aria-hidden","true"),v=!0,f="debug_action_hide"):(i.show().removeAttr("aria-hidden"),v=!0,"function"==typeof this.signatures_redraw&&("section"==o&&this.signatures_redraw(!1,r),"field"==o&&this.signatures_redraw(!1,!1,r)),f="debug_action_show")}"field"===o&&this.form_label(i);break;case"set_row_count":if(!(E=e('[data-repeatable][data-id="'+this.esc_selector(r)+'"]',this.form_canvas_obj)).length)break;var F=E.length;if(isNaN(_))break;var P=parseInt(_,10),C=this.section_data_cache[r],D=this.get_object_meta_value(C,"section_repeat_min",1);(D=""==D||isNaN(D)?1:parseInt(D,10))<1&&(D=1);var I=this.get_object_meta_value(C,"section_repeat_max",!1);if(P<D&&(P=D),!1!==(I=""!=I&&!isNaN(D)&&parseInt(I,10))&&P>I&&(P=I),F<P){for(var z=E.last(),T=P-F,L=0;L<T;L++)"function"==typeof this.section_clone&&this.section_clone(z);"function"==typeof this.section_add_init&&this.section_add_init(r),this.form_canvas_obj.trigger("wsf-section-repeatable").trigger("wsf-section-repeatable-"+r)}if(F>P){for(var N=F-P,Z=0;Z<N;Z++){var E;(E=e('[data-repeatable][data-id="'+this.esc_selector(r)+'"]',this.form_canvas_obj)).last().remove()}"function"==typeof this.section_remove_init&&this.section_remove_init(r),this.form_canvas_obj.trigger("wsf-section-repeatable").trigger("wsf-section-repeatable-"+r)}break;case"disabled":switch(o){case"section":i.prop("disabled","on"==_),"on"==_?i.attr("aria-disabled","true"):i.removeAttr("aria-disabled");var R=e("[name]",i);break;case"field":R=s}var U=this;e(R).each(function(){e(this).prop("disabled","on"==_),"on"==_?e(this).attr("aria-disabled","true"):e(this).removeAttr("aria-disabled");var t=e(this).closest("[data-type]"),a=U.get_field_value_fallback(t.attr("data-type"),!1,"class_disabled",!1);switch("on"==_?(!1!==a&&e(this).addClass(a.join(" ")),e(this).css({"pointer-events":"none"}).attr("data-conditional-logic-bypass","")):(!1!==a&&e(this).removeClass(a.join(" ")),e(this).css({"pointer-events":"auto"}).removeAttr("data-conditional-logic-bypass")),t.attr("data-type")){case"file":switch(e(this).attr("data-file-type")){case"dropzonejs":"on"==_?e(".dropzone",t)[0].dropzone.disable():e(".dropzone",t)[0].dropzone.enable()}}}),this.form_validate_real_time(),b=!0,f="debug_action_"+("on"==_?"disabled":"enabled");break;case"required":case"required_signature":switch(($=this.field_data_cache[r]).type){case"radio":case"price_radio":s=e('[name="'+this.esc_selector(l)+'[]"]',i)}s.prop("required","on"==_).removeAttr("data-init-required"),"on"==_?s.attr("data-required","").attr("aria-required","true").removeAttr("data-conditional-logic-bypass"):s.removeAttr("data-required").removeAttr("aria-required").attr("data-conditional-logic-bypass",""),this.form_bypass_obj_reset(s),this.form_validate_real_time(),f="debug_action_"+("on"==_?"required":"not_required"),u=!0,v=!0;break;case"readonly":s.prop("readonly","on"==_),"on"==_?s.attr("aria-readonly","true"):s.removeAttr("aria-readonly"),f="debug_action_"+("on"==_?"read_only":"not_read_only"),"function"==typeof this.form_date&&this.form_date();break;case"password_generate":"function"==typeof this.generate_password&&s.val(this.generate_password(24)).trigger("change");break;case"google_address_auto_complete":"function"==typeof this.google_address_auto_complete&&s.trigger("wsf-auto-complete");break;case"set_custom_validity":var Q=!1;if(void 0!==this.field_data_cache[r]){var $=this.field_data_cache[r];if(void 0!==e.WS_Form.field_type_cache[$.type]){var J=e.WS_Form.field_type_cache[$.type];
1Q=void 0!==J.invalid_feedback_last_row&&J.invalid_feedback_last_row}}var K=e('[id^="'+this.esc_selector(this.form_id_prefix+"invalid-feedback-"+r)+'"]',i);if(Q)s=K.siblings('[id^="'+this.esc_selector(this.form_id_prefix+"field-"+r)+'"]');this.set_invalid_feedback(s,_,c),this.form_bypass_obj_reset(s),v=!0;break;case"click":switch(o){case"group":var B=e("["+d+'="#'+this.esc_selector(this.form_id_prefix+"group-"+r)+'"]:not([data-wsf-tab-disabled])',this.form_canvas_obj);B.trigger("click"),void 0!==(A=B.parent()).attr("data-wsf-group-hidden")&&(A.removeAttr("data-wsf-group-hidden").show().removeAttr("aria-hidden"),i.removeAttr("data-wsf-group-hidden").removeAttr("aria-hidden"),v=!0);break;case"field":s.trigger("click")}f="debug_action_clicked";break;case"focus":this.conversational&&(this.conversational_scroll_start_x=e(window).scrollLeft(),this.conversational_scroll_start_y=e(window).scrollTop()),s.trigger("focus"),f="debug_action_focussed";break;case"action_run":-1!==this.conditional_actions_run_action.indexOf(r)&&this.form_post("action",r);break;case"action_run_on_save":-1===this.conditional_actions_run_save.indexOf(r)&&(this.conditional_actions_run_save.push(r),this.conditional_actions_changed=!0);break;case"action_run_on_submit":-1===this.conditional_actions_run_submit.indexOf(r)&&(this.conditional_actions_run_submit.push(r),this.conditional_actions_changed=!0);break;case"action_do_not_run_on_save":-1!==(G=this.conditional_actions_run_save.indexOf(r))&&(this.conditional_actions_run_save.splice(G,1),this.conditional_actions_changed=!0);break;case"action_do_not_run_on_submit":var G;-1!==(G=this.conditional_actions_run_submit.indexOf(r))&&(this.conditional_actions_run_submit.splice(G,1),this.conditional_actions_changed=!0);break;case"javascript":try{e.globalEval("(function($) {\n"+_+"\n})(jQuery);")}catch(e){this.error("error_js",_)}break;case"copy_to_clipboard":navigator.clipboard.writeText(s.val());break;case"validate_show":this.form_obj.addClass(this.class_validated);break;case"validate_hide":this.form_obj.removeClass(this.class_validated);break;case"form_save":this.form_post("save");break;case"form_save_validate":this.form_post_if_validated("save");break;case"form_hash_clear":this.form_hash_clear();break;case"form_submit":this.form_obj.trigger("submit");break;case"form_clear":this.form_clear();break;case"form_reset":this.form_reset();break;case"form_loader_show":void 0!==this.form_loader_show&&this.form_loader_show("conditional");break;case"form_loader_hide":void 0!==this.form_loader_hide&&this.form_loader_hide();break;case"reset":case"reset_file":case"clear":var H="clear"===a;switch(o){case"group":this.group_fields_reset(r,H);break;case"section":this.section_fields_reset(r,H,n);break;case"field":this.field_reset(r,H,i)}}if(e.WS_Form.debug_rendered){var M=!1;switch(o){case"form":M=this.language("debug_action_form");var V=this.language("debug_action_form");break;case"group":if(void 0!==this.group_data_cache[r]){var X=this.group_data_cache[r];M=this.language("debug_action_group"),V=X.label}break;case"section":if(void 0!==this.section_data_cache[r])X=this.section_data_cache[r],M=this.language("debug_action_section"),V=X.label;break;case"field":if(void 0!==this.field_data_cache[r])M=(X=this.field_data_cache[r]).type,V=X.label;break;case"action":if(void 0!==this.action_data_cache[r])X=this.action_data_cache[r],M=this.language("debug_action_action"),V=X.label}if(!1!==M){!1!==f&&(h=this.language(f));var Y=e.WS_Form.settings_form.conditional.objects[o].action[a];if(!Y)return this.error("error_condition_action",a),!1;var ee=Y.text.toUpperCase();void 0!==Y.values&&"object"==typeof Y.values&&void 0!==Y.values[_]&&(h=Y.values[_].text);var te="<strong>["+this.esc_html(V)+"] "+ee+(!1!==h&&""!=h?" '"+this.esc_html(h)+"'":"")+"</strong> ("+this.language("debug_action_type")+": "+M+" | ID: "+r+(!1!==c?" | "+this.language("debug_action_row")+" ID: "+c.join(", "):"")+")";this.log("log_conditional_action_"+t,te,"conditional")}}return{process_required:u,process_bypass:v,process_navigation:b}},e.WS_Form.prototype.obj_set_attribute=function(e,t,a){void 0!==e.attr("data-"+t+"-bypass")?!1!==a?e.attr("data-"+t+"-bypass",a).trigger("change"):e.removeAttr("data-"+t+"-bypass").trigger("change"):!1!==a?e.attr(t,a).trigger("change"):e.removeAttr(t).trigger("change")},e.WS_Form.prototype.conditional_logic_previous=function(e,t,a){switch(a){case"||":e|=t;break;case"&&":e&=t}return e},e.WS_Form.prototype.conditional_condition_check=function(e){return!(null===e||"object"!=typeof e||void 0===e.id||void 0===e.object||void 0===e.object_id||void 0===e.object_row_id||void 0===e.logic||void 0===e.value||void 0===e.case_sensitive||void 0===e.logic_previous||""==e.id||0==e.id||""==e.object||""==e.object_id||""==e.logic)},e.WS_Form.prototype.conditional_action_check=function(e){return!(null===e||"object"!=typeof e||void 0===e.object||void 0===e.object_id||void 0===e.action||""==e.object||""==e.object_id||""==e.action)}}(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.