PageSourceSearch

https://sibcr.org/wp-content/plugins/ws-form/shared/js/ws-form.min.js?ver=1.12.10

js sibcr.org collected 2026-10-04 14:30:18 UTC 101,729 bytes, 1 lines download raw bytes

1!function(e){"use strict";e.WS_Form=function(t){e.WS_Form.this=this,this.is_admin=this.set_is_admin(),this.user_roles=ws_form_settings.user_roles,this.form_interface=!1,this.group_data_cache=[],this.group_index=0,this.section_data_cache=[],this.field_data_cache=[],this.action_data_cache=[],this.validation_message_cache=[],this.invalid_feedback_cache=[],this.object_cache={},this.object_cache.condition=[],this.object_cache.then=[],this.object_cache.else=[],this.action=!1,this.object_data_scratch=!1,this.sidebar_meta_checksum=!1,this.form_history=[],this.history_index=0,this.framework_id=!1,this.framework=!1,this.framework_fields=!1,this.column_resize_obj=!1,this.column_size_value=0,this.column_size_value_old=0,this.offset_value=0,this.offset_value_old=0,this.dragged_field=null,this.dragged_field_in_section=null,this.dragged_section=null,this.dragged_section_in_group=null,this.dragging=!1,this.next_sibling_id_old=null,this.section_id_old=null,this.group_id_old=null,this.section_repeatable_dragged=!1,this.section_repeatable_indexes={},this.checksum=!1,this.checksum_setTimeout=!1,this.published_checksum="",this.recaptchas=[],this.recaptchas_v2_default=[],this.recaptchas_v2_invisible=[],this.recaptchas_v3_default=[],this.recaptchas_conditions=[],this.timeout_recaptcha=3e4,this.hcaptchas=[],this.hcaptchas_default=[],this.hcaptchas_invisible=[],this.hcaptchas_conditions=[],this.timeout_hcaptcha=3e4,this.turnstiles=[],this.turnstiles_default=[],this.turnstiles_conditions=[],this.timeout_turnstile=3e4,this.captchafoxes=[],this.captchafoxes_default=[],this.captchafoxes_invisible=[],this.captchafoxes_conditions=[],this.timeout_captchafox=3e4,this.form_events_reset=[],this.keydown=[],this.timeout_interval=100,this.api_call_queue=[],this.api_call_queue_running=!1,this.number_to_word=["nought","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen","twenty"],this.label_old="",this.submit=!1,this.action_js=[],this.form_draft=!1,this.submit_auto_populate=!1,this.form_id_prefix="wsf-",this.field_name_prefix=ws_form_settings.field_prefix,this.meta_key_options_cache=[],this.options_action_objects=[],this.options_action_cache=[],this.sidebar_conditions=[],this.sidebar_expanded_obj=!1,this.sidebar_lock_count=0,this.touch_device="ontouchend"in document,this.hash="",this.token="",this.token_validated=!1,this.form_post_locked=!1,this.form_post_lock_start=0,this.form_post_lock_duration_max=1e3,this.form_loader_showing=!1,this.form_loader_show_start=0,this.form_loader_show_duration_max=this.form_post_lock_duration_max,this.form_loader_timeout_id=!1,this.field_required_bypass=[],this.form_valid=!1,this.form_valid_old=null,this.form_validation_real_time_hooks=[],this.form_action_custom=!1,this.form_ajax=!0,this.object_focus=!1,this.field_type_click_drag_check=!1,this.section_id_click_drag_check=!1,this.password_strength_status=0,this.cascade_cache=[],this.select_ajax_cache=[],this.preview_window=void 0,this.file_frame=!1,this.file_frame_input_obj=!1,this.api_call_handle=[],this.visual_builder=!1,this.form_bypass_enabled=!1,this.action_js_process_validation_focus=!0,this.action_ga=!1,this.form_stat_add_lock=!1,this.form_geo_cache=!1,this.form_geo_cache_request=!1,this.form_geo_stack=[],e.WS_Form.parse_variable_handlers=e.WS_Form.parse_variable_handlers||{}},e.WS_Form.prototype.render=function(t){var a=this;void 0===t&&this.error("error_attributes"),void 0===t.obj&&this.error("error_attributes_obj"),void 0===t.form_id&&this.error("error_attributes_form_id"),this.form_canvas_obj=t.obj instanceof e?t.obj:e(t.obj),this.form_obj_id=this.form_canvas_obj.attr("id"),this.form_id=parseInt(t.form_id,10),0!==this.form_id&&(this.form_instance_id=parseInt(this.form_canvas_obj.attr("data-instance-id"),10),0!==this.form_instance_id&&(this.form_id_prefix=this.is_admin?"wsf-":"wsf-"+this.form_instance_id+"-",this.form_id_prefix_function=this.is_admin?"wsf_":"wsf_"+this.form_instance_id+"_",this.form_obj=this.form_canvas_obj.closest("form"),this.form_obj.length?this.form_obj.attr("novalidate",""):this.form_obj=this.form_canvas_obj,this.form_obj[0]!=this.form_canvas_obj[0]&&(this.form_obj.hasClass("wsf-form")||this.form_obj.addClass("wsf-form"),this.form_canvas_obj.hasClass("wsf-form")&&this.form_canvas_obj.removeClass("wsf-form"),void 0!==this.form_canvas_obj.attr("data-wsf-style-id")&&(this.form_obj.attr("data-wsf-style-id",this.form_canvas_obj.attr("data-wsf-style-id")),this.form_canvas_obj.removeAttr("data-wsf-style-id"))),this.form_canvas_obj.html(""),this.get_configuration(function(){a.get_form(function(){a.init()})})))},e.WS_Form.configured=!1,e.WS_Form.css_rendered=!1,e.WS_Form.styler,e.WS_Form.styler_rendered=!1,e.WS_Form.settings_plugin,e.WS_Form.settings_form=null,e.WS_Form.frameworks,e.WS_Form.parse_variables,e.WS_Form.parse_variable_help,e.WS_Form.parse_variable_repairable,e.WS_Form.actions,e.WS_Form.field_types,e.WS_Form.field_type_cache=[],e.WS_Form.file_types,e.WS_Form.meta_keys,e.WS_Form.meta_keys_required_setting=[],e.WS_Form.breakpoints,e.WS_Form.data_sources,e.WS_Form.templates_section,e.WS_Form.language_tag_to_locale=function(e){return"string"!=typeof e?"":""===(e=e.trim())?"":e.replace(/-/g,"_")},e.WS_Form.locale_to_language_tag=function(t){if("string"!=typeof t)return"";var a=e.WS_Form.language_tag_to_locale(t);if(""===a)return"";var r=a.split("_"),i=r[0]?r[0].toLowerCase():"";return""===i?"":void 0===r[1]||""===r[1]?i:i+"-"+r[1].toUpperCase()},e.WS_Form.get_language_code=function(t){var a=e.WS_Form.language_tag_to_locale(t);if(""===a)return"";var r=a.split("_");return r[0]?r[0].toLowerCase():""},e.WS_Form.get_country_code=function(t){var a=e.WS_Form.language_tag_to_locale(t);if(""===a)return"";var r=a.split("_");return void 0===r[1]||""===r[1]?"":r[1].toUpperCase()},e.WS_Form.prototype.get_configuration=function(t,a,r){if(void 0===a&&(a=!1),void 0===r&&(r=!1),this.options_action_cache=[],r||this.loader_on(),!e.WS_Form.configured||a)if("undefined"==typeof wsf_form_json_config){var i=this;this.api_call("config","GET",!1,function(e){i.set_configuration(e.data),window.wsf_form_json_config=e.data,"function"==typeof t&&t()},!1,r)}else this.set_configuration(wsf_form_json_config),"function"==typeof t&&t();else"function"==typeof t&&t()},e.WS_Form.prototype.set_configuration=function(t){e.WS_Form.settings_plugin=t.settings_plugin,e.WS_Form.settings_form=t.settings_form,e.WS_Form.frameworks=t.frameworks,e.WS_Form.field_types=t.field_types,e.WS_Form.file_types=t.file_types,e.WS_Form.meta_keys=t.meta_keys,e.WS_Form.parse_variables=t.parse_variables,e.WS_Form.parse_variables_repairable=t.parse_variables_repairable,e.WS_Form.parse_variable_help=t.parse_variable_help,e.WS_Form.actions=t.actions,e.WS_Form.data_sources=t.data_sources,e.WS_Form.templates_section=t.templates_section,this.field_type_cache_build(),e.WS_Form.configured=!0},e.WS_Form.prototype.get_form=function(t){if(0==this.form_id)return this.error("error_form_id"),void this.loader_off();if(e("#"+this.form_obj_id).attr("data-id",this.form_id),void 0===window.wsf_form_json||void 0===window.wsf_form_json[this.form_id]){var a=this;this.api_call("form/"+this.form_id+"/full/?wsf_fp=true","GET",!1,function(e){a.form=e.form,void 0===window.wsf_form_json&&(window.wsf_form_json=[]),window.wsf_form_json[a.form_id]=e.form,a.data_cache_build(),"function"==typeof t&&t(),a.loader_off()})}else this.form=window.wsf_form_json[this.form_id],this.data_cache_build(),"function"==typeof t&&t(),this.loader_off()},e.WS_Form.prototype.form_build=function(){if(this.timer_start=new Date,this.form_canvas_obj.children().not(".wsf-loader").remove(),this.form_canvas_obj.append(this.get_form_html(this.form)),!this.is_admin){var e=this.get_object_meta_value(this.form,"class_form_wrapper","");if(""!=e){var t=this.form_canvas_obj.attr("class");t+=" "+e.trim(),this.form_canvas_obj.attr("class",t)}}this.form_render(),this.timer_duration=new Date-this.timer_start},e.WS_Form.prototype.get_form_style_id=function(){var t=this.is_admin?"ws-form":e.WS_Form.settings_plugin.framework;return e.WS_Form.frameworks.types[t]},e.WS_Form.prototype.get_framework=function(){var t=this.is_admin?"ws-form":e.WS_Form.settings_plugin.framework;return e.WS_Form.frameworks.types[t]},e.WS_Form.prototype.get_form_html=function(e){if(void 0===e)return"";if(void 0===e.groups)return"";var t=this.get_framework().form[this.is_admin?"admin":"public"],a=this.esc_html(e.label);if(!this.is_admin&&"on"==this.get_object_meta_value(e,"label_render","on"))var r
1=this.is_admin?"":this.get_object_meta_value(this.form,"label_mask_form",""),i=""!=r?r:void 0!==t.mask_label?t.mask_label:"",s={label:a},_=this.mask_parse(i,s);else _="";var o=this.get_tabs_html(e);o+=this.get_groups_html(e.groups);i=t.mask_single,s={form:o,id:this.form_id_prefix+"tabs",label:_};return this.comment_html("Form: "+a)+this.mask_parse(i,s)+this.comment_html("Form: "+a,!0)},e.WS_Form.prototype.get_tabs_html=function(e){if(void 0===e.groups)return"";var t=e.groups,a=Object.keys(t).length;if(1==a&&!this.is_admin)return"";var r="",i=this.get_framework().tabs[this.is_admin?"admin":"public"],s=this.get_object_meta_value(this.form,"cookie_tab_index")?this.cookie_get("tab_index",0):0;if(a>1||this.is_admin){for(var _ in t)if(t.hasOwnProperty(_)){var o=t[_];r+=this.get_tab_html(o,_,s==_)}var l="";if(!this.is_admin)this.get_object_meta_value(e,"tabs_hide",!1)&&(l+=' style="display: none;"');var n=["wsf-group-tabs"];if(!this.is_admin){var c=this.get_object_meta_value(e,"class_tabs_wrapper",!1);""!=c&&n.push(c.trim())}var d=i.mask_wrapper,p={attributes:l,class:n.join(" "),tabs:r,id:this.form_id_prefix+"tabs"};return this.comment_html(this.language("comment_group_tabs"))+this.mask_parse(d,p)+this.comment_html(this.language("comment_group_tabs"),!0)}return""},e.WS_Form.prototype.get_tab_html=function(e,t,a){void 0===t&&(t=0),void 0===a&&(a=!1);var r=this.get_framework().tabs[this.is_admin?"admin":"public"],i=this.esc_html(e.label),s="";!this.is_admin&&"on"==this.get_object_meta_value(e,"hidden","")&&(s=' style="display: none;" data-wsf-group-hidden');var _=r.mask_single,o={attributes:s,data_id:e.id,href:"#"+this.form_id_prefix+"group-"+e.id,label:i};return a&&void 0!==r.active?o.active=r.active:o.active="",this.mask_parse(_,o)},e.WS_Form.prototype.get_groups_html=function(t){if(void 0===t)return"";var a=Object.keys(t).length,r=this.get_framework().groups[this.is_admin?"admin":"public"],i=this.get_object_meta_value(this.form,"cookie_tab_index")?this.cookie_get("tab_index",0):0,s="",_=this.is_admin||a>1,o=0;for(var l in t)if(t.hasOwnProperty(l)){var n=t[l];s+=this.get_group_html(n,l==i,_,o++)}var c=_?r.mask_wrapper:"#groups",d={class:["wsf-groups"].join(" "),column_count:e.WS_Form.settings_plugin.framework_column_count,groups:s,id:this.form_id_prefix+"tabs"};return(_?this.comment_html(this.language("comment_groups")):"")+this.mask_parse(c,d)+(_?this.comment_html(this.language("comment_groups"),!0):"")},e.WS_Form.prototype.get_group_html=function(t,a,r,i){void 0===a&&(a=!1),void 0===r&&(r=!0);var s=this.get_framework().groups[this.is_admin?"admin":"public"],_=this.esc_html(t.id),o=this.esc_html(t.label);if(!this.is_admin&&"on"==this.get_object_meta_value(t,"label_render","on"))var l=this.is_admin?"":this.get_object_meta_value(this.form,"label_mask_group",""),n=""!=l?l:void 0!==s.mask_label?s.mask_label:"",c={label:o},d=this.mask_parse(n,c);else d="";var p,u=this.get_sections_html(t),f=[];(void 0!==s.class&&f.push(s.class),this.is_admin)||(""!=(p=this.get_object_meta_value(this.form,"class_group_wrapper",""))&&f.push(p.trim()),""!=(p=this.get_object_meta_value(t,"class_group_wrapper",""))&&f.push(p.trim()));a&&void 0!==s.class_active&&f.push(s.class_active);var h=[];this.is_admin||!this.is_admin&&"on"==this.get_object_meta_value(t,"hidden","")&&h.push("data-wsf-group-hidden");n=r?s.mask_single:"#group",c={attributes:(h.length>0?" ":"")+h.join(" "),class:f.join(" "),column_count:e.WS_Form.settings_plugin.framework_column_count,data_id:t.id,data_group_index:i,group:u,id:this.form_id_prefix+"group-"+_,label:d};return(r?this.comment_html(this.language("comment_group")+": "+o):"")+this.mask_parse(n,c)+(r?this.comment_html(this.language("comment_group")+": "+o,!0):"")},e.WS_Form.prototype.get_sections_html=function(t){var a="",r=this.get_framework().sections[this.is_admin?"admin":"public"],i=(t.id,t.sections),s={};if("object"==typeof this.submit?void 0!==this.submit.section_repeatable&&(s=this.submit.section_repeatable):!1!==this.submit_auto_populate&&void 0!==this.submit_auto_populate.section_repeatable&&(s=this.submit_auto_populate.section_repeatable),void 0===i)return"";for(var _ in i)if(i.hasOwnProperty(_)){var o=i[_],l="section_"+o.id,n=!1!==s&&void 0!==s[l]&&void 0!==s[l].index?
1s[l].index:[!1];for(var c in n)if(n.hasOwnProperty(c)){var d=n[c];a+=this.get_section_html(o,d)}}var p=r.mask_wrapper,u={class:"wsf-sections",column_count:e.WS_Form.settings_plugin.framework_column_count,data_id:t.id,sections:a,id:this.form_id_prefix+"sections-"+t.id};return this.comment_html(this.language("comment_sections"))+this.mask_parse(p,u)+this.comment_html(this.language("comment_sections"),!0)},e.WS_Form.prototype.get_section_html=function(t,a){void 0===a&&(a=!1);var r=!1;if(!this.is_admin&&((r="on"==this.get_object_meta_value(t,"section_repeatable",""))&&!1===a)){a=0;do{a++}while(e("#"+this.form_id_prefix+"section-"+t.id+"-repeat-"+a).length)}var i="",s=this.get_framework().sections[this.is_admin?"admin":"public"],_=this.column_class_array(t);if(r&&!this.is_admin&&(i=this.attribute_modify(i,"data-repeatable","",!0),i=this.attribute_modify(i,"data-repeatable-index",a,!0)),void 0!==s.class_single&&(_=_.concat(s.class_single)),!this.is_admin){var o;""!=(o=this.get_object_meta_value(this.form,"class_section_wrapper",""))&&_.push(o.trim()),""!=(o=this.get_object_meta_value(t,"class_section_wrapper",""))&&_.push(o.trim());var l=this.get_object_meta_value(t,"class_single_vertical_align","");if(l){var n=this.get_field_value_fallback(!1,!1,"class_single_vertical_align");void 0!==n[l]&&_.push(n[l])}var c=this.get_object_meta_value(t,"validate_inline","");if(""!=c){var d=void 0!==this.framework.fields.public.class_form_validated?this.framework.fields.public.class_form_validated:[];switch(c){case"on":this.is_iterable(d)?_.push(...d):_.push(d);break;case"change_blur":i=this.attribute_modify(i,"data-wsf-section-validated-class",d.join(" "),!0)}}var p=this.get_object_meta_value(this.form,"conversational",!1),u=this.get_object_meta_value(t,"conversational_full_height_section",!1);p&&u&&_.push("wsf-form-conversational-section-full-height")}var f=this.esc_html(t.label);if(this.is_admin||"on"==this.get_object_meta_value(t,"label_render","on"))var h=this.is_admin?"":this.get_object_meta_value(this.form,"label_mask_section",""),m=""!=h?h:void 0!==s.mask_label?s.mask_label:"",v={label:f},b=this.mask_parse(m,v);else b="";if(!this.is_admin){"on"==this.get_object_meta_value(t,"disabled_section","")&&(i=this.attribute_modify(i,"disabled","",!0),i=this.attribute_modify(i,"aria-disabled","true",!0)),"on"==this.get_object_meta_value(t,"hidden_section","")&&(i=this.attribute_modify(i,"style","display: none;",!0),i=this.attribute_modify(i,"aria-live","polite",!0),i=this.attribute_modify(i,"aria-hidden","true",!0));var g=this.strip_html(this.get_object_meta_value(t,"aria_label",""));""==g&&(g=this.strip_html(t.label)),""==g&&(g=this.strip_html(this.language("comment_section"))),i=this.attribute_modify(i,"aria-label",g,!0),i=this.custom_attributes(i,t,"section",a)}var y=this.get_fields_html(t,a);m=s.mask_single,v={attributes:(i?" ":"")+i,class:_.join(" "),column_count:e.WS_Form.settings_plugin.framework_column_count,data_id:t.id,id:this.form_id_prefix+"section-"+t.id+(a?"-repeat-"+a:""),label:b,section:y,section_id:this.is_admin?'<span class="wsf-section-id">'+this.language("id")+": "+t.id+"</span>":""};return this.comment_html(this.language("comment_section")+": "+f)+this.mask_parse(m,v)+this.comment_html(this.language("comment_section")+": "+f,!0)},e.WS_Form.prototype.custom_attributes=function(e,t,a,r,i){var s=this.custom_attributes_get(t,a,r);for(const t in s){var _=s[t];e=this.attribute_modify(e,t,_,!0)}return e},e.WS_Form.prototype.custom_attributes_get=function(e,t,a){var r={},i=this.get_object_meta_value(e,"custom_attributes",!1);if(!1!==i&&"object"==typeof i&&i.length>0)for(var s in"field"!=t&&(e=!1),i)if(i.hasOwnProperty(s)){var _=i[s];""!=_.custom_attribute_name&&(_.custom_attribute_value=this.parse_variables_process(_.custom_attribute_value,a,!1,e).output,r[_.custom_attribute_name]=_.custom_attribute_value)}return r},e.WS_Form.prototype.get_fields_html=function(t,a){var r="on"==this.get_object_meta_value(t,"section_repeatable","");void 0===a&&(a=!!r&&0);var i="",s=this.get_framework().fields[this.is_admin?"admin":"public"],_=(t.id,t.fields),o=this.esc_html(t.label);if(!this.is_admin&&"on"==this.get_object_meta_value(t,"label_render","on")&&""!=o)var l=this.is_admin?"":this.get_object_meta_value(this.form,"label_mask_section",""),n=""!=l?l:void 0!==s.mask_wrapper_label?s.mask_wrapper_label:"",c={label:o},d=this.mask_parse(n,c);else d=this.is_admin?"":'<legend class="wsf-hidden-element">'+(""!=o?o:this.esc_html(this.language("comment_section")))+"</legend>";if(void 0===_)return"";for(var p in _)if(_.hasOwnProperty(p)){var u=_[p];i+=this.get_field_html(u,a)}n=s.mask_wrapper,c={column_count:e.WS_Form.settings_plugin.framework_column_count,data_id:t.
1id,fields:i,id:this.form_id_prefix+"fields-"+t.id,label:d};return this.comment_html(this.language("comment_fields"))+this.mask_parse(n,c)+this.comment_html(this.language("comment_fields"),!0)},e.WS_Form.prototype.value_populate_process=function(t,a){if(null===t)return"";switch(a.type){case"datetime":return"function"==typeof this.get_date_by_type?this.get_date_by_type(t,a):"";case"select":case"checkbox":case"radio":case"price_select":case"price_checkbox":case"price_radio":return Array.isArray(t)?t.map(function(e){return e?e.toString():""}):t;case"quantity":var r=e.WS_Form.settings_plugin.price_decimal_separator;return"."!==r&&-1!==t.indexOf(r)&&(t=this.get_number(t)),t;default:return this.esc_html(t)}},e.WS_Form.prototype.get_field_html=function(t,a){void 0===a&&(a=!1);var r=[];!1!==a&&r.push('data-repeatable-index="'+this.esc_attr(a)+'"');var i=this.get_framework().fields[this.is_admin?"admin":"public"];this.is_admin||"on"==this.get_object_meta_value(t,"hidden","")&&r.push('style="display: none;" aria-live="polite" aria-hidden="true"');var s=this.column_class_array(t),_=this.get_object_meta_value(t,"sub_type",!1);""==_&&(_=!1);var o=this.get_field_value_fallback(t.type,!1,"class_single",!1,i,_);if(!1!==o&&(s=s.concat(o)),!this.is_admin){var l;""!=(l=this.get_object_meta_value(this.form,"class_field_wrapper",""))&&s.push(l.trim()),""!=(l=this.get_object_meta_value(t,"class_field_wrapper",""))&&s.push(l.trim());var n=this.get_object_meta_value(t,"class_single_vertical_align","");if(n){var c=this.get_field_value_fallback(t.type,!1,"class_single_vertical_align",!1,i,_);void 0!==c[n]&&s.push(c[n])}var d=this.get_object_meta_value(t,"validate_inline","");if(""!=d){var p=void 0!==this.framework.fields.public.class_form_validated?this.framework.fields.public.class_form_validated:[];switch(d){case"on":this.is_iterable(p)?s.push(...p):s.push(p);break;case"change_blur":r.push('data-wsf-field-validated-class="'+p.join(" ")+'"')}}}var u=!1!==a?"_"+a:"",f=ws_form_settings.field_prefix+t.id+u;if("object"==typeof this.submit){if(void 0!==this.submit.meta&&void 0!==this.submit.meta[f]&&void 0!==this.submit.meta[f].value&&null!==this.submit.meta[f].value){var h=this.submit.meta[f].value;h=this.value_populate_process(h,t)}}else if(!1!==this.submit_auto_populate&&void 0!==this.submit_auto_populate.data&&void 0!==this.submit_auto_populate.data[f]&&null!==this.submit_auto_populate.data[f]){h=this.submit_auto_populate.data[f];h=this.value_populate_process(h,t)}var m=this.is_admin?"":this.get_field_html_single(t,h,!1,a),v=this.esc_html(t.label);if(void 0===e.WS_Form.field_type_cache[t.type])return"";var b=e.WS_Form.field_type_cache[t.type];if(void 0!==b.pro_required&&b.pro_required)return"";if(!this.is_admin&&(void 0!==b.mask_wrappers_drop&&b.mask_wrappers_drop))var g="#field";else g=this.get_field_value_fallback(t.type,!1,"mask_single",!1,i,_);switch(t.type){case"checkbox":case"price_checkbox":var y=this.get_object_meta_value(t,"checkbox_min",!1),k=this.get_object_meta_value(t,"checkbox_max",!1),w=this.get_object_meta_value(t,"select_all",!1);if(!1===y&&!1===k)break;!1!==y&&(y=parseInt(y,10))>0&&r.push('data-checkbox-min="'+this.esc_attr(y)+'"'),!1===k||w||(k=parseInt(k,10))>=0&&r.push('data-checkbox-max="'+this.esc_attr(k)+'"');break;case"select":case"price_select":var x=this.get_object_meta_value(t,"select_min",!1),j=this.get_object_meta_value(t,"select_max",!1);if(!1===x&&!1===j)break;!1!==x&&(x=parseInt(x,10))>0&&r.push('data-select-min="'+this.esc_attr(x)+'"'),!1!==j&&(j=parseInt(j,10))>=0&&r.push('data-select-max="'+this.esc_attr(j)+'"')}var S={attributes:(r.length>0?" ":"")+r.join(" "),class:s.join(" "),data_id:t.id,field:m,id:this.get_part_id(t.id,a,"field-wrapper"),type:t.type};return this.comment_html(this.language("comment_field")+": "+v)+this.mask_parse(g,S)+this.comment_html(this.language("comment_field")+": "+v,!0)},e.WS_Form.prototype.field_type_cache_build=function(){if(!this.is_admin)return e.WS_Form.field_type_cache=e.WS_Form.field_types,!0;if(Object.keys(e.WS_Form.field_type_cache.length)>0)return!0;for(var t in e.WS_Form.field_types){var a=e.WS_Form.field_types[t].types;for(var r in a)e.WS_Form.field_type_cache[r]=a[r]}},e.WS_Form.prototype.esc_html=function(e,t){if("string"!=typeof e)return e;switch(void 0===t&&(t=!1),typeof e){case"string":e=this.esc_html_do(e,t);break;case"object":for(var a in e)e.hasOwnProperty(a)&&"string"==typeof e[a]&&(e[a]=this.esc_html_do(e[a],t))}return e},e.WS_Form.prototype.esc_html_do=function(e,t){void 0===t&&(t=!1);var a=this.replace_all(e,"&","&#38;");return a=this.replace_all(a,"<","&lt;"),a=this.replace_all(a,">","&gt;"),a=this.replace_all(a,'"',"&quot;"),t&&(a=this.replace_all(a,"\n","&#13;")),a},e.WS_Form.prototype.esc_html_undo=function(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent},e.WS_Form.prototype.strip_html=function(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)return"";if(-1===e.indexOf("<")&&-1===e.indexOf(">"))return e.trim();var t=document.createElement("textarea");t.innerHTML=e,e=t.value;for(var a=(new DOMParser).parseFromString(e,"text/html"),r=a.querySelectorAll("script, style, template"),i=0;i<r.length;i++)r[i].remove();return null===(e=a.body.textContent)?"":e.trim()},e.WS_Form.prototype.esc_attr=function(e,t){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)return"";var a=e.replace(/[&<>"']/g,function(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";
1case'"':return"&quot;";case"'":return"&apos;";default:return e}});return t&&(a=a.replace(/\n/g,"&#13;")),a},e.WS_Form.prototype.esc_url=function(e){try{if(e=decodeURIComponent(e),/^#[a-zA-Z0-9\-]+$/.test(e))return e;var t="",a=e.indexOf("#");-1!==a&&(t=e.substring(a),e=e.substring(0,a)),/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e)||(e="https://"+e);var r=new URL(e);if(!["http","https","ftp","mailto","tel"].includes(r.protocol.replace(":","")))return"";for(var i of[/javascript:/i,/data:/i,/vbscript:/i,/file:/i,/<.*?>/i,/%00/i,/(\.\.\/|\.\\)/i,/(redirect|url|next)=http/i,/(%25)+/i])if(i.test(e))return"";return r.toString()+t}catch(e){return""}},e.WS_Form.prototype.esc_selector=function(e){if("string"!=typeof e)return e;var t=this.replace_all(e,'"','\\"');return t=this.replace_all(t,"'","\\'"),t=this.replace_all(t,"[","\\["),t=this.replace_all(t,"]","\\]"),t=this.replace_all(t,",","\\,"),t=this.replace_all(t,"=","\\=")},e.WS_Form.prototype.html_strip=function(e){switch(typeof e){case"string":e=this.html_strip_do(e);break;case"object":for(var t in e)e.hasOwnProperty(t)&&"string"==typeof e[t]&&(e[t]=this.html_strip_do(e[t]))}return e},e.WS_Form.prototype.html_strip_do=function(e){return this.esc_html(e.replace(/<[^>]*>/g,""))},e.WS_Form.prototype.js_string_encode=function(e){return"string"!=typeof e?e:this.replace_all(e,"'","\\'")},e.WS_Form.prototype.loader_on=function(){e("#wsf-loader").addClass("wsf-loader-on")},e.WS_Form.prototype.loader_off=function(){e("#wsf-loader").removeClass("wsf-loader-on")},e.WS_Form.prototype.comment_html=function(e,t){return void 0===t&&(t=!1),"\x3c!-- "+(t?"/":"")+e+" --\x3e\n"+(t?"\n":"")},e.WS_Form.prototype.comment_css=function(e){return"\t/* "+e+" */\n"},e.WS_Form.prototype.get_object_value=function(e,t,a){return void 0===a&&(a=!1),void 0===e?a:void 0===e[t]?a:e[t]},e.WS_Form.prototype.get_field_value_fallback=function(e,t,a,r,i,s){if(void 0===r&&(r=!1),i||(i=this.framework_fields),void 0===s&&(s=!1),!1===s)return this.get_field_value_fallback_process(e,t,a,r,i);if((_=this.get_field_value_fallback_process(e,t,a+"_"+s,r,i))===r)var _=this.get_field_value_fallback_process(e,t,a,r,i);return _},e.WS_Form.prototype.get_field_value_fallback_process=function(t,a,r,i,s){var _=s,o=e.WS_Form.field_type_cache[t];if(!1!==a){if(!(void 0===_||void 0===_[a]||void 0===_[a].field_types||void 0===_[a].field_types[t]||void 0===_[a].field_types[t][r]))return _[a].field_types[t][r];if(!(void 0===_||void 0===_[a]||void 0===_[a][r]))return _[a][r]}return void 0===_||void 0===_.field_types||void 0===_.field_types[t]||void 0===_.field_types[t][r]?void 0===_||void 0===_[r]?void 0===o?i:void 0===o[r]?i:o[r]:_[r]:_.field_types[t][r]},e.WS_Form.prototype.get_object_data=function(e,t,a){switch(void 0===a&&(a=!1),e){case"form":return a?this.object_data_scratch:this.form;case"group":return a?this.object_data_scratch:this.group_data_cache[t];case"section":return a?this.object_data_scratch:this.section_data_cache[t];case"field":return a?this.object_data_scratch:this.field_data_cache[t];case"action":return this.action}return!1},e.WS_Form.prototype.get_object_meta=function(t,a){switch(t){case"form":var r=e.WS_Form.settings_form.sidebars.form.meta;break;case"group":r=e.WS_Form.settings_form.sidebars.group.meta;break;case"section":r=e.WS_Form.settings_form.sidebars.section.meta;break;case"field":var i=this.field_data_cache[a];r=e.WS_Form.field_type_cache[i.type]}return r},e.WS_Form.prototype.get_object_meta_value=function(e,t,a,r,i){if(void 0===a&&(a=!1),void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===e)return a;
1if(void 0===e.meta)return a;if(void 0===e.meta[t]){if(!r)return a;this.set_object_meta_value(e,t,a)}return i&&"string"==typeof e.meta[t]?this.parse_variables_process(e.meta[t]).output:e.meta[t]},e.WS_Form.prototype.has_object_meta_key=function(e,t){return void 0!==e&&void 0!==e.meta&&void 0!==e.meta[t]&&""!=e.meta[t]},e.WS_Form.prototype.parse_variables_process=function(t,a,r,i,s,_,o,l,n,c){var d=this;if("string"!=typeof t)return this.parse_variables_process_error(t);if(-1==t.indexOf("#"))return this.parse_variables_process_error(t);void 0===a&&(a=!1),void 0===r&&(r=!1);var p="calc"===r;void 0===i&&(i=!1),void 0===s&&(s=!1),void 0===_&&(_=!0),void 0===o&&(o=!1),void 0===l&&(l=1),void 0===n&&(n=t),void 0===c&&(c=i);var u={},f={},h=[],m=[],v=[],b=!1,g=function(e){"object"==typeof e.groups&&(h=h.concat(e.groups)),"object"==typeof e.sections&&(m=m.concat(e.sections)),"object"==typeof e.fields&&(v=v.concat(e.fields)),e.dynamic&&(b=!0)};if(l>100)return this.error("error_parse_variable_syntax_error_depth","","error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_depth"));for(var y in e.WS_Form.parse_variables)if(e.WS_Form.parse_variables.hasOwnProperty(y)){var k=e.WS_Form.parse_variables[y],w=!1;for(var x in k.var_lookups)if(k.var_lookups.hasOwnProperty(x)&&-1!==t.indexOf(k.var_lookups[x])){w=!0;break}if(w)for(var j in k.variables)if(k.variables.hasOwnProperty(j)&&-1!==t.indexOf("#"+j)){var S=k.variables[j],F=void 0!==S.value&&S.value,W="object"==typeof S.attributes&&S.attributes,O=void 0!==S.single_parse&&S.single_parse;if(O&&(b=!0),!1===W){if("object"==typeof e.WS_Form.parse_variable_handlers&&"function"==typeof e.WS_Form.parse_variable_handlers[j]){var M=e.WS_Form.parse_variable_handlers[j].call(this,[],{ws_form:this,section_repeatable_index:a,field_to:i,field_part:s,section_id:o,parse_variable:j,parse_variable_full:"#"+j,current_value:!1!==F?F:""});O?f[j]=M:u[j]=M;continue}if(!1!==F){u[j]=F;continue}}if(("object"==typeof S.attributes?S.attributes.length:0)>0){var I=0;do{var N=t.indexOf("#"+j,I);if(-1!==N){var D=-1,P=-1,C=t.substring(N+j.length+1);if("("===C.substring(0,1)&&(D=N+j.length+1,-1!==(P=this.get_bracket_finish_index(C))&&(P+=D)),-1===D||-1===P){I+=j.length+1,z="#"+j;var q=[]}else{I=P;var T=t.substring(D+1,P),z=t.substring(N,P+1),$=void 0!==S.attribute_separator?S.attribute_separator:",";q=this.string_to_attributes(T,$)}for(var A in W)if(W.hasOwnProperty(A)){var Y=W[A],E=Y.id,L=void 0!==q[A];if((void 0===Y.required||Y.required)&&!L)return this.error("error_parse_variable_syntax_error_attribute","#"+j+" (Expected "+E+")","error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_attribute","#"+j+" (Expected "+E+")"));var U=void 0!==Y.default&&Y.default;if(!1===U||L||(q[A]=U),void 0===Y.trim||Y.trim){var R=q[A];"string"==typeof R&&(q[A]=R.trim())}var H=void 0!==Y.valid&&Y.valid;if(!1!==H&&!H.includes(q[A]))return this.error("error_parse_variable_syntax_error_attribute_invalid","#"+j+" (Expected "+H.join(", ")+")","error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_attribute_invalid","#"+j+" (Expected "+H.join(", ")+")"))}M="";var J=!0;switch(j){case"tab_label":if(isNaN(q[0]))return this.error("error_parse_variable_syntax_error_group_id",q[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_group_id",q[0]));var Z=parseInt(q[0],10);if(h.push(Z),void 0===this.group_data_cache[Z]||void 0===this.group_data_cache[Z].label)return this.error("error_parse_variable_syntax_error_group_id",Z,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_group_id",Z));M=this.group_data_cache[Z].label;break;case"section_label":if(isNaN(q[0]))return this.error("error_parse_variable_syntax_error_section_id",q[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_section_id",q[0]));var G=parseInt(q[0],10);if(m.push(G),void 0===this.section_data_cache[G]||void 0===this.section_data_cache[G].label)return this.error("error_parse_variable_syntax_error_section_id",G,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_section_id",G));M=this.section_data_cache[G].label;break;case"cookie_get":M=this.cookie_get_raw(q[0]);break;case"session_storage_get":M=this.session_storage_get_raw(q[0]);break;case"local_storage_get":M=this.local_storage_get_raw(q[0]);break;case"field_label":if(isNaN(q[0]))return this.error("error_parse_variable_syntax_error_field_id",q[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",q[0]));var B=parseInt(q[0],10);if(v.push(B),void 0===this.field_data_cache[B]||void 0===this.field_data_cache[B].label)return this.error("error_parse_variable_syntax_error_field_id",B,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",B));M=this.field_data_cache[B].label;break;case"field_min_id":case"field_max_id":case"field_min_value":case"field_max_value":case"field_min_label":case"field_max_label":for(var Q=0,K=0,V="",X=0,ee=0,te="",ae=0,re=0;!isNaN(q[ae]);
1){if(B=parseInt(q[ae],10)){if(v.push(B),"object"==typeof this.field_data_cache[B]){var ie=this.field_data_cache[B],se=this.get_field_value(ie,ie.section_repeatable);"object"==typeof se&&void 0!==se[0]||(se=[0]);var _e=ie.label;for(var oe of se)oe=this.get_number(oe,0,!0),0==re?(X=Q=B,ee=K=oe,te=V=_e):(oe<K&&(Q=B,K=oe,V=_e),oe>ee&&(X=B,ee=oe,te=_e)),re++;ae++}}else ae++}switch(j){case"field_min_id":M=Q;break;case"field_max_id":M=X;break;case"field_min_value":M=K;break;case"field_max_value":M=ee;break;case"field_min_label":M=V;break;case"field_max_label":M=te}break;case"date_format":var le=this.parse_variables_process(q[0],a,r,de,s,_,o,l).output,ne=this.parse_variables_process(q[1],a,r,de,s,_,o,l).output,ce=new Date(le);if(isNaN(ce.getTime()))return this.error("error_parse_variable_syntax_error_date_format",le,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_date_format",le));M=this.date_format(ce,ne);break;case"field":case"field_float":case"field_date_age":case"field_date_format":case"field_date_offset":case"field_count_word":case"field_count_char":case"ecommerce_field_price":if(isNaN(q[0]))return this.error("error_parse_variable_syntax_error_field_id",q[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",q[0]));B=parseInt(q[0],10);if(("field_value"===s||!1===s)&&B===parseInt(c.id,10))return this.error("error_parse_variable_syntax_error_self_ref",z,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_self_ref",z));if(void 0===this.field_data_cache[B])return this.error("error_parse_variable_syntax_error_field_id",B,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",B));i.id===c.id&&v.push(B);var de=this.field_data_cache[B];if(void 0===e.WS_Form.field_type_cache[de.type])break;var pe=e.WS_Form.field_type_cache[de.type];if(!1!==r)if(!(pe[r+"_out"],pe[r+"_out"]))return this.error("error_parse_variable_syntax_error_"+r+"_out",de.label+" (ID: "+de.id+")","error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_"+r+"_out",de.label+" (ID: "+de.id+")"));var ue=(pe.static,pe.static);if(ue){if(!0===ue)var fe=void 0!==pe.mask_field_static?pe.mask_field_static:"";else{fe=this.get_object_meta_value(de,ue,"");this.wpautop_parse_variable(de,pe)&&(fe=this.wpautop(fe),J=!1)}g(tt=this.parse_variables_process(fe,a,r,de,s,_,o,l+1,n,c)),M=[tt.output];break}var he=void 0!==pe.submit_array&&pe.submit_array,me=void 0!==de.section_repeatable_section_id&&parseInt(de.section_repeatable_section_id,10),ve=void 0!==i.section_repeatable_section_id&&parseInt(i.section_repeatable_section_id,10),be=a,ge=(M=!1,void 0!==q[1]?q[1]:","),ye=void 0!==q[2]&&q[2];if(!1!==be&&me===o||!1!==me&&!1!==ve)M=this.get_field_value(de,be,he,ye);if(!1===M&&!1!==me&&!1===ve)M=this.get_field_value(de,!0,he,ye);if(!1===M&&!1===me)M=this.get_field_value(de,!1,he,ye);if(!1===M)switch(de.type){case"price_select":case"price_checkbox":case"price_radio":case"select":case"checkbox":case"radio":var ke=this.get_data_source(de);M=!1!==ke.default_value?ke.default_value:[];break;default:var we=this.get_object_meta_value(de,"default_value","");g(tt=this.parse_variables_process(we,a,r,de,s,_,o,l+1,n,c)),M=[tt.output]}switch(j){case"field":!1!==ye&&(M=this.get_data_grid_column(M,de,ye));break;case"field_count_char":case"field_count_word":var xe="object"==typeof M?M.join(ge):"";if(void 0!==q[1]){var je=/\/(.*)\/(.*)/.exec(q[1]);xe=xe.replace(new RegExp(je[1],je[2]),"")}M=["field_count_char"==j?xe.length:this.get_word_count(xe)]}if(p)if(M.length)switch(de.type){case"price_select":case"price_checkbox":case"price_radio":case"price":case"price_subtotal":case"cart_price":case"cart_total":var Se=0;for(var Fe in M)M.hasOwnProperty(Fe)&&(Se+=this.get_number(M[Fe],0,!0));var We=parseInt(e.WS_Form.settings_plugin.price_decimals,10);M=this.get_number(Se,0,!1,We);break;case"datetime":if(""===M[0]){M="";break}var Oe=this.get_object_meta_value(de,"input_type_datetime","date");(Ce=this.get_object_meta_value(de,"format_date",ws_form_settings.date_format))||(Ce=ws_form_settings.date_format);var Me=this.get_object_meta_value(de,"format_time",ws_form_settings.time_format);Me||(Me=ws_form_settings.time_format);var Ie=this.get_date(M[0],Oe,Ce,Me);M=this.get_number(Ie.getTime())/1e3;break;default:Se=0;for(var Fe in M)M.hasOwnProperty(Fe)&&(Se+=d.get_number(M[Fe],0,!1));M=Se}else M=0;else M=(M=e.map(M,function(e){return d.esc_html(e)}
1)).join(ge),J=!1;switch(j){case"ecommerce_field_price":M=this.get_price(this.get_number(M));break;case"field_date_age":var Ne=new Date("number"==typeof M?1e3*M:M),De=new Date;isNaN(Ne.getTime())&&this.error("error_parse_variable_field_date_age_invalid",M,"error-parse-variables");var Pe="string"==typeof q[1]?q[1]:"y";switch(Pe=Pe.toLowerCase(),["y","m","d","h","n","s","year","month","day","hour","minute","second","years","months","days","hours","minutes","seconds"].includes(Pe)||this.error("error_parse_variable_syntax_error_field_date_age_period",Pe,"error-parse-variables"),Pe){case"s":case"second":case"seconds":M=Math.floor((De-Ne)/1e3);break;case"n":case"minute":case"minutes":M=Math.floor((De-Ne)/6e4);break;case"h":case"hour":case"hours":M=Math.floor((De-Ne)/36e5);break;case"d":case"day":case"days":M=Math.floor((De-Ne)/864e5);break;case"w":case"week":case"weeks":M=Math.floor((De-Ne)/6048e5);break;case"m":case"month":case"months":M=12*(De.getFullYear()-Ne.getFullYear())+(De.getMonth()-Ne.getMonth())-(De.getDate()<Ne.getDate()?1:0);break;default:M=De.getFullYear()-Ne.getFullYear()-(De.getMonth()<Ne.getMonth()||De.getMonth()===Ne.getMonth()&&De.getDate()<Ne.getDate()?1:0)}break;case"field_date_format":if("datetime"!==de.type)return this.error("error_parse_variable_syntax_error_field_date_offset",B,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_date_offset",B));le=this.parse_variables_process(M,a,r,de,s,_,o,l).output;if((qe=this.get_object_meta_value(de,"format_date",ws_form_settings.date_format))||(qe=ws_form_settings.date_format),(Te=this.get_object_meta_value(de,"format_time",ws_form_settings.time_format))||(Te=ws_form_settings.time_format),this.is_integer(le))ce=new Date(1e3*parseInt(le,10));else{Oe=this.get_object_meta_value(de,"input_type_datetime","date");ce=this.get_date(le,Oe,qe,Te)}if(!1!==ce&&!isNaN(ce.getTime())){if(void 0!==q[1]&&""!=q[1])var Ce=q[1];else Ce=qe;Ce||(Ce=ws_form_settings.date_format),M="function"==typeof this.date_format?this.date_format(ce,Ce):""}break;case"field_date_offset":if("datetime"!==de.type)return this.error("error_parse_variable_syntax_error_field_date_offset",B,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_date_offset",B));var qe,Te;le=this.parse_variables_process(M,a,r,de,s,_,o,l).output;if((qe=this.get_object_meta_value(de,"format_date",ws_form_settings.date_format))||(qe=ws_form_settings.date_format),(Te=this.get_object_meta_value(de,"format_time",ws_form_settings.time_format))||(Te=ws_form_settings.time_format),this.is_integer(le))ce=new Date(1e3*parseInt(le,10));else{Oe=this.get_object_meta_value(de,"input_type_datetime","date");ce=this.get_date(le,Oe,qe,Te)}if(!1!==ce&&!isNaN(ce.getTime())){if((Je=parseInt(this.parse_variables_process(q[1],a,r,i,s,_,o,l).output,10))&&ce.setSeconds(ce.getSeconds()+Je),void 0!==q[2]&&""!=q[2])Ce=q[2];else Ce=qe;Ce||(Ce=ws_form_settings.date_format),M="function"==typeof this.date_format?this.date_format(ce,Ce):""}break;case"field_float":M=this.get_number(M)}"field"===j&&this.wpautop_parse_variable(de,pe)&&(M=this.wpautop(M),J=!1);break;case"ecommerce_price":g(tt=this.parse_variables_process(q[0],a,r,i,s,_,o,l));var ze=this.calc_string(tt.output,n,!1,c,s);M=this.get_price(ze);break;case"number_format":g(tt=this.parse_variables_process(q[0],a,r,i,s,_,o,l));var $e=this.calc_string(tt.output,n,!1,c,s),Ae=q[1],Ye=q[2],Ee=q[3];M=this.number_format($e,Ae,Ye,Ee);break;case"select_option_text":if(isNaN(q[0]))return this.error("error_parse_variable_syntax_error_field_id",q[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",q[0]));B=parseInt(q[0],10);void 0===(ge=q[1])&&(ge=", "),i.id===c.id&&v.push(B);var Le=ws_form_settings.field_prefix+B.toString()+(a?"["+a+"]":"");if((He=e('[name="'+this.esc_selector(Le)+'[]"] option:selected',this.form_canvas_obj)).length)M=e.map(He,function(t,a){return e(t).text()}).join(ge);break;case"query_var":M=this.get_query_var(q[0],q[1]);break;case"checkbox_label":case"radio_label":if(isNaN(q[0]))return this.error("error_parse_variable_syntax_error_field_id",q[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",q[0]));B=parseInt(q[0],10);void 0===(ge=q[1])&&(ge=", "),i.id===c.id&&v.push(B);Le=ws_form_settings.field_prefix+B.toString()+(a?"["+a+"]":"");if((He=e('[name="'+this.esc_selector(Le)+'[]"]:checked',this.form_canvas_obj)).length)M=e.map(He,function(t,a){return e('label[for="'+e(t).attr("id")+'"]').text()}).join(ge);break;case"checkbox_count":case"checkbox_count_total":case"select_count":case"select_count_total":if(isNaN(q[0]))return this.error("error_parse_variable_syntax_error_field_id",q[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",q[0]));B=parseInt(q[0],10);i.id===c.id&&v.push(B);Le=ws_form_settings.field_prefix+B.toString()+(a?"["+a+"]":"");switch(j){case"checkbox_count":case"checkbox_count_total":var Ue=q[1]&&this.is_true(q[1]),Re=" [data-row-checkbox]"+(Ue?"":':not([style*="display: none"])')+" input"+(Ue?"":":not([data-hidden])")+("checkbox_count"==j?":checked":""),He=e('[data-type="checkbox"][data-id="'+B+'"]'+Re+', [data-type="price_checkbox"][data-id="'+B+'"]'+Re,this.form_canvas_obj);break;case"select_count":case"select_count_total":He=e('select[name="'+this.esc_selector(Le)+'[]"] option:not([data-placeholder])'+("select_count"==j?":selected":""),this.form_canvas_obj)}M=He?He.length:0;break;
1case"post_date_custom":case"post_date_modified_custom":case"server_date_custom":case"blog_date_custom":ce=this.get_new_date(F);if(void 0!==q[1])(Je=parseInt(this.parse_variables_process(q[1],a,r,i,s,_,o,l).output,10))&&ce.setSeconds(ce.getSeconds()+Je);M="function"==typeof this.date_format?this.date_format(ce,q[0]):"";break;case"client_date_custom":var Je;ce=new Date;if(void 0!==q[1])(Je=parseInt(this.parse_variables_process(q[1],a,r,i,s,_,o,l).output,10))&&ce.setSeconds(ce.getSeconds()+Je);M="function"==typeof this.date_format?this.date_format(ce,q[0]):"";break;case"random_number":var Ze=parseInt(this.get_number(q[0]),10),Ge=parseInt(this.get_number(q[1]),10);M=Math.floor(Math.random()*(Ge-Ze+1))+Ze;break;case"random_string":var Be=parseInt(this.get_number(q[0]),10),Qe=q[1],Ke=Qe.length;M="";for(var Ve=0;Ve<Be;Ve++)M+=Qe[Math.floor(Math.random()*Ke)];break;case"abs":case"acos":case"asin":case"atan":case"ceil":case"cos":case"exp":case"floor":case"log":case"negative":case"positive":case"sin":case"sqrt":case"tan":g(tt=this.parse_variables_process(q[0],a,r,i,s,_,o,l));ze=this.calc_string(tt.output,n,!1,c,s);switch(j){case"abs":M=Math.abs(ze);break;case"acos":M=Math.acos(ze);break;case"asin":M=Math.asin(ze);break;case"atan":M=Math.atan(ze);break;case"ceil":M=Math.ceil(ze);break;case"cos":M=Math.cos(ze);break;case"exp":M=Math.exp(ze);break;case"floor":M=Math.floor(ze);break;case"log":M=Math.log(ze);break;case"negative":case"positive":M="positive"==j?Math.max(0,ze):Math.min(0,ze);break;case"sin":M=Math.sin(ze);break;case"sqrt":M=Math.sqrt(ze);break;case"tan":M=Math.tan(ze)}break;case"lower":case"upper":case"ucwords":case"ucfirst":case"capitalize":case"sentence":case"wpautop":case"trim":case"slug":case"name_prefix":case"name_first":case"name_middle":case"name_last":case"name_suffix":if("string"==typeof q[0])switch(g(tt=this.parse_variables_process(q[0],a,r,i,s,_,o,l)),M=tt.output,j){case"lower":M=M.toLowerCase();break;case"upper":M=M.toUpperCase();break;case"ucwords":M=this.ucwords(M);break;case"ucfirst":M=this.ucfirst(M);break;case"capitalize":M=this.capitalize(M);break;case"sentence":M=this.sentence(M);break;case"wpautop":M=this.wpautop(M),J=!1;break;case"trim":M=M.trim(),J=!1;break;case"slug":M=this.get_slug(M);break;case"name_prefix":case"name_first":case"name_middle":case"name_last":case"name_suffix":M=this.get_full_name_components(M)[j]}break;case"pow":g(tt=this.parse_variables_process(q[0],a,r,i,s,_,o,l));var Xe=this.calc_string(tt.output,n,Ae,c,s);g(tt=this.parse_variables_process(q[1],a,r,i,s,_,o,l));var et=this.calc_string(tt.output,n,Ae,c,s);M=Math.pow(Xe,et);break;case"round":var tt=this.parse_variables_process(q[1],a,r,i,s,_,o,l);Ae=this.get_number(tt.output);g(tt=this.parse_variables_process(q[0],a,r,i,s,_,o,l)),M=this.calc_string(tt.output,n,Ae,c,s);break;case"min":case"max":var at=[];if(1===q.length)g(tt=this.parse_variables_process(q[0],a,r,i,s,_,o,l)),q=this.string_to_attributes(tt.output);for(var ae in q)if(q.hasOwnProperty(ae)){g(tt=this.parse_variables_process(q[ae],a,r,i,s,_,o,l));ze=this.calc_string(tt.output,n,!1,c,s);at.push(ze)}M=at.length>0?"min"==j?Math.min(...at):Math.max(...at):0;break;case"avg":Se=0;if(1===q.length)g(tt=this.parse_variables_process(q[0],a,r,i,s,_,o,l)),q=this.string_to_attributes(tt.output);for(var ae in q){if(q.hasOwnProperty(ae))g(tt=this.parse_variables_process(q[ae],a,r,i,s,_,o,l)),Se+=ze=this.calc_string(tt.output,n,!1,c,s)}M=Se/q.length}"object"==typeof e.WS_Form.parse_variable_handlers&&"function"==typeof e.WS_Form.parse_variable_handlers[j]&&(M=e.WS_Form.parse_variable_handlers[j].call(this,q,{ws_form:this,section_repeatable_index:a,field_to:i,field_part:s,section_id:o,parse_variable:j,parse_variable_full:z,current_value:M})),!1!==M&&(J&&(M=this.esc_html(M)),O?f[z.substring(1)]=M:u[z.substring(1)]=M)}}while(-1!==N);t=this.mask_parse(t,u)}}}if(-1!=t.indexOf("form")&&(u.form_id=this.form_id,u.form_instance_id=this.form_instance_id,u.form_obj_id=this.form_obj_id,u.form_label=this.form.label,u.form_checksum=this.form.published_checksum,u.form_framework=this.framework.name),-1!=t.indexOf("section")){u.section_row_index=a;var rt=1;!1===o&&!1!==i&&void 0!==i.section_id&&parseInt(i.section_id,10)>0&&(o=parseInt(i.section_id,10)),"object"==typeof this.section_repeatable_indexes["section_"+o]&&(rt=this.section_repeatable_indexes["section_"+o].indexOf(a.toString())+1)<=0&&(rt=1),u.section_row_number=rt}if(-1!=t.indexOf("submit")&&(u.submit_hash=this.hash),-1!=t.indexOf("client")){var it=new Date;u.client_time="function"==typeof this.date_format?this.date_format(it,ws_form_settings.time_format):"",u.client_date="function"==typeof this.date_format?this.date_format(it,ws_form_settings.date_format):"";var st="";"undefined"!=typeof navigator&&"string"==typeof navigator.language&&(st=navigator.language.trim());var _t=e.WS_Form.language_tag_to_locale(st);u.client_locale=_t,u.client_language=_t?e.WS_Form.locale_to_language_tag(_t):"",u.client_locale_language_code=e.WS_Form.get_language_code(_t),u.client_locale_country_code=e.WS_Form.get_country_code(_t)}-1!=t.indexOf("seconds_epoch_midnight")&&((ot=new Date).setHours(0,0,0,0),u.seconds_epoch_midnight=Math.round(ot.getTime()/1e3));if(-1!=t.indexOf("seconds_epoch")){var ot=new Date;u.seconds_epoch=Math.round(ot.getTime()/1e3)}var lt=t;(t=this.mask_parse(t,u),(t=this.mask_parse(t,f,!0))!==lt&&-1!==t.indexOf("#"))&&(t=(tt=this.parse_variables_process(t,a,r,i,s,_,o,l+1,n,c)).output,g(tt));return{output:t,groups:h.filter(function(e,t,a){return a.indexOf(e)===t}),sections:m.filter(function(e,t,a){return a.indexOf(e)===t}),fields:v.filter(function(e,t,a){return a.indexOf(e)===t}),dynamic:b}},e.WS_Form.prototype.get_data_grid_column=function(t,a,r){if(0===t.length)return t;var i=[];
1switch(s=a.type){case"select":case"checkbox":case"radio":break;case"price_select":var s="select_price";break;case"price_checkbox":s="checkbox_price";break;case"price_radio":s="radio_price";break;default:return t}var _="data_grid_"+s,o=this.get_object_meta_value(a,s+"_field_value","0"),l=this.get_object_meta_value(a,s+"_field_label","0"),n=this.get_object_meta_value(a,s+"_field_price","0"),c=this.get_object_meta_value(a,s+"_field_parse_variable","0"),d=this.get_object_meta_value(a,s+"_field_wc","0"),p=this.get_object_meta_value(a,_,!1);if(!1===p)return t;if("object"!=typeof p.columns||"object"!=typeof p.groups)return t;var u=0,f=0,h=0,m=p.columns,v=parseInt(r,10);for(var b in m)if(m.hasOwnProperty(b)){var g=m[b];void 0!==g.id&&void 0!==g.label&&(g.id==o&&(u=b),g.id==l&&(f=b),g.id==n&&b,g.id==c&&(h=b),g.id==d&&b,g.label===r&&(v=b))}for(var y in t)if(t.hasOwnProperty(y)){var k=t[y],w=p.groups;for(var x in w)if(w.hasOwnProperty(x)){var j=w[x];if(void 0!==j.rows){var S=j.rows;for(var F in S)if(S.hasOwnProperty(F)){var W=S[F];if(null!==W&&"object"==typeof W.data){var O=W.data,M=e.extend(!0,[],O);if(void 0!==M[u]&&void 0!==M[v]){var I={data_grid_row_value:M[u],data_grid_row_action_variable:"",data_grid_row_label:""};for(var N in!1!==f&&void 0!==M[f]&&(I.data_grid_row_label=M[f]),!1!==h&&void 0!==M[h]&&(I.data_grid_row_action_variable=M[h]),M)M.hasOwnProperty(N)&&("number"==typeof M[N]&&(M[N]=M[N].toString()),M[N]=this.mask_parse(M[N],I));if(k===M[u].toString()){if(void 0===W.data[v])continue;i.push(W.data[v])}}}}}}}return i},e.WS_Form.prototype.wpautop_parse_variable=function(e,t){if("on"==this.get_object_meta_value(e,"wpautop_do_not_process",""))return!1;var a=void 0!==t.wpautop_parse_variable&&t.wpautop_parse_variable;if("object"==typeof a){var r=!1;for(var i in a)if(a.hasOwnProperty(i)){var s=a[i];this.get_object_meta_value(e,s.meta_key,"")===s.meta_value&&(r=!0)}a=r}return a},e.WS_Form.prototype.wpautop=function(e,t){if("string"!=typeof e)return"";void 0===t&&(t=!0);var a=new Map;if(""===e.trim())return"";if((e+="\n").indexOf("<pre")>-1){var r=e.split("</pre>"),i=r.pop();e="",r.forEach(function(t,r){var i=t.indexOf("<pre");if(-1!==i){var s="<pre wp-pre-tag-"+r+"></pre>";a[s]=t.slice(i)+"</pre>",e+=t.substring(0,i)+s}else e+=t}),e+=i}var s="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";(e=(e=(e=(e=e.replace(/<br \/>\s*<br \/>/,"\n\n")).replace(new RegExp("(<"+s+"[^>]*>)","gmi"),"\n$1")).replace(new RegExp("(</"+s+">)","gmi"),"$1\n\n")).replace(/\r\n|\r/,"\n")).indexOf("<option")>-1&&(e=(e=e.replace(/\s*<option'/gim,"<option")).replace(/<\/option>\s*/gim,"</option>")),e.indexOf("</object>")>-1&&(e=(e=(e=e.replace(/(<object[^>]*>)\s*/gim,"$1")).replace(/\s*<\/object>/gim,"</object>")).replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/gim,"$1")),(e.indexOf("<source")>-1||e.indexOf("<track")>-1)&&(e=(e=(e=e.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/gim,"$1")).replace(/\s*([<\[]\/(?:audio|video)[>\]])/gim,"$1")).replace(/\s*(<(?:source|track)[^>]*>)\s*/gim,"$1"));var _=(e=e.replace(/\n\n+/gim,"\n\n")).split(/\n\s*\n/);return e="",_.forEach(function(t){e+="<p>"+t.replace(/^\s+|\s+$/g,"")+"</p>\n"}),e=(e=(e=(e=(e=(e=(e=(e=e.replace(/<p>\s*<\/p>/gim,"")).replace(/<p>([^<]+)<\/(div|address|form)>/gim,"<p>$1</p></$2>")).replace(new RegExp("<p>s*(</?"+s+"[^>]*>)s*</p>","gmi"),"$1",e)).replace(/<p>(<li.+?)<\/p>/gim,"$1")).replace(/<p><blockquote([^>]*)>/gim,"<blockquote$1><p>")).replace(/<\/blockquote><\/p>/gim,"</p></blockquote>")).replace(new RegExp("<p>s*(</?"+s+"[^>]*>)","gmi"),"$1")).replace(new RegExp("(</?"+s+"[^>]*>)s*</p>","gmi"),"$1"),t&&(e=(e=(e=e.replace(/<(script|style)(?:.|\n)*?<\/\\1>/gim,function(e){return e[0].replace("\n","<WPPreserveNewline />")})).replace(/(<br \/>)?\s*\n/gim,"<br />\n")).replace("<WPPreserveNewline />","\n")),e=(e=(e=e.replace(new RegExp("(</?"+s+"[^>]*>)s*<br />","gmi"),"$1")).replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/gim,"$1")).replace(/\n<\/p>$/gim,"</p>"),Object.keys(a).length&&(e=e.replace(new RegExp(Object.keys(a).join("|"),"gi"),function(e){return a[e]})),e},e.WS_Form.prototype.calc_string=function(e,t,a,r,i){try{var s=new Function("return "+e)();return s===1/0&&(s=0),this.get_number(s,0,!1,a)}catch(e){return"object"==typeof r&&void 0!==r.id&&void 0!==r.label&&this.error("error_parse_variable_syntax_error_calc",r.id+" | "+this.esc_html(r.label)+(i?" | "+this.esc_html(i):"")+" | "+e.message+": "+this.esc_html(t)),0}},e.WS_Form.prototype.closing_string_index=function(e,t,a,r){for(var i=1;i>0;){var s=e.indexOf(a,r),_=e.indexOf(t,r);
1if(-1!==s&&-1!==_&&s<_)r=s+a.length,i++;else{if(!(-1!==_&&i>1)){if(-1!==_&&1===i)break;break}r=_+t.length,i--}}return _},e.WS_Form.prototype.string_to_attributes=function(e,t){if("string"!=typeof e||""==e)return[];"string"!=typeof t&&(t=",");var a=1,r=0,i=!1,s="",_=[];e.replace("“",'"'),e.replace("”",'"');for(var o=e.length;r<o;){var l=e[r];if(void 0===l)break;if(l!==t||1!==a||i)if('"'!==l||1!==a){if(!i){switch(l){case"(":a++;break;case")":a--}if(0===a)break}s+=l,r++}else i||(s=""),i=!i,r++;else _.push(s),s="",r++}return _.push(s),_.length&&(_=_.map(function(e){return e=e.replace(/^"(.+(?="$))"$/,"$1")})),_},e.WS_Form.prototype.get_bracket_finish_index=function(e){if(""===e)return-1;e.replace("“",'"'),e.replace("”",'"');for(var t=1,a=1,r=!1;t>0||a<e.length;){var i=e[a];if(void 0===i)break;if('"'!==i){if(!r){switch(i){case"(":t++;break;case")":t--}if(0===t)break}a++}else r=!r,a++}return 0===t?a:(this.error("error_parse_variable_syntax_error_bracket_closing",e,"error-parse-variables"),-1)},e.WS_Form.prototype.parse_variables_process_error=function(e){return{output:e,functions:[],groups:[],sections:[],fields:[],dynamic:!1}
1},e.WS_Form.prototype.get_field_value=function(t,a,r,i){var s=this;if(void 0===a&&(a=!1),void 0===r&&(r=!1),void 0===i&&(i=!1),!1===a){var _='[name="'+this.esc_selector(ws_form_settings.field_prefix+t.id);r&&(_+="[]")}else if(!0===a)_='[name^="'+this.esc_selector(ws_form_settings.field_prefix+t.id)+"[";else{_='[name="'+this.esc_selector(ws_form_settings.field_prefix+t.id+"["+a+"]");r&&(_+="[]")}if(!e(_+='"]',this.form_canvas_obj).length)return!1;switch(t.type){case"select":case"price_select":_+=" option:selected";break;case"checkbox":case"radio":case"price_checkbox":case"price_radio":_+=":checked"}var o=[];return e(_,this.form_canvas_obj).each(function(){switch(t.type){case"price_select":!1===i?o.push(e(this).attr("data-price")):o.push(e(this).val());break;case"price_checkbox":case"price_radio":!1===i?o.push(e(this).attr("data-price")):o.push(e(this).val());break;case"mediacapture":if(u=e(this).val()){var a=JSON.parse(u);"object"==typeof a&&a.filename&&o.push(a.filename)}break;case"file":var r=[];switch(e(this).attr("data-file-type")){case"dropzonejs":var _=e(this).closest('[data-type="file"]');
1if(_){var l=e(".dropzone",_)[0].dropzone;if(l&&l.files)r=l.files}break;default:r=e(this)[0].files}var n=[];for(var c in r)if(r.hasOwnProperty(c)){var d=r[c];n.push(d.name)}o.push(n.join(","));break;case"googlemap":var p=e(this).val();if(!p)break;try{var u=JSON.parse(p)}catch(e){break}void 0!==u.lat&&void 0!==u.lng&&o.push(u.lat+","+u.lng);break;default:u=e(this).val();s.is_iterable(u)?o.push(...u):o.push(u)}}),o},e.WS_Form.prototype.get_data_source=function(t){var a={default_value:[]};t=this.field_data_cache[t.id];if(void 0===e.WS_Form.field_type_cache[t.type])return!1;var r=e.WS_Form.field_type_cache[t.type];if(void 0===r.data_source)return!1;var i=r.data_source;if(void 0===i.type)return!1;switch(a.type=i.type,a.type){case"data_grid":if(void 0===i.id)return!1;a.meta_key_data_grid=i.id,a.meta_key_value_column=void 0===r.datagrid_column_value&&r.datagrid_column_value,a.data_grid=this.get_object_meta_value(t,a.meta_key_data_grid,!1),a.value_column_id=this.get_object_meta_value(t,a.meta_key_value_column,!1);var s=(a.data_grid.columns,a.data_grid.columns);for(var _ in a.value_column_index=!1,s)if(s.hasOwnProperty(_)){var o=s[_];if(void 0!==o.id&&o.id==a.value_column_id){a.value_column_index=_;break}}if(!1!==a.value_column_id&&void 0!==a.data_grid.groups){var l=a.data_grid.groups;for(var n in l)if(l.hasOwnProperty(n)){var c=l[n];if(void 0!==c.rows){var d=c.rows;for(var p in d)if(d.hasOwnProperty(p)){var u=d[p];if(null!==u)if(void 0!==u.default&&"on"===u.default){if(void 0===u.data)continue;if(void 0===u.data[a.value_column_index])continue;a.default_value.push(u.data[a.value_column_index])}}}}}}return a},e.WS_Form.prototype.get_query_var=function(e,t){t||(t="");var a=window.location.href;if(!a)return t;try{e=e.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(a);if(!r)return t;if(!r[2])return t;try{return decodeURIComponent(r[2].replace(/\+/g," "))}catch(e){return t}}catch(e){return t}},e.WS_Form.prototype.set_object_meta_value=function(e,t,a){return void 0===e?a:void 0===e.meta?a:void(e.meta[t]=a)},e.WS_Form.prototype.column_class_array=function(t,a){void 0===a&&(a="breakpoint");var r=[],i=this.framework.breakpoints,s=this.framework.columns.column_class,_=this.framework.columns.offset_class,o=0,l=0;for(var n in i)if(i.hasOwnProperty(n)){var c=i[n],d=this.get_object_meta_value(t,a+"_size_"+n,"");if(""==d&&(d="0"),0==(d=parseInt(d,10))){if(void 0!==c.column_size_default)switch(c.column_size_default){case"column_count":d=parseInt(e.WS_Form.settings_plugin.framework_column_count,10);break;default:d=parseInt(c.column_size_default,10)}}else d=parseInt(d,10);if(d>0&&d!=o){var p={id:c.id,size_word:void 0===this.number_to_word[d]?d:this.number_to_word[d],size:d};if(void 0!==c.column_class)var u=c.column_class;else u=s;var f=this.mask_parse(u,p);r.push(f),o=d}var h=this.get_object_meta_value(t,a+"_offset_"+n,""),m=!1;if(""!==h&&h!=l){p={id:c.id,offset_word:void 0===this.number_to_word[h]?h:this.number_to_word[h],offset:h};if(void 0!==c.offset_class)var v=c.offset_class;else v=_;f=this.mask_parse(v,p);r.push(f),l=h,m=!0}m&&r.push("wsf-has-offset")}return r},e.WS_Form.prototype.column_classes_render=function(e,t,a){e.closest(".wsf-sections").css("min-height","auto"),e.closest(".wsf-fields").css("min-height","auto"),void 0===a&&(a=!0);for(var r=this.column_class_array(t),i=0;i<r.length;i++)a?e.addClass(r[i]):e.removeClass(r[i])},e.WS_Form.prototype.mask_parse=function(e,t,a){if("string"!=typeof e)return"";void 0===a&&(a=!1);var r=[],i=Object.keys(t);i.sort(function(e,t){if(e===t)return 0;var a=-1!==e.indexOf("("),r=-1!==t.indexOf("(");return a&&r?e<t?1:-1:!a&&r||a&&!r?a<r?1:-1:e<t?1:-1});for(var s=0;s<i.length;s++)r[i[s]]=t[i[s]];for(var _ in t=r)if(t.hasOwnProperty(_)){var o=t[_];e=a?e.replace("#"+_,o):this.replace_all(e,"#"+_,o)}return e},e.WS_Form.prototype.language=function(t,a,r,i){void 0===a&&(a=!1),void 0===r&&(r=!0),void 0===i&&(i=!1);var s="",_="";if("error_language"===t)s="Language reference not found: %s";else if(null!==e.WS_Form.settings_form&&void 0!==e.WS_Form.settings_form.language&&void 0!==e.WS_Form.settings_form.language[t])s=e.WS_Form.settings_form.language[t];return""==s?"error_language"===t||i||this.error("error_language",t):(!1!==a&&(s=this.replace_all(s,"%s",a)),_=r?this.esc_html(s):s),""==_&&(_=""==a?"[LANGUAGE NOT FOUND: "+t+"]":a),_},e.WS_Form.prototype.cookie_set=function(t,a,r,i){void 0===r&&(r=!0),void 0===i&&(i=!0);var s=this.get_object_value(e.WS_Form.settings_plugin,"cookie_prefix");if(!s)return!1;
1if(""==a){if(""==this.cookie_get(t,""))return!1;(o=new Date).setTime(o.getTime()-864e5);var _="expires="+o.toUTCString()+";"}else if(r){var o,l=this.get_object_value(e.WS_Form.settings_plugin,"cookie_timeout");if(!l)return!1;(o=new Date).setTime(o.getTime()+1e3*l);_=" expires="+o.toUTCString()+";"}else _="";var n=s+"_"+(i?this.form_id+"_":"")+t+"="+a+";"+_+" path=/; SameSite=Strict; Secure";return document.cookie=n,!0},e.WS_Form.prototype.field_param_language=function(e,t,a){var r=this.get_object_meta_value(e,t,"");return""!==r?r:this.language(a)},e.WS_Form.prototype.cookie_get=function(t,a,r){void 0===r&&(r=!0);var i=this.get_object_value(e.WS_Form.settings_plugin,"cookie_prefix");return i?(t=i+"_"+(r?this.form_id+"_":"")+t,this.cookie_get_raw(t,a)):a},e.WS_Form.prototype.cookie_get_raw=function(e,t){if(void 0===t&&(t=""),""===e||!document.cookie||"string"!=typeof document.cookie)return t;var a=document.cookie.split(";");e+="=";for(var r=0;r<a.length;r++){for(var i=a[r];" "==i.charAt(0);)i=i.substring(1);if(0==i.indexOf(e)){var s=i.substring(e.length,i.length);try{return decodeURIComponent(s)}catch(e){return s}}}return t},e.WS_Form.prototype.cookie_clear=function(t,a){void 0===a&&(a=!0);var r=this.get_object_value(e.WS_Form.settings_plugin,"cookie_prefix");if(!r)return!1;var i=new Date;i.setTime(i.getTime()-36e5);var s=r+"_"+(a?this.form_id+"_":"")+t+"=''; expires="+i.toUTCString()+"; path=/; SameSite=Strict; Secure";return document.cookie=s,!0},e.WS_Form.prototype.session_storage_get_raw=function(e,t){return void 0===t&&(t=""),""===e||"object"!=typeof sessionStorage||null===sessionStorage.getItem(e)?t:sessionStorage.getItem(e)},e.WS_Form.prototype.local_storage_get_raw=function(e,t){return void 0===t&&(t=""),""===e||"object"!=typeof localStorage||null===localStorage.getItem(e)?t:localStorage.getItem(e)},e.WS_Form.prototype.tabs=function(t,a){void 0===a&&(a={});var r=void 0!==a.selector?a.selector:"li",i=void 0!==a.active?parseInt(a.active,10):0;isNaN(i)&&(i=0);var s=void 0!==a.activate&&a.activate,_=this,o=0;t.addClass("wsf-tabs"),e(r,t).each(function(){var t=e(this);t.find('a[href*="#"]:not([href="#"])').each(function(){e(this).attr("data-tab-index",o),e(this).off("click").on("click",function(a){a.preventDefault(),e(this).trigger("wsf-click"),a.stopPropagation(),a.stopImmediatePropagation(),_.tab_show(e(this),t,s)}),o===i&&_.tab_show(e(this),t)}),o++})},e.WS_Form.prototype.tabs_destroy=function(t,a){void 0===a&&(a={});var r=void 0!==a.selector?a.selector:"li";e(r,t).each(function(){e(this).find("a").each(function(){e(this).removeAttr("data-tab-index"),e(this).off("click")})}),t.removeClass("wsf-tabs")},e.WS_Form.prototype.tab_show=function(t,a,r){var i=this;a.siblings().each(function(){var t=e(this).find("a").first();i.tab_hide(t,e(this))}),a.addClass("wsf-tab-active");var s=t.attr("href");(e(s).show(),"function"==typeof r)&&r(t.attr("data-tab-index"));t.trigger("tab_show")},e.WS_Form.prototype.tab_hide=function(t,a){a.removeClass("wsf-tab-active");var r=t.attr("href");e(r).hide()},e.WS_Form.prototype.data_cache_build=function(){if(void 0===this.form)return!1;if(void 0===this.form.groups)return!1;for(var e in this.group_data_cache=[],this.section_data_cache=[],this.field_data_cache=[],this.action_data_cache=[],this.form.groups)if(this.form.groups.hasOwnProperty(e)){var t=this.form.groups[e];this.data_cache_build_group(t)}var a=this.get_object_meta_value(this.form,"action",!1);if(!1!==a&&void 0!==a.groups&&void 0!==a.groups[0]&&"object"==typeof a.groups[0].rows&&0!=a.groups[0].rows.length){var r=a.groups[0].rows;for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];null!==s&&"object"==typeof s&&"object"==typeof s.data&&0!=s.data.length&&(this.action_data_cache[s.id]={label:s.data[0]})}}return!0},e.WS_Form.prototype.data_cache_build_group=function(e){for(var t in this.group_data_cache[e.id]=e,e.sections)if(e.sections.hasOwnProperty(t)){var a=e.sections[t];this.data_cache_build_section(a)}return!0},e.WS_Form.prototype.data_cache_build_section=function(t){this.section_data_cache[t.id]=t;var a=void 0!==t.meta&&void 0!==t.meta.section_repeatable&&"on"==t.meta.section_repeatable;for(var r in t.fields)if(t.fields.hasOwnProperty(r)){var i=t.fields[r];
1a&&(i.section_repeatable_section_id=t.id),void 0!==e.WS_Form.field_type_cache[i.type]&&(this.field_data_cache[i.id]=i)}return!0},e.WS_Form.prototype.array_randomize=function(e){for(var t=e.length-1;t>0;t--){var a=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[a],e[a]=r}return e},e.WS_Form.prototype.get_nice_duration=function(e,t){if(void 0===t&&(t=!0),0==e)return"-";var a=Math.floor(e/3600);if(t)var r=Math.floor(e%3600/60),i=e%60;else r=Math.ceil(e%3600/60);var s=[];return a>0&&s.push(a+" "+(1==a?this.language("hour"):this.language("hours"))),r>0&&s.push(r+" "+(1==r?this.language("minute"):this.language("minutes"))),t&&s.push(i+" "+(1==i?this.language("second"):this.language("seconds"))),s.join(" ")},e.WS_Form.prototype.get_nice_distance=function(e,t){if(0==e)return"-";switch(t){case"IMPERIAL":var a=e/1609;if(a>=1)return Math.floor(a)+" "+(1==a?this.language("mile"):this.language("miles"));var r=3.2808399*e;return Math.floor(r)+" "+(1==r?this.language("feet"):this.language("feets"));default:var i=e/1e3;return i>=1?Math.round(10*i)/10+" "+(1==i?this.language("kilometer"):this.language("kilometers")):Math.round(10*e)/10+" "+(1==e?this.language("meter"):this.language("meters"))}},e.WS_Form.prototype.ucwords=function(e){for(var t=e.split(" "),a=0;a<t.length;a++)t[a]=t[a].charAt(0).toUpperCase()+t[a].slice(1);return t.join(" ")},e.WS_Form.prototype.ucfirst=function(e){var t="";return e.length>0&&(t=e[0].toUpperCase(),e.length>1&&(t+=e.slice(1))),t},e.WS_Form.prototype.capitalize=function(e){return this.ucwords(e.toLowerCase())},e.WS_Form.prototype.sentence=function(e){return this.ucfirst(e.toLowerCase())},e.WS_Form.prototype.get_label_position=function(e){var t=this.get_object_meta_value(e,"sub_type",!1);""==t&&(t=!1);var a=this.get_object_meta_value(e,"label_position","default");return"default"==(a=this.get_field_value_fallback(e.type,!1,"label_position_force",a,!1,t))&&(a=this.get_object_meta_value(this.form,"label_position_form","top")),a},e.WS_Form.prototype.get_help_position=function(e){var t=this.get_object_meta_value(e,"sub_type",!1);""==t&&(t=!1);var a=this.get_object_meta_value(e,"help_position","default");return"default"==(a=this.get_field_value_fallback(e.type,!1,"help_position_force",a,!1,t))&&(a=this.get_object_meta_value(this.form,"help_position_form","bottom")),a},e.WS_Form.prototype.get_form_invalid_feedback_mask=function(){var t=this.get_object_meta_value(this.form,"invalid_feedback_mask","");if(""==t){var a=e.WS_Form.meta_keys.invalid_feedback_mask;return a.p?a.p:a.mask_placeholder}return t},e.WS_Form.prototype.get_invalid_feedback_mask_parsed=function(e,t){return e=this.replace_all(e,"#label_lowercase",t.toLowerCase()),e=this.replace_all(e,"#label",t)},e.WS_Form.prototype.get_field_html_single=function(t,a,r,i){void 0===r&&(r=!1),void 0===i&&(i=!1);var s=[],_=void 0!==a,o=!r,l=!1!==i?"-repeat-"+i:"",n=this.get_part_id(t.id,i),c=this.get_field_name(t.id,i),d=["default","class","input_type_datetime","multiple","min","max","step"],p=["class"];if(void 0===e.WS_Form.field_type_cache[t.type])return"";var u=e.WS_Form.field_type_cache[t.type];if(u.pro_required)return this.language("error_pro_required");if(r)var f=!0;else f=this.get_object_meta_value(t,"label_render",!0);var h=this.get_object_meta_value(t,"sub_type",!1);if(""==h&&(h=!1),this.get_field_value_fallback(t.type,!1,"label_disabled",!1,!1,h)&&(f=!1),void 0!==u.submit_array&&u.submit_array&&(c+="[]"),f&&!r)var m=this.get_label_position(t);else m="top";var v=!1;-1===this.get_framework().label_positions.indexOf(m)&&(m="top");var b=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_field_attributes",[],!1,h)),g=void 0!==u.mask_wrappers_drop&&u.mask_wrappers_drop,y=g?"#field":this.get_field_value_fallback(t.type,m,"mask","#field",!1,h),k=this.get_field_value_fallback(t.type,m,"mask_field","",!1,h);if(r){var w=this.get_field_value_fallback(t.type,m,"mask_field_submit",!1,!1,h);!1!==w&&(k=w)}"left"!=m&&"right"!=m||(k=(k=k.replace("#pre_help","")).replace("#post_help",""));var x=f?this.get_field_value_fallback(t.type,m,"mask_field_label","",!1,h):"",j=this.get_field_value_fallback(t.type,m,"mask_field_label_hide_group",!1,!1,h),S=!1,F=this.get_field_value_fallback(t.type,m,"mask_help","",!1,h),W=this.get_field_value_fallback(t.type,m,"mask_help_append","",!1,h),O=this.get_field_value_fallback(t.type,m,"mask_help_append_separator","",!1,h),M=this.get_field_value_fallback(t.type,m,"mask_invali
1d_feedback","",!1,h);switch(t.type){case"checkbox":case"price_checkbox":S="group";break;case"radio":case"price_radio":S="radiogroup"}var I=this.get_object_meta_value(t,"default_value","",!1,!0),N=this.get_object_meta_value(t,"text_editor","",!1,!0),D=this.get_object_meta_value(t,"html_editor","",!1,!0),P=this.get_object_meta_value(t,"dedupe_value_scope","",!1,!0),C=this.get_object_meta_value(t,"hidden_bypass","",!1,!0),q=this.get_object_meta_value(t,"exclude_cart_total","",!1,!0);_||(a="",""!=I&&(a=this.esc_html(I)),""!=N&&(a=N),""!=D&&(a=D));var T=!0,z="";switch(t.type){case"textarea":T=""===this.get_object_meta_value(t,"input_type_textarea","");break;case"select":case"checkbox":case"radio":case"price_select":case"price_checkbox":case"price_radio":a&&(a="string"==typeof a?a.split(",").map(function(e){return e.trim()}):a,_=!0)}var $=T?this.parse_variables_process(this.get_object_meta_value(t,"prepend",""),i,!1,t,"field_prepend",o).output:"";z+=T?this.parse_variables_process(this.get_object_meta_value(t,"append",""),i,!1,t,"field_prepend",o).output:"";var A="";if(!r){var Y=[],E=this.get_object_meta_value(this.form,"class_field","",!1,!0);if(""!=E&&Y.push(E),""!=(A=this.get_object_meta_value(t,"class_field","",!1,!0))&&Y.push(A),!this.get_object_meta_value(t,"class_field_full_button_remove","")){var L=this.get_field_value_fallback(t.type,m,"class_field_full_button","",!1,h);"object"==typeof L&&Y.push(L.join(" "))}if(!(U=this.get_object_meta_value(t,"class_field_button_type",!1)))var U=this.get_field_value_fallback(t.type,m,"class_field_button_type_fallback",!1,!1,h);if(U){var R=this.get_field_value_fallback(t.type,m,"class_field_button_type","",!1,h);void 0!==R[U]&&Y.push(R[U])}switch(t.type){case"checkbox":case"radio":switch(this.get_object_meta_value(t,t.type+"_style","")){case"button":Y.push("wsf-button");break;case"button-full":Y.push("wsf-button wsf-button-full");break;case"color":Y.push("wsf-color");break;case"color-circle":Y.push("wsf-color wsf-circle");break;case"circle":Y.push("wsf-circle");break;case"image":Y.push("wsf-image");break;case"image-circle":Y.push("wsf-image wsf-circle");break;case"image-responsive":Y.push("wsf-image wsf-responsive wsf-image-full");break;case"image-circle-responsive":Y.push("wsf-image wsf-responsive wsf-image-full wsf-circle");break;case"switch":Y.push("wsf-switch")}}if(""!==$||""!==z){var H=this.get_field_value_fallback(t.type,m,"class_field_input_group","",!1,h);""!==H&&Y.push(H)}var J=void 0!==u.label_inside&&u.label_inside;if(J&&"inside"===m){switch(t.type){case"textarea":var Z=this.get_object_meta_value(t,"input_type_textarea",!1);v=!("tinymce"===Z||"html"===Z);break;case"select":case"price_select":v=!this.get_object_meta_value(t,"select2",!1);break;default:v=!0}v||(m="top")}J||"inside"!==m||(m="top"),v&&(t.meta.placeholder=this.parse_variables_process(t.label,i,!1,t,"field_label",o).output),A=Y.join(" ")}var G=parseInt(e.WS_Form.settings_plugin.framework_column_count,10),B=parseInt(this.get_object_meta_value(this.form,"label_column_width_form",3),10),Q=this.get_object_meta_value(t,"label_column_width","default");switch(Q){case"default":case"":Q=B;break;default:Q=parseInt(Q,10)}Q>=G&&(Q=G-1);var K=G-Q,V={id:n,form_id_prefix:this.form_id_prefix,form_id:this.form_id,form_instance_id:this.form_instance_id,field_id:t.id,name:c,label:this.parse_variables_process(t.label,i,!1,t,"field_label",o).output,value:a,required:this.get_object_meta_value(this.form,"label_required")?'<span class="wsf-required-wrapper"></span>':"",column_width_label:Q,column_width_field:K,max_upload_size:ws_form_settings.max_upload_size,locale:ws_form_settings.locale,currency:e.WS_Form.settings_plugin.currency},X=this.get_field_value_fallback(t.type,m,"meta_key_parse_variables",[],!1,h);for(var ee in X)if(X.hasOwnProperty(ee)){var te=X[ee],ae=!1!==(et=void 0!==e.WS_Form.meta_keys[te]&&e.WS_Form.meta_keys[te])?void 0===et.d?"":et.d:"",re=this.get_object_meta_value(t,te,ae);"object"==typeof re&&(re=JSON.stringify(re)),re=this.replace_all(re,"'","&#39;"),V[te]=re}var ie=e.extend(!0,{},V);ie.label_id=this.get_part_id(t.id,i,"label");var se=this.get_part_id(t.id,i,"help"),_e=""!==(le=r?"":this.get_object_meta_value(t,"help","",!1,!1)),oe={value:0,character_count:0,character_count_label:"",character_remaining:0,character_remaining_label:"",character_min:0,character_min_label:"",character_max:0,character_max_label:"",word_count:0,word_count_label:"",word_remaining:0,word_remaining_label:"",word_min:0,word_min_label:"",word_max:0,word_max_label:""};le=this.mask_parse(le,oe);var le=this.parse_variables_process(le,i,!1,t,"field_help",o).output;if(r)switch(t.type){case"range":le="#value"}var ne=this.get_help_position(t),ce=this.get_field_value_fallback(t.type,m,"class_help_"+("bottom"==ne?"post":"pre"),[],!1,h);oe.id=n,oe.help_id=se,oe.help_class=ce.join(" "),oe.help=le,V.help_class=ce.join(" ");
1var de=!r&&this.get_object_meta_value(t,"invalid_feedback_render",!1,!1,!0),pe=!1;if(de){var ue=e.extend(!0,{},V),fe=this.form_id_prefix+"invalid-feedback-"+t.id+l,he=this.get_field_value_fallback(t.type,m,"class_invalid_feedback",[],!1,h),me=(pe=this.get_field_value_fallback(t.type,m,"invalid_feedback_last_row",!1,!1,h),this.get_object_meta_value(t,"invalid_feedback","",!1,!0));""==me&&(me=this.get_form_invalid_feedback_mask()),me=this.get_invalid_feedback_mask_parsed(me,t.label),ue.invalid_feedback_id=fe,ue.invalid_feedback_class=he.join(" "),ue.invalid_feedback=me,ue.attributes="";var ve=this.mask_parse(M,ue)}else fe=!1,ve="";if(V.invalid_feedback=ve,ie.invalid_feedback=ve,V.attributes="",r)b=d.filter(function(e){return-1!=b.indexOf(e)});if(b.length>0){var be=this.get_attributes(t,b,!1,i);V.attributes+=" "+be.attributes,b=be.mask_attributes,s=be.attribute_values}!1!==i&&(V.attributes+=' data-repeatable-index="'+this.esc_attr(i)+'"');V.attributes=this.custom_attributes(V.attributes,t,"field",i);var ge=this.get_object_meta_value(t,"orientation",!1);if("grid"==ge)var ye=this.get_field_value_fallback(t.type,m,"class_orientation_wrapper",[],!1,h),ke=this.get_field_value_fallback(t.type,m,"class_orientation_row",[],!1,h),we=ye.join(" "),xe=this.column_class_array(t,"orientation_breakpoint"),je=(xe=ke.concat(xe)).join(" ");ie.attributes="";var Se=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_field_label_attributes",[],!1,h));if(r)Se=p.filter(function(e){return-1!=Se.indexOf(e)});if(Se.length>0){be=this.get_attributes(t,Se,!1,i);ie.attributes+=be.attributes,Se=be.mask_attributes}var Fe="",We=this.get_object_value(u,"data_source",!1),Oe=0,Me=!1!==We;if(Me){if(void 0===We.type)Me=!1;else var Ie=We.type;if(void 0===We.id)Me=!1;else var Ne=We.id}if(Me){switch(Ie){case"data_grid":var De=this.get_object_meta_value(t,Ne,!1)}if(!1===De&&(Me=!1),void 0===De.columns)Me=!1;else var Pe=De.columns}if(Me){var Ce=this.get_field_value_fallback(t.type,m,"mask_group","",!1,h),qe=this.get_field_value_fallback(t.type,m,"mask_group_wrapper","",!1,h),Te=this.get_field_value_fallback(t.type,m,"mask_group_label","",!1,h),ze=this.get_field_value_fallback(t.type,m,"mask_group_always",!1,!1,h),$e=this.get_field_value_fallback(t.type,m,"mask_row","",!1,h),Ae=this.get_field_value_fallback(t.type,m,"mask_row_placeholder","",!1,h),Ye=this.get_field_value_fallback(t.type,m,"mask_row_field","",!1,h),Ee=this.get_field_value_fallback(t.type,m,"mask_row_label","",!1,h),Le=this.get_field_value_fallback(t.type,m,"mask_row_lookups",[],!1,h),Ue=this.get_field_value_fallback(t.type,m,"datagrid_column_value",!1,!1,h),Re=this.get_field_value_fallback(t.type,m,"mask_row_default","",!1,h),He=this.get_field_value_fallback(t.type,m,"mask_row_required"," required data-required",!1,h),Je=this.get_field_value_fallback(t.type,m,"mask_row_disabled"," disabled",!1,h),Ze=(this.get_field_value_fallback(t.type,m,"mask_row_visible"," visible",!1,h),this.get_object_meta_value(t,"data_grid_rows_randomize","",!1,!0));if(Ze)this.get_object_meta_value(t,"data_source_term_hierarchy","",!1,!0)&&(Ze=!1);var Ge=this.get_object_meta_value(t,"placeholder_row","",!1,!0),Be=this.get_object_meta_value(t,"multiple","",!1,!0);if(""!=Ge&&!Be){var Qe=e.extend(!0,{},V);Qe.value=Ge,Fe+=this.mask_parse(Ae,Qe)}_&&"object"!=typeof a&&("string"!=typeof a&&(a=a.toString()),a=[a]);var Ke=_&&void 0!==a.indexOf,Ve=[];for(var Xe in Le)if(Le.hasOwnProperty(Xe)){if(Ve[ht=Le[Xe]]=!1,!1===(wt=this.get_object_meta_value(t,ht,!1,!1,!0))){if(void 0===e.WS_Form.meta_keys[ht])continue;var et;(wt=void 0!==(et=e.WS_Form.meta_keys[ht]).d?et.d:0)>Pe.length&&(wt=0)}var tt=!1;for(var at in Pe){if(Pe.hasOwnProperty(at))if(Pe[at].id==wt){tt=at;break}}tt&&(Ve[ht]=tt)}if(void 0===De.groups)return this.error("error_data_source_groups"),"";var rt=De.groups;Object.keys(rt).length;for(var it in Ze&&(rt=this.array_randomize(rt)),rt)if(rt.hasOwnProperty(it)){var st=e.extend(!0,{},V);st.group_id=this.form_id_prefix+"datagrid-"+t.id+"-group-"+it+l;var _t=rt[it];if(null!=_t&&"object"==typeof _t){var ot=void 0!==_t.mask_group&&this.is_true(_t.mask_group)||ze;if(void 0===_t.label)return this.error("error_data_group_label"),"";switch(t.type){case"select":case"price_select":var lt=!0;break;default:lt=void 0===_t.label_render||_t.label_render}if(lt){var nt=e.extend(!0,{},V);
1nt.group_label=_t.label,nt.label_row_id=this.form_id_prefix+"label-"+t.id+"-group-"+it+l,st.group_label=this.parse_variables_process(this.mask_parse(Te,nt),i).output}else!1!==Ce&&ot&&-1!==Ce.indexOf("<fieldset")?st.group_label='<legend class="wsf-hidden-element">'+this.esc_html(""!=_t.label?_t.label:this.language("comment_group"))+"</legend>":st.group_label="";st.disabled=void 0!==_t.disabled&&"on"==_t.disabled?" disabled":"",ot&&j&&(x="");var ct="";if(void 0!==_t.rows){var dt=JSON.parse(JSON.stringify(_t.rows)),pt=this.get_object_meta_value(t,"select_all","");if(("checkbox"==t.type||"price_checkbox"==t.type)&&"on"==pt){var ut=!1,ft=!1;for(var ht in Ve)if(Ve.hasOwnProperty(ht)){var mt=Ve[ht];"checkbox_field_value"==ht&&(ut=mt),"checkbox_field_label"==ht&&(ft=mt),"checkbox_price_field_value"==ht&&(ut=mt),"checkbox_price_field_label"==ht&&(ft=mt)}pt={id:0,default:"",required:"",hidden:"",disabled:"",select_all:!0,data:[]};var vt=this.get_object_meta_value(t,"select_all_label","");""==vt&&(vt=this.language("select_all_label")),pt.data[ut]=vt,pt.data[ft]=vt,dt.unshift(pt)}for(var bt in Ze&&(dt=this.array_randomize(dt)),dt)if(dt.hasOwnProperty(bt)){var gt=dt[bt];if(null!==gt&&"object"==typeof gt&&"object"==typeof gt.data){var yt=!pe||bt==dt.length-1,kt=e.extend(!0,{},V);for(var ht in kt.data_grid_row_value="",kt.data_grid_row_action_variable="",kt.data_grid_row_label="",kt.data_grid_row_price="",kt.data_grid_row_price_currency="",kt.data_grid_row_woocommerce_cart="",Ve){if(Ve.hasOwnProperty(ht))if(kt[ht]="",!1!==(tt=Ve[ht])&&void 0!==gt.data[tt]){var wt;switch(null===(wt=gt.data[tt])&&(wt=""),wt=this.parse_variables_process(wt.toString(),i,!1,t,"data_grid_row",o).output,kt[ht+"_html"]=this.esc_html(wt),t.type){case"range":case"price_range":var xt=this.get_object_meta_value(t,"min",0);(""==xt||isNaN(xt))&&(xt=0);var jt=this.get_object_meta_value(t,"max",100);(""==jt||isNaN(jt))&&(jt=100);var St=this.get_number(wt,!0),Ft=parseFloat(jt)-parseFloat(xt),Wt=Ft>0?(St-xt)/Ft*100:0;kt[ht+"_percentage"]=Wt,-1!==ht.indexOf("_field_percentage")&&(kt.data_grid_row_value_percentage=Wt)}kt[ht+"_compare"]=this.esc_html(wt);var Ot=!1;if(void 0!==e.WS_Form.meta_keys[ht]){var Mt=e.WS_Form.meta_keys[ht];void 0!==Mt.h&&Mt.h&&(wt=this.esc_html(wt));Ot=void 0!==Mt.pr&&Mt.pr}if(Ot){var It=this.get_number(wt),Nt=ht+"_currency",Dt=this.get_price(It);kt[Nt]=Dt,kt[ht]=It,-1!==ht.indexOf("_price_field_price")&&(kt.data_grid_row_price=It),-1!==Nt.indexOf("_price_field_price_currency")&&(kt.data_grid_row_price_currency=Dt)}else kt[ht]=wt;-1!==ht.indexOf("_field_value")&&(kt.data_grid_row_value=wt),-1!==ht.indexOf("_field_parse_variable")&&(kt.data_grid_row_action_variable=wt),-1!==ht.indexOf("_field_label")&&(kt.data_grid_row_label=wt),-1!==ht.indexOf("_field_wc")&&(kt.data_grid_row_woocommerce_cart=wt)}}void 0!==u.mask_row_value&&(kt.row_value=this.mask_parse(u.mask_row_value,kt),kt.row_value.indexOf("#")>-1&&(kt.row_value=this.mask_parse(kt.row_value,kt))),void 0!==u.mask_row_price&&(kt.row_price=this.mask_parse(u.mask_row_price,kt)),gt.select_all?kt.row_id=this.form_id_prefix+"field-"+t.id+"-group-"+it+"-row-"+gt.id+l:kt.row_id=this.form_id_prefix+"field-"+t.id+"-row-"+gt.id+l,kt.data_id=gt.id;var Pt=e.extend(!0,{},kt),Ct=e.extend(!0,{},kt);Ct.label_id=this.form_id_prefix+"label-"+t.id+l,Ct.label_row_id=this.form_id_prefix+"label-"+t.id+"-row-"+gt.id+l;var qt=[];(!_&&gt.default||_&&!1!==Ue&&Ke&&a.indexOf(kt[Ue+"_compare"])>-1||_&&void 0!==kt.row_value&&Ke&&a.indexOf(kt.row_value)>-1)&&(qt.default=Re),gt.disabled&&(qt.disabled=Je),gt.required&&(qt.required=He),qt.dedupe_value_scope=P,qt.hidden_bypass=C,qt.exclude_cart_total=q,kt.attributes="",Ct.attributes="",Pt.attributes="";var Tt=e.extend(!0,[],qt);if(!r){var zt="horizontal"==ge&&this.get_field_value_fallback(t.type,m,"class_inline",!1,!1,h);!1!==zt&&(Tt.class=zt.join(" "));var $t=this.get_field_value_fallback(t.type,m,"class_row",!1,!1,h);if(!1!==$t&&(Tt.class=!1!==zt?Tt.class+" "+$t.join(" "):$t.join(" ")),gt.disabled){var At=this.get_field_value_fallback(t.type,m,"class_row_disabled",!1,!1,h);!1!==At&&(Tt.class+=" "+At.join(" "))}}var Yt=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_row_attributes",[],!1,h));if(Yt.length>0){be=this.get_attributes(t,Yt,Tt,i);kt.attributes+=" "+be.attributes}if(void 0!==gt.hidden&&gt.hidden&&!r)switch(t.type){case"select":continue;default:kt.attributes+=' style="display: none;"'}"grid"==ge&&""!=je&&(kt.attributes=this.attribute_modify(kt.attributes,"class",je,!0));Tt=e.extend(!0,[],qt);var Et=this.get_field_value_fallback(t.type,m,"class_row_field_label",!1,!1,h);!1!==Et&&(Tt.class=Et.join(" "));var Lt=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_row_label_attributes",[],!1,h));if(r)Lt=p.filter(function(e){return-1!=Lt.indexOf(e)});if(Lt.length>0){be=this.get_attributes(t,Lt,Tt,i);Ct.attributes+=" "+be.attributes}Tt=e.extend(!0,[],qt);var Ut=this.get_field_value_fallback(t.type,m,"class_row_field",!1,!1,h);!1!==Ut&&(Tt.class=Ut.join(" ")),r||""==A||(Tt.class+=" "+A.trim()),Tt.aria_labelledby=Ct.label_row_i
1d,(!_&&gt.default||_&&!1!==Ue&&Ke&&a.indexOf(kt[Ue+"_compare"])>-1)&&(Tt.default=Re),gt.disabled&&(Tt.disabled=Je),gt.required&&(Tt.required=He),Tt.required_row=s.required;var Rt=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_row_field_attributes",[],!1,h));if(r)Rt=d.filter(function(e){return-1!=Rt.indexOf(e)});if(Rt.length>0){be=this.get_attributes(t,Rt,Tt,i);Pt.attributes+=" "+be.attributes}if(""!=Pt.attributes&&(Pt.attributes=" "+Pt.attributes),void 0!==gt.select_all&&(Pt.attributes+=" data-wsf-select-all"),void 0!==gt.hierarchy&&""==ge&&!Ze)switch(t.type){case"checkbox":case"price_checkbox":case"radio":case"price_radio":kt.attributes+=' data-wsf-hierarchy="'+this.esc_attr(gt.hierarchy)+'"';break;case"select":case"price_select":gt.hierarchy>0&&(kt.select_field_label="&nbsp;&nbsp;&nbsp;".repeat(gt.hierarchy)+kt.select_field_label)}if(de&&!pe)if(fe=this.form_id_prefix+"invalid-feedback-"+t.id+"-row-"+gt.id+l,ue.invalid_feedback_id=fe,de)ve=this.mask_parse(M,ue);else ve="";Pt.invalid_feedback=yt?ve:"",Ct.invalid_feedback=yt?ve:"";var Ht=this.mask_parse(Ye,Pt);Ct.row_field=Ht,kt.row_field=Ht;var Jt=this.mask_parse(Ee,Ct);kt.row_label=Jt,ct+=this.mask_parse($e,kt),Oe++}}}if(""!=qe){var Zt=qe,Gt={group:ct,attributes:""};"grid"==ge&&""!=we&&(Gt.attributes=' class="'+this.esc_attr(we)+'"'),!ot&&f&&!1!==S&&-1!==x.indexOf("#attributes")&&(-1===qe.indexOf(" role=")&&(Gt.attributes=this.attribute_modify(Gt.attributes,"role",S)),Gt.attributes=this.attribute_modify(Gt.attributes,"aria-labelledby",this.form_id_prefix+"label-"+t.id+l)),ot&&!1!==S&&(Zt=(Zt=Zt.replace(/\srole=(["'])(?:radio)?group\1/g,"")).replace(/\srole=(?:radio)?group(?=[\s>])/g,"")),ct=this.mask_parse(Zt,Gt)}!1!==Ce&&ot?(st.group=ct,Fe+=this.mask_parse(Ce,st)):Fe+=ct}}}if(V.datalist=Oe>0?Fe:"",b.length>0){Tt=[];if(void 0!==st&&void 0!==st.group_id&&Oe>0&&(Tt.list=st.group_id),""===this.strip_html(this.get_object_meta_value(t,"aria_label",!1,!1,!0))){var Bt=this.strip_html(t.label);f&&-1!==x.indexOf("#attributes")&&Bt===t.label?Tt.aria_labelledby=this.form_id_prefix+"label-"+t.id+l:Tt.aria_label=Bt}_e&&(Tt.aria_describedby=se),!1!==(Y=this.get_field_value_fallback(t.type,m,"class_field",!1,!1,h))&&(Tt.class=Y.join(" ")),""!=A&&(Tt.class+=" "+A.trim()),""!=(be=this.get_attributes(t,b,Tt,i)).attributes&&(V.attributes+=" "+be.attributes)}if(Se.length>0){Tt=[];var Qt=this.get_field_value_fallback(t.type,m,"class_field_label",!1,!1,h);!1!==Qt&&(Tt.class=Qt.join(" ")),""!=(be=this.get_attributes(t,Se,Tt,i)).attributes&&(ie.attributes+=" "+be.attributes)}if(oe.help_append_separator=_e?this.mask_parse(O,oe):"",""!=W){oe.text_clear=this.get_object_meta_value(t,"text_clear",""),""==oe.text_clear&&(oe.text_clear=this.language("clear")),oe.text_reset=this.get_object_meta_value(t,"text_reset",""),""==oe.text_reset&&(oe.text_reset=this.language("reset"));var Kt=this.mask_parse(W,oe)}else Kt="";oe.help_append=Kt,oe.attributes="";var Vt=_e||""!=Kt?this.mask_parse(F,oe):"";V.pre_help=ie.pre_help="bottom"==ne?"":Vt,V.post_help=ie.post_help="bottom"==ne?Vt:"",V.help=Vt,ie.help=Vt,""!=V.attributes&&(V.attributes=" "+V.attributes.trim()),""!=ie.attributes&&(ie.attributes=" "+ie.attributes.trim());var Xt=this.mask_parse(x,ie);if(""!=Xt&&!g){var ea=this.get_field_value_fallback(t.type,m,"mask_field_label_wrapper",!1,!1,h);if(!1!==ea){var ta={label:Xt};Xt=this.mask_parse(ea,ta)}}var aa=-1!==x.indexOf("#field");switch(m){case"inside":case"bottom":V.pre_label="",V.post_label=aa?V.label:Xt;break;case"top":V.pre_label=aa?V.label:Xt,V.post_label="";break;default:V.pre_label="",V.post_label="",ie.pre_label="",ie.post_label=""}if(""!==$||""!==z){var ra=e.extend(!0,{},V);ra.invalid_feedback=V.invalid_feedback,ra.pre_help=V.pre_help,ra.post_help=V.post_help,ra.pre_label=V.pre_label,ra.post_label=V.post_label,V.invalid_feedback="",V.pre_help="",V.post_help="",V.pre_label="",V.post_label="",ra.help=V.help,V.help=""}var ia=this.mask_parse(k,V);if(""!==$||""!==z){var sa=this.get_field_value_fallback(t.type,m,"col_small_prepend_factor",!1,!1,h),_a=this.get_field_value_fallback(t.type,m,"col_small_append_factor",!1,!1,h);if(!1!==sa&&!1!==_a){var oa=""!==$?Math.round(G*sa,0):0;ra.col_small_prepend=oa;var la=""!==z?Math.round(G*_a,0):0;ra.col_small_append=la,ra.col_small_field=G-(oa+la)}ra.field=ia;var na=this.get_field_value_fallback(t.type,m,"mask_field_input_group_field","#field",!1,h);if(""!==na&&(ia=this.mask_parse(na,ra)),""!==$){ra.prepend=$;var ca=this.get_field_value_fallback(t.type,m,"mask_field_input_group_prepend","#prepend",!1,h);if(""!==ca)ia=this.mask_parse(ca,ra)+ia}if(""!==z){ra.append=z;var da=this.get_field_value_fallback(t.type,m,"mask_field_input_group_append","#append",!1,h);if(""!==da)ia+=this.mask_parse(da,ra)}var pa=this.get_field_value_fallback(t.type,m,"mask_field_input_group","#field",!1,h),ua=[];""!==$&&ua.push("wsf-input-group-has-prepend"),""!==z&&ua.push("wsf-input-group-has-append");var fa=ua.join(" ");fa&&(fa=" "+fa),ra.css_input_group=fa,ra.field=ia,ia=this.mask_parse(pa,ra)}
1if(aa&&(ie.field=ia,Xt=this.mask_parse(x,ie),ia="",ie.field=""),-1!==k.indexOf("#label")&&(V.label=Xt,ia=this.mask_parse(k,V),Xt="",V.label=""),""!=ia&&!g){var ha=this.get_field_value_fallback(t.type,m,"mask_field_wrapper",!1,!1,h);if(!1!==ha){var ma={field:ia};ia=this.mask_parse(ha,ma)}}switch(m){case"right":ia+=Xt;break;case"left":ia=Xt+ia;break;default:aa&&(ia=Xt)}return V.field=ia,this.mask_parse(y,V)},e.WS_Form.prototype.attribute_modify=function(t,a,r,i){var s=this,_=!1,o="";return e("<div "+t+" />").each(function(){e.each(this.attributes,function(){if(this.specified){var e=this.name,t=this.value;e==a&&(i?t+=" "+r:t=r,t.trim(),_=!0),o+=" "+e,""!==t&&(o+='="'+s.esc_attr(t)+'"')}})}),_||(o+=" "+a,""!==r&&(o+='="'+this.esc_attr(r)+'"')),o},e.WS_Form.prototype.get_attributes=function(t,a,r,i){"object"!=typeof r&&(r=!1);var s=[],_=[];if(!1!==a)for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];if(void 0!==e.WS_Form.meta_keys[l]){var n=e.WS_Form.meta_keys[l];if(this.is_admin)var c=void 0!==n.mask?n.mask:"",d=void 0!==n.mask_disregard_on_empty&&n.mask_disregard_on_empty,p=void 0!==n.mask_disregard_on_zero&&n.mask_disregard_on_zero,u=void 0!==n.default?n.default:"";else c=void 0!==n.m?n.m:"",d=void 0!==n.e&&n.e,p=void 0!==n.z&&n.z,u=void 0!==n.d?n.d:"";if(!1!==r)if(void 0!==r[l])var f=r[l].trim();else f="";else{if(this.is_admin)var h=void 0!==n.key?n.key:l;else h=void 0!==n.k?n.k:l;var m=void 0!==n.c&&n.c;if(!1!==m){f=this.get_object_meta_value(t,h,u,!1,!1);f=this.parse_variables_process(f,i,!1,t,m).output}else f=this.get_object_meta_value(t,h,u,!1,!0);if(""==f&&void 0!==n.g){var v=n.g;void 0!==e.WS_Form.settings_plugin[v]&&e.WS_Form.settings_plugin[v]&&(f=e.WS_Form.settings_plugin[v])}_[h]=f}(this.is_admin?void 0!==n.strip_tags&&n.strip_tags:void 0!==n.s&&n.s)&&(f=this.strip_html(f)),f=this.esc_attr(f);var b=this.mask_parse(c,{value:f});(d&&""!=f||!d)&&(p&&0!=parseInt(f,10)||!p)&&(s.push(b),delete a[o])}}return a=this.array_remove_empty(a),{attributes:s.join(" "),mask_attributes:a,attribute_values:_}},e.WS_Form.prototype.get_number=function(t,a,r,i){if(void 0===a&&(a=0),void 0===r&&(r=!0),void 0===i&&(i=!1),"number"==typeof t&&(t=t.toString()),"string"!=typeof t)return 0;(t=t.trim()).includes(ws_form_settings.currency_symbol)&&(r=!0);var s=e.WS_Form.settings_plugin.price_decimal_separator;if(r){var _=e.WS_Form.settings_plugin.price_thousand_separator,o=ws_form_settings.currency_symbol;t.includes("&")&&(t=this.parse_html_entities(t)),t=t.replace(o,"");var l=new RegExp("[^0-9-"+s+"]","g");if(t=t.replace(l,""),""!==s&&""!==_&&s===_){if(t.slice(-3,-2)===s){var n=t.length-3;t=t.substring(0,n)+"[dec]"+t.substring(n+1)}t=(t=t.replace(_,"")).replace("[dec]",".")}else""!==s&&(t=t.replace(s,"."))}else""!==s&&(t=t.replace(s,"."));var c=""===t.trim()?a:isNaN(t)?a:parseFloat(t);return!1!==i&&(c=this.get_number_rounded(parseFloat(c),i)),c},e.WS_Form.prototype.get_number_rounded=function(e,t){return Number(Math.round(e+"e"+t)+"e-"+t)},e.WS_Form.prototype.get_number_to_step=function(e,t){if(isNaN(t))return e;t||(t=1);var a=1/t;return Math.round(e*a)/a},e.WS_Form.prototype.get_float=function(e,t){return void 0===t&&(t=0),"number"==typeof e&&(e=e.toString()),"string"!=typeof e?0:(e=e.trim(),parseFloat(e))},e.WS_Form.prototype.get_currency=function(){var t={},a=parseInt(e.WS_Form.settings_plugin.price_decimals,10);switch(t.prefix=ws_form_settings.currency_symbol,t.suffix="",e.WS_Form.settings_plugin.currency_position){case"right":t.prefix="",t.suffix=ws_form_settings.currency_symbol;break;case"left_space":t.prefix=ws_form_settings.currency_symbol+" ";break;case"right_space":t.prefix="",t.suffix=" "+ws_form_settings.currency_symbol}return t.decimals=a<0?0:a,t.decimal_separator=e.WS_Form.settings_plugin.price_decimal_separator||".",t.thousand_separator=e.WS_Form.settings_plugin.price_thousand_separator,t},e.WS_Form.prototype.get_price=function(e,t,a){return"number"!=typeof e&&(e=parseFloat(e)),void 0===t&&(t=this.get_currency()),void 0===a&&(a=!0),(a?t.prefix:"")+this.replace_all(this.replace_all(e.toFixed(t.decimals).replace(/\B(?=(\d{3}
1)+(?!\d))/g,"[thousand]"),".",t.decimal_separator),"[thousand]",t.thousand_separator)+(a?t.suffix:"")},e.WS_Form.prototype.get_slug=function(e){return(e=this.parse_html_entities(e.toString())).toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-")},e.WS_Form.prototype.parse_html_entities=function(e){var t={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ",copy:"©",reg:"®",euro:"€",cent:"¢",pound:"£",yen:"¥",hellip:"…"};return e=(e=e.replace(/&#([0-9]{1,5});/g,function(e,t){var a=parseInt(t,10);return String.fromCharCode(a)})).replace(/&([a-z]+);/gi,function(e,a){return t[a.toLowerCase()]||"&"+a+";"})},e.WS_Form.prototype.form_add_hidden_input=function(t,a,r,i,s,_){var o=e('input[name="'+this.esc_selector(t)+'"]',this.form_canvas_obj);o.length&&-1===t.indexOf("[]")?o.val(a):(void 0===a&&(a=""),void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===s&&(s=!1),void 0===_&&(_="hidden"),this.form_canvas_obj.append('<input type="'+this.esc_attr(_)+'" name="'+this.esc_attr(t)+'" value='+(s?"'":'"')+this.esc_attr(a)+(s?"'":'"')+(!1!==r?' id="'+this.esc_attr(r)+'"':"")+(!1!==i?" "+i:"")+" />"))},e.WS_Form.prototype.get_part_id=function(e,t,a){void 0===t&&(t=!1),void 0===a&&(a="field");var r=!1!==t?"-repeat-"+t:"";return this.form_id_prefix+a+"-"+e+r},e.WS_Form.prototype.get_field_name=function(e,t,a){void 0===t&&(t=!1),void 0===a&&(a=!1);return this.field_name_prefix+e+(!1!==t?a?"_"+t:"["+t+"]":"")},e.WS_Form.prototype.is_iterable=function(e){return null!=e&&("object"==typeof e&&"function"==typeof e[Symbol.iterator])},e.WS_Form.prototype.is_integer=function(e){return!isNaN(e)&&/^\d+\.?\d*$/.test(e)},e.WS_Form.prototype.is_invalid=function(e){return!e[0]||!e[0].validity||!e[0].validity.valid},e.WS_Form.prototype.is_valid=function(e){return!(!e[0]||!e[0].validity)&&e[0].validity.valid},e.WS_Form.prototype.is_not_number=function(e){return isNaN(e)||"boolean"==typeof e||""===e},e.WS_Form.prototype.is_true=function(e){if("boolean"==typeof e)return e;if("object"==typeof e&&null!==e&&(e=Array.isArray(e)?void 0!==e[0]?e[0]:"":Object.values(e)[0]||""),"number"==typeof e&&(e=String(e)),"string"!=typeof e)return!1;e=e.trim().toLowerCase();return["1","on","yes","true"].includes(e)},e.WS_Form.prototype.replace_all=function(e,t,a){return void 0===a?e.toString():e.split(t).join(a)},e.WS_Form.prototype.array_remove_empty=function(e){if("object"!=typeof e)return e;var t=[];for(var a in e)e.hasOwnProperty(a)&&null!==e[a]&&t.push(e[a]);return t},e.WS_Form.prototype.attribute_add_item=function(e,t,a){var r=e.attr(t);void 0!==r?-1===r.indexOf(a)&&e.attr(t,this.esc_attr(a)+(r?" ":"")+r):e.attr(t,this.esc_attr(a))},e.WS_Form.prototype.attribute_remove_item=function(e,t,a){var r=e.attr(t);if(void 0!==r&&-1!==r.indexOf(a)){var i=r.split(" "),s=this;(r=(i=i.filter(function(e){return e!==s.esc_attr(a)})).join(" "))?e.attr(t,r):e.removeAttr(t)}},e.WS_Form.prototype.get_date=function(e,t,a,r){switch(t||(t="date"),a||(a=ws_form_settings.date_format),r||(r=ws_form_settings.time_format),t){case"time":return new Date("01/01/1970 "+e);case"date":e+=" 00:00:00";break;case"week":case"month":return!1}var i=!1;switch(a){case"d/m/Y":i="/";break;case"d.m.Y":case"j.n.Y":i=".";break;case"d-m-Y":i="-"}if(!1!==i){switch(t){case"datetime-local":var s=e.indexOf(" "),_=e.substring(0,s),o=e.substring(s);break;default:_=e,o=""}var l=_.split(i);if(3===l.length){var n=parseInt(l[0],10);_=parseInt(l[1],10)+"/"+n+"/"+parseInt(l[2],10)}e=_+o}return e=e.replace(/(\d+)(st|nd|rd|th)/g,"$1"),e=this.replace_all(e,"."," "),-1!==r.indexOf(" \\h ")&&(e=e.replace(/\b(\d{1,2})\s*h\s*(\d{1,2})\b/gi,"$1:$2")),e=this.replace_all(e,"  "," "),this.get_new_date(e)},e.WS_Form.prototype.get_new_date=function(e){return"-"!=e.charAt(4)||"-"!=e.charAt(7)||"T"==e.charAt(10)||":"!=e.charAt(13)||this.date_valid(e)||(e=e.replace(/-/g,"/")),"-"!=e.charAt(4)||this.date_valid(e)||-1===e.toLowerCase().indexOf("am")&&-1===e.toLowerCase().indexOf("pm")||(e=e.replace(/-/g,"/")),new Date(e)},e.WS_Form.prototype.date_valid=function(e){return e instanceof Date&&!isNaN(e.valueOf())},e.WS_Form.prototype.get_object_row_id=function(e){var t=e.object_row_id;return void 0!==t&&""!=t&&("object"==typeof t?(t=t.map(function(e){return parseInt(e,10)})).length||(t=!1):t=""!==t&&[parseInt(t,10)],t)}
1,e.WS_Form.prototype.get_date_by_type=function(e,t){if(!e)return"";var a=this.get_object_meta_value(t,"format_date",ws_form_settings.date_format);a||(a=ws_form_settings.date_format);var r=this.get_object_meta_value(t,"format_time",ws_form_settings.time_format);r||(r=ws_form_settings.time_format);var i=this.get_object_meta_value(t,"input_type_datetime","date");switch(i){case"datetime-local":case"date":switch(a){case"d/m/Y":var s=-1!==e.indexOf(" ")?[e.substring(0,e.indexOf(" ")),e.substring(e.indexOf(" ")+1)]:[e];e=(_=s[0].split("/"))[1]+"/"+_[0]+"/"+_[2]+(void 0!==s[1]?" "+s[1]:"");break;case"d-m-Y":s=-1!==e.indexOf(" ")?[e.substring(0,e.indexOf(" ")),e.substring(e.indexOf(" ")+1)]:[e];e=(_=s.split("-"))[1]+"/"+_[0]+"/"+_[2]+(void 0!==s[1]?" "+s[1]:"");break;case"d.m.Y":case"j.n.Y":var _;s=-1!==e.indexOf(" ")?[e.substring(0,e.indexOf(" ")),e.substring(e.indexOf(" ")+1)]:[e];e=(_=s[0].split("."))[1]+"/"+_[0]+"/"+_[2]+(void 0!==s[1]?" "+s[1]:"")}}switch("time"!==i&&4===e.indexOf("-")&&-1===e.indexOf(":")&&(e+=" 00:00:00"),i){case"date":return e=this.get_new_date(e),this.date_format(e,a);case"month":return e=this.get_new_date(e),this.date_format(e,"F Y");case"time":return e=this.get_new_date("1970-01-01 "+e),this.date_format(e,r);case"week":return e=this.get_new_date(e),this.language("week")+" "+this.date_format(e,"W, Y");default:return e=this.get_new_date(e),this.date_format(e,a+" "+r)}},e.WS_Form.prototype.number_format=function(e,t,a,r){if(void 0===e||null==e||!isFinite(e))return 0;if(!t){var i=e.toString().split(".").length;t=i>1?i:0}void 0===a&&(a="."),void 0===r&&(r=","),(t<0||t>100)&&(t=0);var s=(e=(e=parseFloat(e).toFixed(t)).replace(".",a)).split(a);return s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,r),e=s.join(a)},e.WS_Form.prototype.get_full_name_components=function(t){if("string"!=typeof t)return{name_prefix:"",first_name:"",name_middle:"",name_last:"",suffix:""};var a=t.trim().split(/\s+/),r="",i="",s="",_="",o="",l=e.WS_Form.settings_form.name.prefixes;"object"!=typeof l&&(l=[]),a.length&&l.includes(a[0].toLowerCase().replace(/\./g,""))&&(r=a.shift());var n=e.WS_Form.settings_form.name.suffixes;return"object"!=typeof n&&(l=[]),a.length>1&&n.includes(a[a.length-1].toLowerCase().replace(/\./g,""))&&(i=a.pop()),1===a.length?s=a[0]:2===a.length?(s=a[0],o=a[1]):a.length>2&&(s=a[0],o=a[a.length-1],_=a.slice(1,-1).join(" ")),{name_prefix:r,name_first:s,name_middle:_,name_last:o,name_suffix:i}},e.WS_Form.prototype.date_format=function(e,t){var a=this,r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],i=["January","February","March","April","May","June","July","August","September","October","November","December"],s=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],_=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o={d:function(){var e=this.getDate();return(e<10?"0":"")+e},D:function(){return s[this.getDay()]},j:function(){return this.getDate()},l:function(){return _[this.getDay()]},N:function(){var e=this.getDay();return 0===e?7:e},S:function(){var e=this.getDate();return e%10==1&&11!==e?"st":e%10==2&&12!==e?"nd":e%10==3&&13!==e?"rd":"th"},w:function(){return this.getDay()},z:function(){var e=new Date(this.getFullYear(),0,1);return Math.ceil((this-e)/864e5)},W:function(){var e=new Date(this.valueOf()),t=(this.getDay()+6)%7;e.setDate(e.getDate()-t+3);var a=e.valueOf();e.setMonth(0,1),4!==e.getDay()&&e.setMonth(0,1+(4-e.getDay()+7)%7);var r=1+Math.ceil((a-e)/6048e5);return r<10?"0"+r:r},F:function(){return i[this.getMonth()]},m:function(){var e=this.getMonth();return(e<9?"0":"")+(e+1)},M:function(){return r[this.getMonth()]},n:function(){return this.getMonth()+1},t:function(){var e=this.getFullYear(),t=this.getMonth()+1;return 12===t&&(e=e++,t=0),new Date(e,t,0).getDate()},L:function(){var e=this.getFullYear();return e%400==0||e%100!=0&&e%4==0},o:function(){var e=new Date(this.valueOf());return e.setDate(e.getDate()-(this.getDay()+6)%7+3),e.getFullYear()},Y:function(){return this.getFullYear()},y:function(){return(""+this.getFullYear()).slice(2)},a:function(){return this.getHours()<12?"am":"pm"},A:function(){return this.getHours()<12?"AM":"PM"},B:function(){return Math.floor(1e3*((this.getUTCHours()+1)%24+this.getUTCMinutes()/60+this.getUTCSeconds()/3600)/24)},g:function(){return this.getHours()%12||12},G:function(){return this.getHours()},h:function(){var e=this.getHours();return((e%12||12)<10?"0":"")+(e%12||12)},H:function(){var e=this.getHours();return(e<10?"0":"")+e},i:function(){var e=this.getMinutes();return(e<10?"0":"")+e},s:function(){var e=this.getSeconds();return(e<10?"0":"")+e},v:function(){var e=this.getMilliseconds();return(e<10?"00":e<100?"0":"")+e},e:function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},I:function(){for(var e=null,t=0;t<12;++t){var a=new Date(this.getFullYear(),t,1).getTimezoneOffset();if(null===e)e=a;else{if(a<e){e=a;break}if(a>e)break}}return this.getTimezoneOffset()===e|0},O:function(){var e=this.getTimezoneOffset();return(-e<0?"-":"+")+(Math.abs(e/60)<10?"0":"")+Math.floor(Math.abs(e/60))+(0===Math.abs(e%60)?"00":(Math.abs(e%60)<10?"0":"")+Math.abs(e%60))},P:function(){var e=this.getTimezoneOffset();return(-e<0?"-":"+")+(Math.abs(e/60)<10?"0":"")+Math.floor(Math.abs(e/60))+":"+(0===Math.abs(e%60)?"00":(Math.abs(e%60)<10?"0":"")+Math.abs(e%60))},T:function(){var e=this.toLocaleTimeString(navigator.language,{timeZoneName:"short"}).split(" ");return e[e.length-1]},Z:function(){return 60*-this.getTimezoneOffset()},c:function(){return a.date_format(e,"Y-m-d\\TH:i:sP")},r:function(){return this.toString()},U:function(){return Math.floor(this.getTime()/1e3)}};return t.replace(/(\\?)(.)/g,function(t,a,r){return""===a&&o[r]?o[r].call(e):r})}}(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.