{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./js/scripts_es6.js","webpack:///./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack:///./node_modules/@babel/runtime/regenerator/index.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///(webpack)/buildin/module.js"],"names":["cf7signature_resized","wpcf7cf_timeout","wpcf7cf_change_time_ms","window","wpcf7cf_running_tests","jQuery","each","e","$input","opt","JSON","parse","val","settings","animation_intime","animation_outtime","stringify","wpcf7cf_show_animation","wpcf7cf_hide_animation","wpcf7cf_show_step_animation","wpcf7cf_hide_step_animation","wpcf7cf_change_events","wpcf7cf_forms","wpcf7cf_dom","wpcf7cf_reload_dom","$form","wpcf7cf","get_simplified_dom_model","wpcf7cf_getFieldsByOriginalName","originalName","Object","values","filter","inputField","original_name","wpcf7cf_getFieldByName","name","String","prototype","endsWith","search","this_len","undefined","length","substring","Wpcf7cfForm","options_element","find","eq","form","form_options","$input_hidden_group_fields","$input_hidden_groups","$input_visible_groups","$input_repeaters","$input_steps","unit_tag","closest","attr","conditions","get","selector","i","condition","and_rules","if_field","if_value","operator","initial_conditions","$groups","repeaters","multistep","fields","parseInt","animation","updateGroups","updateEventListeners","displayFields","on","data","setTimeout","resetRepeaters","moveToStep","push","Wpcf7cfRepeater","map","item","params","$repeater","id","$multistep","Wpcf7cfMultistep","forEach","repeater","updateSubs","initial_subs","wpcf7cf_conditions","wpcf7cf_settings","signatures","constructor","Array","canvas","width","$sig_canvas","$sig_wrap","height","addClass","show_group","should_group_be_shown","then_field","removeClass","index","$group","is","finish","css","hasClass","prop","show","trigger","animate","$inputs","not","$this","defaultValue","defaultChecked","selected","defaultSelected","$select","change","hide","updateHiddenFields","updateSummaryFields","$summary","fd","FormData","formdata","serializeArray","key","input","append","value","el","files","file","fieldName","Blob","ajax","url","wpcf7cf_global_settings","ajaxurl","type","processData","contentType","dataType","success","json","html","summaryHtml","hidden_fields","hidden_groups","visible_groups","get_nested_conditions","off","clearTimeout","text","$","num_subs","orig_id","min","max","$repeater_sub","children","$repeater_controls","$repeater_sub_clone","clone","addBack","prev_suffix","new_suffix","prev_name","new_name","getNewName","orig_name","replace","prev_data_id","orig_data_id","new_data_id","prev_id","new_id","prev_for","orig_for","new_for","repeater_sub_html","outerHTML","$repeater_count_field","$button_add","$button_remove","remove","previousName","prev_parts","split","prev_suff","splice","join","newName","subs_to_show","subs_to_add","removeSubs","addSubs","showButtonRemove","showButtonAdd","html_str","sub_suffix","RegExp","$html","insertBefore","updateMultistepState","cf7mdInit","slice","duration","done","$steps","$btn_next","$btn_prev","$dots","currentStep","numSteps","validateStep","result","stopImmediatePropagation","document","ajaxComplete","xhr","hasOwnProperty","responseJSON","status","into","step_index","Promise","resolve","checkError","invalid_fields","controlWrap","reason","parent","message","fail","always","previousStep","formEl","topOffset","getBoundingClientRect","top","scrollIntoView","behavior","getFieldsInStep","inStep","initForm","$forms","some","$current_form","groups","sub_conditions","g","relevant_conditions","and_rule","suffix","concat","currentNode","ni","createNodeIterator","NodeFilter","SHOW_ELEMENT","simplified_dom","nextNode","classList","contains","dataset","className","hasAttribute","getAttribute","original_name_length","checked","multiple","options","o","stepsData","fieldsInCurrentStep","$submit_button","$ajax_loader","detach","appendTo","step","and_rule_i","condition_ok","condition_and_rule","if_val","$field","isConditionTrue","testValue","isArray","valuesAreEmpty","every","v","testValueNumber","isFinite","parseFloat","NaN","regex_patt","isValidRegex","valueNumber","valsAreNumbers","isNaN","test","ready","f","old_wpcf7ExclusiveCheckbox","fn","wpcf7ExclusiveCheckbox","asyncGeneratorStep","gen","reject","_next","_throw","arg","info","error","then","_asyncToGenerator","self","args","arguments","apply","err","module","exports","require","runtime","Op","hasOwn","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","makeInvokeMethod","tryCatch","obj","call","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","displayName","defineIteratorMethods","method","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","__await","AsyncIterator","PromiseImpl","invoke","record","unwrapped","previousPromise","enqueue","callInvokeWithMethodAndArg","async","iter","next","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","nextLoc","toString","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","keys","object","reverse","pop","iterable","iteratorMethod","skipTempReset","prev","charAt","stop","rootEntry","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function","webpackPolyfill","deprecate","paths","defineProperty","enumerable","l"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFA;AAAA;AAAA;AAAA;AAAA;AAAa;;;;AAEb,IAAIA,oBAAoB,GAAG,CAA3B,C,CAA8B;;AAE9B,IAAIC,eAAJ;AACA,I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AOkR,MAAM,CAACuH,CAAd;AACA;AAJsC,KAAxC;AAMAva,UAAM,CAACqa,cAAP,CAAsBrH,MAAtB,EAA8B,IAA9B,EAAoC;AACnCsH,gBAAU,EAAE,IADuB;AAEnCxY,SAAG,EAAE,eAAW;AACf,eAAOkR,MAAM,CAAChR,CAAd;AACA;AAJkC,KAApC;AAMAgR,UAAM,CAACkH,eAAP,GAAyB,CAAzB;AACA;;AACD,SAAOlH,MAAP;AACA,CArBD,C","file":"scripts.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./js/scripts_es6.js\");\n","\"use strict\";\n\nvar cf7signature_resized = 0; // for compatibility with contact-form-7-signature-addon\n\nvar wpcf7cf_timeout;\nvar wpcf7cf_change_time_ms = 100;\n\nif (window.wpcf7cf_running_tests) {\n jQuery('input[name=\"_wpcf7cf_options\"]').each(function(e) {\n var $input = jQuery(this);\n var opt = JSON.parse($input.val());\n opt.settings.animation_intime = 0;\n opt.settings.animation_outtime = 0;\n $input.val(JSON.stringify(opt));\n });\n wpcf7cf_change_time_ms = 0;\n}\n\nvar wpcf7cf_show_animation = { \"height\": \"show\", \"marginTop\": \"show\", \"marginBottom\": \"show\", \"paddingTop\": \"show\", \"paddingBottom\": \"show\" };\nvar wpcf7cf_hide_animation = { \"height\": \"hide\", \"marginTop\": \"hide\", \"marginBottom\": \"hide\", \"paddingTop\": \"hide\", \"paddingBottom\": \"hide\" };\n\nvar wpcf7cf_show_step_animation = { \"opacity\": \"show\" };\nvar wpcf7cf_hide_step_animation = { \"opacity\": \"hide\" };\n\nvar wpcf7cf_change_events = 'input.wpcf7cf paste.wpcf7cf change.wpcf7cf click.wpcf7cf propertychange.wpcf7cf';\n\nvar wpcf7cf_forms = [];\n\nwindow.wpcf7cf_dom = {};\n\nconst wpcf7cf_reload_dom = function($form) {\n wpcf7cf_dom = wpcf7cf.get_simplified_dom_model($form);\n}\n\nconst wpcf7cf_getFieldsByOriginalName = function(originalName) {\n return Object.values(wpcf7cf_dom).filter(function (inputField) {\n return inputField.original_name === originalName || inputField.original_name === originalName+'[]';\n });\n}\n\nconst wpcf7cf_getFieldByName = function(name) {\n return wpcf7cf_dom[name] || wpcf7cf_dom[name+'[]'];\n}\n\n// endsWith polyfill\nif (!String.prototype.endsWith) {\n\tString.prototype.endsWith = function(search, this_len) {\n\t\tif (this_len === undefined || this_len > this.length) {\n\t\t\tthis_len = this.length;\n\t\t}\n\t\treturn this.substring(this_len - search.length, this_len) === search;\n\t};\n}\n\nvar Wpcf7cfForm = function($form) {\n\n var options_element = $form.find('input[name=\"_wpcf7cf_options\"]').eq(0);\n if (!options_element.length || !options_element.val()) {\n // doesn't look like a CF7 form created with conditional fields plugin enabled.\n return false;\n }\n\n var form = this;\n\n var form_options = JSON.parse(options_element.val());\n\n form.$form = $form;\n form.$input_hidden_group_fields = $form.find('[name=\"_wpcf7cf_hidden_group_fields\"]');\n form.$input_hidden_groups = $form.find('[name=\"_wpcf7cf_hidden_groups\"]');\n form.$input_visible_groups = $form.find('[name=\"_wpcf7cf_visible_groups\"]');\n form.$input_repeaters = $form.find('[name=\"_wpcf7cf_repeaters\"]');\n form.$input_steps = $form.find('[name=\"_wpcf7cf_steps\"]');\n\n form.unit_tag = $form.closest('.wpcf7').attr('id');\n form.conditions = form_options['conditions'];\n\n // Wrapper around jQuery(selector, form.$form)\n form.get = function (selector) {\n // TODO: implement some caching here.\n return jQuery(selector, form.$form);\n }\n\n // compatibility with conditional forms created with older versions of the plugin ( < 1.4 )\n for (var i=0; i < form.conditions.length; i++) {\n var condition = form.conditions[i];\n if (!('and_rules' in condition)) {\n condition.and_rules = [{'if_field':condition.if_field,'if_value':condition.if_value,'operator':condition.operator}];\n }\n }\n\n form.initial_conditions = form.conditions;\n form.settings = form_options['settings'];\n\n form.$groups = jQuery(); // empty jQuery set\n form.repeaters = [];\n form.multistep = null;\n form.fields = [];\n\n form.settings.animation_intime = parseInt(form.settings.animation_intime);\n form.settings.animation_outtime = parseInt(form.settings.animation_outtime);\n\n if (form.settings.animation === 'no') {\n form.settings.animation_intime = 0;\n form.settings.animation_outtime = 0;\n }\n\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n\n // bring form in initial state if the reset event is fired on it.\n form.$form.on('reset.wpcf7cf', form, function(e) {\n var form = e.data;\n setTimeout(function(){\n form.displayFields();\n form.resetRepeaters();\n if (form.multistep != null) {\n form.multistep.moveToStep(1); \n }\n },200);\n });\n\n // PRO ONLY\n\n form.get('.wpcf7cf_repeater:not(.wpcf7cf_repeater .wpcf7cf_repeater)').each(function(){\n form.repeaters.push(new Wpcf7cfRepeater(jQuery(this),form));\n });\n\n form.$input_repeaters.val(JSON.stringify(form.repeaters.map((item)=>item.params.$repeater.id)));\n\n var $multistep = form.get('.wpcf7cf_multistep');\n\n if ($multistep.length) {\n form.multistep = new Wpcf7cfMultistep($multistep, form);\n // window.wpcf7cf.updateMultistepState(form.multistep);\n }\n\n // END PRO ONLY\n\n}\n\n/**\n * reset initial number of subs for each repeater.\n * (does not clear values)\n */\nWpcf7cfForm.prototype.resetRepeaters = function() {\n var form = this;\n form.repeaters.forEach(repeater => {\n repeater.updateSubs( repeater.params.$repeater.initial_subs );\n });\n}\n\nWpcf7cfForm.prototype.displayFields = function() {\n\n var form = this;\n\n var wpcf7cf_conditions = this.conditions;\n var wpcf7cf_settings = this.settings;\n\n //for compatibility with contact-form-7-signature-addon\n if (cf7signature_resized === 0 && typeof signatures !== 'undefined' && signatures.constructor === Array && signatures.length > 0 ) {\n for (var i = 0; i < signatures.length; i++) {\n if (signatures[i].canvas.width === 0) {\n\n var $sig_canvas = jQuery(\".wpcf7-form-control-signature-body>canvas\");\n var $sig_wrap = jQuery(\".wpcf7-form-control-signature-wrap\");\n $sig_canvas.eq(i).attr('width', $sig_wrap.width());\n $sig_canvas.eq(i).attr('height', $sig_wrap.height());\n\n cf7signature_resized = 1;\n }\n }\n }\n\n form.$groups.addClass('wpcf7cf-hidden');\n\n wpcf7cf_reload_dom(form.$form);\n\n for (var i=0; i < wpcf7cf_conditions.length; i++) {\n\n var condition = wpcf7cf_conditions[i];\n\n var show_group = window.wpcf7cf.should_group_be_shown(condition, form);\n\n if (show_group) {\n form.get('[data-id=\"'+condition.then_field+'\"]').removeClass('wpcf7cf-hidden');\n }\n }\n\n\n var animation_intime = wpcf7cf_settings.animation_intime;\n var animation_outtime = wpcf7cf_settings.animation_outtime;\n\n form.$groups.each(function (index) {\n var $group = jQuery(this);\n if ($group.is(':animated')) $group.finish(); // stop any current animations on the group\n if ($group.css('display') === 'none' && !$group.hasClass('wpcf7cf-hidden')) {\n if ($group.prop('tagName') === 'SPAN') {\n $group.show().trigger('wpcf7cf_show_group');\n } else {\n $group.animate(wpcf7cf_show_animation, animation_intime).trigger('wpcf7cf_show_group'); // show\n }\n } else if ($group.css('display') !== 'none' && $group.hasClass('wpcf7cf-hidden')) {\n\n if ($group.attr('data-clear_on_hide') !== undefined) {\n var $inputs = jQuery(':input', $group).not(':button, :submit, :reset, :hidden');\n\n $inputs.each(function(){\n var $this = jQuery(this);\n $this.val(this.defaultValue);\n $this.prop('checked', this.defaultChecked);\n });\n\n jQuery('option', $group).each(function() {\n this.selected = this.defaultSelected;\n });\n\n jQuery('select', $group).each(function() {\n const $select = jQuery(this);\n if ($select.val() === null) {\n $select.val(jQuery(\"option:first\",$select).val());\n }\n });\n\n $inputs.change();\n //display_fields();\n }\n\n if ($group.prop('tagName') === 'SPAN') {\n $group.hide().trigger('wpcf7cf_hide_group');\n } else {\n $group.animate(wpcf7cf_hide_animation, animation_outtime).trigger('wpcf7cf_hide_group'); // hide\n }\n\n }\n });\n\n form.updateHiddenFields();\n form.updateSummaryFields();\n};\n\nWpcf7cfForm.prototype.updateSummaryFields = function() {\n const form = this;\n var $summary = form.get('.wpcf7cf-summary');\n\n if ($summary.length == 0 || !$summary.is(':visible')) return;\n\n var fd = new FormData();\n\n var formdata = form.$form.serializeArray();\n jQuery.each(formdata,function(key, input){\n fd.append(input.name, input.value);\n });\n\n // Make sure to add file fields to FormData\n jQuery.each(form.$form.find('input[type=\"file\"]'), function(index, el) {\n if (! el.files.length) return false;\n const file = el.files[0];\n const fieldName = el.name;\n fd.append(fieldName, new Blob() ,file.name);\n });\n\n // add file fields to form-data\n\n jQuery.ajax({\n url: wpcf7cf_global_settings.ajaxurl + '?action=wpcf7cf_get_summary',\n type: 'POST',\n data: fd,\n processData: false,\n contentType: false,\n dataType: 'json',\n success: function(json) {\n $summary.html(json.summaryHtml);\n }\n });\n};\n\nWpcf7cfForm.prototype.updateHiddenFields = function() {\n\n var form = this;\n\n var hidden_fields = [];\n var hidden_groups = [];\n var visible_groups = [];\n\n form.$groups.each(function () {\n var $this = jQuery(this);\n if ($this.hasClass('wpcf7cf-hidden')) {\n hidden_groups.push($this.data('id'));\n $this.find('input,select,textarea').each(function () {\n hidden_fields.push(jQuery(this).attr('name'));\n });\n } else {\n visible_groups.push($this.data('id'));\n }\n });\n\n form.hidden_fields = hidden_fields;\n form.hidden_groups = hidden_groups;\n form.visible_groups = visible_groups;\n\n form.$input_hidden_group_fields.val(JSON.stringify(hidden_fields));\n form.$input_hidden_groups.val(JSON.stringify(hidden_groups));\n form.$input_visible_groups.val(JSON.stringify(visible_groups));\n\n return true;\n};\nWpcf7cfForm.prototype.updateGroups = function() {\n var form = this;\n form.$groups = form.$form.find('[data-class=\"wpcf7cf_group\"]');\n\n form.conditions = window.wpcf7cf.get_nested_conditions(form.initial_conditions, form.$form);\n\n};\nWpcf7cfForm.prototype.updateEventListeners = function() {\n\n var form = this;\n\n // monitor input changes, and call displayFields() if something has changed\n form.get('input, select, textarea, button').not('.wpcf7cf_add, .wpcf7cf_remove').off(wpcf7cf_change_events).on(wpcf7cf_change_events,form, function(e) {\n var form = e.data;\n clearTimeout(wpcf7cf_timeout);\n wpcf7cf_timeout = setTimeout(function() {\n form.displayFields();\n }, wpcf7cf_change_time_ms);\n });\n\n // PRO ONLY\n form.get('.wpcf7cf-togglebutton').off('click.toggle_wpcf7cf').on('click.toggle_wpcf7cf',function() {\n var $this = jQuery(this);\n if ($this.text() === $this.data('val-1')) {\n $this.text($this.data('val-2'));\n $this.val($this.data('val-2'));\n } else {\n $this.text($this.data('val-1'));\n $this.val($this.data('val-1'));\n }\n });\n // END PRO ONLY\n};\n\n// PRO ONLY\nfunction Wpcf7cfRepeater($repeater, form) {\n var $ = jQuery;\n\n var repeater = this;\n\n var wpcf7cf_settings = form.settings;\n\n repeater.form = form;\n\n $repeater.num_subs = 0;\n $repeater.id = $repeater.data('id');\n $repeater.orig_id = $repeater.data('orig_data_id');\n $repeater.min = typeof( $repeater.data('min')) !== 'undefined' ? parseInt($repeater.data('min')) : 1;\n $repeater.max = typeof( $repeater.data('max')) !== 'undefined' ? parseInt($repeater.data('max')) : 200;\n $repeater.initial_subs = typeof( $repeater.data('initial')) !== 'undefined' ? parseInt($repeater.data('initial')) : $repeater.min;\n if ($repeater.initial_subs > $repeater.max) $repeater.initial_subs = $repeater.max;\n var $repeater_sub = $repeater.children('.wpcf7cf_repeater_sub').eq(0);\n var $repeater_controls = $repeater.children('.wpcf7cf_repeater_controls').eq(0);\n\n var $repeater_sub_clone = $repeater_sub.clone();\n\n $repeater_sub_clone.find('.wpcf7cf_repeater_sub').addBack('.wpcf7cf_repeater_sub').each(function() {\n var $this = jQuery(this);\n var prev_suffix = $this.attr('data-repeater_sub_suffix');\n var new_suffix = prev_suffix+'__{{repeater_sub_suffix}}';\n $this.attr('data-repeater_sub_suffix', new_suffix);\n });\n\n $repeater_sub_clone.find('[name]').each(function() {\n var $this = jQuery(this);\n var prev_name = $this.attr('name');\n var new_name = repeater.getNewName(prev_name);\n\n var orig_name = $this.attr('data-orig_name') != null ? $this.attr('data-orig_name') : prev_name;\n\n $this.attr('name', new_name);\n $this.attr('data-orig_name', orig_name);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_name.replace('[]',''));\n });\n\n $repeater_sub_clone.find('.wpcf7cf_repeater,[data-class=\"wpcf7cf_group\"]').each(function() {\n var $this = jQuery(this);\n var prev_data_id = $this.attr('data-id');\n var orig_data_id = $this.attr('data-orig_data_id') != null ? $this.attr('data-orig_data_id') : prev_data_id;\n var new_data_id = repeater.getNewName(prev_data_id);\n\n if(prev_data_id.endsWith('_count')) {\n new_data_id = prev_data_id.replace('_count','__{{repeater_sub_suffix}}_count');\n }\n\n $this.attr('data-id', new_data_id);\n $this.attr('data-orig_data_id', orig_data_id);\n });\n\n $repeater_sub_clone.find('[id]').each(function() {\n var $this = jQuery(this);\n var prev_id = $this.attr('id');\n var orig_id = $this.attr('data-orig_id') != null ? $this.attr('data-orig_id') : prev_id;\n var new_id = repeater.getNewName(prev_id);\n\n $this.attr('id', new_id);\n $this.attr('data-orig_id', orig_id);\n });\n\n $repeater_sub_clone.find('[for]').each(function() {\n var $this = jQuery(this);\n var prev_for = $this.attr('for');\n var orig_for = $this.attr('data-orig_for') != null ? $this.attr('data-orig_for') : prev_for;\n var new_for = repeater.getNewName(prev_for);\n\n $this.attr('for', new_for);\n $this.attr('data-orig_for', orig_for);\n });\n\n var repeater_sub_html = $repeater_sub_clone[0].outerHTML;\n\n var $repeater_count_field = $repeater.find('[name='+$repeater.id+'_count]').eq(0);\n var $button_add = $repeater_controls.find('.wpcf7cf_add').eq(0);\n var $button_remove = $repeater_controls.find('.wpcf7cf_remove').eq(0);\n\n var params = {\n $repeater: $repeater,\n $repeater_count_field: $repeater_count_field,\n repeater_sub_html: repeater_sub_html,\n $repeater_controls: $repeater_controls,\n $button_add: $button_add,\n $button_remove: $button_remove,\n wpcf7cf_settings: wpcf7cf_settings\n };\n \n this.params = params;\n\n $button_add.on('click', null, repeater, function(e) {\n var repeater = e.data;\n repeater.updateSubs(params.$repeater.num_subs+1);\n });\n\n $button_remove.on('click', null, repeater,function(e) {\n var repeater = e.data;\n repeater.updateSubs(params.$repeater.num_subs-1);\n });\n\n jQuery('> .wpcf7cf_repeater_sub',params.$repeater).eq(0).remove(); // remove the first sub, it's just a template.\n\n repeater.updateSubs($repeater.initial_subs); \n\n}\n\nWpcf7cfRepeater.prototype.getNewName = function(previousName) {\n var prev_parts = previousName.split('[');\n previousName = prev_parts[0];\n var prev_suff = prev_parts.length > 1 ? '['+prev_parts.splice(1).join('[') : '';\n var newName = previousName+'__{{repeater_sub_suffix}}'+prev_suff;\n\n if(previousName.endsWith('_count')) {\n newName = previousName.replace('_count','__{{repeater_sub_suffix}}_count');\n }\n\n return newName;\n}\n\n\nWpcf7cfRepeater.prototype.updateSubs = function(subs_to_show) {\n var repeater = this;\n var params = repeater.params;\n var subs_to_add = subs_to_show - params.$repeater.num_subs;\n\n if (subs_to_add < 0) {\n repeater.removeSubs(-subs_to_add);\n } else if (subs_to_add > 0) {\n repeater.addSubs(subs_to_add);\n }\n\n var showButtonRemove = false;\n var showButtonAdd = false;\n\n if (params.$repeater.num_subs < params.$repeater.max) {\n showButtonAdd = true;\n }\n if (params.$repeater.num_subs > params.$repeater.min) {\n showButtonRemove = true;\n }\n\n if (showButtonAdd) {\n params.$button_add.show();\n } else {\n params.$button_add.hide();\n\n }\n\n if (showButtonRemove) {\n params.$button_remove.show();\n } else {\n params.$button_remove.hide();\n }\n\n params.$repeater_count_field.val(subs_to_show);\n\n};\nWpcf7cfRepeater.prototype.addSubs = function(subs_to_add) {\n var $ = jQuery;\n var params = this.params;\n var repeater = this;\n var form = repeater.form;\n\n\n var $repeater = params.$repeater; \n var $repeater_controls = params.$repeater_controls;\n\n //jQuery(params.repeater_sub_html.replace(/name=\"(.*?)\"/g,'name=\"wpcf7cf_repeater['+$repeater.id+']['+$repeater.num_subs+'][$1]\" data-original-name=\"$1\"')).hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime);\n\n var html_str = '';\n\n for(var i=1; i<=subs_to_add; i++) {\n var sub_suffix = $repeater.num_subs+i;\n html_str += params.repeater_sub_html.replace(/\\{\\{repeater_sub_suffix\\}\\}/g,sub_suffix)\n .replace(new RegExp('\\{\\{'+$repeater.orig_id+'_index\\}\\}','g'),sub_suffix);\n }\n\n\n var $html = jQuery(html_str);\n\n // Add the newly created fields to the form\n $html.hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added');\n\n jQuery('.wpcf7cf_repeater', $html).each(function(){\n form.repeaters.push(new Wpcf7cfRepeater(jQuery(this),form));\n });\n form.$input_repeaters.val(JSON.stringify(form.repeaters.map((item)=>item.params.$repeater.id)));\n\n $repeater.num_subs+= subs_to_add;\n\n window.wpcf7cf.updateMultistepState(form.multistep);\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n\n // Exclusive Checkbox\n $html.on( 'click', '.wpcf7-exclusive-checkbox input:checkbox', function() {\n var name = $( this ).attr( 'name' );\n $html.find( 'input:checkbox[name=\"' + name + '\"]' ).not( this ).prop( 'checked', false );\n } );\n\n //basic compatibility with material-design-for-contact-form-7\n if (typeof window.cf7mdInit === \"function\") {\n window.cf7mdInit();\n }\n\n return false;\n};\nWpcf7cfRepeater.prototype.removeSubs = function(num_subs) {\n var $ = jQuery;\n var params = this.params;\n var form = this.form;\n\n params.$repeater.num_subs-= num_subs;\n\n jQuery('> .wpcf7cf_repeater_sub',params.$repeater).slice(-num_subs).animate(wpcf7cf_hide_animation, {duration:params.wpcf7cf_settings.animation_intime, done:function() {\n var $this = jQuery(this);\n //remove the actual fields from the form\n $this.remove();\n params.$repeater.trigger('wpcf7cf_repeater_removed');\n window.wpcf7cf.updateMultistepState(form.multistep);\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n }});\n\n return false;\n};\n\nfunction Wpcf7cfMultistep($multistep, form) {\n var multistep = this;\n multistep.$multistep = $multistep;\n multistep.form = form;\n multistep.$steps = $multistep.find('.wpcf7cf_step');\n multistep.$btn_next = $multistep.find('.wpcf7cf_next');\n multistep.$btn_prev = $multistep.find('.wpcf7cf_prev');\n multistep.$dots = $multistep.find('.wpcf7cf_steps-dots');\n multistep.currentStep = 0;\n multistep.numSteps = multistep.$steps.length;\n\n\n multistep.$dots.html('');\n for (var i = 1; i <= multistep.numSteps; i++) {\n multistep.$dots.append(`\n