PageSourceSearch

https://www.rostovteplo.ru/send-pu/files/scripts.js

js rostovteplo.ru collected 2026-10-07 16:54:27 UTC 65,619 bytes, 1,748 lines download raw bytes

vendor: 3,614 bytes, lines 1-88
1/******/ (function(modules) { // webpackBootstrap
2/******/ 	// The module cache
3/******/ 	var installedModules = {};
4/******/
5/******/ 	// The require function
6/******/ 	function __webpack_require__(moduleId) {
7/******/
8/******/ 		// Check if module is in cache
9/******/ 		if(installedModules[moduleId]) {
10/******/ 			return installedModules[moduleId].exports;
11/******/ 		}
12/******/ 		// Create a new module (and put it into the cache)
13/******/ 		var module = installedModules[moduleId] = {
14/******/ 			i: moduleId,
15/******/ 			l: false,
16/******/ 			exports: {}
17/******/ 		};
18/******/
19/******/ 		// Execute the module function
20/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21/******/
22/******/ 		// Flag the module as loaded
23/******/ 		module.l = true;
24/******/
25/******/ 		// Return the exports of the module
26/******/ 		return module.exports;
27/******/ 	}
28/******/
29/******/
30/******/ 	// expose the modules object (__webpack_modules__)
31/******/ 	__webpack_require__.m = modules;
32/******/
33/******/ 	// expose the module cache
34/******/ 	__webpack_require__.c = installedModules;
35/******/
36/******/ 	// define getter function for harmony exports
37/******/ 	__webpack_require__.d = function(exports, name, getter) {
38/******/ 		if(!__webpack_require__.o(exports, name)) {
39/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
40/******/ 		}
41/******/ 	};
42/******/
43/******/ 	// define __esModule on exports
44/******/ 	__webpack_require__.r = function(exports) {
45/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47/******/ 		}
48/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
49/******/ 	};
50/******/
51/******/ 	// create a fake namespace object
52/******/ 	// mode & 1: value is a module id, require it
53/******/ 	// mode & 2: merge all properties of value into the ns
54/******/ 	// mode & 4: return value when already ns object
55/******/ 	// mode & 8|1: behave like require
56/******/ 	__webpack_require__.t = function(value, mode) {
57/******/ 		if(mode & 1) value = __webpack_require__(value);
58/******/ 		if(mode & 8) return value;
59/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60/******/ 		var ns = Object.create(null);
61/******/ 		__webpack_require__.r(ns);
62/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64/******/ 		return ns;
65/******/ 	};
66/******/
67/******/ 	// getDefaultExport function for compatibility with non-harmony modules
68/******/ 	__webpack_require__.n = function(module) {
69/******/ 		var getter = module && module.__esModule ?
70/******/ 			function getDefault() { return module['default']; } :
71/******/ 			function getModuleExports() { return module; };
72/******/ 		__webpack_require__.d(getter, 'a', getter);
73/******/ 		return getter;
74/******/ 	};
75/******/
76/******/ 	// Object.prototype.hasOwnProperty.call
77/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78/******/
79/******/ 	// __webpack_public_path__
80/******/ 	__webpack_require__.p = "";
81/******/
82/******/
83/******/ 	// Load entry module and return exports
84/******/ 	return __webpack_require__(__webpack_require__.s = "./js/scripts_es6.js");
85/******/ })
86/************************************************************************/
87/******/ ({
88
89/***/ "./js/scripts_es6.js":
90/*!***************************!*\
91  !*** ./js/scripts_es6.js ***!
92  \***************************/
93/*! no exports provided */
94/***/ (function(module, __webpack_exports__, __webpack_require__) {
95
96"use strict";
97__webpack_require__.r(__webpack_exports__);
98/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
99/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
100/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js");
101/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);
102
103
104
105
106var cf7signature_resized = 0; // for compatibility with contact-form-7-signature-addon
107
108var wpcf7cf_timeout;
109var wpcf7cf_show_animation = {
110  "height": "show",
111  "marginTop": "show",
112  "marginBottom": "show",
113  "paddingTop": "show",
114  "paddingBottom": "show"
115};
116var wpcf7cf_hide_animation = {
117  "height": "hide",
118  "marginTop": "hide",
119  "marginBottom": "hide",
120  "paddingTop": "hide",
121  "paddingBottom": "hide"
122};
123var wpcf7cf_show_step_animation = {
124  "opacity": "show"
125};
126var wpcf7cf_hide_step_animation = {
127  "opacity": "hide"
128};
129var wpcf7cf_change_events = 'input.wpcf7cf paste.wpcf7cf change.wpcf7cf click.wpcf7cf propertychange.wpcf7cf';
130var wpcf7cf_forms = []; // endswith polyfill
131
132if (!String.prototype.endsWith) {
133  String.prototype.endsWith = function (search, this_len) {
134    if (this_len === undefined || this_len > this.length) {
135      this_len = this.length;
136    }
137
138    return this.substring(this_len - search.length, this_len) === search;
139  };
140}
141
142var Wpcf7cfForm = function Wpcf7cfForm($form) {
143  var options_element = $form.find('input[name="_wpcf7cf_options"]').eq(0);
144
145  if (!options_element.length || !options_element.val()) {
146    // doesn't look like a CF7 form created with conditional fields plugin enabled.
147    return false;
148  }
149
150  var form = this;
151  var form_options = JSON.parse(options_element.val());
152  form.$form = $form;
153  form.$input_hidden_group_fields = $form.find('[name="_wpcf7cf_hidden_group_fields"]');
154  form.$input_hidden_groups = $form.find('[name="_wpcf7cf_hidden_groups"]');
155  form.$input_visible_groups = $form.find('[name="_wpcf7cf_visible_groups"]');
156  form.$input_repeaters = $form.find('[name="_wpcf7cf_repeaters"]');
157  form.$input_steps = $form.find('[name="_wpcf7cf_steps"]');
158  form.unit_tag = $form.closest('.wpcf7').attr('id');
159  form.conditions = form_options['conditions']; // compatibility with conditional forms created with older versions of the plugin ( < 1.4 )
160
161  for (var i = 0; i < form.conditions.length; i++) {
162    var condition = form.conditions[i];
163
164    if (!('and_rules' in condition)) {
165      condition.and_rules = [{
166        'if_field': condition.if_field,
167        'if_value': condition.if_value,
168        'operator': condition.operator
169      }];
170    }
171  }
172
173  form.initial_conditions = form.conditions;
174  form.settings = form_options['settings'];
175  form.$groups = jQuery(); // empty jQuery set
176
177  form.repeaters = [];
178  form.multistep = null;
179  form.fields = [];
180  form.settings.animation_intime = parseInt(form.settings.animation_intime);
181  form.settings.animation_outtime = parseInt(form.settings.animation_outtime);
182
183  if (form.settings.animation === 'no') {
184    form.settings.animation_intime = 0;
185    form.settings.animation_outtime = 0;
186  }
187
188  form.updateGroups();
189  form.updateEventListeners();
190  form.displayFields(); // bring form in initial state if the reset event is fired on it.
191
192  form.$form.on('reset', form, function (e) {
193    var form = e.data;
194    setTimeout(function () {
195      form.displayFields();
196    }, 200);
197  }); // PRO ONLY
198
199  jQuery('.wpcf7cf_repeater:not(.wpcf7cf_repeater .wpcf7cf_repeater)', $form).each(function () {
200    form.repeaters.push(new Wpcf7cfRepeater(jQuery(this), form));
201  });
202  form.$input_repeaters.val(JSON.stringify(form.repeaters.map(function (item) {
203    return item.params.$repeater.id;
204  })));
205  var $multistep = jQuery('.wpcf7cf_multistep', $form);
206
207  if ($multistep.length) {
208    form.multistep = new Wpcf7cfMultistep($multistep, form); // wpcf7cf.updateMultistepState(form.multistep);
209  } // END PRO ONLY
210
211};
212
213Wpcf7cfForm.prototype.displayFields = function () {
214  var form = this;
215  wpcf7cf.get_simplified_dom_model(form.$form);
216  var unit_tag = this.unit_tag;
217  var wpcf7cf_conditions = this.conditions;
218  var wpcf7cf_settings = this.settings; //for compatibility with contact-form-7-signature-addon
219
220  if (cf7signature_resized === 0 && typeof signatures !== 'undefined' && signatures.constructor === Array && signatures.length > 0) {
221    for (var i = 0; i < signatures.length; i++) {
222      if (signatures[i].canvas.width === 0) {
223        var $sig_canvas = jQuery(".wpcf7-form-control-signature-body>canvas");
224        var $sig_wrap = jQuery(".wpcf7-form-control-signature-wrap");
225        $sig_canvas.eq(i).attr('width', $sig_wrap.width());
226        $sig_canvas.eq(i).attr('height', $sig_wrap.height());
227        cf7signature_resized = 1;
228      }
229    }
230  }
231
232  form.$groups.addClass('wpcf7cf-hidden');
233
234  for (var i = 0; i < wpcf7cf_conditions.length; i++) {
235    var condition = wpcf7cf_conditions[i];
236    var show_group = wpcf7cf.should_group_be_shown(condition, form.$form);
237
238    if (show_group) {
239      jQuery('[data-id=' + condition.then_field + ']', form.$form).eq(0).removeClass('wpcf7cf-hidden');
240    }
241  }
242
243  var animation_intime = wpcf7cf_settings.animation_intime;
244  var animation_outtime = wpcf7cf_settings.animation_outtime;
245  form.$groups.each(function (index) {
246    var $group = jQuery(this);
247    if ($group.is(':animated')) $group.finish(); // stop any current animations on the group
248
249    if ($group.css('display') === 'none' && !$group.hasClass('wpcf7cf-hidden')) {
250      if ($group.prop('tagName') === 'SPAN') {
251        $group.show().trigger('wpcf7cf_show_group');
252      } else {
253        $group.animate(wpcf7cf_show_animation, animation_intime).trigger('wpcf7cf_show_group'); // show
254      }
255    } else if ($group.css('display') !== 'none' && $group.hasClass('wpcf7cf-hidden')) {
256      if ($group.attr('data-clear_on_hide') !== undefined) {
257        var $inputs = jQuery(':input', $group).not(':button, :submit, :reset, :hidden');
258        $inputs.each(function () {
259          var $this = jQuery(this);
260          $this.val(this.defaultValue);
261          $this.prop('checked', this.defaultChecked);
262        });
263        $inputs.change(); //display_fields();
264      }
265
266      if ($group.prop('tagName') === 'SPAN') {
267        $group.hide().trigger('wpcf7cf_hide_group');
268      } else {
269        $group.animate(wpcf7cf_hide_animation, animation_outtime).trigger('wpcf7cf_hide_group'); // hide
270      }
271    }
272  });
273  form.updateHiddenFields();
274};
275
276Wpcf7cfForm.prototype.updateHiddenFields = function () {
277  var form = this;
278  var hidden_fields = [];
279  var hidden_groups = [];
280  var visible_groups = [];
281  form.$groups.each(function () {
282    var $this = jQuery(this);
283
284    if ($this.hasClass('wpcf7cf-hidden')) {
285      hidden_groups.push($this.data('id'));
286      $this.find('input,select,textarea').each(function () {
287        hidden_fields.push(jQuery(this).attr('name'));
288      });
289    } else {
290      visible_groups.push($this.data('id'));
291    }
292  });
293  form.hidden_fields = hidden_fields;
294  form.hidden_groups = hidden_groups;
295  form.visible_groups = visible_groups;
296  form.$input_hidden_group_fields.val(JSON.stringify(hidden_fields));
297  form.$input_hidden_groups.val(JSON.stringify(hidden_groups));
298  form.$input_visible_groups.val(JSON.stringify(visible_groups));
299  return true;
300};
301
302Wpcf7cfForm.prototype.updateGroups = function () {
303  var form = this;
304  form.$groups = form.$form.find('[data-class="wpcf7cf_group"]');
305  form.conditions = wpcf7cf.get_nested_conditions(form.initial_conditions, form.$form);
306};
307
308Wpcf7cfForm.prototype.updateEventListeners = function () {
309  var form = this; // monitor input changes, and call display_fields() if something has changed
310
311  jQuery('input, select, textarea, button', form.$form).not('.wpcf7cf_add, .wpcf7cf_remove').off(wpcf7cf_change_events).on(wpcf7cf_change_events, form, function (e) {
312    var form = e.data;
313    clearTimeout(wpcf7cf_timeout);
314    wpcf7cf_timeout = setTimeout(function () {
315      form.displayFields();
316    }, 100);
317  }); // PRO ONLY
318
319  jQuery('.wpcf7cf-togglebutton', form.$form).off('click.toggle_wpcf7cf').on('click.toggle_wpcf7cf', function () {
320    var $this = jQuery(this);
321
322    if ($this.text() === $this.data('val-1')) {
323      $this.text($this.data('val-2'));
324      $this.val($this.data('val-2'));
325    } else {
326      $this.text($this.data('val-1'));
327      $this.val($this.data('val-1'));
328    }
329  }); // END PRO ONLY
330}; // PRO ONLY
331
332
333function Wpcf7cfRepeater($repeater, form) {
334  var $ = jQuery;
335  var repeater = this;
336  var wpcf7cf_settings = form.settings;
337  repeater.form = form;
338  $repeater.num_subs = 0;
339  $repeater.id = $repeater.data('id');
340  $repeater.orig_id = $repeater.data('orig_data_id');
341  $repeater.min = typeof $repeater.data('min') !== 'undefined' ? parseInt($repeater.data('min')) : 1;
342  $repeater.max = typeof $repeater.data('max') !== 'undefined' ? parseInt($repeater.data('max')) : 200;
343  $repeater.initial_subs = typeof $repeater.data('initial') !== 'undefined' ? parseInt($repeater.data('initial')) : $repeater.min;
344  if ($repeater.initial_subs > $repeater.max) $repeater.initial_subs = $repeater.max;
345  var $repeater_sub = $repeater.children('.wpcf7cf_repeater_sub').eq(0);
346  var $repeater_controls = $repeater.children('.wpcf7cf_repeater_controls').eq(0);
347  var $repeater_sub_clone = $repeater_sub.clone();
348  $repeater_sub_clone.find('.wpcf7cf_repeater_sub').addBack('.wpcf7cf_repeater_sub').each(function () {
349    var $this = jQuery(this);
350    var prev_suffix = $this.attr('data-repeater_sub_suffix');
351    var new_suffix = prev_suffix + '__{{repeater_sub_suffix}}';
352    $this.attr('data-repeater_sub_suffix', new_suffix);
353  });
354  $repeater_sub_clone.find('[name]').each(function () {
355    var $this = jQuery(this);
356    var prev_name = $this.attr('name');
357    var orig_name = $this.attr('data-orig_name') != null ? $this.attr('data-orig_name') : prev_name;
358    var new_name = prev_name + '__{{repeater_sub_suffix}}';
359
360    if (prev_name.endsWith('_count')) {
361      new_name = prev_name.replace('_count', '__{{repeater_sub_suffix}}_count');
362    }
363
364    $this.attr('name', new_name);
365    $this.attr('data-orig_name', orig_name);
366    $this.closest('.wpcf7-form-control-wrap').addClass(new_name);
367  });
368  $repeater_sub_clone.find('.wpcf7cf_repeater,[data-class="wpcf7cf_group"]').each(function () {
369    var $this = jQuery(this);
370    var prev_data_id = $this.attr('data-id');
371    var orig_data_id = $this.attr('data-orig_data_id') != null ? $this.attr('data-orig_data_id') : prev_data_id;
372    var new_data_id = prev_data_id + '__{{repeater_sub_suffix}}';
373
374    if (prev_data_id.endsWith('_count')) {
375      new_data_id = prev_data_id.replace('_count', '__{{repeater_sub_suffix}}_count');
376    }
377
378    $this.attr('data-id', new_data_id);
379    $this.attr('data-orig_data_id', orig_data_id);
380    $this.closest('.wpcf7-form-control-wrap').addClass(new_data_id);
381  });
382  $repeater_sub_clone.find('[id]').each(function () {
383    var $this = jQuery(this);
384    var prev_id = $this.attr('id');
385    var orig_id = $this.attr('data-orig_id') != null ? $this.attr('data-orig_id') : prev_id;
386    var new_id = prev_id + '__{{repeater_sub_suffix}}';
387    $this.attr('id', new_id);
388    $this.attr('data-orig_id', orig_id);
389    $this.closest('.wpcf7-form-control-wrap').addClass(new_id);
390  });
391  $repeater_sub_clone.find('[for]').each(function () {
392    var $this = jQuery(this);
393    var prev_for = $this.attr('for');
394    var orig_for = $this.attr('data-orig_for') != null ? $this.attr('data-orig_for') : prev_for;
395    var new_for = prev_for + '__{{repeater_sub_suffix}}';
396    $this.attr('for', new_for);
397    $this.attr('data-orig_for', orig_for);
398    $this.closest('.wpcf7-form-control-wrap').addClass(new_for);
399  });
400  var repeater_sub_html = $repeater_sub_clone[0].outerHTML;
401  var $repeater_count_field = $repeater.find('[name=' + $repeater.id + '_count]').eq(0);
402  var $button_add = $repeater_controls.find('.wpcf7cf_add').eq(0);
403  var $button_remove = $repeater_controls.find('.wpcf7cf_remove').eq(0);
404  var params = {
405    $repeater: $repeater,
406    $repeater_count_field: $repeater_count_field,
407    repeater_sub_html: repeater_sub_html,
408    $repeater_controls: $repeater_controls,
409    $button_add: $button_add,
410    $button_remove: $button_remove,
411    wpcf7cf_settings: wpcf7cf_settings
412  };
413  this.params = params;
414  $button_add.click(repeater, function (e) {
415    var repeater = e.data;
416    repeater.updateSubs(params.$repeater.num_subs + 1);
417  });
418  $button_remove.click(repeater, function (e) {
419    var repeater = e.data;
420    repeater.updateSubs(params.$repeater.num_subs - 1);
421  });
422  jQuery('> .wpcf7cf_repeater_sub', params.$repeater).eq(0).remove(); // remove the first sub, it's just a template.
423
424  repeater.updateSubs($repeater.initial_subs);
425}
426
427Wpcf7cfRepeater.prototype.updateSubs = function (subs_to_show) {
428  var repeater = this;
429  var params = repeater.params;
430  var subs_to_add = subs_to_show - params.$repeater.num_subs;
431
432  if (subs_to_add < 0) {
433    repeater.removeSubs(-subs_to_add);
434  } else if (subs_to_add > 0) {
435    repeater.addSubs(subs_to_add);
436  }
437
438  var showButtonRemove = false;
439  var showButtonAdd = false;
440
441  if (params.$repeater.num_subs < params.$repeater.max) {
442    showButtonAdd = true;
443  }
444
445  if (params.$repeater.num_subs > params.$repeater.min) {
446    showButtonRemove = true;
447  }
448
449  if (showButtonAdd) {
450    params.$button_add.show();
451  } else {
452    params.$button_add.hide();
453  }
454
455  if (showButtonRemove) {
456    params.$button_remove.show();
457  } else {
458    params.$button_remove.hide();
459  }
460
461  params.$repeater_count_field.val(subs_to_show);
462};
463
464Wpcf7cfRepeater.prototype.addSubs = function (subs_to_add) {
465  var $ = jQuery;
466  var params = this.params;
467  var repeater = this;
468  var form = repeater.form;
469  var $repeater = params.$repeater;
470  var $repeater_controls = params.$repeater_controls; //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);
471
472  var html_str = '';
473
474  for (var i = 1; i <= subs_to_add; i++) {
475    var sub_suffix = $repeater.num_subs + i;
476    html_str += params.repeater_sub_html.replace(/\{\{repeater_sub_suffix\}\}/g, sub_suffix).replace(new RegExp('\{\{' + $repeater.orig_id + '_index\}\}', 'g'), sub_suffix);
477  }
478
479  var $html = jQuery(html_str); // Add the newly created fields to the form
480
481  $html.hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added');
482  jQuery('.wpcf7cf_repeater', $html).each(function () {
483    form.repeaters.push(new Wpcf7cfRepeater(jQuery(this), form));
484  });
485  form.$input_repeaters.val(JSON.stringify(form.repeaters.map(function (item) {
486    return item.params.$repeater.id;
487  })));
488  $repeater.num_subs += subs_to_add;
489  wpcf7cf.updateMultistepState(form.multistep);
490  form.updateGroups();
491  form.updateEventListeners();
492  form.displayFields(); // Exclusive Checkbox
493
494  $html.on('click', '.wpcf7-exclusive-checkbox input:checkbox', function () {
495    var name = $(this).attr('name');
496    $html.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false);
497  }); //basic compatibility with material-design-for-contact-form-7
498
499  if (typeof window.cf7mdInit === "function") {
500    window.cf7mdInit();
501  }
502
503  return false;
504};
505
506Wpcf7cfRepeater.prototype.removeSubs = function (num_subs) {
507  var $ = jQuery;
508  var params = this.params;
509  var form = this.form;
510  params.$repeater.num_subs -= num_subs;
511  jQuery('> .wpcf7cf_repeater_sub', params.$repeater).slice(-num_subs).animate(wpcf7cf_hide_animation, {
512    duration: params.wpcf7cf_settings.animation_intime,
513    done: function done() {
514      var $this = jQuery(this); //remove the actual fields from the form
515
516      $this.remove();
517      params.$repeater.trigger('wpcf7cf_repeater_removed');
518      wpcf7cf.updateMultistepState(form.multistep);
519      form.updateGroups();
520      form.updateEventListeners();
521      form.displayFields();
522    }
523  });
524  return false;
525};
526
527function Wpcf7cfMultistep($multistep, form) {
528  var multistep = this;
529  multistep.$multistep = $multistep;
530  multistep.form = form;
531  multistep.$steps = $multistep.find('.wpcf7cf_step');
532  multistep.$btn_next = $multistep.find('.wpcf7cf_next');
533  multistep.$btn_prev = $multistep.find('.wpcf7cf_prev');
534  multistep.$dots = $multistep.find('.wpcf7cf_steps-dots');
535  multistep.current_step = 0;
536  multistep.numSteps = multistep.$steps.length;
537  multistep.$dots.html('');
538
539  for (var i = 1; i <= multistep.numSteps; i++) {
540    multistep.$dots.append("\n            <div class=\"dot\" data-step=\"".concat(i, "\">\n                <div class=\"step-index\">").concat(i, "</div>\n                <div class=\"step-title\">").concat(multistep.$steps.eq(i - 1).data('title'), "</div>\n            </div>\n        "));
541  }
542
543  multistep.$btn_next.on('click.wpcf7cf_step',
544  /*#__PURE__*/
545  _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(
546  /*#__PURE__*/
547  _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() {
548    var result;
549    return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
550      while (1) {
551        switch (_context.prev = _context.next) {
552          case 0:
553            _context.next = 2;
554            return multistep.validateStep(multistep.current_step);
555
556          case 2:
557            result = _context.sent;
558            console.log('got this result: ' + result);
559
560            if (result === 'success') {
561              multistep.moveToStep(multistep.current_step + 1);
562            }
563
564          case 5:
565          case "end":
566            return _context.stop();
567        }
568      }
569    }, _callee);
570  })));
571  multistep.$btn_prev.click(function () {
572    multistep.moveToStep(multistep.current_step - 1);
573  });
574  multistep.moveToStep(1);
575}
576
577Wpcf7cfMultistep.prototype.validateStep = function (step_index) {
578  var _this = this;
579
580  return new Promise(function (resolve) {
581    var multistep = _this;
582    var $multistep = multistep.$multistep; //validation
583
584    var $form = multistep.form.$form;
585    var fd = new FormData(); // TEST IF FILES UPLOADS WORK? THEN REMOVE THIS
586    // jQuery.each($form.find('[data-id="step'+step_index+'"] input[type="file"]'), function(index, el) {
587    //     fd.append(jQuery(el).attr('name'), jQuery(el)[0].files[0]);
588    // });
589
590    var formdata = $form.serializeArray();
591    jQuery.each(formdata, function (key, input) {
592      fd.append(input.name, input.value);
593    });
594    jQuery.ajax({
595      url: wpcf7cf_global_settings.ajaxurl + '?action=wpcf7cf_validate_step',
596      type: 'POST',
597      data: fd,
598      processData: false,
599      contentType: false,
600      dataType: 'json'
601    }).done(function (json) {
602      /*
603      * Insert _form_data_id if 'json variable' has
604      */
605      if (typeof json._cf7mls_db_form_data_id != 'undefined') {
606        if (!form.find('input[name="_cf7mls_db_form_data_id"]').length) {
607          form.append('<input type="hidden" name="_cf7mls_db_form_data_id" value="' + json._cf7mls_db_form_data_id + '" />');
608        }
609      } //reset error messages
610
611
612      $multistep.find('.wpcf7-form-control-wrap').removeClass('cf7mls-invalid');
613      $multistep.find('.wpcf7-form-control-wrap .wpcf7-not-valid-tip').remove();
614      $multistep.find('.wpcf7-response-output').remove();
615      $multistep.find('.wpcf7-response-output.wpcf7-validation-errors').removeClass('wpcf7-validation-errors');
616
617      if (!json.success) {
618        var checkError = 0;
619        jQuery.each(json.invalid_fields, function (index, el) {
620          if ($multistep.find('input[name="' + index + '"]').length || $multistep.find('input[name="' + index + '[]"]').length || $multistep.find('select[name="' + index + '"]').length || $multistep.find('select[name="' + index + '[]"]').length || $multistep.find('textarea[name="' + index + '"]').length || $multistep.find('textarea[name="' + index + '[]"]').length) {
621            checkError = checkError + 1;
622            var controlWrap = jQuery('.wpcf7-form-control-wrap.' + index, $form);
623            controlWrap.addClass('cf7mls-invalid');
624            controlWrap.find('span.wpcf7-not-valid-tip').remove();
625            controlWrap.append('<span role="alert" class="wpcf7-not-valid-tip">' + el.reason + '</span>'); //return false;
626          }
627        });
628        resolve('failed');
629        $multistep.append('<div class="wpcf7-response-output wpcf7-display-none wpcf7-validation-errors" style="display: block;" role="alert">' + json.message + '</div>');
630      } else if (json.success) {
631        resolve('success');
632        return false;
633      }
634    }).fail(function () {
635      resolve('error');
636    }).always(function () {// do nothing
637    });
638  });
639};
640
641Wpcf7cfMultistep.prototype.moveToStep = function (step_index) {
642  var multistep = this;
643  var previousStep = multistep.current_step;
644  multistep.current_step = step_index > multistep.numSteps ? multistep.numSteps : step_index < 1 ? 1 : step_index; // ANIMATION DISABLED FOR NOW cause it's ugly
645  // multistep.$steps.animate(wpcf7cf_hide_step_animation, multistep.form.settings.animation_outtime);
646  // multistep.$steps.eq(multistep.current_step-1).animate(wpcf7cf_show_step_animation, multistep.form.settings.animation_intime);
647
648  multistep.$multistep.attr('data-current_step', multistep.current_step);
649  multistep.$steps.hide();
650  multistep.$steps.eq(multistep.current_step - 1).show().trigger('wpcf7cf_change_step', [previousStep, multistep.current_step]); // change step;
651
652  wpcf7cf.updateMultistepState(multistep);
653};
654
655Wpcf7cfMultistep.prototype.getFieldsInStep = function (step_index) {
656  var simpleDom = wpcf7cf.get_simplified_dom_model(this.form.$form);
657  var inStep = false;
658  return simpleDom.filter(function (item, i) {
659    if (item.type == 'step') {
660      inStep = item.step == step_index + '';
661    }
662
663    return inStep && item.type == 'input';
664  }).map(function (item) {
665    return item.name;
666  });
667}; // END PRO ONLY
668
669
670var wpcf7cf = {
671  // keep this for backwards compatibility
672  initForm: function initForm($form) {
673    wpcf7cf_forms.push(new Wpcf7cfForm($form));
674  },
675  get_nested_conditions: function get_nested_conditions(conditions, $current_form) {
676    //loop trough conditions. Then loop trough the dom, and each repeater we pass we should update all sub_values we encounter with __index
677    var simplified_dom = wpcf7cf.get_simplified_dom_model($current_form);
678    var groups = simplified_dom.filter(function (item, i) {
679      return item.type === 'group';
680    });
681    var sub_conditions = [];
682
683    for (var i = 0; i < groups.length; i++) {
684      var g = groups[i];
685      var relevant_conditions = conditions.filter(function (condition, i) {
686        return condition.then_field === g.original_name;
687      });
688      var relevant_conditions = relevant_conditions.map(function (item, i) {
689        return {
690          then_field: g.name,
691          and_rules: item.and_rules.map(function (and_rule, i) {
692            return {
693              if_field: and_rule.if_field + g.suffix,
694              if_value: and_rule.if_value,
695              operator: and_rule.operator
696            };
697          })
698        };
699      });
700      sub_conditions = sub_conditions.concat(relevant_conditions);
701    }
702
703    return conditions.concat(sub_conditions);
704  },
705  get_simplified_dom_model: function get_simplified_dom_model($current_form) {
706    // if the dom is something like:
707    // <form>
708    //   <repeater ra>
709    //     <group ga__1>
710    //         <repeater rb__1>
711    //             <input txta__1__1 />
712    //             <input txta__1__2 />
713    //         </repeater>
714    //         <group gb__1>
715    //             <input txtb__1 />
716    //         </group>
717    //     </group>
718    //     <group ga__2>
719    //         <repeater rb__2>
720    //             <input txta__2__1 />
721    //         </repeater>
722    //         <group gb__2>
723    //             <input txtb__2 />
724    //         </group>
725    //     </group>
726    //   </repeater>
727    // </form>
728    // 
729    // return something like:
730    // [{type:repeater, name:'ra', suffix: '__1'}, {type: group, name:'ga', suffix: '__1'}, ...]
731    var currentNode;
732    var ni = document.createNodeIterator($current_form[0], NodeFilter.SHOW_ELEMENT, null, false); //, NodeFilter.SHOW_ELEMENT, function(){ return NodeFilter.FILTER_ACCEPT; }
733
734    var simplified_dom = [];
735
736    while (currentNode = ni.nextNode()) {
737      if (currentNode.classList.contains('wpcf7cf_repeater')) {
738        simplified_dom.push({
739          type: 'repeater',
740          name: currentNode.dataset.id,
741          original_name: currentNode.dataset.orig_data_id
742        });
743      } else if (currentNode.dataset["class"] == 'wpcf7cf_group') {
744        simplified_dom.push({
745          type: 'group',
746          name: currentNode.dataset.id,
747          original_name: currentNode.dataset.orig_data_id
748        });
749      } else if (currentNode.className == 'wpcf7cf_step') {
750        simplified_dom.push({
751          type: 'step',
752          name: currentNode.dataset.id,
753          original_name: currentNode.dataset.id,
754          step: currentNode.dataset.id.substring(5)
755        });
756      } else if (currentNode.hasAttribute('name')) {
757        simplified_dom.push({
758          type: 'input',
759          name: currentNode.getAttribute('name'),
760          original_name: currentNode.getAttribute('data-orig_name')
761        });
762      }
763    }
764
765    simplified_dom = simplified_dom.map(function (item, i) {
766      var original_name_length = item.original_name == null ? item.name.length : item.original_name.length;
767      item.suffix = item.name.substring(original_name_length);
768      return item;
769    }); //console.table(simplified_dom);
770
771    return simplified_dom;
772  },
773  updateMultistepState: function updateMultistepState(multistep) {
774    if (multistep == null) return; // update hidden input field
775
776    var stepsData = {
777      currentStep: multistep.current_step,
778      numSteps: multistep.numSteps,
779      fieldsInCurrentStep: multistep.getFieldsInStep(multistep.current_step)
780    };
781    multistep.form.$input_steps.val(JSON.stringify(stepsData)); // update Buttons
782
783    multistep.$btn_prev.removeClass('disabled');
784    multistep.$btn_next.removeClass('disabled');
785
786    if (multistep.current_step == multistep.numSteps) {
787      multistep.$btn_next.addClass('disabled');
788    }
789
790    if (multistep.current_step == 1) {
791      multistep.$btn_prev.addClass('disabled');
792    } // replace next button with submit button on last step.
793    // TODO: make this depend on a setting
794
795
796    var $submit_button = multistep.form.$form.find('input[type="submit"]').eq(0);
797
798    if (multistep.current_step == multistep.numSteps) {
799      var $submit_clone = $submit_button.clone();
800      $submit_button.hide();
801      multistep.$btn_next.hide();
802      multistep.$btn_next.parent().append($submit_clone);
803    } else {
804      multistep.$btn_next.parent().find('input[type=submit]').remove();
805      $submit_button.show();
806      multistep.$btn_next.show();
807    } // update dots
808
809
810    var $dots = multistep.$dots.find('.dot');
811    $dots.removeClass('active').removeClass('completed');
812
813    for (var step = 1; step <= multistep.numSteps; step++) {
814      if (step < multistep.current_step) {
815        $dots.eq(step - 1).addClass('completed');
816      } else if (step == multistep.current_step) {
817        $dots.eq(step - 1).addClass('active');
818      }
819    }
820  },
821  should_group_be_shown: function should_group_be_shown(condition, $current_form) {
822    var $ = jQuery;
823    var show_group = true;
824
825    for (var and_rule_i = 0; and_rule_i < condition.and_rules.length; and_rule_i++) {
826      var condition_ok = false;
827      var condition_and_rule = condition.and_rules[and_rule_i];
828      var $field = jQuery('[name="' + condition_and_rule.if_field + '"], [name="' + condition_and_rule.if_field + '[]"], [data-original-name="' + condition_and_rule.if_field + '"], [data-original-name="' + condition_and_rule.if_field + '[]"]', $current_form);
829      var if_val = condition_and_rule.if_value;
830      var if_val_as_number = isFinite(parseFloat(if_val)) ? parseFloat(if_val) : 0;
831      var operator = condition_and_rule.operator;
832      var regex_patt = /.*/i; // fallback regex pattern
833
834      var isValidRegex = true;
835
836      try {
837        regex_patt = new RegExp(if_val, 'i');
838      } catch (e) {
839        isValidRegex = false;
840      } //backwards compat
841
842
843      operator = operator === '≤' ? 'less than or equals' : operator;
844      operator = operator === '≥' ? 'greater than or equals' : operator;
845      operator = operator === '>' ? 'greater than' : operator;
846      operator = operator === '<' ? 'less than' : operator;
847
848      if ($field.length === 1) {
849        // single field (tested with text field, single checkbox, select with single value (dropdown), select with multiple values)
850        if ($field.is('select')) {
851          if (operator === 'not equals') {
852            condition_ok = true;
853          }
854
855          $field.find('option:selected').each(function () {
856            var $option = jQuery(this);
857            var option_val = $option.val();
858
859            if (operator === 'equals' && option_val === if_val || operator === 'equals (regex)' && regex_patt.test($option.val())) {
860              condition_ok = true;
861            } else if (operator === 'not equals' && option_val === if_val || operator === 'not equals (regex)' && !regex_patt.test($option.val())) {
862              condition_ok = false;
863              return false; // break out of the loop
864            }
865          });
866          show_group = show_group && condition_ok;
867        }
868
869        var field_val = $field.val();
870        var field_val_as_number = isFinite(parseFloat(field_val)) ? parseFloat(field_val) : 0;
871
872        if ($field.attr('type') === 'checkbox') {
873          var field_is_checked = $field.is(':checked');
874
875          if (operator === 'equals' && field_is_checked && field_val === if_val || operator === 'not equals' && !field_is_checked || operator === 'is empty' && !field_is_checked || operator === 'not empty' && field_is_checked || operator === 'greater than' && field_is_checked && field_val_as_number > if_val_as_number || operator === 'less than' && field_is_checked && field_val_as_number < if_val_as_number || operator === 'greater than or equals' && field_is_checked && field_val_as_number >= if_val_as_number || operator === 'less than or equals' && field_is_checked && field_val_as_number <= if_val_as_number || operator === 'equals (regex)' && field_is_checked && regex_patt.test(field_val) || operator === 'not equals (regex)' && !field_is_checked) {
876            condition_ok = true;
877          }
878        } else if (operator === 'equals' && field_val === if_val || operator === 'not equals' && field_val !== if_val || operator === 'equals (regex)' && regex_patt.test(field_val) || operator === 'not equals (regex)' && !regex_patt.test(field_val) || operator === 'greater than' && field_val_as_number > if_val_as_number || operator === 'less than' && field_val_as_number < if_val_as_number || operator === 'greater than or equals' && field_val_as_number >= if_val_as_number || operator === 'less than or equals' && field_val_as_number <= if_val_as_number || operator === 'is empty' && field_val === '' || operator === 'not empty' && field_val !== '' || operator === 'function' && typeof window[if_val] == 'function' && window[if_val]($field)) {
879          condition_ok = true;
880        }
881      } else if ($field.length > 1) {
882        // multiple fields (tested with checkboxes, exclusive checkboxes, dropdown with multiple values)
883        var all_values = [];
884        var checked_values = [];
885        $field.each(function () {
886          all_values.push(jQuery(this).val());
887
888          if (jQuery(this).is(':checked')) {
889            checked_values.push(jQuery(this).val());
890          }
891        });
892        var checked_value_index = jQuery.inArray(if_val, checked_values);
893        var value_index = jQuery.inArray(if_val, all_values);
894
895        if (operator === 'is empty' && checked_values.length === 0 || operator === 'not empty' && checked_values.length > 0) {
896          condition_ok = true;
897        }
898
899        for (var ind = 0; ind < checked_values.length; ind++) {
900          var checked_val = checked_values[ind];
901          var checked_val_as_number = isFinite(parseFloat(checked_val)) ? parseFloat(checked_val) : 0;
902
903          if (operator === 'equals' && checked_val === if_val || operator === 'not equals' && checked_val !== if_val || operator === 'equals (regex)' && regex_patt.test(checked_val) || operator === 'not equals (regex)' && !regex_patt.test(checked_val) || operator === 'greater than' && checked_val_as_number > if_val_as_number || operator === 'less than' && checked_val_as_number < if_val_as_number || operator === 'greater than or equals' && checked_val_as_number >= if_val_as_number || operator === 'less than or equals' && checked_val_as_number <= if_val_as_number) {
904            condition_ok = true;
905          }
906        }
907      }
908
909      show_group = show_group && condition_ok;
910    }
911
912    return show_group;
913  }
914};
915jQuery('.wpcf7-form').each(function () {
916  wpcf7cf_forms.push(new Wpcf7cfForm(jQuery(this)));
917}); // Call displayFields again on all forms
918// Necessary in case some theme or plugin changed a form value by the time the entire page is fully loaded.
919
920jQuery('document').ready(function () {
921  wpcf7cf_forms.forEach(function (f) {
922    f.displayFields();
923  });
924}); // fix for exclusive checkboxes in IE (this will call the change-event again after all other checkboxes are unchecked, triggering the display_fields() function)
925
926var old_wpcf7ExclusiveCheckbox = jQuery.fn.wpcf7ExclusiveCheckbox;
927
928jQuery.fn.wpcf7ExclusiveCheckbox = function () {
929  return this.find('input:checkbox').click(function () {
930    var name = jQuery(this).attr('name');
931    jQuery(this).closest('form').find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false).eq(0).change();
932  });
933};
934
935/***/ }),
936
vendor: 1,168 bytes, lines 937-983
937/***/ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js":
938/*!*****************************************************************!*\
939  !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
940  \*****************************************************************/
941/*! no static exports found */
942/***/ (function(module, exports) {
943
944function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
945  try {
946    var info = gen[key](arg);
947    var value = info.value;
948  } catch (error) {
949    reject(error);
950    return;
951  }
952
953  if (info.done) {
954    resolve(value);
955  } else {
956    Promise.resolve(value).then(_next, _throw);
957  }
958}
959
960function _asyncToGenerator(fn) {
961  return function () {
962    var self = this,
963        args = arguments;
964    return new Promise(function (resolve, reject) {
965      var gen = fn.apply(self, args);
966
967      function _next(value) {
968        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
969      }
970
971      function _throw(err) {
972        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
973      }
974
975      _next(undefined);
976    });
977  };
978}
979
980module.exports = _asyncToGenerator;
981
982/***/ }),
983
vendor: 465 bytes, lines 984-994
984/***/ "./node_modules/@babel/runtime/regenerator/index.js":
985/*!**********************************************************!*\
986  !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
987  \**********************************************************/
988/*! no static exports found */
989/***/ (function(module, exports, __webpack_require__) {
990
991module.exports = __webpack_require__(/*! regenerator-runtime */ "./node_modules/regenerator-runtime/runtime.js");
992
993/***/ }),
994
vendor: 24,786 bytes, lines 995-1712
995/***/ "./node_modules/regenerator-runtime/runtime.js":
996/*!*****************************************************!*\
997  !*** ./node_modules/regenerator-runtime/runtime.js ***!
998  \*****************************************************/
999/*! no static exports found */
1000/***/ (function(module, exports, __webpack_require__) {
1001
1002/* WEBPACK VAR INJECTION */(function(module) {function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
1003
1004/**
1005 * Copyright (c) 2014-present, Facebook, Inc.
1006 *
1007 * This source code is licensed under the MIT license found in the
1008 * LICENSE file in the root directory of this source tree.
1009 */
1010var runtime = function (exports) {
1011  "use strict";
1012
1013  var Op = Object.prototype;
1014  var hasOwn = Op.hasOwnProperty;
1015  var undefined; // More compressible than void 0.
1016
1017  var $Symbol = typeof Symbol === "function" ? Symbol : {};
1018  var iteratorSymbol = $Symbol.iterator || "@@iterator";
1019  var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
1020  var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
1021
1022  function wrap(innerFn, outerFn, self, tryLocsList) {
1023    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
1024    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
1025    var generator = Object.create(protoGenerator.prototype);
1026    var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
1027    // .throw, and .return methods.
1028
1029    generator._invoke = makeInvokeMethod(innerFn, self, context);
1030    return generator;
1031  }
1032
1033  exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
1034  // record like context.tryEntries[i].completion. This interface could
1035  // have been (and was previously) designed to take a closure to be
1036  // invoked without arguments, but in all the cases we care about we
1037  // already have an existing method we want to call, so there's no need
1038  // to create a new function object. We can even get away with assuming
1039  // the method takes exactly one argument, since that happens to be true
1040  // in every case, so we don't have to touch the arguments object. The
1041  // only additional allocation required is the completion record, which
1042  // has a stable shape and so hopefully should be cheap to allocate.
1043
1044  function tryCatch(fn, obj, arg) {
1045    try {
1046      return {
1047        type: "normal",
1048        arg: fn.call(obj, arg)
1049      };
1050    } catch (err) {
1051      return {
1052        type: "throw",
1053        arg: err
1054      };
1055    }
1056  }
1057
1058  var GenStateSuspendedStart = "suspendedStart";
1059  var GenStateSuspendedYield = "suspendedYield";
1060  var GenStateExecuting = "executing";
1061  var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
1062  // breaking out of the dispatch switch statement.
1063
1064  var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
1065  // .constructor.prototype properties for functions that return Generator
1066  // objects. For full spec compliance, you may wish to configure your
1067  // minifier not to mangle the names of these two functions.
1068
1069  function Generator() {}
1070
1071  function GeneratorFunction() {}
1072
1073  function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
1074  // don't natively support it.
1075
1076
1077  var IteratorPrototype = {};
1078
1079  IteratorPrototype[iteratorSymbol] = function () {
1080    return this;
1081  };
1082
1083  var getProto = Object.getPrototypeOf;
1084  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
1085
1086  if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
1087    // This environment has a native %IteratorPrototype%; use it instead
1088    // of the polyfill.
1089    IteratorPrototype = NativeIteratorPrototype;
1090  }
1091
1092  var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
1093  GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
1094  GeneratorFunctionPrototype.constructor = GeneratorFunction;
1095  GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the
1096  // Iterator interface in terms of a single ._invoke method.
1097
1098  function defineIteratorMethods(prototype) {
1099    ["next", "throw", "return"].forEach(function (method) {
1100      prototype[method] = function (arg) {
1101        return this._invoke(method, arg);
1102      };
1103    });
1104  }
1105
1106  exports.isGeneratorFunction = function (genFun) {
1107    var ctor = typeof genFun === "function" && genFun.constructor;
1108    return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
1109    // do is to check its .name property.
1110    (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
1111  };
1112
1113  exports.mark = function (genFun) {
1114    if (Object.setPrototypeOf) {
1115      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
1116    } else {
1117      genFun.__proto__ = GeneratorFunctionPrototype;
1118
1119      if (!(toStringTagSymbol in genFun)) {
1120        genFun[toStringTagSymbol] = "GeneratorFunction";
1121      }
1122    }
1123
1124    genFun.prototype = Object.create(Gp);
1125    return genFun;
1126  }; // Within the body of any async function, `await x` is transformed to
1127  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
1128  // `hasOwn.call(value, "__await")` to determine if the yielded value is
1129  // meant to be awaited.
1130
1131
1132  exports.awrap = function (arg) {
1133    return {
1134      __await: arg
1135    };
1136  };
1137
1138  function AsyncIterator(generator) {
1139    function invoke(method, arg, resolve, reject) {
1140      var record = tryCatch(generator[method], generator, arg);
1141
1142      if (record.type === "throw") {
1143        reject(record.arg);
1144      } else {
1145        var result = record.arg;
1146        var value = result.value;
1147
1148        if (value && _typeof(value) === "object" && hasOwn.call(value, "__await")) {
1149          return Promise.resolve(value.__await).then(function (value) {
1150            invoke("next", value, resolve, reject);
1151          }, function (err) {
1152            invoke("throw", err, resolve, reject);
1153          });
1154        }
1155
1156        return Promise.resolve(value).then(function (unwrapped) {
1157          // When a yielded Promise is resolved, its final value becomes
1158          // the .value of the Promise<{value,done}> result for the
1159          // current iteration.
1160          result.value = unwrapped;
1161          resolve(result);
1162        }, function (error) {
1163          // If a rejected Promise was yielded, throw the rejection back
1164          // into the async generator function so it can be handled there.
1165          return invoke("throw", error, resolve, reject);
1166        });
1167      }
1168    }
1169
1170    var previousPromise;
1171
1172    function enqueue(method, arg) {
1173      function callInvokeWithMethodAndArg() {
1174        return new Promise(function (resolve, reject) {
1175          invoke(method, arg, resolve, reject);
1176        });
1177      }
1178
1179      return previousPromise = // If enqueue has been called before, then we want to wait until
1180      // all previous Promises have been resolved before calling invoke,
1181      // so that results are always delivered in the correct order. If
1182      // enqueue has not been called before, then it is important to
1183      // call invoke immediately, without waiting on a callback to fire,
1184      // so that the async generator function has the opportunity to do
1185      // any necessary setup in a predictable way. This predictability
1186      // is why the Promise constructor synchronously invokes its
1187      // executor callback, and why async functions synchronously
1188      // execute code before the first await. Since we implement simple
1189      // async functions in terms of async generators, it is especially
1190      // important to get this right, even though it requires care.
1191      previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
1192      // invocations of the iterator.
1193      callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
1194    } // Define the unified helper method that is used to implement .next,
1195    // .throw, and .return (see defineIteratorMethods).
1196
1197
1198    this._invoke = enqueue;
1199  }
1200
1201  defineIteratorMethods(AsyncIterator.prototype);
1202
1203  AsyncIterator.prototype[asyncIteratorSymbol] = function () {
1204    return this;
1205  };
1206
1207  exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
1208  // AsyncIterator objects; they just return a Promise for the value of
1209  // the final result produced by the iterator.
1210
1211  exports.async = function (innerFn, outerFn, self, tryLocsList) {
1212    var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList));
1213    return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
1214    : iter.next().then(function (result) {
1215      return result.done ? result.value : iter.next();
1216    });
1217  };
1218
1219  function makeInvokeMethod(innerFn, self, context) {
1220    var state = GenStateSuspendedStart;
1221    return function invoke(method, arg) {
1222      if (state === GenStateExecuting) {
1223        throw new Error("Generator is already running");
1224      }
1225
1226      if (state === GenStateCompleted) {
1227        if (method === "throw") {
1228          throw arg;
1229        } // Be forgiving, per 25.3.3.3.3 of the spec:
1230        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
1231
1232
1233        return doneResult();
1234      }
1235
1236      context.method = method;
1237      context.arg = arg;
1238
1239      while (true) {
1240        var delegate = context.delegate;
1241
1242        if (delegate) {
1243          var delegateResult = maybeInvokeDelegate(delegate, context);
1244
1245          if (delegateResult) {
1246            if (delegateResult === ContinueSentinel) continue;
1247            return delegateResult;
1248          }
1249        }
1250
1251        if (context.method === "next") {
1252          // Setting context._sent for legacy support of Babel's
1253          // function.sent implementation.
1254          context.sent = context._sent = context.arg;
1255        } else if (context.method === "throw") {
1256          if (state === GenStateSuspendedStart) {
1257            state = GenStateCompleted;
1258            throw context.arg;
1259          }
1260
1261          context.dispatchException(context.arg);
1262        } else if (context.method === "return") {
1263          context.abrupt("return", context.arg);
1264        }
1265
1266        state = GenStateExecuting;
1267        var record = tryCatch(innerFn, self, context);
1268
1269        if (record.type === "normal") {
1270          // If an exception is thrown from innerFn, we leave state ===
1271          // GenStateExecuting and loop back for another invocation.
1272          state = context.done ? GenStateCompleted : GenStateSuspendedYield;
1273
1274          if (record.arg === ContinueSentinel) {
1275            continue;
1276          }
1277
1278          return {
1279            value: record.arg,
1280            done: context.done
1281          };
1282        } else if (record.type === "throw") {
1283          state = GenStateCompleted; // Dispatch the exception by looping back around to the
1284          // context.dispatchException(context.arg) call above.
1285
1286          context.method = "throw";
1287          context.arg = record.arg;
1288        }
1289      }
1290    };
1291  } // Call delegate.iterator[context.method](context.arg) and handle the
1292  // result, either by returning a { value, done } result from the
1293  // delegate iterator, or by modifying context.method and context.arg,
1294  // setting context.delegate to null, and returning the ContinueSentinel.
1295
1296
1297  function maybeInvokeDelegate(delegate, context) {
1298    var method = delegate.iterator[context.method];
1299
1300    if (method === undefined) {
1301      // A .throw or .return when the delegate iterator has no .throw
1302      // method always terminates the yield* loop.
1303      context.delegate = null;
1304
1305      if (context.method === "throw") {
1306        // Note: ["return"] must be used for ES3 parsing compatibility.
1307        if (delegate.iterator["return"]) {
1308          // If the delegate iterator has a return method, give it a
1309          // chance to clean up.
1310          context.method = "return";
1311          context.arg = undefined;
1312          maybeInvokeDelegate(delegate, context);
1313
1314          if (context.method === "throw") {
1315            // If maybeInvokeDelegate(context) changed context.method from
1316            // "return" to "throw", let that override the TypeError below.
1317            return ContinueSentinel;
1318          }
1319        }
1320
1321        context.method = "throw";
1322        context.arg = new TypeError("The iterator does not provide a 'throw' method");
1323      }
1324
1325      return ContinueSentinel;
1326    }
1327
1328    var record = tryCatch(method, delegate.iterator, context.arg);
1329
1330    if (record.type === "throw") {
1331      context.method = "throw";
1332      context.arg = record.arg;
1333      context.delegate = null;
1334      return ContinueSentinel;
1335    }
1336
1337    var info = record.arg;
1338
1339    if (!info) {
1340      context.method = "throw";
1341      context.arg = new TypeError("iterator result is not an object");
1342      context.delegate = null;
1343      return ContinueSentinel;
1344    }
1345
1346    if (info.done) {
1347      // Assign the result of the finished delegate to the temporary
1348      // variable specified by delegate.resultName (see delegateYield).
1349      context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
1350
1351      context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
1352      // exception, let the outer generator proceed normally. If
1353      // context.method was "next", forget context.arg since it has been
1354      // "consumed" by the delegate iterator. If context.method was
1355      // "return", allow the original .return call to continue in the
1356      // outer generator.
1357
1358      if (context.method !== "return") {
1359        context.method = "next";
1360        context.arg = undefined;
1361      }
1362    } else {
1363      // Re-yield the result returned by the delegate method.
1364      return info;
1365    } // The delegate iterator is finished, so forget it and continue with
1366    // the outer generator.
1367
1368
1369    context.delegate = null;
1370    return ContinueSentinel;
1371  } // Define Generator.prototype.{next,throw,return} in terms of the
1372  // unified ._invoke helper method.
1373
1374
1375  defineIteratorMethods(Gp);
1376  Gp[toStringTagSymbol] = "Generator"; // A Generator should always return itself as the iterator object when the
1377  // @@iterator function is called on it. Some browsers' implementations of the
1378  // iterator prototype chain incorrectly implement this, causing the Generator
1379  // object to not be returned from this call. This ensures that doesn't happen.
1380  // See https://github.com/facebook/regenerator/issues/274 for more details.
1381
1382  Gp[iteratorSymbol] = function () {
1383    return this;
1384  };
1385
1386  Gp.toString = function () {
1387    return "[object Generator]";
1388  };
1389
1390  function pushTryEntry(locs) {
1391    var entry = {
1392      tryLoc: locs[0]
1393    };
1394
1395    if (1 in locs) {
1396      entry.catchLoc = locs[1];
1397    }
1398
1399    if (2 in locs) {
1400      entry.finallyLoc = locs[2];
1401      entry.afterLoc = locs[3];
1402    }
1403
1404    this.tryEntries.push(entry);
1405  }
1406
1407  function resetTryEntry(entry) {
1408    var record = entry.completion || {};
1409    record.type = "normal";
1410    delete record.arg;
1411    entry.completion = record;
1412  }
1413
1414  function Context(tryLocsList) {
1415    // The root entry object (effectively a try statement without a catch
1416    // or a finally block) gives us a place to store values thrown from
1417    // locations where there is no enclosing try statement.
1418    this.tryEntries = [{
1419      tryLoc: "root"
1420    }];
1421    tryLocsList.forEach(pushTryEntry, this);
1422    this.reset(true);
1423  }
1424
1425  exports.keys = function (object) {
1426    var keys = [];
1427
1428    for (var key in object) {
1429      keys.push(key);
1430    }
1431
1432    keys.reverse(); // Rather than returning an object with a next method, we keep
1433    // things simple and return the next function itself.
1434
1435    return function next() {
1436      while (keys.length) {
1437        var key = keys.pop();
1438
1439        if (key in object) {
1440          next.value = key;
1441          next.done = false;
1442          return next;
1443        }
1444      } // To avoid creating an additional object, we just hang the .value
1445      // and .done properties off the next function object itself. This
1446      // also ensures that the minifier will not anonymize the function.
1447
1448
1449      next.done = true;
1450      return next;
1451    };
1452  };
1453
1454  function values(iterable) {
1455    if (iterable) {
1456      var iteratorMethod = iterable[iteratorSymbol];
1457
1458      if (iteratorMethod) {
1459        return iteratorMethod.call(iterable);
1460      }
1461
1462      if (typeof iterable.next === "function") {
1463        return iterable;
1464      }
1465
1466      if (!isNaN(iterable.length)) {
1467        var i = -1,
1468            next = function next() {
1469          while (++i < iterable.length) {
1470            if (hasOwn.call(iterable, i)) {
1471              next.value = iterable[i];
1472              next.done = false;
1473              return next;
1474            }
1475          }
1476
1477          next.value = undefined;
1478          next.done = true;
1479          return next;
1480        };
1481
1482        return next.next = next;
1483      }
1484    } // Return an iterator with no values.
1485
1486
1487    return {
1488      next: doneResult
1489    };
1490  }
1491
1492  exports.values = values;
1493
1494  function doneResult() {
1495    return {
1496      value: undefined,
1497      done: true
1498    };
1499  }
1500
1501  Context.prototype = {
1502    constructor: Context,
1503    reset: function reset(skipTempReset) {
1504      this.prev = 0;
1505      this.next = 0; // Resetting context._sent for legacy support of Babel's
1506      // function.sent implementation.
1507
1508      this.sent = this._sent = undefined;
1509      this.done = false;
1510      this.delegate = null;
1511      this.method = "next";
1512      this.arg = undefined;
1513      this.tryEntries.forEach(resetTryEntry);
1514
1515      if (!skipTempReset) {
1516        for (var name in this) {
1517          // Not sure about the optimal order of these conditions:
1518          if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
1519            this[name] = undefined;
1520          }
1521        }
1522      }
1523    },
1524    stop: function stop() {
1525      this.done = true;
1526      var rootEntry = this.tryEntries[0];
1527      var rootRecord = rootEntry.completion;
1528
1529      if (rootRecord.type === "throw") {
1530        throw rootRecord.arg;
1531      }
1532
1533      return this.rval;
1534    },
1535    dispatchException: function dispatchException(exception) {
1536      if (this.done) {
1537        throw exception;
1538      }
1539
1540      var context = this;
1541
1542      function handle(loc, caught) {
1543        record.type = "throw";
1544        record.arg = exception;
1545        context.next = loc;
1546
1547        if (caught) {
1548          // If the dispatched exception was caught by a catch block,
1549          // then let that catch block handle the exception normally.
1550          context.method = "next";
1551          context.arg = undefined;
1552        }
1553
1554        return !!caught;
1555      }
1556
1557      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1558        var entry = this.tryEntries[i];
1559        var record = entry.completion;
1560
1561        if (entry.tryLoc === "root") {
1562          // Exception thrown outside of any try block that could handle
1563          // it, so set the completion value of the entire function to
1564          // throw the exception.
1565          return handle("end");
1566        }
1567
1568        if (entry.tryLoc <= this.prev) {
1569          var hasCatch = hasOwn.call(entry, "catchLoc");
1570          var hasFinally = hasOwn.call(entry, "finallyLoc");
1571
1572          if (hasCatch && hasFinally) {
1573            if (this.prev < entry.catchLoc) {
1574              return handle(entry.catchLoc, true);
1575            } else if (this.prev < entry.finallyLoc) {
1576              return handle(entry.finallyLoc);
1577            }
1578          } else if (hasCatch) {
1579            if (this.prev < entry.catchLoc) {
1580              return handle(entry.catchLoc, true);
1581            }
1582          } else if (hasFinally) {
1583            if (this.prev < entry.finallyLoc) {
1584              return handle(entry.finallyLoc);
1585            }
1586          } else {
1587            throw new Error("try statement without catch or finally");
1588          }
1589        }
1590      }
1591    },
1592    abrupt: function abrupt(type, arg) {
1593      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1594        var entry = this.tryEntries[i];
1595
1596        if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
1597          var finallyEntry = entry;
1598          break;
1599        }
1600      }
1601
1602      if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
1603        // Ignore the finally entry if control is not jumping to a
1604        // location outside the try/catch block.
1605        finallyEntry = null;
1606      }
1607
1608      var record = finallyEntry ? finallyEntry.completion : {};
1609      record.type = type;
1610      record.arg = arg;
1611
1612      if (finallyEntry) {
1613        this.method = "next";
1614        this.next = finallyEntry.finallyLoc;
1615        return ContinueSentinel;
1616      }
1617
1618      return this.complete(record);
1619    },
1620    complete: function complete(record, afterLoc) {
1621      if (record.type === "throw") {
1622        throw record.arg;
1623      }
1624
1625      if (record.type === "break" || record.type === "continue") {
1626        this.next = record.arg;
1627      } else if (record.type === "return") {
1628        this.rval = this.arg = record.arg;
1629        this.method = "return";
1630        this.next = "end";
1631      } else if (record.type === "normal" && afterLoc) {
1632        this.next = afterLoc;
1633      }
1634
1635      return ContinueSentinel;
1636    },
1637    finish: function finish(finallyLoc) {
1638      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1639        var entry = this.tryEntries[i];
1640
1641        if (entry.finallyLoc === finallyLoc) {
1642          this.complete(entry.completion, entry.afterLoc);
1643          resetTryEntry(entry);
1644          return ContinueSentinel;
1645        }
1646      }
1647    },
1648    "catch": function _catch(tryLoc) {
1649      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1650        var entry = this.tryEntries[i];
1651
1652        if (entry.tryLoc === tryLoc) {
1653          var record = entry.completion;
1654
1655          if (record.type === "throw") {
1656            var thrown = record.arg;
1657            resetTryEntry(entry);
1658          }
1659
1660          return thrown;
1661        }
1662      } // The context.catch method must only be called with a location
1663      // argument that corresponds to a known catch block.
1664
1665
1666      throw new Error("illegal catch attempt");
1667    },
1668    delegateYield: function delegateYield(iterable, resultName, nextLoc) {
1669      this.delegate = {
1670        iterator: values(iterable),
1671        resultName: resultName,
1672        nextLoc: nextLoc
1673      };
1674
1675      if (this.method === "next") {
1676        // Deliberately forget the last sent value so that we don't
1677        // accidentally pass it on to the delegate.
1678        this.arg = undefined;
1679      }
1680
1681      return ContinueSentinel;
1682    }
1683  }; // Regardless of whether this script is executing as a CommonJS module
1684  // or not, return the runtime object so that we can declare the variable
1685  // regeneratorRuntime in the outer scope, which allows this module to be
1686  // injected easily by `bin/regenerator --include-runtime script.js`.
1687
1688  return exports;
1689}( // If this script is executing as a CommonJS module, use module.exports
1690// as the regeneratorRuntime namespace. Otherwise create a new empty
1691// object. Either way, the resulting object will be used to initialize
1692// the regeneratorRuntime variable at the top of this file.
1693( false ? undefined : _typeof(module)) === "object" ? module.exports : {});
1694
1695try {
1696  regeneratorRuntime = runtime;
1697} catch (accidentalStrictMode) {
1698  // This module should not be running in strict mode, so the above
1699  // assignment should always work unless something is misconfigured. Just
1700  // in case runtime.js accidentally runs in strict mode, we can escape
1701  // strict mode using a global Function call. This could conceivably fail
1702  // if a Content Security Policy forbids using Function, but in that case
1703  // the proper solution is to fix the accidental strict mode problem. If
1704  // you've misconfigured your bundler to force strict mode and applied a
1705  // CSP to forbid Function, and you're not willing to fix either of those
1706  // problems, please detail your unique predicament in a GitHub issue.
1707  Function("r", "regeneratorRuntime = r")(runtime);
1708}
1709/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
1710
1711/***/ }),
1712
vendor: 801 bytes, lines 1713-1745
1713/***/ "./node_modules/webpack/buildin/module.js":
1714/*!***********************************!*\
1715  !*** (webpack)/buildin/module.js ***!
1716  \***********************************/
1717/*! no static exports found */
1718/***/ (function(module, exports) {
1719
1720module.exports = function (module) {
1721  if (!module.webpackPolyfill) {
1722    module.deprecate = function () {};
1723
1724    module.paths = []; // module.parent = undefined by default
1725
1726    if (!module.children) module.children = [];
1727    Object.defineProperty(module, "loaded", {
1728      enumerable: true,
1729      get: function get() {
1730        return module.l;
1731      }
1732    });
1733    Object.defineProperty(module, "id", {
1734      enumerable: true,
1735      get: function get() {
1736        return module.i;
1737      }
1738    });
1739    module.webpackPolyfill = 1;
1740  }
1741
1742  return module;
1743};
1744
1745/***/ })
1745
1746
1747/******/ });
1748//# sourceMappingURL=scripts.js.map

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.