index of
/
home
/
thefkyzp
/
public_html
/
wp-content
/
plugins
/
forminator
/
build
/
File: /home/thefkyzp/public_html/wp-content/plugins/forminator/build/form-scripts.js
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 382); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { if (process.env.NODE_ENV === 'production') { module.exports = __webpack_require__(78); } else { module.exports = __webpack_require__(79); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; exports.randNumber = randNumber; exports.generateWrapperId = generateWrapperId; exports.getWrapper = getWrapper; exports.getDefaultValue = getDefaultValue; exports.getThemePrefix = getThemePrefix; exports.restrictedGroupFields = restrictedGroupFields; exports.lonerFields = lonerFields; exports.getSubmissionBehaviors = getSubmissionBehaviors; exports.countFieldsByType = countFieldsByType; exports.getMaxIDByType = getMaxIDByType; exports.getMaxID = getMaxID; exports.generateValue = generateValue; exports.hasFieldType = hasFieldType; exports.getFieldsByType = getFieldsByType; exports.mapFieldsByType = mapFieldsByType; exports.getFieldLabel = getFieldLabel; exports.fieldExist = fieldExist; exports.buildFieldObject = buildFieldObject; exports.buildFieldObjectFromSlug = buildFieldObjectFromSlug; exports.getFieldType = getFieldType; exports.getForminatorField = getForminatorField; exports.insertInPosition = insertInPosition; exports.replaceInPosition = replaceInPosition; exports.translate = translate; exports.getFontVariants = getFontVariants; exports.ucfirst = ucfirst; exports.getConditionLabel = getConditionLabel; exports.convertTimestamp = convertTimestamp; exports.getFields = getFields; exports.getDateFields = getDateFields; exports.getNameFields = getNameFields; exports.getRangeSliderFields = getRangeSliderFields; exports.fieldHasNumber = fieldHasNumber; exports.fieldHasCalcs = fieldHasCalcs; exports.fieldFormula = fieldFormula; exports.fieldHasOptions = fieldHasOptions; exports.getFieldValues = getFieldValues; exports.getAddressFields = getAddressFields; exports.getTimeFields = getTimeFields; exports.getFieldAutofillProviders = getFieldAutofillProviders; exports.getRuleLabel = getRuleLabel; exports.isEmailWp = isEmailWp; exports.suiDelegateEvents = suiDelegateEvents; exports.getChartType = getChartType; exports.getCalculationFields = getCalculationFields; exports.select2Tags = select2Tags; exports.isFieldRequired = isFieldRequired; exports.hasFieldWithAttribute = hasFieldWithAttribute; exports.hasPostdataFieldWithMultiselect = hasPostdataFieldWithMultiselect; exports.getPersonalityQuestions = getPersonalityQuestions; exports.getPlanValidation = getPlanValidation; exports.isTrue = isTrue; exports.parseQueryString = parseQueryString; exports.goToLink = goToLink; var _i18nWpPlugin = __webpack_require__(47); var _i18nWpPlugin2 = _interopRequireDefault(_i18nWpPlugin); var _dompurify = __webpack_require__(61); var _dompurify2 = _interopRequireDefault(_dompurify); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } /** * Returns unique 4 digit number * * @return {number} **/ function randNumber() { //return Math.floor( Math.random() * 9999 ); var min = Math.ceil(1000); var max = Math.floor(9999); return Math.floor(Math.random() * (max - min) + min); } /** * Returns wrapper uniq ID * * @return {string} **/ function generateWrapperId() { return 'wrapper-' + randNumber() + '-' + randNumber(); } /** * Returns wrapper object by wrapper ID * * @param {string} wrapperID ID of the wrapper * @param {array} wrappers current wrappers * * @return {string} **/ function getWrapper(wrapperID, wrappers) { var wrapperObject = void 0; wrappers.map(function (wrapper) { if (wrapper.wrapper_id === wrapperID) { wrapperObject = wrapper; } }); return wrapperObject; } /** * Return passed default value or empty if it's Basic theme * * @param {String} getDefaultValue Default value * @param {String} formDesign Property * @return {String} */ function getDefaultValue(props, getDefaultValue) { return getThemeName(props) !== 'basic' ? getDefaultValue : ''; } /** * Get prefix for properties if it's Basic theme * * @param {type} formDesign Property * @return {String} */ function getThemePrefix(props) { return getThemeName(props) === 'basic' ? 'basic-' : ''; } /** * Get design theme name * * @param {type} propsProperties * @return {String} */ function getThemeName(props) { if ("undefined" !== typeof props.formDesign) { return props.formDesign; } if ("undefined" !== typeof props.settings && "undefined" !== typeof props.settings['forminator-poll-design']) return props.settings['forminator-poll-design']; if ("undefined" !== typeof props.quizDesign) return props.quizDesign; return ''; } /** * Returns all field types disabled inside Group Fields * * @return {array} */ function restrictedGroupFields() { return ['page-break', 'paypal', 'stripe', 'signature', 'captcha', 'postdata', 'group']; } /** * Returns all field types that should only occupy a single row. ;( * Field can only be added for new/unreleased field types. * * @return {array} */ function lonerFields() { return ['pdf-page-break', 'all-form-data']; } /** * Returns all behavior types * * @return {object} */ function getSubmissionBehaviors() { return { 'behaviour-thankyou': translate('Inline Message'), 'behaviour-redirect': translate('Redirect user to a URL'), 'behaviour-hide': translate('Hide form') }; } /** * Returns count of existing fields by type * * @param {string} type type of field * @param {array} wrappers current wrappers * * @return {number} **/ function countFieldsByType(type, wrappers) { var counter = 0; wrappers.map(function (wrapper) { wrapper.fields.map(function (field) { if (field.type === type) { counter++; } }); }); return counter; } /** * Returns max ID number by type * * @param {string} type type of field * @param {array} wrappers current wrappers * * @return {number} **/ function getMaxIDByType(type, wrappers) { var fieldIDs = []; wrappers.map(function (wrapper) { wrapper.fields.map(function (field) { if (field.type === type) { var fieldId = field.element_id; var fieldIdArray = fieldId.split('-'); switch (field.type) { case 'page-break': case 'rich-text': fieldIDs.push(parseInt(fieldIdArray[2])); break; case 'all-form-data': case 'pdf-page-break': fieldIDs.push(parseInt(fieldIdArray[3])); break; default: fieldIDs.push(parseInt(fieldIdArray[1])); break; } } }); }); var maxValue = 0; if (!_.isEmpty(fieldIDs)) { maxValue = _.max(fieldIDs); } return parseInt(maxValue) + 1; } function getMaxID(type, values) { var ids = []; _.map(values, function (value) { var fieldId = value.element_id; var fieldIdArray = fieldId.split('-'); ids.push(parseInt(fieldIdArray[1])); }); var maxValue = 0; if (!_.isEmpty(ids)) { maxValue = _.max(ids); } return parseInt(maxValue) + 1; } /** * Returns Label converted to value * * @param {string} value entered label * * @return {string} **/ function generateValue(value) { value = value.trim().replace(/\s+|\//g, '-'); return value; } /** * Return true if it's Global Appearance Preset * * @param {array} wrappers current wrappers * @return {Boolean} */ function isGlobalPreset(wrappers) { return null === wrappers; } /** * Returns true if field exist * * @param {string} type type of field * @param {array} wrappers current wrappers * * @return {bool} **/ function hasFieldType(type, wrappers) { var counter = 0; if (isGlobalPreset(wrappers)) { return true; } wrappers.map(function (wrapper) { wrapper.fields.map(function (field) { if (field.type === type) { counter++; } }); }); return counter > 0; } /** * Returns array of fields by type * * @param {string} type type of field * @param {array} wrappers current wrappers * * @return {array} **/ function getFieldsByType(type, wrappers) { var fields = []; wrappers.map(function (wrapper) { wrapper.fields.map(function (field) { if (field.type === type) { fields.push(field); } }); }); return fields; } /** * Returns array of fields by type mapped for select field * * @param {string} type type of field * @param {array} wrappers current wrappers * * @return {array} **/ function mapFieldsByType(type, wrappers) { var fields = []; var fieldsByType = getFieldsByType(type, wrappers); fieldsByType.map(function (field) { var label = field.field_label; if (type === 'address') { label = field.element_id; } fields.push({ value: field.element_id, label: label, element_id: field.element_id }); }); return fields; } /** * Returns field label by ID * * @param {string} id field ID * @param {array} wrappers current wrappers * * @return {string} **/ function getFieldLabel(id, wrappers) { var label = ''; wrappers.map(function (wrapper) { wrapper.fields.map(function (field) { if (field.element_id === id) { label = field.field_label; } }); }); return label; } /** * Returns true or false if field exist * * @param {string} id field ID * @param {array} wrappers current wrappers * * @return {bool} **/ function fieldExist(id, wrappers) { var exist = 0; wrappers.map(function (wrapper) { wrapper.fields.map(function (field) { if (field.element_id === id) { exist++; } }); }); return exist > 0; } /** * Returns field object with defaults from slug * * @param {object} field field * @param {string} wrapperID wrapper id * @param {number} cols columns * @param {array} wrappers wrappers * @param {array} tempNewFields New Siblings Fields that aren't included in wrappers yet * * @return {object} **/ function buildFieldObject(field, wrapperID, cols, wrappers, tempNewFields) { tempNewFields = tempNewFields || []; var wraps = [].concat(_toConsumableArray(wrappers), [{ fields: tempNewFields }]); var fieldNumber = getMaxIDByType(field.type, wraps); return _.extend(field, { element_id: field.type + '-' + fieldNumber, formID: wrapperID, cols: cols }); } /** * Returns field object with defaults from slug * * @param {string} slug field slug * @param {array} wrappers wrappers * @param {string} wrapepr ID * * @return {object} **/ function buildFieldObjectFromSlug(slug, wrappers, wrapperID) { var field = forminatorData.fields.find(function (fieldData) { return fieldData.slug === slug; }); var fieldNumber = getMaxIDByType(field.type, wrappers); var props = { element_id: field.type + '-' + fieldNumber, type: field.type, options: field.options, cols: 12, conditions: {}, wrapper_id: wrapperID }; if (_.contains(['calculation', 'number', 'slider', 'radio', 'currency', 'select', 'checkbox'], field.type)) { props['hidden_behavior'] = 'zero'; } return _.extend(props, JSON.parse(JSON.stringify(field.defaults))); } /** * Returns field type by field object * * @param {object} field field * * @return {string} **/ function getFieldType(field) { var type = field.type; return type; } /** * Returns forminatorData.fields(PHP) from field object from builder * * Comparing `type` * * @param {object} field field * * @return {object} **/ function getForminatorField(field) { return forminatorData.fields.find(function (forminatorField) { return forminatorField.type === field.type; }); } /** * Insert item into array in specific position * * @param {array} array array * @param {number} position position * @param {any} replacement replacement * * @return {array} array */ function insertInPosition(array, position, replacement) { return [].concat(_toConsumableArray(array.slice(0, position)), [replacement], _toConsumableArray(array.slice(position))); } /** * Replace item in array in specific position * * @param {array} array array * @param {number} position position * @param {any} replacement replacement * * @return {array} array */ function replaceInPosition(array, position, replacement) { return [].concat(_toConsumableArray(array.slice(0, position)), [replacement], _toConsumableArray(array.slice(position + 1))); } /** * Translate string * * @see i18n.translate * * @return {string} translated string */ function translate() { return _i18nWpPlugin2.default.translate.apply(null, arguments); } /** * Returns variants for selected font * * @param {string} value font * @param {array} fonts fonts * @return {array} **/ function getFontVariants(value, fonts) { var fontObject = _.filter(fonts, function (font) { return font.family === value; }); if (!_.isUndefined(fontObject[0]) && !_.isUndefined(fontObject[0].variants)) { return fontObject[0].variants; } return [translate('None')]; } /** * Capitalize string * * @param {string} value value * @returns {string} **/ function ucfirst(value) { return value.charAt(0).toUpperCase() + value.slice(1); } /** * Get condition label * * @returns {string} */ function getConditionLabel(field, condition) { var value = condition.value; var valueLabel = void 0; // If option field and have values, we need the option updateValue // Else return the field value if (field.hasOptions && field.values.length > 0) { var label = void 0; // Check in values label = _.where(field.values, { value: value })[0]; // If label is not set, check in labels if (!label) { label = _.where(field.values, { label: value })[0]; } // If label is still not found, return if (!label) { return; } valueLabel = label.label; } else if ('date' === field.field_type && ['is_before', 'is_after'].includes(condition.rule)) { // Get formatted date string valueLabel = convertTimestamp(value); } else { valueLabel = value; } // If label empty, return null if (_.isEmpty(valueLabel)) { return translate('null'); } return valueLabel; } /* * Convert date from timestamp */ function convertTimestamp(value) { if (!isNaN(Number(value))) { // Convert timestamp to Date object var date = new Date(value * 1); // Options for formatting the date var options = { day: 'numeric', month: 'numeric', year: 'numeric' }; // Get the formatted date string value = date.toLocaleDateString('en-US', options); } return value; } function sanitizeString(str) { if (!str) { return ''; } str = _dompurify2.default.sanitize(str, { ALLOWED_TAGS: [], ALLOWED_ATTR: [] }); var tempDiv = document.createElement('div'); tempDiv.innerHTML = str; var decodedString = tempDiv.textContent || tempDiv.innerText || ''; return _dompurify2.default.sanitize(decodedString, { ALLOWED_TAGS: [], ALLOWED_ATTR: [] }); } /* * Returns builder fields from wrappers */ function getFields(wrappers, disabledFields, extra, includedFields, excludeSubFields) { var fieldsArray = []; if (_.isUndefined(disabledFields)) { disabledFields = ['page-break', 'postdata', 'total', 'product', 'captcha']; } if (Array.isArray(disabledFields) && !isTrue(excludeSubFields)) { disabledFields.push('group'); } var main_date_field = false; if (!_.isUndefined(extra) && !_.isUndefined(extra.main_date_field) && extra.main_date_field === true) { main_date_field = true; } // Loop all wrappers we have wrappers.map(function (wrapper) { var fields = wrapper.fields, parentGroup = wrapper.parent_group; fields.map(function (field) { // Check if field is included if (!_.isUndefined(includedFields)) { if (!_.contains(includedFields, field.type)) { return; } } else if (_.contains(disabledFields, field.type)) { // Check if field is disabled return; } var label = void 0; // Get field label if (!_.isUndefined(field.field_label) && !_.isEmpty(field.field_label)) { label = field.field_label; } else { label = field.type; label = ucfirst(label); } // If field is name, get all existing sub fields if (field.type === 'name' && !isTrue(excludeSubFields)) { fieldsArray = fieldsArray.concat(getNameFields(field, label, parentGroup)); } else if (field.type === 'address' && !isTrue(excludeSubFields)) { fieldsArray = fieldsArray.concat(getAddressFields(field, label, parentGroup)); } else if (field.type === 'slider' && field.slider_type === 'range') { fieldsArray = fieldsArray.concat(getRangeSliderFields(field, label, parentGroup)); } else if (field.type === 'time' && !isTrue(excludeSubFields)) { fieldsArray = fieldsArray.concat(getTimeFields(field, label, parentGroup)); } else if (field.type === 'date' && field.field_type !== 'picker' && main_date_field === false) { //skip now } else { fieldsArray.push({ element_id: field.element_id, parent_group: parentGroup, required: field.required, field_type: field.type, field_slug: field.type, label: label, values: getFieldValues(field), hasOptions: fieldHasOptions(field), hasCalcs: fieldHasCalcs(field), formula: fieldFormula(field), isNumber: fieldHasNumber(field), fieldData: field }); } if (field.type === 'date' && field.field_type !== 'picker' && !isTrue(excludeSubFields)) { fieldsArray = fieldsArray.concat(getDateFields(field, label, parentGroup)); } }); }); // Sanitize all labels. fieldsArray.map(function (field) { field.label = sanitizeString(field.label); }); return fieldsArray; } /** * Get name_fields (support dropdown & input date fields) * @param {object} field field to parse * @param {string} fieldLabel parent label * @returns {Array} **/ function getDateFields(field, fieldLabel, parentGroup) { var fieldsArray = []; var day_label = void 0; if (!_.isUndefined(field.day_label) && !_.isEmpty(field.day_label)) { day_label = fieldLabel + ' - ' + field.day_label; } else { day_label = fieldLabel + ' - ' + translate('Day'); } var month_label = void 0; if (!_.isUndefined(field.month_label) && !_.isEmpty(field.month_label)) { month_label = fieldLabel + ' - ' + field.month_label; } else { month_label = fieldLabel + ' - ' + translate('Month'); } var year_label = void 0; if (!_.isUndefined(field.year_label) && !_.isEmpty(field.year_label)) { year_label = fieldLabel + ' - ' + field.year_label; } else { year_label = fieldLabel + ' - ' + translate('Year'); } if (field.field_type === 'input') { fieldsArray.push({ element_id: field.element_id + '-day', parent_group: parentGroup, required: field.required, field_type: field.type, field_slug: field.type + '-day', label: day_label, values: false, hasOptions: false, isNumber: true }, { element_id: field.element_id + '-month', parent_group: parentGroup, required: field.required, field_type: field.type, field_slug: field.type + '-month', label: month_label, values: false, hasOptions: false, isNumber: true }, { element_id: field.element_id + '-year', parent_group: parentGroup, required: field.required, field_type: field.type, field_slug: field.type + '-year', label: year_label, values: false, hasOptions: false, isNumber: true }); } else { fieldsArray.push({ element_id: field.element_id + '-day', parent_group: parentGroup, required: field.required, field_type: field.type, field_slug: field.type + '-day', label: day_label, values: getFieldValues(field), hasOptions: fieldHasOptions(field), isNumber: fieldHasNumber(field) }, { element_id: field.element_id + '-month', parent_group: parentGroup, required: field.required, field_type: field.type, field_slug: field.type + '-month', label: month_label, values: getFieldValues(field), hasOptions: fieldHasOptions(field), isNumber: fieldHasNumber(field) }, { element_id: field.element_id + '-year', parent_group: parentGroup, required: field.required, field_type: field.type, field_slug: field.type + '-year', label: year_label, values: getFieldValues(field), hasOptions: fieldHasOptions(field), isNumber: fieldHasNumber(field) }); } return fieldsArray; } /** * Get name_fields (support multiple name fields) * @param {object} field field to parse * @param {string} fieldLabel parent label * @returns {Array} **/ function getNameFields(field, fieldLabel, parentGroup) { var fieldsArray = []; //handle multiple name if (field.multiple_name === 'true' || true === field.multiple_name) { [{ attr: 'prefix', label: 'prefix_label', element_suffix: 'prefix', hasOptions: true, values: [{ label: 'Mr.', value: 'Mr' }, { label: 'Mrs.', value: 'Mrs' }, { label: 'Ms.', value: 'Ms' }, { label: 'Mx.', value: 'Mx' }, { label: 'Miss', value: 'Miss' }, { label: 'Dr.', value: 'Dr' }, { label: 'Prof.', value: 'Prof' }], isNumber: false }, { attr: 'fname', label: 'fname_label', element_suffix: 'first-name', hasOptions: false, values: false, isNumber: false }, { attr: 'mname', label: 'mname_label', element_suffix: 'middle-name', hasOptions: false, values: false, isNumber: false }, { attr: 'lname', label: 'lname_label', element_suffix: 'last-name', hasOptions: false, values: false, isNumber: false }].map(function (attribute) { if (field[attribute.attr] === 'true' || field[attribute.attr] === true) { var label = void 0; if (!_.isUndefined(field[attribute.label]) && !_.isEmpty(field[attribute.label])) { label = fieldLabel + ' - ' + field[attribute.label]; } else { label = fieldLabel + ' - '; } fieldsArray.push({ element_id: field.element_id + '-' + attribute.element_suffix, parent_group: parentGroup, required: field.required, field_type: field.type, field_slug: field.type + '-' + attribute.element_suffix, label: label, values: attribute.values, hasOptions: attribute.hasOptions, isNumber: attribute.isNumber }); } }); } else { fieldsArray.push({ element_id: field.element_id, parent_group: parentGroup, required: field.required, field_type: field.type, field_slug: field.type, label: fieldLabel, values: getFieldValues(field), hasOptions: fieldHasOptions(field), isNumber: fieldHasNumber(field) }); } return fieldsArray; } /** * Get Range Slider fields * @param {object} field field to parse * @param {string} fieldLabel parent label * @returns {Array} **/ function getRangeSliderFields(field, fieldLabel, parentGroup) { var fieldsArray = []; [{ suffix: 'min' }, { suffix: 'max' }].map(function (attribute) { fieldsArray.push({ element_id: field.element_id + '-' + attribute.suffix, parent_group: parentGroup, required: field.required, field_type: field.type, field_slug: field.type + '-' + attribute.suffix, label: fieldLabel + ' - ' + attribute.suffix, isNumber: true, hasCalcs: fieldHasCalcs(field) }); }); return fieldsArray; } /* * Returns if field has number */ function fieldHasNumber(field) { if (_.contains(['calculation', 'number', 'slider', 'phone', 'currency'], field.type)) { return true; } return false; } /* * Returns if field has calculations enabled */ function fieldHasCalcs(field) { if (field.calculations === 'true' || field.calculations === true) { return true; } return false; } function fieldFormula(field) { if (field.formula) { return field.formula; } return false; } /* * Returns if field has options */ function fieldHasOptions(field) { if (field.type === 'select' || field.type === 'checkbox' || field.type === 'radio') { return true; } return false; } /* * Returns field values */ function getFieldValues(field) { var type = field.type; if (type === 'select' || type === 'checkbox' || type === 'radio') { return field.options; } return false; } /** * Get address_fields (support multi sub fields) * @param {object} field field * @param {string} fieldLabel lbel * @returns {array} **/ function getAddressFields(field, fieldLabel, parentGroup) { var fieldsArray = []; [{ attr: 'street_address', label: 'street_address_label', element_suffix: 'street_address', hasOptions: false, values: false, isNumber: false }, { attr: 'address_line', label: 'address_line_label', element_suffix: 'address_line', hasOptions: false, values: false, isNumber: false }, { attr: 'address_city', label: 'address_city_label', element_suffix: 'city', hasOptions: false, values: false, isNumber: false }, { attr: 'address_state', label: 'address_state_label', element_suffix: 'state', hasOptions: false, values: false, isNumber: false }, { attr: 'address_zip', label: 'address_zip_label', element_suffix: 'zip', hasOptions: false, values: false, isNumber: false }, { attr: 'address_country', label: 'address_country_label', element_suffix: 'country', hasOptions: false, values: false, isNumber: false }].map(function (attribute) { if (isTrue(field[attribute.attr])) { var label = void 0; if (!_.isUndefined(field[attribute.label]) && !_.isEmpty(field[attribute.label])) { label = fieldLabel + ' - ' + field[attribute.label]; } else { label = fieldLabel + ' - '; } fieldsArray.push({ element_id: field.element_id + '-' + attribute.element_suffix, parent_group: parentGroup, required: field.required, field_type: field.type, field_slug: field.type + '-' + attribute.element_suffix, label: label, values: attribute.values, hasOptions: attribute.hasOptions, isNumber: attribute.isNumber }); } }); return fieldsArray; } /** * Get time_fields (support multi sub fields) * @param {object} field field * @param {string} fieldLabel label * @returns {array} **/ function getTimeFields(field, fieldLabel, parentGroup) { var fieldsArray = []; var hh_label = void 0; if (!_.isUndefined(field.hh_label) && !_.isEmpty(field.hh_label)) { hh_label = fieldLabel + ' - ' + field.hh_label; } else { hh_label = fieldLabel + ' - ' + translate('Hour'); } var mm_label = void 0; if (!_.isUndefined(field.mm_label) && !_.isEmpty(field.mm_label)) { mm_label = fieldLabel + ' - ' + field.mm_label; } else { mm_label = fieldLabel + ' - ' + translate('Minute'); } fieldsArray.push({ element_id: field.element_id + '-hours', parent_group: parentGroup, required: field.required, field_type: field.type, field_slug: field.type + '-hours', label: hh_label, values: false, hasOptions: false, isNumber: true }, { element_id: field.element_id + '-minutes', parent_group: parentGroup, required: field.required, field_type: field.type, field_slug: field.type + '-minutes', label: mm_label, values: false, hasOptions: false, isNumber: true }); if (field.time_type === 'twelve') { fieldsArray.push({ element_id: field.element_id + '-ampm', parent_group: parentGroup, required: field.required, field_type: field.type, field_slug: field.type + '-ampm', label: fieldLabel + '-AM/PM', values: [{ label: 'AM', value: 'am' }, { label: 'PM', value: 'pm' }], hasOptions: true, isNumber: false }); } return fieldsArray; } /** * * @param {string} fieldType fieldType * @returns {array} **/ function getFieldAutofillProviders(fieldType) { var autofillProviders = []; var fieldSettings = forminatorData.fields.filter(function (field) { return field.type === fieldType; }); if (fieldSettings.length < 1) { return []; } fieldSettings = fieldSettings[0]; if (!_.isUndefined(fieldSettings.autofill_settings)) { autofillProviders = fieldSettings.autofill_settings; } return autofillProviders; } /** * Returns label by rule value * * @param {string} rule rule * @param {string} type type * @param {mix} type value ( optional ) * @returns {string} **/ function getRuleLabel(rule, type, value) { var val = !_.isUndefined(value) ? value : ''; switch (rule) { case 'is': return translate('is'); case 'is_not': return translate('is not'); case 'day_is': return translate('day is'); case 'day_is_not': return translate('day is not'); case 'month_is_not': return translate('month is not'); case 'month_is': return translate('month is'); case 'is_before': return translate('is before'); case 'is_after': return translate('is after'); case 'is_before_n_or_more_days': return translate('is before %s or more days from current date').replace('%s', val); case 'is_before_less_than_n_days': return translate('is before less than %s days from current date').replace('%s', val); case 'is_after_n_or_more_days': return translate('is after %s or more days from current date').replace('%s', val); case 'is_after_less_than_n_days': return translate('is after less than %s days from current date').replace('%s', val); case 'is_great': return translate('is greater than'); case 'is_less': return translate('is less than'); case 'contains': return translate('contains'); case 'does_not_contain': return translate('does not contain'); case 'starts': return translate('starts with'); case 'ends': return translate('ends with'); case 'is_correct': return translate('is correct'); case 'is_incorrect': return translate('is incorrect'); // Personality quiz rules. case 'is_final_result': return translate('is final result'); case 'is_not_final_result': return translate('is not final result'); default: return '-'; } } /** * Return if value is valid email wp * * @param {string} value value to check * @returns {bool} **/ function isEmailWp(value) { if (value.length < 6) { return false; } // Test for an @ character after the first position if (value.indexOf('@', 1) < 0) { return false; } // Split out the local and domain parts var parts = value.split('@', 2); // LOCAL PART // Test for invalid characters if (!parts[0].match(/^[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~\.-]+$/)) { return false; } // DOMAIN PART // Test for sequences of periods if (parts[1].match(/\.{2,}/)) { return false; } var domain = parts[1]; // Split the domain into subs var subs = domain.split('.'); if (subs.length < 2) { return false; } var subsLen = subs.length; for (var i = 0; i < subsLen; i++) { // Test for invalid characters if (!subs[i].match(/^[a-z0-9-]+$/i)) { return false; } } return true; } /** * Display SUI JS Elements **/ function suiDelegateEvents() { if ('object' !== _typeof(window.SUI)) { return; } // Time it out setTimeout(function () { // Rebind Accordion scripts SUI.suiAccordion(jQuery('.sui-accordion')); // Rebind Tabs scripts SUI.suiTabs(jQuery('.sui-tabs')); // Rebind Select2 scripts. jQuery('select.sui-select[data-theme="icon"]').each(function () { SUI.select.initIcon(jQuery(this)); }); jQuery('select.sui-select[data-theme="color"]').each(function () { SUI.select.initColor(jQuery(this)); }); jQuery('select.sui-select[data-theme="search"]').each(function () { SUI.select.initSearch(jQuery(this)); }); jQuery('select.sui-select:not([data-theme]):not(.custom-select2):not(.fui-multi-select)').each(function () { SUI.select.init(jQuery(this)); }); // Rebind Variables scripts. jQuery('select.sui-variables').each(function () { SUI.select.initVars(jQuery(this)); }); // Rebind Circle scripts SUI.loadCircleScore(jQuery('.sui-circle-score')); // Rebind Password scripts SUI.showHidePassword(); }, 50); } /** * Returns chart type from settings * * @param {array} settings Settings array * * @return {string} Chart type */ function getChartType(settings) { var type = 'none'; if (_typeof(settings['results-behav']) && _typeof(settings['results-style'])) { if (settings['results-behav'] === 'link_on' || settings['results-behav'] === 'show_after') { type = settings['results-style']; } } return type; } /** * Returns array of calculation fields * * @param {array} wrappers current wrappers * * @return {array} **/ function getCalculationFields(wrappers) { var disabled = []; // Push disabled fields _.each(forminatorData.fields, function (field) { if (field.type !== 'calculation') { disabled.push(field.type); } }); return getFields(wrappers, disabled); } /** * Display Select2 with multiple tags * * @param {jQuery} $el jQuery wrapper el to find * @param {object} options Select2 options **/ function select2Tags($el, options) { options = _.defaults(options, { allowClear: true, dropdownCssClass: 'sui-select-dropdown' }); // SELECT2 forminator-ui-tags $el.find('select.sui-select.fui-multi-select').each(function () { // reorder-support, it will preserve order based on user tags added if (jQuery(this).attr('data-reorder')) { jQuery(this).on('select2:select', function (e) { var elm = e.params.data.element, $elm = jQuery(elm), $t = jQuery(this); $t.append($elm); $t.trigger('change.select2'); }); } jQuery(this).SUIselect2(options); }); } /** * Returns if field is required * * @param {object} field field * * @return {bool} **/ function isFieldRequired(field) { // Handle name field sub fields if (field.type === 'name') { if (field.multiple_name === 'true' || field.multiple_name === true) { // We have multi field if (field['prefix_required'] || field['fname_required'] || field['mname_required'] || field['lname_required']) { return true; } else { return false; } } } // Handle name field sub fields if (field.type === 'address') { if (field['street_address_required'] || field['address_line_required'] || field['address_city_required'] || field['address_state_required'] || field['address_zip_required'] || field['address_country_required']) { return true; } else { return false; } } // Fallback to default required prop return field.required; } /* * Returns if form has a field with requested attribute and the requested value */ function hasFieldWithAttribute(wrappers, type, attribute, value) { var counter = 0; if (isGlobalPreset(wrappers)) { return true; } wrappers.map(function (wrapper) { wrapper.fields.map(function (field) { if (type === field.type && value === field[attribute]) { counter++; } }); }); return counter > 0; } /* * Returns if form has a field with multiple category */ function hasPostdataFieldWithMultiselect(wrappers) { var counter = 0; if (isGlobalPreset(wrappers)) { return true; } wrappers.map(function (wrapper) { wrapper.fields.map(function (field) { var post_category = forminatorData.postCategories[field.post_type]; if (typeof post_category !== 'undefined') { post_category.map(function (category) { var category_key = category.value + '_multiple'; if (1 === parseInt(field[category_key])) { counter++; } }); } }); }); return counter > 0; } /** * Returns array of personality questions * * @param {array} * * @return {array} **/ function getPersonalityQuestions(currentPersonality, questions) { var personalitySlug = currentPersonality.slug; var questionsArray = []; if (!_.isEmpty(questions)) { _.each(questions, function (question, keyQuestion) { if (!_.isEmpty(question.answers)) { _.each(question.answers, function (answer, keyAnswer) { if (answer.result === personalitySlug) { questionsArray.push({ title: question.title, slug: question.slug, question: question }); } }); } }); questionsArray = _.uniq(questionsArray, 'slug'); } return questionsArray; } /** * Get payment plan validation * * @param {array} validation * @param {array} payments * * @return {array} */ function getPlanValidation(validation, payments) { var paymentIndex = []; _.each(payments, function (payment, index) { if (!payment.amount_type || !payment.plan_name) { validation.error = translate('Please fix the error(s) in the SETTINGS tab.'); validation.isValid = false; paymentIndex.push(index); } if ('single' === payment.payment_method && ('fixed' === payment.amount_type && _.isEmpty(payment.amount) || 'variable' === payment.amount_type && _.isEmpty(payment.variable))) { validation.error = translate('Please fix the error(s) in the SETTINGS tab.'); validation.isValid = false; paymentIndex.push(index); } else if ('subscription' === payment.payment_method) { var subscriptionAmount = !_.isUndefined(payment.subscription_amount_type) ? payment.subscription_amount_type : 'fixed'; var subscriptionQuantity = !_.isUndefined(payment.quantity_type) ? payment.quantity_type : 'fixed'; var Quantity = !_.isUndefined(payment.quantity) ? payment.quantity : 1; var BillInput = !_.isUndefined(payment.bill_input) ? payment.bill_input : 1; if ('fixed' === subscriptionAmount && _.isEmpty(payment.subscription_amount) || 'variable' === subscriptionAmount && _.isEmpty(payment.subscription_variable)) { validation.error = translate('Please fix the error(s) in the SETTINGS tab.'); validation.isValid = false; paymentIndex.push(index); } if ('fixed' === subscriptionQuantity && !Quantity || 'variable' === subscriptionQuantity && _.isEmpty(payment.variable_quantity)) { validation.error = translate('Please fix the error(s) in the SETTINGS tab.'); validation.isValid = false; paymentIndex.push(index); } if (!BillInput) { validation.error = translate('Please fix the error(s) in the SETTINGS tab.'); validation.isValid = false; paymentIndex.push(index); } else if (BillInput <= 0) { validation.error = translate('Billing frequency should be greater than or equal to 1'); validation.isValid = false; paymentIndex.push(index); } } }); if (paymentIndex.length > 0) { validation.paymentKey = paymentIndex; } return validation; } /** * Check if value evaluates to true * * @param {string} value * * @return {bool} */ function isTrue(value) { if ('undefined' === typeof value) { return false; } if ('string' === typeof value) { value = value.trim().toLowerCase(); } switch (value) { case true: case "true": case 1: case "1": case "on": case "yes": return true; default: return false; } } /** * Parse query string * * * @return {string} */ function parseQueryString() { var parsedParameters = {}, uriParameters = location.search.substring(1).split('&'); for (var i = 0; i < uriParameters.length; i++) { var parameter = uriParameters[i].split('='); parsedParameters[parameter[0]] = decodeURIComponent(parameter[1]); } return parsedParameters; } /** Go to link * * @param {string} value * */ function goToLink(link) { var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '_blank'; window.open(link, target); } /***/ }), /* 2 */ /***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Container = function (_Component) { _inherits(Container, _Component); function Container(props) { _classCallCheck(this, Container); return _possibleConstructorReturn(this, (Container.__proto__ || Object.getPrototypeOf(Container)).call(this, props)); } _createClass(Container, [{ key: 'render', value: function render() { var children = _react2.default.Children.map(this.props.children, function (child) { return child; }); return _react2.default.createElement( 'div', null, children ); } }]); return Container; }(_react.Component); exports.default = Container; /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Input = function (_Component) { _inherits(Input, _Component); function Input(props) { _classCallCheck(this, Input); var _this = _possibleConstructorReturn(this, (Input.__proto__ || Object.getPrototypeOf(Input)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); return _this; } _createClass(Input, [{ key: 'updateValue', value: function updateValue(value) { // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } } }, { key: 'isValid', value: function isValid(value) { if (this.props.isRequired) { return this.props.isRequired && !_.isEmpty(value); } else if (!_.isUndefined(this.props.isPositive)) { return _.isEmpty(value) || value >= 0; } return true; } }, { key: 'isMaxValid', value: function isMaxValid(value) { if (!_.isUndefined(this.props.maxValid)) { return !_.isNull(value) && value <= this.props.maxValid; } return true; } }, { key: 'render', value: function render() { var _this2 = this; var value = _.isUndefined(this.props.settings[this.props.property]) ? this.props.defaultValue : this.props.settings[this.props.property]; var type = !_.isUndefined(this.props.type) ? this.props.type : 'text'; var requiredError = !_.isUndefined(this.props.requiredError) ? this.props.requiredError : (0, _utils.translate)('This field is required!'); var hasErrorClass = !this.isValid(value) || !this.isMaxValid(value) ? 'sui-form-field-error' : ''; var maxValidError = !_.isUndefined(this.props.maxValidError) ? this.props.maxValidError : (0, _utils.translate)('Please enter valid number.'); var fieldClass = !_.isUndefined(this.props.fieldClass) ? 'sui-form-field ' + this.props.fieldClass : 'sui-form-field'; var inputClass = 'sui-form-control'; if (!_.isUndefined(this.props.inputClass) && '' !== this.props.inputClass) { inputClass += ' ' + this.props.inputClass; } if (!_.isUndefined(this.props.prefix) && '' !== this.props.prefix) { inputClass += ' sui-field-has-prefix'; } if (!_.isUndefined(this.props.suffix) && '' !== this.props.suffix) { inputClass += ' sui-field-has-suffix'; } var inputId = !_.isUndefined(this.props.inputId) ? this.props.inputId : this.props.property; var inputLabel = void 0; if (this.props.label) { inputLabel = _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + inputId, className: this.props.darkLabel ? 'sui-settings-label sui-dark' : 'sui-label' }, this.props.label, this.props.isRequired && _react2.default.createElement( _react2.default.Fragment, null, '\xA0', _react2.default.createElement( 'span', { className: 'sui-error' }, '*' ) ), this.props.note && _react2.default.createElement( 'span', { className: 'sui-label-note' }, this.props.note ) ); } var inputField = _react2.default.createElement('input', _extends({ type: type, placeholder: this.props.placeholder, value: value || '', id: 'forminator-field-' + inputId, className: inputClass }, this.props.notWritable && { readonly: '' }, this.props.minValue && { min: this.props.minValue }, this.props.maxValue && { max: this.props.maxValue }, this.props.step && { step: this.props.step }, this.props.maxLength && { maxLength: this.props.maxLength }, this.props.inputStyles && { style: this.props.inputStyles }, { disabled: this.props.disabled ? true : false, onChange: function onChange(e) { _this2.updateValue(e.target.value); } })); var getFields = _react2.default.createElement( 'div', { className: fieldClass + ' ' + hasErrorClass }, inputLabel, !_.isUndefined(this.props.prefix) && '' !== this.props.prefix && _react2.default.createElement( 'span', { className: 'sui-field-prefix' }, this.props.prefix ), !this.props.canTrash ? inputField : _react2.default.createElement( 'div', { className: 'sui-with-button sui-with-button-icon' }, inputField, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-tooltip sui-tooltip-top-right', 'data-tooltip': (0, _utils.translate)('Delete') }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }) ) ), this.props.suffix && _react2.default.createElement( 'span', { className: 'sui-field-suffix' }, this.props.suffix ), this.props.isRequired && !this.isValid(value) && _react2.default.createElement( 'span', { className: 'sui-error-message' }, requiredError ), !_.isUndefined(this.props.isPositive) && !this.isValid(value) && _react2.default.createElement( 'span', { className: 'sui-error-message' }, (0, _utils.translate)('Please enter valid number.') ), !this.isMaxValid(value) && _react2.default.createElement( 'span', { className: 'sui-error-message' }, maxValidError ), this.props.description && _react2.default.createElement( 'span', { className: 'sui-description' }, this.props.description ) ); if (this.props.simple) { return inputField; } return getFields; } }]); return Input; }(_react.Component); exports.default = Input; /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Col = function (_Component) { _inherits(Col, _Component); function Col(props) { _classCallCheck(this, Col); return _possibleConstructorReturn(this, (Col.__proto__ || Object.getPrototypeOf(Col)).call(this, props)); } _createClass(Col, [{ key: 'render', value: function render() { var children = _react2.default.Children.map(this.props.children, function (children) { return children; }); var customClass = this.props.customClass ? this.props.customClass : ''; return _react2.default.createElement( 'div', { className: 'sui-col-md-' + this.props.cols + ' ' + customClass }, children ); } }]); return Col; }(_react.Component); exports.default = Col; /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ColorPicker = function (_Component) { _inherits(ColorPicker, _Component); function ColorPicker(props) { _classCallCheck(this, ColorPicker); var _this = _possibleConstructorReturn(this, (ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); return _this; } _createClass(ColorPicker, [{ key: 'componentDidMount', value: function componentDidMount() { this.$el = jQuery(this.el); this.$el.wpColorPicker({ change: function change(event, ui) { var $this = jQuery(this); $this.val(ui.color.toCSS()).trigger('change'); }, palettes: ['#333333', '#FFFFFF', '#17A8E3', '#E1F6FF', '#666666', '#AAAAAA', '#E6E6E6'] }); var $suiPickerInput = this.$el, $suiPicker = $suiPickerInput.closest('.sui-colorpicker-wrap'), $suiPickerColor = $suiPicker.find('.sui-colorpicker-value span[role=button]'), $suiPickerValue = $suiPicker.find('.sui-colorpicker-value'), $suiPickerClear = $suiPickerValue.find('button'); var $wpPicker = $suiPickerInput.closest('.wp-picker-container'), $wpPickerButton = $wpPicker.find('.wp-color-result'), $wpPickerAlpha = $wpPickerButton.find('.color-alpha'), $wpPickerClear = $wpPicker.find('.wp-picker-clear'); var $pickerBackground = $wpPickerAlpha; // Check if alpha exists if ($suiPickerInput.data('alpha') === true) { $pickerBackground = $wpPickerAlpha; } else { $pickerBackground = $wpPickerButton; } // Listen to color change $suiPickerInput.bind('change', function () { // Change color preview $suiPickerColor.find('span').css({ 'background-color': $pickerBackground.css('background-color') }); // Change color value $suiPickerValue.find('input').val($suiPickerInput.val()); }); // Open iris picker $suiPicker.find('.sui-button, span[role=button]').on('click', function (e) { e.preventDefault(); e.stopPropagation(); $wpPickerButton.click(); }); // Clear color value $suiPickerClear.on('click', function (e) { e.preventDefault(); e.stopPropagation(); $wpPickerClear.click(); $suiPickerValue.find('input').val(''); $suiPickerColor.find('span').css({ 'background-color': '' }); }); this.updateValue = this.updateValue.bind(this); this.$el.on('change', this.updateValue); } }, { key: 'updateValue', value: function updateValue(e) { var value = e.target.value; // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { var $wpPickerPopup = this.$el.data('wpWpColorPicker') && jQuery('.wp-picker-active .wp-picker-input-wrap:visible'); // Close the picker if it is visible if ($wpPickerPopup && $wpPickerPopup.length) { this.$el.wpColorPicker('close'); } this.$el.off('change', this.updateValue); this.$el.unbind().removeData(); } }, { key: 'render', value: function render() { var _this2 = this; var value = _.isUndefined(this.props.settings[this.props.property]) || this.props.settings[this.props.property] === null ? this.props.defaultValue : this.props.settings[this.props.property]; var fieldLabel = ''; if (this.props.label) { fieldLabel = _react2.default.createElement( 'label', { className: 'sui-label', htmlFor: 'forminator-color-' + this.props.property }, this.props.label, this.props.note && _react2.default.createElement( 'span', { className: 'sui-label-note' }, ' ', this.props.note ) ); } return _react2.default.createElement( 'div', { className: 'sui-form-field' }, fieldLabel, _react2.default.createElement( 'div', { className: 'sui-colorpicker-wrap' }, _react2.default.createElement( 'div', { className: 'sui-colorpicker sui-colorpicker-' + (this.props.isAlpha ? 'rgba' : 'hex'), 'aria-hidden': 'true' }, _react2.default.createElement( 'div', { className: 'sui-colorpicker-value' }, _react2.default.createElement( 'span', { role: 'button' }, _react2.default.createElement('span', { style: { backgroundColor: value } }) ), _react2.default.createElement('input', { type: 'text', defaultValue: value, readOnly: 'readonly' }), _react2.default.createElement( 'button', null, _react2.default.createElement('i', { className: 'sui-icon-close', 'aria-hidden': 'true' }) ) ), _react2.default.createElement( 'button', { className: 'sui-button' }, (0, _utils.translate)('Select') ) ), _react2.default.createElement('input', { ref: function ref(el) { return _this2.el = el; }, defaultValue: value, id: 'forminator-color-' + this.props.property, className: 'sui-colorpicker-input', 'data-alpha': this.props.isAlpha ? 'true' : 'false' }) ), this.props.description && '' !== this.props.description && _react2.default.createElement( 'span', { className: 'sui-description' }, this.props.description ) ); } }]); return ColorPicker; }(_react.Component); exports.default = ColorPicker; /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var RadioTabs = function (_Component) { _inherits(RadioTabs, _Component); function RadioTabs(props) { _classCallCheck(this, RadioTabs); return _possibleConstructorReturn(this, (RadioTabs.__proto__ || Object.getPrototypeOf(RadioTabs)).call(this, props)); } _createClass(RadioTabs, [{ key: 'toggleValue', value: function toggleValue(value) { // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } // if props has onChange call it and pass value. if (typeof this.props.onChange === 'function') { this.props.onChange(value); } } }, { key: 'getDefaultValue', value: function getDefaultValue() { var defaultValue = this.props.default ? this.props.default : ''; var value = _.isUndefined(this.props.settings[this.props.property]) ? defaultValue : this.props.settings[this.props.property]; return value; } }, { key: 'render', value: function render() { var _this2 = this; var value = this.getDefaultValue(); var tabTitles = _react2.default.Children.map(this.props.children, function (tab) { if (!tab) { return _react2.default.createElement(_react2.default.Fragment, null); } var label = !_.isUndefined(tab.props.label) ? tab.props.label : tab.props.children; var tooltip = !_.isUndefined(_this2.props.tooltip) ? _this2.props.tooltip : ''; if (_this2.props.disabled) { if (tooltip) { return _react2.default.createElement( 'div', { className: 'sui-tooltip', 'data-tooltip': tooltip }, _react2.default.createElement( 'div', { className: 'sui-tab-item' + (tab.props.value === value ? ' active' : ''), style: { opacity: 0.5, cursor: 'not-allowed' } }, label ) ); } return _react2.default.createElement( 'div', { className: 'sui-tab-item' + (tab.props.value === value ? ' active' : ''), style: { opacity: 0.5, cursor: 'not-allowed' } }, label ); } if (!_this2.props.disabled) { return _react2.default.createElement( 'div', { className: 'sui-tab-item' + (tab.props.value === value ? ' active' : '') + (tooltip ? ' sui-tooltip' : ''), onClick: _this2.toggleValue.bind(_this2, tab.props.value), 'data-tooltip': tooltip }, label ); } }); var contentClass = !_.isUndefined(this.props.divClass) ? 'sui-tabs-content ' + this.props.divClass : 'sui-tabs-content'; var tabContents = _react2.default.Children.map(this.props.children, function (tab) { if (!tab) { return _react2.default.createElement(_react2.default.Fragment, null); } var boxClass = !_.isUndefined(tab.props.boxClass) ? tab.props.boxClass : ''; if (tab.type.name !== 'Empty') { return _react2.default.createElement( 'div', { className: boxClass + ' sui-tab-content' + (tab.props.value === value ? ' active' : '') }, tab.props.value === value && tab ); } return _react2.default.createElement(_react2.default.Fragment, null); }); var tabsLabel = ''; if (this.props.label && '' !== this.props.label) { tabsLabel = _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property, className: 'sui-label' }, this.props.label, this.props.note && _react2.default.createElement( 'span', { className: 'sui-label-note' }, ' ', this.props.note ) ); } var settingsLabel = ''; if (this.props.settingsLabel && '' !== this.props.settingsLabel) { var labelClass = this.props.labelClass ? this.props.labelClass : 'sui-settings-label'; settingsLabel = _react2.default.createElement( 'label', { className: labelClass }, this.props.settingsLabel ); } var description = ''; if (this.props.description && '' !== this.props.description) { description = _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: 10 } }, this.props.description ); } var wrapperClass = !_.isUndefined(this.props.wrapperClass) ? this.props.wrapperClass : ''; wrapperClass = this.props.basicTabs ? 'sui-tabs sui-tabs-overflow ' + wrapperClass : 'sui-side-tabs ' + wrapperClass; var tabsMarkup = _react2.default.createElement( 'div', { className: wrapperClass }, _react2.default.createElement( 'div', { className: 'sui-tabs-menu' }, tabTitles ), _react2.default.createElement( 'div', { className: contentClass }, tabContents ) ); if (!this.props.simple) { tabsMarkup = _react2.default.createElement( 'div', { className: 'sui-form-field' }, settingsLabel, tabsLabel, description, _react2.default.createElement( 'div', { className: wrapperClass }, _react2.default.createElement( 'div', { className: 'sui-tabs-menu' }, tabTitles ), _react2.default.createElement( 'div', { className: contentClass }, tabContents ) ) ); } return tabsMarkup; } }]); return RadioTabs; }(_react.Component); exports.default = RadioTabs; /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Row = function (_Component) { _inherits(Row, _Component); function Row(props) { _classCallCheck(this, Row); return _possibleConstructorReturn(this, (Row.__proto__ || Object.getPrototypeOf(Row)).call(this, props)); } _createClass(Row, [{ key: 'render', value: function render() { var columns = _react2.default.Children.map(this.props.children, function (children) { return children; }); return _react2.default.createElement( 'div', { className: 'sui-row' + (!_.isUndefined(this.props.class) ? ' ' + this.props.class : '') }, columns ); } }]); return Row; }(_react.Component); exports.default = Row; /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Tabs = function (_Component) { _inherits(Tabs, _Component); function Tabs(props) { _classCallCheck(this, Tabs); var _this = _possibleConstructorReturn(this, (Tabs.__proto__ || Object.getPrototypeOf(Tabs)).call(this, props)); _this.state = { active: _this.props.default ? _this.props.default : '' }; return _this; } _createClass(Tabs, [{ key: 'toggleValue', value: function toggleValue(value) { this.setState({ active: value }); } }, { key: 'render', value: function render() { var _this2 = this; var defaultValue = this.props.default ? this.props.default : ''; var type = this.props.type ? this.props.type : 'side-tabs'; var extraClass = this.props.extraClass ? this.props.extraClass : ''; var tabTitles = _react2.default.Children.map(this.props.children, function (tab) { if (_.isUndefined(tab) || _.isNull(tab)) { return; } return _react2.default.createElement( 'div', { className: 'forminator-toggle sui-tab-item' + (tab.props.value === _this2.state.active ? ' active' : ''), onClick: _this2.toggleValue.bind(_this2, tab.props.value) }, tab.props.label, ' ', tab.props.required && _react2.default.createElement( 'span', { className: 'sui-error' }, '*' ) ); }); var tabContents = _react2.default.Children.map(this.props.children, function (tab) { if (_.isUndefined(tab) || _.isNull(tab)) { return; } var boxClassValue = !_.isUndefined(tab.props.boxClass) ? tab.props.boxClass : 'sui-tab-content'; return _react2.default.createElement( 'div', { className: boxClassValue + (tab.props.value === _this2.state.active ? ' active' : '') }, tab.props.value === _this2.state.active && tab ); }); return _react2.default.createElement( 'div', { className: 'sui-' + type + ' ' + extraClass }, _react2.default.createElement( 'div', { className: 'sui-tabs-menu' }, tabTitles ), _react2.default.createElement( 'div', { className: 'sui-tabs-content' }, tabContents ) ); } }]); return Tabs; }(_react.Component); exports.default = Tabs; /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Empty; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function Empty() { return ''; } /***/ }), /* 11 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Provider", function() { return Provider_default; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReactReduxContext", function() { return ReactReduxContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "batch", function() { return batch; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connect", function() { return connect_default; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDispatchHook", function() { return createDispatchHook; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSelectorHook", function() { return createSelectorHook; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStoreHook", function() { return createStoreHook; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shallowEqual", function() { return shallowEqual; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useDispatch", function() { return useDispatch; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useSelector", function() { return useSelector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useStore", function() { return useStore; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_use_sync_external_store_with_selector_js__ = __webpack_require__(119); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_use_sync_external_store_with_selector_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_use_sync_external_store_with_selector_js__); var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __objRest = (source, exclude) => { var target = {}; for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop]; if (source != null && __getOwnPropSymbols) for (var prop of __getOwnPropSymbols(source)) { if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop]; } return target; }; // src/index.ts // src/utils/react.ts var React = ( // prettier-ignore // @ts-ignore "default" in __WEBPACK_IMPORTED_MODULE_0_react__ ? __WEBPACK_IMPORTED_MODULE_0_react__["default"] : __WEBPACK_IMPORTED_MODULE_0_react__ ); // src/components/Context.ts var ContextKey = Symbol.for(`react-redux-context`); var gT = typeof globalThis !== "undefined" ? globalThis : ( /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */ {} ); function getContext() { var _a; if (!React.createContext) return {}; const contextMap = (_a = gT[ContextKey]) != null ? _a : gT[ContextKey] = /* @__PURE__ */ new Map(); let realContext = contextMap.get(React.createContext); if (!realContext) { realContext = React.createContext( null ); if (process.env.NODE_ENV !== "production") { realContext.displayName = "ReactRedux"; } contextMap.set(React.createContext, realContext); } return realContext; } var ReactReduxContext = /* @__PURE__ */ getContext(); // src/utils/useSyncExternalStore.ts var notInitialized = () => { throw new Error("uSES not initialized!"); }; // src/hooks/useReduxContext.ts function createReduxContextHook(context = ReactReduxContext) { return function useReduxContext2() { const contextValue = React.useContext(context); if (process.env.NODE_ENV !== "production" && !contextValue) { throw new Error( "could not find react-redux context value; please ensure the component is wrapped in a <Provider>" ); } return contextValue; }; } var useReduxContext = /* @__PURE__ */ createReduxContextHook(); // src/hooks/useSelector.ts var useSyncExternalStoreWithSelector = notInitialized; var initializeUseSelector = (fn) => { useSyncExternalStoreWithSelector = fn; }; var refEquality = (a, b) => a === b; function createSelectorHook(context = ReactReduxContext) { const useReduxContext2 = context === ReactReduxContext ? useReduxContext : createReduxContextHook(context); const useSelector2 = (selector, equalityFnOrOptions = {}) => { const { equalityFn = refEquality, devModeChecks = {} } = typeof equalityFnOrOptions === "function" ? { equalityFn: equalityFnOrOptions } : equalityFnOrOptions; if (process.env.NODE_ENV !== "production") { if (!selector) { throw new Error(`You must pass a selector to useSelector`); } if (typeof selector !== "function") { throw new Error(`You must pass a function as a selector to useSelector`); } if (typeof equalityFn !== "function") { throw new Error( `You must pass a function as an equality function to useSelector` ); } } const { store, subscription, getServerState, stabilityCheck, identityFunctionCheck } = useReduxContext2(); const firstRun = React.useRef(true); const wrappedSelector = React.useCallback( { [selector.name](state) { const selected = selector(state); if (process.env.NODE_ENV !== "production") { const { identityFunctionCheck: finalIdentityFunctionCheck, stabilityCheck: finalStabilityCheck } = __spreadValues({ stabilityCheck, identityFunctionCheck }, devModeChecks); if (finalStabilityCheck === "always" || finalStabilityCheck === "once" && firstRun.current) { const toCompare = selector(state); if (!equalityFn(selected, toCompare)) { let stack = void 0; try { throw new Error(); } catch (e) { ; ({ stack } = e); } console.warn( "Selector " + (selector.name || "unknown") + " returned a different result when called with the same parameters. This can lead to unnecessary rerenders.\nSelectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization", { state, selected, selected2: toCompare, stack } ); } } if (finalIdentityFunctionCheck === "always" || finalIdentityFunctionCheck === "once" && firstRun.current) { if (selected === state) { let stack = void 0; try { throw new Error(); } catch (e) { ; ({ stack } = e); } console.warn( "Selector " + (selector.name || "unknown") + " returned the root state when called. This can lead to unnecessary rerenders.\nSelectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.", { stack } ); } } if (firstRun.current) firstRun.current = false; } return selected; } }[selector.name], [selector, stabilityCheck, devModeChecks.stabilityCheck] ); const selectedState = useSyncExternalStoreWithSelector( subscription.addNestedSub, store.getState, getServerState || store.getState, wrappedSelector, equalityFn ); React.useDebugValue(selectedState); return selectedState; }; Object.assign(useSelector2, { withTypes: () => useSelector2 }); return useSelector2; } var useSelector = /* @__PURE__ */ createSelectorHook(); // src/utils/react-is.ts var REACT_ELEMENT_TYPE = Symbol.for("react.element"); var REACT_PORTAL_TYPE = Symbol.for("react.portal"); var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); var REACT_MEMO_TYPE = Symbol.for("react.memo"); var REACT_LAZY_TYPE = Symbol.for("react.lazy"); var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); var ForwardRef = REACT_FORWARD_REF_TYPE; var Memo = REACT_MEMO_TYPE; function isValidElementType(type) { if (typeof type === "string" || typeof type === "function") { return true; } if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_OFFSCREEN_TYPE) { return true; } if (typeof type === "object" && type !== null) { if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. type.$$typeof === REACT_CLIENT_REFERENCE || type.getModuleId !== void 0) { return true; } } return false; } function typeOf(object) { if (typeof object === "object" && object !== null) { const $$typeof = object.$$typeof; switch ($$typeof) { case REACT_ELEMENT_TYPE: { const type = object.type; switch (type) { case REACT_FRAGMENT_TYPE: case REACT_PROFILER_TYPE: case REACT_STRICT_MODE_TYPE: case REACT_SUSPENSE_TYPE: case REACT_SUSPENSE_LIST_TYPE: return type; default: { const $$typeofType = type && type.$$typeof; switch ($$typeofType) { case REACT_SERVER_CONTEXT_TYPE: case REACT_CONTEXT_TYPE: case REACT_FORWARD_REF_TYPE: case REACT_LAZY_TYPE: case REACT_MEMO_TYPE: case REACT_PROVIDER_TYPE: return $$typeofType; default: return $$typeof; } } } } case REACT_PORTAL_TYPE: { return $$typeof; } } } return void 0; } function isContextConsumer(object) { return typeOf(object) === REACT_CONTEXT_TYPE; } function isMemo(object) { return typeOf(object) === REACT_MEMO_TYPE; } // src/utils/warning.ts function warning(message) { if (typeof console !== "undefined" && typeof console.error === "function") { console.error(message); } try { throw new Error(message); } catch (e) { } } // src/connect/verifySubselectors.ts function verify(selector, methodName) { if (!selector) { throw new Error(`Unexpected value for ${methodName} in connect.`); } else if (methodName === "mapStateToProps" || methodName === "mapDispatchToProps") { if (!Object.prototype.hasOwnProperty.call(selector, "dependsOnOwnProps")) { warning( `The selector for ${methodName} of connect did not specify a value for dependsOnOwnProps.` ); } } } function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps) { verify(mapStateToProps, "mapStateToProps"); verify(mapDispatchToProps, "mapDispatchToProps"); verify(mergeProps, "mergeProps"); } // src/connect/selectorFactory.ts function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, { areStatesEqual, areOwnPropsEqual, areStatePropsEqual }) { let hasRunAtLeastOnce = false; let state; let ownProps; let stateProps; let dispatchProps; let mergedProps; function handleFirstCall(firstState, firstOwnProps) { state = firstState; ownProps = firstOwnProps; stateProps = mapStateToProps(state, ownProps); dispatchProps = mapDispatchToProps(dispatch, ownProps); mergedProps = mergeProps(stateProps, dispatchProps, ownProps); hasRunAtLeastOnce = true; return mergedProps; } function handleNewPropsAndNewState() { stateProps = mapStateToProps(state, ownProps); if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); mergedProps = mergeProps(stateProps, dispatchProps, ownProps); return mergedProps; } function handleNewProps() { if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); mergedProps = mergeProps(stateProps, dispatchProps, ownProps); return mergedProps; } function handleNewState() { const nextStateProps = mapStateToProps(state, ownProps); const statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); stateProps = nextStateProps; if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); return mergedProps; } function handleSubsequentCalls(nextState, nextOwnProps) { const propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); const stateChanged = !areStatesEqual( nextState, state, nextOwnProps, ownProps ); state = nextState; ownProps = nextOwnProps; if (propsChanged && stateChanged) return handleNewPropsAndNewState(); if (propsChanged) return handleNewProps(); if (stateChanged) return handleNewState(); return mergedProps; } return function pureFinalPropsSelector(nextState, nextOwnProps) { return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps); }; } function finalPropsSelectorFactory(dispatch, _a) { var _b = _a, { initMapStateToProps, initMapDispatchToProps, initMergeProps } = _b, options = __objRest(_b, [ "initMapStateToProps", "initMapDispatchToProps", "initMergeProps" ]); const mapStateToProps = initMapStateToProps(dispatch, options); const mapDispatchToProps = initMapDispatchToProps(dispatch, options); const mergeProps = initMergeProps(dispatch, options); if (process.env.NODE_ENV !== "production") { verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps); } return pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); } // src/utils/bindActionCreators.ts function bindActionCreators(actionCreators, dispatch) { const boundActionCreators = {}; for (const key in actionCreators) { const actionCreator = actionCreators[key]; if (typeof actionCreator === "function") { boundActionCreators[key] = (...args) => dispatch(actionCreator(...args)); } } return boundActionCreators; } // src/utils/isPlainObject.ts function isPlainObject(obj) { if (typeof obj !== "object" || obj === null) return false; const proto = Object.getPrototypeOf(obj); if (proto === null) return true; let baseProto = proto; while (Object.getPrototypeOf(baseProto) !== null) { baseProto = Object.getPrototypeOf(baseProto); } return proto === baseProto; } // src/utils/verifyPlainObject.ts function verifyPlainObject(value, displayName, methodName) { if (!isPlainObject(value)) { warning( `${methodName}() in ${displayName} must return a plain object. Instead received ${value}.` ); } } // src/connect/wrapMapToProps.ts function wrapMapToPropsConstant(getConstant) { return function initConstantSelector(dispatch) { const constant = getConstant(dispatch); function constantSelector() { return constant; } constantSelector.dependsOnOwnProps = false; return constantSelector; }; } function getDependsOnOwnProps(mapToProps) { return mapToProps.dependsOnOwnProps ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; } function wrapMapToPropsFunc(mapToProps, methodName) { return function initProxySelector(dispatch, { displayName }) { const proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch, void 0); }; proxy.dependsOnOwnProps = true; proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { proxy.mapToProps = mapToProps; proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); let props = proxy(stateOrDispatch, ownProps); if (typeof props === "function") { proxy.mapToProps = props; proxy.dependsOnOwnProps = getDependsOnOwnProps(props); props = proxy(stateOrDispatch, ownProps); } if (process.env.NODE_ENV !== "production") verifyPlainObject(props, displayName, methodName); return props; }; return proxy; }; } // src/connect/invalidArgFactory.ts function createInvalidArgFactory(arg, name) { return (dispatch, options) => { throw new Error( `Invalid value of type ${typeof arg} for ${name} argument when connecting component ${options.wrappedComponentName}.` ); }; } // src/connect/mapDispatchToProps.ts function mapDispatchToPropsFactory(mapDispatchToProps) { return mapDispatchToProps && typeof mapDispatchToProps === "object" ? wrapMapToPropsConstant( (dispatch) => ( // @ts-ignore bindActionCreators(mapDispatchToProps, dispatch) ) ) : !mapDispatchToProps ? wrapMapToPropsConstant((dispatch) => ({ dispatch })) : typeof mapDispatchToProps === "function" ? ( // @ts-ignore wrapMapToPropsFunc(mapDispatchToProps, "mapDispatchToProps") ) : createInvalidArgFactory(mapDispatchToProps, "mapDispatchToProps"); } // src/connect/mapStateToProps.ts function mapStateToPropsFactory(mapStateToProps) { return !mapStateToProps ? wrapMapToPropsConstant(() => ({})) : typeof mapStateToProps === "function" ? ( // @ts-ignore wrapMapToPropsFunc(mapStateToProps, "mapStateToProps") ) : createInvalidArgFactory(mapStateToProps, "mapStateToProps"); } // src/connect/mergeProps.ts function defaultMergeProps(stateProps, dispatchProps, ownProps) { return __spreadValues(__spreadValues(__spreadValues({}, ownProps), stateProps), dispatchProps); } function wrapMergePropsFunc(mergeProps) { return function initMergePropsProxy(dispatch, { displayName, areMergedPropsEqual }) { let hasRunOnce = false; let mergedProps; return function mergePropsProxy(stateProps, dispatchProps, ownProps) { const nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); if (hasRunOnce) { if (!areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; } else { hasRunOnce = true; mergedProps = nextMergedProps; if (process.env.NODE_ENV !== "production") verifyPlainObject(mergedProps, displayName, "mergeProps"); } return mergedProps; }; }; } function mergePropsFactory(mergeProps) { return !mergeProps ? () => defaultMergeProps : typeof mergeProps === "function" ? wrapMergePropsFunc(mergeProps) : createInvalidArgFactory(mergeProps, "mergeProps"); } // src/utils/batch.ts function defaultNoopBatch(callback) { callback(); } // src/utils/Subscription.ts function createListenerCollection() { let first = null; let last = null; return { clear() { first = null; last = null; }, notify() { defaultNoopBatch(() => { let listener = first; while (listener) { listener.callback(); listener = listener.next; } }); }, get() { const listeners = []; let listener = first; while (listener) { listeners.push(listener); listener = listener.next; } return listeners; }, subscribe(callback) { let isSubscribed = true; const listener = last = { callback, next: null, prev: last }; if (listener.prev) { listener.prev.next = listener; } else { first = listener; } return function unsubscribe() { if (!isSubscribed || first === null) return; isSubscribed = false; if (listener.next) { listener.next.prev = listener.prev; } else { last = listener.prev; } if (listener.prev) { listener.prev.next = listener.next; } else { first = listener.next; } }; } }; } var nullListeners = { notify() { }, get: () => [] }; function createSubscription(store, parentSub) { let unsubscribe; let listeners = nullListeners; let subscriptionsAmount = 0; let selfSubscribed = false; function addNestedSub(listener) { trySubscribe(); const cleanupListener = listeners.subscribe(listener); let removed = false; return () => { if (!removed) { removed = true; cleanupListener(); tryUnsubscribe(); } }; } function notifyNestedSubs() { listeners.notify(); } function handleChangeWrapper() { if (subscription.onStateChange) { subscription.onStateChange(); } } function isSubscribed() { return selfSubscribed; } function trySubscribe() { subscriptionsAmount++; if (!unsubscribe) { unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper); listeners = createListenerCollection(); } } function tryUnsubscribe() { subscriptionsAmount--; if (unsubscribe && subscriptionsAmount === 0) { unsubscribe(); unsubscribe = void 0; listeners.clear(); listeners = nullListeners; } } function trySubscribeSelf() { if (!selfSubscribed) { selfSubscribed = true; trySubscribe(); } } function tryUnsubscribeSelf() { if (selfSubscribed) { selfSubscribed = false; tryUnsubscribe(); } } const subscription = { addNestedSub, notifyNestedSubs, handleChangeWrapper, isSubscribed, trySubscribe: trySubscribeSelf, tryUnsubscribe: tryUnsubscribeSelf, getListeners: () => listeners }; return subscription; } // src/utils/useIsomorphicLayoutEffect.ts var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"); var isReactNative = typeof navigator !== "undefined" && navigator.product === "ReactNative"; var useIsomorphicLayoutEffect = canUseDOM || isReactNative ? React.useLayoutEffect : React.useEffect; // src/utils/shallowEqual.ts function is(x, y) { if (x === y) { return x !== 0 || y !== 0 || 1 / x === 1 / y; } else { return x !== x && y !== y; } } function shallowEqual(objA, objB) { if (is(objA, objB)) return true; if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) { return false; } const keysA = Object.keys(objA); const keysB = Object.keys(objB); if (keysA.length !== keysB.length) return false; for (let i = 0; i < keysA.length; i++) { if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { return false; } } return true; } // src/utils/hoistStatics.ts var REACT_STATICS = { childContextTypes: true, contextType: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromError: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var FORWARD_REF_STATICS = { $$typeof: true, render: true, defaultProps: true, displayName: true, propTypes: true }; var MEMO_STATICS = { $$typeof: true, compare: true, defaultProps: true, displayName: true, propTypes: true, type: true }; var TYPE_STATICS = { [ForwardRef]: FORWARD_REF_STATICS, [Memo]: MEMO_STATICS }; function getStatics(component) { if (isMemo(component)) { return MEMO_STATICS; } return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS; } var defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = Object.prototype; function hoistNonReactStatics(targetComponent, sourceComponent) { if (typeof sourceComponent !== "string") { if (objectPrototype) { const inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent); } } let keys = getOwnPropertyNames(sourceComponent); if (getOwnPropertySymbols) { keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } const targetStatics = getStatics(targetComponent); const sourceStatics = getStatics(sourceComponent); for (let i = 0; i < keys.length; ++i) { const key = keys[i]; if (!KNOWN_STATICS[key] && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) { const descriptor = getOwnPropertyDescriptor(sourceComponent, key); try { defineProperty(targetComponent, key, descriptor); } catch (e) { } } } } return targetComponent; } // src/components/connect.tsx var useSyncExternalStore = notInitialized; var initializeConnect = (fn) => { useSyncExternalStore = fn; }; var NO_SUBSCRIPTION_ARRAY = [null, null]; var stringifyComponent = (Comp) => { try { return JSON.stringify(Comp); } catch (err) { return String(Comp); } }; function useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) { useIsomorphicLayoutEffect(() => effectFunc(...effectArgs), dependencies); } function captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, childPropsFromStoreUpdate, notifyNestedSubs) { lastWrapperProps.current = wrapperProps; renderIsScheduled.current = false; if (childPropsFromStoreUpdate.current) { childPropsFromStoreUpdate.current = null; notifyNestedSubs(); } } function subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, additionalSubscribeListener) { if (!shouldHandleStateChanges) return () => { }; let didUnsubscribe = false; let lastThrownError = null; const checkForUpdates = () => { if (didUnsubscribe || !isMounted.current) { return; } const latestStoreState = store.getState(); let newChildProps, error; try { newChildProps = childPropsSelector( latestStoreState, lastWrapperProps.current ); } catch (e) { error = e; lastThrownError = e; } if (!error) { lastThrownError = null; } if (newChildProps === lastChildProps.current) { if (!renderIsScheduled.current) { notifyNestedSubs(); } } else { lastChildProps.current = newChildProps; childPropsFromStoreUpdate.current = newChildProps; renderIsScheduled.current = true; additionalSubscribeListener(); } }; subscription.onStateChange = checkForUpdates; subscription.trySubscribe(); checkForUpdates(); const unsubscribeWrapper = () => { didUnsubscribe = true; subscription.tryUnsubscribe(); subscription.onStateChange = null; if (lastThrownError) { throw lastThrownError; } }; return unsubscribeWrapper; } function strictEqual(a, b) { return a === b; } var hasWarnedAboutDeprecatedPureOption = false; function connect(mapStateToProps, mapDispatchToProps, mergeProps, { // The `pure` option has been removed, so TS doesn't like us destructuring this to check its existence. // @ts-ignore pure, areStatesEqual = strictEqual, areOwnPropsEqual = shallowEqual, areStatePropsEqual = shallowEqual, areMergedPropsEqual = shallowEqual, // use React's forwardRef to expose a ref of the wrapped component forwardRef = false, // the context consumer to use context = ReactReduxContext } = {}) { if (process.env.NODE_ENV !== "production") { if (pure !== void 0 && !hasWarnedAboutDeprecatedPureOption) { hasWarnedAboutDeprecatedPureOption = true; warning( 'The `pure` option has been removed. `connect` is now always a "pure/memoized" component' ); } } const Context = context; const initMapStateToProps = mapStateToPropsFactory(mapStateToProps); const initMapDispatchToProps = mapDispatchToPropsFactory(mapDispatchToProps); const initMergeProps = mergePropsFactory(mergeProps); const shouldHandleStateChanges = Boolean(mapStateToProps); const wrapWithConnect = (WrappedComponent) => { if (process.env.NODE_ENV !== "production") { const isValid = /* @__PURE__ */ isValidElementType(WrappedComponent); if (!isValid) throw new Error( `You must pass a component to the function returned by connect. Instead received ${stringifyComponent( WrappedComponent )}` ); } const wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || "Component"; const displayName = `Connect(${wrappedComponentName})`; const selectorFactoryOptions = { shouldHandleStateChanges, displayName, wrappedComponentName, WrappedComponent, // @ts-ignore initMapStateToProps, // @ts-ignore initMapDispatchToProps, initMergeProps, areStatesEqual, areStatePropsEqual, areOwnPropsEqual, areMergedPropsEqual }; function ConnectFunction(props) { const [propsContext, reactReduxForwardedRef, wrapperProps] = React.useMemo(() => { const _a = props, { reactReduxForwardedRef: reactReduxForwardedRef2 } = _a, wrapperProps2 = __objRest(_a, ["reactReduxForwardedRef"]); return [props.context, reactReduxForwardedRef2, wrapperProps2]; }, [props]); const ContextToUse = React.useMemo(() => { let ResultContext = Context; if (propsContext == null ? void 0 : propsContext.Consumer) { if (process.env.NODE_ENV !== "production") { const isValid = /* @__PURE__ */ isContextConsumer( // @ts-ignore /* @__PURE__ */ React.createElement(propsContext.Consumer, null) ); if (!isValid) { throw new Error( "You must pass a valid React context consumer as `props.context`" ); } ResultContext = propsContext; } } return ResultContext; }, [propsContext, Context]); const contextValue = React.useContext(ContextToUse); const didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch); const didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store); if (process.env.NODE_ENV !== "production" && !didStoreComeFromProps && !didStoreComeFromContext) { throw new Error( `Could not find "store" in the context of "${displayName}". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to ${displayName} in connect options.` ); } const store = didStoreComeFromProps ? props.store : contextValue.store; const getServerState = didStoreComeFromContext ? contextValue.getServerState : store.getState; const childPropsSelector = React.useMemo(() => { return finalPropsSelectorFactory(store.dispatch, selectorFactoryOptions); }, [store]); const [subscription, notifyNestedSubs] = React.useMemo(() => { if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; const subscription2 = createSubscription( store, didStoreComeFromProps ? void 0 : contextValue.subscription ); const notifyNestedSubs2 = subscription2.notifyNestedSubs.bind(subscription2); return [subscription2, notifyNestedSubs2]; }, [store, didStoreComeFromProps, contextValue]); const overriddenContextValue = React.useMemo(() => { if (didStoreComeFromProps) { return contextValue; } return __spreadProps(__spreadValues({}, contextValue), { subscription }); }, [didStoreComeFromProps, contextValue, subscription]); const lastChildProps = React.useRef(void 0); const lastWrapperProps = React.useRef(wrapperProps); const childPropsFromStoreUpdate = React.useRef(void 0); const renderIsScheduled = React.useRef(false); const isMounted = React.useRef(false); const latestSubscriptionCallbackError = React.useRef( void 0 ); useIsomorphicLayoutEffect(() => { isMounted.current = true; return () => { isMounted.current = false; }; }, []); const actualChildPropsSelector = React.useMemo(() => { const selector = () => { if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) { return childPropsFromStoreUpdate.current; } return childPropsSelector(store.getState(), wrapperProps); }; return selector; }, [store, wrapperProps]); const subscribeForReact = React.useMemo(() => { const subscribe = (reactListener) => { if (!subscription) { return () => { }; } return subscribeUpdates( shouldHandleStateChanges, store, subscription, // @ts-ignore childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, reactListener ); }; return subscribe; }, [subscription]); useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [ lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, childPropsFromStoreUpdate, notifyNestedSubs ]); let actualChildProps; try { actualChildProps = useSyncExternalStore( // TODO We're passing through a big wrapper that does a bunch of extra side effects besides subscribing subscribeForReact, // TODO This is incredibly hacky. We've already processed the store update and calculated new child props, // TODO and we're just passing that through so it triggers a re-render for us rather than relying on `uSES`. actualChildPropsSelector, getServerState ? () => childPropsSelector(getServerState(), wrapperProps) : actualChildPropsSelector ); } catch (err) { if (latestSubscriptionCallbackError.current) { ; err.message += ` The error may be correlated with this previous error: ${latestSubscriptionCallbackError.current.stack} `; } throw err; } useIsomorphicLayoutEffect(() => { latestSubscriptionCallbackError.current = void 0; childPropsFromStoreUpdate.current = void 0; lastChildProps.current = actualChildProps; }); const renderedWrappedComponent = React.useMemo(() => { return ( // @ts-ignore /* @__PURE__ */ React.createElement( WrappedComponent, __spreadProps(__spreadValues({}, actualChildProps), { ref: reactReduxForwardedRef }) ) ); }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); const renderedChild = React.useMemo(() => { if (shouldHandleStateChanges) { return /* @__PURE__ */ React.createElement(ContextToUse.Provider, { value: overriddenContextValue }, renderedWrappedComponent); } return renderedWrappedComponent; }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]); return renderedChild; } const _Connect = React.memo(ConnectFunction); const Connect = _Connect; Connect.WrappedComponent = WrappedComponent; Connect.displayName = ConnectFunction.displayName = displayName; if (forwardRef) { const _forwarded = React.forwardRef( function forwardConnectRef(props, ref) { return /* @__PURE__ */ React.createElement(Connect, __spreadProps(__spreadValues({}, props), { reactReduxForwardedRef: ref })); } ); const forwarded = _forwarded; forwarded.displayName = displayName; forwarded.WrappedComponent = WrappedComponent; return /* @__PURE__ */ hoistNonReactStatics(forwarded, WrappedComponent); } return /* @__PURE__ */ hoistNonReactStatics(Connect, WrappedComponent); }; return wrapWithConnect; } var connect_default = connect; // src/components/Provider.tsx function Provider({ store, context, children, serverState, stabilityCheck = "once", identityFunctionCheck = "once" }) { const contextValue = React.useMemo(() => { const subscription = createSubscription(store); return { store, subscription, getServerState: serverState ? () => serverState : void 0, stabilityCheck, identityFunctionCheck }; }, [store, serverState, stabilityCheck, identityFunctionCheck]); const previousState = React.useMemo(() => store.getState(), [store]); useIsomorphicLayoutEffect(() => { const { subscription } = contextValue; subscription.onStateChange = subscription.notifyNestedSubs; subscription.trySubscribe(); if (previousState !== store.getState()) { subscription.notifyNestedSubs(); } return () => { subscription.tryUnsubscribe(); subscription.onStateChange = void 0; }; }, [contextValue, previousState]); const Context = context || ReactReduxContext; return /* @__PURE__ */ React.createElement(Context.Provider, { value: contextValue }, children); } var Provider_default = Provider; // src/hooks/useStore.ts function createStoreHook(context = ReactReduxContext) { const useReduxContext2 = context === ReactReduxContext ? useReduxContext : ( // @ts-ignore createReduxContextHook(context) ); const useStore2 = () => { const { store } = useReduxContext2(); return store; }; Object.assign(useStore2, { withTypes: () => useStore2 }); return useStore2; } var useStore = /* @__PURE__ */ createStoreHook(); // src/hooks/useDispatch.ts function createDispatchHook(context = ReactReduxContext) { const useStore2 = context === ReactReduxContext ? useStore : createStoreHook(context); const useDispatch2 = () => { const store = useStore2(); return store.dispatch; }; Object.assign(useDispatch2, { withTypes: () => useDispatch2 }); return useDispatch2; } var useDispatch = /* @__PURE__ */ createDispatchHook(); // src/exports.ts var batch = defaultNoopBatch; // src/index.ts initializeUseSelector(__WEBPACK_IMPORTED_MODULE_1_use_sync_external_store_with_selector_js__["useSyncExternalStoreWithSelector"]); initializeConnect(__WEBPACK_IMPORTED_MODULE_0_react__["useSyncExternalStore"]); //# sourceMappingURL=react-redux.legacy-esm.js.map /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(2))) /***/ }), /* 12 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__DO_NOT_USE__ActionTypes", function() { return ActionTypes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return applyMiddleware; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return bindActionCreators; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return combineReducers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "legacy_createStore", function() { return legacy_createStore; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectSpread2__ = __webpack_require__(122); /** * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js * * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes * during build. * @param {number} code */ function formatProdErrorMessage(code) { return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. '; } // Inlined version of the `symbol-observable` polyfill var $$observable = (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })(); /** * These are private action types reserved by Redux. * For any unknown actions, you must return the current state. * If the current state is undefined, you must return the initial state. * Do not reference these action types directly in your code. */ var randomString = function randomString() { return Math.random().toString(36).substring(7).split('').join('.'); }; var ActionTypes = { INIT: "@@redux/INIT" + randomString(), REPLACE: "@@redux/REPLACE" + randomString(), PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); } }; /** * @param {any} obj The object to inspect. * @returns {boolean} True if the argument appears to be a plain object. */ function isPlainObject(obj) { if (typeof obj !== 'object' || obj === null) return false; var proto = obj; while (Object.getPrototypeOf(proto) !== null) { proto = Object.getPrototypeOf(proto); } return Object.getPrototypeOf(obj) === proto; } // Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of function miniKindOf(val) { if (val === void 0) return 'undefined'; if (val === null) return 'null'; var type = typeof val; switch (type) { case 'boolean': case 'string': case 'number': case 'symbol': case 'function': { return type; } } if (Array.isArray(val)) return 'array'; if (isDate(val)) return 'date'; if (isError(val)) return 'error'; var constructorName = ctorName(val); switch (constructorName) { case 'Symbol': case 'Promise': case 'WeakMap': case 'WeakSet': case 'Map': case 'Set': return constructorName; } // other return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); } function ctorName(val) { return typeof val.constructor === 'function' ? val.constructor.name : null; } function isError(val) { return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'; } function isDate(val) { if (val instanceof Date) return true; return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function'; } function kindOf(val) { var typeOfVal = typeof val; if (process.env.NODE_ENV !== 'production') { typeOfVal = miniKindOf(val); } return typeOfVal; } /** * @deprecated * * **We recommend using the `configureStore` method * of the `@reduxjs/toolkit` package**, which replaces `createStore`. * * Redux Toolkit is our recommended approach for writing Redux logic today, * including store setup, reducers, data fetching, and more. * * **For more details, please read this Redux docs page:** * **https://redux.js.org/introduction/why-rtk-is-redux-today** * * `configureStore` from Redux Toolkit is an improved version of `createStore` that * simplifies setup and helps avoid common bugs. * * You should not be using the `redux` core package by itself today, except for learning purposes. * The `createStore` method from the core `redux` package will not be removed, but we encourage * all users to migrate to using Redux Toolkit for all Redux code. * * If you want to use `createStore` without this visual deprecation warning, use * the `legacy_createStore` import instead: * * `import { legacy_createStore as createStore} from 'redux'` * */ function createStore(reducer, preloadedState, enhancer) { var _ref2; if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(0) : 'It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.'); } if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { enhancer = preloadedState; preloadedState = undefined; } if (typeof enhancer !== 'undefined') { if (typeof enhancer !== 'function') { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(1) : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'"); } return enhancer(createStore)(reducer, preloadedState); } if (typeof reducer !== 'function') { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(2) : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'"); } var currentReducer = reducer; var currentState = preloadedState; var currentListeners = []; var nextListeners = currentListeners; var isDispatching = false; /** * This makes a shallow copy of currentListeners so we can use * nextListeners as a temporary list while dispatching. * * This prevents any bugs around consumers calling * subscribe/unsubscribe in the middle of a dispatch. */ function ensureCanMutateNextListeners() { if (nextListeners === currentListeners) { nextListeners = currentListeners.slice(); } } /** * Reads the state tree managed by the store. * * @returns {any} The current state tree of your application. */ function getState() { if (isDispatching) { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(3) : 'You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.'); } return currentState; } /** * Adds a change listener. It will be called any time an action is dispatched, * and some part of the state tree may potentially have changed. You may then * call `getState()` to read the current state tree inside the callback. * * You may call `dispatch()` from a change listener, with the following * caveats: * * 1. The subscriptions are snapshotted just before every `dispatch()` call. * If you subscribe or unsubscribe while the listeners are being invoked, this * will not have any effect on the `dispatch()` that is currently in progress. * However, the next `dispatch()` call, whether nested or not, will use a more * recent snapshot of the subscription list. * * 2. The listener should not expect to see all state changes, as the state * might have been updated multiple times during a nested `dispatch()` before * the listener is called. It is, however, guaranteed that all subscribers * registered before the `dispatch()` started will be called with the latest * state by the time it exits. * * @param {Function} listener A callback to be invoked on every dispatch. * @returns {Function} A function to remove this change listener. */ function subscribe(listener) { if (typeof listener !== 'function') { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(4) : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'"); } if (isDispatching) { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(5) : 'You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.'); } var isSubscribed = true; ensureCanMutateNextListeners(); nextListeners.push(listener); return function unsubscribe() { if (!isSubscribed) { return; } if (isDispatching) { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(6) : 'You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.'); } isSubscribed = false; ensureCanMutateNextListeners(); var index = nextListeners.indexOf(listener); nextListeners.splice(index, 1); currentListeners = null; }; } /** * Dispatches an action. It is the only way to trigger a state change. * * The `reducer` function, used to create the store, will be called with the * current state tree and the given `action`. Its return value will * be considered the **next** state of the tree, and the change listeners * will be notified. * * The base implementation only supports plain object actions. If you want to * dispatch a Promise, an Observable, a thunk, or something else, you need to * wrap your store creating function into the corresponding middleware. For * example, see the documentation for the `redux-thunk` package. Even the * middleware will eventually dispatch plain object actions using this method. * * @param {Object} action A plain object representing “what changed”. It is * a good idea to keep actions serializable so you can record and replay user * sessions, or use the time travelling `redux-devtools`. An action must have * a `type` property which may not be `undefined`. It is a good idea to use * string constants for action types. * * @returns {Object} For convenience, the same action object you dispatched. * * Note that, if you use a custom middleware, it may wrap `dispatch()` to * return something else (for example, a Promise you can await). */ function dispatch(action) { if (!isPlainObject(action)) { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(7) : "Actions must be plain objects. Instead, the actual type was: '" + kindOf(action) + "'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples."); } if (typeof action.type === 'undefined') { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(8) : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.'); } if (isDispatching) { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(9) : 'Reducers may not dispatch actions.'); } try { isDispatching = true; currentState = currentReducer(currentState, action); } finally { isDispatching = false; } var listeners = currentListeners = nextListeners; for (var i = 0; i < listeners.length; i++) { var listener = listeners[i]; listener(); } return action; } /** * Replaces the reducer currently used by the store to calculate the state. * * You might need this if your app implements code splitting and you want to * load some of the reducers dynamically. You might also need this if you * implement a hot reloading mechanism for Redux. * * @param {Function} nextReducer The reducer for the store to use instead. * @returns {void} */ function replaceReducer(nextReducer) { if (typeof nextReducer !== 'function') { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(10) : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer)); } currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT. // Any reducers that existed in both the new and old rootReducer // will receive the previous state. This effectively populates // the new state tree with any relevant data from the old one. dispatch({ type: ActionTypes.REPLACE }); } /** * Interoperability point for observable/reactive libraries. * @returns {observable} A minimal observable of state changes. * For more information, see the observable proposal: * https://github.com/tc39/proposal-observable */ function observable() { var _ref; var outerSubscribe = subscribe; return _ref = { /** * The minimal observable subscription method. * @param {Object} observer Any object that can be used as an observer. * The observer object should have a `next` method. * @returns {subscription} An object with an `unsubscribe` method that can * be used to unsubscribe the observable from the store, and prevent further * emission of values from the observable. */ subscribe: function subscribe(observer) { if (typeof observer !== 'object' || observer === null) { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(11) : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'"); } function observeState() { if (observer.next) { observer.next(getState()); } } observeState(); var unsubscribe = outerSubscribe(observeState); return { unsubscribe: unsubscribe }; } }, _ref[$$observable] = function () { return this; }, _ref; } // When a store is created, an "INIT" action is dispatched so that every // reducer returns their initial state. This effectively populates // the initial state tree. dispatch({ type: ActionTypes.INIT }); return _ref2 = { dispatch: dispatch, subscribe: subscribe, getState: getState, replaceReducer: replaceReducer }, _ref2[$$observable] = observable, _ref2; } /** * Creates a Redux store that holds the state tree. * * **We recommend using `configureStore` from the * `@reduxjs/toolkit` package**, which replaces `createStore`: * **https://redux.js.org/introduction/why-rtk-is-redux-today** * * The only way to change the data in the store is to call `dispatch()` on it. * * There should only be a single store in your app. To specify how different * parts of the state tree respond to actions, you may combine several reducers * into a single reducer function by using `combineReducers`. * * @param {Function} reducer A function that returns the next state tree, given * the current state tree and the action to handle. * * @param {any} [preloadedState] The initial state. You may optionally specify it * to hydrate the state from the server in universal apps, or to restore a * previously serialized user session. * If you use `combineReducers` to produce the root reducer function, this must be * an object with the same shape as `combineReducers` keys. * * @param {Function} [enhancer] The store enhancer. You may optionally specify it * to enhance the store with third-party capabilities such as middleware, * time travel, persistence, etc. The only store enhancer that ships with Redux * is `applyMiddleware()`. * * @returns {Store} A Redux store that lets you read the state, dispatch actions * and subscribe to changes. */ var legacy_createStore = createStore; /** * Prints a warning in the console if it exists. * * @param {String} message The warning message. * @returns {void} */ function warning(message) { /* eslint-disable no-console */ if (typeof console !== 'undefined' && typeof console.error === 'function') { console.error(message); } /* eslint-enable no-console */ try { // This error was thrown as a convenience so that if you enable // "break on all exceptions" in your console, // it would pause the execution at this line. throw new Error(message); } catch (e) {} // eslint-disable-line no-empty } function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { var reducerKeys = Object.keys(reducers); var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; if (reducerKeys.length === 0) { return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; } if (!isPlainObject(inputState)) { return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); } var unexpectedKeys = Object.keys(inputState).filter(function (key) { return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; }); unexpectedKeys.forEach(function (key) { unexpectedKeyCache[key] = true; }); if (action && action.type === ActionTypes.REPLACE) return; if (unexpectedKeys.length > 0) { return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored."); } } function assertReducerShape(reducers) { Object.keys(reducers).forEach(function (key) { var reducer = reducers[key]; var initialState = reducer(undefined, { type: ActionTypes.INIT }); if (typeof initialState === 'undefined') { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(12) : "The slice reducer for key \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined."); } if (typeof reducer(undefined, { type: ActionTypes.PROBE_UNKNOWN_ACTION() }) === 'undefined') { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(13) : "The slice reducer for key \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle '" + ActionTypes.INIT + "' or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null."); } }); } /** * Turns an object whose values are different reducer functions, into a single * reducer function. It will call every child reducer, and gather their results * into a single state object, whose keys correspond to the keys of the passed * reducer functions. * * @param {Object} reducers An object whose values correspond to different * reducer functions that need to be combined into one. One handy way to obtain * it is to use ES6 `import * as reducers` syntax. The reducers may never return * undefined for any action. Instead, they should return their initial state * if the state passed to them was undefined, and the current state for any * unrecognized action. * * @returns {Function} A reducer function that invokes every reducer inside the * passed object, and builds a state object with the same shape. */ function combineReducers(reducers) { var reducerKeys = Object.keys(reducers); var finalReducers = {}; for (var i = 0; i < reducerKeys.length; i++) { var key = reducerKeys[i]; if (process.env.NODE_ENV !== 'production') { if (typeof reducers[key] === 'undefined') { warning("No reducer provided for key \"" + key + "\""); } } if (typeof reducers[key] === 'function') { finalReducers[key] = reducers[key]; } } var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same // keys multiple times. var unexpectedKeyCache; if (process.env.NODE_ENV !== 'production') { unexpectedKeyCache = {}; } var shapeAssertionError; try { assertReducerShape(finalReducers); } catch (e) { shapeAssertionError = e; } return function combination(state, action) { if (state === void 0) { state = {}; } if (shapeAssertionError) { throw shapeAssertionError; } if (process.env.NODE_ENV !== 'production') { var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); if (warningMessage) { warning(warningMessage); } } var hasChanged = false; var nextState = {}; for (var _i = 0; _i < finalReducerKeys.length; _i++) { var _key = finalReducerKeys[_i]; var reducer = finalReducers[_key]; var previousStateForKey = state[_key]; var nextStateForKey = reducer(previousStateForKey, action); if (typeof nextStateForKey === 'undefined') { var actionType = action && action.type; throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(14) : "When called with an action of type " + (actionType ? "\"" + String(actionType) + "\"" : '(unknown type)') + ", the slice reducer for key \"" + _key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined."); } nextState[_key] = nextStateForKey; hasChanged = hasChanged || nextStateForKey !== previousStateForKey; } hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; return hasChanged ? nextState : state; }; } function bindActionCreator(actionCreator, dispatch) { return function () { return dispatch(actionCreator.apply(this, arguments)); }; } /** * Turns an object whose values are action creators, into an object with the * same keys, but with every function wrapped into a `dispatch` call so they * may be invoked directly. This is just a convenience method, as you can call * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. * * For convenience, you can also pass an action creator as the first argument, * and get a dispatch wrapped function in return. * * @param {Function|Object} actionCreators An object whose values are action * creator functions. One handy way to obtain it is to use ES6 `import * as` * syntax. You may also pass a single function. * * @param {Function} dispatch The `dispatch` function available on your Redux * store. * * @returns {Function|Object} The object mimicking the original object, but with * every action creator wrapped into the `dispatch` call. If you passed a * function as `actionCreators`, the return value will also be a single * function. */ function bindActionCreators(actionCreators, dispatch) { if (typeof actionCreators === 'function') { return bindActionCreator(actionCreators, dispatch); } if (typeof actionCreators !== 'object' || actionCreators === null) { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(16) : "bindActionCreators expected an object or a function, but instead received: '" + kindOf(actionCreators) + "'. " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?"); } var boundActionCreators = {}; for (var key in actionCreators) { var actionCreator = actionCreators[key]; if (typeof actionCreator === 'function') { boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); } } return boundActionCreators; } /** * Composes single-argument functions from right to left. The rightmost * function can take multiple arguments as it provides the signature for * the resulting composite function. * * @param {...Function} funcs The functions to compose. * @returns {Function} A function obtained by composing the argument functions * from right to left. For example, compose(f, g, h) is identical to doing * (...args) => f(g(h(...args))). */ function compose() { for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { funcs[_key] = arguments[_key]; } if (funcs.length === 0) { return function (arg) { return arg; }; } if (funcs.length === 1) { return funcs[0]; } return funcs.reduce(function (a, b) { return function () { return a(b.apply(void 0, arguments)); }; }); } /** * Creates a store enhancer that applies middleware to the dispatch method * of the Redux store. This is handy for a variety of tasks, such as expressing * asynchronous actions in a concise manner, or logging every action payload. * * See `redux-thunk` package as an example of the Redux middleware. * * Because middleware is potentially asynchronous, this should be the first * store enhancer in the composition chain. * * Note that each middleware will be given the `dispatch` and `getState` functions * as named arguments. * * @param {...Function} middlewares The middleware chain to be applied. * @returns {Function} A store enhancer applying the middleware. */ function applyMiddleware() { for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { middlewares[_key] = arguments[_key]; } return function (createStore) { return function () { var store = createStore.apply(void 0, arguments); var _dispatch = function dispatch() { throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(15) : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.'); }; var middlewareAPI = { getState: store.getState, dispatch: function dispatch() { return _dispatch.apply(void 0, arguments); } }; var chain = middlewares.map(function (middleware) { return middleware(middlewareAPI); }); _dispatch = compose.apply(void 0, chain)(store.dispatch); return Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectSpread2__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectSpread2__["a" /* default */])({}, store), {}, { dispatch: _dispatch }); }; }; } /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(2))) /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var bind = __webpack_require__(68); var isBuffer = __webpack_require__(127); /*global toString:true*/ // utils is a library of generic helper functions non-specific to axios var toString = Object.prototype.toString; /** * Determine if a value is an Array * * @param {Object} val The value to test * @returns {boolean} True if value is an Array, otherwise false */ function isArray(val) { return toString.call(val) === '[object Array]'; } /** * Determine if a value is an ArrayBuffer * * @param {Object} val The value to test * @returns {boolean} True if value is an ArrayBuffer, otherwise false */ function isArrayBuffer(val) { return toString.call(val) === '[object ArrayBuffer]'; } /** * Determine if a value is a FormData * * @param {Object} val The value to test * @returns {boolean} True if value is an FormData, otherwise false */ function isFormData(val) { return (typeof FormData !== 'undefined') && (val instanceof FormData); } /** * Determine if a value is a view on an ArrayBuffer * * @param {Object} val The value to test * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false */ function isArrayBufferView(val) { var result; if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { result = ArrayBuffer.isView(val); } else { result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); } return result; } /** * Determine if a value is a String * * @param {Object} val The value to test * @returns {boolean} True if value is a String, otherwise false */ function isString(val) { return typeof val === 'string'; } /** * Determine if a value is a Number * * @param {Object} val The value to test * @returns {boolean} True if value is a Number, otherwise false */ function isNumber(val) { return typeof val === 'number'; } /** * Determine if a value is undefined * * @param {Object} val The value to test * @returns {boolean} True if the value is undefined, otherwise false */ function isUndefined(val) { return typeof val === 'undefined'; } /** * Determine if a value is an Object * * @param {Object} val The value to test * @returns {boolean} True if value is an Object, otherwise false */ function isObject(val) { return val !== null && typeof val === 'object'; } /** * Determine if a value is a Date * * @param {Object} val The value to test * @returns {boolean} True if value is a Date, otherwise false */ function isDate(val) { return toString.call(val) === '[object Date]'; } /** * Determine if a value is a File * * @param {Object} val The value to test * @returns {boolean} True if value is a File, otherwise false */ function isFile(val) { return toString.call(val) === '[object File]'; } /** * Determine if a value is a Blob * * @param {Object} val The value to test * @returns {boolean} True if value is a Blob, otherwise false */ function isBlob(val) { return toString.call(val) === '[object Blob]'; } /** * Determine if a value is a Function * * @param {Object} val The value to test * @returns {boolean} True if value is a Function, otherwise false */ function isFunction(val) { return toString.call(val) === '[object Function]'; } /** * Determine if a value is a Stream * * @param {Object} val The value to test * @returns {boolean} True if value is a Stream, otherwise false */ function isStream(val) { return isObject(val) && isFunction(val.pipe); } /** * Determine if a value is a URLSearchParams object * * @param {Object} val The value to test * @returns {boolean} True if value is a URLSearchParams object, otherwise false */ function isURLSearchParams(val) { return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; } /** * Trim excess whitespace off the beginning and end of a string * * @param {String} str The String to trim * @returns {String} The String freed of excess whitespace */ function trim(str) { return str.replace(/^\s*/, '').replace(/\s*$/, ''); } /** * Determine if we're running in a standard browser environment * * This allows axios to run in a web worker, and react-native. * Both environments support XMLHttpRequest, but not fully standard globals. * * web workers: * typeof window -> undefined * typeof document -> undefined * * react-native: * navigator.product -> 'ReactNative' */ function isStandardBrowserEnv() { if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { return false; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ); } /** * Iterate over an Array or an Object invoking a function for each item. * * If `obj` is an Array callback will be called passing * the value, index, and complete array for each item. * * If 'obj' is an Object callback will be called passing * the value, key, and complete object for each property. * * @param {Object|Array} obj The object to iterate * @param {Function} fn The callback to invoke for each item */ function forEach(obj, fn) { // Don't bother if no value provided if (obj === null || typeof obj === 'undefined') { return; } // Force an array if not already something iterable if (typeof obj !== 'object') { /*eslint no-param-reassign:0*/ obj = [obj]; } if (isArray(obj)) { // Iterate over array values for (var i = 0, l = obj.length; i < l; i++) { fn.call(null, obj[i], i, obj); } } else { // Iterate over object keys for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { fn.call(null, obj[key], key, obj); } } } } /** * Accepts varargs expecting each argument to be an object, then * immutably merges the properties of each object and returns result. * * When multiple objects contain the same key the later object in * the arguments list will take precedence. * * Example: * * ```js * var result = merge({foo: 123}, {foo: 456}); * console.log(result.foo); // outputs 456 * ``` * * @param {Object} obj1 Object to merge * @returns {Object} Result of all merge properties */ function merge(/* obj1, obj2, obj3, ... */) { var result = {}; function assignValue(val, key) { if (typeof result[key] === 'object' && typeof val === 'object') { result[key] = merge(result[key], val); } else { result[key] = val; } } for (var i = 0, l = arguments.length; i < l; i++) { forEach(arguments[i], assignValue); } return result; } /** * Extends object a by mutably adding to it the properties of object b. * * @param {Object} a The object to be extended * @param {Object} b The object to copy properties from * @param {Object} thisArg The object to bind function to * @return {Object} The resulting value of object a */ function extend(a, b, thisArg) { forEach(b, function assignValue(val, key) { if (thisArg && typeof val === 'function') { a[key] = bind(val, thisArg); } else { a[key] = val; } }); return a; } module.exports = { isArray: isArray, isArrayBuffer: isArrayBuffer, isBuffer: isBuffer, isFormData: isFormData, isArrayBufferView: isArrayBufferView, isString: isString, isNumber: isNumber, isObject: isObject, isUndefined: isUndefined, isDate: isDate, isFile: isFile, isBlob: isBlob, isFunction: isFunction, isStream: isStream, isURLSearchParams: isURLSearchParams, isStandardBrowserEnv: isStandardBrowserEnv, forEach: forEach, merge: merge, extend: extend, trim: trim }; /***/ }), /* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.withRouter = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactRouterDom = __webpack_require__(24); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var withRouter = exports.withRouter = function withRouter(Component) { function ComponentWithRouterProp(props) { var location = (0, _reactRouterDom.useLocation)(); var navigate = (0, _reactRouterDom.useNavigate)(); var params = (0, _reactRouterDom.useParams)(); return _react2.default.createElement(Component, _extends({}, props, { router: { location: location, navigate: navigate, params: params } })); } return ComponentWithRouterProp; }; /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SettingsRow = function (_Component) { _inherits(SettingsRow, _Component); function SettingsRow(props) { _classCallCheck(this, SettingsRow); return _possibleConstructorReturn(this, (SettingsRow.__proto__ || Object.getPrototypeOf(SettingsRow)).call(this, props)); } _createClass(SettingsRow, [{ key: 'render', value: function render() { var content = _react2.default.Children.map(this.props.children, function (children) { return children; }); var label = ''; if (this.props.label && '' !== this.props.label) { label = _react2.default.createElement( 'span', { className: 'sui-settings-label' + ('' + (this.props.labelDark === true ? ' sui-dark' : '')) }, this.props.label ); } var description = ''; var descriptionSpacing = 10; if (!_.isUndefined(this.props.descriptionSpacing) && '' !== this.props.descriptionSpacing) { descriptionSpacing = this.props.descriptionSpacing; } if (!_.isUndefined(this.props.description) && '' !== this.props.description) { if (this.props.sidebar === false) { description = _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: descriptionSpacing + 'px' } }, this.props.description ); } else { description = _react2.default.createElement( 'span', { className: 'sui-description' }, this.props.description ); } } var sidebar = ''; if (this.props.label && '' !== this.props.label || this.props.description && '' !== this.props.description) { sidebar = _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, label, description ); } var conditionalStyles = this.props.lastChild ? { marginBottom: 0, borderBottom: 'unset' } : {}; return _react2.default.createElement( 'div', { className: 'sui-box-settings-row', style: conditionalStyles }, (_.isUndefined(this.props.sidebar) || this.props.sidebar !== false) && sidebar, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, !_.isUndefined(this.props.sidebar) && this.props.sidebar === false && label, !_.isUndefined(this.props.sidebar) && this.props.sidebar === false && description, content ) ); } }]); return SettingsRow; }(_react.Component); exports.default = SettingsRow; /***/ }), /* 16 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SuiSelect2 = function (_Component) { _inherits(SuiSelect2, _Component); function SuiSelect2(props) { _classCallCheck(this, SuiSelect2); var _this = _possibleConstructorReturn(this, (SuiSelect2.__proto__ || Object.getPrototypeOf(SuiSelect2)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); _this.afterSave = _this.afterSave.bind(_this); return _this; } _createClass(SuiSelect2, [{ key: 'componentDidMount', value: function componentDidMount() { this.$el = jQuery(this.el); var parent = this.$el.closest('.sui-modal-content'); var parentId = parent.attr('id'); var hasSearch = this.props.hasSearch ? 0 : -1; var options = Object.assign({ dropdownParent: parent.length ? jQuery('#' + parentId) : jQuery('body[class*="sui-"]'), minimumResultsForSearch: hasSearch, dropdownCssClass: this.$el.hasClass('sui-select-sm') ? 'sui-select-dropdown-sm' : '', width: '100%' }, this.props.options); if (this.props.data) { options.data = this.props.data; } if (this.props.loading) { options.dropdownCssClass = 'sui-select-dropdown-sm sui-select-dropdown-loading'; } if (this.props.placeholder) { options.placeholder = this.props.placeholder; } if (typeof this.$el.SUIselect2 === 'function') { this.$el.SUIselect2(options); } else if (typeof this.$el.FUIselect2 === 'function') { this.$el.FUIselect2(options); } else { throw Error('SUI Select2 not initiated'); } this.updateValue = this.updateValue.bind(this); this.$el.on('change', this.updateValue); if (this.props.triggerChange) { this.$el.trigger('change'); } if (this.props.fetchOptions) { this.$el.on('select2:open', this.props.fetchOptions()); } } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps) { this.$el = jQuery(this.el); // Check if children prop has changed if (prevProps.data !== this.props.data) { var dataOptions = [{ id: '', text: '' }].concat(_toConsumableArray(this.props.data)); var hasSearch = 0; if (typeof this.$el.SUIselect2 === 'function') { this.$el.empty().SUIselect2({ data: dataOptions, placeholder: this.props.placeholder, minimumResultsForSearch: hasSearch }); this.$el.SUIselect2('open'); } else if (typeof this.$el.FUIselect2 === 'function') { this.$el.empty().FUIselect2({ data: dataOptions, placeholder: this.props.placeholder, minimumResultsForSearch: hasSearch }); this.$el.FUIselect2('open'); } else { throw Error('SUI Select2 not initiated'); } } } }, { key: 'updateValue', value: function updateValue(e) { var value = jQuery(e.target).val(); // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } this.afterSave(value); } }, { key: 'afterSave', value: function afterSave() { return false; } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.$el.off('change', this.updateValue); this.$el.unbind().removeData(); } }, { key: 'render', value: function render() { var _this2 = this; var value = _.isUndefined(this.props.settings[this.props.property]) ? this.props.defaultValue : this.props.settings[this.props.property]; var divClass = !_.isUndefined(this.props.fieldClass) ? 'sui-form-field ' + this.props.fieldClass : 'sui-form-field'; var selectId = !_.isUndefined(this.props.elementId) ? this.props.elementId : this.props.property; var inputLabel = void 0; if (this.props.label) { inputLabel = _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property, className: 'sui-label' }, this.props.label, '\xA0', this.props.required && _react2.default.createElement( 'span', { className: 'sui-error' }, ' *' ), this.props.note && _react2.default.createElement( 'span', { className: 'sui-label-note' }, this.props.note ) ); } var multiple = this.props.multiple; var _props = this.props, formType = _props.formType, updateProperty = _props.updateProperty, noWrapper = _props.noWrapper, fieldClass = _props.fieldClass, staticContext = _props.staticContext, formDesign = _props.formDesign, fieldSize = _props.fieldSize, selectProps = _objectWithoutProperties(_props, ['formType', 'updateProperty', 'noWrapper', 'fieldClass', 'staticContext', 'formDesign', 'fieldSize']); var getSelect = _react2.default.createElement( 'select', _extends({ id: 'forminator-field-' + selectId, className: 'sui-select', ref: function ref(el) { return _this2.el = el; }, defaultValue: value, multiple: multiple }, selectProps), this.props.children ); var getElement = _react2.default.createElement( 'select', { id: 'forminator-field-' + selectId, className: 'sui-select', ref: function ref(el) { return _this2.el = el; }, defaultValue: value, multiple: multiple }, this.props.children ); if ('md' === this.props.fieldsize || 'medium' === this.props.fieldsize) { getElement = _react2.default.createElement( 'div', { className: 'sui-form-field sui-input-md' }, getSelect ); } else if ('sm' === this.props.fieldsize || 'small' === this.props.fieldsize) { getElement = _react2.default.createElement( 'div', { className: 'sui-form-field sui-input-sm' }, getSelect ); } else if (!_.isUndefined(this.props.fieldsize) && '' !== this.props.fieldsize) { getElement = _react2.default.createElement( 'div', { style: { width: '100%', maxWidth: this.props.fieldsize + 'px' } }, getSelect ); } if (this.props.noWrapper) { return getSelect; } return _react2.default.createElement( 'div', { className: divClass }, inputLabel, getElement, this.props.description && _react2.default.createElement( 'span', { className: 'sui-description', style: { marginTop: '10px' } }, this.props.description ) ); } }]); return SuiSelect2; }(_react.Component); exports.default = SuiSelect2; /***/ }), /* 17 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (immutable) */ __webpack_exports__["escapeAmpersand"] = escapeAmpersand; /* harmony export (immutable) */ __webpack_exports__["escapeQuotationMark"] = escapeQuotationMark; /* harmony export (immutable) */ __webpack_exports__["escapeLessThan"] = escapeLessThan; /* harmony export (immutable) */ __webpack_exports__["escapeAttribute"] = escapeAttribute; /* harmony export (immutable) */ __webpack_exports__["escapeHTML"] = escapeHTML; /* harmony export (immutable) */ __webpack_exports__["escapeEditableHTML"] = escapeEditableHTML; /* harmony export (immutable) */ __webpack_exports__["isValidAttributeName"] = isValidAttributeName; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__escape_greater__ = __webpack_require__(169); /** * Internal dependencies */ /** * Regular expression matching invalid attribute names. * * "Attribute names must consist of one or more characters other than controls, * U+0020 SPACE, U+0022 ("), U+0027 ('), U+003E (>), U+002F (/), U+003D (=), * and noncharacters." * * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 * * @type {RegExp} */ const REGEXP_INVALID_ATTRIBUTE_NAME = /[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/; /** * Returns a string with ampersands escaped. Note that this is an imperfect * implementation, where only ampersands which do not appear as a pattern of * named, decimal, or hexadecimal character references are escaped. Invalid * named references (i.e. ambiguous ampersand) are still permitted. * * @see https://w3c.github.io/html/syntax.html#character-references * @see https://w3c.github.io/html/syntax.html#ambiguous-ampersand * @see https://w3c.github.io/html/syntax.html#named-character-references * * @param {string} value Original string. * * @return {string} Escaped string. */ function escapeAmpersand(value) { return value.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi, '&'); } /** * Returns a string with quotation marks replaced. * * @param {string} value Original string. * * @return {string} Escaped string. */ function escapeQuotationMark(value) { return value.replace(/"/g, '"'); } /** * Returns a string with less-than sign replaced. * * @param {string} value Original string. * * @return {string} Escaped string. */ function escapeLessThan(value) { return value.replace(/</g, '<'); } /** * Returns an escaped attribute value. * * @see https://w3c.github.io/html/syntax.html#elements-attributes * * "[...] the text cannot contain an ambiguous ampersand [...] must not contain * any literal U+0022 QUOTATION MARK characters (")" * * Note we also escape the greater than symbol, as this is used by wptexturize to * split HTML strings. This is a WordPress specific fix * * Note that if a resolution for Trac#45387 comes to fruition, it is no longer * necessary for `__unstableEscapeGreaterThan` to be used. * * See: https://core.trac.wordpress.org/ticket/45387 * * @param {string} value Attribute value. * * @return {string} Escaped attribute value. */ function escapeAttribute(value) { return Object(__WEBPACK_IMPORTED_MODULE_0__escape_greater__["a" /* default */])(escapeQuotationMark(escapeAmpersand(value))); } /** * Returns an escaped HTML element value. * * @see https://w3c.github.io/html/syntax.html#writing-html-documents-elements * * "the text must not contain the character U+003C LESS-THAN SIGN (<) or an * ambiguous ampersand." * * @param {string} value Element value. * * @return {string} Escaped HTML element value. */ function escapeHTML(value) { return escapeLessThan(escapeAmpersand(value)); } /** * Returns an escaped Editable HTML element value. This is different from * `escapeHTML`, because for editable HTML, ALL ampersands must be escaped in * order to render the content correctly on the page. * * @param {string} value Element value. * * @return {string} Escaped HTML element value. */ function escapeEditableHTML(value) { return escapeLessThan(value.replace(/&/g, '&')); } /** * Returns true if the given attribute name is valid, or false otherwise. * * @param {string} name Attribute name to test. * * @return {boolean} Whether attribute is valid. */ function isValidAttributeName(name) { return !REGEXP_INVALID_ATTRIBUTE_NAME.test(name); } //# sourceMappingURL=index.js.map /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SuiSelect = function (_Component) { _inherits(SuiSelect, _Component); function SuiSelect(props) { _classCallCheck(this, SuiSelect); var _this = _possibleConstructorReturn(this, (SuiSelect.__proto__ || Object.getPrototypeOf(SuiSelect)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); return _this; } _createClass(SuiSelect, [{ key: 'componentDidMount', value: function componentDidMount() { this.$el = jQuery(this.el); // SUI.select.init( this.$el ); this.updateValue = this.updateValue.bind(this); this.$el.on('change', this.updateValue); } }, { key: 'updateValue', value: function updateValue(e) { var value = e.target.value; // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.$el.off('change', this.updateValue); this.$el.unbind().removeData(); } }, { key: 'render', value: function render() { var _this2 = this; var value = _.isUndefined(this.props.settings[this.props.property]) ? this.props.defaultValue : this.props.settings[this.props.property]; var fieldClass = !_.isUndefined(this.props.fieldClass) ? 'sui-form-field ' + this.props.fieldClass : 'sui-form-field'; var selectClass = !_.isUndefined(this.props.elementClass) ? this.props.elementClass : ''; var selectId = !_.isUndefined(this.props.elementId) ? this.props.elementId : this.props.property; var selectLabel = ''; if (this.props.label) { selectLabel = _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property, id: 'forminator-field-' + this.props.property + '-label', className: 'sui-label' }, this.props.label, '\xA0', this.props.required && _react2.default.createElement( 'span', { className: 'sui-error' }, ' *' ), this.props.note && _react2.default.createElement( 'span', { className: 'sui-label-note' }, this.props.note ) ); } // For backwards compatibility. if (!_.isUndefined(value) && ('phone_national_country' === this.props.property || 'phone_international_country' === this.props.property)) { value = value.toLowerCase(); } var selectField = _react2.default.createElement( 'select', { defaultValue: value, id: 'forminator-field-' + selectId, className: selectClass, 'aria-labelledby': 'forminator-field-' + selectId + '-label', ref: function ref(el) { return _this2.el = el; }, style: { maxWidth: 'none' } }, this.props.children ); var getElement = selectField; if ('md' === this.props.fieldsize || 'medium' === this.props.fieldsize) { getElement = _react2.default.createElement( 'div', { className: 'sui-form-field sui-input-md' }, selectField ); } else if ('sm' === this.props.fieldsize || 'small' === this.props.fieldsize) { getElement = _react2.default.createElement( 'div', { className: 'sui-form-field sui-input-sm' }, selectField ); } else if ('' !== this.props.fieldsize) { getElement = _react2.default.createElement( 'div', { style: { width: '100%', maxWidth: this.props.fieldsize + 'px' } }, selectField ); } var getField = getElement; if (!this.props.simple) { getField = _react2.default.createElement( 'div', { className: fieldClass }, selectLabel, getElement, this.props.description && _react2.default.createElement( 'span', { className: 'sui-description', style: { marginTop: '10px' } }, this.props.description ) ); } return getField; } }]); return SuiSelect; }(_react.Component); exports.default = SuiSelect; /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Radio = function (_Component) { _inherits(Radio, _Component); function Radio(props) { _classCallCheck(this, Radio); var _this = _possibleConstructorReturn(this, (Radio.__proto__ || Object.getPrototypeOf(Radio)).call(this, props)); _this.radioContainer = _react2.default.createRef(); return _this; } _createClass(Radio, [{ key: 'componentDidMount', value: function componentDidMount() { var self = this; this.$radioContainer = jQuery(this.radioContainer); if (this.$radioContainer.hasClass('time_type')) { this.$radioContainer.on('click', '.forminator-toggle:not(.active)', function (e) { self.props.timeType(jQuery(e.currentTarget).data('val')); }); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.$radioContainer.off('click', this.updateValue).removeData(); } }, { key: 'updateValue', value: function updateValue(value) { // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); // Used to clear options on value change if (this.props.clearOptions === 'true') { if (value === 'single') { var options = []; _.each(this.props.state.options, function (option) { option.default = false; options.push(option); }); this.props.updateProperty('options', options); } } } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } } }, { key: 'render', value: function render() { var _this2 = this; var value = _.isUndefined(this.props.settings[this.props.property]) ? this.props.defaultValue : this.props.settings[this.props.property]; var tabTitles = _react2.default.Children.map(this.props.children, function (tab) { return _react2.default.createElement( 'button', _extends({ id: 'tab-option-' + tab.props.value, role: 'tab', className: 'forminator-toggle sui-tab-item ' + (tab.props.value === value ? 'active' : ''), 'aria-selected': tab.props.value === value ? 'true' : 'false' }, tab.props.value !== value && { tabIndex: '-1' }, { 'data-val': tab.props.value, onClick: _this2.updateValue.bind(_this2, tab.props.value) }), tab.props.children ); }); var fieldLabel = ''; if (this.props.label && '' !== this.props.label) { fieldLabel = _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property, className: 'sui-label' }, this.props.label, this.props.note && _react2.default.createElement( 'span', { className: 'sui-label-note' }, this.props.note ) ); } var fieldDescription = ''; if (this.props.description && '' !== this.props.description) { fieldDescription = _react2.default.createElement( 'span', { className: 'sui-description' }, this.props.description ); } var settingsLabel = ''; if (!this.props.label && this.props.settingsLabel) { settingsLabel = _react2.default.createElement( 'label', { className: 'sui-settings-label' }, this.props.settingsLabel ); } var settingsDescription = ''; if (!this.props.label && this.props.settingsDesc) { settingsDescription = _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, this.props.settingsDesc ); } var fieldContent = _react2.default.createElement( 'div', { className: 'sui-side-tabs ' + this.props.property, style: this.props.description && { marginBottom: '5px' }, ref: function ref(radioContainer) { return _this2.radioContainer = radioContainer; } }, _react2.default.createElement( 'div', { className: 'sui-tabs-menu', role: 'tablist' }, tabTitles ) ); var tabsContent = _react2.default.createElement( _react2.default.Fragment, null, fieldLabel, fieldContent ); if (!this.props.noWrapper) { tabsContent = _react2.default.createElement( 'div', { className: 'sui-form-field' }, fieldLabel, settingsLabel, settingsDescription, fieldContent, fieldDescription ); } return tabsContent; } }]); return Radio; }(_react.Component); exports.default = Radio; /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* object-assign (c) Sindre Sorhus @license MIT */ /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test2 = {}; for (var i = 0; i < 10; i++) { test2['_' + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function (n) { return test2[n]; }); if (order2.join('') !== '0123456789') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test3 = {}; 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { return false; } return true; } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } } module.exports = shouldUseNative() ? Object.assign : function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key]; } } if (getOwnPropertySymbols) { symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; } } } } return to; }; /***/ }), /* 21 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonIcon", function() { return ButtonIcon; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } var _excluded = ["label", "icon", "iconSize", "design", "color", "className", "loading"]; var ButtonIcon = function ButtonIcon(_ref) { var label = _ref.label, icon = _ref.icon, iconSize = _ref.iconSize, _ref$design = _ref.design, design = _ref$design === void 0 ? 'solid' : _ref$design, color = _ref.color, className = _ref.className, loading = _ref.loading, props = _objectWithoutProperties(_ref, _excluded); var loader = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span", { className: "sui-icon-loader sui-loading", style: { position: 'relative' }, "aria-hidden": "true" }); var content = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Fragment, null, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span", { className: "sui-icon-".concat(icon).concat(iconSize ? ' sui-' + iconSize : ''), "aria-hidden": "true" }), /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span", { className: "sui-screen-reader-text" }, label)); className = "sui-button-icon ".concat(className || ''); // Set button color. switch (color) { case 'blue': case 'green': case 'red': case 'orange': case 'purple': case 'yellow': case 'white': className += ' sui-button-' + color; break; case 'gray': default: className += ''; break; } // Set button style. switch (design) { case 'ghost': case 'outlined': className += ' sui-button-' + design; break; case 'solid': default: className += ''; break; } // Set loading class. if (loading) { className += ' sui-button-onload'; } var htmlTag = props.href ? 'a' : 'button'; return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(htmlTag, _objectSpread2({ className: className, disabled: props.disabled || loading }, props), loading ? loader : content); }; /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Toggle = function (_Component) { _inherits(Toggle, _Component); function Toggle(props) { _classCallCheck(this, Toggle); var _this = _possibleConstructorReturn(this, (Toggle.__proto__ || Object.getPrototypeOf(Toggle)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); return _this; } _createClass(Toggle, [{ key: 'updateValue', value: function updateValue(value) { // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } } }, { key: 'render', value: function render() { var _this2 = this; var value = _.isUndefined(this.props.settings[this.props.property]) ? '' : this.props.settings[this.props.property]; var customClass = !_.isUndefined(this.props.customClass) ? this.props.customClass : 'sui-form-control'; var disabled = !_.isUndefined(this.props.disabled) && this.props.disabled; var checked = value && !disabled; var toggleContent = _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property, className: 'sui-toggle' }, _react2.default.createElement('input', { type: 'checkbox', value: 'true', id: 'forminator-field-' + this.props.property, className: customClass, disabled: disabled ? 'disabled' : '', checked: checked ? 'checked' : '', onChange: function onChange(e) { _this2.updateValue(e.target.checked); } }), _react2.default.createElement('span', { className: 'sui-toggle-slider' }), this.props.label && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Enable'), ' ', this.props.label ), _react2.default.createElement( 'span', { className: 'sui-toggle-label' }, this.props.label ) ), this.props.description && _react2.default.createElement( 'span', { className: 'sui-description sui-toggle-description' }, this.props.description ) ); var subToggle = ''; if (this.props.children && this.props.settings[this.props.property]) { subToggle = _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { tabIndex: '0', className: 'sui-toggle-content sui-border-frame', 'aria-label': this.props.label }, this.props.children ) ); } if (this.props.unWrap) { return _react2.default.createElement( _react2.default.Fragment, null, toggleContent, subToggle ); } if (!this.props.unWrap) { return _react2.default.createElement( 'div', { className: 'sui-form-field' }, toggleContent, subToggle ); } } }]); return Toggle; }(_react.Component); exports.default = Toggle; /***/ }), /* 23 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { function checkDCE() { /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function' ) { return; } if (process.env.NODE_ENV !== 'production') { // This branch is unreachable because this function is only called // in production, but the condition is true only in development. // Therefore if the branch is still here, dead code elimination wasn't // properly applied. // Don't change the message. React DevTools relies on it. Also make sure // this message doesn't occur elsewhere in this function, or it will cause // a false positive. throw new Error('^_^'); } try { // Verify that the code above has been dead code eliminated (DCE'd). __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); } catch (err) { // DevTools shouldn't crash React, no matter what. // We should still report in case we break this code. console.error(err); } } if (process.env.NODE_ENV === 'production') { // DCE check should happen before ReactDOM bundle executes so that // DevTools can report bad minification during injection. checkDCE(); module.exports = __webpack_require__(80); } else { module.exports = __webpack_require__(84); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 24 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserRouter", function() { return BrowserRouter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Form", function() { return Form; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HashRouter", function() { return HashRouter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return Link; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavLink", function() { return NavLink; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterProvider", function() { return RouterProvider; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollRestoration", function() { return ScrollRestoration; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNSAFE_FetchersContext", function() { return FetchersContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNSAFE_ViewTransitionContext", function() { return ViewTransitionContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNSAFE_useScrollRestoration", function() { return useScrollRestoration; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBrowserRouter", function() { return createBrowserRouter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createHashRouter", function() { return createHashRouter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSearchParams", function() { return createSearchParams; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unstable_HistoryRouter", function() { return HistoryRouter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unstable_usePrompt", function() { return usePrompt; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unstable_useViewTransitionState", function() { return useViewTransitionState; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useBeforeUnload", function() { return useBeforeUnload; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useFetcher", function() { return useFetcher; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useFetchers", function() { return useFetchers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useFormAction", function() { return useFormAction; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useLinkClickHandler", function() { return useLinkClickHandler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useSearchParams", function() { return useSearchParams; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useSubmit", function() { return useSubmit; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(23); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(66); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "AbortedDeferredError", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Await", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MemoryRouter", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["c"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Navigate", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["d"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationType", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["e"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Outlet", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["f"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["g"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["h"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Routes", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["i"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "UNSAFE_DataRouterContext", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["j"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "UNSAFE_DataRouterStateContext", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["k"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "UNSAFE_LocationContext", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["l"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "UNSAFE_NavigationContext", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["m"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "UNSAFE_RouteContext", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["n"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "UNSAFE_useRouteId", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["p"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createMemoryRouter", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["r"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createPath", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["s"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createRoutesFromChildren", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["t"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createRoutesFromElements", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["u"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["v"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "generatePath", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["w"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isRouteErrorResponse", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["x"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "json", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["y"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "matchPath", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["z"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "matchRoutes", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["A"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "parsePath", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["B"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "redirect", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["C"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "redirectDocument", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["D"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "renderMatches", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["E"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "resolvePath", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["F"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useActionData", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["G"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useAsyncError", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["H"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useAsyncValue", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["I"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useBlocker", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["J"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useHref", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["K"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useInRouterContext", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["L"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useLoaderData", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["M"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useLocation", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["N"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useMatch", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["O"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useMatches", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["P"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useNavigate", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["Q"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useNavigation", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["R"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useNavigationType", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["S"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useOutlet", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["T"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useOutletContext", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["U"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useParams", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["V"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useResolvedPath", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["W"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useRevalidator", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["X"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useRouteError", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["Y"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useRouteLoaderData", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["Z"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useRoutes", function() { return __WEBPACK_IMPORTED_MODULE_2_react_router__["_0"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__remix_run_router__ = __webpack_require__(33); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "UNSAFE_ErrorResponseImpl", function() { return __WEBPACK_IMPORTED_MODULE_3__remix_run_router__["e"]; }); /** * React Router DOM v6.24.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } const defaultMethod = "get"; const defaultEncType = "application/x-www-form-urlencoded"; function isHtmlElement(object) { return object != null && typeof object.tagName === "string"; } function isButtonElement(object) { return isHtmlElement(object) && object.tagName.toLowerCase() === "button"; } function isFormElement(object) { return isHtmlElement(object) && object.tagName.toLowerCase() === "form"; } function isInputElement(object) { return isHtmlElement(object) && object.tagName.toLowerCase() === "input"; } function isModifiedEvent(event) { return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); } function shouldProcessLinkClick(event, target) { return event.button === 0 && ( // Ignore everything but left clicks !target || target === "_self") && // Let browser handle "target=_blank" etc. !isModifiedEvent(event) // Ignore clicks with modifier keys ; } /** * Creates a URLSearchParams object using the given initializer. * * This is identical to `new URLSearchParams(init)` except it also * supports arrays as values in the object form of the initializer * instead of just strings. This is convenient when you need multiple * values for a given key, but don't want to use an array initializer. * * For example, instead of: * * let searchParams = new URLSearchParams([ * ['sort', 'name'], * ['sort', 'price'] * ]); * * you can do: * * let searchParams = createSearchParams({ * sort: ['name', 'price'] * }); */ function createSearchParams(init) { if (init === void 0) { init = ""; } return new URLSearchParams(typeof init === "string" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo, key) => { let value = init[key]; return memo.concat(Array.isArray(value) ? value.map(v => [key, v]) : [[key, value]]); }, [])); } function getSearchParamsForLocation(locationSearch, defaultSearchParams) { let searchParams = createSearchParams(locationSearch); if (defaultSearchParams) { // Use `defaultSearchParams.forEach(...)` here instead of iterating of // `defaultSearchParams.keys()` to work-around a bug in Firefox related to // web extensions. Relevant Bugzilla tickets: // https://bugzilla.mozilla.org/show_bug.cgi?id=1414602 // https://bugzilla.mozilla.org/show_bug.cgi?id=1023984 defaultSearchParams.forEach((_, key) => { if (!searchParams.has(key)) { defaultSearchParams.getAll(key).forEach(value => { searchParams.append(key, value); }); } }); } return searchParams; } // One-time check for submitter support let _formDataSupportsSubmitter = null; function isFormDataSubmitterSupported() { if (_formDataSupportsSubmitter === null) { try { new FormData(document.createElement("form"), // @ts-expect-error if FormData supports the submitter parameter, this will throw 0); _formDataSupportsSubmitter = false; } catch (e) { _formDataSupportsSubmitter = true; } } return _formDataSupportsSubmitter; } const supportedFormEncTypes = new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]); function getFormEncType(encType) { if (encType != null && !supportedFormEncTypes.has(encType)) { process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["i" /* UNSAFE_warning */])(false, "\"" + encType + "\" is not a valid `encType` for `<Form>`/`<fetcher.Form>` " + ("and will default to \"" + defaultEncType + "\"")) : void 0; return null; } return encType; } function getFormSubmissionInfo(target, basename) { let method; let action; let encType; let formData; let body; if (isFormElement(target)) { // When grabbing the action from the element, it will have had the basename // prefixed to ensure non-JS scenarios work, so strip it since we'll // re-prefix in the router let attr = target.getAttribute("action"); action = attr ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["A" /* stripBasename */])(attr, basename) : null; method = target.getAttribute("method") || defaultMethod; encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType; formData = new FormData(target); } else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) { let form = target.form; if (form == null) { throw new Error("Cannot submit a <button> or <input type=\"submit\"> without a <form>"); } // <button>/<input type="submit"> may override attributes of <form> // When grabbing the action from the element, it will have had the basename // prefixed to ensure non-JS scenarios work, so strip it since we'll // re-prefix in the router let attr = target.getAttribute("formaction") || form.getAttribute("action"); action = attr ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["A" /* stripBasename */])(attr, basename) : null; method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod; encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType; // Build a FormData object populated from a form and submitter formData = new FormData(form, target); // If this browser doesn't support the `FormData(el, submitter)` format, // then tack on the submitter value at the end. This is a lightweight // solution that is not 100% spec compliant. For complete support in older // browsers, consider using the `formdata-submitter-polyfill` package if (!isFormDataSubmitterSupported()) { let { name, type, value } = target; if (type === "image") { let prefix = name ? name + "." : ""; formData.append(prefix + "x", "0"); formData.append(prefix + "y", "0"); } else if (name) { formData.append(name, value); } } } else if (isHtmlElement(target)) { throw new Error("Cannot submit element that is not <form>, <button>, or " + "<input type=\"submit|image\">"); } else { method = defaultMethod; action = null; encType = defaultEncType; body = target; } // Send body for <Form encType="text/plain" so we encode it into text if (formData && encType === "text/plain") { body = formData; formData = undefined; } return { action, method: method.toLowerCase(), encType, formData, body }; } const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "unstable_viewTransition"], _excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "unstable_viewTransition", "children"], _excluded3 = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "unstable_viewTransition"]; // HEY YOU! DON'T TOUCH THIS VARIABLE! // // It is replaced with the proper version at build time via a babel plugin in // the rollup config. // // Export a global property onto the window for React Router detection by the // Core Web Vitals Technology Report. This way they can configure the `wappalyzer` // to detect and properly classify live websites as being built with React Router: // https://github.com/HTTPArchive/wappalyzer/blob/main/src/technologies/r.json const REACT_ROUTER_VERSION = "6"; try { window.__reactRouterVersion = REACT_ROUTER_VERSION; } catch (e) { // no-op } function createBrowserRouter(routes, opts) { return Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["n" /* createRouter */])({ basename: opts == null ? void 0 : opts.basename, future: _extends({}, opts == null ? void 0 : opts.future, { v7_prependBasename: true }), history: Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["j" /* createBrowserHistory */])({ window: opts == null ? void 0 : opts.window }), hydrationData: (opts == null ? void 0 : opts.hydrationData) || parseHydrationData(), routes, mapRouteProperties: __WEBPACK_IMPORTED_MODULE_2_react_router__["o" /* UNSAFE_mapRouteProperties */], unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy, unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss, window: opts == null ? void 0 : opts.window }).initialize(); } function createHashRouter(routes, opts) { return Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["n" /* createRouter */])({ basename: opts == null ? void 0 : opts.basename, future: _extends({}, opts == null ? void 0 : opts.future, { v7_prependBasename: true }), history: Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["k" /* createHashHistory */])({ window: opts == null ? void 0 : opts.window }), hydrationData: (opts == null ? void 0 : opts.hydrationData) || parseHydrationData(), routes, mapRouteProperties: __WEBPACK_IMPORTED_MODULE_2_react_router__["o" /* UNSAFE_mapRouteProperties */], unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy, unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss, window: opts == null ? void 0 : opts.window }).initialize(); } function parseHydrationData() { var _window; let state = (_window = window) == null ? void 0 : _window.__staticRouterHydrationData; if (state && state.errors) { state = _extends({}, state, { errors: deserializeErrors(state.errors) }); } return state; } function deserializeErrors(errors) { if (!errors) return null; let entries = Object.entries(errors); let serialized = {}; for (let [key, val] of entries) { // Hey you! If you change this, please change the corresponding logic in // serializeErrors in react-router-dom/server.tsx :) if (val && val.__type === "RouteErrorResponse") { serialized[key] = new __WEBPACK_IMPORTED_MODULE_3__remix_run_router__["e" /* UNSAFE_ErrorResponseImpl */](val.status, val.statusText, val.data, val.internal === true); } else if (val && val.__type === "Error") { // Attempt to reconstruct the right type of Error (i.e., ReferenceError) if (val.__subType) { let ErrorConstructor = window[val.__subType]; if (typeof ErrorConstructor === "function") { try { // @ts-expect-error let error = new ErrorConstructor(val.message); // Wipe away the client-side stack trace. Nothing to fill it in with // because we don't serialize SSR stack traces for security reasons error.stack = ""; serialized[key] = error; } catch (e) { // no-op - fall through and create a normal Error } } } if (serialized[key] == null) { let error = new Error(val.message); // Wipe away the client-side stack trace. Nothing to fill it in with // because we don't serialize SSR stack traces for security reasons error.stack = ""; serialized[key] = error; } } else { serialized[key] = val; } } return serialized; } const ViewTransitionContext = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createContext"]({ isTransitioning: false }); if (process.env.NODE_ENV !== "production") { ViewTransitionContext.displayName = "ViewTransition"; } const FetchersContext = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createContext"](new Map()); if (process.env.NODE_ENV !== "production") { FetchersContext.displayName = "Fetchers"; } //#endregion //////////////////////////////////////////////////////////////////////////////// //#region Components //////////////////////////////////////////////////////////////////////////////// /** Webpack + React 17 fails to compile on any of the following because webpack complains that `startTransition` doesn't exist in `React`: * import { startTransition } from "react" * import * as React from from "react"; "startTransition" in React ? React.startTransition(() => setState()) : setState() * import * as React from from "react"; "startTransition" in React ? React["startTransition"](() => setState()) : setState() Moving it to a constant such as the following solves the Webpack/React 17 issue: * import * as React from from "react"; const START_TRANSITION = "startTransition"; START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState() However, that introduces webpack/terser minification issues in production builds in React 18 where minification/obfuscation ends up removing the call of React.startTransition entirely from the first half of the ternary. Grabbing this exported reference once up front resolves that issue. See https://github.com/remix-run/react-router/issues/10579 */ const START_TRANSITION = "startTransition"; const startTransitionImpl = __WEBPACK_IMPORTED_MODULE_0_react__[START_TRANSITION]; const FLUSH_SYNC = "flushSync"; const flushSyncImpl = __WEBPACK_IMPORTED_MODULE_1_react_dom__[FLUSH_SYNC]; const USE_ID = "useId"; const useIdImpl = __WEBPACK_IMPORTED_MODULE_0_react__[USE_ID]; function startTransitionSafe(cb) { if (startTransitionImpl) { startTransitionImpl(cb); } else { cb(); } } function flushSyncSafe(cb) { if (flushSyncImpl) { flushSyncImpl(cb); } else { cb(); } } class Deferred { constructor() { this.status = "pending"; this.promise = new Promise((resolve, reject) => { this.resolve = value => { if (this.status === "pending") { this.status = "resolved"; resolve(value); } }; this.reject = reason => { if (this.status === "pending") { this.status = "rejected"; reject(reason); } }; }); } } /** * Given a Remix Router instance, render the appropriate UI */ function RouterProvider(_ref) { let { fallbackElement, router, future } = _ref; let [state, setStateImpl] = __WEBPACK_IMPORTED_MODULE_0_react__["useState"](router.state); let [pendingState, setPendingState] = __WEBPACK_IMPORTED_MODULE_0_react__["useState"](); let [vtContext, setVtContext] = __WEBPACK_IMPORTED_MODULE_0_react__["useState"]({ isTransitioning: false }); let [renderDfd, setRenderDfd] = __WEBPACK_IMPORTED_MODULE_0_react__["useState"](); let [transition, setTransition] = __WEBPACK_IMPORTED_MODULE_0_react__["useState"](); let [interruption, setInterruption] = __WEBPACK_IMPORTED_MODULE_0_react__["useState"](); let fetcherData = __WEBPACK_IMPORTED_MODULE_0_react__["useRef"](new Map()); let { v7_startTransition } = future || {}; let optInStartTransition = __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"](cb => { if (v7_startTransition) { startTransitionSafe(cb); } else { cb(); } }, [v7_startTransition]); let setState = __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"]((newState, _ref2) => { let { deletedFetchers, unstable_flushSync: flushSync, unstable_viewTransitionOpts: viewTransitionOpts } = _ref2; deletedFetchers.forEach(key => fetcherData.current.delete(key)); newState.fetchers.forEach((fetcher, key) => { if (fetcher.data !== undefined) { fetcherData.current.set(key, fetcher.data); } }); let isViewTransitionUnavailable = router.window == null || router.window.document == null || typeof router.window.document.startViewTransition !== "function"; // If this isn't a view transition or it's not available in this browser, // just update and be done with it if (!viewTransitionOpts || isViewTransitionUnavailable) { if (flushSync) { flushSyncSafe(() => setStateImpl(newState)); } else { optInStartTransition(() => setStateImpl(newState)); } return; } // flushSync + startViewTransition if (flushSync) { // Flush through the context to mark DOM elements as transition=ing flushSyncSafe(() => { // Cancel any pending transitions if (transition) { renderDfd && renderDfd.resolve(); transition.skipTransition(); } setVtContext({ isTransitioning: true, flushSync: true, currentLocation: viewTransitionOpts.currentLocation, nextLocation: viewTransitionOpts.nextLocation }); }); // Update the DOM let t = router.window.document.startViewTransition(() => { flushSyncSafe(() => setStateImpl(newState)); }); // Clean up after the animation completes t.finished.finally(() => { flushSyncSafe(() => { setRenderDfd(undefined); setTransition(undefined); setPendingState(undefined); setVtContext({ isTransitioning: false }); }); }); flushSyncSafe(() => setTransition(t)); return; } // startTransition + startViewTransition if (transition) { // Interrupting an in-progress transition, cancel and let everything flush // out, and then kick off a new transition from the interruption state renderDfd && renderDfd.resolve(); transition.skipTransition(); setInterruption({ state: newState, currentLocation: viewTransitionOpts.currentLocation, nextLocation: viewTransitionOpts.nextLocation }); } else { // Completed navigation update with opted-in view transitions, let 'er rip setPendingState(newState); setVtContext({ isTransitioning: true, flushSync: false, currentLocation: viewTransitionOpts.currentLocation, nextLocation: viewTransitionOpts.nextLocation }); } }, [router.window, transition, renderDfd, fetcherData, optInStartTransition]); // Need to use a layout effect here so we are subscribed early enough to // pick up on any render-driven redirects/navigations (useEffect/<Navigate>) __WEBPACK_IMPORTED_MODULE_0_react__["useLayoutEffect"](() => router.subscribe(setState), [router, setState]); // When we start a view transition, create a Deferred we can use for the // eventual "completed" render __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => { if (vtContext.isTransitioning && !vtContext.flushSync) { setRenderDfd(new Deferred()); } }, [vtContext]); // Once the deferred is created, kick off startViewTransition() to update the // DOM and then wait on the Deferred to resolve (indicating the DOM update has // happened) __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => { if (renderDfd && pendingState && router.window) { let newState = pendingState; let renderPromise = renderDfd.promise; let transition = router.window.document.startViewTransition(async () => { optInStartTransition(() => setStateImpl(newState)); await renderPromise; }); transition.finished.finally(() => { setRenderDfd(undefined); setTransition(undefined); setPendingState(undefined); setVtContext({ isTransitioning: false }); }); setTransition(transition); } }, [optInStartTransition, pendingState, renderDfd, router.window]); // When the new location finally renders and is committed to the DOM, this // effect will run to resolve the transition __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => { if (renderDfd && pendingState && state.location.key === pendingState.location.key) { renderDfd.resolve(); } }, [renderDfd, transition, state.location, pendingState]); // If we get interrupted with a new navigation during a transition, we skip // the active transition, let it cleanup, then kick it off again here __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => { if (!vtContext.isTransitioning && interruption) { setPendingState(interruption.state); setVtContext({ isTransitioning: true, flushSync: false, currentLocation: interruption.currentLocation, nextLocation: interruption.nextLocation }); setInterruption(undefined); } }, [vtContext.isTransitioning, interruption]); __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => { process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["i" /* UNSAFE_warning */])(fallbackElement == null || !router.future.v7_partialHydration, "`<RouterProvider fallbackElement>` is deprecated when using " + "`v7_partialHydration`, use a `HydrateFallback` component instead") : void 0; // Only log this once on initial mount // eslint-disable-next-line react-hooks/exhaustive-deps }, []); let navigator = __WEBPACK_IMPORTED_MODULE_0_react__["useMemo"](() => { return { createHref: router.createHref, encodeLocation: router.encodeLocation, go: n => router.navigate(n), push: (to, state, opts) => router.navigate(to, { state, preventScrollReset: opts == null ? void 0 : opts.preventScrollReset }), replace: (to, state, opts) => router.navigate(to, { replace: true, state, preventScrollReset: opts == null ? void 0 : opts.preventScrollReset }) }; }, [router]); let basename = router.basename || "/"; let dataRouterContext = __WEBPACK_IMPORTED_MODULE_0_react__["useMemo"](() => ({ router, navigator, static: false, basename }), [router, navigator, basename]); // The fragment and {null} here are important! We need them to keep React 18's // useId happy when we are server-rendering since we may have a <script> here // containing the hydrated server-side staticContext (from StaticRouterProvider). // useId relies on the component tree structure to generate deterministic id's // so we need to ensure it remains the same on the client even though // we don't need the <script> tag return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_0_react__["Fragment"], null, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_2_react_router__["j" /* UNSAFE_DataRouterContext */].Provider, { value: dataRouterContext }, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_2_react_router__["k" /* UNSAFE_DataRouterStateContext */].Provider, { value: state }, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](FetchersContext.Provider, { value: fetcherData.current }, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ViewTransitionContext.Provider, { value: vtContext }, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_2_react_router__["h" /* Router */], { basename: basename, location: state.location, navigationType: state.historyAction, navigator: navigator, future: { v7_relativeSplatPath: router.future.v7_relativeSplatPath } }, state.initialized || router.future.v7_partialHydration ? /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](DataRoutes, { routes: router.routes, future: router.future, state: state }) : fallbackElement))))), null); } function DataRoutes(_ref3) { let { routes, future, state } = _ref3; return Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["q" /* UNSAFE_useRoutesImpl */])(routes, undefined, state, future); } /** * A `<Router>` for use in web browsers. Provides the cleanest URLs. */ function BrowserRouter(_ref4) { let { basename, children, future, window } = _ref4; let historyRef = __WEBPACK_IMPORTED_MODULE_0_react__["useRef"](); if (historyRef.current == null) { historyRef.current = Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["j" /* createBrowserHistory */])({ window, v5Compat: true }); } let history = historyRef.current; let [state, setStateImpl] = __WEBPACK_IMPORTED_MODULE_0_react__["useState"]({ action: history.action, location: history.location }); let { v7_startTransition } = future || {}; let setState = __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"](newState => { v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState); }, [setStateImpl, v7_startTransition]); __WEBPACK_IMPORTED_MODULE_0_react__["useLayoutEffect"](() => history.listen(setState), [history, setState]); return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_2_react_router__["h" /* Router */], { basename: basename, children: children, location: state.location, navigationType: state.action, navigator: history, future: future }); } /** * A `<Router>` for use in web browsers. Stores the location in the hash * portion of the URL so it is not sent to the server. */ function HashRouter(_ref5) { let { basename, children, future, window } = _ref5; let historyRef = __WEBPACK_IMPORTED_MODULE_0_react__["useRef"](); if (historyRef.current == null) { historyRef.current = Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["k" /* createHashHistory */])({ window, v5Compat: true }); } let history = historyRef.current; let [state, setStateImpl] = __WEBPACK_IMPORTED_MODULE_0_react__["useState"]({ action: history.action, location: history.location }); let { v7_startTransition } = future || {}; let setState = __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"](newState => { v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState); }, [setStateImpl, v7_startTransition]); __WEBPACK_IMPORTED_MODULE_0_react__["useLayoutEffect"](() => history.listen(setState), [history, setState]); return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_2_react_router__["h" /* Router */], { basename: basename, children: children, location: state.location, navigationType: state.action, navigator: history, future: future }); } /** * A `<Router>` that accepts a pre-instantiated history object. It's important * to note that using your own history object is highly discouraged and may add * two versions of the history library to your bundles unless you use the same * version of the history library that React Router uses internally. */ function HistoryRouter(_ref6) { let { basename, children, future, history } = _ref6; let [state, setStateImpl] = __WEBPACK_IMPORTED_MODULE_0_react__["useState"]({ action: history.action, location: history.location }); let { v7_startTransition } = future || {}; let setState = __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"](newState => { v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState); }, [setStateImpl, v7_startTransition]); __WEBPACK_IMPORTED_MODULE_0_react__["useLayoutEffect"](() => history.listen(setState), [history, setState]); return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_2_react_router__["h" /* Router */], { basename: basename, children: children, location: state.location, navigationType: state.action, navigator: history, future: future }); } if (process.env.NODE_ENV !== "production") { HistoryRouter.displayName = "unstable_HistoryRouter"; } const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"; const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i; /** * The public API for rendering a history-aware `<a>`. */ const Link = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["forwardRef"](function LinkWithRef(_ref7, ref) { let { onClick, relative, reloadDocument, replace, state, target, to, preventScrollReset, unstable_viewTransition } = _ref7, rest = _objectWithoutPropertiesLoose(_ref7, _excluded); let { basename } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](__WEBPACK_IMPORTED_MODULE_2_react_router__["m" /* UNSAFE_NavigationContext */]); // Rendered into <a href> for absolute URLs let absoluteHref; let isExternal = false; if (typeof to === "string" && ABSOLUTE_URL_REGEX.test(to)) { // Render the absolute href server- and client-side absoluteHref = to; // Only check for external origins client-side if (isBrowser) { try { let currentUrl = new URL(window.location.href); let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to); let path = Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["A" /* stripBasename */])(targetUrl.pathname, basename); if (targetUrl.origin === currentUrl.origin && path != null) { // Strip the protocol/origin/basename for same-origin absolute URLs to = path + targetUrl.search + targetUrl.hash; } else { isExternal = true; } } catch (e) { // We can't do external URL detection without a valid URL process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["i" /* UNSAFE_warning */])(false, "<Link to=\"" + to + "\"> contains an invalid URL which will probably break " + "when clicked - please update to a valid URL path.") : void 0; } } } // Rendered into <a href> for relative URLs let href = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["K" /* useHref */])(to, { relative }); let internalOnClick = useLinkClickHandler(to, { replace, state, target, preventScrollReset, relative, unstable_viewTransition }); function handleClick(event) { if (onClick) onClick(event); if (!event.defaultPrevented) { internalOnClick(event); } } return ( /*#__PURE__*/ // eslint-disable-next-line jsx-a11y/anchor-has-content __WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("a", _extends({}, rest, { href: absoluteHref || href, onClick: isExternal || reloadDocument ? onClick : handleClick, ref: ref, target: target })) ); }); if (process.env.NODE_ENV !== "production") { Link.displayName = "Link"; } /** * A `<Link>` wrapper that knows if it's "active" or not. */ const NavLink = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["forwardRef"](function NavLinkWithRef(_ref8, ref) { let { "aria-current": ariaCurrentProp = "page", caseSensitive = false, className: classNameProp = "", end = false, style: styleProp, to, unstable_viewTransition, children } = _ref8, rest = _objectWithoutPropertiesLoose(_ref8, _excluded2); let path = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["W" /* useResolvedPath */])(to, { relative: rest.relative }); let location = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["N" /* useLocation */])(); let routerState = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](__WEBPACK_IMPORTED_MODULE_2_react_router__["k" /* UNSAFE_DataRouterStateContext */]); let { navigator, basename } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](__WEBPACK_IMPORTED_MODULE_2_react_router__["m" /* UNSAFE_NavigationContext */]); let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static // eslint-disable-next-line react-hooks/rules-of-hooks useViewTransitionState(path) && unstable_viewTransition === true; let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname; let locationPathname = location.pathname; let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null; if (!caseSensitive) { locationPathname = locationPathname.toLowerCase(); nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null; toPathname = toPathname.toLowerCase(); } if (nextLocationPathname && basename) { nextLocationPathname = Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["A" /* stripBasename */])(nextLocationPathname, basename) || nextLocationPathname; } // If the `to` has a trailing slash, look at that exact spot. Otherwise, // we're looking for a slash _after_ what's in `to`. For example: // // <NavLink to="/users"> and <NavLink to="/users/"> // both want to look for a / at index 6 to match URL `/users/matt` const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length; let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/"; let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/"); let renderProps = { isActive, isPending, isTransitioning }; let ariaCurrent = isActive ? ariaCurrentProp : undefined; let className; if (typeof classNameProp === "function") { className = classNameProp(renderProps); } else { // If the className prop is not a function, we use a default `active` // class for <NavLink />s that are active. In v5 `active` was the default // value for `activeClassName`, but we are removing that API and can still // use the old default behavior for a cleaner upgrade path and keep the // simple styling rules working as they currently do. className = [classNameProp, isActive ? "active" : null, isPending ? "pending" : null, isTransitioning ? "transitioning" : null].filter(Boolean).join(" "); } let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp; return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](Link, _extends({}, rest, { "aria-current": ariaCurrent, className: className, ref: ref, style: style, to: to, unstable_viewTransition: unstable_viewTransition }), typeof children === "function" ? children(renderProps) : children); }); if (process.env.NODE_ENV !== "production") { NavLink.displayName = "NavLink"; } /** * A `@remix-run/router`-aware `<form>`. It behaves like a normal form except * that the interaction with the server is with `fetch` instead of new document * requests, allowing components to add nicer UX to the page as the form is * submitted and returns with data. */ const Form = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["forwardRef"]((_ref9, forwardedRef) => { let { fetcherKey, navigate, reloadDocument, replace, state, method = defaultMethod, action, onSubmit, relative, preventScrollReset, unstable_viewTransition } = _ref9, props = _objectWithoutPropertiesLoose(_ref9, _excluded3); let submit = useSubmit(); let formAction = useFormAction(action, { relative }); let formMethod = method.toLowerCase() === "get" ? "get" : "post"; let submitHandler = event => { onSubmit && onSubmit(event); if (event.defaultPrevented) return; event.preventDefault(); let submitter = event.nativeEvent.submitter; let submitMethod = (submitter == null ? void 0 : submitter.getAttribute("formmethod")) || method; submit(submitter || event.currentTarget, { fetcherKey, method: submitMethod, navigate, replace, state, relative, preventScrollReset, unstable_viewTransition }); }; return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("form", _extends({ ref: forwardedRef, method: formMethod, action: formAction, onSubmit: reloadDocument ? onSubmit : submitHandler }, props)); }); if (process.env.NODE_ENV !== "production") { Form.displayName = "Form"; } /** * This component will emulate the browser's scroll restoration on location * changes. */ function ScrollRestoration(_ref10) { let { getKey, storageKey } = _ref10; useScrollRestoration({ getKey, storageKey }); return null; } if (process.env.NODE_ENV !== "production") { ScrollRestoration.displayName = "ScrollRestoration"; } //#endregion //////////////////////////////////////////////////////////////////////////////// //#region Hooks //////////////////////////////////////////////////////////////////////////////// var DataRouterHook; (function (DataRouterHook) { DataRouterHook["UseScrollRestoration"] = "useScrollRestoration"; DataRouterHook["UseSubmit"] = "useSubmit"; DataRouterHook["UseSubmitFetcher"] = "useSubmitFetcher"; DataRouterHook["UseFetcher"] = "useFetcher"; DataRouterHook["useViewTransitionState"] = "useViewTransitionState"; })(DataRouterHook || (DataRouterHook = {})); var DataRouterStateHook; (function (DataRouterStateHook) { DataRouterStateHook["UseFetcher"] = "useFetcher"; DataRouterStateHook["UseFetchers"] = "useFetchers"; DataRouterStateHook["UseScrollRestoration"] = "useScrollRestoration"; })(DataRouterStateHook || (DataRouterStateHook = {})); // Internal hooks function getDataRouterConsoleError(hookName) { return hookName + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router."; } function useDataRouterContext(hookName) { let ctx = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](__WEBPACK_IMPORTED_MODULE_2_react_router__["j" /* UNSAFE_DataRouterContext */]); !ctx ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false, getDataRouterConsoleError(hookName)) : Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; return ctx; } function useDataRouterState(hookName) { let state = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](__WEBPACK_IMPORTED_MODULE_2_react_router__["k" /* UNSAFE_DataRouterStateContext */]); !state ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false, getDataRouterConsoleError(hookName)) : Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; return state; } // External hooks /** * Handles the click behavior for router `<Link>` components. This is useful if * you need to create custom `<Link>` components with the same click behavior we * use in our exported `<Link>`. */ function useLinkClickHandler(to, _temp) { let { target, replace: replaceProp, state, preventScrollReset, relative, unstable_viewTransition } = _temp === void 0 ? {} : _temp; let navigate = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["Q" /* useNavigate */])(); let location = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["N" /* useLocation */])(); let path = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["W" /* useResolvedPath */])(to, { relative }); return __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"](event => { if (shouldProcessLinkClick(event, target)) { event.preventDefault(); // If the URL hasn't changed, a regular <a> will do a replace instead of // a push, so do the same here unless the replace prop is explicitly set let replace = replaceProp !== undefined ? replaceProp : Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["s" /* createPath */])(location) === Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["s" /* createPath */])(path); navigate(to, { replace, state, preventScrollReset, relative, unstable_viewTransition }); } }, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, unstable_viewTransition]); } /** * A convenient wrapper for reading and writing search parameters via the * URLSearchParams interface. */ function useSearchParams(defaultInit) { process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["i" /* UNSAFE_warning */])(typeof URLSearchParams !== "undefined", "You cannot use the `useSearchParams` hook in a browser that does not " + "support the URLSearchParams API. If you need to support Internet " + "Explorer 11, we recommend you load a polyfill such as " + "https://github.com/ungap/url-search-params.") : void 0; let defaultSearchParamsRef = __WEBPACK_IMPORTED_MODULE_0_react__["useRef"](createSearchParams(defaultInit)); let hasSetSearchParamsRef = __WEBPACK_IMPORTED_MODULE_0_react__["useRef"](false); let location = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["N" /* useLocation */])(); let searchParams = __WEBPACK_IMPORTED_MODULE_0_react__["useMemo"](() => // Only merge in the defaults if we haven't yet called setSearchParams. // Once we call that we want those to take precedence, otherwise you can't // remove a param with setSearchParams({}) if it has an initial value getSearchParamsForLocation(location.search, hasSetSearchParamsRef.current ? null : defaultSearchParamsRef.current), [location.search]); let navigate = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["Q" /* useNavigate */])(); let setSearchParams = __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"]((nextInit, navigateOptions) => { const newSearchParams = createSearchParams(typeof nextInit === "function" ? nextInit(searchParams) : nextInit); hasSetSearchParamsRef.current = true; navigate("?" + newSearchParams, navigateOptions); }, [navigate, searchParams]); return [searchParams, setSearchParams]; } function validateClientSideSubmission() { if (typeof document === "undefined") { throw new Error("You are calling submit during the server render. " + "Try calling submit within a `useEffect` or callback instead."); } } let fetcherId = 0; let getUniqueFetcherId = () => "__" + String(++fetcherId) + "__"; /** * Returns a function that may be used to programmatically submit a form (or * some arbitrary data) to the server. */ function useSubmit() { let { router } = useDataRouterContext(DataRouterHook.UseSubmit); let { basename } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](__WEBPACK_IMPORTED_MODULE_2_react_router__["m" /* UNSAFE_NavigationContext */]); let currentRouteId = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["p" /* UNSAFE_useRouteId */])(); return __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"](function (target, options) { if (options === void 0) { options = {}; } validateClientSideSubmission(); let { action, method, encType, formData, body } = getFormSubmissionInfo(target, basename); if (options.navigate === false) { let key = options.fetcherKey || getUniqueFetcherId(); router.fetch(key, currentRouteId, options.action || action, { preventScrollReset: options.preventScrollReset, formData, body, formMethod: options.method || method, formEncType: options.encType || encType, unstable_flushSync: options.unstable_flushSync }); } else { router.navigate(options.action || action, { preventScrollReset: options.preventScrollReset, formData, body, formMethod: options.method || method, formEncType: options.encType || encType, replace: options.replace, state: options.state, fromRouteId: currentRouteId, unstable_flushSync: options.unstable_flushSync, unstable_viewTransition: options.unstable_viewTransition }); } }, [router, basename, currentRouteId]); } // v7: Eventually we should deprecate this entirely in favor of using the // router method directly? function useFormAction(action, _temp2) { let { relative } = _temp2 === void 0 ? {} : _temp2; let { basename } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](__WEBPACK_IMPORTED_MODULE_2_react_router__["m" /* UNSAFE_NavigationContext */]); let routeContext = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](__WEBPACK_IMPORTED_MODULE_2_react_router__["n" /* UNSAFE_RouteContext */]); !routeContext ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false, "useFormAction must be used inside a RouteContext") : Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; let [match] = routeContext.matches.slice(-1); // Shallow clone path so we can modify it below, otherwise we modify the // object referenced by useMemo inside useResolvedPath let path = _extends({}, Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["W" /* useResolvedPath */])(action ? action : ".", { relative })); // If no action was specified, browsers will persist current search params // when determining the path, so match that behavior // https://github.com/remix-run/remix/issues/927 let location = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["N" /* useLocation */])(); if (action == null) { // Safe to write to this directly here since if action was undefined, we // would have called useResolvedPath(".") which will never include a search path.search = location.search; // When grabbing search params from the URL, remove any included ?index param // since it might not apply to our contextual route. We add it back based // on match.route.index below let params = new URLSearchParams(path.search); if (params.has("index") && params.get("index") === "") { params.delete("index"); path.search = params.toString() ? "?" + params.toString() : ""; } } if ((!action || action === ".") && match.route.index) { path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index"; } // If we're operating within a basename, prepend it to the pathname prior // to creating the form action. If this is a root navigation, then just use // the raw basename which allows the basename to have full control over the // presence of a trailing slash on root actions if (basename !== "/") { path.pathname = path.pathname === "/" ? basename : Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["r" /* joinPaths */])([basename, path.pathname]); } return Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["s" /* createPath */])(path); } // TODO: (v7) Change the useFetcher generic default from `any` to `unknown` /** * Interacts with route loaders and actions without causing a navigation. Great * for any interaction that stays on the same page. */ function useFetcher(_temp3) { var _route$matches; let { key } = _temp3 === void 0 ? {} : _temp3; let { router } = useDataRouterContext(DataRouterHook.UseFetcher); let state = useDataRouterState(DataRouterStateHook.UseFetcher); let fetcherData = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](FetchersContext); let route = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](__WEBPACK_IMPORTED_MODULE_2_react_router__["n" /* UNSAFE_RouteContext */]); let routeId = (_route$matches = route.matches[route.matches.length - 1]) == null ? void 0 : _route$matches.route.id; !fetcherData ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false, "useFetcher must be used inside a FetchersContext") : Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; !route ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false, "useFetcher must be used inside a RouteContext") : Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; !(routeId != null) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false, "useFetcher can only be used on routes that contain a unique \"id\"") : Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; // Fetcher key handling // OK to call conditionally to feature detect `useId` // eslint-disable-next-line react-hooks/rules-of-hooks let defaultKey = useIdImpl ? useIdImpl() : ""; let [fetcherKey, setFetcherKey] = __WEBPACK_IMPORTED_MODULE_0_react__["useState"](key || defaultKey); if (key && key !== fetcherKey) { setFetcherKey(key); } else if (!fetcherKey) { // We will only fall through here when `useId` is not available setFetcherKey(getUniqueFetcherId()); } // Registration/cleanup __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => { router.getFetcher(fetcherKey); return () => { // Tell the router we've unmounted - if v7_fetcherPersist is enabled this // will not delete immediately but instead queue up a delete after the // fetcher returns to an `idle` state router.deleteFetcher(fetcherKey); }; }, [router, fetcherKey]); // Fetcher additions let load = __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"]((href, opts) => { !routeId ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false, "No routeId available for fetcher.load()") : Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; router.fetch(fetcherKey, routeId, href, opts); }, [fetcherKey, routeId, router]); let submitImpl = useSubmit(); let submit = __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"]((target, opts) => { submitImpl(target, _extends({}, opts, { navigate: false, fetcherKey })); }, [fetcherKey, submitImpl]); let FetcherForm = __WEBPACK_IMPORTED_MODULE_0_react__["useMemo"](() => { let FetcherForm = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["forwardRef"]((props, ref) => { return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](Form, _extends({}, props, { navigate: false, fetcherKey: fetcherKey, ref: ref })); }); if (process.env.NODE_ENV !== "production") { FetcherForm.displayName = "fetcher.Form"; } return FetcherForm; }, [fetcherKey]); // Exposed FetcherWithComponents let fetcher = state.fetchers.get(fetcherKey) || __WEBPACK_IMPORTED_MODULE_3__remix_run_router__["d" /* IDLE_FETCHER */]; let data = fetcherData.get(fetcherKey); let fetcherWithComponents = __WEBPACK_IMPORTED_MODULE_0_react__["useMemo"](() => _extends({ Form: FetcherForm, submit, load }, fetcher, { data }), [FetcherForm, submit, load, fetcher, data]); return fetcherWithComponents; } /** * Provides all fetchers currently on the page. Useful for layouts and parent * routes that need to provide pending/optimistic UI regarding the fetch. */ function useFetchers() { let state = useDataRouterState(DataRouterStateHook.UseFetchers); return Array.from(state.fetchers.entries()).map(_ref11 => { let [key, fetcher] = _ref11; return _extends({}, fetcher, { key }); }); } const SCROLL_RESTORATION_STORAGE_KEY = "react-router-scroll-positions"; let savedScrollPositions = {}; /** * When rendered inside a RouterProvider, will restore scroll positions on navigations */ function useScrollRestoration(_temp4) { let { getKey, storageKey } = _temp4 === void 0 ? {} : _temp4; let { router } = useDataRouterContext(DataRouterHook.UseScrollRestoration); let { restoreScrollPosition, preventScrollReset } = useDataRouterState(DataRouterStateHook.UseScrollRestoration); let { basename } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](__WEBPACK_IMPORTED_MODULE_2_react_router__["m" /* UNSAFE_NavigationContext */]); let location = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["N" /* useLocation */])(); let matches = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["P" /* useMatches */])(); let navigation = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["R" /* useNavigation */])(); // Trigger manual scroll restoration while we're active __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => { window.history.scrollRestoration = "manual"; return () => { window.history.scrollRestoration = "auto"; }; }, []); // Save positions on pagehide usePageHide(__WEBPACK_IMPORTED_MODULE_0_react__["useCallback"](() => { if (navigation.state === "idle") { let key = (getKey ? getKey(location, matches) : null) || location.key; savedScrollPositions[key] = window.scrollY; } try { sessionStorage.setItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY, JSON.stringify(savedScrollPositions)); } catch (error) { process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["i" /* UNSAFE_warning */])(false, "Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (" + error + ").") : void 0; } window.history.scrollRestoration = "auto"; }, [storageKey, getKey, navigation.state, location, matches])); // Read in any saved scroll locations if (typeof document !== "undefined") { // eslint-disable-next-line react-hooks/rules-of-hooks __WEBPACK_IMPORTED_MODULE_0_react__["useLayoutEffect"](() => { try { let sessionPositions = sessionStorage.getItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY); if (sessionPositions) { savedScrollPositions = JSON.parse(sessionPositions); } } catch (e) { // no-op, use default empty object } }, [storageKey]); // Enable scroll restoration in the router // eslint-disable-next-line react-hooks/rules-of-hooks __WEBPACK_IMPORTED_MODULE_0_react__["useLayoutEffect"](() => { let getKeyWithoutBasename = getKey && basename !== "/" ? (location, matches) => getKey( // Strip the basename to match useLocation() _extends({}, location, { pathname: Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["A" /* stripBasename */])(location.pathname, basename) || location.pathname }), matches) : getKey; let disableScrollRestoration = router == null ? void 0 : router.enableScrollRestoration(savedScrollPositions, () => window.scrollY, getKeyWithoutBasename); return () => disableScrollRestoration && disableScrollRestoration(); }, [router, basename, getKey]); // Restore scrolling when state.restoreScrollPosition changes // eslint-disable-next-line react-hooks/rules-of-hooks __WEBPACK_IMPORTED_MODULE_0_react__["useLayoutEffect"](() => { // Explicit false means don't do anything (used for submissions) if (restoreScrollPosition === false) { return; } // been here before, scroll to it if (typeof restoreScrollPosition === "number") { window.scrollTo(0, restoreScrollPosition); return; } // try to scroll to the hash if (location.hash) { let el = document.getElementById(decodeURIComponent(location.hash.slice(1))); if (el) { el.scrollIntoView(); return; } } // Don't reset if this navigation opted out if (preventScrollReset === true) { return; } // otherwise go to the top on new locations window.scrollTo(0, 0); }, [location, restoreScrollPosition, preventScrollReset]); } } /** * Setup a callback to be fired on the window's `beforeunload` event. This is * useful for saving some data to `window.localStorage` just before the page * refreshes. * * Note: The `callback` argument should be a function created with * `React.useCallback()`. */ function useBeforeUnload(callback, options) { let { capture } = options || {}; __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => { let opts = capture != null ? { capture } : undefined; window.addEventListener("beforeunload", callback, opts); return () => { window.removeEventListener("beforeunload", callback, opts); }; }, [callback, capture]); } /** * Setup a callback to be fired on the window's `pagehide` event. This is * useful for saving some data to `window.localStorage` just before the page * refreshes. This event is better supported than beforeunload across browsers. * * Note: The `callback` argument should be a function created with * `React.useCallback()`. */ function usePageHide(callback, options) { let { capture } = options || {}; __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => { let opts = capture != null ? { capture } : undefined; window.addEventListener("pagehide", callback, opts); return () => { window.removeEventListener("pagehide", callback, opts); }; }, [callback, capture]); } /** * Wrapper around useBlocker to show a window.confirm prompt to users instead * of building a custom UI with useBlocker. * * Warning: This has *a lot of rough edges* and behaves very differently (and * very incorrectly in some cases) across browsers if user click addition * back/forward navigations while the confirm is open. Use at your own risk. */ function usePrompt(_ref12) { let { when, message } = _ref12; let blocker = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["J" /* useBlocker */])(when); __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => { if (blocker.state === "blocked") { let proceed = window.confirm(message); if (proceed) { // This timeout is needed to avoid a weird "race" on POP navigations // between the `window.history` revert navigation and the result of // `window.confirm` setTimeout(blocker.proceed, 0); } else { blocker.reset(); } } }, [blocker, message]); __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => { if (blocker.state === "blocked" && !when) { blocker.reset(); } }, [blocker, when]); } /** * Return a boolean indicating if there is an active view transition to the * given href. You can use this value to render CSS classes or viewTransitionName * styles onto your elements * * @param href The destination href * @param [opts.relative] Relative routing type ("route" | "path") */ function useViewTransitionState(to, opts) { if (opts === void 0) { opts = {}; } let vtContext = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](ViewTransitionContext); !(vtContext != null) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false, "`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. " + "Did you accidentally import `RouterProvider` from `react-router`?") : Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; let { basename } = useDataRouterContext(DataRouterHook.useViewTransitionState); let path = Object(__WEBPACK_IMPORTED_MODULE_2_react_router__["W" /* useResolvedPath */])(to, { relative: opts.relative }); if (!vtContext.isTransitioning) { return false; } let currentPath = Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["A" /* stripBasename */])(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname; let nextPath = Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["A" /* stripBasename */])(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname; // Transition is active if we're going to or coming from the indicated // destination. This ensures that other PUSH navigations that reverse // an indicated transition apply. I.e., on the list view you have: // // <NavLink to="/details/1" unstable_viewTransition> // // If you click the breadcrumb back to the list view: // // <NavLink to="/list" unstable_viewTransition> // // We should apply the transition because it's indicated as active going // from /list -> /details/1 and therefore should be active on the reverse // (even though this isn't strictly a POP reverse) return Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["t" /* matchPath */])(path.pathname, nextPath) != null || Object(__WEBPACK_IMPORTED_MODULE_3__remix_run_router__["t" /* matchPath */])(path.pathname, currentPath) != null; } //#endregion //# sourceMappingURL=index.js.map /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(2))) /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var undefined; var $Error = __webpack_require__(145); var $EvalError = __webpack_require__(146); var $RangeError = __webpack_require__(147); var $ReferenceError = __webpack_require__(148); var $SyntaxError = __webpack_require__(73); var $TypeError = __webpack_require__(29); var $URIError = __webpack_require__(149); var $Function = Function; // eslint-disable-next-line consistent-return var getEvalledConstructor = function (expressionSyntax) { try { return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); } catch (e) {} }; var $gOPD = Object.getOwnPropertyDescriptor; if ($gOPD) { try { $gOPD({}, ''); } catch (e) { $gOPD = null; // this is IE 8, which has a broken gOPD } } var throwTypeError = function () { throw new $TypeError(); }; var ThrowTypeError = $gOPD ? (function () { try { // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties arguments.callee; // IE 8 does not throw here return throwTypeError; } catch (calleeThrows) { try { // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') return $gOPD(arguments, 'callee').get; } catch (gOPDthrows) { return throwTypeError; } } }()) : throwTypeError; var hasSymbols = __webpack_require__(150)(); var hasProto = __webpack_require__(152)(); var getProto = Object.getPrototypeOf || ( hasProto ? function (x) { return x.__proto__; } // eslint-disable-line no-proto : null ); var needsEval = {}; var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); var INTRINSICS = { __proto__: null, '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, '%Array%': Array, '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, '%AsyncFromSyncIteratorPrototype%': undefined, '%AsyncFunction%': needsEval, '%AsyncGenerator%': needsEval, '%AsyncGeneratorFunction%': needsEval, '%AsyncIteratorPrototype%': needsEval, '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, '%Boolean%': Boolean, '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, '%Date%': Date, '%decodeURI%': decodeURI, '%decodeURIComponent%': decodeURIComponent, '%encodeURI%': encodeURI, '%encodeURIComponent%': encodeURIComponent, '%Error%': $Error, '%eval%': eval, // eslint-disable-line no-eval '%EvalError%': $EvalError, '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, '%Function%': $Function, '%GeneratorFunction%': needsEval, '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, '%isFinite%': isFinite, '%isNaN%': isNaN, '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, '%JSON%': typeof JSON === 'object' ? JSON : undefined, '%Map%': typeof Map === 'undefined' ? undefined : Map, '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), '%Math%': Math, '%Number%': Number, '%Object%': Object, '%parseFloat%': parseFloat, '%parseInt%': parseInt, '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, '%RangeError%': $RangeError, '%ReferenceError%': $ReferenceError, '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, '%RegExp%': RegExp, '%Set%': typeof Set === 'undefined' ? undefined : Set, '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, '%String%': String, '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, '%Symbol%': hasSymbols ? Symbol : undefined, '%SyntaxError%': $SyntaxError, '%ThrowTypeError%': ThrowTypeError, '%TypedArray%': TypedArray, '%TypeError%': $TypeError, '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, '%URIError%': $URIError, '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet }; if (getProto) { try { null.error; // eslint-disable-line no-unused-expressions } catch (e) { // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 var errorProto = getProto(getProto(e)); INTRINSICS['%Error.prototype%'] = errorProto; } } var doEval = function doEval(name) { var value; if (name === '%AsyncFunction%') { value = getEvalledConstructor('async function () {}'); } else if (name === '%GeneratorFunction%') { value = getEvalledConstructor('function* () {}'); } else if (name === '%AsyncGeneratorFunction%') { value = getEvalledConstructor('async function* () {}'); } else if (name === '%AsyncGenerator%') { var fn = doEval('%AsyncGeneratorFunction%'); if (fn) { value = fn.prototype; } } else if (name === '%AsyncIteratorPrototype%') { var gen = doEval('%AsyncGenerator%'); if (gen && getProto) { value = getProto(gen.prototype); } } INTRINSICS[name] = value; return value; }; var LEGACY_ALIASES = { __proto__: null, '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], '%ArrayPrototype%': ['Array', 'prototype'], '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], '%ArrayProto_values%': ['Array', 'prototype', 'values'], '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], '%BooleanPrototype%': ['Boolean', 'prototype'], '%DataViewPrototype%': ['DataView', 'prototype'], '%DatePrototype%': ['Date', 'prototype'], '%ErrorPrototype%': ['Error', 'prototype'], '%EvalErrorPrototype%': ['EvalError', 'prototype'], '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], '%FunctionPrototype%': ['Function', 'prototype'], '%Generator%': ['GeneratorFunction', 'prototype'], '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], '%JSONParse%': ['JSON', 'parse'], '%JSONStringify%': ['JSON', 'stringify'], '%MapPrototype%': ['Map', 'prototype'], '%NumberPrototype%': ['Number', 'prototype'], '%ObjectPrototype%': ['Object', 'prototype'], '%ObjProto_toString%': ['Object', 'prototype', 'toString'], '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], '%PromisePrototype%': ['Promise', 'prototype'], '%PromiseProto_then%': ['Promise', 'prototype', 'then'], '%Promise_all%': ['Promise', 'all'], '%Promise_reject%': ['Promise', 'reject'], '%Promise_resolve%': ['Promise', 'resolve'], '%RangeErrorPrototype%': ['RangeError', 'prototype'], '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], '%RegExpPrototype%': ['RegExp', 'prototype'], '%SetPrototype%': ['Set', 'prototype'], '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], '%StringPrototype%': ['String', 'prototype'], '%SymbolPrototype%': ['Symbol', 'prototype'], '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], '%TypedArrayPrototype%': ['TypedArray', 'prototype'], '%TypeErrorPrototype%': ['TypeError', 'prototype'], '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], '%URIErrorPrototype%': ['URIError', 'prototype'], '%WeakMapPrototype%': ['WeakMap', 'prototype'], '%WeakSetPrototype%': ['WeakSet', 'prototype'] }; var bind = __webpack_require__(43); var hasOwn = __webpack_require__(154); var $concat = bind.call(Function.call, Array.prototype.concat); var $spliceApply = bind.call(Function.apply, Array.prototype.splice); var $replace = bind.call(Function.call, String.prototype.replace); var $strSlice = bind.call(Function.call, String.prototype.slice); var $exec = bind.call(Function.call, RegExp.prototype.exec); /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ var stringToPath = function stringToPath(string) { var first = $strSlice(string, 0, 1); var last = $strSlice(string, -1); if (first === '%' && last !== '%') { throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); } else if (last === '%' && first !== '%') { throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); } var result = []; $replace(string, rePropName, function (match, number, quote, subString) { result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; }); return result; }; /* end adaptation */ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { var intrinsicName = name; var alias; if (hasOwn(LEGACY_ALIASES, intrinsicName)) { alias = LEGACY_ALIASES[intrinsicName]; intrinsicName = '%' + alias[0] + '%'; } if (hasOwn(INTRINSICS, intrinsicName)) { var value = INTRINSICS[intrinsicName]; if (value === needsEval) { value = doEval(intrinsicName); } if (typeof value === 'undefined' && !allowMissing) { throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); } return { alias: alias, name: intrinsicName, value: value }; } throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); }; module.exports = function GetIntrinsic(name, allowMissing) { if (typeof name !== 'string' || name.length === 0) { throw new $TypeError('intrinsic name must be a non-empty string'); } if (arguments.length > 1 && typeof allowMissing !== 'boolean') { throw new $TypeError('"allowMissing" argument must be a boolean'); } if ($exec(/^%?[^%]*%?$/, name) === null) { throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); } var parts = stringToPath(name); var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); var intrinsicRealName = intrinsic.name; var value = intrinsic.value; var skipFurtherCaching = false; var alias = intrinsic.alias; if (alias) { intrinsicBaseName = alias[0]; $spliceApply(parts, $concat([0, 1], alias)); } for (var i = 1, isOwn = true; i < parts.length; i += 1) { var part = parts[i]; var first = $strSlice(part, 0, 1); var last = $strSlice(part, -1); if ( ( (first === '"' || first === "'" || first === '`') || (last === '"' || last === "'" || last === '`') ) && first !== last ) { throw new $SyntaxError('property names with quotes must have matching quotes'); } if (part === 'constructor' || !isOwn) { skipFurtherCaching = true; } intrinsicBaseName += '.' + part; intrinsicRealName = '%' + intrinsicBaseName + '%'; if (hasOwn(INTRINSICS, intrinsicRealName)) { value = INTRINSICS[intrinsicRealName]; } else if (value != null) { if (!(part in value)) { if (!allowMissing) { throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); } return void undefined; } if ($gOPD && (i + 1) >= parts.length) { var desc = $gOPD(value, part); isOwn = !!desc; // By convention, when a data property is converted to an accessor // property to emulate a data property that does not suffer from // the override mistake, that accessor's getter is marked with // an `originalValue` property. Here, when we detect this, we // uphold the illusion by pretending to see that original data // property, i.e., returning the value rather than the getter // itself. if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { value = desc.get; } else { value = value[part]; } } else { isOwn = hasOwn(value, part); value = value[part]; } if (isOwn && !skipFurtherCaching) { INTRINSICS[intrinsicRealName] = value; } } } return value; }; /***/ }), /* 26 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Styling = function (_Component) { _inherits(Styling, _Component); function Styling(props) { _classCallCheck(this, Styling); return _possibleConstructorReturn(this, (Styling.__proto__ || Object.getPrototypeOf(Styling)).call(this, props)); } _createClass(Styling, [{ key: 'render', value: function render() { var _this2 = this; var customClass = _.isUndefined(this.props.state['custom-class']) ? '' : this.props.state['custom-class']; return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Additional CSS Classes') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Add classes that will be output on this field\'s container ' + 'to aid your theme\'s default styling.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement('input', { type: 'text', placeholder: (0, _utils.translate)('E.g. form-field'), className: 'sui-form-control', value: customClass, onChange: function onChange(e) { _this2.props.updateProperty('custom-class', e.target.value); } }), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('These will be output as you see them here.') ) ) ); } }]); return Styling; }(_react.Component); exports.default = Styling; /***/ }), /* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibilityRule = __webpack_require__(483); var _visibilityRule2 = _interopRequireDefault(_visibilityRule); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Visibility = function (_Component) { _inherits(Visibility, _Component); function Visibility(props) { _classCallCheck(this, Visibility); var _this = _possibleConstructorReturn(this, (Visibility.__proto__ || Object.getPrototypeOf(Visibility)).call(this, props)); _this.addRule = _this.addRule.bind(_this); _this.removeRule = _this.removeRule.bind(_this); _this.updateField = _this.updateField.bind(_this); _this.updateRule = _this.updateRule.bind(_this); _this.updateValue = _this.updateValue.bind(_this); _this.updateInputValue = _this.updateInputValue.bind(_this); _this.fields = (0, _utils.getFields)(_this.props.wrappers, ['stripe', 'paypal', 'page-break', 'pagination', 'section', 'html'], { main_date_field: true }); _this.fields = _.filter(_this.fields, function (field) { return field.element_id !== _this.props.state.element_id; }); if (_.contains(['address', 'date', 'time', 'slider', 'name'], _this.props.state.type)) { _this.fields = _.filter(_this.fields, function (field) { return !field.element_id.startsWith(_this.props.state.element_id + '-'); }); } _this.validateConditions(); return _this; } _createClass(Visibility, [{ key: 'updateState', value: function updateState(state) { if (this.props.isPayment) { this.props.updatePayment(this.props.counter, 'conditions', state); } else { this.props.updateProperty('conditions', state); } } }, { key: 'getPropState', value: function getPropState() { var props = []; _.each(this.props.state.conditions, function (element) { var newElement = Object.assign({}, element); props.push(newElement); }); return props; } }, { key: 'updateField', value: function updateField(index, value) { var newState = this.getPropState(); // eslint-disable-next-line camelcase newState[index].element_id = value; newState[index].rule = 'is'; newState[index].value = ''; this.updateState(newState); } }, { key: 'updateRule', value: function updateRule(index, value) { var newState = this.getPropState(); newState[index].rule = value; this.updateState(newState); } }, { key: 'updateValue', value: function updateValue(index, value) { var newState = this.getPropState(); newState[index].value = value; this.updateState(newState); } }, { key: 'updateInputValue', value: function updateInputValue(index, value) { var newState = this.getPropState(); newState[index].value = value; this.updateState(newState); } }, { key: 'removeRule', value: function removeRule(index) { var newState = this.getPropState(); newState.splice(index, 1); this.updateState(newState); } }, { key: 'addRule', value: function addRule() { var newState = this.getPropState(); var elementId = !_.isUndefined(this.fields[0]) ? this.fields[0].element_id : ''; newState.push({ // eslint-disable-next-line camelcase element_id: elementId, rule: 'is', value: '' }); this.updateState(newState); } }, { key: 'validateConditions', value: function validateConditions() { var rules = _.pluck(this.props.state.conditions, 'element_id'); var fields = _.pluck(this.fields, 'element_id'); var invalidField = _.difference(rules, fields); if (!_.isUndefined(invalidField)) { this.removeCondition(invalidField); } } }, { key: 'removeCondition', value: function removeCondition(field) { var newState = this.getPropState(); var readyState = _.filter(newState, function (obj) { return !_.contains(field, obj.element_id); }); this.updateState(readyState); } }, { key: 'render', value: function render() { var _this2 = this; var globalMarkup = _react2.default.createElement( 'div', { className: 'fui-visibility-options' }, _react2.default.createElement( 'div', { className: 'fui-visibility-option' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'condition_action', defaultValue: 'show', noWrapper: true }), _react2.default.createElement( 'span', { value: 'show' }, (0, _utils.translate)('Show') ), _react2.default.createElement( 'span', { value: 'hide' }, (0, _utils.translate)('Hide') ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('this field if') ) ), _react2.default.createElement( 'div', { className: 'fui-visibility-option' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'condition_rule', defaultValue: 'all', noWrapper: true }), _react2.default.createElement( 'span', { value: 'all' }, (0, _utils.translate)('All') ), _react2.default.createElement( 'span', { value: 'any' }, (0, _utils.translate)('Any') ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('of the following rules match:') ) ) ); if (this.props.isPayment) { globalMarkup = _react2.default.createElement( 'div', { className: 'fui-visibility-options' }, _react2.default.createElement( 'div', { className: 'fui-visibility-option' }, _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Process this plan if') ) ), _react2.default.createElement( 'div', { className: 'fui-visibility-option' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'condition_rule', defaultValue: 'all', noWrapper: true }), _react2.default.createElement( 'span', { value: 'all' }, (0, _utils.translate)('All') ), _react2.default.createElement( 'span', { value: 'any' }, (0, _utils.translate)('Any') ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('of the following conditions match:') ) ) ); } var noConditions = _react2.default.createElement( 'div', { className: 'fui-visibility-group' }, this.props.wrappers.length < 2 && this.fields.length < 2 && _.isEmpty(this.fields) && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red sui-active fui-visibility-notice', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('You need more than one field to configure ' + 'visibility conditions. Add more fields!') ) ) ) ), (this.props.wrappers.length > 1 || this.fields.length >= 1) && !_.isEmpty(this.fields) && _react2.default.createElement( 'div', { className: 'fui-visibility-header' }, globalMarkup, _react2.default.createElement( 'label', { className: 'sui-label' }, this.props.isPayment ? (0, _utils.translate)('Conditions') : (0, _utils.translate)('Rules') ) ), _react2.default.createElement( 'div', { className: 'fui-visibility' }, _react2.default.createElement( 'div', { className: 'fui-visibility-empty-message' }, (this.props.wrappers.length > 1 || this.fields.length >= 1) && !_.isEmpty(this.fields) && _react2.default.createElement( 'button', { accessKey: 'a', onClick: this.addRule }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), this.props.isPayment ? (0, _utils.translate)('Add conditions') : (0, _utils.translate)('Add Rule') ), _react2.default.createElement( 'p', null, !this.props.isPayment && (0, _utils.translate)('By default field will always be visible. If ' + 'you want to hide or show fields based on user ' + 'input you can add conditions.'), this.props.isPayment && (0, _utils.translate)('Add conditions for how this plan will be ' + 'processed based on your form field data.') ) ) ) ); if (_.isUndefined(this.props.state.conditions) || this.props.state.conditions.length === 0) { _react2.default.createElement( _react2.default.Fragment, null, noConditions ); } if (!_.isUndefined(this.props.state.conditions) && this.props.state.conditions.length > 0 && !_.isEmpty(this.fields)) { return _react2.default.createElement( 'div', { className: 'fui-visibility-group' }, (this.props.wrappers.length > 1 || this.fields.length > 0) && _react2.default.createElement( 'div', { className: 'fui-visibility-header' }, globalMarkup, _react2.default.createElement( 'label', { className: 'sui-label' }, this.props.isPayment ? (0, _utils.translate)('Conditions') : (0, _utils.translate)('Rules') ) ), _react2.default.createElement( 'div', { className: 'fui-visibility' }, _react2.default.createElement( 'div', { className: 'fui-visibility-rules' }, _.map(this.props.state.conditions, function (rule, i) { return _react2.default.createElement(_visibilityRule2.default, _extends({}, _this2.props, { rule: rule, key: i, counter: i, removeRule: _this2.removeRule, updateField: _this2.updateField, updateRule: _this2.updateRule, updateValue: _this2.updateValue, updateInputValue: _this2.updateInputValue, fields: _this2.fields })); }) ) ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-blue', accessKey: 'a', onClick: this.addRule }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), this.props.isPayment ? (0, _utils.translate)('Add conditions') : (0, _utils.translate)('Add Rule') ) ); } return _react2.default.createElement( _react2.default.Fragment, null, noConditions ); } }]); return Visibility; }(_react.Component); exports.default = Visibility; /***/ }), /* 28 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Notification = function (_Component) { _inherits(Notification, _Component); function Notification(props) { _classCallCheck(this, Notification); return _possibleConstructorReturn(this, (Notification.__proto__ || Object.getPrototypeOf(Notification)).call(this, props)); } _createClass(Notification, [{ key: 'initialize', value: function initialize() { if (!jQuery('.sui-floating-notices').length) { jQuery('main.sui-wrap').prepend('<div class="sui-floating-notices"></div>'); } if (!jQuery('#forminator-notification').length) { jQuery('.sui-floating-notices').append('<div role="alert" id="forminator-notification" class="sui-notice" aria-live="assertive"></div>'); } else { jQuery('#forminator-notification').remove(); this.initialize(); } this.$notification = jQuery('#forminator-notification'); } }, { key: 'open', value: function open() { this.initialize(); var noticeId = 'forminator-notification'; var noticeMessage = '<p>' + this.props.text + '</p>'; var noticeOptions = { type: this.props.type || 'default', autoclose: { timeout: this.props.time || 5000 }, dismiss: { show: this.props.dismiss || false } }; SUI.openNotice(noticeId, noticeMessage, noticeOptions); } }, { key: 'close', value: function close() { var noticeId = 'forminator-notification'; SUI.closeNotice(noticeId); } }]); return Notification; }(_react.Component); exports.default = Notification; /***/ }), /* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @type {import('./type')} */ module.exports = TypeError; /***/ }), /* 30 */ /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || Function("return this")() || (1,eval)("this"); } catch(e) { // This works if the window reference is available if(typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /* 31 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _dompurify = __webpack_require__(61); var _dompurify2 = _interopRequireDefault(_dompurify); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var WpEditor = function (_Component) { _inherits(WpEditor, _Component); function WpEditor(props) { _classCallCheck(this, WpEditor); var _this = _possibleConstructorReturn(this, (WpEditor.__proto__ || Object.getPrototypeOf(WpEditor)).call(this, props)); _this.textEditor = _react2.default.createRef(); _this.updateValue = _this.updateValue.bind(_this); _this.updateEditor = _this.updateEditor.bind(_this); _this.toggleOptions = _this.toggleOptions.bind(_this); _this.state = { editorOptionsOpen: false }; return _this; } _createClass(WpEditor, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; this.$el = jQuery(this.el); // update field if default value is present. if (!_.isUndefined(this.props.defaultValue)) { this.updateValue(this.props.defaultValue); } setTimeout(function () { _this2.initEditor(); }, 50); } }, { key: 'initEditor', value: function initEditor() { var _this3 = this; if (_.isUndefined(wp.editor) || typeof tinyMCE === 'undefined') { setTimeout(function () { _this3.initEditor(); }, 50); return; } var tinymceProps = {}; if (!_.isUndefined(this.props.allowButtonOnclick)) { // Add onclick attribute. tinymceProps.extended_valid_elements = 'button[onclick|accesskey|class|dir<ltr?rtl|disabled<disabled|id|lang|name|style|tabindex|title|type|value]'; } if (!_.isUndefined(this.props.cutomTinymce)) { tinymceProps.toolbar1 = this.props.cutomTinymce; } if (_.isEmpty(tinymceProps)) { tinymceProps = true; } // Initialize editor wp.editor.initialize('forminator-field-' + (this.props.property + !_.isUndefined(this.props.extraId) ? this.props.extraId : ''), { tinymce: tinymceProps, quicktags: true }); this.bindEvents(); } }, { key: 'bindEvents', value: function bindEvents() { var _this4 = this; this.editor = tinyMCE.get('forminator-field-' + (this.props.property + !_.isUndefined(this.props.extraId) ? this.props.extraId : '')); if (this.editor === null) { setTimeout(function () { _this4.bindEvents(); }, 50); return; } this.editor.on('keyup', this.updateEditor); this.editor.on('change', this.updateEditor); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.$el.off('change', this.updateEditor); wp.editor.remove('forminator-field-' + (this.props.property + !_.isUndefined(this.props.extraId) ? this.props.extraId : '')); this.$el.unbind().removeData(); } }, { key: 'updateEditor', value: function updateEditor() { // use editor content as value var value = this.editor.getContent(); this.updateValue(value); } }, { key: 'updateValue', value: function updateValue(value) { // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, _dompurify2.default.sanitize(value, { ADD_ATTR: ['target'] })); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, _dompurify2.default.sanitize(value, { ADD_ATTR: ['target'] })); } } }, { key: 'toggleOptions', value: function toggleOptions() { if (this.state.editorOptionsOpen) { this.setState({ editorOptionsOpen: false }); } else { this.setState({ editorOptionsOpen: true }); } } }, { key: 'insertContent', value: function insertContent(content) { // If tinyMce editor is hidden, we are on Text mode if (this.editor.hidden) { var textEditor = jQuery(this.textEditor); var startPos = textEditor.prop('selectionStart'); var endPos = textEditor.prop('selectionEnd'); var textEditorVal = textEditor.val(); textEditor.val(textEditorVal.substring(0, startPos) + '{' + content + '}' + textEditorVal.substring(endPos, textEditorVal.length)); textEditor.trigger('change'); } else { this.editor.insertContent('{' + content + '}'); } // close option this.toggleOptions(); } }, { key: 'getDisabledFields', value: function getDisabledFields() { var disabledFields = ['captcha', 'product', 'hidden', 'page-break', 'postdata', 'total', 'upload', 'stripe', 'paypal', 'password']; if (!_.isUndefined(this.props.enablePostData) && this.props.enablePostData && !_.isUndefined(this.props.enableUpload) && this.props.enableUpload) { disabledFields = ['captcha', 'product', 'hidden', 'page-break', 'total', 'stripe', 'paypal', 'password']; } return disabledFields; } }, { key: 'getFields', value: function getFields() { var disabledFields = this.getDisabledFields(); var excludeSubFields = !_.isUndefined(this.props.excludeSubFields) ? this.props.excludeSubFields : false; var form_wrappers = this.props.wrappers; if (!_.isUndefined(this.props.enableParentForm) && !_.isUndefined(forminatorData.parentFormFields)) { form_wrappers = forminatorData.parentFormFields; } return (0, _utils.getFields)(form_wrappers, disabledFields, undefined, undefined, excludeSubFields); } }, { key: 'getFormData', value: function getFormData() { var _this5 = this; var fields = this.getFields(); var allowRepeater = !_.isUndefined(this.props.allowRepeater) ? this.props.allowRepeater : true; var requiredFields = _.map(fields, function (field, index) { if (field.required) { if (allowRepeater || !allowRepeater && _.isEmpty(field.parent_group)) { return _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option', key: index }, _react2.default.createElement( 'a', { className: 'wpmudev-insert-content', onClick: _this5.insertContent.bind(_this5, field.element_id) }, (0, _escapeHtml.escapeHTML)(field.label) ) ); } } }); var currentType = !_.isUndefined(this.props.settings.type) ? this.props.settings.type : ''; var nonrequiredFields = _.map(fields, function (field, index) { if (!field.required && currentType !== field.field_type) { if (allowRepeater || !allowRepeater && _.isEmpty(field.parent_group)) { return _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option', key: index }, _react2.default.createElement( 'a', { className: 'wpmudev-insert-content', onClick: _this5.insertContent.bind(_this5, field.element_id) }, (0, _escapeHtml.escapeHTML)(field.label) ) ); } } }); return _react2.default.createElement( _react2.default.Fragment, null, requiredFields && requiredFields.some(function (item) { return "undefined" !== typeof item; }) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option' }, _react2.default.createElement( 'strong', null, (0, _utils.translate)('Required Fields') ) ), _react2.default.createElement( _react2.default.Fragment, null, requiredFields ) ), nonrequiredFields && nonrequiredFields.some(function (item) { return "undefined" !== typeof item; }) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option' }, _react2.default.createElement( 'strong', null, (0, _utils.translate)('Optional Fields') ) ), _react2.default.createElement( _react2.default.Fragment, null, nonrequiredFields ) ) ); } }, { key: 'getMiscData', value: function getMiscData() { var _this6 = this; var editorOptions = !_.isEmpty(this.props.editorOptions) ? this.props.editorOptions : []; return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option' }, _react2.default.createElement( 'strong', null, (0, _utils.translate)('Misc Data') ) ), _.map(editorOptions, function (label, key) { return _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option', key: key }, _react2.default.createElement( 'a', { className: 'wpmudev-insert-content', onClick: _this6.insertContent.bind(_this6, key) }, label ) ); }) ); } }, { key: 'getPaymentData', value: function getPaymentData() { var _this7 = this; var formWrappers = this.props.wrappers; if (!_.isUndefined(this.props.enableParentForm) && !_.isUndefined(forminatorData.parentFormFields)) { formWrappers = forminatorData.parentFormFields; } var paypalFields = (0, _utils.getFieldsByType)('paypal', formWrappers); var stripeFields = (0, _utils.getFieldsByType)('stripe', formWrappers); var paymentOptions = !_.isEmpty(this.props.paymentOptions) ? this.props.paymentOptions : []; if (!_.isEmpty(paypalFields) || !_.isEmpty(stripeFields)) { return _react2.default.createElement( _react2.default.Fragment, null, this.props.paymentOptions && _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option' }, _react2.default.createElement( 'strong', null, (0, _utils.translate)('Payment Data') ) ), _.map(paymentOptions, function (label, key) { return _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option', key: key }, _react2.default.createElement( 'a', { className: 'wpmudev-insert-content', onClick: _this7.insertContent.bind(_this7, key) }, label ) ); }) ); } } }, { key: 'getEditorOptions', value: function getEditorOptions() { var _this8 = this; if (this.props.hideEditorOptions) { return ''; } var miscMarkup = this.props.disableMiscData ? '' : this.getMiscData(); var paymentMarkup = this.props.enableFormData ? this.getPaymentData() : ''; var fieldsMarkup = this.props.enableFormData ? this.getFormData() : ''; var mainOptions = this.props.mainOptions ? this.props.mainOptions : { form_name: (0, _utils.translate)('Form Name') }; return _react2.default.createElement( 'ul', { className: this.state.editorOptionsOpen ? 'sui-active' : '' }, this.props.enableAllFormFields && _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option' }, _react2.default.createElement( 'a', { className: 'wpmudev-insert-content', onClick: this.insertContent.bind(this, 'all_fields') }, (0, _utils.translate)('All Form Fields') ) ), this.props.enableAllNonFormFields && _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option' }, _react2.default.createElement( 'a', { className: 'wpmudev-insert-content', onClick: this.insertContent.bind(this, 'all_non_empty_fields') }, (0, _utils.translate)('All Non Empty Fields') ) ), fieldsMarkup, _react2.default.createElement( _react2.default.Fragment, null, this.props.mainOptionsLabel && _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option' }, _react2.default.createElement( 'strong', null, this.props.mainOptionsLabel ) ), _.map(mainOptions, function (label, key) { return _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option', key: key }, _react2.default.createElement( 'a', { className: 'wpmudev-insert-content', onClick: _this8.insertContent.bind(_this8, key) }, label ) ); }) ), miscMarkup, paymentMarkup ); } }, { key: 'isValid', value: function isValid(value) { if (this.props.isRequired) { return this.props.isRequired && !_.isEmpty(value); } else if (!_.isUndefined(this.props.isPositive)) { return _.isEmpty(value) || value >= 0; } return true; } }, { key: 'render', value: function render() { var _this9 = this; var value = this.props.settings[this.props.property] || this.props.defaultValue || ''; var editorOptions = this.getEditorOptions(); var requiredError = !_.isUndefined(this.props.requiredError) ? this.props.requiredError : (0, _utils.translate)('This field is required!'); var hasErrorClass = !this.isValid(value) ? 'sui-form-field-error' : ''; var editorOptionsMarkup = void 0; if (!_.isEmpty(editorOptions)) { editorOptionsMarkup = _react2.default.createElement( 'div', { className: 'sui-editor-options' }, _react2.default.createElement( 'button', { className: this.state.editorOptionsOpen ? 'sui-tooltip sui-active' : 'sui-tooltip', 'data-tooltip': !_.isUndefined(this.props.tooltipLabel) ? this.props.tooltipLabel : (0, _utils.translate)('Add form data'), onClick: this.toggleOptions }, _react2.default.createElement('i', { className: 'sui-icon-plus sui-sm', 'aria-hidden': 'true' }), !_.isUndefined(this.props.selectLabel) ? this.props.selectLabel : (0, _utils.translate)('Insert form fields') ), editorOptions ); } var wpEditorLabel = ''; if (this.props.label) { wpEditorLabel = _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + (this.props.property + !_.isUndefined(this.props.extraId) ? this.props.extraId : ''), className: 'sui-label' }, this.props.label, '\xA0', this.props.isRequired && _react2.default.createElement( 'span', { className: 'sui-error' }, ' *' ), this.props.note && _react2.default.createElement( 'span', { className: 'sui-label-note' }, this.props.note ) ); } return _react2.default.createElement( 'div', { className: 'sui-form-field ' + hasErrorClass }, wpEditorLabel, this.props.descriptionTop && _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '20px' } }, this.props.descriptionTop ), _react2.default.createElement( 'div', { className: 'sui-editor' + (_.isEmpty(editorOptions) ? '' : ' sui-editor-with-options') }, editorOptionsMarkup, _react2.default.createElement('textarea', { id: 'forminator-field-' + (this.props.property + !_.isUndefined(this.props.extraId) ? this.props.extraId : ''), placeholder: this.props.placeholder, defaultValue: value, onChange: function onChange(e) { _this9.updateValue(e.target.value); }, ref: function ref(textEditor) { return _this9.textEditor = textEditor; } }) ), this.props.isRequired && !this.isValid(value) && _react2.default.createElement( 'span', { className: 'sui-error-message' }, requiredError ), this.props.description && _react2.default.createElement( 'span', { className: 'sui-description' }, this.props.description ) ); } }]); return WpEditor; }(_react.Component); exports.default = WpEditor; /***/ }), /* 32 */, /* 33 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbortedDeferredError; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Action; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return IDLE_BLOCKER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return IDLE_FETCHER; }); /* unused harmony export IDLE_NAVIGATION */ /* unused harmony export UNSAFE_DEFERRED_SYMBOL */ /* unused harmony export UNSAFE_DeferredData */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return ErrorResponseImpl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return convertRouteMatchToUiMatch; }); /* unused harmony export UNSAFE_convertRoutesToDataRoutes */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getResolveToMatches; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return invariant; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return warning; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return createBrowserHistory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return createHashHistory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return createMemoryHistory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return createPath; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return createRouter; }); /* unused harmony export createStaticHandler */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return defer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return generatePath; }); /* unused harmony export getStaticContextFromError */ /* unused harmony export getToPathname */ /* unused harmony export isDeferredData */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return isRouteErrorResponse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return joinPaths; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return json; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return matchPath; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return matchRoutes; }); /* unused harmony export normalizePathname */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return parsePath; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return redirect; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return redirectDocument; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return resolvePath; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return resolveTo; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return stripBasename; }); /** * @remix-run/router v1.17.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } //////////////////////////////////////////////////////////////////////////////// //#region Types and Constants //////////////////////////////////////////////////////////////////////////////// /** * Actions represent the type of change to a location value. */ var Action; (function (Action) { /** * A POP indicates a change to an arbitrary index in the history stack, such * as a back or forward navigation. It does not describe the direction of the * navigation, only that the current index changed. * * Note: This is the default action for newly created history objects. */ Action["Pop"] = "POP"; /** * A PUSH indicates a new entry being added to the history stack, such as when * a link is clicked and a new page loads. When this happens, all subsequent * entries in the stack are lost. */ Action["Push"] = "PUSH"; /** * A REPLACE indicates the entry at the current index in the history stack * being replaced by a new one. */ Action["Replace"] = "REPLACE"; })(Action || (Action = {})); const PopStateEventType = "popstate"; /** * Memory history stores the current location in memory. It is designed for use * in stateful non-browser environments like tests and React Native. */ function createMemoryHistory(options) { if (options === void 0) { options = {}; } let { initialEntries = ["/"], initialIndex, v5Compat = false } = options; let entries; // Declare so we can access from createMemoryLocation entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === "string" ? null : entry.state, index === 0 ? "default" : undefined)); let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex); let action = Action.Pop; let listener = null; function clampIndex(n) { return Math.min(Math.max(n, 0), entries.length - 1); } function getCurrentLocation() { return entries[index]; } function createMemoryLocation(to, state, key) { if (state === void 0) { state = null; } let location = createLocation(entries ? getCurrentLocation().pathname : "/", to, state, key); warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in memory history: " + JSON.stringify(to)); return location; } function createHref(to) { return typeof to === "string" ? to : createPath(to); } let history = { get index() { return index; }, get action() { return action; }, get location() { return getCurrentLocation(); }, createHref, createURL(to) { return new URL(createHref(to), "http://localhost"); }, encodeLocation(to) { let path = typeof to === "string" ? parsePath(to) : to; return { pathname: path.pathname || "", search: path.search || "", hash: path.hash || "" }; }, push(to, state) { action = Action.Push; let nextLocation = createMemoryLocation(to, state); index += 1; entries.splice(index, entries.length, nextLocation); if (v5Compat && listener) { listener({ action, location: nextLocation, delta: 1 }); } }, replace(to, state) { action = Action.Replace; let nextLocation = createMemoryLocation(to, state); entries[index] = nextLocation; if (v5Compat && listener) { listener({ action, location: nextLocation, delta: 0 }); } }, go(delta) { action = Action.Pop; let nextIndex = clampIndex(index + delta); let nextLocation = entries[nextIndex]; index = nextIndex; if (listener) { listener({ action, location: nextLocation, delta }); } }, listen(fn) { listener = fn; return () => { listener = null; }; } }; return history; } /** * Browser history stores the location in regular URLs. This is the standard for * most web apps, but it requires some configuration on the server to ensure you * serve the same app at multiple URLs. * * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory */ function createBrowserHistory(options) { if (options === void 0) { options = {}; } function createBrowserLocation(window, globalHistory) { let { pathname, search, hash } = window.location; return createLocation("", { pathname, search, hash }, // state defaults to `null` because `window.history.state` does globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default"); } function createBrowserHref(window, to) { return typeof to === "string" ? to : createPath(to); } return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options); } /** * Hash history stores the location in window.location.hash. This makes it ideal * for situations where you don't want to send the location to the server for * some reason, either because you do cannot configure it or the URL space is * reserved for something else. * * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory */ function createHashHistory(options) { if (options === void 0) { options = {}; } function createHashLocation(window, globalHistory) { let { pathname = "/", search = "", hash = "" } = parsePath(window.location.hash.substr(1)); // Hash URL should always have a leading / just like window.location.pathname // does, so if an app ends up at a route like /#something then we add a // leading slash so all of our path-matching behaves the same as if it would // in a browser router. This is particularly important when there exists a // root splat route (<Route path="*">) since that matches internally against // "/*" and we'd expect /#something to 404 in a hash router app. if (!pathname.startsWith("/") && !pathname.startsWith(".")) { pathname = "/" + pathname; } return createLocation("", { pathname, search, hash }, // state defaults to `null` because `window.history.state` does globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default"); } function createHashHref(window, to) { let base = window.document.querySelector("base"); let href = ""; if (base && base.getAttribute("href")) { let url = window.location.href; let hashIndex = url.indexOf("#"); href = hashIndex === -1 ? url : url.slice(0, hashIndex); } return href + "#" + (typeof to === "string" ? to : createPath(to)); } function validateHashLocation(location, to) { warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in hash history.push(" + JSON.stringify(to) + ")"); } return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options); } function invariant(value, message) { if (value === false || value === null || typeof value === "undefined") { throw new Error(message); } } function warning(cond, message) { if (!cond) { // eslint-disable-next-line no-console if (typeof console !== "undefined") console.warn(message); try { // Welcome to debugging history! // // This error is thrown as a convenience, so you can more easily // find the source for a warning that appears in the console by // enabling "pause on exceptions" in your JavaScript debugger. throw new Error(message); // eslint-disable-next-line no-empty } catch (e) {} } } function createKey() { return Math.random().toString(36).substr(2, 8); } /** * For browser-based histories, we combine the state and key into an object */ function getHistoryState(location, index) { return { usr: location.state, key: location.key, idx: index }; } /** * Creates a Location object with a unique key from the given Path */ function createLocation(current, to, state, key) { if (state === void 0) { state = null; } let location = _extends({ pathname: typeof current === "string" ? current : current.pathname, search: "", hash: "" }, typeof to === "string" ? parsePath(to) : to, { state, // TODO: This could be cleaned up. push/replace should probably just take // full Locations now and avoid the need to run through this flow at all // But that's a pretty big refactor to the current test suite so going to // keep as is for the time being and just let any incoming keys take precedence key: to && to.key || key || createKey() }); return location; } /** * Creates a string URL path from the given pathname, search, and hash components. */ function createPath(_ref) { let { pathname = "/", search = "", hash = "" } = _ref; if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search; if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash; return pathname; } /** * Parses a string URL path into its separate pathname, search, and hash components. */ function parsePath(path) { let parsedPath = {}; if (path) { let hashIndex = path.indexOf("#"); if (hashIndex >= 0) { parsedPath.hash = path.substr(hashIndex); path = path.substr(0, hashIndex); } let searchIndex = path.indexOf("?"); if (searchIndex >= 0) { parsedPath.search = path.substr(searchIndex); path = path.substr(0, searchIndex); } if (path) { parsedPath.pathname = path; } } return parsedPath; } function getUrlBasedHistory(getLocation, createHref, validateLocation, options) { if (options === void 0) { options = {}; } let { window = document.defaultView, v5Compat = false } = options; let globalHistory = window.history; let action = Action.Pop; let listener = null; let index = getIndex(); // Index should only be null when we initialize. If not, it's because the // user called history.pushState or history.replaceState directly, in which // case we should log a warning as it will result in bugs. if (index == null) { index = 0; globalHistory.replaceState(_extends({}, globalHistory.state, { idx: index }), ""); } function getIndex() { let state = globalHistory.state || { idx: null }; return state.idx; } function handlePop() { action = Action.Pop; let nextIndex = getIndex(); let delta = nextIndex == null ? null : nextIndex - index; index = nextIndex; if (listener) { listener({ action, location: history.location, delta }); } } function push(to, state) { action = Action.Push; let location = createLocation(history.location, to, state); if (validateLocation) validateLocation(location, to); index = getIndex() + 1; let historyState = getHistoryState(location, index); let url = history.createHref(location); // try...catch because iOS limits us to 100 pushState calls :/ try { globalHistory.pushState(historyState, "", url); } catch (error) { // If the exception is because `state` can't be serialized, let that throw // outwards just like a replace call would so the dev knows the cause // https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps // https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal if (error instanceof DOMException && error.name === "DataCloneError") { throw error; } // They are going to lose state here, but there is no real // way to warn them about it since the page will refresh... window.location.assign(url); } if (v5Compat && listener) { listener({ action, location: history.location, delta: 1 }); } } function replace(to, state) { action = Action.Replace; let location = createLocation(history.location, to, state); if (validateLocation) validateLocation(location, to); index = getIndex(); let historyState = getHistoryState(location, index); let url = history.createHref(location); globalHistory.replaceState(historyState, "", url); if (v5Compat && listener) { listener({ action, location: history.location, delta: 0 }); } } function createURL(to) { // window.location.origin is "null" (the literal string value) in Firefox // under certain conditions, notably when serving from a local HTML file // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297 let base = window.location.origin !== "null" ? window.location.origin : window.location.href; let href = typeof to === "string" ? to : createPath(to); // Treating this as a full URL will strip any trailing spaces so we need to // pre-encode them since they might be part of a matching splat param from // an ancestor route href = href.replace(/ $/, "%20"); invariant(base, "No window.location.(origin|href) available to create URL for href: " + href); return new URL(href, base); } let history = { get action() { return action; }, get location() { return getLocation(window, globalHistory); }, listen(fn) { if (listener) { throw new Error("A history only accepts one active listener"); } window.addEventListener(PopStateEventType, handlePop); listener = fn; return () => { window.removeEventListener(PopStateEventType, handlePop); listener = null; }; }, createHref(to) { return createHref(window, to); }, createURL, encodeLocation(to) { // Encode a Location the same way window.location would let url = createURL(to); return { pathname: url.pathname, search: url.search, hash: url.hash }; }, push, replace, go(n) { return globalHistory.go(n); } }; return history; } //#endregion var ResultType; (function (ResultType) { ResultType["data"] = "data"; ResultType["deferred"] = "deferred"; ResultType["redirect"] = "redirect"; ResultType["error"] = "error"; })(ResultType || (ResultType = {})); const immutableRouteKeys = new Set(["lazy", "caseSensitive", "path", "id", "index", "children"]); function isIndexRoute(route) { return route.index === true; } // Walk the route tree generating unique IDs where necessary, so we are working // solely with AgnosticDataRouteObject's within the Router function convertRoutesToDataRoutes(routes, mapRouteProperties, parentPath, manifest) { if (parentPath === void 0) { parentPath = []; } if (manifest === void 0) { manifest = {}; } return routes.map((route, index) => { let treePath = [...parentPath, String(index)]; let id = typeof route.id === "string" ? route.id : treePath.join("-"); invariant(route.index !== true || !route.children, "Cannot specify children on an index route"); invariant(!manifest[id], "Found a route id collision on id \"" + id + "\". Route " + "id's must be globally unique within Data Router usages"); if (isIndexRoute(route)) { let indexRoute = _extends({}, route, mapRouteProperties(route), { id }); manifest[id] = indexRoute; return indexRoute; } else { let pathOrLayoutRoute = _extends({}, route, mapRouteProperties(route), { id, children: undefined }); manifest[id] = pathOrLayoutRoute; if (route.children) { pathOrLayoutRoute.children = convertRoutesToDataRoutes(route.children, mapRouteProperties, treePath, manifest); } return pathOrLayoutRoute; } }); } /** * Matches the given routes to a location and returns the match data. * * @see https://reactrouter.com/utils/match-routes */ function matchRoutes(routes, locationArg, basename) { if (basename === void 0) { basename = "/"; } return matchRoutesImpl(routes, locationArg, basename, false); } function matchRoutesImpl(routes, locationArg, basename, allowPartial) { let location = typeof locationArg === "string" ? parsePath(locationArg) : locationArg; let pathname = stripBasename(location.pathname || "/", basename); if (pathname == null) { return null; } let branches = flattenRoutes(routes); rankRouteBranches(branches); let matches = null; for (let i = 0; matches == null && i < branches.length; ++i) { // Incoming pathnames are generally encoded from either window.location // or from router.navigate, but we want to match against the unencoded // paths in the route definitions. Memory router locations won't be // encoded here but there also shouldn't be anything to decode so this // should be a safe operation. This avoids needing matchRoutes to be // history-aware. let decoded = decodePath(pathname); matches = matchRouteBranch(branches[i], decoded, allowPartial); } return matches; } function convertRouteMatchToUiMatch(match, loaderData) { let { route, pathname, params } = match; return { id: route.id, pathname, params, data: loaderData[route.id], handle: route.handle }; } function flattenRoutes(routes, branches, parentsMeta, parentPath) { if (branches === void 0) { branches = []; } if (parentsMeta === void 0) { parentsMeta = []; } if (parentPath === void 0) { parentPath = ""; } let flattenRoute = (route, index, relativePath) => { let meta = { relativePath: relativePath === undefined ? route.path || "" : relativePath, caseSensitive: route.caseSensitive === true, childrenIndex: index, route }; if (meta.relativePath.startsWith("/")) { invariant(meta.relativePath.startsWith(parentPath), "Absolute route path \"" + meta.relativePath + "\" nested under path " + ("\"" + parentPath + "\" is not valid. An absolute child route path ") + "must start with the combined path of all its parent routes."); meta.relativePath = meta.relativePath.slice(parentPath.length); } let path = joinPaths([parentPath, meta.relativePath]); let routesMeta = parentsMeta.concat(meta); // Add the children before adding this route to the array, so we traverse the // route tree depth-first and child routes appear before their parents in // the "flattened" version. if (route.children && route.children.length > 0) { invariant( // Our types know better, but runtime JS may not! // @ts-expect-error route.index !== true, "Index routes must not have child routes. Please remove " + ("all child routes from route path \"" + path + "\".")); flattenRoutes(route.children, branches, routesMeta, path); } // Routes without a path shouldn't ever match by themselves unless they are // index routes, so don't add them to the list of possible branches. if (route.path == null && !route.index) { return; } branches.push({ path, score: computeScore(path, route.index), routesMeta }); }; routes.forEach((route, index) => { var _route$path; // coarse-grain check for optional params if (route.path === "" || !((_route$path = route.path) != null && _route$path.includes("?"))) { flattenRoute(route, index); } else { for (let exploded of explodeOptionalSegments(route.path)) { flattenRoute(route, index, exploded); } } }); return branches; } /** * Computes all combinations of optional path segments for a given path, * excluding combinations that are ambiguous and of lower priority. * * For example, `/one/:two?/three/:four?/:five?` explodes to: * - `/one/three` * - `/one/:two/three` * - `/one/three/:four` * - `/one/three/:five` * - `/one/:two/three/:four` * - `/one/:two/three/:five` * - `/one/three/:four/:five` * - `/one/:two/three/:four/:five` */ function explodeOptionalSegments(path) { let segments = path.split("/"); if (segments.length === 0) return []; let [first, ...rest] = segments; // Optional path segments are denoted by a trailing `?` let isOptional = first.endsWith("?"); // Compute the corresponding required segment: `foo?` -> `foo` let required = first.replace(/\?$/, ""); if (rest.length === 0) { // Intepret empty string as omitting an optional segment // `["one", "", "three"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three` return isOptional ? [required, ""] : [required]; } let restExploded = explodeOptionalSegments(rest.join("/")); let result = []; // All child paths with the prefix. Do this for all children before the // optional version for all children, so we get consistent ordering where the // parent optional aspect is preferred as required. Otherwise, we can get // child sections interspersed where deeper optional segments are higher than // parent optional segments, where for example, /:two would explode _earlier_ // then /:one. By always including the parent as required _for all children_ // first, we avoid this issue result.push(...restExploded.map(subpath => subpath === "" ? required : [required, subpath].join("/"))); // Then, if this is an optional value, add all child versions without if (isOptional) { result.push(...restExploded); } // for absolute paths, ensure `/` instead of empty segment return result.map(exploded => path.startsWith("/") && exploded === "" ? "/" : exploded); } function rankRouteBranches(branches) { branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first : compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex))); } const paramRe = /^:[\w-]+$/; const dynamicSegmentValue = 3; const indexRouteValue = 2; const emptySegmentValue = 1; const staticSegmentValue = 10; const splatPenalty = -2; const isSplat = s => s === "*"; function computeScore(path, index) { let segments = path.split("/"); let initialScore = segments.length; if (segments.some(isSplat)) { initialScore += splatPenalty; } if (index) { initialScore += indexRouteValue; } return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue), initialScore); } function compareIndexes(a, b) { let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]); return siblings ? // If two routes are siblings, we should try to match the earlier sibling // first. This allows people to have fine-grained control over the matching // behavior by simply putting routes with identical paths in the order they // want them tried. a[a.length - 1] - b[b.length - 1] : // Otherwise, it doesn't really make sense to rank non-siblings by index, // so they sort equally. 0; } function matchRouteBranch(branch, pathname, allowPartial) { if (allowPartial === void 0) { allowPartial = false; } let { routesMeta } = branch; let matchedParams = {}; let matchedPathname = "/"; let matches = []; for (let i = 0; i < routesMeta.length; ++i) { let meta = routesMeta[i]; let end = i === routesMeta.length - 1; let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/"; let match = matchPath({ path: meta.relativePath, caseSensitive: meta.caseSensitive, end }, remainingPathname); let route = meta.route; if (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index) { match = matchPath({ path: meta.relativePath, caseSensitive: meta.caseSensitive, end: false }, remainingPathname); } if (!match) { return null; } Object.assign(matchedParams, match.params); matches.push({ // TODO: Can this as be avoided? params: matchedParams, pathname: joinPaths([matchedPathname, match.pathname]), pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])), route }); if (match.pathnameBase !== "/") { matchedPathname = joinPaths([matchedPathname, match.pathnameBase]); } } return matches; } /** * Returns a path with params interpolated. * * @see https://reactrouter.com/utils/generate-path */ function generatePath(originalPath, params) { if (params === void 0) { params = {}; } let path = originalPath; if (path.endsWith("*") && path !== "*" && !path.endsWith("/*")) { warning(false, "Route path \"" + path + "\" will be treated as if it were " + ("\"" + path.replace(/\*$/, "/*") + "\" because the `*` character must ") + "always follow a `/` in the pattern. To get rid of this warning, " + ("please change the route path to \"" + path.replace(/\*$/, "/*") + "\".")); path = path.replace(/\*$/, "/*"); } // ensure `/` is added at the beginning if the path is absolute const prefix = path.startsWith("/") ? "/" : ""; const stringify = p => p == null ? "" : typeof p === "string" ? p : String(p); const segments = path.split(/\/+/).map((segment, index, array) => { const isLastSegment = index === array.length - 1; // only apply the splat if it's the last segment if (isLastSegment && segment === "*") { const star = "*"; // Apply the splat return stringify(params[star]); } const keyMatch = segment.match(/^:([\w-]+)(\??)$/); if (keyMatch) { const [, key, optional] = keyMatch; let param = params[key]; invariant(optional === "?" || param != null, "Missing \":" + key + "\" param"); return stringify(param); } // Remove any optional markers from optional static segments return segment.replace(/\?$/g, ""); }) // Remove empty segments .filter(segment => !!segment); return prefix + segments.join("/"); } /** * Performs pattern matching on a URL pathname and returns information about * the match. * * @see https://reactrouter.com/utils/match-path */ function matchPath(pattern, pathname) { if (typeof pattern === "string") { pattern = { path: pattern, caseSensitive: false, end: true }; } let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end); let match = pathname.match(matcher); if (!match) return null; let matchedPathname = match[0]; let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1"); let captureGroups = match.slice(1); let params = compiledParams.reduce((memo, _ref, index) => { let { paramName, isOptional } = _ref; // We need to compute the pathnameBase here using the raw splat value // instead of using params["*"] later because it will be decoded then if (paramName === "*") { let splatValue = captureGroups[index] || ""; pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1"); } const value = captureGroups[index]; if (isOptional && !value) { memo[paramName] = undefined; } else { memo[paramName] = (value || "").replace(/%2F/g, "/"); } return memo; }, {}); return { params, pathname: matchedPathname, pathnameBase, pattern }; } function compilePath(path, caseSensitive, end) { if (caseSensitive === void 0) { caseSensitive = false; } if (end === void 0) { end = true; } warning(path === "*" || !path.endsWith("*") || path.endsWith("/*"), "Route path \"" + path + "\" will be treated as if it were " + ("\"" + path.replace(/\*$/, "/*") + "\" because the `*` character must ") + "always follow a `/` in the pattern. To get rid of this warning, " + ("please change the route path to \"" + path.replace(/\*$/, "/*") + "\".")); let params = []; let regexpSource = "^" + path.replace(/\/*\*?$/, "") // Ignore trailing / and /*, we'll handle it below .replace(/^\/*/, "/") // Make sure it has a leading / .replace(/[\\.*+^${}|()[\]]/g, "\\$&") // Escape special regex chars .replace(/\/:([\w-]+)(\?)?/g, (_, paramName, isOptional) => { params.push({ paramName, isOptional: isOptional != null }); return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)"; }); if (path.endsWith("*")) { params.push({ paramName: "*" }); regexpSource += path === "*" || path === "/*" ? "(.*)$" // Already matched the initial /, just match the rest : "(?:\\/(.+)|\\/*)$"; // Don't include the / in params["*"] } else if (end) { // When matching to the end, ignore trailing slashes regexpSource += "\\/*$"; } else if (path !== "" && path !== "/") { // If our path is non-empty and contains anything beyond an initial slash, // then we have _some_ form of path in our regex, so we should expect to // match only if we find the end of this path segment. Look for an optional // non-captured trailing slash (to match a portion of the URL) or the end // of the path (if we've matched to the end). We used to do this with a // word boundary but that gives false positives on routes like // /user-preferences since `-` counts as a word boundary. regexpSource += "(?:(?=\\/|$))"; } else ; let matcher = new RegExp(regexpSource, caseSensitive ? undefined : "i"); return [matcher, params]; } function decodePath(value) { try { return value.split("/").map(v => decodeURIComponent(v).replace(/\//g, "%2F")).join("/"); } catch (error) { warning(false, "The URL path \"" + value + "\" could not be decoded because it is is a " + "malformed URL segment. This is probably due to a bad percent " + ("encoding (" + error + ").")); return value; } } /** * @private */ function stripBasename(pathname, basename) { if (basename === "/") return pathname; if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) { return null; } // We want to leave trailing slash behavior in the user's control, so if they // specify a basename with a trailing slash, we should support it let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length; let nextChar = pathname.charAt(startIndex); if (nextChar && nextChar !== "/") { // pathname does not start with basename/ return null; } return pathname.slice(startIndex) || "/"; } /** * Returns a resolved path object relative to the given pathname. * * @see https://reactrouter.com/utils/resolve-path */ function resolvePath(to, fromPathname) { if (fromPathname === void 0) { fromPathname = "/"; } let { pathname: toPathname, search = "", hash = "" } = typeof to === "string" ? parsePath(to) : to; let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname; return { pathname, search: normalizeSearch(search), hash: normalizeHash(hash) }; } function resolvePathname(relativePath, fromPathname) { let segments = fromPathname.replace(/\/+$/, "").split("/"); let relativeSegments = relativePath.split("/"); relativeSegments.forEach(segment => { if (segment === "..") { // Keep the root "" segment so the pathname starts at / if (segments.length > 1) segments.pop(); } else if (segment !== ".") { segments.push(segment); } }); return segments.length > 1 ? segments.join("/") : "/"; } function getInvalidPathError(char, field, dest, path) { return "Cannot include a '" + char + "' character in a manually specified " + ("`to." + field + "` field [" + JSON.stringify(path) + "]. Please separate it out to the ") + ("`to." + dest + "` field. Alternatively you may provide the full path as ") + "a string in <Link to=\"...\"> and the router will parse it for you."; } /** * @private * * When processing relative navigation we want to ignore ancestor routes that * do not contribute to the path, such that index/pathless layout routes don't * interfere. * * For example, when moving a route element into an index route and/or a * pathless layout route, relative link behavior contained within should stay * the same. Both of the following examples should link back to the root: * * <Route path="/"> * <Route path="accounts" element={<Link to=".."}> * </Route> * * <Route path="/"> * <Route path="accounts"> * <Route element={<AccountsLayout />}> // <-- Does not contribute * <Route index element={<Link to=".."} /> // <-- Does not contribute * </Route * </Route> * </Route> */ function getPathContributingMatches(matches) { return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0); } // Return the array of pathnames for the current route matches - used to // generate the routePathnames input for resolveTo() function getResolveToMatches(matches, v7_relativeSplatPath) { let pathMatches = getPathContributingMatches(matches); // When v7_relativeSplatPath is enabled, use the full pathname for the leaf // match so we include splat values for "." links. See: // https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329 if (v7_relativeSplatPath) { return pathMatches.map((match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase); } return pathMatches.map(match => match.pathnameBase); } /** * @private */ function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) { if (isPathRelative === void 0) { isPathRelative = false; } let to; if (typeof toArg === "string") { to = parsePath(toArg); } else { to = _extends({}, toArg); invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to)); invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to)); invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to)); } let isEmptyPath = toArg === "" || to.pathname === ""; let toPathname = isEmptyPath ? "/" : to.pathname; let from; // Routing is relative to the current pathname if explicitly requested. // // If a pathname is explicitly provided in `to`, it should be relative to the // route context. This is explained in `Note on `<Link to>` values` in our // migration guide from v5 as a means of disambiguation between `to` values // that begin with `/` and those that do not. However, this is problematic for // `to` values that do not provide a pathname. `to` can simply be a search or // hash string, in which case we should assume that the navigation is relative // to the current location's pathname and *not* the route pathname. if (toPathname == null) { from = locationPathname; } else { let routePathnameIndex = routePathnames.length - 1; // With relative="route" (the default), each leading .. segment means // "go up one route" instead of "go up one URL segment". This is a key // difference from how <a href> works and a major reason we call this a // "to" value instead of a "href". if (!isPathRelative && toPathname.startsWith("..")) { let toSegments = toPathname.split("/"); while (toSegments[0] === "..") { toSegments.shift(); routePathnameIndex -= 1; } to.pathname = toSegments.join("/"); } from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/"; } let path = resolvePath(to, from); // Ensure the pathname has a trailing slash if the original "to" had one let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/"); // Or if this was a link to the current path which has a trailing slash let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/"); if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) { path.pathname += "/"; } return path; } /** * @private */ function getToPathname(to) { // Empty strings should be treated the same as / paths return to === "" || to.pathname === "" ? "/" : typeof to === "string" ? parsePath(to).pathname : to.pathname; } /** * @private */ const joinPaths = paths => paths.join("/").replace(/\/\/+/g, "/"); /** * @private */ const normalizePathname = pathname => pathname.replace(/\/+$/, "").replace(/^\/*/, "/"); /** * @private */ const normalizeSearch = search => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search; /** * @private */ const normalizeHash = hash => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash; /** * This is a shortcut for creating `application/json` responses. Converts `data` * to JSON and sets the `Content-Type` header. */ const json = function json(data, init) { if (init === void 0) { init = {}; } let responseInit = typeof init === "number" ? { status: init } : init; let headers = new Headers(responseInit.headers); if (!headers.has("Content-Type")) { headers.set("Content-Type", "application/json; charset=utf-8"); } return new Response(JSON.stringify(data), _extends({}, responseInit, { headers })); }; class AbortedDeferredError extends Error {} class DeferredData { constructor(data, responseInit) { this.pendingKeysSet = new Set(); this.subscribers = new Set(); this.deferredKeys = []; invariant(data && typeof data === "object" && !Array.isArray(data), "defer() only accepts plain objects"); // Set up an AbortController + Promise we can race against to exit early // cancellation let reject; this.abortPromise = new Promise((_, r) => reject = r); this.controller = new AbortController(); let onAbort = () => reject(new AbortedDeferredError("Deferred data aborted")); this.unlistenAbortSignal = () => this.controller.signal.removeEventListener("abort", onAbort); this.controller.signal.addEventListener("abort", onAbort); this.data = Object.entries(data).reduce((acc, _ref2) => { let [key, value] = _ref2; return Object.assign(acc, { [key]: this.trackPromise(key, value) }); }, {}); if (this.done) { // All incoming values were resolved this.unlistenAbortSignal(); } this.init = responseInit; } trackPromise(key, value) { if (!(value instanceof Promise)) { return value; } this.deferredKeys.push(key); this.pendingKeysSet.add(key); // We store a little wrapper promise that will be extended with // _data/_error props upon resolve/reject let promise = Promise.race([value, this.abortPromise]).then(data => this.onSettle(promise, key, undefined, data), error => this.onSettle(promise, key, error)); // Register rejection listeners to avoid uncaught promise rejections on // errors or aborted deferred values promise.catch(() => {}); Object.defineProperty(promise, "_tracked", { get: () => true }); return promise; } onSettle(promise, key, error, data) { if (this.controller.signal.aborted && error instanceof AbortedDeferredError) { this.unlistenAbortSignal(); Object.defineProperty(promise, "_error", { get: () => error }); return Promise.reject(error); } this.pendingKeysSet.delete(key); if (this.done) { // Nothing left to abort! this.unlistenAbortSignal(); } // If the promise was resolved/rejected with undefined, we'll throw an error as you // should always resolve with a value or null if (error === undefined && data === undefined) { let undefinedError = new Error("Deferred data for key \"" + key + "\" resolved/rejected with `undefined`, " + "you must resolve/reject with a value or `null`."); Object.defineProperty(promise, "_error", { get: () => undefinedError }); this.emit(false, key); return Promise.reject(undefinedError); } if (data === undefined) { Object.defineProperty(promise, "_error", { get: () => error }); this.emit(false, key); return Promise.reject(error); } Object.defineProperty(promise, "_data", { get: () => data }); this.emit(false, key); return data; } emit(aborted, settledKey) { this.subscribers.forEach(subscriber => subscriber(aborted, settledKey)); } subscribe(fn) { this.subscribers.add(fn); return () => this.subscribers.delete(fn); } cancel() { this.controller.abort(); this.pendingKeysSet.forEach((v, k) => this.pendingKeysSet.delete(k)); this.emit(true); } async resolveData(signal) { let aborted = false; if (!this.done) { let onAbort = () => this.cancel(); signal.addEventListener("abort", onAbort); aborted = await new Promise(resolve => { this.subscribe(aborted => { signal.removeEventListener("abort", onAbort); if (aborted || this.done) { resolve(aborted); } }); }); } return aborted; } get done() { return this.pendingKeysSet.size === 0; } get unwrappedData() { invariant(this.data !== null && this.done, "Can only unwrap data on initialized and settled deferreds"); return Object.entries(this.data).reduce((acc, _ref3) => { let [key, value] = _ref3; return Object.assign(acc, { [key]: unwrapTrackedPromise(value) }); }, {}); } get pendingKeys() { return Array.from(this.pendingKeysSet); } } function isTrackedPromise(value) { return value instanceof Promise && value._tracked === true; } function unwrapTrackedPromise(value) { if (!isTrackedPromise(value)) { return value; } if (value._error) { throw value._error; } return value._data; } const defer = function defer(data, init) { if (init === void 0) { init = {}; } let responseInit = typeof init === "number" ? { status: init } : init; return new DeferredData(data, responseInit); }; /** * A redirect response. Sets the status code and the `Location` header. * Defaults to "302 Found". */ const redirect = function redirect(url, init) { if (init === void 0) { init = 302; } let responseInit = init; if (typeof responseInit === "number") { responseInit = { status: responseInit }; } else if (typeof responseInit.status === "undefined") { responseInit.status = 302; } let headers = new Headers(responseInit.headers); headers.set("Location", url); return new Response(null, _extends({}, responseInit, { headers })); }; /** * A redirect response that will force a document reload to the new location. * Sets the status code and the `Location` header. * Defaults to "302 Found". */ const redirectDocument = (url, init) => { let response = redirect(url, init); response.headers.set("X-Remix-Reload-Document", "true"); return response; }; /** * @private * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies * * We don't export the class for public use since it's an implementation * detail, but we export the interface above so folks can build their own * abstractions around instances via isRouteErrorResponse() */ class ErrorResponseImpl { constructor(status, statusText, data, internal) { if (internal === void 0) { internal = false; } this.status = status; this.statusText = statusText || ""; this.internal = internal; if (data instanceof Error) { this.data = data.toString(); this.error = data; } else { this.data = data; } } } /** * Check if the given error is an ErrorResponse generated from a 4xx/5xx * Response thrown from an action/loader */ function isRouteErrorResponse(error) { return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error; } const validMutationMethodsArr = ["post", "put", "patch", "delete"]; const validMutationMethods = new Set(validMutationMethodsArr); const validRequestMethodsArr = ["get", ...validMutationMethodsArr]; const validRequestMethods = new Set(validRequestMethodsArr); const redirectStatusCodes = new Set([301, 302, 303, 307, 308]); const redirectPreserveMethodStatusCodes = new Set([307, 308]); const IDLE_NAVIGATION = { state: "idle", location: undefined, formMethod: undefined, formAction: undefined, formEncType: undefined, formData: undefined, json: undefined, text: undefined }; const IDLE_FETCHER = { state: "idle", data: undefined, formMethod: undefined, formAction: undefined, formEncType: undefined, formData: undefined, json: undefined, text: undefined }; const IDLE_BLOCKER = { state: "unblocked", proceed: undefined, reset: undefined, location: undefined }; const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i; const defaultMapRouteProperties = route => ({ hasErrorBoundary: Boolean(route.hasErrorBoundary) }); const TRANSITIONS_STORAGE_KEY = "remix-router-transitions"; //#endregion //////////////////////////////////////////////////////////////////////////////// //#region createRouter //////////////////////////////////////////////////////////////////////////////// /** * Create a router and listen to history POP navigations */ function createRouter(init) { const routerWindow = init.window ? init.window : typeof window !== "undefined" ? window : undefined; const isBrowser = typeof routerWindow !== "undefined" && typeof routerWindow.document !== "undefined" && typeof routerWindow.document.createElement !== "undefined"; const isServer = !isBrowser; invariant(init.routes.length > 0, "You must provide a non-empty routes array to createRouter"); let mapRouteProperties; if (init.mapRouteProperties) { mapRouteProperties = init.mapRouteProperties; } else if (init.detectErrorBoundary) { // If they are still using the deprecated version, wrap it with the new API let detectErrorBoundary = init.detectErrorBoundary; mapRouteProperties = route => ({ hasErrorBoundary: detectErrorBoundary(route) }); } else { mapRouteProperties = defaultMapRouteProperties; } // Routes keyed by ID let manifest = {}; // Routes in tree format for matching let dataRoutes = convertRoutesToDataRoutes(init.routes, mapRouteProperties, undefined, manifest); let inFlightDataRoutes; let basename = init.basename || "/"; let dataStrategyImpl = init.unstable_dataStrategy || defaultDataStrategy; let patchRoutesOnMissImpl = init.unstable_patchRoutesOnMiss; // Config driven behavior flags let future = _extends({ v7_fetcherPersist: false, v7_normalizeFormMethod: false, v7_partialHydration: false, v7_prependBasename: false, v7_relativeSplatPath: false, unstable_skipActionErrorRevalidation: false }, init.future); // Cleanup function for history let unlistenHistory = null; // Externally-provided functions to call on all state changes let subscribers = new Set(); // Externally-provided object to hold scroll restoration locations during routing let savedScrollPositions = null; // Externally-provided function to get scroll restoration keys let getScrollRestorationKey = null; // Externally-provided function to get current scroll position let getScrollPosition = null; // One-time flag to control the initial hydration scroll restoration. Because // we don't get the saved positions from <ScrollRestoration /> until _after_ // the initial render, we need to manually trigger a separate updateState to // send along the restoreScrollPosition // Set to true if we have `hydrationData` since we assume we were SSR'd and that // SSR did the initial scroll restoration. let initialScrollRestored = init.hydrationData != null; let initialMatches = matchRoutes(dataRoutes, init.history.location, basename); let initialErrors = null; if (initialMatches == null && !patchRoutesOnMissImpl) { // If we do not match a user-provided-route, fall back to the root // to allow the error boundary to take over let error = getInternalRouterError(404, { pathname: init.history.location.pathname }); let { matches, route } = getShortCircuitMatches(dataRoutes); initialMatches = matches; initialErrors = { [route.id]: error }; } // If the user provided a patchRoutesOnMiss implementation and our initial // match is a splat route, clear them out so we run through lazy discovery // on hydration in case there's a more accurate lazy route match if (initialMatches && patchRoutesOnMissImpl) { let fogOfWar = checkFogOfWar(initialMatches, dataRoutes, init.history.location.pathname); if (fogOfWar.active) { initialMatches = null; } } let initialized; if (!initialMatches) { // We need to run patchRoutesOnMiss in initialize() initialized = false; initialMatches = []; } else if (initialMatches.some(m => m.route.lazy)) { // All initialMatches need to be loaded before we're ready. If we have lazy // functions around still then we'll need to run them in initialize() initialized = false; } else if (!initialMatches.some(m => m.route.loader)) { // If we've got no loaders to run, then we're good to go initialized = true; } else if (future.v7_partialHydration) { // If partial hydration is enabled, we're initialized so long as we were // provided with hydrationData for every route with a loader, and no loaders // were marked for explicit hydration let loaderData = init.hydrationData ? init.hydrationData.loaderData : null; let errors = init.hydrationData ? init.hydrationData.errors : null; let isRouteInitialized = m => { // No loader, nothing to initialize if (!m.route.loader) { return true; } // Explicitly opting-in to running on hydration if (typeof m.route.loader === "function" && m.route.loader.hydrate === true) { return false; } // Otherwise, initialized if hydrated with data or an error return loaderData && loaderData[m.route.id] !== undefined || errors && errors[m.route.id] !== undefined; }; // If errors exist, don't consider routes below the boundary if (errors) { let idx = initialMatches.findIndex(m => errors[m.route.id] !== undefined); initialized = initialMatches.slice(0, idx + 1).every(isRouteInitialized); } else { initialized = initialMatches.every(isRouteInitialized); } } else { // Without partial hydration - we're initialized if we were provided any // hydrationData - which is expected to be complete initialized = init.hydrationData != null; } let router; let state = { historyAction: init.history.action, location: init.history.location, matches: initialMatches, initialized, navigation: IDLE_NAVIGATION, // Don't restore on initial updateState() if we were SSR'd restoreScrollPosition: init.hydrationData != null ? false : null, preventScrollReset: false, revalidation: "idle", loaderData: init.hydrationData && init.hydrationData.loaderData || {}, actionData: init.hydrationData && init.hydrationData.actionData || null, errors: init.hydrationData && init.hydrationData.errors || initialErrors, fetchers: new Map(), blockers: new Map() }; // -- Stateful internal variables to manage navigations -- // Current navigation in progress (to be committed in completeNavigation) let pendingAction = Action.Pop; // Should the current navigation prevent the scroll reset if scroll cannot // be restored? let pendingPreventScrollReset = false; // AbortController for the active navigation let pendingNavigationController; // Should the current navigation enable document.startViewTransition? let pendingViewTransitionEnabled = false; // Store applied view transitions so we can apply them on POP let appliedViewTransitions = new Map(); // Cleanup function for persisting applied transitions to sessionStorage let removePageHideEventListener = null; // We use this to avoid touching history in completeNavigation if a // revalidation is entirely uninterrupted let isUninterruptedRevalidation = false; // Use this internal flag to force revalidation of all loaders: // - submissions (completed or interrupted) // - useRevalidator() // - X-Remix-Revalidate (from redirect) let isRevalidationRequired = false; // Use this internal array to capture routes that require revalidation due // to a cancelled deferred on action submission let cancelledDeferredRoutes = []; // Use this internal array to capture fetcher loads that were cancelled by an // action navigation and require revalidation let cancelledFetcherLoads = []; // AbortControllers for any in-flight fetchers let fetchControllers = new Map(); // Track loads based on the order in which they started let incrementingLoadId = 0; // Track the outstanding pending navigation data load to be compared against // the globally incrementing load when a fetcher load lands after a completed // navigation let pendingNavigationLoadId = -1; // Fetchers that triggered data reloads as a result of their actions let fetchReloadIds = new Map(); // Fetchers that triggered redirect navigations let fetchRedirectIds = new Set(); // Most recent href/match for fetcher.load calls for fetchers let fetchLoadMatches = new Map(); // Ref-count mounted fetchers so we know when it's ok to clean them up let activeFetchers = new Map(); // Fetchers that have requested a delete when using v7_fetcherPersist, // they'll be officially removed after they return to idle let deletedFetchers = new Set(); // Store DeferredData instances for active route matches. When a // route loader returns defer() we stick one in here. Then, when a nested // promise resolves we update loaderData. If a new navigation starts we // cancel active deferreds for eliminated routes. let activeDeferreds = new Map(); // Store blocker functions in a separate Map outside of router state since // we don't need to update UI state if they change let blockerFunctions = new Map(); // Map of pending patchRoutesOnMiss() promises (keyed by path/matches) so // that we only kick them off once for a given combo let pendingPatchRoutes = new Map(); // Flag to ignore the next history update, so we can revert the URL change on // a POP navigation that was blocked by the user without touching router state let ignoreNextHistoryUpdate = false; // Initialize the router, all side effects should be kicked off from here. // Implemented as a Fluent API for ease of: // let router = createRouter(init).initialize(); function initialize() { // If history informs us of a POP navigation, start the navigation but do not update // state. We'll update our own state once the navigation completes unlistenHistory = init.history.listen(_ref => { let { action: historyAction, location, delta } = _ref; // Ignore this event if it was just us resetting the URL from a // blocked POP navigation if (ignoreNextHistoryUpdate) { ignoreNextHistoryUpdate = false; return; } warning(blockerFunctions.size === 0 || delta != null, "You are trying to use a blocker on a POP navigation to a location " + "that was not created by @remix-run/router. This will fail silently in " + "production. This can happen if you are navigating outside the router " + "via `window.history.pushState`/`window.location.hash` instead of using " + "router navigation APIs. This can also happen if you are using " + "createHashRouter and the user manually changes the URL."); let blockerKey = shouldBlockNavigation({ currentLocation: state.location, nextLocation: location, historyAction }); if (blockerKey && delta != null) { // Restore the URL to match the current UI, but don't update router state ignoreNextHistoryUpdate = true; init.history.go(delta * -1); // Put the blocker into a blocked state updateBlocker(blockerKey, { state: "blocked", location, proceed() { updateBlocker(blockerKey, { state: "proceeding", proceed: undefined, reset: undefined, location }); // Re-do the same POP navigation we just blocked init.history.go(delta); }, reset() { let blockers = new Map(state.blockers); blockers.set(blockerKey, IDLE_BLOCKER); updateState({ blockers }); } }); return; } return startNavigation(historyAction, location); }); if (isBrowser) { // FIXME: This feels gross. How can we cleanup the lines between // scrollRestoration/appliedTransitions persistance? restoreAppliedTransitions(routerWindow, appliedViewTransitions); let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions); routerWindow.addEventListener("pagehide", _saveAppliedTransitions); removePageHideEventListener = () => routerWindow.removeEventListener("pagehide", _saveAppliedTransitions); } // Kick off initial data load if needed. Use Pop to avoid modifying history // Note we don't do any handling of lazy here. For SPA's it'll get handled // in the normal navigation flow. For SSR it's expected that lazy modules are // resolved prior to router creation since we can't go into a fallbackElement // UI for SSR'd apps if (!state.initialized) { startNavigation(Action.Pop, state.location, { initialHydration: true }); } return router; } // Clean up a router and it's side effects function dispose() { if (unlistenHistory) { unlistenHistory(); } if (removePageHideEventListener) { removePageHideEventListener(); } subscribers.clear(); pendingNavigationController && pendingNavigationController.abort(); state.fetchers.forEach((_, key) => deleteFetcher(key)); state.blockers.forEach((_, key) => deleteBlocker(key)); } // Subscribe to state updates for the router function subscribe(fn) { subscribers.add(fn); return () => subscribers.delete(fn); } // Update our state and notify the calling context of the change function updateState(newState, opts) { if (opts === void 0) { opts = {}; } state = _extends({}, state, newState); // Prep fetcher cleanup so we can tell the UI which fetcher data entries // can be removed let completedFetchers = []; let deletedFetchersKeys = []; if (future.v7_fetcherPersist) { state.fetchers.forEach((fetcher, key) => { if (fetcher.state === "idle") { if (deletedFetchers.has(key)) { // Unmounted from the UI and can be totally removed deletedFetchersKeys.push(key); } else { // Returned to idle but still mounted in the UI, so semi-remains for // revalidations and such completedFetchers.push(key); } } }); } // Iterate over a local copy so that if flushSync is used and we end up // removing and adding a new subscriber due to the useCallback dependencies, // we don't get ourselves into a loop calling the new subscriber immediately [...subscribers].forEach(subscriber => subscriber(state, { deletedFetchers: deletedFetchersKeys, unstable_viewTransitionOpts: opts.viewTransitionOpts, unstable_flushSync: opts.flushSync === true })); // Remove idle fetchers from state since we only care about in-flight fetchers. if (future.v7_fetcherPersist) { completedFetchers.forEach(key => state.fetchers.delete(key)); deletedFetchersKeys.forEach(key => deleteFetcher(key)); } } // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION // and setting state.[historyAction/location/matches] to the new route. // - Location is a required param // - Navigation will always be set to IDLE_NAVIGATION // - Can pass any other state in newState function completeNavigation(location, newState, _temp) { var _location$state, _location$state2; let { flushSync } = _temp === void 0 ? {} : _temp; // Deduce if we're in a loading/actionReload state: // - We have committed actionData in the store // - The current navigation was a mutation submission // - We're past the submitting state and into the loading state // - The location being loaded is not the result of a redirect let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && ((_location$state = location.state) == null ? void 0 : _location$state._isRedirect) !== true; let actionData; if (newState.actionData) { if (Object.keys(newState.actionData).length > 0) { actionData = newState.actionData; } else { // Empty actionData -> clear prior actionData due to an action error actionData = null; } } else if (isActionReload) { // Keep the current data if we're wrapping up the action reload actionData = state.actionData; } else { // Clear actionData on any other completed navigations actionData = null; } // Always preserve any existing loaderData from re-used routes let loaderData = newState.loaderData ? mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [], newState.errors) : state.loaderData; // On a successful navigation we can assume we got through all blockers // so we can start fresh let blockers = state.blockers; if (blockers.size > 0) { blockers = new Map(blockers); blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER)); } // Always respect the user flag. Otherwise don't reset on mutation // submission navigations unless they redirect let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_location$state2 = location.state) == null ? void 0 : _location$state2._isRedirect) !== true; // Commit any in-flight routes at the end of the HMR revalidation "navigation" if (inFlightDataRoutes) { dataRoutes = inFlightDataRoutes; inFlightDataRoutes = undefined; } if (isUninterruptedRevalidation) ; else if (pendingAction === Action.Pop) ; else if (pendingAction === Action.Push) { init.history.push(location, location.state); } else if (pendingAction === Action.Replace) { init.history.replace(location, location.state); } let viewTransitionOpts; // On POP, enable transitions if they were enabled on the original navigation if (pendingAction === Action.Pop) { // Forward takes precedence so they behave like the original navigation let priorPaths = appliedViewTransitions.get(state.location.pathname); if (priorPaths && priorPaths.has(location.pathname)) { viewTransitionOpts = { currentLocation: state.location, nextLocation: location }; } else if (appliedViewTransitions.has(location.pathname)) { // If we don't have a previous forward nav, assume we're popping back to // the new location and enable if that location previously enabled viewTransitionOpts = { currentLocation: location, nextLocation: state.location }; } } else if (pendingViewTransitionEnabled) { // Store the applied transition on PUSH/REPLACE let toPaths = appliedViewTransitions.get(state.location.pathname); if (toPaths) { toPaths.add(location.pathname); } else { toPaths = new Set([location.pathname]); appliedViewTransitions.set(state.location.pathname, toPaths); } viewTransitionOpts = { currentLocation: state.location, nextLocation: location }; } updateState(_extends({}, newState, { actionData, loaderData, historyAction: pendingAction, location, initialized: true, navigation: IDLE_NAVIGATION, revalidation: "idle", restoreScrollPosition: getSavedScrollPosition(location, newState.matches || state.matches), preventScrollReset, blockers }), { viewTransitionOpts, flushSync: flushSync === true }); // Reset stateful navigation vars pendingAction = Action.Pop; pendingPreventScrollReset = false; pendingViewTransitionEnabled = false; isUninterruptedRevalidation = false; isRevalidationRequired = false; cancelledDeferredRoutes = []; cancelledFetcherLoads = []; } // Trigger a navigation event, which can either be a numerical POP or a PUSH // replace with an optional submission async function navigate(to, opts) { if (typeof to === "number") { init.history.go(to); return; } let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, to, future.v7_relativeSplatPath, opts == null ? void 0 : opts.fromRouteId, opts == null ? void 0 : opts.relative); let { path, submission, error } = normalizeNavigateOptions(future.v7_normalizeFormMethod, false, normalizedPath, opts); let currentLocation = state.location; let nextLocation = createLocation(state.location, path, opts && opts.state); // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded // URL from window.location, so we need to encode it here so the behavior // remains the same as POP and non-data-router usages. new URL() does all // the same encoding we'd get from a history.pushState/window.location read // without having to touch history nextLocation = _extends({}, nextLocation, init.history.encodeLocation(nextLocation)); let userReplace = opts && opts.replace != null ? opts.replace : undefined; let historyAction = Action.Push; if (userReplace === true) { historyAction = Action.Replace; } else if (userReplace === false) ; else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) { // By default on submissions to the current location we REPLACE so that // users don't have to double-click the back button to get to the prior // location. If the user redirects to a different location from the // action/loader this will be ignored and the redirect will be a PUSH historyAction = Action.Replace; } let preventScrollReset = opts && "preventScrollReset" in opts ? opts.preventScrollReset === true : undefined; let flushSync = (opts && opts.unstable_flushSync) === true; let blockerKey = shouldBlockNavigation({ currentLocation, nextLocation, historyAction }); if (blockerKey) { // Put the blocker into a blocked state updateBlocker(blockerKey, { state: "blocked", location: nextLocation, proceed() { updateBlocker(blockerKey, { state: "proceeding", proceed: undefined, reset: undefined, location: nextLocation }); // Send the same navigation through navigate(to, opts); }, reset() { let blockers = new Map(state.blockers); blockers.set(blockerKey, IDLE_BLOCKER); updateState({ blockers }); } }); return; } return await startNavigation(historyAction, nextLocation, { submission, // Send through the formData serialization error if we have one so we can // render at the right error boundary after we match routes pendingError: error, preventScrollReset, replace: opts && opts.replace, enableViewTransition: opts && opts.unstable_viewTransition, flushSync }); } // Revalidate all current loaders. If a navigation is in progress or if this // is interrupted by a navigation, allow this to "succeed" by calling all // loaders during the next loader round function revalidate() { interruptActiveLoads(); updateState({ revalidation: "loading" }); // If we're currently submitting an action, we don't need to start a new // navigation, we'll just let the follow up loader execution call all loaders if (state.navigation.state === "submitting") { return; } // If we're currently in an idle state, start a new navigation for the current // action/location and mark it as uninterrupted, which will skip the history // update in completeNavigation if (state.navigation.state === "idle") { startNavigation(state.historyAction, state.location, { startUninterruptedRevalidation: true }); return; } // Otherwise, if we're currently in a loading state, just start a new // navigation to the navigation.location but do not trigger an uninterrupted // revalidation so that history correctly updates once the navigation completes startNavigation(pendingAction || state.historyAction, state.navigation.location, { overrideNavigation: state.navigation }); } // Start a navigation to the given action/location. Can optionally provide a // overrideNavigation which will override the normalLoad in the case of a redirect // navigation async function startNavigation(historyAction, location, opts) { // Abort any in-progress navigations and start a new one. Unset any ongoing // uninterrupted revalidations unless told otherwise, since we want this // new navigation to update history normally pendingNavigationController && pendingNavigationController.abort(); pendingNavigationController = null; pendingAction = historyAction; isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true; // Save the current scroll position every time we start a new navigation, // and track whether we should reset scroll on completion saveScrollPosition(state.location, state.matches); pendingPreventScrollReset = (opts && opts.preventScrollReset) === true; pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true; let routesToUse = inFlightDataRoutes || dataRoutes; let loadingNavigation = opts && opts.overrideNavigation; let matches = matchRoutes(routesToUse, location, basename); let flushSync = (opts && opts.flushSync) === true; let fogOfWar = checkFogOfWar(matches, routesToUse, location.pathname); if (fogOfWar.active && fogOfWar.matches) { matches = fogOfWar.matches; } // Short circuit with a 404 on the root error boundary if we match nothing if (!matches) { let { error, notFoundMatches, route } = handleNavigational404(location.pathname); completeNavigation(location, { matches: notFoundMatches, loaderData: {}, errors: { [route.id]: error } }, { flushSync }); return; } // Short circuit if it's only a hash change and not a revalidation or // mutation submission. // // Ignore on initial page loads because since the initial load will always // be "same hash". For example, on /page#hash and submit a <Form method="post"> // which will default to a navigation to /page if (state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) { completeNavigation(location, { matches }, { flushSync }); return; } // Create a controller/Request for this navigation pendingNavigationController = new AbortController(); let request = createClientSideRequest(init.history, location, pendingNavigationController.signal, opts && opts.submission); let pendingActionResult; if (opts && opts.pendingError) { // If we have a pendingError, it means the user attempted a GET submission // with binary FormData so assign here and skip to handleLoaders. That // way we handle calling loaders above the boundary etc. It's not really // different from an actionError in that sense. pendingActionResult = [findNearestBoundary(matches).route.id, { type: ResultType.error, error: opts.pendingError }]; } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) { // Call action if we received an action submission let actionResult = await handleAction(request, location, opts.submission, matches, fogOfWar.active, { replace: opts.replace, flushSync }); if (actionResult.shortCircuited) { return; } // If we received a 404 from handleAction, it's because we couldn't lazily // discover the destination route so we don't want to call loaders if (actionResult.pendingActionResult) { let [routeId, result] = actionResult.pendingActionResult; if (isErrorResult(result) && isRouteErrorResponse(result.error) && result.error.status === 404) { pendingNavigationController = null; completeNavigation(location, { matches: actionResult.matches, loaderData: {}, errors: { [routeId]: result.error } }); return; } } matches = actionResult.matches || matches; pendingActionResult = actionResult.pendingActionResult; loadingNavigation = getLoadingNavigation(location, opts.submission); flushSync = false; // No need to do fog of war matching again on loader execution fogOfWar.active = false; // Create a GET request for the loaders request = createClientSideRequest(init.history, request.url, request.signal); } // Call loaders let { shortCircuited, matches: updatedMatches, loaderData, errors } = await handleLoaders(request, location, matches, fogOfWar.active, loadingNavigation, opts && opts.submission, opts && opts.fetcherSubmission, opts && opts.replace, opts && opts.initialHydration === true, flushSync, pendingActionResult); if (shortCircuited) { return; } // Clean up now that the action/loaders have completed. Don't clean up if // we short circuited because pendingNavigationController will have already // been assigned to a new controller for the next navigation pendingNavigationController = null; completeNavigation(location, _extends({ matches: updatedMatches || matches }, getActionDataForCommit(pendingActionResult), { loaderData, errors })); } // Call the action matched by the leaf route for this navigation and handle // redirects/errors async function handleAction(request, location, submission, matches, isFogOfWar, opts) { if (opts === void 0) { opts = {}; } interruptActiveLoads(); // Put us in a submitting state let navigation = getSubmittingNavigation(location, submission); updateState({ navigation }, { flushSync: opts.flushSync === true }); if (isFogOfWar) { let discoverResult = await discoverRoutes(matches, location.pathname, request.signal); if (discoverResult.type === "aborted") { return { shortCircuited: true }; } else if (discoverResult.type === "error") { let { error, notFoundMatches, route } = handleDiscoverRouteError(location.pathname, discoverResult); return { matches: notFoundMatches, pendingActionResult: [route.id, { type: ResultType.error, error }] }; } else if (!discoverResult.matches) { let { notFoundMatches, error, route } = handleNavigational404(location.pathname); return { matches: notFoundMatches, pendingActionResult: [route.id, { type: ResultType.error, error }] }; } else { matches = discoverResult.matches; } } // Call our action and get the result let result; let actionMatch = getTargetMatch(matches, location); if (!actionMatch.route.action && !actionMatch.route.lazy) { result = { type: ResultType.error, error: getInternalRouterError(405, { method: request.method, pathname: location.pathname, routeId: actionMatch.route.id }) }; } else { let results = await callDataStrategy("action", request, [actionMatch], matches); result = results[0]; if (request.signal.aborted) { return { shortCircuited: true }; } } if (isRedirectResult(result)) { let replace; if (opts && opts.replace != null) { replace = opts.replace; } else { // If the user didn't explicity indicate replace behavior, replace if // we redirected to the exact same location we're currently at to avoid // double back-buttons let location = normalizeRedirectLocation(result.response.headers.get("Location"), new URL(request.url), basename); replace = location === state.location.pathname + state.location.search; } await startRedirectNavigation(request, result, { submission, replace }); return { shortCircuited: true }; } if (isDeferredResult(result)) { throw getInternalRouterError(400, { type: "defer-action" }); } if (isErrorResult(result)) { // Store off the pending error - we use it to determine which loaders // to call and will commit it when we complete the navigation let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id); // By default, all submissions to the current location are REPLACE // navigations, but if the action threw an error that'll be rendered in // an errorElement, we fall back to PUSH so that the user can use the // back button to get back to the pre-submission form location to try // again if ((opts && opts.replace) !== true) { pendingAction = Action.Push; } return { matches, pendingActionResult: [boundaryMatch.route.id, result] }; } return { matches, pendingActionResult: [actionMatch.route.id, result] }; } // Call all applicable loaders for the given matches, handling redirects, // errors, etc. async function handleLoaders(request, location, matches, isFogOfWar, overrideNavigation, submission, fetcherSubmission, replace, initialHydration, flushSync, pendingActionResult) { // Figure out the right navigation we want to use for data loading let loadingNavigation = overrideNavigation || getLoadingNavigation(location, submission); // If this was a redirect from an action we don't have a "submission" but // we have it on the loading navigation so use that if available let activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation); // If this is an uninterrupted revalidation, we remain in our current idle // state. If not, we need to switch to our loading state and load data, // preserving any new action data or existing action data (in the case of // a revalidation interrupting an actionReload) // If we have partialHydration enabled, then don't update the state for the // initial data load since it's not a "navigation" let shouldUpdateNavigationState = !isUninterruptedRevalidation && (!future.v7_partialHydration || !initialHydration); // When fog of war is enabled, we enter our `loading` state earlier so we // can discover new routes during the `loading` state. We skip this if // we've already run actions since we would have done our matching already. // If the children() function threw then, we want to proceed with the // partial matches it discovered. if (isFogOfWar) { if (shouldUpdateNavigationState) { let actionData = getUpdatedActionData(pendingActionResult); updateState(_extends({ navigation: loadingNavigation }, actionData !== undefined ? { actionData } : {}), { flushSync }); } let discoverResult = await discoverRoutes(matches, location.pathname, request.signal); if (discoverResult.type === "aborted") { return { shortCircuited: true }; } else if (discoverResult.type === "error") { let { error, notFoundMatches, route } = handleDiscoverRouteError(location.pathname, discoverResult); return { matches: notFoundMatches, loaderData: {}, errors: { [route.id]: error } }; } else if (!discoverResult.matches) { let { error, notFoundMatches, route } = handleNavigational404(location.pathname); return { matches: notFoundMatches, loaderData: {}, errors: { [route.id]: error } }; } else { matches = discoverResult.matches; } } let routesToUse = inFlightDataRoutes || dataRoutes; let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, activeSubmission, location, future.v7_partialHydration && initialHydration === true, future.unstable_skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionResult); // Cancel pending deferreds for no-longer-matched routes or routes we're // about to reload. Note that if this is an action reload we would have // already cancelled all pending deferreds so this would be a no-op cancelActiveDeferreds(routeId => !(matches && matches.some(m => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some(m => m.route.id === routeId)); pendingNavigationLoadId = ++incrementingLoadId; // Short circuit if we have no loaders to run if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) { let updatedFetchers = markFetchRedirectsDone(); completeNavigation(location, _extends({ matches, loaderData: {}, // Commit pending error if we're short circuiting errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? { [pendingActionResult[0]]: pendingActionResult[1].error } : null }, getActionDataForCommit(pendingActionResult), updatedFetchers ? { fetchers: new Map(state.fetchers) } : {}), { flushSync }); return { shortCircuited: true }; } if (shouldUpdateNavigationState) { let updates = {}; if (!isFogOfWar) { // Only update navigation/actionNData if we didn't already do it above updates.navigation = loadingNavigation; let actionData = getUpdatedActionData(pendingActionResult); if (actionData !== undefined) { updates.actionData = actionData; } } if (revalidatingFetchers.length > 0) { updates.fetchers = getUpdatedRevalidatingFetchers(revalidatingFetchers); } updateState(updates, { flushSync }); } revalidatingFetchers.forEach(rf => { if (fetchControllers.has(rf.key)) { abortFetcher(rf.key); } if (rf.controller) { // Fetchers use an independent AbortController so that aborting a fetcher // (via deleteFetcher) does not abort the triggering navigation that // triggered the revalidation fetchControllers.set(rf.key, rf.controller); } }); // Proxy navigation abort through to revalidation fetchers let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(f => abortFetcher(f.key)); if (pendingNavigationController) { pendingNavigationController.signal.addEventListener("abort", abortPendingFetchRevalidations); } let { loaderResults, fetcherResults } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, request); if (request.signal.aborted) { return { shortCircuited: true }; } // Clean up _after_ loaders have completed. Don't clean up if we short // circuited because fetchControllers would have been aborted and // reassigned to new controllers for the next navigation if (pendingNavigationController) { pendingNavigationController.signal.removeEventListener("abort", abortPendingFetchRevalidations); } revalidatingFetchers.forEach(rf => fetchControllers.delete(rf.key)); // If any loaders returned a redirect Response, start a new REPLACE navigation let redirect = findRedirect([...loaderResults, ...fetcherResults]); if (redirect) { if (redirect.idx >= matchesToLoad.length) { // If this redirect came from a fetcher make sure we mark it in // fetchRedirectIds so it doesn't get revalidated on the next set of // loader executions let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key; fetchRedirectIds.add(fetcherKey); } await startRedirectNavigation(request, redirect.result, { replace }); return { shortCircuited: true }; } // Process and commit output from loaders let { loaderData, errors } = processLoaderData(state, matches, matchesToLoad, loaderResults, pendingActionResult, revalidatingFetchers, fetcherResults, activeDeferreds); // Wire up subscribers to update loaderData as promises settle activeDeferreds.forEach((deferredData, routeId) => { deferredData.subscribe(aborted => { // Note: No need to updateState here since the TrackedPromise on // loaderData is stable across resolve/reject // Remove this instance if we were aborted or if promises have settled if (aborted || deferredData.done) { activeDeferreds.delete(routeId); } }); }); // During partial hydration, preserve SSR errors for routes that don't re-run if (future.v7_partialHydration && initialHydration && state.errors) { Object.entries(state.errors).filter(_ref2 => { let [id] = _ref2; return !matchesToLoad.some(m => m.route.id === id); }).forEach(_ref3 => { let [routeId, error] = _ref3; errors = Object.assign(errors || {}, { [routeId]: error }); }); } let updatedFetchers = markFetchRedirectsDone(); let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId); let shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0; return _extends({ matches, loaderData, errors }, shouldUpdateFetchers ? { fetchers: new Map(state.fetchers) } : {}); } function getUpdatedActionData(pendingActionResult) { if (pendingActionResult && !isErrorResult(pendingActionResult[1])) { // This is cast to `any` currently because `RouteData`uses any and it // would be a breaking change to use any. // TODO: v7 - change `RouteData` to use `unknown` instead of `any` return { [pendingActionResult[0]]: pendingActionResult[1].data }; } else if (state.actionData) { if (Object.keys(state.actionData).length === 0) { return null; } else { return state.actionData; } } } function getUpdatedRevalidatingFetchers(revalidatingFetchers) { revalidatingFetchers.forEach(rf => { let fetcher = state.fetchers.get(rf.key); let revalidatingFetcher = getLoadingFetcher(undefined, fetcher ? fetcher.data : undefined); state.fetchers.set(rf.key, revalidatingFetcher); }); return new Map(state.fetchers); } // Trigger a fetcher load/submit for the given fetcher key function fetch(key, routeId, href, opts) { if (isServer) { throw new Error("router.fetch() was called during the server render, but it shouldn't be. " + "You are likely calling a useFetcher() method in the body of your component. " + "Try moving it to a useEffect or a callback."); } if (fetchControllers.has(key)) abortFetcher(key); let flushSync = (opts && opts.unstable_flushSync) === true; let routesToUse = inFlightDataRoutes || dataRoutes; let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, href, future.v7_relativeSplatPath, routeId, opts == null ? void 0 : opts.relative); let matches = matchRoutes(routesToUse, normalizedPath, basename); let fogOfWar = checkFogOfWar(matches, routesToUse, normalizedPath); if (fogOfWar.active && fogOfWar.matches) { matches = fogOfWar.matches; } if (!matches) { setFetcherError(key, routeId, getInternalRouterError(404, { pathname: normalizedPath }), { flushSync }); return; } let { path, submission, error } = normalizeNavigateOptions(future.v7_normalizeFormMethod, true, normalizedPath, opts); if (error) { setFetcherError(key, routeId, error, { flushSync }); return; } let match = getTargetMatch(matches, path); pendingPreventScrollReset = (opts && opts.preventScrollReset) === true; if (submission && isMutationMethod(submission.formMethod)) { handleFetcherAction(key, routeId, path, match, matches, fogOfWar.active, flushSync, submission); return; } // Store off the match so we can call it's shouldRevalidate on subsequent // revalidations fetchLoadMatches.set(key, { routeId, path }); handleFetcherLoader(key, routeId, path, match, matches, fogOfWar.active, flushSync, submission); } // Call the action for the matched fetcher.submit(), and then handle redirects, // errors, and revalidation async function handleFetcherAction(key, routeId, path, match, requestMatches, isFogOfWar, flushSync, submission) { interruptActiveLoads(); fetchLoadMatches.delete(key); function detectAndHandle405Error(m) { if (!m.route.action && !m.route.lazy) { let error = getInternalRouterError(405, { method: submission.formMethod, pathname: path, routeId: routeId }); setFetcherError(key, routeId, error, { flushSync }); return true; } return false; } if (!isFogOfWar && detectAndHandle405Error(match)) { return; } // Put this fetcher into it's submitting state let existingFetcher = state.fetchers.get(key); updateFetcherState(key, getSubmittingFetcher(submission, existingFetcher), { flushSync }); let abortController = new AbortController(); let fetchRequest = createClientSideRequest(init.history, path, abortController.signal, submission); if (isFogOfWar) { let discoverResult = await discoverRoutes(requestMatches, path, fetchRequest.signal); if (discoverResult.type === "aborted") { return; } else if (discoverResult.type === "error") { let { error } = handleDiscoverRouteError(path, discoverResult); setFetcherError(key, routeId, error, { flushSync }); return; } else if (!discoverResult.matches) { setFetcherError(key, routeId, getInternalRouterError(404, { pathname: path }), { flushSync }); return; } else { requestMatches = discoverResult.matches; match = getTargetMatch(requestMatches, path); if (detectAndHandle405Error(match)) { return; } } } // Call the action for the fetcher fetchControllers.set(key, abortController); let originatingLoadId = incrementingLoadId; let actionResults = await callDataStrategy("action", fetchRequest, [match], requestMatches); let actionResult = actionResults[0]; if (fetchRequest.signal.aborted) { // We can delete this so long as we weren't aborted by our own fetcher // re-submit which would have put _new_ controller is in fetchControllers if (fetchControllers.get(key) === abortController) { fetchControllers.delete(key); } return; } // When using v7_fetcherPersist, we don't want errors bubbling up to the UI // or redirects processed for unmounted fetchers so we just revert them to // idle if (future.v7_fetcherPersist && deletedFetchers.has(key)) { if (isRedirectResult(actionResult) || isErrorResult(actionResult)) { updateFetcherState(key, getDoneFetcher(undefined)); return; } // Let SuccessResult's fall through for revalidation } else { if (isRedirectResult(actionResult)) { fetchControllers.delete(key); if (pendingNavigationLoadId > originatingLoadId) { // A new navigation was kicked off after our action started, so that // should take precedence over this redirect navigation. We already // set isRevalidationRequired so all loaders for the new route should // fire unless opted out via shouldRevalidate updateFetcherState(key, getDoneFetcher(undefined)); return; } else { fetchRedirectIds.add(key); updateFetcherState(key, getLoadingFetcher(submission)); return startRedirectNavigation(fetchRequest, actionResult, { fetcherSubmission: submission }); } } // Process any non-redirect errors thrown if (isErrorResult(actionResult)) { setFetcherError(key, routeId, actionResult.error); return; } } if (isDeferredResult(actionResult)) { throw getInternalRouterError(400, { type: "defer-action" }); } // Start the data load for current matches, or the next location if we're // in the middle of a navigation let nextLocation = state.navigation.location || state.location; let revalidationRequest = createClientSideRequest(init.history, nextLocation, abortController.signal); let routesToUse = inFlightDataRoutes || dataRoutes; let matches = state.navigation.state !== "idle" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches; invariant(matches, "Didn't find any matches after fetcher action"); let loadId = ++incrementingLoadId; fetchReloadIds.set(key, loadId); let loadFetcher = getLoadingFetcher(submission, actionResult.data); state.fetchers.set(key, loadFetcher); let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, submission, nextLocation, false, future.unstable_skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, [match.route.id, actionResult]); // Put all revalidating fetchers into the loading state, except for the // current fetcher which we want to keep in it's current loading state which // contains it's action submission info + action data revalidatingFetchers.filter(rf => rf.key !== key).forEach(rf => { let staleKey = rf.key; let existingFetcher = state.fetchers.get(staleKey); let revalidatingFetcher = getLoadingFetcher(undefined, existingFetcher ? existingFetcher.data : undefined); state.fetchers.set(staleKey, revalidatingFetcher); if (fetchControllers.has(staleKey)) { abortFetcher(staleKey); } if (rf.controller) { fetchControllers.set(staleKey, rf.controller); } }); updateState({ fetchers: new Map(state.fetchers) }); let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(rf => abortFetcher(rf.key)); abortController.signal.addEventListener("abort", abortPendingFetchRevalidations); let { loaderResults, fetcherResults } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, revalidationRequest); if (abortController.signal.aborted) { return; } abortController.signal.removeEventListener("abort", abortPendingFetchRevalidations); fetchReloadIds.delete(key); fetchControllers.delete(key); revalidatingFetchers.forEach(r => fetchControllers.delete(r.key)); let redirect = findRedirect([...loaderResults, ...fetcherResults]); if (redirect) { if (redirect.idx >= matchesToLoad.length) { // If this redirect came from a fetcher make sure we mark it in // fetchRedirectIds so it doesn't get revalidated on the next set of // loader executions let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key; fetchRedirectIds.add(fetcherKey); } return startRedirectNavigation(revalidationRequest, redirect.result); } // Process and commit output from loaders let { loaderData, errors } = processLoaderData(state, state.matches, matchesToLoad, loaderResults, undefined, revalidatingFetchers, fetcherResults, activeDeferreds); // Since we let revalidations complete even if the submitting fetcher was // deleted, only put it back to idle if it hasn't been deleted if (state.fetchers.has(key)) { let doneFetcher = getDoneFetcher(actionResult.data); state.fetchers.set(key, doneFetcher); } abortStaleFetchLoads(loadId); // If we are currently in a navigation loading state and this fetcher is // more recent than the navigation, we want the newer data so abort the // navigation and complete it with the fetcher data if (state.navigation.state === "loading" && loadId > pendingNavigationLoadId) { invariant(pendingAction, "Expected pending action"); pendingNavigationController && pendingNavigationController.abort(); completeNavigation(state.navigation.location, { matches, loaderData, errors, fetchers: new Map(state.fetchers) }); } else { // otherwise just update with the fetcher data, preserving any existing // loaderData for loaders that did not need to reload. We have to // manually merge here since we aren't going through completeNavigation updateState({ errors, loaderData: mergeLoaderData(state.loaderData, loaderData, matches, errors), fetchers: new Map(state.fetchers) }); isRevalidationRequired = false; } } // Call the matched loader for fetcher.load(), handling redirects, errors, etc. async function handleFetcherLoader(key, routeId, path, match, matches, isFogOfWar, flushSync, submission) { let existingFetcher = state.fetchers.get(key); updateFetcherState(key, getLoadingFetcher(submission, existingFetcher ? existingFetcher.data : undefined), { flushSync }); let abortController = new AbortController(); let fetchRequest = createClientSideRequest(init.history, path, abortController.signal); if (isFogOfWar) { let discoverResult = await discoverRoutes(matches, path, fetchRequest.signal); if (discoverResult.type === "aborted") { return; } else if (discoverResult.type === "error") { let { error } = handleDiscoverRouteError(path, discoverResult); setFetcherError(key, routeId, error, { flushSync }); return; } else if (!discoverResult.matches) { setFetcherError(key, routeId, getInternalRouterError(404, { pathname: path }), { flushSync }); return; } else { matches = discoverResult.matches; match = getTargetMatch(matches, path); } } // Call the loader for this fetcher route match fetchControllers.set(key, abortController); let originatingLoadId = incrementingLoadId; let results = await callDataStrategy("loader", fetchRequest, [match], matches); let result = results[0]; // Deferred isn't supported for fetcher loads, await everything and treat it // as a normal load. resolveDeferredData will return undefined if this // fetcher gets aborted, so we just leave result untouched and short circuit // below if that happens if (isDeferredResult(result)) { result = (await resolveDeferredData(result, fetchRequest.signal, true)) || result; } // We can delete this so long as we weren't aborted by our our own fetcher // re-load which would have put _new_ controller is in fetchControllers if (fetchControllers.get(key) === abortController) { fetchControllers.delete(key); } if (fetchRequest.signal.aborted) { return; } // We don't want errors bubbling up or redirects followed for unmounted // fetchers, so short circuit here if it was removed from the UI if (deletedFetchers.has(key)) { updateFetcherState(key, getDoneFetcher(undefined)); return; } // If the loader threw a redirect Response, start a new REPLACE navigation if (isRedirectResult(result)) { if (pendingNavigationLoadId > originatingLoadId) { // A new navigation was kicked off after our loader started, so that // should take precedence over this redirect navigation updateFetcherState(key, getDoneFetcher(undefined)); return; } else { fetchRedirectIds.add(key); await startRedirectNavigation(fetchRequest, result); return; } } // Process any non-redirect errors thrown if (isErrorResult(result)) { setFetcherError(key, routeId, result.error); return; } invariant(!isDeferredResult(result), "Unhandled fetcher deferred data"); // Put the fetcher back into an idle state updateFetcherState(key, getDoneFetcher(result.data)); } /** * Utility function to handle redirects returned from an action or loader. * Normally, a redirect "replaces" the navigation that triggered it. So, for * example: * * - user is on /a * - user clicks a link to /b * - loader for /b redirects to /c * * In a non-JS app the browser would track the in-flight navigation to /b and * then replace it with /c when it encountered the redirect response. In * the end it would only ever update the URL bar with /c. * * In client-side routing using pushState/replaceState, we aim to emulate * this behavior and we also do not update history until the end of the * navigation (including processed redirects). This means that we never * actually touch history until we've processed redirects, so we just use * the history action from the original navigation (PUSH or REPLACE). */ async function startRedirectNavigation(request, redirect, _temp2) { let { submission, fetcherSubmission, replace } = _temp2 === void 0 ? {} : _temp2; if (redirect.response.headers.has("X-Remix-Revalidate")) { isRevalidationRequired = true; } let location = redirect.response.headers.get("Location"); invariant(location, "Expected a Location header on the redirect Response"); location = normalizeRedirectLocation(location, new URL(request.url), basename); let redirectLocation = createLocation(state.location, location, { _isRedirect: true }); if (isBrowser) { let isDocumentReload = false; if (redirect.response.headers.has("X-Remix-Reload-Document")) { // Hard reload if the response contained X-Remix-Reload-Document isDocumentReload = true; } else if (ABSOLUTE_URL_REGEX.test(location)) { const url = init.history.createURL(location); isDocumentReload = // Hard reload if it's an absolute URL to a new origin url.origin !== routerWindow.location.origin || // Hard reload if it's an absolute URL that does not match our basename stripBasename(url.pathname, basename) == null; } if (isDocumentReload) { if (replace) { routerWindow.location.replace(location); } else { routerWindow.location.assign(location); } return; } } // There's no need to abort on redirects, since we don't detect the // redirect until the action/loaders have settled pendingNavigationController = null; let redirectHistoryAction = replace === true ? Action.Replace : Action.Push; // Use the incoming submission if provided, fallback on the active one in // state.navigation let { formMethod, formAction, formEncType } = state.navigation; if (!submission && !fetcherSubmission && formMethod && formAction && formEncType) { submission = getSubmissionFromNavigation(state.navigation); } // If this was a 307/308 submission we want to preserve the HTTP method and // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the // redirected location let activeSubmission = submission || fetcherSubmission; if (redirectPreserveMethodStatusCodes.has(redirect.response.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) { await startNavigation(redirectHistoryAction, redirectLocation, { submission: _extends({}, activeSubmission, { formAction: location }), // Preserve this flag across redirects preventScrollReset: pendingPreventScrollReset }); } else { // If we have a navigation submission, we will preserve it through the // redirect navigation let overrideNavigation = getLoadingNavigation(redirectLocation, submission); await startNavigation(redirectHistoryAction, redirectLocation, { overrideNavigation, // Send fetcher submissions through for shouldRevalidate fetcherSubmission, // Preserve this flag across redirects preventScrollReset: pendingPreventScrollReset }); } } // Utility wrapper for calling dataStrategy client-side without having to // pass around the manifest, mapRouteProperties, etc. async function callDataStrategy(type, request, matchesToLoad, matches) { try { let results = await callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, manifest, mapRouteProperties); return await Promise.all(results.map((result, i) => { if (isRedirectHandlerResult(result)) { let response = result.result; return { type: ResultType.redirect, response: normalizeRelativeRoutingRedirectResponse(response, request, matchesToLoad[i].route.id, matches, basename, future.v7_relativeSplatPath) }; } return convertHandlerResultToDataResult(result); })); } catch (e) { // If the outer dataStrategy method throws, just return the error for all // matches - and it'll naturally bubble to the root return matchesToLoad.map(() => ({ type: ResultType.error, error: e })); } } async function callLoadersAndMaybeResolveData(currentMatches, matches, matchesToLoad, fetchersToLoad, request) { let [loaderResults, ...fetcherResults] = await Promise.all([matchesToLoad.length ? callDataStrategy("loader", request, matchesToLoad, matches) : [], ...fetchersToLoad.map(f => { if (f.matches && f.match && f.controller) { let fetcherRequest = createClientSideRequest(init.history, f.path, f.controller.signal); return callDataStrategy("loader", fetcherRequest, [f.match], f.matches).then(r => r[0]); } else { return Promise.resolve({ type: ResultType.error, error: getInternalRouterError(404, { pathname: f.path }) }); } })]); await Promise.all([resolveDeferredResults(currentMatches, matchesToLoad, loaderResults, loaderResults.map(() => request.signal), false, state.loaderData), resolveDeferredResults(currentMatches, fetchersToLoad.map(f => f.match), fetcherResults, fetchersToLoad.map(f => f.controller ? f.controller.signal : null), true)]); return { loaderResults, fetcherResults }; } function interruptActiveLoads() { // Every interruption triggers a revalidation isRevalidationRequired = true; // Cancel pending route-level deferreds and mark cancelled routes for // revalidation cancelledDeferredRoutes.push(...cancelActiveDeferreds()); // Abort in-flight fetcher loads fetchLoadMatches.forEach((_, key) => { if (fetchControllers.has(key)) { cancelledFetcherLoads.push(key); abortFetcher(key); } }); } function updateFetcherState(key, fetcher, opts) { if (opts === void 0) { opts = {}; } state.fetchers.set(key, fetcher); updateState({ fetchers: new Map(state.fetchers) }, { flushSync: (opts && opts.flushSync) === true }); } function setFetcherError(key, routeId, error, opts) { if (opts === void 0) { opts = {}; } let boundaryMatch = findNearestBoundary(state.matches, routeId); deleteFetcher(key); updateState({ errors: { [boundaryMatch.route.id]: error }, fetchers: new Map(state.fetchers) }, { flushSync: (opts && opts.flushSync) === true }); } function getFetcher(key) { if (future.v7_fetcherPersist) { activeFetchers.set(key, (activeFetchers.get(key) || 0) + 1); // If this fetcher was previously marked for deletion, unmark it since we // have a new instance if (deletedFetchers.has(key)) { deletedFetchers.delete(key); } } return state.fetchers.get(key) || IDLE_FETCHER; } function deleteFetcher(key) { let fetcher = state.fetchers.get(key); // Don't abort the controller if this is a deletion of a fetcher.submit() // in it's loading phase since - we don't want to abort the corresponding // revalidation and want them to complete and land if (fetchControllers.has(key) && !(fetcher && fetcher.state === "loading" && fetchReloadIds.has(key))) { abortFetcher(key); } fetchLoadMatches.delete(key); fetchReloadIds.delete(key); fetchRedirectIds.delete(key); deletedFetchers.delete(key); state.fetchers.delete(key); } function deleteFetcherAndUpdateState(key) { if (future.v7_fetcherPersist) { let count = (activeFetchers.get(key) || 0) - 1; if (count <= 0) { activeFetchers.delete(key); deletedFetchers.add(key); } else { activeFetchers.set(key, count); } } else { deleteFetcher(key); } updateState({ fetchers: new Map(state.fetchers) }); } function abortFetcher(key) { let controller = fetchControllers.get(key); invariant(controller, "Expected fetch controller: " + key); controller.abort(); fetchControllers.delete(key); } function markFetchersDone(keys) { for (let key of keys) { let fetcher = getFetcher(key); let doneFetcher = getDoneFetcher(fetcher.data); state.fetchers.set(key, doneFetcher); } } function markFetchRedirectsDone() { let doneKeys = []; let updatedFetchers = false; for (let key of fetchRedirectIds) { let fetcher = state.fetchers.get(key); invariant(fetcher, "Expected fetcher: " + key); if (fetcher.state === "loading") { fetchRedirectIds.delete(key); doneKeys.push(key); updatedFetchers = true; } } markFetchersDone(doneKeys); return updatedFetchers; } function abortStaleFetchLoads(landedId) { let yeetedKeys = []; for (let [key, id] of fetchReloadIds) { if (id < landedId) { let fetcher = state.fetchers.get(key); invariant(fetcher, "Expected fetcher: " + key); if (fetcher.state === "loading") { abortFetcher(key); fetchReloadIds.delete(key); yeetedKeys.push(key); } } } markFetchersDone(yeetedKeys); return yeetedKeys.length > 0; } function getBlocker(key, fn) { let blocker = state.blockers.get(key) || IDLE_BLOCKER; if (blockerFunctions.get(key) !== fn) { blockerFunctions.set(key, fn); } return blocker; } function deleteBlocker(key) { state.blockers.delete(key); blockerFunctions.delete(key); } // Utility function to update blockers, ensuring valid state transitions function updateBlocker(key, newBlocker) { let blocker = state.blockers.get(key) || IDLE_BLOCKER; // Poor mans state machine :) // https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM invariant(blocker.state === "unblocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "proceeding" || blocker.state === "blocked" && newBlocker.state === "unblocked" || blocker.state === "proceeding" && newBlocker.state === "unblocked", "Invalid blocker state transition: " + blocker.state + " -> " + newBlocker.state); let blockers = new Map(state.blockers); blockers.set(key, newBlocker); updateState({ blockers }); } function shouldBlockNavigation(_ref4) { let { currentLocation, nextLocation, historyAction } = _ref4; if (blockerFunctions.size === 0) { return; } // We ony support a single active blocker at the moment since we don't have // any compelling use cases for multi-blocker yet if (blockerFunctions.size > 1) { warning(false, "A router only supports one blocker at a time"); } let entries = Array.from(blockerFunctions.entries()); let [blockerKey, blockerFunction] = entries[entries.length - 1]; let blocker = state.blockers.get(blockerKey); if (blocker && blocker.state === "proceeding") { // If the blocker is currently proceeding, we don't need to re-check // it and can let this navigation continue return; } // At this point, we know we're unblocked/blocked so we need to check the // user-provided blocker function if (blockerFunction({ currentLocation, nextLocation, historyAction })) { return blockerKey; } } function handleNavigational404(pathname) { let error = getInternalRouterError(404, { pathname }); let routesToUse = inFlightDataRoutes || dataRoutes; let { matches, route } = getShortCircuitMatches(routesToUse); // Cancel all pending deferred on 404s since we don't keep any routes cancelActiveDeferreds(); return { notFoundMatches: matches, route, error }; } function handleDiscoverRouteError(pathname, discoverResult) { let matches = discoverResult.partialMatches; let route = matches[matches.length - 1].route; let error = getInternalRouterError(400, { type: "route-discovery", routeId: route.id, pathname, message: discoverResult.error != null && "message" in discoverResult.error ? discoverResult.error : String(discoverResult.error) }); return { notFoundMatches: matches, route, error }; } function cancelActiveDeferreds(predicate) { let cancelledRouteIds = []; activeDeferreds.forEach((dfd, routeId) => { if (!predicate || predicate(routeId)) { // Cancel the deferred - but do not remove from activeDeferreds here - // we rely on the subscribers to do that so our tests can assert proper // cleanup via _internalActiveDeferreds dfd.cancel(); cancelledRouteIds.push(routeId); activeDeferreds.delete(routeId); } }); return cancelledRouteIds; } // Opt in to capturing and reporting scroll positions during navigations, // used by the <ScrollRestoration> component function enableScrollRestoration(positions, getPosition, getKey) { savedScrollPositions = positions; getScrollPosition = getPosition; getScrollRestorationKey = getKey || null; // Perform initial hydration scroll restoration, since we miss the boat on // the initial updateState() because we've not yet rendered <ScrollRestoration/> // and therefore have no savedScrollPositions available if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) { initialScrollRestored = true; let y = getSavedScrollPosition(state.location, state.matches); if (y != null) { updateState({ restoreScrollPosition: y }); } } return () => { savedScrollPositions = null; getScrollPosition = null; getScrollRestorationKey = null; }; } function getScrollKey(location, matches) { if (getScrollRestorationKey) { let key = getScrollRestorationKey(location, matches.map(m => convertRouteMatchToUiMatch(m, state.loaderData))); return key || location.key; } return location.key; } function saveScrollPosition(location, matches) { if (savedScrollPositions && getScrollPosition) { let key = getScrollKey(location, matches); savedScrollPositions[key] = getScrollPosition(); } } function getSavedScrollPosition(location, matches) { if (savedScrollPositions) { let key = getScrollKey(location, matches); let y = savedScrollPositions[key]; if (typeof y === "number") { return y; } } return null; } function checkFogOfWar(matches, routesToUse, pathname) { if (patchRoutesOnMissImpl) { if (!matches) { let fogMatches = matchRoutesImpl(routesToUse, pathname, basename, true); return { active: true, matches: fogMatches || [] }; } else { let leafRoute = matches[matches.length - 1].route; if (leafRoute.path && (leafRoute.path === "*" || leafRoute.path.endsWith("/*"))) { // If we matched a splat, it might only be because we haven't yet fetched // the children that would match with a higher score, so let's fetch // around and find out let partialMatches = matchRoutesImpl(routesToUse, pathname, basename, true); return { active: true, matches: partialMatches }; } } } return { active: false, matches: null }; } async function discoverRoutes(matches, pathname, signal) { let partialMatches = matches; let route = partialMatches.length > 0 ? partialMatches[partialMatches.length - 1].route : null; while (true) { let isNonHMR = inFlightDataRoutes == null; let routesToUse = inFlightDataRoutes || dataRoutes; try { await loadLazyRouteChildren(patchRoutesOnMissImpl, pathname, partialMatches, routesToUse, manifest, mapRouteProperties, pendingPatchRoutes, signal); } catch (e) { return { type: "error", error: e, partialMatches }; } finally { // If we are not in the middle of an HMR revalidation and we changed the // routes, provide a new identity so when we `updateState` at the end of // this navigation/fetch `router.routes` will be a new identity and // trigger a re-run of memoized `router.routes` dependencies. // HMR will already update the identity and reflow when it lands // `inFlightDataRoutes` in `completeNavigation` if (isNonHMR) { dataRoutes = [...dataRoutes]; } } if (signal.aborted) { return { type: "aborted" }; } let newMatches = matchRoutes(routesToUse, pathname, basename); let matchedSplat = false; if (newMatches) { let leafRoute = newMatches[newMatches.length - 1].route; if (leafRoute.index) { // If we found an index route, we can stop return { type: "success", matches: newMatches }; } if (leafRoute.path && leafRoute.path.length > 0) { if (leafRoute.path === "*") { // If we found a splat route, we can't be sure there's not a // higher-scoring route down some partial matches trail so we need // to check that out matchedSplat = true; } else { // If we found a non-splat route, we can stop return { type: "success", matches: newMatches }; } } } let newPartialMatches = matchRoutesImpl(routesToUse, pathname, basename, true); // If we are no longer partially matching anything, this was either a // legit splat match above, or it's a 404. Also avoid loops if the // second pass results in the same partial matches if (!newPartialMatches || partialMatches.map(m => m.route.id).join("-") === newPartialMatches.map(m => m.route.id).join("-")) { return { type: "success", matches: matchedSplat ? newMatches : null }; } partialMatches = newPartialMatches; route = partialMatches[partialMatches.length - 1].route; if (route.path === "*") { // The splat is still our most accurate partial, so run with it return { type: "success", matches: partialMatches }; } } } function _internalSetRoutes(newRoutes) { manifest = {}; inFlightDataRoutes = convertRoutesToDataRoutes(newRoutes, mapRouteProperties, undefined, manifest); } function patchRoutes(routeId, children) { let isNonHMR = inFlightDataRoutes == null; let routesToUse = inFlightDataRoutes || dataRoutes; patchRoutesImpl(routeId, children, routesToUse, manifest, mapRouteProperties); // If we are not in the middle of an HMR revalidation and we changed the // routes, provide a new identity and trigger a reflow via `updateState` // to re-run memoized `router.routes` dependencies. // HMR will already update the identity and reflow when it lands // `inFlightDataRoutes` in `completeNavigation` if (isNonHMR) { dataRoutes = [...dataRoutes]; updateState({}); } } router = { get basename() { return basename; }, get future() { return future; }, get state() { return state; }, get routes() { return dataRoutes; }, get window() { return routerWindow; }, initialize, subscribe, enableScrollRestoration, navigate, fetch, revalidate, // Passthrough to history-aware createHref used by useHref so we get proper // hash-aware URLs in DOM paths createHref: to => init.history.createHref(to), encodeLocation: to => init.history.encodeLocation(to), getFetcher, deleteFetcher: deleteFetcherAndUpdateState, dispose, getBlocker, deleteBlocker, patchRoutes, _internalFetchControllers: fetchControllers, _internalActiveDeferreds: activeDeferreds, // TODO: Remove setRoutes, it's temporary to avoid dealing with // updating the tree while validating the update algorithm. _internalSetRoutes }; return router; } //#endregion //////////////////////////////////////////////////////////////////////////////// //#region createStaticHandler //////////////////////////////////////////////////////////////////////////////// const UNSAFE_DEFERRED_SYMBOL = Symbol("deferred"); function createStaticHandler(routes, opts) { invariant(routes.length > 0, "You must provide a non-empty routes array to createStaticHandler"); let manifest = {}; let basename = (opts ? opts.basename : null) || "/"; let mapRouteProperties; if (opts != null && opts.mapRouteProperties) { mapRouteProperties = opts.mapRouteProperties; } else if (opts != null && opts.detectErrorBoundary) { // If they are still using the deprecated version, wrap it with the new API let detectErrorBoundary = opts.detectErrorBoundary; mapRouteProperties = route => ({ hasErrorBoundary: detectErrorBoundary(route) }); } else { mapRouteProperties = defaultMapRouteProperties; } // Config driven behavior flags let future = _extends({ v7_relativeSplatPath: false, v7_throwAbortReason: false }, opts ? opts.future : null); let dataRoutes = convertRoutesToDataRoutes(routes, mapRouteProperties, undefined, manifest); /** * The query() method is intended for document requests, in which we want to * call an optional action and potentially multiple loaders for all nested * routes. It returns a StaticHandlerContext object, which is very similar * to the router state (location, loaderData, actionData, errors, etc.) and * also adds SSR-specific information such as the statusCode and headers * from action/loaders Responses. * * It _should_ never throw and should report all errors through the * returned context.errors object, properly associating errors to their error * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be * used to emulate React error boundaries during SSr by performing a second * pass only down to the boundaryId. * * The one exception where we do not return a StaticHandlerContext is when a * redirect response is returned or thrown from any action/loader. We * propagate that out and return the raw Response so the HTTP server can * return it directly. * * - `opts.requestContext` is an optional server context that will be passed * to actions/loaders in the `context` parameter * - `opts.skipLoaderErrorBubbling` is an optional parameter that will prevent * the bubbling of errors which allows single-fetch-type implementations * where the client will handle the bubbling and we may need to return data * for the handling route */ async function query(request, _temp3) { let { requestContext, skipLoaderErrorBubbling, unstable_dataStrategy } = _temp3 === void 0 ? {} : _temp3; let url = new URL(request.url); let method = request.method; let location = createLocation("", createPath(url), null, "default"); let matches = matchRoutes(dataRoutes, location, basename); // SSR supports HEAD requests while SPA doesn't if (!isValidMethod(method) && method !== "HEAD") { let error = getInternalRouterError(405, { method }); let { matches: methodNotAllowedMatches, route } = getShortCircuitMatches(dataRoutes); return { basename, location, matches: methodNotAllowedMatches, loaderData: {}, actionData: null, errors: { [route.id]: error }, statusCode: error.status, loaderHeaders: {}, actionHeaders: {}, activeDeferreds: null }; } else if (!matches) { let error = getInternalRouterError(404, { pathname: location.pathname }); let { matches: notFoundMatches, route } = getShortCircuitMatches(dataRoutes); return { basename, location, matches: notFoundMatches, loaderData: {}, actionData: null, errors: { [route.id]: error }, statusCode: error.status, loaderHeaders: {}, actionHeaders: {}, activeDeferreds: null }; } let result = await queryImpl(request, location, matches, requestContext, unstable_dataStrategy || null, skipLoaderErrorBubbling === true, null); if (isResponse(result)) { return result; } // When returning StaticHandlerContext, we patch back in the location here // since we need it for React Context. But this helps keep our submit and // loadRouteData operating on a Request instead of a Location return _extends({ location, basename }, result); } /** * The queryRoute() method is intended for targeted route requests, either * for fetch ?_data requests or resource route requests. In this case, we * are only ever calling a single action or loader, and we are returning the * returned value directly. In most cases, this will be a Response returned * from the action/loader, but it may be a primitive or other value as well - * and in such cases the calling context should handle that accordingly. * * We do respect the throw/return differentiation, so if an action/loader * throws, then this method will throw the value. This is important so we * can do proper boundary identification in Remix where a thrown Response * must go to the Catch Boundary but a returned Response is happy-path. * * One thing to note is that any Router-initiated Errors that make sense * to associate with a status code will be thrown as an ErrorResponse * instance which include the raw Error, such that the calling context can * serialize the error as they see fit while including the proper response * code. Examples here are 404 and 405 errors that occur prior to reaching * any user-defined loaders. * * - `opts.routeId` allows you to specify the specific route handler to call. * If not provided the handler will determine the proper route by matching * against `request.url` * - `opts.requestContext` is an optional server context that will be passed * to actions/loaders in the `context` parameter */ async function queryRoute(request, _temp4) { let { routeId, requestContext, unstable_dataStrategy } = _temp4 === void 0 ? {} : _temp4; let url = new URL(request.url); let method = request.method; let location = createLocation("", createPath(url), null, "default"); let matches = matchRoutes(dataRoutes, location, basename); // SSR supports HEAD requests while SPA doesn't if (!isValidMethod(method) && method !== "HEAD" && method !== "OPTIONS") { throw getInternalRouterError(405, { method }); } else if (!matches) { throw getInternalRouterError(404, { pathname: location.pathname }); } let match = routeId ? matches.find(m => m.route.id === routeId) : getTargetMatch(matches, location); if (routeId && !match) { throw getInternalRouterError(403, { pathname: location.pathname, routeId }); } else if (!match) { // This should never hit I don't think? throw getInternalRouterError(404, { pathname: location.pathname }); } let result = await queryImpl(request, location, matches, requestContext, unstable_dataStrategy || null, false, match); if (isResponse(result)) { return result; } let error = result.errors ? Object.values(result.errors)[0] : undefined; if (error !== undefined) { // If we got back result.errors, that means the loader/action threw // _something_ that wasn't a Response, but it's not guaranteed/required // to be an `instanceof Error` either, so we have to use throw here to // preserve the "error" state outside of queryImpl. throw error; } // Pick off the right state value to return if (result.actionData) { return Object.values(result.actionData)[0]; } if (result.loaderData) { var _result$activeDeferre; let data = Object.values(result.loaderData)[0]; if ((_result$activeDeferre = result.activeDeferreds) != null && _result$activeDeferre[match.route.id]) { data[UNSAFE_DEFERRED_SYMBOL] = result.activeDeferreds[match.route.id]; } return data; } return undefined; } async function queryImpl(request, location, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch) { invariant(request.signal, "query()/queryRoute() requests must contain an AbortController signal"); try { if (isMutationMethod(request.method.toLowerCase())) { let result = await submit(request, matches, routeMatch || getTargetMatch(matches, location), requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch != null); return result; } let result = await loadRouteData(request, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch); return isResponse(result) ? result : _extends({}, result, { actionData: null, actionHeaders: {} }); } catch (e) { // If the user threw/returned a Response in callLoaderOrAction for a // `queryRoute` call, we throw the `HandlerResult` to bail out early // and then return or throw the raw Response here accordingly if (isHandlerResult(e) && isResponse(e.result)) { if (e.type === ResultType.error) { throw e.result; } return e.result; } // Redirects are always returned since they don't propagate to catch // boundaries if (isRedirectResponse(e)) { return e; } throw e; } } async function submit(request, matches, actionMatch, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, isRouteRequest) { let result; if (!actionMatch.route.action && !actionMatch.route.lazy) { let error = getInternalRouterError(405, { method: request.method, pathname: new URL(request.url).pathname, routeId: actionMatch.route.id }); if (isRouteRequest) { throw error; } result = { type: ResultType.error, error }; } else { let results = await callDataStrategy("action", request, [actionMatch], matches, isRouteRequest, requestContext, unstable_dataStrategy); result = results[0]; if (request.signal.aborted) { throwStaticHandlerAbortedError(request, isRouteRequest, future); } } if (isRedirectResult(result)) { // Uhhhh - this should never happen, we should always throw these from // callLoaderOrAction, but the type narrowing here keeps TS happy and we // can get back on the "throw all redirect responses" train here should // this ever happen :/ throw new Response(null, { status: result.response.status, headers: { Location: result.response.headers.get("Location") } }); } if (isDeferredResult(result)) { let error = getInternalRouterError(400, { type: "defer-action" }); if (isRouteRequest) { throw error; } result = { type: ResultType.error, error }; } if (isRouteRequest) { // Note: This should only be non-Response values if we get here, since // isRouteRequest should throw any Response received in callLoaderOrAction if (isErrorResult(result)) { throw result.error; } return { matches: [actionMatch], loaderData: {}, actionData: { [actionMatch.route.id]: result.data }, errors: null, // Note: statusCode + headers are unused here since queryRoute will // return the raw Response or value statusCode: 200, loaderHeaders: {}, actionHeaders: {}, activeDeferreds: null }; } // Create a GET request for the loaders let loaderRequest = new Request(request.url, { headers: request.headers, redirect: request.redirect, signal: request.signal }); if (isErrorResult(result)) { // Store off the pending error - we use it to determine which loaders // to call and will commit it when we complete the navigation let boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id); let context = await loadRouteData(loaderRequest, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, null, [boundaryMatch.route.id, result]); // action status codes take precedence over loader status codes return _extends({}, context, { statusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500, actionData: null, actionHeaders: _extends({}, result.headers ? { [actionMatch.route.id]: result.headers } : {}) }); } let context = await loadRouteData(loaderRequest, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, null); return _extends({}, context, { actionData: { [actionMatch.route.id]: result.data } }, result.statusCode ? { statusCode: result.statusCode } : {}, { actionHeaders: result.headers ? { [actionMatch.route.id]: result.headers } : {} }); } async function loadRouteData(request, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch, pendingActionResult) { let isRouteRequest = routeMatch != null; // Short circuit if we have no loaders to run (queryRoute()) if (isRouteRequest && !(routeMatch != null && routeMatch.route.loader) && !(routeMatch != null && routeMatch.route.lazy)) { throw getInternalRouterError(400, { method: request.method, pathname: new URL(request.url).pathname, routeId: routeMatch == null ? void 0 : routeMatch.route.id }); } let requestMatches = routeMatch ? [routeMatch] : pendingActionResult && isErrorResult(pendingActionResult[1]) ? getLoaderMatchesUntilBoundary(matches, pendingActionResult[0]) : matches; let matchesToLoad = requestMatches.filter(m => m.route.loader || m.route.lazy); // Short circuit if we have no loaders to run (query()) if (matchesToLoad.length === 0) { return { matches, // Add a null for all matched routes for proper revalidation on the client loaderData: matches.reduce((acc, m) => Object.assign(acc, { [m.route.id]: null }), {}), errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? { [pendingActionResult[0]]: pendingActionResult[1].error } : null, statusCode: 200, loaderHeaders: {}, activeDeferreds: null }; } let results = await callDataStrategy("loader", request, matchesToLoad, matches, isRouteRequest, requestContext, unstable_dataStrategy); if (request.signal.aborted) { throwStaticHandlerAbortedError(request, isRouteRequest, future); } // Process and commit output from loaders let activeDeferreds = new Map(); let context = processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, skipLoaderErrorBubbling); // Add a null for any non-loader matches for proper revalidation on the client let executedLoaders = new Set(matchesToLoad.map(match => match.route.id)); matches.forEach(match => { if (!executedLoaders.has(match.route.id)) { context.loaderData[match.route.id] = null; } }); return _extends({}, context, { matches, activeDeferreds: activeDeferreds.size > 0 ? Object.fromEntries(activeDeferreds.entries()) : null }); } // Utility wrapper for calling dataStrategy server-side without having to // pass around the manifest, mapRouteProperties, etc. async function callDataStrategy(type, request, matchesToLoad, matches, isRouteRequest, requestContext, unstable_dataStrategy) { let results = await callDataStrategyImpl(unstable_dataStrategy || defaultDataStrategy, type, request, matchesToLoad, matches, manifest, mapRouteProperties, requestContext); return await Promise.all(results.map((result, i) => { if (isRedirectHandlerResult(result)) { let response = result.result; // Throw redirects and let the server handle them with an HTTP redirect throw normalizeRelativeRoutingRedirectResponse(response, request, matchesToLoad[i].route.id, matches, basename, future.v7_relativeSplatPath); } if (isResponse(result.result) && isRouteRequest) { // For SSR single-route requests, we want to hand Responses back // directly without unwrapping throw result; } return convertHandlerResultToDataResult(result); })); } return { dataRoutes, query, queryRoute }; } //#endregion //////////////////////////////////////////////////////////////////////////////// //#region Helpers //////////////////////////////////////////////////////////////////////////////// /** * Given an existing StaticHandlerContext and an error thrown at render time, * provide an updated StaticHandlerContext suitable for a second SSR render */ function getStaticContextFromError(routes, context, error) { let newContext = _extends({}, context, { statusCode: isRouteErrorResponse(error) ? error.status : 500, errors: { [context._deepestRenderedBoundaryId || routes[0].id]: error } }); return newContext; } function throwStaticHandlerAbortedError(request, isRouteRequest, future) { if (future.v7_throwAbortReason && request.signal.reason !== undefined) { throw request.signal.reason; } let method = isRouteRequest ? "queryRoute" : "query"; throw new Error(method + "() call aborted: " + request.method + " " + request.url); } function isSubmissionNavigation(opts) { return opts != null && ("formData" in opts && opts.formData != null || "body" in opts && opts.body !== undefined); } function normalizeTo(location, matches, basename, prependBasename, to, v7_relativeSplatPath, fromRouteId, relative) { let contextualMatches; let activeRouteMatch; if (fromRouteId) { // Grab matches up to the calling route so our route-relative logic is // relative to the correct source route contextualMatches = []; for (let match of matches) { contextualMatches.push(match); if (match.route.id === fromRouteId) { activeRouteMatch = match; break; } } } else { contextualMatches = matches; activeRouteMatch = matches[matches.length - 1]; } // Resolve the relative path let path = resolveTo(to ? to : ".", getResolveToMatches(contextualMatches, v7_relativeSplatPath), stripBasename(location.pathname, basename) || location.pathname, relative === "path"); // When `to` is not specified we inherit search/hash from the current // location, unlike when to="." and we just inherit the path. // See https://github.com/remix-run/remix/issues/927 if (to == null) { path.search = location.search; path.hash = location.hash; } // Add an ?index param for matched index routes if we don't already have one if ((to == null || to === "" || to === ".") && activeRouteMatch && activeRouteMatch.route.index && !hasNakedIndexQuery(path.search)) { path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index"; } // If we're operating within a basename, prepend it to the pathname. If // this is a root navigation, then just use the raw basename which allows // the basename to have full control over the presence of a trailing slash // on root actions if (prependBasename && basename !== "/") { path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]); } return createPath(path); } // Normalize navigation options by converting formMethod=GET formData objects to // URLSearchParams so they behave identically to links with query params function normalizeNavigateOptions(normalizeFormMethod, isFetcher, path, opts) { // Return location verbatim on non-submission navigations if (!opts || !isSubmissionNavigation(opts)) { return { path }; } if (opts.formMethod && !isValidMethod(opts.formMethod)) { return { path, error: getInternalRouterError(405, { method: opts.formMethod }) }; } let getInvalidBodyError = () => ({ path, error: getInternalRouterError(400, { type: "invalid-body" }) }); // Create a Submission on non-GET navigations let rawFormMethod = opts.formMethod || "get"; let formMethod = normalizeFormMethod ? rawFormMethod.toUpperCase() : rawFormMethod.toLowerCase(); let formAction = stripHashFromPath(path); if (opts.body !== undefined) { if (opts.formEncType === "text/plain") { // text only support POST/PUT/PATCH/DELETE submissions if (!isMutationMethod(formMethod)) { return getInvalidBodyError(); } let text = typeof opts.body === "string" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ? // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data Array.from(opts.body.entries()).reduce((acc, _ref5) => { let [name, value] = _ref5; return "" + acc + name + "=" + value + "\n"; }, "") : String(opts.body); return { path, submission: { formMethod, formAction, formEncType: opts.formEncType, formData: undefined, json: undefined, text } }; } else if (opts.formEncType === "application/json") { // json only supports POST/PUT/PATCH/DELETE submissions if (!isMutationMethod(formMethod)) { return getInvalidBodyError(); } try { let json = typeof opts.body === "string" ? JSON.parse(opts.body) : opts.body; return { path, submission: { formMethod, formAction, formEncType: opts.formEncType, formData: undefined, json, text: undefined } }; } catch (e) { return getInvalidBodyError(); } } } invariant(typeof FormData === "function", "FormData is not available in this environment"); let searchParams; let formData; if (opts.formData) { searchParams = convertFormDataToSearchParams(opts.formData); formData = opts.formData; } else if (opts.body instanceof FormData) { searchParams = convertFormDataToSearchParams(opts.body); formData = opts.body; } else if (opts.body instanceof URLSearchParams) { searchParams = opts.body; formData = convertSearchParamsToFormData(searchParams); } else if (opts.body == null) { searchParams = new URLSearchParams(); formData = new FormData(); } else { try { searchParams = new URLSearchParams(opts.body); formData = convertSearchParamsToFormData(searchParams); } catch (e) { return getInvalidBodyError(); } } let submission = { formMethod, formAction, formEncType: opts && opts.formEncType || "application/x-www-form-urlencoded", formData, json: undefined, text: undefined }; if (isMutationMethod(submission.formMethod)) { return { path, submission }; } // Flatten submission onto URLSearchParams for GET submissions let parsedPath = parsePath(path); // On GET navigation submissions we can drop the ?index param from the // resulting location since all loaders will run. But fetcher GET submissions // only run a single loader so we need to preserve any incoming ?index params if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) { searchParams.append("index", ""); } parsedPath.search = "?" + searchParams; return { path: createPath(parsedPath), submission }; } // Filter out all routes below any caught error as they aren't going to // render so we don't need to load them function getLoaderMatchesUntilBoundary(matches, boundaryId) { let boundaryMatches = matches; if (boundaryId) { let index = matches.findIndex(m => m.route.id === boundaryId); if (index >= 0) { boundaryMatches = matches.slice(0, index); } } return boundaryMatches; } function getMatchesToLoad(history, state, matches, submission, location, isInitialLoad, skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionResult) { let actionResult = pendingActionResult ? isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : pendingActionResult[1].data : undefined; let currentUrl = history.createURL(state.location); let nextUrl = history.createURL(location); // Pick navigation matches that are net-new or qualify for revalidation let boundaryId = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[0] : undefined; let boundaryMatches = boundaryId ? getLoaderMatchesUntilBoundary(matches, boundaryId) : matches; // Don't revalidate loaders by default after action 4xx/5xx responses // when the flag is enabled. They can still opt-into revalidation via // `shouldRevalidate` via `actionResult` let actionStatus = pendingActionResult ? pendingActionResult[1].statusCode : undefined; let shouldSkipRevalidation = skipActionErrorRevalidation && actionStatus && actionStatus >= 400; let navigationMatches = boundaryMatches.filter((match, index) => { let { route } = match; if (route.lazy) { // We haven't loaded this route yet so we don't know if it's got a loader! return true; } if (route.loader == null) { return false; } if (isInitialLoad) { if (typeof route.loader !== "function" || route.loader.hydrate) { return true; } return state.loaderData[route.id] === undefined && ( // Don't re-run if the loader ran and threw an error !state.errors || state.errors[route.id] === undefined); } // Always call the loader on new route instances and pending defer cancellations if (isNewLoader(state.loaderData, state.matches[index], match) || cancelledDeferredRoutes.some(id => id === match.route.id)) { return true; } // This is the default implementation for when we revalidate. If the route // provides it's own implementation, then we give them full control but // provide this value so they can leverage it if needed after they check // their own specific use cases let currentRouteMatch = state.matches[index]; let nextRouteMatch = match; return shouldRevalidateLoader(match, _extends({ currentUrl, currentParams: currentRouteMatch.params, nextUrl, nextParams: nextRouteMatch.params }, submission, { actionResult, unstable_actionStatus: actionStatus, defaultShouldRevalidate: shouldSkipRevalidation ? false : // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate isRevalidationRequired || currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search || // Search params affect all loaders currentUrl.search !== nextUrl.search || isNewRouteInstance(currentRouteMatch, nextRouteMatch) })); }); // Pick fetcher.loads that need to be revalidated let revalidatingFetchers = []; fetchLoadMatches.forEach((f, key) => { // Don't revalidate: // - on initial load (shouldn't be any fetchers then anyway) // - if fetcher won't be present in the subsequent render // - no longer matches the URL (v7_fetcherPersist=false) // - was unmounted but persisted due to v7_fetcherPersist=true if (isInitialLoad || !matches.some(m => m.route.id === f.routeId) || deletedFetchers.has(key)) { return; } let fetcherMatches = matchRoutes(routesToUse, f.path, basename); // If the fetcher path no longer matches, push it in with null matches so // we can trigger a 404 in callLoadersAndMaybeResolveData. Note this is // currently only a use-case for Remix HMR where the route tree can change // at runtime and remove a route previously loaded via a fetcher if (!fetcherMatches) { revalidatingFetchers.push({ key, routeId: f.routeId, path: f.path, matches: null, match: null, controller: null }); return; } // Revalidating fetchers are decoupled from the route matches since they // load from a static href. They revalidate based on explicit revalidation // (submission, useRevalidator, or X-Remix-Revalidate) let fetcher = state.fetchers.get(key); let fetcherMatch = getTargetMatch(fetcherMatches, f.path); let shouldRevalidate = false; if (fetchRedirectIds.has(key)) { // Never trigger a revalidation of an actively redirecting fetcher shouldRevalidate = false; } else if (cancelledFetcherLoads.includes(key)) { // Always revalidate if the fetcher was cancelled shouldRevalidate = true; } else if (fetcher && fetcher.state !== "idle" && fetcher.data === undefined) { // If the fetcher hasn't ever completed loading yet, then this isn't a // revalidation, it would just be a brand new load if an explicit // revalidation is required shouldRevalidate = isRevalidationRequired; } else { // Otherwise fall back on any user-defined shouldRevalidate, defaulting // to explicit revalidations only shouldRevalidate = shouldRevalidateLoader(fetcherMatch, _extends({ currentUrl, currentParams: state.matches[state.matches.length - 1].params, nextUrl, nextParams: matches[matches.length - 1].params }, submission, { actionResult, unstable_actionStatus: actionStatus, defaultShouldRevalidate: shouldSkipRevalidation ? false : isRevalidationRequired })); } if (shouldRevalidate) { revalidatingFetchers.push({ key, routeId: f.routeId, path: f.path, matches: fetcherMatches, match: fetcherMatch, controller: new AbortController() }); } }); return [navigationMatches, revalidatingFetchers]; } function isNewLoader(currentLoaderData, currentMatch, match) { let isNew = // [a] -> [a, b] !currentMatch || // [a, b] -> [a, c] match.route.id !== currentMatch.route.id; // Handle the case that we don't have data for a re-used route, potentially // from a prior error or from a cancelled pending deferred let isMissingData = currentLoaderData[match.route.id] === undefined; // Always load if this is a net-new route or we don't yet have data return isNew || isMissingData; } function isNewRouteInstance(currentMatch, match) { let currentPath = currentMatch.route.path; return ( // param change for this match, /users/123 -> /users/456 currentMatch.pathname !== match.pathname || // splat param changed, which is not present in match.path // e.g. /files/images/avatar.jpg -> files/finances.xls currentPath != null && currentPath.endsWith("*") && currentMatch.params["*"] !== match.params["*"] ); } function shouldRevalidateLoader(loaderMatch, arg) { if (loaderMatch.route.shouldRevalidate) { let routeChoice = loaderMatch.route.shouldRevalidate(arg); if (typeof routeChoice === "boolean") { return routeChoice; } } return arg.defaultShouldRevalidate; } /** * Idempotent utility to execute patchRoutesOnMiss() to lazily load route * definitions and update the routes/routeManifest */ async function loadLazyRouteChildren(patchRoutesOnMissImpl, path, matches, routes, manifest, mapRouteProperties, pendingRouteChildren, signal) { let key = [path, ...matches.map(m => m.route.id)].join("-"); try { let pending = pendingRouteChildren.get(key); if (!pending) { pending = patchRoutesOnMissImpl({ path, matches, patch: (routeId, children) => { if (!signal.aborted) { patchRoutesImpl(routeId, children, routes, manifest, mapRouteProperties); } } }); pendingRouteChildren.set(key, pending); } if (pending && isPromise(pending)) { await pending; } } finally { pendingRouteChildren.delete(key); } } function patchRoutesImpl(routeId, children, routesToUse, manifest, mapRouteProperties) { if (routeId) { var _route$children; let route = manifest[routeId]; invariant(route, "No route found to patch children into: routeId = " + routeId); let dataChildren = convertRoutesToDataRoutes(children, mapRouteProperties, [routeId, "patch", String(((_route$children = route.children) == null ? void 0 : _route$children.length) || "0")], manifest); if (route.children) { route.children.push(...dataChildren); } else { route.children = dataChildren; } } else { let dataChildren = convertRoutesToDataRoutes(children, mapRouteProperties, ["patch", String(routesToUse.length || "0")], manifest); routesToUse.push(...dataChildren); } } /** * Execute route.lazy() methods to lazily load route modules (loader, action, * shouldRevalidate) and update the routeManifest in place which shares objects * with dataRoutes so those get updated as well. */ async function loadLazyRouteModule(route, mapRouteProperties, manifest) { if (!route.lazy) { return; } let lazyRoute = await route.lazy(); // If the lazy route function was executed and removed by another parallel // call then we can return - first lazy() to finish wins because the return // value of lazy is expected to be static if (!route.lazy) { return; } let routeToUpdate = manifest[route.id]; invariant(routeToUpdate, "No route found in manifest"); // Update the route in place. This should be safe because there's no way // we could yet be sitting on this route as we can't get there without // resolving lazy() first. // // This is different than the HMR "update" use-case where we may actively be // on the route being updated. The main concern boils down to "does this // mutation affect any ongoing navigations or any current state.matches // values?". If not, it should be safe to update in place. let routeUpdates = {}; for (let lazyRouteProperty in lazyRoute) { let staticRouteValue = routeToUpdate[lazyRouteProperty]; let isPropertyStaticallyDefined = staticRouteValue !== undefined && // This property isn't static since it should always be updated based // on the route updates lazyRouteProperty !== "hasErrorBoundary"; warning(!isPropertyStaticallyDefined, "Route \"" + routeToUpdate.id + "\" has a static property \"" + lazyRouteProperty + "\" " + "defined but its lazy function is also returning a value for this property. " + ("The lazy route property \"" + lazyRouteProperty + "\" will be ignored.")); if (!isPropertyStaticallyDefined && !immutableRouteKeys.has(lazyRouteProperty)) { routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty]; } } // Mutate the route with the provided updates. Do this first so we pass // the updated version to mapRouteProperties Object.assign(routeToUpdate, routeUpdates); // Mutate the `hasErrorBoundary` property on the route based on the route // updates and remove the `lazy` function so we don't resolve the lazy // route again. Object.assign(routeToUpdate, _extends({}, mapRouteProperties(routeToUpdate), { lazy: undefined })); } // Default implementation of `dataStrategy` which fetches all loaders in parallel function defaultDataStrategy(opts) { return Promise.all(opts.matches.map(m => m.resolve())); } async function callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, manifest, mapRouteProperties, requestContext) { let routeIdsToLoad = matchesToLoad.reduce((acc, m) => acc.add(m.route.id), new Set()); let loadedMatches = new Set(); // Send all matches here to allow for a middleware-type implementation. // handler will be a no-op for unneeded routes and we filter those results // back out below. let results = await dataStrategyImpl({ matches: matches.map(match => { let shouldLoad = routeIdsToLoad.has(match.route.id); // `resolve` encapsulates the route.lazy, executing the // loader/action, and mapping return values/thrown errors to a // HandlerResult. Users can pass a callback to take fine-grained control // over the execution of the loader/action let resolve = handlerOverride => { loadedMatches.add(match.route.id); return shouldLoad ? callLoaderOrAction(type, request, match, manifest, mapRouteProperties, handlerOverride, requestContext) : Promise.resolve({ type: ResultType.data, result: undefined }); }; return _extends({}, match, { shouldLoad, resolve }); }), request, params: matches[0].params, context: requestContext }); // Throw if any loadRoute implementations not called since they are what // ensures a route is fully loaded matches.forEach(m => invariant(loadedMatches.has(m.route.id), "`match.resolve()` was not called for route id \"" + m.route.id + "\". " + "You must call `match.resolve()` on every match passed to " + "`dataStrategy` to ensure all routes are properly loaded.")); // Filter out any middleware-only matches for which we didn't need to run handlers return results.filter((_, i) => routeIdsToLoad.has(matches[i].route.id)); } // Default logic for calling a loader/action is the user has no specified a dataStrategy async function callLoaderOrAction(type, request, match, manifest, mapRouteProperties, handlerOverride, staticContext) { let result; let onReject; let runHandler = handler => { // Setup a promise we can race against so that abort signals short circuit let reject; // This will never resolve so safe to type it as Promise<HandlerResult> to // satisfy the function return value let abortPromise = new Promise((_, r) => reject = r); onReject = () => reject(); request.signal.addEventListener("abort", onReject); let actualHandler = ctx => { if (typeof handler !== "function") { return Promise.reject(new Error("You cannot call the handler for a route which defines a boolean " + ("\"" + type + "\" [routeId: " + match.route.id + "]"))); } return handler({ request, params: match.params, context: staticContext }, ...(ctx !== undefined ? [ctx] : [])); }; let handlerPromise; if (handlerOverride) { handlerPromise = handlerOverride(ctx => actualHandler(ctx)); } else { handlerPromise = (async () => { try { let val = await actualHandler(); return { type: "data", result: val }; } catch (e) { return { type: "error", result: e }; } })(); } return Promise.race([handlerPromise, abortPromise]); }; try { let handler = match.route[type]; if (match.route.lazy) { if (handler) { // Run statically defined handler in parallel with lazy() let handlerError; let [value] = await Promise.all([ // If the handler throws, don't let it immediately bubble out, // since we need to let the lazy() execution finish so we know if this // route has a boundary that can handle the error runHandler(handler).catch(e => { handlerError = e; }), loadLazyRouteModule(match.route, mapRouteProperties, manifest)]); if (handlerError !== undefined) { throw handlerError; } result = value; } else { // Load lazy route module, then run any returned handler await loadLazyRouteModule(match.route, mapRouteProperties, manifest); handler = match.route[type]; if (handler) { // Handler still runs even if we got interrupted to maintain consistency // with un-abortable behavior of handler execution on non-lazy or // previously-lazy-loaded routes result = await runHandler(handler); } else if (type === "action") { let url = new URL(request.url); let pathname = url.pathname + url.search; throw getInternalRouterError(405, { method: request.method, pathname, routeId: match.route.id }); } else { // lazy() route has no loader to run. Short circuit here so we don't // hit the invariant below that errors on returning undefined. return { type: ResultType.data, result: undefined }; } } } else if (!handler) { let url = new URL(request.url); let pathname = url.pathname + url.search; throw getInternalRouterError(404, { pathname }); } else { result = await runHandler(handler); } invariant(result.result !== undefined, "You defined " + (type === "action" ? "an action" : "a loader") + " for route " + ("\"" + match.route.id + "\" but didn't return anything from your `" + type + "` ") + "function. Please return a value or `null`."); } catch (e) { // We should already be catching and converting normal handler executions to // HandlerResults and returning them, so anything that throws here is an // unexpected error we still need to wrap return { type: ResultType.error, result: e }; } finally { if (onReject) { request.signal.removeEventListener("abort", onReject); } } return result; } async function convertHandlerResultToDataResult(handlerResult) { let { result, type, status } = handlerResult; if (isResponse(result)) { let data; try { let contentType = result.headers.get("Content-Type"); // Check between word boundaries instead of startsWith() due to the last // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type if (contentType && /\bapplication\/json\b/.test(contentType)) { if (result.body == null) { data = null; } else { data = await result.json(); } } else { data = await result.text(); } } catch (e) { return { type: ResultType.error, error: e }; } if (type === ResultType.error) { return { type: ResultType.error, error: new ErrorResponseImpl(result.status, result.statusText, data), statusCode: result.status, headers: result.headers }; } return { type: ResultType.data, data, statusCode: result.status, headers: result.headers }; } if (type === ResultType.error) { return { type: ResultType.error, error: result, statusCode: isRouteErrorResponse(result) ? result.status : status }; } if (isDeferredData(result)) { var _result$init, _result$init2; return { type: ResultType.deferred, deferredData: result, statusCode: (_result$init = result.init) == null ? void 0 : _result$init.status, headers: ((_result$init2 = result.init) == null ? void 0 : _result$init2.headers) && new Headers(result.init.headers) }; } return { type: ResultType.data, data: result, statusCode: status }; } // Support relative routing in internal redirects function normalizeRelativeRoutingRedirectResponse(response, request, routeId, matches, basename, v7_relativeSplatPath) { let location = response.headers.get("Location"); invariant(location, "Redirects returned/thrown from loaders/actions must have a Location header"); if (!ABSOLUTE_URL_REGEX.test(location)) { let trimmedMatches = matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1); location = normalizeTo(new URL(request.url), trimmedMatches, basename, true, location, v7_relativeSplatPath); response.headers.set("Location", location); } return response; } function normalizeRedirectLocation(location, currentUrl, basename) { if (ABSOLUTE_URL_REGEX.test(location)) { // Strip off the protocol+origin for same-origin + same-basename absolute redirects let normalizedLocation = location; let url = normalizedLocation.startsWith("//") ? new URL(currentUrl.protocol + normalizedLocation) : new URL(normalizedLocation); let isSameBasename = stripBasename(url.pathname, basename) != null; if (url.origin === currentUrl.origin && isSameBasename) { return url.pathname + url.search + url.hash; } } return location; } // Utility method for creating the Request instances for loaders/actions during // client-side navigations and fetches. During SSR we will always have a // Request instance from the static handler (query/queryRoute) function createClientSideRequest(history, location, signal, submission) { let url = history.createURL(stripHashFromPath(location)).toString(); let init = { signal }; if (submission && isMutationMethod(submission.formMethod)) { let { formMethod, formEncType } = submission; // Didn't think we needed this but it turns out unlike other methods, patch // won't be properly normalized to uppercase and results in a 405 error. // See: https://fetch.spec.whatwg.org/#concept-method init.method = formMethod.toUpperCase(); if (formEncType === "application/json") { init.headers = new Headers({ "Content-Type": formEncType }); init.body = JSON.stringify(submission.json); } else if (formEncType === "text/plain") { // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request) init.body = submission.text; } else if (formEncType === "application/x-www-form-urlencoded" && submission.formData) { // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request) init.body = convertFormDataToSearchParams(submission.formData); } else { // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request) init.body = submission.formData; } } return new Request(url, init); } function convertFormDataToSearchParams(formData) { let searchParams = new URLSearchParams(); for (let [key, value] of formData.entries()) { // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs searchParams.append(key, typeof value === "string" ? value : value.name); } return searchParams; } function convertSearchParamsToFormData(searchParams) { let formData = new FormData(); for (let [key, value] of searchParams.entries()) { formData.append(key, value); } return formData; } function processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, skipLoaderErrorBubbling) { // Fill in loaderData/errors from our loaders let loaderData = {}; let errors = null; let statusCode; let foundError = false; let loaderHeaders = {}; let pendingError = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : undefined; // Process loader results into state.loaderData/state.errors results.forEach((result, index) => { let id = matchesToLoad[index].route.id; invariant(!isRedirectResult(result), "Cannot handle redirect results in processLoaderData"); if (isErrorResult(result)) { let error = result.error; // If we have a pending action error, we report it at the highest-route // that throws a loader error, and then clear it out to indicate that // it was consumed if (pendingError !== undefined) { error = pendingError; pendingError = undefined; } errors = errors || {}; if (skipLoaderErrorBubbling) { errors[id] = error; } else { // Look upwards from the matched route for the closest ancestor error // boundary, defaulting to the root match. Prefer higher error values // if lower errors bubble to the same boundary let boundaryMatch = findNearestBoundary(matches, id); if (errors[boundaryMatch.route.id] == null) { errors[boundaryMatch.route.id] = error; } } // Clear our any prior loaderData for the throwing route loaderData[id] = undefined; // Once we find our first (highest) error, we set the status code and // prevent deeper status codes from overriding if (!foundError) { foundError = true; statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500; } if (result.headers) { loaderHeaders[id] = result.headers; } } else { if (isDeferredResult(result)) { activeDeferreds.set(id, result.deferredData); loaderData[id] = result.deferredData.data; // Error status codes always override success status codes, but if all // loaders are successful we take the deepest status code. if (result.statusCode != null && result.statusCode !== 200 && !foundError) { statusCode = result.statusCode; } if (result.headers) { loaderHeaders[id] = result.headers; } } else { loaderData[id] = result.data; // Error status codes always override success status codes, but if all // loaders are successful we take the deepest status code. if (result.statusCode && result.statusCode !== 200 && !foundError) { statusCode = result.statusCode; } if (result.headers) { loaderHeaders[id] = result.headers; } } } }); // If we didn't consume the pending action error (i.e., all loaders // resolved), then consume it here. Also clear out any loaderData for the // throwing route if (pendingError !== undefined && pendingActionResult) { errors = { [pendingActionResult[0]]: pendingError }; loaderData[pendingActionResult[0]] = undefined; } return { loaderData, errors, statusCode: statusCode || 200, loaderHeaders }; } function processLoaderData(state, matches, matchesToLoad, results, pendingActionResult, revalidatingFetchers, fetcherResults, activeDeferreds) { let { loaderData, errors } = processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, false // This method is only called client side so we always want to bubble ); // Process results from our revalidating fetchers for (let index = 0; index < revalidatingFetchers.length; index++) { let { key, match, controller } = revalidatingFetchers[index]; invariant(fetcherResults !== undefined && fetcherResults[index] !== undefined, "Did not find corresponding fetcher result"); let result = fetcherResults[index]; // Process fetcher non-redirect errors if (controller && controller.signal.aborted) { // Nothing to do for aborted fetchers continue; } else if (isErrorResult(result)) { let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id); if (!(errors && errors[boundaryMatch.route.id])) { errors = _extends({}, errors, { [boundaryMatch.route.id]: result.error }); } state.fetchers.delete(key); } else if (isRedirectResult(result)) { // Should never get here, redirects should get processed above, but we // keep this to type narrow to a success result in the else invariant(false, "Unhandled fetcher revalidation redirect"); } else if (isDeferredResult(result)) { // Should never get here, deferred data should be awaited for fetchers // in resolveDeferredResults invariant(false, "Unhandled fetcher deferred data"); } else { let doneFetcher = getDoneFetcher(result.data); state.fetchers.set(key, doneFetcher); } } return { loaderData, errors }; } function mergeLoaderData(loaderData, newLoaderData, matches, errors) { let mergedLoaderData = _extends({}, newLoaderData); for (let match of matches) { let id = match.route.id; if (newLoaderData.hasOwnProperty(id)) { if (newLoaderData[id] !== undefined) { mergedLoaderData[id] = newLoaderData[id]; } } else if (loaderData[id] !== undefined && match.route.loader) { // Preserve existing keys not included in newLoaderData and where a loader // wasn't removed by HMR mergedLoaderData[id] = loaderData[id]; } if (errors && errors.hasOwnProperty(id)) { // Don't keep any loader data below the boundary break; } } return mergedLoaderData; } function getActionDataForCommit(pendingActionResult) { if (!pendingActionResult) { return {}; } return isErrorResult(pendingActionResult[1]) ? { // Clear out prior actionData on errors actionData: {} } : { actionData: { [pendingActionResult[0]]: pendingActionResult[1].data } }; } // Find the nearest error boundary, looking upwards from the leaf route (or the // route specified by routeId) for the closest ancestor error boundary, // defaulting to the root match function findNearestBoundary(matches, routeId) { let eligibleMatches = routeId ? matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1) : [...matches]; return eligibleMatches.reverse().find(m => m.route.hasErrorBoundary === true) || matches[0]; } function getShortCircuitMatches(routes) { // Prefer a root layout route if present, otherwise shim in a route object let route = routes.length === 1 ? routes[0] : routes.find(r => r.index || !r.path || r.path === "/") || { id: "__shim-error-route__" }; return { matches: [{ params: {}, pathname: "", pathnameBase: "", route }], route }; } function getInternalRouterError(status, _temp5) { let { pathname, routeId, method, type, message } = _temp5 === void 0 ? {} : _temp5; let statusText = "Unknown Server Error"; let errorMessage = "Unknown @remix-run/router error"; if (status === 400) { statusText = "Bad Request"; if (type === "route-discovery") { errorMessage = "Unable to match URL \"" + pathname + "\" - the `children()` function for " + ("route `" + routeId + "` threw the following error:\n" + message); } else if (method && pathname && routeId) { errorMessage = "You made a " + method + " request to \"" + pathname + "\" but " + ("did not provide a `loader` for route \"" + routeId + "\", ") + "so there is no way to handle the request."; } else if (type === "defer-action") { errorMessage = "defer() is not supported in actions"; } else if (type === "invalid-body") { errorMessage = "Unable to encode submission body"; } } else if (status === 403) { statusText = "Forbidden"; errorMessage = "Route \"" + routeId + "\" does not match URL \"" + pathname + "\""; } else if (status === 404) { statusText = "Not Found"; errorMessage = "No route matches URL \"" + pathname + "\""; } else if (status === 405) { statusText = "Method Not Allowed"; if (method && pathname && routeId) { errorMessage = "You made a " + method.toUpperCase() + " request to \"" + pathname + "\" but " + ("did not provide an `action` for route \"" + routeId + "\", ") + "so there is no way to handle the request."; } else if (method) { errorMessage = "Invalid request method \"" + method.toUpperCase() + "\""; } } return new ErrorResponseImpl(status || 500, statusText, new Error(errorMessage), true); } // Find any returned redirect errors, starting from the lowest match function findRedirect(results) { for (let i = results.length - 1; i >= 0; i--) { let result = results[i]; if (isRedirectResult(result)) { return { result, idx: i }; } } } function stripHashFromPath(path) { let parsedPath = typeof path === "string" ? parsePath(path) : path; return createPath(_extends({}, parsedPath, { hash: "" })); } function isHashChangeOnly(a, b) { if (a.pathname !== b.pathname || a.search !== b.search) { return false; } if (a.hash === "") { // /page -> /page#hash return b.hash !== ""; } else if (a.hash === b.hash) { // /page#hash -> /page#hash return true; } else if (b.hash !== "") { // /page#hash -> /page#other return true; } // If the hash is removed the browser will re-perform a request to the server // /page#hash -> /page return false; } function isPromise(val) { return typeof val === "object" && val != null && "then" in val; } function isHandlerResult(result) { return result != null && typeof result === "object" && "type" in result && "result" in result && (result.type === ResultType.data || result.type === ResultType.error); } function isRedirectHandlerResult(result) { return isResponse(result.result) && redirectStatusCodes.has(result.result.status); } function isDeferredResult(result) { return result.type === ResultType.deferred; } function isErrorResult(result) { return result.type === ResultType.error; } function isRedirectResult(result) { return (result && result.type) === ResultType.redirect; } function isDeferredData(value) { let deferred = value; return deferred && typeof deferred === "object" && typeof deferred.data === "object" && typeof deferred.subscribe === "function" && typeof deferred.cancel === "function" && typeof deferred.resolveData === "function"; } function isResponse(value) { return value != null && typeof value.status === "number" && typeof value.statusText === "string" && typeof value.headers === "object" && typeof value.body !== "undefined"; } function isRedirectResponse(result) { if (!isResponse(result)) { return false; } let status = result.status; let location = result.headers.get("Location"); return status >= 300 && status <= 399 && location != null; } function isValidMethod(method) { return validRequestMethods.has(method.toLowerCase()); } function isMutationMethod(method) { return validMutationMethods.has(method.toLowerCase()); } async function resolveDeferredResults(currentMatches, matchesToLoad, results, signals, isFetcher, currentLoaderData) { for (let index = 0; index < results.length; index++) { let result = results[index]; let match = matchesToLoad[index]; // If we don't have a match, then we can have a deferred result to do // anything with. This is for revalidating fetchers where the route was // removed during HMR if (!match) { continue; } let currentMatch = currentMatches.find(m => m.route.id === match.route.id); let isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== undefined; if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) { // Note: we do not have to touch activeDeferreds here since we race them // against the signal in resolveDeferredData and they'll get aborted // there if needed let signal = signals[index]; invariant(signal, "Expected an AbortSignal for revalidating fetcher deferred result"); await resolveDeferredData(result, signal, isFetcher).then(result => { if (result) { results[index] = result || results[index]; } }); } } } async function resolveDeferredData(result, signal, unwrap) { if (unwrap === void 0) { unwrap = false; } let aborted = await result.deferredData.resolveData(signal); if (aborted) { return; } if (unwrap) { try { return { type: ResultType.data, data: result.deferredData.unwrappedData }; } catch (e) { // Handle any TrackedPromise._error values encountered while unwrapping return { type: ResultType.error, error: e }; } } return { type: ResultType.data, data: result.deferredData.data }; } function hasNakedIndexQuery(search) { return new URLSearchParams(search).getAll("index").some(v => v === ""); } function getTargetMatch(matches, location) { let search = typeof location === "string" ? parsePath(location).search : location.search; if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || "")) { // Return the leaf index route when index is present return matches[matches.length - 1]; } // Otherwise grab the deepest "path contributing" match (ignoring index and // pathless layout routes) let pathMatches = getPathContributingMatches(matches); return pathMatches[pathMatches.length - 1]; } function getSubmissionFromNavigation(navigation) { let { formMethod, formAction, formEncType, text, formData, json } = navigation; if (!formMethod || !formAction || !formEncType) { return; } if (text != null) { return { formMethod, formAction, formEncType, formData: undefined, json: undefined, text }; } else if (formData != null) { return { formMethod, formAction, formEncType, formData, json: undefined, text: undefined }; } else if (json !== undefined) { return { formMethod, formAction, formEncType, formData: undefined, json, text: undefined }; } } function getLoadingNavigation(location, submission) { if (submission) { let navigation = { state: "loading", location, formMethod: submission.formMethod, formAction: submission.formAction, formEncType: submission.formEncType, formData: submission.formData, json: submission.json, text: submission.text }; return navigation; } else { let navigation = { state: "loading", location, formMethod: undefined, formAction: undefined, formEncType: undefined, formData: undefined, json: undefined, text: undefined }; return navigation; } } function getSubmittingNavigation(location, submission) { let navigation = { state: "submitting", location, formMethod: submission.formMethod, formAction: submission.formAction, formEncType: submission.formEncType, formData: submission.formData, json: submission.json, text: submission.text }; return navigation; } function getLoadingFetcher(submission, data) { if (submission) { let fetcher = { state: "loading", formMethod: submission.formMethod, formAction: submission.formAction, formEncType: submission.formEncType, formData: submission.formData, json: submission.json, text: submission.text, data }; return fetcher; } else { let fetcher = { state: "loading", formMethod: undefined, formAction: undefined, formEncType: undefined, formData: undefined, json: undefined, text: undefined, data }; return fetcher; } } function getSubmittingFetcher(submission, existingFetcher) { let fetcher = { state: "submitting", formMethod: submission.formMethod, formAction: submission.formAction, formEncType: submission.formEncType, formData: submission.formData, json: submission.json, text: submission.text, data: existingFetcher ? existingFetcher.data : undefined }; return fetcher; } function getDoneFetcher(data) { let fetcher = { state: "idle", formMethod: undefined, formAction: undefined, formEncType: undefined, formData: undefined, json: undefined, text: undefined, data }; return fetcher; } function restoreAppliedTransitions(_window, transitions) { try { let sessionPositions = _window.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY); if (sessionPositions) { let json = JSON.parse(sessionPositions); for (let [k, v] of Object.entries(json || {})) { if (v && Array.isArray(v)) { transitions.set(k, new Set(v || [])); } } } } catch (e) { // no-op, use default empty object } } function persistAppliedTransitions(_window, transitions) { if (transitions.size > 0) { let json = {}; for (let [k, v] of transitions) { json[k] = [...v]; } try { _window.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY, JSON.stringify(json)); } catch (error) { warning(false, "Failed to save applied view transitions in sessionStorage (" + error + ")."); } } } //#endregion //# sourceMappingURL=router.js.map /***/ }), /* 34 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Accordion = function (_Component) { _inherits(Accordion, _Component); function Accordion(props) { _classCallCheck(this, Accordion); var _this = _possibleConstructorReturn(this, (Accordion.__proto__ || Object.getPrototypeOf(Accordion)).call(this, props)); _this.state = { open: props.expanded || false }; _this.toggleState = _this.toggleState.bind(_this); return _this; } _createClass(Accordion, [{ key: 'toggleState', value: function toggleState() { this.setState({ open: !this.state.open }); } }, { key: 'render', value: function render() { var _this2 = this; var label = this.props.label; var open = this.state.open; var divClass = ''; if (open) { divClass = 'sui-accordion-item--open'; } // eslint-disable-next-line max-len var boxedContent = !_.isUndefined(this.props.boxedContent) && '' !== this.props.boxedContent ? this.props.boxedContent : true; var defaultContentRender = !_.isUndefined(this.props.defaultContentRender) ? this.props.defaultContentRender : false; var accordionContents = _react2.default.Children.map(this.props.children, function (tab) { return tab; }); // It's intentionally we use span here to avoid unwanted handlers from SUI on div.sui-accordion-item-header. return _react2.default.createElement( 'div', { className: 'sui-accordion-item ' + divClass }, _react2.default.createElement( 'span', { className: 'sui-accordion-item-header', onClick: function onClick() { return _this2.toggleState(); } }, _react2.default.createElement( 'div', { className: 'sui-accordion-item-title' }, _react2.default.createElement( 'span', null, label ), _react2.default.createElement( 'button', { className: 'sui-button-icon sui-accordion-open-indicator', onClick: function onClick() { return _this2.toggleState(); } }, _react2.default.createElement('i', { className: 'sui-icon-chevron-down', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, false === this.state.open ? 'Open' : 'Close' ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-accordion-item-body' }, false === boxedContent ? (defaultContentRender || open) && accordionContents : _react2.default.createElement( 'div', { className: 'sui-box' }, _react2.default.createElement( 'div', { className: 'sui-box-body' }, (defaultContentRender || open) && accordionContents ), boxedContent ) ) ); } }]); return Accordion; }(_react.Component); exports.default = Accordion; /***/ }), /* 35 */, /* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var assert = __webpack_require__(53); var inherits = __webpack_require__(54); exports.inherits = inherits; function isSurrogatePair(msg, i) { if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) { return false; } if (i < 0 || i + 1 >= msg.length) { return false; } return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00; } function toArray(msg, enc) { if (Array.isArray(msg)) return msg.slice(); if (!msg) return []; var res = []; if (typeof msg === 'string') { if (!enc) { // Inspired by stringToUtf8ByteArray() in closure-library by Google // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143 // Apache License 2.0 // https://github.com/google/closure-library/blob/master/LICENSE var p = 0; for (var i = 0; i < msg.length; i++) { var c = msg.charCodeAt(i); if (c < 128) { res[p++] = c; } else if (c < 2048) { res[p++] = (c >> 6) | 192; res[p++] = (c & 63) | 128; } else if (isSurrogatePair(msg, i)) { c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF); res[p++] = (c >> 18) | 240; res[p++] = ((c >> 12) & 63) | 128; res[p++] = ((c >> 6) & 63) | 128; res[p++] = (c & 63) | 128; } else { res[p++] = (c >> 12) | 224; res[p++] = ((c >> 6) & 63) | 128; res[p++] = (c & 63) | 128; } } } else if (enc === 'hex') { msg = msg.replace(/[^a-z0-9]+/ig, ''); if (msg.length % 2 !== 0) msg = '0' + msg; for (i = 0; i < msg.length; i += 2) res.push(parseInt(msg[i] + msg[i + 1], 16)); } } else { for (i = 0; i < msg.length; i++) res[i] = msg[i] | 0; } return res; } exports.toArray = toArray; function toHex(msg) { var res = ''; for (var i = 0; i < msg.length; i++) res += zero2(msg[i].toString(16)); return res; } exports.toHex = toHex; function htonl(w) { var res = (w >>> 24) | ((w >>> 8) & 0xff00) | ((w << 8) & 0xff0000) | ((w & 0xff) << 24); return res >>> 0; } exports.htonl = htonl; function toHex32(msg, endian) { var res = ''; for (var i = 0; i < msg.length; i++) { var w = msg[i]; if (endian === 'little') w = htonl(w); res += zero8(w.toString(16)); } return res; } exports.toHex32 = toHex32; function zero2(word) { if (word.length === 1) return '0' + word; else return word; } exports.zero2 = zero2; function zero8(word) { if (word.length === 7) return '0' + word; else if (word.length === 6) return '00' + word; else if (word.length === 5) return '000' + word; else if (word.length === 4) return '0000' + word; else if (word.length === 3) return '00000' + word; else if (word.length === 2) return '000000' + word; else if (word.length === 1) return '0000000' + word; else return word; } exports.zero8 = zero8; function join32(msg, start, end, endian) { var len = end - start; assert(len % 4 === 0); var res = new Array(len / 4); for (var i = 0, k = start; i < res.length; i++, k += 4) { var w; if (endian === 'big') w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3]; else w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k]; res[i] = w >>> 0; } return res; } exports.join32 = join32; function split32(msg, endian) { var res = new Array(msg.length * 4); for (var i = 0, k = 0; i < msg.length; i++, k += 4) { var m = msg[i]; if (endian === 'big') { res[k] = m >>> 24; res[k + 1] = (m >>> 16) & 0xff; res[k + 2] = (m >>> 8) & 0xff; res[k + 3] = m & 0xff; } else { res[k + 3] = m >>> 24; res[k + 2] = (m >>> 16) & 0xff; res[k + 1] = (m >>> 8) & 0xff; res[k] = m & 0xff; } } return res; } exports.split32 = split32; function rotr32(w, b) { return (w >>> b) | (w << (32 - b)); } exports.rotr32 = rotr32; function rotl32(w, b) { return (w << b) | (w >>> (32 - b)); } exports.rotl32 = rotl32; function sum32(a, b) { return (a + b) >>> 0; } exports.sum32 = sum32; function sum32_3(a, b, c) { return (a + b + c) >>> 0; } exports.sum32_3 = sum32_3; function sum32_4(a, b, c, d) { return (a + b + c + d) >>> 0; } exports.sum32_4 = sum32_4; function sum32_5(a, b, c, d, e) { return (a + b + c + d + e) >>> 0; } exports.sum32_5 = sum32_5; function sum64(buf, pos, ah, al) { var bh = buf[pos]; var bl = buf[pos + 1]; var lo = (al + bl) >>> 0; var hi = (lo < al ? 1 : 0) + ah + bh; buf[pos] = hi >>> 0; buf[pos + 1] = lo; } exports.sum64 = sum64; function sum64_hi(ah, al, bh, bl) { var lo = (al + bl) >>> 0; var hi = (lo < al ? 1 : 0) + ah + bh; return hi >>> 0; } exports.sum64_hi = sum64_hi; function sum64_lo(ah, al, bh, bl) { var lo = al + bl; return lo >>> 0; } exports.sum64_lo = sum64_lo; function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) { var carry = 0; var lo = al; lo = (lo + bl) >>> 0; carry += lo < al ? 1 : 0; lo = (lo + cl) >>> 0; carry += lo < cl ? 1 : 0; lo = (lo + dl) >>> 0; carry += lo < dl ? 1 : 0; var hi = ah + bh + ch + dh + carry; return hi >>> 0; } exports.sum64_4_hi = sum64_4_hi; function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) { var lo = al + bl + cl + dl; return lo >>> 0; } exports.sum64_4_lo = sum64_4_lo; function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { var carry = 0; var lo = al; lo = (lo + bl) >>> 0; carry += lo < al ? 1 : 0; lo = (lo + cl) >>> 0; carry += lo < cl ? 1 : 0; lo = (lo + dl) >>> 0; carry += lo < dl ? 1 : 0; lo = (lo + el) >>> 0; carry += lo < el ? 1 : 0; var hi = ah + bh + ch + dh + eh + carry; return hi >>> 0; } exports.sum64_5_hi = sum64_5_hi; function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { var lo = al + bl + cl + dl + el; return lo >>> 0; } exports.sum64_5_lo = sum64_5_lo; function rotr64_hi(ah, al, num) { var r = (al << (32 - num)) | (ah >>> num); return r >>> 0; } exports.rotr64_hi = rotr64_hi; function rotr64_lo(ah, al, num) { var r = (ah << (32 - num)) | (al >>> num); return r >>> 0; } exports.rotr64_lo = rotr64_lo; function shr64_hi(ah, al, num) { return ah >>> num; } exports.shr64_hi = shr64_hi; function shr64_lo(ah, al, num) { var r = (ah << (32 - num)) | (al >>> num); return r >>> 0; } exports.shr64_lo = shr64_lo; /***/ }), /* 37 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(126); /***/ }), /* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var stringify = __webpack_require__(143); var parse = __webpack_require__(162); var formats = __webpack_require__(45); module.exports = { formats: formats, parse: parse, stringify: stringify }; /***/ }), /* 39 */, /* 40 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Required = function (_Component) { _inherits(Required, _Component); function Required(props) { _classCallCheck(this, Required); var _this = _possibleConstructorReturn(this, (Required.__proto__ || Object.getPrototypeOf(Required)).call(this, props)); var prefix = !_.isUndefined(_this.props.prefix) ? _this.props.prefix + '_' : ''; _this.requiredProp = prefix + 'required'; _this.requiredValProp = prefix + 'required_message'; _this.requiredCValProp = prefix + 'required_confirm_message'; return _this; } _createClass(Required, [{ key: 'toggleValue', value: function toggleValue(value) { this.props.updateProperty(this.requiredProp, value); } }, { key: 'render', value: function render() { var _this2 = this; var required = _.isUndefined(this.props.state[this.requiredProp]) ? false : this.props.state[this.requiredProp]; var validation = _.isUndefined(this.props.state[this.requiredValProp]) ? '' : this.props.state[this.requiredValProp]; var cValidation = _.isUndefined(this.props.state[this.requiredCValProp]) ? '' : this.props.state[this.requiredCValProp]; var type = _.isUndefined(this.props.state.type) ? '' : this.props.state.type; var isPassword = type === 'password' && !_.isUndefined(this.props.state['confirm-password']) ? this.props.state['confirm-password'] : false; return _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Require'), labelDark: true, description: (0, _utils.translate)('Force users to fill out this field, otherwise it will be optional.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( 'div', { className: 'sui-tabs sui-side-tabs', style: { marginTop: '10px' } }, _react2.default.createElement( 'div', { className: 'sui-tabs-menu' }, _react2.default.createElement( 'div', { className: 'sui-tab-item' + (!required ? ' active' : ''), onClick: this.toggleValue.bind(this, false) }, (0, _utils.translate)('Optional') ), _react2.default.createElement( 'div', { className: 'sui-tab-item' + (required ? ' active' : ''), onClick: this.toggleValue.bind(this, true) }, (0, _utils.translate)('Required') ) ), _react2.default.createElement( 'div', { className: 'sui-tabs-content' }, _react2.default.createElement( 'div', { className: 'sui-tab-boxed' + (required ? ' active' : '') }, _react2.default.createElement( 'div', _extends({ className: 'sui-form-field' }, !isPassword && !(required && type === 'select') && { style: { marginBottom: 0 } }), type === 'password' && _react2.default.createElement( 'label', { htmlFor: 'forminator-field-name-error-msg', className: 'sui-label' }, (0, _utils.translate)('Password error message') ), type !== 'password' && _react2.default.createElement( 'label', { htmlFor: 'forminator-field-name-error-msg', className: 'sui-label' }, (0, _utils.translate)('Error message') ), _react2.default.createElement('input', { type: 'text', value: validation, placeholder: (0, _utils.translate)('Enter required message'), id: 'forminator-field-name-error-msg', className: 'sui-form-control', onChange: function onChange(e) { _this2.props.updateProperty(_this2.requiredValProp, e.target.value); } }) ), isPassword && _react2.default.createElement( 'div', _extends({ className: 'sui-form-field' }, !(required && type === 'select') && { style: { marginBottom: 0 } }), _react2.default.createElement( 'label', { htmlFor: 'forminator-field-name-error-msg', className: 'sui-label' }, (0, _utils.translate)('Confirm Password error message') ), _react2.default.createElement('input', { type: 'text', value: cValidation, placeholder: (0, _utils.translate)('Enter confirm password message'), id: 'forminator-field-name-error-msg', className: 'sui-form-control', onChange: function onChange(e) { _this2.props.updateProperty(_this2.requiredCValProp, e.target.value); } }) ), _react2.default.createElement( 'div', _extends({ role: 'alert', className: 'sui-notice sui-notice-warning ' + (required && type === 'select' ? ' sui-active' : ''), 'aria-live': 'assertive' }, required && type === 'select' && { style: { display: 'block' } }), required && type === 'select' && _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info sui-md', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Options without a value will be treated as empty options') ) ) ) ) ) ) ) ); } }]); return Required; }(_react.Component); exports.default = Required; /***/ }), /* 41 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Checkbox = function (_Component) { _inherits(Checkbox, _Component); function Checkbox(props) { _classCallCheck(this, Checkbox); var _this = _possibleConstructorReturn(this, (Checkbox.__proto__ || Object.getPrototypeOf(Checkbox)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); return _this; } _createClass(Checkbox, [{ key: 'updateValue', value: function updateValue(value) { // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } } }, { key: 'render', value: function render() { var _this2 = this; var value = _.isUndefined(this.props.settings[this.props.property]) ? this.props.defaultValue : this.props.settings[this.props.property]; var fieldId = _.isUndefined(this.props.fieldId) ? this.props.property : this.props.fieldId; var disabled = !_.isUndefined(this.props.disabled) && this.props.disabled ? true : false; var extraClass = ''; if (this.props.itemClass && '' !== this.props.itemClass) { extraClass = ' ' + this.props.itemClass; } return _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + fieldId, className: 'sui-checkbox' + extraClass }, _react2.default.createElement('input', { type: 'checkbox', id: 'forminator-field-' + fieldId, value: 'true', checked: value ? 'checked' : '', disabled: disabled, onChange: function onChange(e) { _this2.updateValue(e.target.checked); } }), _react2.default.createElement('span', { 'aria-hidden': 'true' }), this.props.label && _react2.default.createElement( 'span', null, this.props.label, !_.isUndefined(this.props.tooltip) && '' !== this.props.tooltip && _react2.default.createElement( 'span', { className: 'sui-tooltip sui-tooltip-constrained', style: { marginLeft: 10, verticalAlign: 'middle', '--tooltip-width': '165px' }, 'data-tooltip': this.props.tooltip }, _react2.default.createElement('span', { className: 'sui-icon-info', 'aria-hidden': 'true', style: { pointerEvents: 'none' } }) ) ) ); } }]); return Checkbox; }(_react.Component); exports.default = Checkbox; /***/ }), /* 42 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { var utils = __webpack_require__(13); var normalizeHeaderName = __webpack_require__(129); var DEFAULT_CONTENT_TYPE = { 'Content-Type': 'application/x-www-form-urlencoded' }; function setContentTypeIfUnset(headers, value) { if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { headers['Content-Type'] = value; } } function getDefaultAdapter() { var adapter; if (typeof XMLHttpRequest !== 'undefined') { // For browsers use XHR adapter adapter = __webpack_require__(69); } else if (typeof process !== 'undefined') { // For node use HTTP adapter adapter = __webpack_require__(69); } return adapter; } var defaults = { adapter: getDefaultAdapter(), transformRequest: [function transformRequest(data, headers) { normalizeHeaderName(headers, 'Content-Type'); if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data) ) { return data; } if (utils.isArrayBufferView(data)) { return data.buffer; } if (utils.isURLSearchParams(data)) { setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); return data.toString(); } if (utils.isObject(data)) { setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); return JSON.stringify(data); } return data; }], transformResponse: [function transformResponse(data) { /*eslint no-param-reassign:0*/ if (typeof data === 'string') { try { data = JSON.parse(data); } catch (e) { /* Ignore */ } } return data; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a * timeout is not created. */ timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, validateStatus: function validateStatus(status) { return status >= 200 && status < 300; } }; defaults.headers = { common: { 'Accept': 'application/json, text/plain, */*' } }; utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { defaults.headers[method] = {}; }); utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); }); module.exports = defaults; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 43 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var implementation = __webpack_require__(153); module.exports = Function.prototype.bind || implementation; /***/ }), /* 44 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var GetIntrinsic = __webpack_require__(25); /** @type {import('.')} */ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false; if ($defineProperty) { try { $defineProperty({}, 'a', { value: 1 }); } catch (e) { // IE 8 has a broken defineProperty $defineProperty = false; } } module.exports = $defineProperty; /***/ }), /* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var replace = String.prototype.replace; var percentTwenties = /%20/g; var Format = { RFC1738: 'RFC1738', RFC3986: 'RFC3986' }; module.exports = { 'default': Format.RFC3986, formatters: { RFC1738: function (value) { return replace.call(value, percentTwenties, '+'); }, RFC3986: function (value) { return String(value); } }, RFC1738: Format.RFC1738, RFC3986: Format.RFC3986 }; /***/ }), /* 46 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return Button; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } var _excluded = ["label", "icon", "iconRight", "design", "color", "className", "loading"]; var Button = function Button(_ref) { var label = _ref.label, icon = _ref.icon, iconRight = _ref.iconRight, _ref$design = _ref.design, design = _ref$design === void 0 ? 'solid' : _ref$design, color = _ref.color, className = _ref.className, loading = _ref.loading, props = _objectWithoutProperties(_ref, _excluded); var loader = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span", { className: "sui-icon-loader sui-loading", style: { position: 'relative' }, "aria-hidden": "true" }); var content = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Fragment, null, icon && !iconRight && '' !== icon && /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span", { className: 'sui-icon-' + icon, "aria-hidden": "true" }), label, icon && iconRight && '' !== icon && /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span", { className: 'sui-icon-' + icon, "aria-hidden": "true" })); className = "sui-button".concat(iconRight ? ' sui-button-icon-right' : '').concat(className ? ' ' + className : ''); // Set button color. switch (color) { case 'blue': case 'green': case 'red': case 'orange': case 'purple': case 'yellow': case 'white': className += ' sui-button-' + color; break; case 'gray': default: className += ''; break; } // Set button style. switch (design) { case 'ghost': case 'outlined': className += ' sui-button-' + design; break; case 'solid': default: className += ''; break; } // Set loading class. if (loading) { className += ' sui-button-onload'; } var htmlTag = 'button'; if (props.href) { htmlTag = 'a'; } else if (props.htmlFor) { htmlTag = 'label'; } return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(htmlTag, _objectSpread2({ className: className, disabled: props.disabled || loading }, props), loading ? loader : content); }; /***/ }), /* 47 */ /***/ (function(module, exports, __webpack_require__) { /** * Internal dependencies */ var I18N = __webpack_require__( 87 ), i18n = new I18N(); module.exports = { numberFormat: i18n.numberFormat.bind( i18n ), translate: i18n.translate.bind( i18n ), configure: i18n.configure.bind( i18n ), setLocale: i18n.setLocale.bind( i18n ), getLocale: i18n.getLocale.bind( i18n ), getLocaleSlug: i18n.getLocaleSlug.bind( i18n ), addTranslations: i18n.addTranslations.bind( i18n ), reRenderTranslations: i18n.reRenderTranslations.bind( i18n ), registerComponentUpdateHook: i18n.registerComponentUpdateHook.bind( i18n ), registerTranslateHook: i18n.registerTranslateHook.bind( i18n ), state: i18n.state, stateObserver: i18n.stateObserver, on: i18n.stateObserver.on.bind(i18n.stateObserver), off: i18n.stateObserver.removeListener.bind(i18n.stateObserver), emit: i18n.stateObserver.emit.bind(i18n.stateObserver), localize: __webpack_require__( 107 )( i18n ), $this: i18n, I18N: I18N }; /***/ }), /* 48 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _close = __webpack_require__(63); var _close2 = _interopRequireDefault(_close); var _image = __webpack_require__(214); var _image2 = _interopRequireDefault(_image); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ModalHeader = function (_Component) { _inherits(ModalHeader, _Component); function ModalHeader(props) { _classCallCheck(this, ModalHeader); var _this = _possibleConstructorReturn(this, (ModalHeader.__proto__ || Object.getPrototypeOf(ModalHeader)).call(this, props)); _this.closeModal = _this.props.closeModal.bind(_this); return _this; } _createClass(ModalHeader, [{ key: 'render', value: function render() { var children = _react2.default.Children.map(this.props.children, function (content) { return content; }); var alignment = !_.isUndefined(this.props.alignment) && '' !== this.props.alignment ? this.props.alignment : ''; var flatten = !_.isUndefined(this.props.flatten) && true === this.props.flatten ? true : false; var hasClose = !_.isUndefined(this.props.canClose) && false === this.props.canClose ? false : true; var closeType = !_.isUndefined(this.props.closeType) && '' !== this.props.closeType ? this.props.closeType : ''; // eslint-disable-next-line max-len var closeColor = !_.isUndefined(this.props.closeColor) && '' !== this.props.closeColor ? this.props.closeColor : 'default'; // eslint-disable-next-line max-len var hasImage = !_.isUndefined(this.props.imageName) && '' !== this.props.imageName ? true : false; // eslint-disable-next-line max-len var isLogo = !_.isUndefined(this.props.imageLogo) && true === this.props.imageLogo ? true : false; var hasAlt = !_.isUndefined(this.props.imageAlt) && true === this.props.imageAlt ? this.props.imageAlt : ''; // eslint-disable-next-line max-len var hasClass = !_.isUndefined(this.props.customClass) && '' !== this.props.customClass ? true : false; var elClass = 'sui-box-header'; if ('' !== alignment) { elClass += ' sui-content-' + alignment; } if (true === flatten) { elClass += ' sui-flatten'; } if (true === hasImage) { elClass += ' sui-spacing-top--60'; } if (true === hasClass) { elClass += ' ' + this.props.customClass; } var markup = _react2.default.createElement( 'div', { className: elClass }, true === hasClose && _react2.default.createElement(_close2.default, _extends({ type: closeType, float: 'right', color: closeColor }, hasClose && { closeModal: this.closeModal })), true === hasImage && _react2.default.createElement(_image2.default, { logo: isLogo, filename: this.props.imageName, alt: hasAlt }), children ); if ('center' !== alignment) { markup = _react2.default.createElement( _react2.default.Fragment, null, true === hasClose && _react2.default.createElement(_close2.default, _extends({ sronly: true }, hasClose && { closeModal: this.closeModal })), _react2.default.createElement( 'div', { className: elClass }, true === hasImage && _react2.default.createElement(_image2.default, { logo: isLogo, filename: this.props.imageName, alt: hasAlt }), children, _react2.default.createElement( 'div', { className: 'sui-actions-right' }, true === hasClose && _react2.default.createElement(_close2.default, { type: closeType, color: closeColor, closeModal: this.closeModal }) ) ) ); } return markup; } }]); return ModalHeader; }(_react.Component); exports.default = ModalHeader; /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ModalTitle = function (_Component) { _inherits(ModalTitle, _Component); function ModalTitle(props) { _classCallCheck(this, ModalTitle); return _possibleConstructorReturn(this, (ModalTitle.__proto__ || Object.getPrototypeOf(ModalTitle)).call(this, props)); } _createClass(ModalTitle, [{ key: 'render', value: function render() { var titleId = this.props.id ? 'modal-' + this.props.id + '--title' : 'unique-id-required'; var titleLabel = this.props.label ? this.props.label : 'A title is required for your modals'; var titleTag = !_.isUndefined(this.props.tag) && '' !== this.props.tag ? this.props.tag : ''; // eslint-disable-next-line max-len var titleTagColor = !_.isUndefined(this.props.tagColor) && '' !== this.props.tagColor ? ' sui-tag-' + this.props.tagColor : ''; var titleTagSize = !_.isUndefined(this.props.tagSize) && '' !== this.props.tagSize ? ' sui-tag-' + this.props.tagSize : ''; var titleClass = 'sui-box-title'; if ('lg' === this.props.size) { titleClass += ' sui-lg'; } if (!_.isUndefined(this.props.customClass) && '' !== this.props.customClass) { titleClass += ' ' + this.props.customClass; } return _react2.default.createElement( 'h3', { id: titleId, className: titleClass }, titleLabel, '' !== titleTag && _react2.default.createElement( 'span', { className: 'sui-tag' + titleTagColor + titleTagSize, style: { marginTop: '-2px', marginLeft: '10px' } }, titleTag ) ); } }]); return ModalTitle; }(_react.Component); exports.default = ModalTitle; /***/ }), /* 50 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SuiTags = function (_Component) { _inherits(SuiTags, _Component); function SuiTags(props) { _classCallCheck(this, SuiTags); var _this = _possibleConstructorReturn(this, (SuiTags.__proto__ || Object.getPrototypeOf(SuiTags)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); _this.clearValue = _this.clearValue.bind(_this); var defaultValue = _.isUndefined(_this.props.defaultValue) ? '' : _this.props.defaultValue; var value = _.isUndefined(_this.props.settings[_this.props.property]) ? defaultValue : _this.props.settings[_this.props.property]; _this.state = { value: value }; return _this; } _createClass(SuiTags, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; this.$el = jQuery(this.el); SUI.select.initVars(this.$el); this.updateValue = this.updateValue.bind(this); var isRedirectUrl = this.$el.closest('.sui-form-field').hasClass('redirect-url'); this.clearValue(this.$el); this.$el.on('change', function (e) { var value = _this2.state.value + (isRedirectUrl ? '' : ' ') + e.target.value; _this2.updateValue(value.trim()); }); this.$el.closest('.sui-form-field').hasClass('sui-variables-select-text') && this.insertFormFields(); } }, { key: 'updateValue', value: function updateValue(value) { // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } if (typeof this.props.updateValue === 'function') { this.props.updateValue(this.props.counter, value); } this.setState({ value: value }); } }, { key: 'clearValue', value: function clearValue(element) { element.val(null).trigger('change'); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.$el.off('change', this.updateValue); this.$el.unbind().removeData(); } }, { key: 'isValid', value: function isValid(value) { if (this.props.isRequired) { return this.props.isRequired && !_.isEmpty(value); } else if (!_.isUndefined(this.props.isPositive)) { return _.isEmpty(value) || value >= 0; } return true; } }, { key: 'insertFormFields', value: function insertFormFields() { this.$el.next('.select2-container').find('.select2-selection').html((0, _utils.translate)('+ Insert form fields')); } }, { key: 'render', value: function render() { var _this3 = this; var defaultValue = _.isUndefined(this.props.defaultValue) ? '' : this.props.defaultValue; var value = _.isUndefined(this.props.settings[this.props.property]) ? defaultValue : this.props.settings[this.props.property]; var requiredError = !_.isUndefined(this.props.requiredError) ? this.props.requiredError : (0, _utils.translate)('This field is required!'); var hasErrorClass = !this.isValid(value) ? ' sui-form-field-error' : ''; var hasCustomClass = !_.isUndefined(this.props.customClass) ? ' ' + this.props.customClass : ''; var fieldLabel = ''; var type = 'input'; var textareaClass = ''; if (this.props.type === 'textarea') { type = 'textarea'; textareaClass = 'textarea-type'; } if (this.props.label) { fieldLabel = _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property, className: 'sui-label' }, this.props.label, '\xA0', (this.props.isRequired || this.props.required) && _react2.default.createElement( 'span', { className: 'sui-error' }, ' *' ), this.props.note && _react2.default.createElement( 'span', { className: 'sui-label-note' }, this.props.note ) ); } var fieldControl = _react2.default.createElement( _react2.default.Fragment, null, type === 'input' && _react2.default.createElement('input', { type: 'text', value: this.state.value, placeholder: this.props.placeholder, className: 'sui-form-control', onChange: function onChange(e) { _this3.updateValue(e.target.value); } }), type === 'textarea' && _react2.default.createElement('textarea', { value: this.state.value, placeholder: this.props.placeholder, className: 'sui-form-control', onChange: function onChange(e) { _this3.updateValue(e.target.value); }, rows: this.props.rows }) ); return _react2.default.createElement( 'div', { className: 'sui-form-field' + hasCustomClass + hasErrorClass }, fieldLabel, _react2.default.createElement( 'div', { className: 'sui-insert-variables ' + textareaClass }, fieldControl, _react2.default.createElement( 'select', { className: 'sui-variables', ref: function ref(el) { return _this3.el = el; } }, this.props.children.length <= 0 && _react2.default.createElement('optgroup', { label: (0, _utils.translate)('No available options') }), this.props.children ), this.props.isRequired && !this.isValid(value) && _react2.default.createElement( 'span', { className: 'sui-error-message' }, requiredError ), this.props.description && _react2.default.createElement( 'span', { className: 'sui-description' }, this.props.description ) ) ); } }]); return SuiTags; }(_react.Component); exports.default = SuiTags; /***/ }), /* 51 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { if (process.env.NODE_ENV === 'production') { module.exports = __webpack_require__(81); } else { module.exports = __webpack_require__(83); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 52 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) || (typeof self !== "undefined" && self) || window; var apply = Function.prototype.apply; // DOM APIs, for completeness exports.setTimeout = function() { return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout); }; exports.setInterval = function() { return new Timeout(apply.call(setInterval, scope, arguments), clearInterval); }; exports.clearTimeout = exports.clearInterval = function(timeout) { if (timeout) { timeout.close(); } }; function Timeout(id, clearFn) { this._id = id; this._clearFn = clearFn; } Timeout.prototype.unref = Timeout.prototype.ref = function() {}; Timeout.prototype.close = function() { this._clearFn.call(scope, this._id); }; // Does not start the time, just sets up the members needed. exports.enroll = function(item, msecs) { clearTimeout(item._idleTimeoutId); item._idleTimeout = msecs; }; exports.unenroll = function(item) { clearTimeout(item._idleTimeoutId); item._idleTimeout = -1; }; exports._unrefActive = exports.active = function(item) { clearTimeout(item._idleTimeoutId); var msecs = item._idleTimeout; if (msecs >= 0) { item._idleTimeoutId = setTimeout(function onTimeout() { if (item._onTimeout) item._onTimeout(); }, msecs); } }; // setimmediate attaches itself to the global object __webpack_require__(82); // On some exotic environments, it's not clear which object `setimmediate` was // able to install onto. Search each possibility in the same order as the // `setimmediate` library. exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) || (typeof global !== "undefined" && global.setImmediate) || (this && this.setImmediate); exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) || (typeof global !== "undefined" && global.clearImmediate) || (this && this.clearImmediate); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(30))) /***/ }), /* 53 */ /***/ (function(module, exports) { module.exports = assert; function assert(val, msg) { if (!val) throw new Error(msg || 'Assertion failed'); } assert.equal = function assertEqual(l, r, msg) { if (l != r) throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); }; /***/ }), /* 54 */ /***/ (function(module, exports) { if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }) } }; } else { // old school shim for old browsers module.exports = function inherits(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor var TempCtor = function () {} TempCtor.prototype = superCtor.prototype ctor.prototype = new TempCtor() ctor.prototype.constructor = ctor } } } /***/ }), /* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. var R = typeof Reflect === 'object' ? Reflect : null var ReflectApply = R && typeof R.apply === 'function' ? R.apply : function ReflectApply(target, receiver, args) { return Function.prototype.apply.call(target, receiver, args); } var ReflectOwnKeys if (R && typeof R.ownKeys === 'function') { ReflectOwnKeys = R.ownKeys } else if (Object.getOwnPropertySymbols) { ReflectOwnKeys = function ReflectOwnKeys(target) { return Object.getOwnPropertyNames(target) .concat(Object.getOwnPropertySymbols(target)); }; } else { ReflectOwnKeys = function ReflectOwnKeys(target) { return Object.getOwnPropertyNames(target); }; } function ProcessEmitWarning(warning) { if (console && console.warn) console.warn(warning); } var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { return value !== value; } function EventEmitter() { EventEmitter.init.call(this); } module.exports = EventEmitter; module.exports.once = once; // Backwards-compat with node 0.10.x EventEmitter.EventEmitter = EventEmitter; EventEmitter.prototype._events = undefined; EventEmitter.prototype._eventsCount = 0; EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are // added to it. This is a useful default which helps finding memory leaks. var defaultMaxListeners = 10; function checkListener(listener) { if (typeof listener !== 'function') { throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); } } Object.defineProperty(EventEmitter, 'defaultMaxListeners', { enumerable: true, get: function() { return defaultMaxListeners; }, set: function(arg) { if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); } defaultMaxListeners = arg; } }); EventEmitter.init = function() { if (this._events === undefined || this._events === Object.getPrototypeOf(this)._events) { this._events = Object.create(null); this._eventsCount = 0; } this._maxListeners = this._maxListeners || undefined; }; // Obviously not all Emitters should be limited to 10. This function allows // that to be increased. Set to zero for unlimited. EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); } this._maxListeners = n; return this; }; function _getMaxListeners(that) { if (that._maxListeners === undefined) return EventEmitter.defaultMaxListeners; return that._maxListeners; } EventEmitter.prototype.getMaxListeners = function getMaxListeners() { return _getMaxListeners(this); }; EventEmitter.prototype.emit = function emit(type) { var args = []; for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); var doError = (type === 'error'); var events = this._events; if (events !== undefined) doError = (doError && events.error === undefined); else if (!doError) return false; // If there is no 'error' event listener then throw. if (doError) { var er; if (args.length > 0) er = args[0]; if (er instanceof Error) { // Note: The comments on the `throw` lines are intentional, they show // up in Node's output if this results in an unhandled exception. throw er; // Unhandled 'error' event } // At least give some kind of context to the user var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); err.context = er; throw err; // Unhandled 'error' event } var handler = events[type]; if (handler === undefined) return false; if (typeof handler === 'function') { ReflectApply(handler, this, args); } else { var len = handler.length; var listeners = arrayClone(handler, len); for (var i = 0; i < len; ++i) ReflectApply(listeners[i], this, args); } return true; }; function _addListener(target, type, listener, prepend) { var m; var events; var existing; checkListener(listener); events = target._events; if (events === undefined) { events = target._events = Object.create(null); target._eventsCount = 0; } else { // To avoid recursion in the case that type === "newListener"! Before // adding it to the listeners, first emit "newListener". if (events.newListener !== undefined) { target.emit('newListener', type, listener.listener ? listener.listener : listener); // Re-assign `events` because a newListener handler could have caused the // this._events to be assigned to a new object events = target._events; } existing = events[type]; } if (existing === undefined) { // Optimize the case of one listener. Don't need the extra array object. existing = events[type] = listener; ++target._eventsCount; } else { if (typeof existing === 'function') { // Adding the second element, need to change to array. existing = events[type] = prepend ? [listener, existing] : [existing, listener]; // If we've already got an array, just append. } else if (prepend) { existing.unshift(listener); } else { existing.push(listener); } // Check for listener leak m = _getMaxListeners(target); if (m > 0 && existing.length > m && !existing.warned) { existing.warned = true; // No error code for this since it is a Warning // eslint-disable-next-line no-restricted-syntax var w = new Error('Possible EventEmitter memory leak detected. ' + existing.length + ' ' + String(type) + ' listeners ' + 'added. Use emitter.setMaxListeners() to ' + 'increase limit'); w.name = 'MaxListenersExceededWarning'; w.emitter = target; w.type = type; w.count = existing.length; ProcessEmitWarning(w); } } return target; } EventEmitter.prototype.addListener = function addListener(type, listener) { return _addListener(this, type, listener, false); }; EventEmitter.prototype.on = EventEmitter.prototype.addListener; EventEmitter.prototype.prependListener = function prependListener(type, listener) { return _addListener(this, type, listener, true); }; function onceWrapper() { if (!this.fired) { this.target.removeListener(this.type, this.wrapFn); this.fired = true; if (arguments.length === 0) return this.listener.call(this.target); return this.listener.apply(this.target, arguments); } } function _onceWrap(target, type, listener) { var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; var wrapped = onceWrapper.bind(state); wrapped.listener = listener; state.wrapFn = wrapped; return wrapped; } EventEmitter.prototype.once = function once(type, listener) { checkListener(listener); this.on(type, _onceWrap(this, type, listener)); return this; }; EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) { checkListener(listener); this.prependListener(type, _onceWrap(this, type, listener)); return this; }; // Emits a 'removeListener' event if and only if the listener was removed. EventEmitter.prototype.removeListener = function removeListener(type, listener) { var list, events, position, i, originalListener; checkListener(listener); events = this._events; if (events === undefined) return this; list = events[type]; if (list === undefined) return this; if (list === listener || list.listener === listener) { if (--this._eventsCount === 0) this._events = Object.create(null); else { delete events[type]; if (events.removeListener) this.emit('removeListener', type, list.listener || listener); } } else if (typeof list !== 'function') { position = -1; for (i = list.length - 1; i >= 0; i--) { if (list[i] === listener || list[i].listener === listener) { originalListener = list[i].listener; position = i; break; } } if (position < 0) return this; if (position === 0) list.shift(); else { spliceOne(list, position); } if (list.length === 1) events[type] = list[0]; if (events.removeListener !== undefined) this.emit('removeListener', type, originalListener || listener); } return this; }; EventEmitter.prototype.off = EventEmitter.prototype.removeListener; EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) { var listeners, events, i; events = this._events; if (events === undefined) return this; // not listening for removeListener, no need to emit if (events.removeListener === undefined) { if (arguments.length === 0) { this._events = Object.create(null); this._eventsCount = 0; } else if (events[type] !== undefined) { if (--this._eventsCount === 0) this._events = Object.create(null); else delete events[type]; } return this; } // emit removeListener for all listeners on all events if (arguments.length === 0) { var keys = Object.keys(events); var key; for (i = 0; i < keys.length; ++i) { key = keys[i]; if (key === 'removeListener') continue; this.removeAllListeners(key); } this.removeAllListeners('removeListener'); this._events = Object.create(null); this._eventsCount = 0; return this; } listeners = events[type]; if (typeof listeners === 'function') { this.removeListener(type, listeners); } else if (listeners !== undefined) { // LIFO order for (i = listeners.length - 1; i >= 0; i--) { this.removeListener(type, listeners[i]); } } return this; }; function _listeners(target, type, unwrap) { var events = target._events; if (events === undefined) return []; var evlistener = events[type]; if (evlistener === undefined) return []; if (typeof evlistener === 'function') return unwrap ? [evlistener.listener || evlistener] : [evlistener]; return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); } EventEmitter.prototype.listeners = function listeners(type) { return _listeners(this, type, true); }; EventEmitter.prototype.rawListeners = function rawListeners(type) { return _listeners(this, type, false); }; EventEmitter.listenerCount = function(emitter, type) { if (typeof emitter.listenerCount === 'function') { return emitter.listenerCount(type); } else { return listenerCount.call(emitter, type); } }; EventEmitter.prototype.listenerCount = listenerCount; function listenerCount(type) { var events = this._events; if (events !== undefined) { var evlistener = events[type]; if (typeof evlistener === 'function') { return 1; } else if (evlistener !== undefined) { return evlistener.length; } } return 0; } EventEmitter.prototype.eventNames = function eventNames() { return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; }; function arrayClone(arr, n) { var copy = new Array(n); for (var i = 0; i < n; ++i) copy[i] = arr[i]; return copy; } function spliceOne(list, index) { for (; index + 1 < list.length; index++) list[index] = list[index + 1]; list.pop(); } function unwrapListeners(arr) { var ret = new Array(arr.length); for (var i = 0; i < ret.length; ++i) { ret[i] = arr[i].listener || arr[i]; } return ret; } function once(emitter, name) { return new Promise(function (resolve, reject) { function errorListener(err) { emitter.removeListener(name, resolver); reject(err); } function resolver() { if (typeof emitter.removeListener === 'function') { emitter.removeListener('error', errorListener); } resolve([].slice.call(arguments)); }; eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }); if (name !== 'error') { addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true }); } }); } function addErrorHandlerIfEventEmitter(emitter, handler, flags) { if (typeof emitter.on === 'function') { eventTargetAgnosticAddListener(emitter, 'error', handler, flags); } } function eventTargetAgnosticAddListener(emitter, name, listener, flags) { if (typeof emitter.on === 'function') { if (flags.once) { emitter.once(name, listener); } else { emitter.on(name, listener); } } else if (typeof emitter.addEventListener === 'function') { // EventTarget does not have `error` event semantics like Node // EventEmitters, we do not listen for `error` events here. emitter.addEventListener(name, function wrapListener(arg) { // IE does not have builtin `{ once: true }` support so we // have to do it manually. if (flags.once) { emitter.removeEventListener(name, wrapListener); } listener(arg); }); } else { throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter); } } /***/ }), /* 56 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var printWarning = function() {}; if (process.env.NODE_ENV !== 'production') { var ReactPropTypesSecret = __webpack_require__(99); var loggedTypeFailures = {}; var has = __webpack_require__(100); printWarning = function(text) { var message = 'Warning: ' + text; if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) { /**/ } }; } /** * Assert that the values match with the type specs. * Error messages are memorized and will only be shown once. * * @param {object} typeSpecs Map of name to a ReactPropType * @param {object} values Runtime values that need to be type-checked * @param {string} location e.g. "prop", "context", "child context" * @param {string} componentName Name of the component for error messages. * @param {?Function} getStack Returns the component stack. * @private */ function checkPropTypes(typeSpecs, values, location, componentName, getStack) { if (process.env.NODE_ENV !== 'production') { for (var typeSpecName in typeSpecs) { if (has(typeSpecs, typeSpecName)) { var error; // Prop type validation may throw. In case they do, we don't want to // fail the render phase where it didn't fail before. So we log it. // After these have been cleaned up, we'll let them throw. try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. if (typeof typeSpecs[typeSpecName] !== 'function') { var err = Error( (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.' ); err.name = 'Invariant Violation'; throw err; } error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); } catch (ex) { error = ex; } if (error && !(error instanceof Error)) { printWarning( (componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).' ); } if (error instanceof Error && !(error.message in loggedTypeFailures)) { // Only monitor this failure once because there tends to be a lot of the // same error. loggedTypeFailures[error.message] = true; var stack = getStack ? getStack() : ''; printWarning( 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') ); } } } } } /** * Resets warning cache when testing. * * @private */ checkPropTypes.resetWarningCache = function() { if (process.env.NODE_ENV !== 'production') { loggedTypeFailures = {}; } } module.exports = checkPropTypes; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 57 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ function makeEmptyFunction(arg) { return function () { return arg; }; } /** * This function accepts and discards inputs; it has no side effects. This is * primarily useful idiomatically for overridable function endpoints which * always need to be callable, since JS lacks a null-call idiom ala Cocoa. */ var emptyFunction = function emptyFunction() {}; emptyFunction.thatReturns = makeEmptyFunction; emptyFunction.thatReturnsFalse = makeEmptyFunction(false); emptyFunction.thatReturnsTrue = makeEmptyFunction(true); emptyFunction.thatReturnsNull = makeEmptyFunction(null); emptyFunction.thatReturnsThis = function () { return this; }; emptyFunction.thatReturnsArgument = function (arg) { return arg; }; module.exports = emptyFunction; /***/ }), /* 58 */ /***/ (function(module, exports) { /** * lodash (Custom Build) <https://lodash.com/> * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors <https://jquery.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]'; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object), nativeMax = Math.max; /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { // Safari 8.1 makes `arguments.callee` enumerable in strict mode. // Safari 9 makes `arguments.length` enumerable in strict mode. var result = (isArray(value) || isArguments(value)) ? baseTimes(value.length, String) : []; var length = result.length, skipIndexes = !!length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isIndex(key, length)))) { result.push(key); } } return result; } /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { object[key] = value; } } /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } /** * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ function baseRest(func, start) { start = nativeMax(start === undefined ? (func.length - 1) : start, 0); return function() { var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = array; return apply(func, this, otherArgs); }; } /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; assignValue(object, key, newValue === undefined ? source[key] : newValue); } return object; } /** * Creates a function like `_.assign`. * * @private * @param {Function} assigner The function to assign values. * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; if (guard && isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined : customizer; length = 1; } object = Object(object); while (++index < length) { var source = sources[index]; if (source) { assigner(object, source, index, customizer); } } return object; }); } /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (typeof value == 'number' || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } /** * Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. * @param {*} index The potential iteratee index or key argument. * @param {*} object The potential iteratee object argument. * @returns {boolean} Returns `true` if the arguments are from an iteratee call, * else `false`. */ function isIterateeCall(value, index, object) { if (!isObject(object)) { return false; } var type = typeof index; if (type == 'number' ? (isArrayLike(object) && isIndex(index, object.length)) : (type == 'string' && index in object) ) { return eq(object[index], value); } return false; } /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ function isArguments(value) { // Safari 8.1 makes `arguments.callee` enumerable in strict mode. return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); } /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } /** * This method is like `_.isArrayLike` except that it also checks if `value` * is an object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array-like object, * else `false`. * @example * * _.isArrayLikeObject([1, 2, 3]); * // => true * * _.isArrayLikeObject(document.body.children); * // => true * * _.isArrayLikeObject('abc'); * // => false * * _.isArrayLikeObject(_.noop); * // => false */ function isArrayLikeObject(value) { return isObjectLike(value) && isArrayLike(value); } /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return !!value && (type == 'object' || type == 'function'); } /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return !!value && typeof value == 'object'; } /** * Assigns own enumerable string keyed properties of source objects to the * destination object. Source objects are applied from left to right. * Subsequent sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object` and is loosely based on * [`Object.assign`](https://mdn.io/Object/assign). * * @static * @memberOf _ * @since 0.10.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @see _.assignIn * @example * * function Foo() { * this.a = 1; * } * * function Bar() { * this.c = 3; * } * * Foo.prototype.b = 2; * Bar.prototype.d = 4; * * _.assign({ 'a': 0 }, new Foo, new Bar); * // => { 'a': 1, 'c': 3 } */ var assign = createAssigner(function(object, source) { if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { copyObject(source, keys(source), object); return; } for (var key in source) { if (hasOwnProperty.call(source, key)) { assignValue(object, key, source[key]); } } }); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = assign; /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ModalFooter = function (_Component) { _inherits(ModalFooter, _Component); function ModalFooter(props) { _classCallCheck(this, ModalFooter); return _possibleConstructorReturn(this, (ModalFooter.__proto__ || Object.getPrototypeOf(ModalFooter)).call(this, props)); } _createClass(ModalFooter, [{ key: 'render', value: function render() { var children = _react2.default.Children.map(this.props.children, function (footerChildren) { return footerChildren; }); var alignment = !_.isUndefined(this.props.alignment) && '' !== this.props.alignment ? this.props.alignment : ''; var flatten = !_.isUndefined(this.props.flatten) && true === this.props.flatten ? true : false; // eslint-disable-next-line max-len var hasClass = !_.isUndefined(this.props.customClass) && '' !== this.props.customClass ? true : false; var elClass = 'sui-box-footer'; if (true === flatten) { elClass += ' sui-flatten'; } if ('' !== alignment) { elClass += ' sui-content-' + alignment; } if (true === hasClass) { elClass += ' ' + this.props.customClass; } return _react2.default.createElement( 'div', { className: elClass }, children ); } }]); return ModalFooter; }(_react.Component); exports.default = ModalFooter; /***/ }), /* 60 */, /* 61 */ /***/ (function(module, exports, __webpack_require__) { /*! @license DOMPurify 3.1.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.5/LICENSE */ (function (global, factory) { true ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.DOMPurify = factory()); })(this, (function () { 'use strict'; const { entries, setPrototypeOf, isFrozen, getPrototypeOf, getOwnPropertyDescriptor } = Object; let { freeze, seal, create } = Object; // eslint-disable-line import/no-mutable-exports let { apply, construct } = typeof Reflect !== 'undefined' && Reflect; if (!freeze) { freeze = function freeze(x) { return x; }; } if (!seal) { seal = function seal(x) { return x; }; } if (!apply) { apply = function apply(fun, thisValue, args) { return fun.apply(thisValue, args); }; } if (!construct) { construct = function construct(Func, args) { return new Func(...args); }; } const arrayForEach = unapply(Array.prototype.forEach); const arrayPop = unapply(Array.prototype.pop); const arrayPush = unapply(Array.prototype.push); const stringToLowerCase = unapply(String.prototype.toLowerCase); const stringToString = unapply(String.prototype.toString); const stringMatch = unapply(String.prototype.match); const stringReplace = unapply(String.prototype.replace); const stringIndexOf = unapply(String.prototype.indexOf); const stringTrim = unapply(String.prototype.trim); const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty); const regExpTest = unapply(RegExp.prototype.test); const typeErrorCreate = unconstruct(TypeError); /** * Creates a new function that calls the given function with a specified thisArg and arguments. * * @param {Function} func - The function to be wrapped and called. * @returns {Function} A new function that calls the given function with a specified thisArg and arguments. */ function unapply(func) { return function (thisArg) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } return apply(func, thisArg, args); }; } /** * Creates a new function that constructs an instance of the given constructor function with the provided arguments. * * @param {Function} func - The constructor function to be wrapped and called. * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments. */ function unconstruct(func) { return function () { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } return construct(func, args); }; } /** * Add properties to a lookup table * * @param {Object} set - The set to which elements will be added. * @param {Array} array - The array containing elements to be added to the set. * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set. * @returns {Object} The modified set with added elements. */ function addToSet(set, array) { let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase; if (setPrototypeOf) { // Make 'in' and truthy checks like Boolean(set.constructor) // independent of any properties defined on Object.prototype. // Prevent prototype setters from intercepting set as a this value. setPrototypeOf(set, null); } let l = array.length; while (l--) { let element = array[l]; if (typeof element === 'string') { const lcElement = transformCaseFunc(element); if (lcElement !== element) { // Config presets (e.g. tags.js, attrs.js) are immutable. if (!isFrozen(array)) { array[l] = lcElement; } element = lcElement; } } set[element] = true; } return set; } /** * Clean up an array to harden against CSPP * * @param {Array} array - The array to be cleaned. * @returns {Array} The cleaned version of the array */ function cleanArray(array) { for (let index = 0; index < array.length; index++) { const isPropertyExist = objectHasOwnProperty(array, index); if (!isPropertyExist) { array[index] = null; } } return array; } /** * Shallow clone an object * * @param {Object} object - The object to be cloned. * @returns {Object} A new object that copies the original. */ function clone(object) { const newObject = create(null); for (const [property, value] of entries(object)) { const isPropertyExist = objectHasOwnProperty(object, property); if (isPropertyExist) { if (Array.isArray(value)) { newObject[property] = cleanArray(value); } else if (value && typeof value === 'object' && value.constructor === Object) { newObject[property] = clone(value); } else { newObject[property] = value; } } } return newObject; } /** * This method automatically checks if the prop is function or getter and behaves accordingly. * * @param {Object} object - The object to look up the getter function in its prototype chain. * @param {String} prop - The property name for which to find the getter function. * @returns {Function} The getter function found in the prototype chain or a fallback function. */ function lookupGetter(object, prop) { while (object !== null) { const desc = getOwnPropertyDescriptor(object, prop); if (desc) { if (desc.get) { return unapply(desc.get); } if (typeof desc.value === 'function') { return unapply(desc.value); } } object = getPrototypeOf(object); } function fallbackValue() { return null; } return fallbackValue; } const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']); const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default. // We still need to know them so that we can do namespace // checks properly in case one wants to add them to // allow-list. const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']); const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']); // Similarly to SVG, we want to know all MathML elements, // even those that we disallow by default. const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']); const text = freeze(['#text']); const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']); const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']); const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']); const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']); // eslint-disable-next-line unicorn/better-regex const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm); const TMPLIT_EXPR = seal(/\${[\w\W]*}/gm); const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape ); const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i); const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex ); const DOCTYPE_NAME = seal(/^html$/i); const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i); var EXPRESSIONS = /*#__PURE__*/Object.freeze({ __proto__: null, MUSTACHE_EXPR: MUSTACHE_EXPR, ERB_EXPR: ERB_EXPR, TMPLIT_EXPR: TMPLIT_EXPR, DATA_ATTR: DATA_ATTR, ARIA_ATTR: ARIA_ATTR, IS_ALLOWED_URI: IS_ALLOWED_URI, IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA, ATTR_WHITESPACE: ATTR_WHITESPACE, DOCTYPE_NAME: DOCTYPE_NAME, CUSTOM_ELEMENT: CUSTOM_ELEMENT }); // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType const NODE_TYPE = { element: 1, attribute: 2, text: 3, cdataSection: 4, entityReference: 5, // Deprecated entityNode: 6, // Deprecated progressingInstruction: 7, comment: 8, document: 9, documentType: 10, documentFragment: 11, notation: 12 // Deprecated }; const getGlobal = function getGlobal() { return typeof window === 'undefined' ? null : window; }; /** * Creates a no-op policy for internal use only. * Don't export this function outside this module! * @param {TrustedTypePolicyFactory} trustedTypes The policy factory. * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix). * @return {TrustedTypePolicy} The policy created (or null, if Trusted Types * are not supported or creating the policy failed). */ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) { if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') { return null; } // Allow the callers to control the unique policy name // by adding a data-tt-policy-suffix to the script element with the DOMPurify. // Policy creation with duplicate names throws in Trusted Types. let suffix = null; const ATTR_NAME = 'data-tt-policy-suffix'; if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) { suffix = purifyHostElement.getAttribute(ATTR_NAME); } const policyName = 'dompurify' + (suffix ? '#' + suffix : ''); try { return trustedTypes.createPolicy(policyName, { createHTML(html) { return html; }, createScriptURL(scriptUrl) { return scriptUrl; } }); } catch (_) { // Policy creation failed (most likely another DOMPurify script has // already run). Skip creating the policy, as this will only cause errors // if TT are enforced. console.warn('TrustedTypes policy ' + policyName + ' could not be created.'); return null; } }; function createDOMPurify() { let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal(); const DOMPurify = root => createDOMPurify(root); /** * Version label, exposed for easier checks * if DOMPurify is up to date or not */ DOMPurify.version = '3.1.5'; /** * Array of elements that DOMPurify removed during sanitation. * Empty if nothing was removed. */ DOMPurify.removed = []; if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) { // Not running in a browser, provide a factory function // so that you can pass your own Window DOMPurify.isSupported = false; return DOMPurify; } let { document } = window; const originalDocument = document; const currentScript = originalDocument.currentScript; const { DocumentFragment, HTMLTemplateElement, Node, Element, NodeFilter, NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap, HTMLFormElement, DOMParser, trustedTypes } = window; const ElementPrototype = Element.prototype; const cloneNode = lookupGetter(ElementPrototype, 'cloneNode'); const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling'); const getChildNodes = lookupGetter(ElementPrototype, 'childNodes'); const getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a // new document created via createHTMLDocument. As per the spec // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries) // a new empty registry is used when creating a template contents owner // document, so we use that as our parent document to ensure nothing // is inherited. if (typeof HTMLTemplateElement === 'function') { const template = document.createElement('template'); if (template.content && template.content.ownerDocument) { document = template.content.ownerDocument; } } let trustedTypesPolicy; let emptyHTML = ''; const { implementation, createNodeIterator, createDocumentFragment, getElementsByTagName } = document; const { importNode } = originalDocument; let hooks = {}; /** * Expose whether this browser supports running the full DOMPurify. */ DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined; const { MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR, DATA_ATTR, ARIA_ATTR, IS_SCRIPT_OR_DATA, ATTR_WHITESPACE, CUSTOM_ELEMENT } = EXPRESSIONS; let { IS_ALLOWED_URI: IS_ALLOWED_URI$1 } = EXPRESSIONS; /** * We consider the elements and attributes below to be safe. Ideally * don't add any new ones but feel free to remove unwanted ones. */ /* allowed element names */ let ALLOWED_TAGS = null; const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]); /* Allowed attribute names */ let ALLOWED_ATTR = null; const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]); /* * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements. * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements) * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list) * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`. */ let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, { tagNameCheck: { writable: true, configurable: false, enumerable: true, value: null }, attributeNameCheck: { writable: true, configurable: false, enumerable: true, value: null }, allowCustomizedBuiltInElements: { writable: true, configurable: false, enumerable: true, value: false } })); /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */ let FORBID_TAGS = null; /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */ let FORBID_ATTR = null; /* Decide if ARIA attributes are okay */ let ALLOW_ARIA_ATTR = true; /* Decide if custom data attributes are okay */ let ALLOW_DATA_ATTR = true; /* Decide if unknown protocols are okay */ let ALLOW_UNKNOWN_PROTOCOLS = false; /* Decide if self-closing tags in attributes are allowed. * Usually removed due to a mXSS issue in jQuery 3.0 */ let ALLOW_SELF_CLOSE_IN_ATTR = true; /* Output should be safe for common template engines. * This means, DOMPurify removes data attributes, mustaches and ERB */ let SAFE_FOR_TEMPLATES = false; /* Output should be safe even for XML used within HTML and alike. * This means, DOMPurify removes comments when containing risky content. */ let SAFE_FOR_XML = true; /* Decide if document with <html>... should be returned */ let WHOLE_DOCUMENT = false; /* Track whether config is already set on this instance of DOMPurify. */ let SET_CONFIG = false; /* Decide if all elements (e.g. style, script) must be children of * document.body. By default, browsers might move them to document.head */ let FORCE_BODY = false; /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html * string (or a TrustedHTML object if Trusted Types are supported). * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead */ let RETURN_DOM = false; /* Decide if a DOM `DocumentFragment` should be returned, instead of a html * string (or a TrustedHTML object if Trusted Types are supported) */ let RETURN_DOM_FRAGMENT = false; /* Try to return a Trusted Type object instead of a string, return a string in * case Trusted Types are not supported */ let RETURN_TRUSTED_TYPE = false; /* Output should be free from DOM clobbering attacks? * This sanitizes markups named with colliding, clobberable built-in DOM APIs. */ let SANITIZE_DOM = true; /* Achieve full DOM Clobbering protection by isolating the namespace of named * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules. * * HTML/DOM spec rules that enable DOM Clobbering: * - Named Access on Window (§7.3.3) * - DOM Tree Accessors (§3.1.5) * - Form Element Parent-Child Relations (§4.10.3) * - Iframe srcdoc / Nested WindowProxies (§4.8.5) * - HTMLCollection (§4.2.10.2) * * Namespace isolation is implemented by prefixing `id` and `name` attributes * with a constant string, i.e., `user-content-` */ let SANITIZE_NAMED_PROPS = false; const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-'; /* Keep element content when removing element? */ let KEEP_CONTENT = true; /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead * of importing it into a new Document and returning a sanitized copy */ let IN_PLACE = false; /* Allow usage of profiles like html, svg and mathMl */ let USE_PROFILES = {}; /* Tags to ignore content of when KEEP_CONTENT is true */ let FORBID_CONTENTS = null; const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']); /* Tags that are safe for data: URIs */ let DATA_URI_TAGS = null; const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']); /* Attributes safe for values like "javascript:" */ let URI_SAFE_ATTRIBUTES = null; const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']); const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; const SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'; /* Document namespace */ let NAMESPACE = HTML_NAMESPACE; let IS_EMPTY_INPUT = false; /* Allowed XHTML+XML namespaces */ let ALLOWED_NAMESPACES = null; const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString); /* Parsing of strict XHTML documents */ let PARSER_MEDIA_TYPE = null; const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html']; const DEFAULT_PARSER_MEDIA_TYPE = 'text/html'; let transformCaseFunc = null; /* Keep a reference to config to pass to hooks */ let CONFIG = null; /* Ideally, do not touch anything below this line */ /* ______________________________________________ */ const formElement = document.createElement('form'); const isRegexOrFunction = function isRegexOrFunction(testValue) { return testValue instanceof RegExp || testValue instanceof Function; }; /** * _parseConfig * * @param {Object} cfg optional config literal */ // eslint-disable-next-line complexity const _parseConfig = function _parseConfig() { let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; if (CONFIG && CONFIG === cfg) { return; } /* Shield configuration object from tampering */ if (!cfg || typeof cfg !== 'object') { cfg = {}; } /* Shield configuration object from prototype pollution */ cfg = clone(cfg); PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is. transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase; /* Set configuration parameters */ ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS; ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR; ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES; URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent transformCaseFunc // eslint-disable-line indent ) // eslint-disable-line indent : DEFAULT_URI_SAFE_ATTRIBUTES; DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent transformCaseFunc // eslint-disable-line indent ) // eslint-disable-line indent : DEFAULT_DATA_URI_TAGS; FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS; FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {}; FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {}; USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false; ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false RETURN_DOM = cfg.RETURN_DOM || false; // Default false RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false FORCE_BODY = cfg.FORCE_BODY || false; // Default false SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true IN_PLACE = cfg.IN_PLACE || false; // Default false IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI; NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE; CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {}; if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) { CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck; } if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) { CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck; } if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') { CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements; } if (SAFE_FOR_TEMPLATES) { ALLOW_DATA_ATTR = false; } if (RETURN_DOM_FRAGMENT) { RETURN_DOM = true; } /* Parse profile info */ if (USE_PROFILES) { ALLOWED_TAGS = addToSet({}, text); ALLOWED_ATTR = []; if (USE_PROFILES.html === true) { addToSet(ALLOWED_TAGS, html$1); addToSet(ALLOWED_ATTR, html); } if (USE_PROFILES.svg === true) { addToSet(ALLOWED_TAGS, svg$1); addToSet(ALLOWED_ATTR, svg); addToSet(ALLOWED_ATTR, xml); } if (USE_PROFILES.svgFilters === true) { addToSet(ALLOWED_TAGS, svgFilters); addToSet(ALLOWED_ATTR, svg); addToSet(ALLOWED_ATTR, xml); } if (USE_PROFILES.mathMl === true) { addToSet(ALLOWED_TAGS, mathMl$1); addToSet(ALLOWED_ATTR, mathMl); addToSet(ALLOWED_ATTR, xml); } } /* Merge configuration parameters */ if (cfg.ADD_TAGS) { if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) { ALLOWED_TAGS = clone(ALLOWED_TAGS); } addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc); } if (cfg.ADD_ATTR) { if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) { ALLOWED_ATTR = clone(ALLOWED_ATTR); } addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc); } if (cfg.ADD_URI_SAFE_ATTR) { addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc); } if (cfg.FORBID_CONTENTS) { if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) { FORBID_CONTENTS = clone(FORBID_CONTENTS); } addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc); } /* Add #text in case KEEP_CONTENT is set to true */ if (KEEP_CONTENT) { ALLOWED_TAGS['#text'] = true; } /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */ if (WHOLE_DOCUMENT) { addToSet(ALLOWED_TAGS, ['html', 'head', 'body']); } /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */ if (ALLOWED_TAGS.table) { addToSet(ALLOWED_TAGS, ['tbody']); delete FORBID_TAGS.tbody; } if (cfg.TRUSTED_TYPES_POLICY) { if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') { throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.'); } if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') { throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.'); } // Overwrite existing TrustedTypes policy. trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY; // Sign local variables required by `sanitize`. emptyHTML = trustedTypesPolicy.createHTML(''); } else { // Uninitialized policy, attempt to initialize the internal dompurify policy. if (trustedTypesPolicy === undefined) { trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript); } // If creating the internal policy succeeded sign internal variables. if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') { emptyHTML = trustedTypesPolicy.createHTML(''); } } // Prevent further manipulation of configuration. // Not available in IE8, Safari 5, etc. if (freeze) { freeze(cfg); } CONFIG = cfg; }; const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']); const HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML // namespace. We need to specify them explicitly // so that they don't get erroneously deleted from // HTML namespace. const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']); /* Keep track of all possible SVG and MathML tags * so that we can perform the namespace checks * correctly. */ const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]); const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]); /** * @param {Element} element a DOM element whose namespace is being checked * @returns {boolean} Return false if the element has a * namespace that a spec-compliant parser would never * return. Return true otherwise. */ const _checkValidNamespace = function _checkValidNamespace(element) { let parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode // can be null. We just simulate parent in this case. if (!parent || !parent.tagName) { parent = { namespaceURI: NAMESPACE, tagName: 'template' }; } const tagName = stringToLowerCase(element.tagName); const parentTagName = stringToLowerCase(parent.tagName); if (!ALLOWED_NAMESPACES[element.namespaceURI]) { return false; } if (element.namespaceURI === SVG_NAMESPACE) { // The only way to switch from HTML namespace to SVG // is via <svg>. If it happens via any other tag, then // it should be killed. if (parent.namespaceURI === HTML_NAMESPACE) { return tagName === 'svg'; } // The only way to switch from MathML to SVG is via` // svg if parent is either <annotation-xml> or MathML // text integration points. if (parent.namespaceURI === MATHML_NAMESPACE) { return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]); } // We only allow elements that are defined in SVG // spec. All others are disallowed in SVG namespace. return Boolean(ALL_SVG_TAGS[tagName]); } if (element.namespaceURI === MATHML_NAMESPACE) { // The only way to switch from HTML namespace to MathML // is via <math>. If it happens via any other tag, then // it should be killed. if (parent.namespaceURI === HTML_NAMESPACE) { return tagName === 'math'; } // The only way to switch from SVG to MathML is via // <math> and HTML integration points if (parent.namespaceURI === SVG_NAMESPACE) { return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName]; } // We only allow elements that are defined in MathML // spec. All others are disallowed in MathML namespace. return Boolean(ALL_MATHML_TAGS[tagName]); } if (element.namespaceURI === HTML_NAMESPACE) { // The only way to switch from SVG to HTML is via // HTML integration points, and from MathML to HTML // is via MathML text integration points if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) { return false; } if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) { return false; } // We disallow tags that are specific for MathML // or SVG and should never appear in HTML namespace return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]); } // For XHTML and XML documents that support custom namespaces if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) { return true; } // The code should never reach this place (this means // that the element somehow got namespace that is not // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES). // Return false just in case. return false; }; /** * _forceRemove * * @param {Node} node a DOM node */ const _forceRemove = function _forceRemove(node) { arrayPush(DOMPurify.removed, { element: node }); try { // eslint-disable-next-line unicorn/prefer-dom-node-remove node.parentNode.removeChild(node); } catch (_) { node.remove(); } }; /** * _removeAttribute * * @param {String} name an Attribute name * @param {Node} node a DOM node */ const _removeAttribute = function _removeAttribute(name, node) { try { arrayPush(DOMPurify.removed, { attribute: node.getAttributeNode(name), from: node }); } catch (_) { arrayPush(DOMPurify.removed, { attribute: null, from: node }); } node.removeAttribute(name); // We void attribute values for unremovable "is"" attributes if (name === 'is' && !ALLOWED_ATTR[name]) { if (RETURN_DOM || RETURN_DOM_FRAGMENT) { try { _forceRemove(node); } catch (_) {} } else { try { node.setAttribute(name, ''); } catch (_) {} } } }; /** * _initDocument * * @param {String} dirty a string of dirty markup * @return {Document} a DOM, filled with the dirty markup */ const _initDocument = function _initDocument(dirty) { /* Create a HTML document */ let doc = null; let leadingWhitespace = null; if (FORCE_BODY) { dirty = '<remove></remove>' + dirty; } else { /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */ const matches = stringMatch(dirty, /^[\r\n\t ]+/); leadingWhitespace = matches && matches[0]; } if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) { // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict) dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>'; } const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty; /* * Use the DOMParser API by default, fallback later if needs be * DOMParser not work for svg when has multiple root element. */ if (NAMESPACE === HTML_NAMESPACE) { try { doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE); } catch (_) {} } /* Use createHTMLDocument in case DOMParser is not available */ if (!doc || !doc.documentElement) { doc = implementation.createDocument(NAMESPACE, 'template', null); try { doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload; } catch (_) { // Syntax error if dirtyPayload is invalid xml } } const body = doc.body || doc.documentElement; if (dirty && leadingWhitespace) { body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null); } /* Work on whole document or just its body */ if (NAMESPACE === HTML_NAMESPACE) { return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0]; } return WHOLE_DOCUMENT ? doc.documentElement : body; }; /** * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document. * * @param {Node} root The root element or node to start traversing on. * @return {NodeIterator} The created NodeIterator */ const _createNodeIterator = function _createNodeIterator(root) { return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null); }; /** * _isClobbered * * @param {Node} elm element to check for clobbering attacks * @return {Boolean} true if clobbered, false if safe */ const _isClobbered = function _isClobbered(elm) { return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function'); }; /** * Checks whether the given object is a DOM node. * * @param {Node} object object to check whether it's a DOM node * @return {Boolean} true is object is a DOM node */ const _isNode = function _isNode(object) { return typeof Node === 'function' && object instanceof Node; }; /** * _executeHook * Execute user configurable hooks * * @param {String} entryPoint Name of the hook's entry point * @param {Node} currentNode node to work on with the hook * @param {Object} data additional hook parameters */ const _executeHook = function _executeHook(entryPoint, currentNode, data) { if (!hooks[entryPoint]) { return; } arrayForEach(hooks[entryPoint], hook => { hook.call(DOMPurify, currentNode, data, CONFIG); }); }; /** * _sanitizeElements * * @protect nodeName * @protect textContent * @protect removeChild * * @param {Node} currentNode to check for permission to exist * @return {Boolean} true if node was killed, false if left alive */ const _sanitizeElements = function _sanitizeElements(currentNode) { let content = null; /* Execute a hook if present */ _executeHook('beforeSanitizeElements', currentNode, null); /* Check if element is clobbered or can clobber */ if (_isClobbered(currentNode)) { _forceRemove(currentNode); return true; } /* Now let's check the element's type and name */ const tagName = transformCaseFunc(currentNode.nodeName); /* Execute a hook if present */ _executeHook('uponSanitizeElement', currentNode, { tagName, allowedTags: ALLOWED_TAGS }); /* Detect mXSS attempts abusing namespace confusion */ if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) { _forceRemove(currentNode); return true; } /* Remove any ocurrence of processing instructions */ if (currentNode.nodeType === NODE_TYPE.progressingInstruction) { _forceRemove(currentNode); return true; } /* Remove any kind of possibly harmful comments */ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) { _forceRemove(currentNode); return true; } /* Remove element if anything forbids its presence */ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) { /* Check if we have a custom element to handle */ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) { if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) { return false; } if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) { return false; } } /* Keep content except for bad-listed elements */ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) { const parentNode = getParentNode(currentNode) || currentNode.parentNode; const childNodes = getChildNodes(currentNode) || currentNode.childNodes; if (childNodes && parentNode) { const childCount = childNodes.length; for (let i = childCount - 1; i >= 0; --i) { const childClone = cloneNode(childNodes[i], true); childClone.__removalCount = (currentNode.__removalCount || 0) + 1; parentNode.insertBefore(childClone, getNextSibling(currentNode)); } } } _forceRemove(currentNode); return true; } /* Check whether element has a valid namespace */ if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) { _forceRemove(currentNode); return true; } /* Make sure that older browsers don't get fallback-tag mXSS */ if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) { _forceRemove(currentNode); return true; } /* Sanitize element content to be template-safe */ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) { /* Get the element's text content */ content = currentNode.textContent; arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => { content = stringReplace(content, expr, ' '); }); if (currentNode.textContent !== content) { arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() }); currentNode.textContent = content; } } /* Execute a hook if present */ _executeHook('afterSanitizeElements', currentNode, null); return false; }; /** * _isValidAttribute * * @param {string} lcTag Lowercase tag name of containing element. * @param {string} lcName Lowercase attribute name. * @param {string} value Attribute value. * @return {Boolean} Returns true if `value` is valid, otherwise false. */ // eslint-disable-next-line complexity const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) { /* Make sure attribute cannot clobber */ if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) { return false; } /* Allow valid data-* attributes: At least one character after "-" (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes) XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804) We don't need to check the value; it's always URI safe. */ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) { if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else { return false; } /* Check value is safe. First, is attr inert? If so, is safe */ } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) { return false; } else ; return true; }; /** * _isBasicCustomElement * checks if at least one dash is included in tagName, and it's not the first char * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name * * @param {string} tagName name of the tag of the node to sanitize * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false. */ const _isBasicCustomElement = function _isBasicCustomElement(tagName) { return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT); }; /** * _sanitizeAttributes * * @protect attributes * @protect nodeName * @protect removeAttribute * @protect setAttribute * * @param {Node} currentNode to sanitize */ const _sanitizeAttributes = function _sanitizeAttributes(currentNode) { /* Execute a hook if present */ _executeHook('beforeSanitizeAttributes', currentNode, null); const { attributes } = currentNode; /* Check if we have attributes; if not we might have a text node */ if (!attributes) { return; } const hookEvent = { attrName: '', attrValue: '', keepAttr: true, allowedAttributes: ALLOWED_ATTR }; let l = attributes.length; /* Go backwards over all attributes; safely remove bad ones */ while (l--) { const attr = attributes[l]; const { name, namespaceURI, value: attrValue } = attr; const lcName = transformCaseFunc(name); let value = name === 'value' ? attrValue : stringTrim(attrValue); /* Execute a hook if present */ hookEvent.attrName = lcName; hookEvent.attrValue = value; hookEvent.keepAttr = true; hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set _executeHook('uponSanitizeAttribute', currentNode, hookEvent); value = hookEvent.attrValue; /* Did the hooks approve of the attribute? */ if (hookEvent.forceKeepAttr) { continue; } /* Remove attribute */ _removeAttribute(name, currentNode); /* Did the hooks approve of the attribute? */ if (!hookEvent.keepAttr) { continue; } /* Work around a security issue in jQuery 3.0 */ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) { _removeAttribute(name, currentNode); continue; } /* Work around a security issue with comments inside attributes */ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) { _removeAttribute(name, currentNode); continue; } /* Sanitize attribute content to be template-safe */ if (SAFE_FOR_TEMPLATES) { arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => { value = stringReplace(value, expr, ' '); }); } /* Is `value` valid for this attribute? */ const lcTag = transformCaseFunc(currentNode.nodeName); if (!_isValidAttribute(lcTag, lcName, value)) { continue; } /* Full DOM Clobbering protection via namespace isolation, * Prefix id and name attributes with `user-content-` */ if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) { // Remove the attribute with this value _removeAttribute(name, currentNode); // Prefix the value and later re-create the attribute with the sanitized value value = SANITIZE_NAMED_PROPS_PREFIX + value; } /* Handle attributes that require Trusted Types */ if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') { if (namespaceURI) ; else { switch (trustedTypes.getAttributeType(lcTag, lcName)) { case 'TrustedHTML': { value = trustedTypesPolicy.createHTML(value); break; } case 'TrustedScriptURL': { value = trustedTypesPolicy.createScriptURL(value); break; } } } } /* Handle invalid data-* attribute set by try-catching it */ try { if (namespaceURI) { currentNode.setAttributeNS(namespaceURI, name, value); } else { /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */ currentNode.setAttribute(name, value); } if (_isClobbered(currentNode)) { _forceRemove(currentNode); } else { arrayPop(DOMPurify.removed); } } catch (_) {} } /* Execute a hook if present */ _executeHook('afterSanitizeAttributes', currentNode, null); }; /** * _sanitizeShadowDOM * * @param {DocumentFragment} fragment to iterate over recursively */ const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) { let shadowNode = null; const shadowIterator = _createNodeIterator(fragment); /* Execute a hook if present */ _executeHook('beforeSanitizeShadowDOM', fragment, null); while (shadowNode = shadowIterator.nextNode()) { /* Execute a hook if present */ _executeHook('uponSanitizeShadowNode', shadowNode, null); /* Sanitize tags and elements */ if (_sanitizeElements(shadowNode)) { continue; } /* Deep shadow DOM detected */ if (shadowNode.content instanceof DocumentFragment) { _sanitizeShadowDOM(shadowNode.content); } /* Check attributes, sanitize if necessary */ _sanitizeAttributes(shadowNode); } /* Execute a hook if present */ _executeHook('afterSanitizeShadowDOM', fragment, null); }; /** * Sanitize * Public method providing core sanitation functionality * * @param {String|Node} dirty string or DOM node * @param {Object} cfg object */ // eslint-disable-next-line complexity DOMPurify.sanitize = function (dirty) { let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; let body = null; let importedNode = null; let currentNode = null; let returnNode = null; /* Make sure we have a string to sanitize. DO NOT return early, as this will return the wrong type if the user has requested a DOM object rather than a string */ IS_EMPTY_INPUT = !dirty; if (IS_EMPTY_INPUT) { dirty = '<!-->'; } /* Stringify, in case dirty is an object */ if (typeof dirty !== 'string' && !_isNode(dirty)) { if (typeof dirty.toString === 'function') { dirty = dirty.toString(); if (typeof dirty !== 'string') { throw typeErrorCreate('dirty is not a string, aborting'); } } else { throw typeErrorCreate('toString is not a function'); } } /* Return dirty HTML if DOMPurify cannot run */ if (!DOMPurify.isSupported) { return dirty; } /* Assign config vars */ if (!SET_CONFIG) { _parseConfig(cfg); } /* Clean up removed elements */ DOMPurify.removed = []; /* Check if dirty is correctly typed for IN_PLACE */ if (typeof dirty === 'string') { IN_PLACE = false; } if (IN_PLACE) { /* Do some early pre-sanitization to avoid unsafe root nodes */ if (dirty.nodeName) { const tagName = transformCaseFunc(dirty.nodeName); if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) { throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place'); } } } else if (dirty instanceof Node) { /* If dirty is a DOM element, append to an empty document to avoid elements being stripped by the parser */ body = _initDocument('<!---->'); importedNode = body.ownerDocument.importNode(dirty, true); if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') { /* Node is already a body, use as is */ body = importedNode; } else if (importedNode.nodeName === 'HTML') { body = importedNode; } else { // eslint-disable-next-line unicorn/prefer-dom-node-append body.appendChild(importedNode); } } else { /* Exit directly if we have nothing to do */ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes dirty.indexOf('<') === -1) { return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty; } /* Initialize the document to work on */ body = _initDocument(dirty); /* Check we have a DOM node from the data */ if (!body) { return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : ''; } } /* Remove first element node (ours) if FORCE_BODY is set */ if (body && FORCE_BODY) { _forceRemove(body.firstChild); } /* Get node iterator */ const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body); /* Now start iterating over the created document */ while (currentNode = nodeIterator.nextNode()) { /* Sanitize tags and elements */ if (_sanitizeElements(currentNode)) { continue; } /* Shadow DOM detected, sanitize it */ if (currentNode.content instanceof DocumentFragment) { _sanitizeShadowDOM(currentNode.content); } /* Check attributes, sanitize if necessary */ _sanitizeAttributes(currentNode); } /* If we sanitized `dirty` in-place, return it. */ if (IN_PLACE) { return dirty; } /* Return sanitized string or DOM */ if (RETURN_DOM) { if (RETURN_DOM_FRAGMENT) { returnNode = createDocumentFragment.call(body.ownerDocument); while (body.firstChild) { // eslint-disable-next-line unicorn/prefer-dom-node-append returnNode.appendChild(body.firstChild); } } else { returnNode = body; } if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) { /* AdoptNode() is not used because internal state is not reset (e.g. the past names map of a HTMLFormElement), this is safe in theory but we would rather not risk another attack vector. The state that is cloned by importNode() is explicitly defined by the specs. */ returnNode = importNode.call(originalDocument, returnNode, true); } return returnNode; } let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML; /* Serialize doctype if allowed */ if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) { serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML; } /* Sanitize final string template-safe */ if (SAFE_FOR_TEMPLATES) { arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => { serializedHTML = stringReplace(serializedHTML, expr, ' '); }); } return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML; }; /** * Public method to set the configuration once * setConfig * * @param {Object} cfg configuration object */ DOMPurify.setConfig = function () { let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; _parseConfig(cfg); SET_CONFIG = true; }; /** * Public method to remove the configuration * clearConfig * */ DOMPurify.clearConfig = function () { CONFIG = null; SET_CONFIG = false; }; /** * Public method to check if an attribute value is valid. * Uses last set config, if any. Otherwise, uses config defaults. * isValidAttribute * * @param {String} tag Tag name of containing element. * @param {String} attr Attribute name. * @param {String} value Attribute value. * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false. */ DOMPurify.isValidAttribute = function (tag, attr, value) { /* Initialize shared config vars if necessary. */ if (!CONFIG) { _parseConfig({}); } const lcTag = transformCaseFunc(tag); const lcName = transformCaseFunc(attr); return _isValidAttribute(lcTag, lcName, value); }; /** * AddHook * Public method to add DOMPurify hooks * * @param {String} entryPoint entry point for the hook to add * @param {Function} hookFunction function to execute */ DOMPurify.addHook = function (entryPoint, hookFunction) { if (typeof hookFunction !== 'function') { return; } hooks[entryPoint] = hooks[entryPoint] || []; arrayPush(hooks[entryPoint], hookFunction); }; /** * RemoveHook * Public method to remove a DOMPurify hook at a given entryPoint * (pops it from the stack of hooks if more are present) * * @param {String} entryPoint entry point for the hook to remove * @return {Function} removed(popped) hook */ DOMPurify.removeHook = function (entryPoint) { if (hooks[entryPoint]) { return arrayPop(hooks[entryPoint]); } }; /** * RemoveHooks * Public method to remove all DOMPurify hooks at a given entryPoint * * @param {String} entryPoint entry point for the hooks to remove */ DOMPurify.removeHooks = function (entryPoint) { if (hooks[entryPoint]) { hooks[entryPoint] = []; } }; /** * RemoveAllHooks * Public method to remove all DOMPurify hooks */ DOMPurify.removeAllHooks = function () { hooks = {}; }; return DOMPurify; } var purify = createDOMPurify(); return purify; })); //# sourceMappingURL=purify.js.map /***/ }), /* 62 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var showModal = exports.showModal = function showModal(modalProps, modalType) { return function (dispatch) { dispatch({ type: 'SHOW_MODAL', modalProps: modalProps, modalType: modalType }); }; }; var hideModal = exports.hideModal = function hideModal() { return function (dispatch) { dispatch({ type: 'HIDE_MODAL' }); }; }; /***/ }), /* 63 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ModalClose = function (_Component) { _inherits(ModalClose, _Component); function ModalClose(props) { _classCallCheck(this, ModalClose); var _this = _possibleConstructorReturn(this, (ModalClose.__proto__ || Object.getPrototypeOf(ModalClose)).call(this, props)); _this.closeModal = _this.props.closeModal.bind(_this); return _this; } _createClass(ModalClose, [{ key: 'render', value: function render() { var label = !_.isUndefined(this.props.label) && '' !== this.props.label ? this.props.label : (0, _utils.translate)('Close this dialog'); var color = !_.isUndefined(this.props.color) && '' !== this.props.color ? this.props.color : ''; var isIcon = !_.isUndefined(this.props.type) && 'icon' === this.props.type ? true : false; var isHidden = !_.isUndefined(this.props.sronly) && true === this.props.sronly ? true : false; var hasIcon = !_.isUndefined(this.props.icon) && '' !== this.props.icon ? true : false; var floatsLeft = !_.isUndefined(this.props.float) && 'left' === this.props.float ? true : false; var floatsRight = !_.isUndefined(this.props.float) && 'right' === this.props.float ? true : false; // eslint-disable-next-line max-len var hasCustomClass = !_.isUndefined(this.props.customClass) && '' !== this.props.customClass ? true : false; var elClass = 'sui-button'; if (true === isHidden) { elClass = 'sui-screen-reader-text'; } else if (false === isHidden && true === isIcon) { elClass = 'sui-button-icon'; } if (false === isHidden && '' !== color) { elClass += ' sui-button-' + color; } if (false === isHidden && (true === floatsLeft || true === floatsRight)) { elClass += ' sui-button-float--' + this.props.float; } if (true === hasCustomClass) { elClass += ' ' + this.props.customClass; } elClass += ' modal-close-button'; return _react2.default.createElement( 'button', { className: elClass, onClick: this.closeModal }, true === isIcon && _react2.default.createElement('i', { className: 'sui-icon-close sui-md', 'aria-hidden': 'true' }), true === hasIcon && _react2.default.createElement('i', { className: 'sui-icon-' + this.props.icon, 'aria-hidden': 'true' }), true === isIcon ? _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, label ) : label ); } }]); return ModalClose; }(_react.Component); exports.default = ModalClose; /***/ }), /* 64 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Uploads = function (_Component) { _inherits(Uploads, _Component); function Uploads(props) { _classCallCheck(this, Uploads); return _possibleConstructorReturn(this, (Uploads.__proto__ || Object.getPrototypeOf(Uploads)).call(this, props)); } _createClass(Uploads, [{ key: 'clearImage', value: function clearImage() { // Check if we're on field settings if ('answer_image' === this.props.property) { var answer = Object.assign({}, this.props.answer); var property = this.props.property; answer[property] = ''; answer[property + '_filename'] = ''; answer[property + '_alt'] = ''; this.props.actions.builderActions.updateAnswer(answer); } else if (typeof this.props.updateProperty === 'function') { this.props.updateProperty(this.props.property, ''); this.props.updateProperty(this.props.property + '_filename', ''); this.props.updateProperty(this.props.property + '_alt', ''); } else { // Clear image this.props.actions.settingsActions.updateSetting(this.props.property, ''); this.props.actions.settingsActions.updateSetting(this.props.property + '_filename', ''); this.props.actions.settingsActions.updateSetting(this.props.property + '_alt', ''); } } }, { key: 'openMedia', value: function openMedia() { var self = this; var media = wp.media({ title: (0, _utils.translate)('Select image'), button: { text: (0, _utils.translate)('Select') }, multiple: false }).on('select', function () { var imageUrl = void 0; var result = media.state().get('selection').first().toJSON(); // We can have 3 types of image size: thumbnail, medium, large, else full image will be used if (!_.isUndefined(self.props.imageSize)) { if (self.props.imageSize === 'thumbnail') { imageUrl = result.sizes.thumbnail.url; } else if (self.props.imageSize === 'medium') { if (_.isUndefined(result.sizes.medium)) { imageUrl = result.sizes.full.url; } else { imageUrl = result.sizes.medium.url; } } else if (self.props.imageSize === 'large') { if (_.isUndefined(result.sizes.large)) { imageUrl = result.sizes.full.url; } else { imageUrl = result.sizes.large.url; } } else { imageUrl = result.sizes.full.url; } } else { // Fallback to full image imageUrl = result.url; } // Check if we're on field settings if (typeof self.props.updateProperty === 'function') { self.props.updateProperty(self.props.property, imageUrl); self.props.updateProperty(self.props.property + '_filename', result.filename); self.props.updateProperty(self.props.property + '_alt', result.alt); } else { self.props.actions.settingsActions.updateSetting(self.props.property, imageUrl); self.props.actions.settingsActions.updateSetting(self.props.property + '_filename', result.filename); self.props.actions.settingsActions.updateSetting(self.props.property + '_alt', result.alt); } }); media.open(); } }, { key: 'render', value: function render() { var value = _.isUndefined(this.props.settings[this.props.property]) ? this.props.defaultValue : this.props.settings[this.props.property]; var hasValueClass = !_.isEmpty(value) ? 'sui-has_file' : ''; var filename = _.isUndefined(this.props.settings[this.props.property + '_filename']) ? value : _.isEmpty(this.props.settings[this.props.property + '_filename']) && !_.isNull(value) ? value.replace(/^.*[\\\/]/, '') : this.props.settings[this.props.property + '_filename']; var fieldLabel = ''; if (this.props.label) { fieldLabel = _react2.default.createElement( 'label', { className: 'sui-label' }, this.props.label ); } var fieldDescription = ''; if (this.props.description) { fieldDescription = _react2.default.createElement( 'span', { className: 'sui-description' }, this.props.description ); } var preview = ''; if ('image' === this.props.type) { var bgImage = ''; if (value) { bgImage = 'url(' + value + ')'; } preview = _react2.default.createElement( 'div', { className: 'sui-upload-image', 'aria-hidden': 'true' }, _react2.default.createElement('div', { className: 'sui-image-mask' }), _react2.default.createElement('div', { role: 'button', onClick: this.openMedia.bind(this), className: 'sui-image-preview', style: { backgroundImage: bgImage } }) ); } var fieldClass = this.props.fieldClass ? ' ' + this.props.fieldClass : ''; return _react2.default.createElement( 'div', { className: 'sui-form-field' + fieldClass }, fieldLabel, _react2.default.createElement( 'div', { className: 'sui-upload ' + hasValueClass }, _react2.default.createElement('input', { type: 'file', value: '', readOnly: 'readonly' }), preview, _react2.default.createElement( 'button', { className: 'sui-upload-button', onClick: this.openMedia.bind(this) }, _react2.default.createElement('i', { className: 'sui-icon-upload-cloud', 'aria-hidden': 'true' }), 'image' === this.props.type ? '' + (0, _utils.translate)('Upload image') : '' + (0, _utils.translate)('Upload file') ), _react2.default.createElement( 'div', { className: 'sui-upload-file' }, _react2.default.createElement( 'span', { title: filename }, filename ), _react2.default.createElement( 'button', { className: 'sui-upload-button--remove', onClick: this.clearImage.bind(this) }, _react2.default.createElement('i', { className: 'sui-icon-close', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, 'image' === this.props.type ? '' + (0, _utils.translate)('Remove uploaded image') : '' + (0, _utils.translate)('Remove uploaded file') ) ) ) ), fieldDescription ); } }]); return Uploads; }(_react.Component); exports.default = Uploads; /***/ }), /* 65 */ /***/ (function(module, exports) { module.exports = function(module) { if(!module.webpackPolyfill) { module.deprecate = function() {}; module.paths = []; // module.parent = undefined by default if(!module.children) module.children = []; Object.defineProperty(module, "loaded", { enumerable: true, get: function() { return module.l; } }); Object.defineProperty(module, "id", { enumerable: true, get: function() { return module.i; } }); module.webpackPolyfill = 1; } return module; }; /***/ }), /* 66 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Await; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return MemoryRouter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return Navigate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return Outlet; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return Route; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return Router; }); /* unused harmony export RouterProvider */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return Routes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return DataRouterContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return DataRouterStateContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return LocationContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return NavigationContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return RouteContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return mapRouteProperties; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return useRouteId; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return useRoutesImpl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return createMemoryRouter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return createRoutesFromChildren; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return createRoutesFromChildren; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return renderMatches; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return useActionData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return useAsyncError; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return useAsyncValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return useBlocker; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return useHref; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return useInRouterContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return useLoaderData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return useLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return useMatch; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return useMatches; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return useNavigate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return useNavigation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return useNavigationType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return useOutlet; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return useOutletContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return useParams; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return useResolvedPath; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return useRevalidator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return useRouteError; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return useRouteLoaderData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_0", function() { return useRoutes; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__remix_run_router__ = __webpack_require__(33); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["m"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["o"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["p"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["q"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["s"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["t"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["u"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["v"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["w"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["x"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["y"]; }); /** * React Router v6.24.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } // Create react-specific types from the agnostic types in @remix-run/router to // export from react-router const DataRouterContext = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createContext"](null); if (process.env.NODE_ENV !== "production") { DataRouterContext.displayName = "DataRouter"; } const DataRouterStateContext = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createContext"](null); if (process.env.NODE_ENV !== "production") { DataRouterStateContext.displayName = "DataRouterState"; } const AwaitContext = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createContext"](null); if (process.env.NODE_ENV !== "production") { AwaitContext.displayName = "Await"; } /** * A Navigator is a "location changer"; it's how you get to different locations. * * Every history instance conforms to the Navigator interface, but the * distinction is useful primarily when it comes to the low-level `<Router>` API * where both the location and a navigator must be provided separately in order * to avoid "tearing" that may occur in a suspense-enabled app if the action * and/or location were to be read directly from the history instance. */ const NavigationContext = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createContext"](null); if (process.env.NODE_ENV !== "production") { NavigationContext.displayName = "Navigation"; } const LocationContext = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createContext"](null); if (process.env.NODE_ENV !== "production") { LocationContext.displayName = "Location"; } const RouteContext = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createContext"]({ outlet: null, matches: [], isDataRoute: false }); if (process.env.NODE_ENV !== "production") { RouteContext.displayName = "Route"; } const RouteErrorContext = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createContext"](null); if (process.env.NODE_ENV !== "production") { RouteErrorContext.displayName = "RouteError"; } /** * Returns the full href for the given "to" value. This is useful for building * custom links that are also accessible and preserve right-click behavior. * * @see https://reactrouter.com/hooks/use-href */ function useHref(to, _temp) { let { relative } = _temp === void 0 ? {} : _temp; !useInRouterContext() ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, // TODO: This error is probably because they somehow have 2 versions of the // router loaded. We can help them understand how to avoid that. "useHref() may be used only in the context of a <Router> component.") : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; let { basename, navigator } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](NavigationContext); let { hash, pathname, search } = useResolvedPath(to, { relative }); let joinedPathname = pathname; // If we're operating within a basename, prepend it to the pathname prior // to creating the href. If this is a root navigation, then just use the raw // basename which allows the basename to have full control over the presence // of a trailing slash on root links if (basename !== "/") { joinedPathname = pathname === "/" ? basename : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["r" /* joinPaths */])([basename, pathname]); } return navigator.createHref({ pathname: joinedPathname, search, hash }); } /** * Returns true if this component is a descendant of a `<Router>`. * * @see https://reactrouter.com/hooks/use-in-router-context */ function useInRouterContext() { return __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](LocationContext) != null; } /** * Returns the current location object, which represents the current URL in web * browsers. * * Note: If you're using this it may mean you're doing some of your own * "routing" in your app, and we'd like to know what your use case is. We may * be able to provide something higher-level to better suit your needs. * * @see https://reactrouter.com/hooks/use-location */ function useLocation() { !useInRouterContext() ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, // TODO: This error is probably because they somehow have 2 versions of the // router loaded. We can help them understand how to avoid that. "useLocation() may be used only in the context of a <Router> component.") : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; return __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](LocationContext).location; } /** * Returns the current navigation action which describes how the router came to * the current location, either by a pop, push, or replace on the history stack. * * @see https://reactrouter.com/hooks/use-navigation-type */ function useNavigationType() { return __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](LocationContext).navigationType; } /** * Returns a PathMatch object if the given pattern matches the current URL. * This is useful for components that need to know "active" state, e.g. * `<NavLink>`. * * @see https://reactrouter.com/hooks/use-match */ function useMatch(pattern) { !useInRouterContext() ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, // TODO: This error is probably because they somehow have 2 versions of the // router loaded. We can help them understand how to avoid that. "useMatch() may be used only in the context of a <Router> component.") : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; let { pathname } = useLocation(); return __WEBPACK_IMPORTED_MODULE_0_react__["useMemo"](() => Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["t" /* matchPath */])(pattern, pathname), [pathname, pattern]); } /** * The interface for the navigate() function returned from useNavigate(). */ const navigateEffectWarning = "You should call navigate() in a React.useEffect(), not when " + "your component is first rendered."; // Mute warnings for calls to useNavigate in SSR environments function useIsomorphicLayoutEffect(cb) { let isStatic = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](NavigationContext).static; if (!isStatic) { // We should be able to get rid of this once react 18.3 is released // See: https://github.com/facebook/react/pull/26395 // eslint-disable-next-line react-hooks/rules-of-hooks __WEBPACK_IMPORTED_MODULE_0_react__["useLayoutEffect"](cb); } } /** * Returns an imperative method for changing the location. Used by `<Link>`s, but * may also be used by other elements to change the location. * * @see https://reactrouter.com/hooks/use-navigate */ function useNavigate() { let { isDataRoute } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](RouteContext); // Conditional usage is OK here because the usage of a data router is static // eslint-disable-next-line react-hooks/rules-of-hooks return isDataRoute ? useNavigateStable() : useNavigateUnstable(); } function useNavigateUnstable() { !useInRouterContext() ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, // TODO: This error is probably because they somehow have 2 versions of the // router loaded. We can help them understand how to avoid that. "useNavigate() may be used only in the context of a <Router> component.") : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; let dataRouterContext = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](DataRouterContext); let { basename, future, navigator } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](NavigationContext); let { matches } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](RouteContext); let { pathname: locationPathname } = useLocation(); let routePathnamesJson = JSON.stringify(Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["g" /* UNSAFE_getResolveToMatches */])(matches, future.v7_relativeSplatPath)); let activeRef = __WEBPACK_IMPORTED_MODULE_0_react__["useRef"](false); useIsomorphicLayoutEffect(() => { activeRef.current = true; }); let navigate = __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"](function (to, options) { if (options === void 0) { options = {}; } process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["i" /* UNSAFE_warning */])(activeRef.current, navigateEffectWarning) : void 0; // Short circuit here since if this happens on first render the navigate // is useless because we haven't wired up our history listener yet if (!activeRef.current) return; if (typeof to === "number") { navigator.go(to); return; } let path = Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["z" /* resolveTo */])(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path"); // If we're operating within a basename, prepend it to the pathname prior // to handing off to history (but only if we're not in a data router, // otherwise it'll prepend the basename inside of the router). // If this is a root navigation, then we navigate to the raw basename // which allows the basename to have full control over the presence of a // trailing slash on root links if (dataRouterContext == null && basename !== "/") { path.pathname = path.pathname === "/" ? basename : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["r" /* joinPaths */])([basename, path.pathname]); } (!!options.replace ? navigator.replace : navigator.push)(path, options.state, options); }, [basename, navigator, routePathnamesJson, locationPathname, dataRouterContext]); return navigate; } const OutletContext = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createContext"](null); /** * Returns the context (if provided) for the child route at this level of the route * hierarchy. * @see https://reactrouter.com/hooks/use-outlet-context */ function useOutletContext() { return __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](OutletContext); } /** * Returns the element for the child route at this level of the route * hierarchy. Used internally by `<Outlet>` to render child routes. * * @see https://reactrouter.com/hooks/use-outlet */ function useOutlet(context) { let outlet = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](RouteContext).outlet; if (outlet) { return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](OutletContext.Provider, { value: context }, outlet); } return outlet; } /** * Returns an object of key/value pairs of the dynamic params from the current * URL that were matched by the route path. * * @see https://reactrouter.com/hooks/use-params */ function useParams() { let { matches } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](RouteContext); let routeMatch = matches[matches.length - 1]; return routeMatch ? routeMatch.params : {}; } /** * Resolves the pathname of the given `to` value against the current location. * * @see https://reactrouter.com/hooks/use-resolved-path */ function useResolvedPath(to, _temp2) { let { relative } = _temp2 === void 0 ? {} : _temp2; let { future } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](NavigationContext); let { matches } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](RouteContext); let { pathname: locationPathname } = useLocation(); let routePathnamesJson = JSON.stringify(Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["g" /* UNSAFE_getResolveToMatches */])(matches, future.v7_relativeSplatPath)); return __WEBPACK_IMPORTED_MODULE_0_react__["useMemo"](() => Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["z" /* resolveTo */])(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [to, routePathnamesJson, locationPathname, relative]); } /** * Returns the element of the route that matched the current location, prepared * with the correct context to render the remainder of the route tree. Route * elements in the tree must render an `<Outlet>` to render their child route's * element. * * @see https://reactrouter.com/hooks/use-routes */ function useRoutes(routes, locationArg) { return useRoutesImpl(routes, locationArg); } // Internal implementation with accept optional param for RouterProvider usage function useRoutesImpl(routes, locationArg, dataRouterState, future) { !useInRouterContext() ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, // TODO: This error is probably because they somehow have 2 versions of the // router loaded. We can help them understand how to avoid that. "useRoutes() may be used only in the context of a <Router> component.") : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; let { navigator } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](NavigationContext); let { matches: parentMatches } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](RouteContext); let routeMatch = parentMatches[parentMatches.length - 1]; let parentParams = routeMatch ? routeMatch.params : {}; let parentPathname = routeMatch ? routeMatch.pathname : "/"; let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : "/"; let parentRoute = routeMatch && routeMatch.route; if (process.env.NODE_ENV !== "production") { // You won't get a warning about 2 different <Routes> under a <Route> // without a trailing *, but this is a best-effort warning anyway since we // cannot even give the warning unless they land at the parent route. // // Example: // // <Routes> // {/* This route path MUST end with /* because otherwise // it will never match /blog/post/123 */} // <Route path="blog" element={<Blog />} /> // <Route path="blog/feed" element={<BlogFeed />} /> // </Routes> // // function Blog() { // return ( // <Routes> // <Route path="post/:id" element={<Post />} /> // </Routes> // ); // } let parentPath = parentRoute && parentRoute.path || ""; warningOnce(parentPathname, !parentRoute || parentPath.endsWith("*"), "You rendered descendant <Routes> (or called `useRoutes()`) at " + ("\"" + parentPathname + "\" (under <Route path=\"" + parentPath + "\">) but the ") + "parent route path has no trailing \"*\". This means if you navigate " + "deeper, the parent won't match anymore and therefore the child " + "routes will never render.\n\n" + ("Please change the parent <Route path=\"" + parentPath + "\"> to <Route ") + ("path=\"" + (parentPath === "/" ? "*" : parentPath + "/*") + "\">.")); } let locationFromContext = useLocation(); let location; if (locationArg) { var _parsedLocationArg$pa; let parsedLocationArg = typeof locationArg === "string" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["v" /* parsePath */])(locationArg) : locationArg; !(parentPathnameBase === "/" || ((_parsedLocationArg$pa = parsedLocationArg.pathname) == null ? void 0 : _parsedLocationArg$pa.startsWith(parentPathnameBase))) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, "When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, " + "the location pathname must begin with the portion of the URL pathname that was " + ("matched by all parent routes. The current pathname base is \"" + parentPathnameBase + "\" ") + ("but pathname \"" + parsedLocationArg.pathname + "\" was given in the `location` prop.")) : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; location = parsedLocationArg; } else { location = locationFromContext; } let pathname = location.pathname || "/"; let remainingPathname = pathname; if (parentPathnameBase !== "/") { // Determine the remaining pathname by removing the # of URL segments the // parentPathnameBase has, instead of removing based on character count. // This is because we can't guarantee that incoming/outgoing encodings/ // decodings will match exactly. // We decode paths before matching on a per-segment basis with // decodeURIComponent(), but we re-encode pathnames via `new URL()` so they // match what `window.location.pathname` would reflect. Those don't 100% // align when it comes to encoded URI characters such as % and &. // // So we may end up with: // pathname: "/descendant/a%25b/match" // parentPathnameBase: "/descendant/a%b" // // And the direct substring removal approach won't work :/ let parentSegments = parentPathnameBase.replace(/^\//, "").split("/"); let segments = pathname.replace(/^\//, "").split("/"); remainingPathname = "/" + segments.slice(parentSegments.length).join("/"); } let matches = Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["u" /* matchRoutes */])(routes, { pathname: remainingPathname }); if (process.env.NODE_ENV !== "production") { process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["i" /* UNSAFE_warning */])(parentRoute || matches != null, "No routes matched location \"" + location.pathname + location.search + location.hash + "\" ") : void 0; process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["i" /* UNSAFE_warning */])(matches == null || matches[matches.length - 1].route.element !== undefined || matches[matches.length - 1].route.Component !== undefined || matches[matches.length - 1].route.lazy !== undefined, "Matched leaf route at location \"" + location.pathname + location.search + location.hash + "\" " + "does not have an element or Component. This means it will render an <Outlet /> with a " + "null value by default resulting in an \"empty\" page.") : void 0; } let renderedMatches = _renderMatches(matches && matches.map(match => Object.assign({}, match, { params: Object.assign({}, parentParams, match.params), pathname: Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["r" /* joinPaths */])([parentPathnameBase, // Re-encode pathnames that were decoded inside matchRoutes navigator.encodeLocation ? navigator.encodeLocation(match.pathname).pathname : match.pathname]), pathnameBase: match.pathnameBase === "/" ? parentPathnameBase : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["r" /* joinPaths */])([parentPathnameBase, // Re-encode pathnames that were decoded inside matchRoutes navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase).pathname : match.pathnameBase]) })), parentMatches, dataRouterState, future); // When a user passes in a `locationArg`, the associated routes need to // be wrapped in a new `LocationContext.Provider` in order for `useLocation` // to use the scoped location instead of the global location. if (locationArg && renderedMatches) { return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](LocationContext.Provider, { value: { location: _extends({ pathname: "/", search: "", hash: "", state: null, key: "default" }, location), navigationType: __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["b" /* Action */].Pop } }, renderedMatches); } return renderedMatches; } function DefaultErrorComponent() { let error = useRouteError(); let message = Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["q" /* isRouteErrorResponse */])(error) ? error.status + " " + error.statusText : error instanceof Error ? error.message : JSON.stringify(error); let stack = error instanceof Error ? error.stack : null; let lightgrey = "rgba(200,200,200, 0.5)"; let preStyles = { padding: "0.5rem", backgroundColor: lightgrey }; let codeStyles = { padding: "2px 4px", backgroundColor: lightgrey }; let devInfo = null; if (process.env.NODE_ENV !== "production") { console.error("Error handled by React Router default ErrorBoundary:", error); devInfo = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_0_react__["Fragment"], null, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("p", null, "\uD83D\uDCBF Hey developer \uD83D\uDC4B"), /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("code", { style: codeStyles }, "ErrorBoundary"), " or", " ", /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("code", { style: codeStyles }, "errorElement"), " prop on your route.")); } return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_0_react__["Fragment"], null, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("h2", null, "Unexpected Application Error!"), /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("h3", { style: { fontStyle: "italic" } }, message), stack ? /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"]("pre", { style: preStyles }, stack) : null, devInfo); } const defaultErrorElement = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](DefaultErrorComponent, null); class RenderErrorBoundary extends __WEBPACK_IMPORTED_MODULE_0_react__["Component"] { constructor(props) { super(props); this.state = { location: props.location, revalidation: props.revalidation, error: props.error }; } static getDerivedStateFromError(error) { return { error: error }; } static getDerivedStateFromProps(props, state) { // When we get into an error state, the user will likely click "back" to the // previous page that didn't have an error. Because this wraps the entire // application, that will have no effect--the error page continues to display. // This gives us a mechanism to recover from the error when the location changes. // // Whether we're in an error state or not, we update the location in state // so that when we are in an error state, it gets reset when a new location // comes in and the user recovers from the error. if (state.location !== props.location || state.revalidation !== "idle" && props.revalidation === "idle") { return { error: props.error, location: props.location, revalidation: props.revalidation }; } // If we're not changing locations, preserve the location but still surface // any new errors that may come through. We retain the existing error, we do // this because the error provided from the app state may be cleared without // the location changing. return { error: props.error !== undefined ? props.error : state.error, location: state.location, revalidation: props.revalidation || state.revalidation }; } componentDidCatch(error, errorInfo) { console.error("React Router caught the following error during render", error, errorInfo); } render() { return this.state.error !== undefined ? /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](RouteContext.Provider, { value: this.props.routeContext }, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](RouteErrorContext.Provider, { value: this.state.error, children: this.props.component })) : this.props.children; } } function RenderedRoute(_ref) { let { routeContext, match, children } = _ref; let dataRouterContext = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](DataRouterContext); // Track how deep we got in our render pass to emulate SSR componentDidCatch // in a DataStaticRouter if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) { dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id; } return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](RouteContext.Provider, { value: routeContext }, children); } function _renderMatches(matches, parentMatches, dataRouterState, future) { var _dataRouterState2; if (parentMatches === void 0) { parentMatches = []; } if (dataRouterState === void 0) { dataRouterState = null; } if (future === void 0) { future = null; } if (matches == null) { var _dataRouterState; if ((_dataRouterState = dataRouterState) != null && _dataRouterState.errors) { // Don't bail if we have data router errors so we can render them in the // boundary. Use the pre-matched (or shimmed) matches matches = dataRouterState.matches; } else { return null; } } let renderedMatches = matches; // If we have data errors, trim matches to the highest error boundary let errors = (_dataRouterState2 = dataRouterState) == null ? void 0 : _dataRouterState2.errors; if (errors != null) { let errorIndex = renderedMatches.findIndex(m => m.route.id && (errors == null ? void 0 : errors[m.route.id]) !== undefined); !(errorIndex >= 0) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, "Could not find a matching route for errors on route IDs: " + Object.keys(errors).join(",")) : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; renderedMatches = renderedMatches.slice(0, Math.min(renderedMatches.length, errorIndex + 1)); } // If we're in a partial hydration mode, detect if we need to render down to // a given HydrateFallback while we load the rest of the hydration data let renderFallback = false; let fallbackIndex = -1; if (dataRouterState && future && future.v7_partialHydration) { for (let i = 0; i < renderedMatches.length; i++) { let match = renderedMatches[i]; // Track the deepest fallback up until the first route without data if (match.route.HydrateFallback || match.route.hydrateFallbackElement) { fallbackIndex = i; } if (match.route.id) { let { loaderData, errors } = dataRouterState; let needsToRunLoader = match.route.loader && loaderData[match.route.id] === undefined && (!errors || errors[match.route.id] === undefined); if (match.route.lazy || needsToRunLoader) { // We found the first route that's not ready to render (waiting on // lazy, or has a loader that hasn't run yet). Flag that we need to // render a fallback and render up until the appropriate fallback renderFallback = true; if (fallbackIndex >= 0) { renderedMatches = renderedMatches.slice(0, fallbackIndex + 1); } else { renderedMatches = [renderedMatches[0]]; } break; } } } } return renderedMatches.reduceRight((outlet, match, index) => { // Only data routers handle errors/fallbacks let error; let shouldRenderHydrateFallback = false; let errorElement = null; let hydrateFallbackElement = null; if (dataRouterState) { error = errors && match.route.id ? errors[match.route.id] : undefined; errorElement = match.route.errorElement || defaultErrorElement; if (renderFallback) { if (fallbackIndex < 0 && index === 0) { warningOnce("route-fallback", false, "No `HydrateFallback` element provided to render during initial hydration"); shouldRenderHydrateFallback = true; hydrateFallbackElement = null; } else if (fallbackIndex === index) { shouldRenderHydrateFallback = true; hydrateFallbackElement = match.route.hydrateFallbackElement || null; } } } let matches = parentMatches.concat(renderedMatches.slice(0, index + 1)); let getChildren = () => { let children; if (error) { children = errorElement; } else if (shouldRenderHydrateFallback) { children = hydrateFallbackElement; } else if (match.route.Component) { // Note: This is a de-optimized path since React won't re-use the // ReactElement since it's identity changes with each new // React.createElement call. We keep this so folks can use // `<Route Component={...}>` in `<Routes>` but generally `Component` // usage is only advised in `RouterProvider` when we can convert it to // `element` ahead of time. children = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](match.route.Component, null); } else if (match.route.element) { children = match.route.element; } else { children = outlet; } return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](RenderedRoute, { match: match, routeContext: { outlet, matches, isDataRoute: dataRouterState != null }, children: children }); }; // Only wrap in an error boundary within data router usages when we have an // ErrorBoundary/errorElement on this route. Otherwise let it bubble up to // an ancestor ErrorBoundary/errorElement return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](RenderErrorBoundary, { location: dataRouterState.location, revalidation: dataRouterState.revalidation, component: errorElement, error: error, children: getChildren(), routeContext: { outlet: null, matches, isDataRoute: true } }) : getChildren(); }, null); } var DataRouterHook = /*#__PURE__*/function (DataRouterHook) { DataRouterHook["UseBlocker"] = "useBlocker"; DataRouterHook["UseRevalidator"] = "useRevalidator"; DataRouterHook["UseNavigateStable"] = "useNavigate"; return DataRouterHook; }(DataRouterHook || {}); var DataRouterStateHook = /*#__PURE__*/function (DataRouterStateHook) { DataRouterStateHook["UseBlocker"] = "useBlocker"; DataRouterStateHook["UseLoaderData"] = "useLoaderData"; DataRouterStateHook["UseActionData"] = "useActionData"; DataRouterStateHook["UseRouteError"] = "useRouteError"; DataRouterStateHook["UseNavigation"] = "useNavigation"; DataRouterStateHook["UseRouteLoaderData"] = "useRouteLoaderData"; DataRouterStateHook["UseMatches"] = "useMatches"; DataRouterStateHook["UseRevalidator"] = "useRevalidator"; DataRouterStateHook["UseNavigateStable"] = "useNavigate"; DataRouterStateHook["UseRouteId"] = "useRouteId"; return DataRouterStateHook; }(DataRouterStateHook || {}); function getDataRouterConsoleError(hookName) { return hookName + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router."; } function useDataRouterContext(hookName) { let ctx = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](DataRouterContext); !ctx ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, getDataRouterConsoleError(hookName)) : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; return ctx; } function useDataRouterState(hookName) { let state = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](DataRouterStateContext); !state ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, getDataRouterConsoleError(hookName)) : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; return state; } function useRouteContext(hookName) { let route = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](RouteContext); !route ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, getDataRouterConsoleError(hookName)) : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; return route; } // Internal version with hookName-aware debugging function useCurrentRouteId(hookName) { let route = useRouteContext(hookName); let thisRoute = route.matches[route.matches.length - 1]; !thisRoute.route.id ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, hookName + " can only be used on routes that contain a unique \"id\"") : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; return thisRoute.route.id; } /** * Returns the ID for the nearest contextual route */ function useRouteId() { return useCurrentRouteId(DataRouterStateHook.UseRouteId); } /** * Returns the current navigation, defaulting to an "idle" navigation when * no navigation is in progress */ function useNavigation() { let state = useDataRouterState(DataRouterStateHook.UseNavigation); return state.navigation; } /** * Returns a revalidate function for manually triggering revalidation, as well * as the current state of any manual revalidations */ function useRevalidator() { let dataRouterContext = useDataRouterContext(DataRouterHook.UseRevalidator); let state = useDataRouterState(DataRouterStateHook.UseRevalidator); return __WEBPACK_IMPORTED_MODULE_0_react__["useMemo"](() => ({ revalidate: dataRouterContext.router.revalidate, state: state.revalidation }), [dataRouterContext.router.revalidate, state.revalidation]); } /** * Returns the active route matches, useful for accessing loaderData for * parent/child routes or the route "handle" property */ function useMatches() { let { matches, loaderData } = useDataRouterState(DataRouterStateHook.UseMatches); return __WEBPACK_IMPORTED_MODULE_0_react__["useMemo"](() => matches.map(m => Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["f" /* UNSAFE_convertRouteMatchToUiMatch */])(m, loaderData)), [matches, loaderData]); } /** * Returns the loader data for the nearest ancestor Route loader */ function useLoaderData() { let state = useDataRouterState(DataRouterStateHook.UseLoaderData); let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData); if (state.errors && state.errors[routeId] != null) { console.error("You cannot `useLoaderData` in an errorElement (routeId: " + routeId + ")"); return undefined; } return state.loaderData[routeId]; } /** * Returns the loaderData for the given routeId */ function useRouteLoaderData(routeId) { let state = useDataRouterState(DataRouterStateHook.UseRouteLoaderData); return state.loaderData[routeId]; } /** * Returns the action data for the nearest ancestor Route action */ function useActionData() { let state = useDataRouterState(DataRouterStateHook.UseActionData); let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData); return state.actionData ? state.actionData[routeId] : undefined; } /** * Returns the nearest ancestor Route error, which could be a loader/action * error or a render error. This is intended to be called from your * ErrorBoundary/errorElement to display a proper error message. */ function useRouteError() { var _state$errors; let error = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](RouteErrorContext); let state = useDataRouterState(DataRouterStateHook.UseRouteError); let routeId = useCurrentRouteId(DataRouterStateHook.UseRouteError); // If this was a render error, we put it in a RouteError context inside // of RenderErrorBoundary if (error !== undefined) { return error; } // Otherwise look for errors from our data router state return (_state$errors = state.errors) == null ? void 0 : _state$errors[routeId]; } /** * Returns the happy-path data from the nearest ancestor `<Await />` value */ function useAsyncValue() { let value = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](AwaitContext); return value == null ? void 0 : value._data; } /** * Returns the error from the nearest ancestor `<Await />` value */ function useAsyncError() { let value = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](AwaitContext); return value == null ? void 0 : value._error; } let blockerId = 0; /** * Allow the application to block navigations within the SPA and present the * user a confirmation dialog to confirm the navigation. Mostly used to avoid * using half-filled form data. This does not handle hard-reloads or * cross-origin navigations. */ function useBlocker(shouldBlock) { let { router, basename } = useDataRouterContext(DataRouterHook.UseBlocker); let state = useDataRouterState(DataRouterStateHook.UseBlocker); let [blockerKey, setBlockerKey] = __WEBPACK_IMPORTED_MODULE_0_react__["useState"](""); let blockerFunction = __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"](arg => { if (typeof shouldBlock !== "function") { return !!shouldBlock; } if (basename === "/") { return shouldBlock(arg); } // If they provided us a function and we've got an active basename, strip // it from the locations we expose to the user to match the behavior of // useLocation let { currentLocation, nextLocation, historyAction } = arg; return shouldBlock({ currentLocation: _extends({}, currentLocation, { pathname: Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["A" /* stripBasename */])(currentLocation.pathname, basename) || currentLocation.pathname }), nextLocation: _extends({}, nextLocation, { pathname: Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["A" /* stripBasename */])(nextLocation.pathname, basename) || nextLocation.pathname }), historyAction }); }, [basename, shouldBlock]); // This effect is in charge of blocker key assignment and deletion (which is // tightly coupled to the key) __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => { let key = String(++blockerId); setBlockerKey(key); return () => router.deleteBlocker(key); }, [router]); // This effect handles assigning the blockerFunction. This is to handle // unstable blocker function identities, and happens only after the prior // effect so we don't get an orphaned blockerFunction in the router with a // key of "". Until then we just have the IDLE_BLOCKER. __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => { if (blockerKey !== "") { router.getBlocker(blockerKey, blockerFunction); } }, [router, blockerKey, blockerFunction]); // Prefer the blocker from `state` not `router.state` since DataRouterContext // is memoized so this ensures we update on blocker state updates return blockerKey && state.blockers.has(blockerKey) ? state.blockers.get(blockerKey) : __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["c" /* IDLE_BLOCKER */]; } /** * Stable version of useNavigate that is used when we are in the context of * a RouterProvider. */ function useNavigateStable() { let { router } = useDataRouterContext(DataRouterHook.UseNavigateStable); let id = useCurrentRouteId(DataRouterStateHook.UseNavigateStable); let activeRef = __WEBPACK_IMPORTED_MODULE_0_react__["useRef"](false); useIsomorphicLayoutEffect(() => { activeRef.current = true; }); let navigate = __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"](function (to, options) { if (options === void 0) { options = {}; } process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["i" /* UNSAFE_warning */])(activeRef.current, navigateEffectWarning) : void 0; // Short circuit here since if this happens on first render the navigate // is useless because we haven't wired up our router subscriber yet if (!activeRef.current) return; if (typeof to === "number") { router.navigate(to); } else { router.navigate(to, _extends({ fromRouteId: id }, options)); } }, [router, id]); return navigate; } const alreadyWarned = {}; function warningOnce(key, cond, message) { if (!cond && !alreadyWarned[key]) { alreadyWarned[key] = true; process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["i" /* UNSAFE_warning */])(false, message) : void 0; } } /** Webpack + React 17 fails to compile on any of the following because webpack complains that `startTransition` doesn't exist in `React`: * import { startTransition } from "react" * import * as React from from "react"; "startTransition" in React ? React.startTransition(() => setState()) : setState() * import * as React from from "react"; "startTransition" in React ? React["startTransition"](() => setState()) : setState() Moving it to a constant such as the following solves the Webpack/React 17 issue: * import * as React from from "react"; const START_TRANSITION = "startTransition"; START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState() However, that introduces webpack/terser minification issues in production builds in React 18 where minification/obfuscation ends up removing the call of React.startTransition entirely from the first half of the ternary. Grabbing this exported reference once up front resolves that issue. See https://github.com/remix-run/react-router/issues/10579 */ const START_TRANSITION = "startTransition"; const startTransitionImpl = __WEBPACK_IMPORTED_MODULE_0_react__[START_TRANSITION]; /** * Given a Remix Router instance, render the appropriate UI */ function RouterProvider(_ref) { let { fallbackElement, router, future } = _ref; let [state, setStateImpl] = __WEBPACK_IMPORTED_MODULE_0_react__["useState"](router.state); let { v7_startTransition } = future || {}; let setState = __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"](newState => { if (v7_startTransition && startTransitionImpl) { startTransitionImpl(() => setStateImpl(newState)); } else { setStateImpl(newState); } }, [setStateImpl, v7_startTransition]); // Need to use a layout effect here so we are subscribed early enough to // pick up on any render-driven redirects/navigations (useEffect/<Navigate>) __WEBPACK_IMPORTED_MODULE_0_react__["useLayoutEffect"](() => router.subscribe(setState), [router, setState]); __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => { process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["i" /* UNSAFE_warning */])(fallbackElement == null || !router.future.v7_partialHydration, "`<RouterProvider fallbackElement>` is deprecated when using " + "`v7_partialHydration`, use a `HydrateFallback` component instead") : void 0; // Only log this once on initial mount // eslint-disable-next-line react-hooks/exhaustive-deps }, []); let navigator = __WEBPACK_IMPORTED_MODULE_0_react__["useMemo"](() => { return { createHref: router.createHref, encodeLocation: router.encodeLocation, go: n => router.navigate(n), push: (to, state, opts) => router.navigate(to, { state, preventScrollReset: opts == null ? void 0 : opts.preventScrollReset }), replace: (to, state, opts) => router.navigate(to, { replace: true, state, preventScrollReset: opts == null ? void 0 : opts.preventScrollReset }) }; }, [router]); let basename = router.basename || "/"; let dataRouterContext = __WEBPACK_IMPORTED_MODULE_0_react__["useMemo"](() => ({ router, navigator, static: false, basename }), [router, navigator, basename]); // The fragment and {null} here are important! We need them to keep React 18's // useId happy when we are server-rendering since we may have a <script> here // containing the hydrated server-side staticContext (from StaticRouterProvider). // useId relies on the component tree structure to generate deterministic id's // so we need to ensure it remains the same on the client even though // we don't need the <script> tag return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_0_react__["Fragment"], null, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](DataRouterContext.Provider, { value: dataRouterContext }, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](DataRouterStateContext.Provider, { value: state }, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](Router, { basename: basename, location: state.location, navigationType: state.historyAction, navigator: navigator, future: { v7_relativeSplatPath: router.future.v7_relativeSplatPath } }, state.initialized || router.future.v7_partialHydration ? /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](DataRoutes, { routes: router.routes, future: router.future, state: state }) : fallbackElement))), null); } function DataRoutes(_ref2) { let { routes, future, state } = _ref2; return useRoutesImpl(routes, undefined, state, future); } /** * A `<Router>` that stores all entries in memory. * * @see https://reactrouter.com/router-components/memory-router */ function MemoryRouter(_ref3) { let { basename, children, initialEntries, initialIndex, future } = _ref3; let historyRef = __WEBPACK_IMPORTED_MODULE_0_react__["useRef"](); if (historyRef.current == null) { historyRef.current = Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["l" /* createMemoryHistory */])({ initialEntries, initialIndex, v5Compat: true }); } let history = historyRef.current; let [state, setStateImpl] = __WEBPACK_IMPORTED_MODULE_0_react__["useState"]({ action: history.action, location: history.location }); let { v7_startTransition } = future || {}; let setState = __WEBPACK_IMPORTED_MODULE_0_react__["useCallback"](newState => { v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState); }, [setStateImpl, v7_startTransition]); __WEBPACK_IMPORTED_MODULE_0_react__["useLayoutEffect"](() => history.listen(setState), [history, setState]); return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](Router, { basename: basename, children: children, location: state.location, navigationType: state.action, navigator: history, future: future }); } /** * Changes the current location. * * Note: This API is mostly useful in React.Component subclasses that are not * able to use hooks. In functional components, we recommend you use the * `useNavigate` hook instead. * * @see https://reactrouter.com/components/navigate */ function Navigate(_ref4) { let { to, replace, state, relative } = _ref4; !useInRouterContext() ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, // TODO: This error is probably because they somehow have 2 versions of // the router loaded. We can help them understand how to avoid that. "<Navigate> may be used only in the context of a <Router> component.") : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; let { future, static: isStatic } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](NavigationContext); process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["i" /* UNSAFE_warning */])(!isStatic, "<Navigate> must not be used on the initial render in a <StaticRouter>. " + "This is a no-op, but you should modify your code so the <Navigate> is " + "only ever rendered in response to some user interaction or state change.") : void 0; let { matches } = __WEBPACK_IMPORTED_MODULE_0_react__["useContext"](RouteContext); let { pathname: locationPathname } = useLocation(); let navigate = useNavigate(); // Resolve the path outside of the effect so that when effects run twice in // StrictMode they navigate to the same place let path = Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["z" /* resolveTo */])(to, Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["g" /* UNSAFE_getResolveToMatches */])(matches, future.v7_relativeSplatPath), locationPathname, relative === "path"); let jsonPath = JSON.stringify(path); __WEBPACK_IMPORTED_MODULE_0_react__["useEffect"](() => navigate(JSON.parse(jsonPath), { replace, state, relative }), [navigate, jsonPath, relative, replace, state]); return null; } /** * Renders the child route's element, if there is one. * * @see https://reactrouter.com/components/outlet */ function Outlet(props) { return useOutlet(props.context); } /** * Declares an element that should be rendered at a certain URL path. * * @see https://reactrouter.com/components/route */ function Route(_props) { process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, "A <Route> is only ever to be used as the child of <Routes> element, " + "never rendered directly. Please wrap your <Route> in a <Routes>.") : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) ; } /** * Provides location context for the rest of the app. * * Note: You usually won't render a `<Router>` directly. Instead, you'll render a * router that is more specific to your environment such as a `<BrowserRouter>` * in web browsers or a `<StaticRouter>` for server rendering. * * @see https://reactrouter.com/router-components/router */ function Router(_ref5) { let { basename: basenameProp = "/", children = null, location: locationProp, navigationType = __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["b" /* Action */].Pop, navigator, static: staticProp = false, future } = _ref5; !!useInRouterContext() ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, "You cannot render a <Router> inside another <Router>." + " You should never have more than one in your app.") : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; // Preserve trailing slashes on basename, so we can let the user control // the enforcement of trailing slashes throughout the app let basename = basenameProp.replace(/^\/*/, "/"); let navigationContext = __WEBPACK_IMPORTED_MODULE_0_react__["useMemo"](() => ({ basename, navigator, static: staticProp, future: _extends({ v7_relativeSplatPath: false }, future) }), [basename, future, navigator, staticProp]); if (typeof locationProp === "string") { locationProp = Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["v" /* parsePath */])(locationProp); } let { pathname = "/", search = "", hash = "", state = null, key = "default" } = locationProp; let locationContext = __WEBPACK_IMPORTED_MODULE_0_react__["useMemo"](() => { let trailingPathname = Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["A" /* stripBasename */])(pathname, basename); if (trailingPathname == null) { return null; } return { location: { pathname: trailingPathname, search, hash, state, key }, navigationType }; }, [basename, pathname, search, hash, state, key, navigationType]); process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["i" /* UNSAFE_warning */])(locationContext != null, "<Router basename=\"" + basename + "\"> is not able to match the URL " + ("\"" + pathname + search + hash + "\" because it does not start with the ") + "basename, so the <Router> won't render anything.") : void 0; if (locationContext == null) { return null; } return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](NavigationContext.Provider, { value: navigationContext }, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](LocationContext.Provider, { children: children, value: locationContext })); } /** * A container for a nested tree of `<Route>` elements that renders the branch * that best matches the current location. * * @see https://reactrouter.com/components/routes */ function Routes(_ref6) { let { children, location } = _ref6; return useRoutes(createRoutesFromChildren(children), location); } /** * Component to use for rendering lazily loaded data from returning defer() * in a loader function */ function Await(_ref7) { let { children, errorElement, resolve } = _ref7; return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](AwaitErrorBoundary, { resolve: resolve, errorElement: errorElement }, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ResolveAwait, null, children)); } var AwaitRenderStatus = /*#__PURE__*/function (AwaitRenderStatus) { AwaitRenderStatus[AwaitRenderStatus["pending"] = 0] = "pending"; AwaitRenderStatus[AwaitRenderStatus["success"] = 1] = "success"; AwaitRenderStatus[AwaitRenderStatus["error"] = 2] = "error"; return AwaitRenderStatus; }(AwaitRenderStatus || {}); const neverSettledPromise = new Promise(() => {}); class AwaitErrorBoundary extends __WEBPACK_IMPORTED_MODULE_0_react__["Component"] { constructor(props) { super(props); this.state = { error: null }; } static getDerivedStateFromError(error) { return { error }; } componentDidCatch(error, errorInfo) { console.error("<Await> caught the following error during render", error, errorInfo); } render() { let { children, errorElement, resolve } = this.props; let promise = null; let status = AwaitRenderStatus.pending; if (!(resolve instanceof Promise)) { // Didn't get a promise - provide as a resolved promise status = AwaitRenderStatus.success; promise = Promise.resolve(); Object.defineProperty(promise, "_tracked", { get: () => true }); Object.defineProperty(promise, "_data", { get: () => resolve }); } else if (this.state.error) { // Caught a render error, provide it as a rejected promise status = AwaitRenderStatus.error; let renderError = this.state.error; promise = Promise.reject().catch(() => {}); // Avoid unhandled rejection warnings Object.defineProperty(promise, "_tracked", { get: () => true }); Object.defineProperty(promise, "_error", { get: () => renderError }); } else if (resolve._tracked) { // Already tracked promise - check contents promise = resolve; status = "_error" in promise ? AwaitRenderStatus.error : "_data" in promise ? AwaitRenderStatus.success : AwaitRenderStatus.pending; } else { // Raw (untracked) promise - track it status = AwaitRenderStatus.pending; Object.defineProperty(resolve, "_tracked", { get: () => true }); promise = resolve.then(data => Object.defineProperty(resolve, "_data", { get: () => data }), error => Object.defineProperty(resolve, "_error", { get: () => error })); } if (status === AwaitRenderStatus.error && promise._error instanceof __WEBPACK_IMPORTED_MODULE_1__remix_run_router__["a" /* AbortedDeferredError */]) { // Freeze the UI by throwing a never resolved promise throw neverSettledPromise; } if (status === AwaitRenderStatus.error && !errorElement) { // No errorElement, throw to the nearest route-level error boundary throw promise._error; } if (status === AwaitRenderStatus.error) { // Render via our errorElement return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](AwaitContext.Provider, { value: promise, children: errorElement }); } if (status === AwaitRenderStatus.success) { // Render children with resolved value return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](AwaitContext.Provider, { value: promise, children: children }); } // Throw to the suspense boundary throw promise; } } /** * @private * Indirection to leverage useAsyncValue for a render-prop API on `<Await>` */ function ResolveAwait(_ref8) { let { children } = _ref8; let data = useAsyncValue(); let toRender = typeof children === "function" ? children(data) : children; return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](__WEBPACK_IMPORTED_MODULE_0_react__["Fragment"], null, toRender); } /////////////////////////////////////////////////////////////////////////////// // UTILS /////////////////////////////////////////////////////////////////////////////// /** * Creates a route config from a React "children" object, which is usually * either a `<Route>` element or an array of them. Used internally by * `<Routes>` to create a route config from its children. * * @see https://reactrouter.com/utils/create-routes-from-children */ function createRoutesFromChildren(children, parentPath) { if (parentPath === void 0) { parentPath = []; } let routes = []; __WEBPACK_IMPORTED_MODULE_0_react__["Children"].forEach(children, (element, index) => { if (! /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["isValidElement"](element)) { // Ignore non-elements. This allows people to more easily inline // conditionals in their route config. return; } let treePath = [...parentPath, index]; if (element.type === __WEBPACK_IMPORTED_MODULE_0_react__["Fragment"]) { // Transparently support React.Fragment and its children. routes.push.apply(routes, createRoutesFromChildren(element.props.children, treePath)); return; } !(element.type === Route) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, "[" + (typeof element.type === "string" ? element.type : element.type.name) + "] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>") : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; !(!element.props.index || !element.props.children) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false, "An index route cannot have child routes.") : Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["h" /* UNSAFE_invariant */])(false) : void 0; let route = { id: element.props.id || treePath.join("-"), caseSensitive: element.props.caseSensitive, element: element.props.element, Component: element.props.Component, index: element.props.index, path: element.props.path, loader: element.props.loader, action: element.props.action, errorElement: element.props.errorElement, ErrorBoundary: element.props.ErrorBoundary, hasErrorBoundary: element.props.ErrorBoundary != null || element.props.errorElement != null, shouldRevalidate: element.props.shouldRevalidate, handle: element.props.handle, lazy: element.props.lazy }; if (element.props.children) { route.children = createRoutesFromChildren(element.props.children, treePath); } routes.push(route); }); return routes; } /** * Renders the result of `matchRoutes()` into a React element. */ function renderMatches(matches) { return _renderMatches(matches); } function mapRouteProperties(route) { let updates = { // Note: this check also occurs in createRoutesFromChildren so update // there if you change this -- please and thank you! hasErrorBoundary: route.ErrorBoundary != null || route.errorElement != null }; if (route.Component) { if (process.env.NODE_ENV !== "production") { if (route.element) { process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["i" /* UNSAFE_warning */])(false, "You should not include both `Component` and `element` on your route - " + "`Component` will be used.") : void 0; } } Object.assign(updates, { element: /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](route.Component), Component: undefined }); } if (route.HydrateFallback) { if (process.env.NODE_ENV !== "production") { if (route.hydrateFallbackElement) { process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["i" /* UNSAFE_warning */])(false, "You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - " + "`HydrateFallback` will be used.") : void 0; } } Object.assign(updates, { hydrateFallbackElement: /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](route.HydrateFallback), HydrateFallback: undefined }); } if (route.ErrorBoundary) { if (process.env.NODE_ENV !== "production") { if (route.errorElement) { process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["i" /* UNSAFE_warning */])(false, "You should not include both `ErrorBoundary` and `errorElement` on your route - " + "`ErrorBoundary` will be used.") : void 0; } } Object.assign(updates, { errorElement: /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react__["createElement"](route.ErrorBoundary), ErrorBoundary: undefined }); } return updates; } function createMemoryRouter(routes, opts) { return Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["n" /* createRouter */])({ basename: opts == null ? void 0 : opts.basename, future: _extends({}, opts == null ? void 0 : opts.future, { v7_prependBasename: true }), history: Object(__WEBPACK_IMPORTED_MODULE_1__remix_run_router__["l" /* createMemoryHistory */])({ initialEntries: opts == null ? void 0 : opts.initialEntries, initialIndex: opts == null ? void 0 : opts.initialIndex }), hydrationData: opts == null ? void 0 : opts.hydrationData, routes, mapRouteProperties, unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy, unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss }).initialize(); } //# sourceMappingURL=index.js.map /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(2))) /***/ }), /* 67 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; }); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } /***/ }), /* 68 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function bind(fn, thisArg) { return function wrap() { var args = new Array(arguments.length); for (var i = 0; i < args.length; i++) { args[i] = arguments[i]; } return fn.apply(thisArg, args); }; }; /***/ }), /* 69 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(13); var settle = __webpack_require__(130); var buildURL = __webpack_require__(132); var parseHeaders = __webpack_require__(133); var isURLSameOrigin = __webpack_require__(134); var createError = __webpack_require__(70); module.exports = function xhrAdapter(config) { return new Promise(function dispatchXhrRequest(resolve, reject) { var requestData = config.data; var requestHeaders = config.headers; if (utils.isFormData(requestData)) { delete requestHeaders['Content-Type']; // Let the browser set it } var request = new XMLHttpRequest(); // HTTP basic authentication if (config.auth) { var username = config.auth.username || ''; var password = config.auth.password || ''; requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); } request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); // Set the request timeout in MS request.timeout = config.timeout; // Listen for ready state request.onreadystatechange = function handleLoad() { if (!request || request.readyState !== 4) { return; } // The request errored out and we didn't get a response, this will be // handled by onerror instead // With one exception: request that using file: protocol, most browsers // will return status as 0 even though it's a successful request if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { return; } // Prepare the response var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; var response = { data: responseData, status: request.status, statusText: request.statusText, headers: responseHeaders, config: config, request: request }; settle(resolve, reject, response); // Clean up request request = null; }; // Handle low level network errors request.onerror = function handleError() { // Real errors are hidden from us by the browser // onerror should only fire if it's a network error reject(createError('Network Error', config, null, request)); // Clean up request request = null; }; // Handle timeout request.ontimeout = function handleTimeout() { reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', request)); // Clean up request request = null; }; // Add xsrf header // This is only done if running in a standard browser environment. // Specifically not if we're in a web worker, or react-native. if (utils.isStandardBrowserEnv()) { var cookies = __webpack_require__(135); // Add xsrf header var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined; if (xsrfValue) { requestHeaders[config.xsrfHeaderName] = xsrfValue; } } // Add headers to the request if ('setRequestHeader' in request) { utils.forEach(requestHeaders, function setRequestHeader(val, key) { if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { // Remove Content-Type if data is undefined delete requestHeaders[key]; } else { // Otherwise add header to the request request.setRequestHeader(key, val); } }); } // Add withCredentials to request if needed if (config.withCredentials) { request.withCredentials = true; } // Add responseType to request if needed if (config.responseType) { try { request.responseType = config.responseType; } catch (e) { // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. if (config.responseType !== 'json') { throw e; } } } // Handle progress if needed if (typeof config.onDownloadProgress === 'function') { request.addEventListener('progress', config.onDownloadProgress); } // Not all browsers support upload events if (typeof config.onUploadProgress === 'function' && request.upload) { request.upload.addEventListener('progress', config.onUploadProgress); } if (config.cancelToken) { // Handle cancellation config.cancelToken.promise.then(function onCanceled(cancel) { if (!request) { return; } request.abort(); reject(cancel); // Clean up request request = null; }); } if (requestData === undefined) { requestData = null; } // Send the request request.send(requestData); }); }; /***/ }), /* 70 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var enhanceError = __webpack_require__(131); /** * Create an Error with the specified message, config, error code, request and response. * * @param {string} message The error message. * @param {Object} config The config. * @param {string} [code] The error code (for example, 'ECONNABORTED'). * @param {Object} [request] The request. * @param {Object} [response] The response. * @returns {Error} The created error. */ module.exports = function createError(message, config, code, request, response) { var error = new Error(message); return enhanceError(error, config, code, request, response); }; /***/ }), /* 71 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function isCancel(value) { return !!(value && value.__CANCEL__); }; /***/ }), /* 72 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * A `Cancel` is an object that is thrown when an operation is canceled. * * @class * @param {string=} message The message. */ function Cancel(message) { this.message = message; } Cancel.prototype.toString = function toString() { return 'Cancel' + (this.message ? ': ' + this.message : ''); }; Cancel.prototype.__CANCEL__ = true; module.exports = Cancel; /***/ }), /* 73 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @type {import('./syntax')} */ module.exports = SyntaxError; /***/ }), /* 74 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var GetIntrinsic = __webpack_require__(25); var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); if ($gOPD) { try { $gOPD([], 'length'); } catch (e) { // IE 8 has a broken gOPD $gOPD = null; } } module.exports = $gOPD; /***/ }), /* 75 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var formats = __webpack_require__(45); var has = Object.prototype.hasOwnProperty; var isArray = Array.isArray; var hexTable = (function () { var array = []; for (var i = 0; i < 256; ++i) { array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); } return array; }()); var compactQueue = function compactQueue(queue) { while (queue.length > 1) { var item = queue.pop(); var obj = item.obj[item.prop]; if (isArray(obj)) { var compacted = []; for (var j = 0; j < obj.length; ++j) { if (typeof obj[j] !== 'undefined') { compacted.push(obj[j]); } } item.obj[item.prop] = compacted; } } }; var arrayToObject = function arrayToObject(source, options) { var obj = options && options.plainObjects ? Object.create(null) : {}; for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== 'undefined') { obj[i] = source[i]; } } return obj; }; var merge = function merge(target, source, options) { /* eslint no-param-reassign: 0 */ if (!source) { return target; } if (typeof source !== 'object') { if (isArray(target)) { target.push(source); } else if (target && typeof target === 'object') { if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { target[source] = true; } } else { return [target, source]; } return target; } if (!target || typeof target !== 'object') { return [target].concat(source); } var mergeTarget = target; if (isArray(target) && !isArray(source)) { mergeTarget = arrayToObject(target, options); } if (isArray(target) && isArray(source)) { source.forEach(function (item, i) { if (has.call(target, i)) { var targetItem = target[i]; if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { target[i] = merge(targetItem, item, options); } else { target.push(item); } } else { target[i] = item; } }); return target; } return Object.keys(source).reduce(function (acc, key) { var value = source[key]; if (has.call(acc, key)) { acc[key] = merge(acc[key], value, options); } else { acc[key] = value; } return acc; }, mergeTarget); }; var assign = function assignSingleSource(target, source) { return Object.keys(source).reduce(function (acc, key) { acc[key] = source[key]; return acc; }, target); }; var decode = function (str, decoder, charset) { var strWithoutPlus = str.replace(/\+/g, ' '); if (charset === 'iso-8859-1') { // unescape never throws, no try...catch needed: return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); } // utf-8 try { return decodeURIComponent(strWithoutPlus); } catch (e) { return strWithoutPlus; } }; var limit = 1024; /* eslint operator-linebreak: [2, "before"] */ var encode = function encode(str, defaultEncoder, charset, kind, format) { // This code was originally written by Brian White (mscdex) for the io.js core querystring library. // It has been adapted here for stricter adherence to RFC 3986 if (str.length === 0) { return str; } var string = str; if (typeof str === 'symbol') { string = Symbol.prototype.toString.call(str); } else if (typeof str !== 'string') { string = String(str); } if (charset === 'iso-8859-1') { return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; }); } var out = ''; for (var j = 0; j < string.length; j += limit) { var segment = string.length >= limit ? string.slice(j, j + limit) : string; var arr = []; for (var i = 0; i < segment.length; ++i) { var c = segment.charCodeAt(i); if ( c === 0x2D // - || c === 0x2E // . || c === 0x5F // _ || c === 0x7E // ~ || (c >= 0x30 && c <= 0x39) // 0-9 || (c >= 0x41 && c <= 0x5A) // a-z || (c >= 0x61 && c <= 0x7A) // A-Z || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) ) { arr[arr.length] = segment.charAt(i); continue; } if (c < 0x80) { arr[arr.length] = hexTable[c]; continue; } if (c < 0x800) { arr[arr.length] = hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]; continue; } if (c < 0xD800 || c >= 0xE000) { arr[arr.length] = hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; continue; } i += 1; c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF)); arr[arr.length] = hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; } out += arr.join(''); } return out; }; var compact = function compact(value) { var queue = [{ obj: { o: value }, prop: 'o' }]; var refs = []; for (var i = 0; i < queue.length; ++i) { var item = queue[i]; var obj = item.obj[item.prop]; var keys = Object.keys(obj); for (var j = 0; j < keys.length; ++j) { var key = keys[j]; var val = obj[key]; if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { queue.push({ obj: obj, prop: key }); refs.push(val); } } } compactQueue(queue); return value; }; var isRegExp = function isRegExp(obj) { return Object.prototype.toString.call(obj) === '[object RegExp]'; }; var isBuffer = function isBuffer(obj) { if (!obj || typeof obj !== 'object') { return false; } return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; var combine = function combine(a, b) { return [].concat(a, b); }; var maybeMap = function maybeMap(val, fn) { if (isArray(val)) { var mapped = []; for (var i = 0; i < val.length; i += 1) { mapped.push(fn(val[i])); } return mapped; } return fn(val); }; module.exports = { arrayToObject: arrayToObject, assign: assign, combine: combine, compact: compact, decode: decode, encode: encode, isBuffer: isBuffer, isRegExp: isRegExp, maybeMap: maybeMap, merge: merge }; /***/ }), /* 76 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Prefill = function (_Component) { _inherits(Prefill, _Component); function Prefill(props) { _classCallCheck(this, Prefill); return _possibleConstructorReturn(this, (Prefill.__proto__ || Object.getPrototypeOf(Prefill)).call(this, props)); } _createClass(Prefill, [{ key: 'render', value: function render() { var prefix = !_.isUndefined(this.props.prefix) ? this.props.prefix + '_' : ''; var message = !_.isUndefined(this.props.notice) && '' !== this.props.notice ? this.props.notice : (0, _utils.translate)('{{strong}}Note:{{/strong}} ' + 'Using WordPress Reserved Terms as query parameters may cause ' + 'unexpected form behavior. Find the complete list of ' + '{{link}}{{icon/}} WordPress Reserved Terms here{{/link}}.', { components: { strong: _react2.default.createElement('strong', null), link: _react2.default.createElement('a', { href: 'https://codex.wordpress.org/Reserved_Terms', target: '_blank' }), icon: _react2.default.createElement('span', { className: 'sui-icon-open-new-window', 'aria-hidden': 'true' }) } }); return _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Pre-populate'), labelDark: true, description: (0, _utils.translate)('You can pre-populate this field dynamically using ' + 'the query parameter passed in your form URL. Enter ' + 'the query parameter key to fetch its value from your ' + 'form URL below.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Query parameter (optional)'), description: message, placeholder: (0, _utils.translate)('E.g. query_parameter_key'), property: prefix + 'prefill', inputStyles: { maxWidth: 240 + 'px' } })) ); } }]); return Prefill; }(_react.Component); exports.default = Prefill; /***/ }), /* 77 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.renderBlock = renderBlock; var _reactDom = __webpack_require__(23); var _client = __webpack_require__(85); var _semver = __webpack_require__(86); var _semver2 = _interopRequireDefault(_semver); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * render Block **/ function renderBlock(containerId, element) { var container = document.getElementById(containerId); // If container is hidden in PHP. if (_.isNull(container)) { return; } if (_semver2.default.gte(_reactDom.version, '18.0.0')) { // React 18 or higher. var root = (0, _client.createRoot)(container); root.render(element); } else { (0, _reactDom.render)(element, container); } } /***/ }), /* 78 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var l=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z=Symbol.iterator;function A(a){if(null===a||"object"!==typeof a)return null;a=z&&a[z]||a["@@iterator"];return"function"===typeof a?a:null} var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={}; E.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F; H.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0}; function M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return{$$typeof:l,type:a,key:k,ref:h,props:c,_owner:K.current}} function N(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return"object"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g;function Q(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)} function R(a,b,e,d,c){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case l:case n:h=!0}}if(h)return h=a,c=c(h),a=""===d?"."+Q(h,0):d,I(c)?(e="",null!=a&&(e=a.replace(P,"$&/")+"/"),R(c,b,e,"",function(a){return a})):null!=c&&(O(c)&&(c=N(c,e+(!c.key||h&&h.key===c.key?"":(""+c.key).replace(P,"$&/")+"/")+a)),b.push(c)),1;h=0;d=""===d?".":d+":";if(I(a))for(var g=0;g<a.length;g++){k= a[g];var f=d+Q(k,g);h+=R(k,b,e,f,c)}else if(f=A(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+Q(k,g++),h+=R(k,b,e,f,c);else if("object"===k)throw b=String(a),Error("Objects are not valid as a React child (found: "+("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return h} function S(a,b,e){if(null==a)return a;var d=[],c=0;R(a,d,"","",function(a){return b.call(e,a,c++)});return d}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;} var U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};function X(){throw Error("act(...) is not supported in production builds of React.");} exports.Children={map:S,forEach:function(a,b,e){S(a,function(){b.apply(this,arguments)},e)},count:function(a){var b=0;S(a,function(){b++});return b},toArray:function(a){return S(a,function(a){return a})||[]},only:function(a){if(!O(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};exports.Component=E;exports.Fragment=p;exports.Profiler=r;exports.PureComponent=G;exports.StrictMode=q;exports.Suspense=w; exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;exports.act=X; exports.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var d=C({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=K.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f); for(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g}return{$$typeof:l,type:a.type,key:c,ref:k,props:d,_owner:h}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}}; exports.forwardRef=function(a){return{$$typeof:v,render:a}};exports.isValidElement=O;exports.lazy=function(a){return{$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};exports.memo=function(a,b){return{$$typeof:x,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=V.transition;V.transition={};try{a()}finally{V.transition=b}};exports.unstable_act=X;exports.useCallback=function(a,b){return U.current.useCallback(a,b)};exports.useContext=function(a){return U.current.useContext(a)}; exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return U.current.useDeferredValue(a)};exports.useEffect=function(a,b){return U.current.useEffect(a,b)};exports.useId=function(){return U.current.useId()};exports.useImperativeHandle=function(a,b,e){return U.current.useImperativeHandle(a,b,e)};exports.useInsertionEffect=function(a,b){return U.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return U.current.useLayoutEffect(a,b)}; exports.useMemo=function(a,b){return U.current.useMemo(a,b)};exports.useReducer=function(a,b,e){return U.current.useReducer(a,b,e)};exports.useRef=function(a){return U.current.useRef(a)};exports.useState=function(a){return U.current.useState(a)};exports.useSyncExternalStore=function(a,b,e){return U.current.useSyncExternalStore(a,b,e)};exports.useTransition=function(){return U.current.useTransition()};exports.version="18.3.1"; /***/ }), /* 79 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process, module) {/** * @license React * react.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (process.env.NODE_ENV !== "production") { (function() { 'use strict'; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === 'function' ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } var ReactVersion = '18.3.1'; // ATTENTION // When adding new symbols to this file, // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' // The Symbol used to tag the ReactElement-like types. var REACT_ELEMENT_TYPE = Symbol.for('react.element'); var REACT_PORTAL_TYPE = Symbol.for('react.portal'); var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); var REACT_PROFILER_TYPE = Symbol.for('react.profiler'); var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); var REACT_CONTEXT_TYPE = Symbol.for('react.context'); var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'); var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'); var REACT_MEMO_TYPE = Symbol.for('react.memo'); var REACT_LAZY_TYPE = Symbol.for('react.lazy'); var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen'); var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; function getIteratorFn(maybeIterable) { if (maybeIterable === null || typeof maybeIterable !== 'object') { return null; } var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; if (typeof maybeIterator === 'function') { return maybeIterator; } return null; } /** * Keeps track of the current dispatcher. */ var ReactCurrentDispatcher = { /** * @internal * @type {ReactComponent} */ current: null }; /** * Keeps track of the current batch's configuration such as how long an update * should suspend for if it needs to. */ var ReactCurrentBatchConfig = { transition: null }; var ReactCurrentActQueue = { current: null, // Used to reproduce behavior of `batchedUpdates` in legacy mode. isBatchingLegacy: false, didScheduleLegacyUpdate: false }; /** * Keeps track of the current owner. * * The current owner is the component who should own any components that are * currently being constructed. */ var ReactCurrentOwner = { /** * @internal * @type {ReactComponent} */ current: null }; var ReactDebugCurrentFrame = {}; var currentExtraStackFrame = null; function setExtraStackFrame(stack) { { currentExtraStackFrame = stack; } } { ReactDebugCurrentFrame.setExtraStackFrame = function (stack) { { currentExtraStackFrame = stack; } }; // Stack implementation injected by the current renderer. ReactDebugCurrentFrame.getCurrentStack = null; ReactDebugCurrentFrame.getStackAddendum = function () { var stack = ''; // Add an extra top frame while an element is being validated if (currentExtraStackFrame) { stack += currentExtraStackFrame; } // Delegate to the injected renderer-specific implementation var impl = ReactDebugCurrentFrame.getCurrentStack; if (impl) { stack += impl() || ''; } return stack; }; } // ----------------------------------------------------------------------------- var enableScopeAPI = false; // Experimental Create Event Handle API. var enableCacheElement = false; var enableTransitionTracing = false; // No known bugs, but needs performance testing var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber // stuff. Intended to enable React core members to more easily debug scheduling // issues in DEV builds. var enableDebugTracing = false; // Track which Fiber(s) schedule render work. var ReactSharedInternals = { ReactCurrentDispatcher: ReactCurrentDispatcher, ReactCurrentBatchConfig: ReactCurrentBatchConfig, ReactCurrentOwner: ReactCurrentOwner }; { ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame; ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue; } // by calls to these methods by a Babel plugin. // // In PROD (or in packages without access to React internals), // they are left as they are instead. function warn(format) { { { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } printWarning('warn', format, args); } } } function error(format) { { { for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } printWarning('error', format, args); } } } function printWarning(level, format, args) { // When changing this logic, you might want to also // update consoleWithStackDev.www.js as well. { var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var stack = ReactDebugCurrentFrame.getStackAddendum(); if (stack !== '') { format += '%s'; args = args.concat([stack]); } // eslint-disable-next-line react-internal/safe-string-coercion var argsWithFormat = args.map(function (item) { return String(item); }); // Careful: RN currently depends on this prefix argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it // breaks IE9: https://github.com/facebook/react/issues/13610 // eslint-disable-next-line react-internal/no-production-logging Function.prototype.apply.call(console[level], console, argsWithFormat); } } var didWarnStateUpdateForUnmountedComponent = {}; function warnNoop(publicInstance, callerName) { { var _constructor = publicInstance.constructor; var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass'; var warningKey = componentName + "." + callerName; if (didWarnStateUpdateForUnmountedComponent[warningKey]) { return; } error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName); didWarnStateUpdateForUnmountedComponent[warningKey] = true; } } /** * This is the abstract API for an update queue. */ var ReactNoopUpdateQueue = { /** * Checks whether or not this composite component is mounted. * @param {ReactClass} publicInstance The instance we want to test. * @return {boolean} True if mounted, false otherwise. * @protected * @final */ isMounted: function (publicInstance) { return false; }, /** * Forces an update. This should only be invoked when it is known with * certainty that we are **not** in a DOM transaction. * * You may want to call this when you know that some deeper aspect of the * component's state has changed but `setState` was not called. * * This will not invoke `shouldComponentUpdate`, but it will invoke * `componentWillUpdate` and `componentDidUpdate`. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {?function} callback Called after component is updated. * @param {?string} callerName name of the calling function in the public API. * @internal */ enqueueForceUpdate: function (publicInstance, callback, callerName) { warnNoop(publicInstance, 'forceUpdate'); }, /** * Replaces all of the state. Always use this or `setState` to mutate state. * You should treat `this.state` as immutable. * * There is no guarantee that `this.state` will be immediately updated, so * accessing `this.state` after calling this method may return the old value. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {object} completeState Next state. * @param {?function} callback Called after component is updated. * @param {?string} callerName name of the calling function in the public API. * @internal */ enqueueReplaceState: function (publicInstance, completeState, callback, callerName) { warnNoop(publicInstance, 'replaceState'); }, /** * Sets a subset of the state. This only exists because _pendingState is * internal. This provides a merging strategy that is not available to deep * properties which is confusing. TODO: Expose pendingState or don't use it * during the merge. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {object} partialState Next partial state to be merged with state. * @param {?function} callback Called after component is updated. * @param {?string} Name of the calling function in the public API. * @internal */ enqueueSetState: function (publicInstance, partialState, callback, callerName) { warnNoop(publicInstance, 'setState'); } }; var assign = Object.assign; var emptyObject = {}; { Object.freeze(emptyObject); } /** * Base class helpers for the updating state of a component. */ function Component(props, context, updater) { this.props = props; this.context = context; // If a component has string refs, we will assign a different object later. this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. this.updater = updater || ReactNoopUpdateQueue; } Component.prototype.isReactComponent = {}; /** * Sets a subset of the state. Always use this to mutate * state. You should treat `this.state` as immutable. * * There is no guarantee that `this.state` will be immediately updated, so * accessing `this.state` after calling this method may return the old value. * * There is no guarantee that calls to `setState` will run synchronously, * as they may eventually be batched together. You can provide an optional * callback that will be executed when the call to setState is actually * completed. * * When a function is provided to setState, it will be called at some point in * the future (not synchronously). It will be called with the up to date * component arguments (state, props, context). These values can be different * from this.* because your function may be called after receiveProps but before * shouldComponentUpdate, and this new state, props, and context will not yet be * assigned to this. * * @param {object|function} partialState Next partial state or function to * produce next partial state to be merged with current state. * @param {?function} callback Called after state is updated. * @final * @protected */ Component.prototype.setState = function (partialState, callback) { if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) { throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.'); } this.updater.enqueueSetState(this, partialState, callback, 'setState'); }; /** * Forces an update. This should only be invoked when it is known with * certainty that we are **not** in a DOM transaction. * * You may want to call this when you know that some deeper aspect of the * component's state has changed but `setState` was not called. * * This will not invoke `shouldComponentUpdate`, but it will invoke * `componentWillUpdate` and `componentDidUpdate`. * * @param {?function} callback Called after update is complete. * @final * @protected */ Component.prototype.forceUpdate = function (callback) { this.updater.enqueueForceUpdate(this, callback, 'forceUpdate'); }; /** * Deprecated APIs. These APIs used to exist on classic React classes but since * we would like to deprecate them, we're not going to move them over to this * modern base class. Instead, we define a getter that warns if it's accessed. */ { var deprecatedAPIs = { isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] }; var defineDeprecationWarning = function (methodName, info) { Object.defineProperty(Component.prototype, methodName, { get: function () { warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); return undefined; } }); }; for (var fnName in deprecatedAPIs) { if (deprecatedAPIs.hasOwnProperty(fnName)) { defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); } } } function ComponentDummy() {} ComponentDummy.prototype = Component.prototype; /** * Convenience component with default shallow equality check for sCU. */ function PureComponent(props, context, updater) { this.props = props; this.context = context; // If a component has string refs, we will assign a different object later. this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; } var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods. assign(pureComponentPrototype, Component.prototype); pureComponentPrototype.isPureReactComponent = true; // an immutable object with a single mutable value function createRef() { var refObject = { current: null }; { Object.seal(refObject); } return refObject; } var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare function isArray(a) { return isArrayImpl(a); } /* * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol * and Temporal.* types. See https://github.com/facebook/react/pull/22064. * * The functions in this module will throw an easier-to-understand, * easier-to-debug exception with a clear errors message message explaining the * problem. (Instead of a confusing exception thrown inside the implementation * of the `value` object). */ // $FlowFixMe only called in DEV, so void return is not possible. function typeName(value) { { // toStringTag is needed for namespaced types like Temporal.Instant var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag; var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; return type; } } // $FlowFixMe only called in DEV, so void return is not possible. function willCoercionThrow(value) { { try { testStringCoercion(value); return false; } catch (e) { return true; } } } function testStringCoercion(value) { // If you ended up here by following an exception call stack, here's what's // happened: you supplied an object or symbol value to React (as a prop, key, // DOM attribute, CSS property, string ref, etc.) and when React tried to // coerce it to a string using `'' + value`, an exception was thrown. // // The most common types that will cause this exception are `Symbol` instances // and Temporal objects like `Temporal.Instant`. But any object that has a // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this // exception. (Library authors do this to prevent users from using built-in // numeric operators like `+` or comparison operators like `>=` because custom // methods are needed to perform accurate arithmetic or comparison.) // // To fix the problem, coerce this object or symbol value to a string before // passing it to React. The most reliable way is usually `String(value)`. // // To find which value is throwing, check the browser or debugger console. // Before this exception was thrown, there should be `console.error` output // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the // problem and how that type was used: key, atrribute, input value prop, etc. // In most cases, this console output also shows the component and its // ancestor components where the exception happened. // // eslint-disable-next-line react-internal/safe-string-coercion return '' + value; } function checkKeyStringCoercion(value) { { if (willCoercionThrow(value)) { error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value)); return testStringCoercion(value); // throw (to help callers find troubleshooting comments) } } } function getWrappedName(outerType, innerType, wrapperName) { var displayName = outerType.displayName; if (displayName) { return displayName; } var functionName = innerType.displayName || innerType.name || ''; return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName; } // Keep in sync with react-reconciler/getComponentNameFromFiber function getContextName(type) { return type.displayName || 'Context'; } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. function getComponentNameFromType(type) { if (type == null) { // Host root, text node or just invalid type. return null; } { if (typeof type.tag === 'number') { error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.'); } } if (typeof type === 'function') { return type.displayName || type.name || null; } if (typeof type === 'string') { return type; } switch (type) { case REACT_FRAGMENT_TYPE: return 'Fragment'; case REACT_PORTAL_TYPE: return 'Portal'; case REACT_PROFILER_TYPE: return 'Profiler'; case REACT_STRICT_MODE_TYPE: return 'StrictMode'; case REACT_SUSPENSE_TYPE: return 'Suspense'; case REACT_SUSPENSE_LIST_TYPE: return 'SuspenseList'; } if (typeof type === 'object') { switch (type.$$typeof) { case REACT_CONTEXT_TYPE: var context = type; return getContextName(context) + '.Consumer'; case REACT_PROVIDER_TYPE: var provider = type; return getContextName(provider._context) + '.Provider'; case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, 'ForwardRef'); case REACT_MEMO_TYPE: var outerName = type.displayName || null; if (outerName !== null) { return outerName; } return getComponentNameFromType(type.type) || 'Memo'; case REACT_LAZY_TYPE: { var lazyComponent = type; var payload = lazyComponent._payload; var init = lazyComponent._init; try { return getComponentNameFromType(init(payload)); } catch (x) { return null; } } // eslint-disable-next-line no-fallthrough } } return null; } var hasOwnProperty = Object.prototype.hasOwnProperty; var RESERVED_PROPS = { key: true, ref: true, __self: true, __source: true }; var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; { didWarnAboutStringRefs = {}; } function hasValidRef(config) { { if (hasOwnProperty.call(config, 'ref')) { var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; if (getter && getter.isReactWarning) { return false; } } } return config.ref !== undefined; } function hasValidKey(config) { { if (hasOwnProperty.call(config, 'key')) { var getter = Object.getOwnPropertyDescriptor(config, 'key').get; if (getter && getter.isReactWarning) { return false; } } } return config.key !== undefined; } function defineKeyPropWarningGetter(props, displayName) { var warnAboutAccessingKey = function () { { if (!specialPropKeyWarningShown) { specialPropKeyWarningShown = true; error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); } } }; warnAboutAccessingKey.isReactWarning = true; Object.defineProperty(props, 'key', { get: warnAboutAccessingKey, configurable: true }); } function defineRefPropWarningGetter(props, displayName) { var warnAboutAccessingRef = function () { { if (!specialPropRefWarningShown) { specialPropRefWarningShown = true; error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); } } }; warnAboutAccessingRef.isReactWarning = true; Object.defineProperty(props, 'ref', { get: warnAboutAccessingRef, configurable: true }); } function warnIfStringRefCannotBeAutoConverted(config) { { if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); if (!didWarnAboutStringRefs[componentName]) { error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref); didWarnAboutStringRefs[componentName] = true; } } } } /** * Factory method to create a new React element. This no longer adheres to * the class pattern, so do not use new to call it. Also, instanceof check * will not work. Instead test $$typeof field against Symbol.for('react.element') to check * if something is a React Element. * * @param {*} type * @param {*} props * @param {*} key * @param {string|object} ref * @param {*} owner * @param {*} self A *temporary* helper to detect places where `this` is * different from the `owner` when React.createElement is called, so that we * can warn. We want to get rid of owner and replace string `ref`s with arrow * functions, and as long as `this` and owner are the same, there will be no * change in behavior. * @param {*} source An annotation object (added by a transpiler or otherwise) * indicating filename, line number, and/or other information. * @internal */ var ReactElement = function (type, key, ref, self, source, owner, props) { var element = { // This tag allows us to uniquely identify this as a React Element $$typeof: REACT_ELEMENT_TYPE, // Built-in properties that belong on the element type: type, key: key, ref: ref, props: props, // Record the component responsible for creating this element. _owner: owner }; { // The validation flag is currently mutative. We put it on // an external backing store so that we can freeze the whole object. // This can be replaced with a WeakMap once they are implemented in // commonly used development environments. element._store = {}; // To make comparing ReactElements easier for testing purposes, we make // the validation flag non-enumerable (where possible, which should // include every environment we run tests in), so the test framework // ignores it. Object.defineProperty(element._store, 'validated', { configurable: false, enumerable: false, writable: true, value: false }); // self and source are DEV only properties. Object.defineProperty(element, '_self', { configurable: false, enumerable: false, writable: false, value: self }); // Two elements created in two different places should be considered // equal for testing purposes and therefore we hide it from enumeration. Object.defineProperty(element, '_source', { configurable: false, enumerable: false, writable: false, value: source }); if (Object.freeze) { Object.freeze(element.props); Object.freeze(element); } } return element; }; /** * Create and return a new ReactElement of the given type. * See https://reactjs.org/docs/react-api.html#createelement */ function createElement(type, config, children) { var propName; // Reserved names are extracted var props = {}; var key = null; var ref = null; var self = null; var source = null; if (config != null) { if (hasValidRef(config)) { ref = config.ref; { warnIfStringRefCannotBeAutoConverted(config); } } if (hasValidKey(config)) { { checkKeyStringCoercion(config.key); } key = '' + config.key; } self = config.__self === undefined ? null : config.__self; source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object for (propName in config) { if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } } // Children can be more than one argument, and those are transferred onto // the newly allocated props object. var childrenLength = arguments.length - 2; if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 2]; } { if (Object.freeze) { Object.freeze(childArray); } } props.children = childArray; } // Resolve default props if (type && type.defaultProps) { var defaultProps = type.defaultProps; for (propName in defaultProps) { if (props[propName] === undefined) { props[propName] = defaultProps[propName]; } } } { if (key || ref) { var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; if (key) { defineKeyPropWarningGetter(props, displayName); } if (ref) { defineRefPropWarningGetter(props, displayName); } } } return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); } function cloneAndReplaceKey(oldElement, newKey) { var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); return newElement; } /** * Clone and return a new ReactElement using element as the starting point. * See https://reactjs.org/docs/react-api.html#cloneelement */ function cloneElement(element, config, children) { if (element === null || element === undefined) { throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + "."); } var propName; // Original props are copied var props = assign({}, element.props); // Reserved names are extracted var key = element.key; var ref = element.ref; // Self is preserved since the owner is preserved. var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a // transpiler, and the original source is probably a better indicator of the // true owner. var source = element._source; // Owner will be preserved, unless ref is overridden var owner = element._owner; if (config != null) { if (hasValidRef(config)) { // Silently steal the ref from the parent. ref = config.ref; owner = ReactCurrentOwner.current; } if (hasValidKey(config)) { { checkKeyStringCoercion(config.key); } key = '' + config.key; } // Remaining properties override existing props var defaultProps; if (element.type && element.type.defaultProps) { defaultProps = element.type.defaultProps; } for (propName in config) { if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { if (config[propName] === undefined && defaultProps !== undefined) { // Resolve default props props[propName] = defaultProps[propName]; } else { props[propName] = config[propName]; } } } } // Children can be more than one argument, and those are transferred onto // the newly allocated props object. var childrenLength = arguments.length - 2; if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 2]; } props.children = childArray; } return ReactElement(element.type, key, ref, self, source, owner, props); } /** * Verifies the object is a ReactElement. * See https://reactjs.org/docs/react-api.html#isvalidelement * @param {?object} object * @return {boolean} True if `object` is a ReactElement. * @final */ function isValidElement(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } var SEPARATOR = '.'; var SUBSEPARATOR = ':'; /** * Escape and wrap key so it is safe to use as a reactid * * @param {string} key to be escaped. * @return {string} the escaped key. */ function escape(key) { var escapeRegex = /[=:]/g; var escaperLookup = { '=': '=0', ':': '=2' }; var escapedString = key.replace(escapeRegex, function (match) { return escaperLookup[match]; }); return '$' + escapedString; } /** * TODO: Test that a single child and an array with one item have the same key * pattern. */ var didWarnAboutMaps = false; var userProvidedKeyEscapeRegex = /\/+/g; function escapeUserProvidedKey(text) { return text.replace(userProvidedKeyEscapeRegex, '$&/'); } /** * Generate a key string that identifies a element within a set. * * @param {*} element A element that could contain a manual key. * @param {number} index Index that is used if a manual key is not provided. * @return {string} */ function getElementKey(element, index) { // Do some typechecking here since we call this blindly. We want to ensure // that we don't block potential future ES APIs. if (typeof element === 'object' && element !== null && element.key != null) { // Explicit key { checkKeyStringCoercion(element.key); } return escape('' + element.key); } // Implicit key determined by the index in the set return index.toString(36); } function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { var type = typeof children; if (type === 'undefined' || type === 'boolean') { // All of the above are perceived as null. children = null; } var invokeCallback = false; if (children === null) { invokeCallback = true; } else { switch (type) { case 'string': case 'number': invokeCallback = true; break; case 'object': switch (children.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = true; } } } if (invokeCallback) { var _child = children; var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array // so that it's consistent if the number of children grows: var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar; if (isArray(mappedChild)) { var escapedChildKey = ''; if (childKey != null) { escapedChildKey = escapeUserProvidedKey(childKey) + '/'; } mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) { return c; }); } else if (mappedChild != null) { if (isValidElement(mappedChild)) { { // The `if` statement here prevents auto-disabling of the safe // coercion ESLint rule, so we must manually disable it below. // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) { checkKeyStringCoercion(mappedChild.key); } } mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as // traverseAllChildren used to do for objects as children escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number // eslint-disable-next-line react-internal/safe-string-coercion escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey); } array.push(mappedChild); } return 1; } var child; var nextName; var subtreeCount = 0; // Count of children found in the current subtree. var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; if (isArray(children)) { for (var i = 0; i < children.length; i++) { child = children[i]; nextName = nextNamePrefix + getElementKey(child, i); subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); } } else { var iteratorFn = getIteratorFn(children); if (typeof iteratorFn === 'function') { var iterableChildren = children; { // Warn about using Maps as children if (iteratorFn === iterableChildren.entries) { if (!didWarnAboutMaps) { warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.'); } didWarnAboutMaps = true; } } var iterator = iteratorFn.call(iterableChildren); var step; var ii = 0; while (!(step = iterator.next()).done) { child = step.value; nextName = nextNamePrefix + getElementKey(child, ii++); subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); } } else if (type === 'object') { // eslint-disable-next-line react-internal/safe-string-coercion var childrenString = String(children); throw new Error("Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.'); } } return subtreeCount; } /** * Maps children that are typically specified as `props.children`. * * See https://reactjs.org/docs/react-api.html#reactchildrenmap * * The provided mapFunction(child, index) will be called for each * leaf child. * * @param {?*} children Children tree container. * @param {function(*, int)} func The map function. * @param {*} context Context for mapFunction. * @return {object} Object containing the ordered map of results. */ function mapChildren(children, func, context) { if (children == null) { return children; } var result = []; var count = 0; mapIntoArray(children, result, '', '', function (child) { return func.call(context, child, count++); }); return result; } /** * Count the number of children that are typically specified as * `props.children`. * * See https://reactjs.org/docs/react-api.html#reactchildrencount * * @param {?*} children Children tree container. * @return {number} The number of children. */ function countChildren(children) { var n = 0; mapChildren(children, function () { n++; // Don't return anything }); return n; } /** * Iterates through children that are typically specified as `props.children`. * * See https://reactjs.org/docs/react-api.html#reactchildrenforeach * * The provided forEachFunc(child, index) will be called for each * leaf child. * * @param {?*} children Children tree container. * @param {function(*, int)} forEachFunc * @param {*} forEachContext Context for forEachContext. */ function forEachChildren(children, forEachFunc, forEachContext) { mapChildren(children, function () { forEachFunc.apply(this, arguments); // Don't return anything. }, forEachContext); } /** * Flatten a children object (typically specified as `props.children`) and * return an array with appropriately re-keyed children. * * See https://reactjs.org/docs/react-api.html#reactchildrentoarray */ function toArray(children) { return mapChildren(children, function (child) { return child; }) || []; } /** * Returns the first child in a collection of children and verifies that there * is only one child in the collection. * * See https://reactjs.org/docs/react-api.html#reactchildrenonly * * The current implementation of this function assumes that a single child gets * passed without a wrapper, but the purpose of this helper function is to * abstract away the particular structure of children. * * @param {?object} children Child collection structure. * @return {ReactElement} The first and only `ReactElement` contained in the * structure. */ function onlyChild(children) { if (!isValidElement(children)) { throw new Error('React.Children.only expected to receive a single React element child.'); } return children; } function createContext(defaultValue) { // TODO: Second argument used to be an optional `calculateChangedBits` // function. Warn to reserve for future use? var context = { $$typeof: REACT_CONTEXT_TYPE, // As a workaround to support multiple concurrent renderers, we categorize // some renderers as primary and others as secondary. We only expect // there to be two concurrent renderers at most: React Native (primary) and // Fabric (secondary); React DOM (primary) and React ART (secondary). // Secondary renderers store their context values on separate fields. _currentValue: defaultValue, _currentValue2: defaultValue, // Used to track how many concurrent renderers this context currently // supports within in a single renderer. Such as parallel server rendering. _threadCount: 0, // These are circular Provider: null, Consumer: null, // Add these to use same hidden class in VM as ServerContext _defaultValue: null, _globalName: null }; context.Provider = { $$typeof: REACT_PROVIDER_TYPE, _context: context }; var hasWarnedAboutUsingNestedContextConsumers = false; var hasWarnedAboutUsingConsumerProvider = false; var hasWarnedAboutDisplayNameOnConsumer = false; { // A separate object, but proxies back to the original context object for // backwards compatibility. It has a different $$typeof, so we can properly // warn for the incorrect usage of Context as a Consumer. var Consumer = { $$typeof: REACT_CONTEXT_TYPE, _context: context }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here Object.defineProperties(Consumer, { Provider: { get: function () { if (!hasWarnedAboutUsingConsumerProvider) { hasWarnedAboutUsingConsumerProvider = true; error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?'); } return context.Provider; }, set: function (_Provider) { context.Provider = _Provider; } }, _currentValue: { get: function () { return context._currentValue; }, set: function (_currentValue) { context._currentValue = _currentValue; } }, _currentValue2: { get: function () { return context._currentValue2; }, set: function (_currentValue2) { context._currentValue2 = _currentValue2; } }, _threadCount: { get: function () { return context._threadCount; }, set: function (_threadCount) { context._threadCount = _threadCount; } }, Consumer: { get: function () { if (!hasWarnedAboutUsingNestedContextConsumers) { hasWarnedAboutUsingNestedContextConsumers = true; error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?'); } return context.Consumer; } }, displayName: { get: function () { return context.displayName; }, set: function (displayName) { if (!hasWarnedAboutDisplayNameOnConsumer) { warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName); hasWarnedAboutDisplayNameOnConsumer = true; } } } }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty context.Consumer = Consumer; } { context._currentRenderer = null; context._currentRenderer2 = null; } return context; } var Uninitialized = -1; var Pending = 0; var Resolved = 1; var Rejected = 2; function lazyInitializer(payload) { if (payload._status === Uninitialized) { var ctor = payload._result; var thenable = ctor(); // Transition to the next state. // This might throw either because it's missing or throws. If so, we treat it // as still uninitialized and try again next time. Which is the same as what // happens if the ctor or any wrappers processing the ctor throws. This might // end up fixing it if the resolution was a concurrency bug. thenable.then(function (moduleObject) { if (payload._status === Pending || payload._status === Uninitialized) { // Transition to the next state. var resolved = payload; resolved._status = Resolved; resolved._result = moduleObject; } }, function (error) { if (payload._status === Pending || payload._status === Uninitialized) { // Transition to the next state. var rejected = payload; rejected._status = Rejected; rejected._result = error; } }); if (payload._status === Uninitialized) { // In case, we're still uninitialized, then we're waiting for the thenable // to resolve. Set it as pending in the meantime. var pending = payload; pending._status = Pending; pending._result = thenable; } } if (payload._status === Resolved) { var moduleObject = payload._result; { if (moduleObject === undefined) { error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies. 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))\n\n" + 'Did you accidentally put curly braces around the import?', moduleObject); } } { if (!('default' in moduleObject)) { error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies. 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject); } } return moduleObject.default; } else { throw payload._result; } } function lazy(ctor) { var payload = { // We use these fields to store the result. _status: Uninitialized, _result: ctor }; var lazyType = { $$typeof: REACT_LAZY_TYPE, _payload: payload, _init: lazyInitializer }; { // In production, this would just set it on the object. var defaultProps; var propTypes; // $FlowFixMe Object.defineProperties(lazyType, { defaultProps: { configurable: true, get: function () { return defaultProps; }, set: function (newDefaultProps) { error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.'); defaultProps = newDefaultProps; // Match production behavior more closely: // $FlowFixMe Object.defineProperty(lazyType, 'defaultProps', { enumerable: true }); } }, propTypes: { configurable: true, get: function () { return propTypes; }, set: function (newPropTypes) { error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.'); propTypes = newPropTypes; // Match production behavior more closely: // $FlowFixMe Object.defineProperty(lazyType, 'propTypes', { enumerable: true }); } } }); } return lazyType; } function forwardRef(render) { { if (render != null && render.$$typeof === REACT_MEMO_TYPE) { error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).'); } else if (typeof render !== 'function') { error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render); } else { if (render.length !== 0 && render.length !== 2) { error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.'); } } if (render != null) { if (render.defaultProps != null || render.propTypes != null) { error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?'); } } } var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render }; { var ownName; Object.defineProperty(elementType, 'displayName', { enumerable: false, configurable: true, get: function () { return ownName; }, set: function (name) { ownName = name; // The inner component shouldn't inherit this display name in most cases, // because the component may be used elsewhere. // But it's nice for anonymous functions to inherit the name, // so that our component-stack generation logic will display their frames. // An anonymous function generally suggests a pattern like: // React.forwardRef((props, ref) => {...}); // This kind of inner function is not used elsewhere so the side effect is okay. if (!render.name && !render.displayName) { render.displayName = name; } } }); } return elementType; } var REACT_MODULE_REFERENCE; { REACT_MODULE_REFERENCE = Symbol.for('react.module.reference'); } function isValidElementType(type) { if (typeof type === 'string' || typeof type === 'function') { return true; } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) { return true; } if (typeof type === 'object' && type !== null) { if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) { return true; } } return false; } function memo(type, compare) { { if (!isValidElementType(type)) { error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type); } } var elementType = { $$typeof: REACT_MEMO_TYPE, type: type, compare: compare === undefined ? null : compare }; { var ownName; Object.defineProperty(elementType, 'displayName', { enumerable: false, configurable: true, get: function () { return ownName; }, set: function (name) { ownName = name; // The inner component shouldn't inherit this display name in most cases, // because the component may be used elsewhere. // But it's nice for anonymous functions to inherit the name, // so that our component-stack generation logic will display their frames. // An anonymous function generally suggests a pattern like: // React.memo((props) => {...}); // This kind of inner function is not used elsewhere so the side effect is okay. if (!type.name && !type.displayName) { type.displayName = name; } } }); } return elementType; } function resolveDispatcher() { var dispatcher = ReactCurrentDispatcher.current; { if (dispatcher === null) { error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.'); } } // Will result in a null access error if accessed outside render phase. We // intentionally don't throw our own error because this is in a hot path. // Also helps ensure this is inlined. return dispatcher; } function useContext(Context) { var dispatcher = resolveDispatcher(); { // TODO: add a more generic warning for invalid values. if (Context._context !== undefined) { var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs // and nobody should be using this in existing code. if (realContext.Consumer === Context) { error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?'); } else if (realContext.Provider === Context) { error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?'); } } } return dispatcher.useContext(Context); } function useState(initialState) { var dispatcher = resolveDispatcher(); return dispatcher.useState(initialState); } function useReducer(reducer, initialArg, init) { var dispatcher = resolveDispatcher(); return dispatcher.useReducer(reducer, initialArg, init); } function useRef(initialValue) { var dispatcher = resolveDispatcher(); return dispatcher.useRef(initialValue); } function useEffect(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useEffect(create, deps); } function useInsertionEffect(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useInsertionEffect(create, deps); } function useLayoutEffect(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useLayoutEffect(create, deps); } function useCallback(callback, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useCallback(callback, deps); } function useMemo(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useMemo(create, deps); } function useImperativeHandle(ref, create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useImperativeHandle(ref, create, deps); } function useDebugValue(value, formatterFn) { { var dispatcher = resolveDispatcher(); return dispatcher.useDebugValue(value, formatterFn); } } function useTransition() { var dispatcher = resolveDispatcher(); return dispatcher.useTransition(); } function useDeferredValue(value) { var dispatcher = resolveDispatcher(); return dispatcher.useDeferredValue(value); } function useId() { var dispatcher = resolveDispatcher(); return dispatcher.useId(); } function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { var dispatcher = resolveDispatcher(); return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); } // Helpers to patch console.logs to avoid logging during side-effect free // replaying on render function. This currently only patches the object // lazily which won't cover if the log function was extracted eagerly. // We could also eagerly patch the method. var disabledDepth = 0; var prevLog; var prevInfo; var prevWarn; var prevError; var prevGroup; var prevGroupCollapsed; var prevGroupEnd; function disabledLog() {} disabledLog.__reactDisabledLog = true; function disableLogs() { { if (disabledDepth === 0) { /* eslint-disable react-internal/no-production-logging */ prevLog = console.log; prevInfo = console.info; prevWarn = console.warn; prevError = console.error; prevGroup = console.group; prevGroupCollapsed = console.groupCollapsed; prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099 var props = { configurable: true, enumerable: true, value: disabledLog, writable: true }; // $FlowFixMe Flow thinks console is immutable. Object.defineProperties(console, { info: props, log: props, warn: props, error: props, group: props, groupCollapsed: props, groupEnd: props }); /* eslint-enable react-internal/no-production-logging */ } disabledDepth++; } } function reenableLogs() { { disabledDepth--; if (disabledDepth === 0) { /* eslint-disable react-internal/no-production-logging */ var props = { configurable: true, enumerable: true, writable: true }; // $FlowFixMe Flow thinks console is immutable. Object.defineProperties(console, { log: assign({}, props, { value: prevLog }), info: assign({}, props, { value: prevInfo }), warn: assign({}, props, { value: prevWarn }), error: assign({}, props, { value: prevError }), group: assign({}, props, { value: prevGroup }), groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), groupEnd: assign({}, props, { value: prevGroupEnd }) }); /* eslint-enable react-internal/no-production-logging */ } if (disabledDepth < 0) { error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.'); } } } var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name, source, ownerFn) { { if (prefix === undefined) { // Extract the VM specific prefix used by each line. try { throw Error(); } catch (x) { var match = x.stack.trim().match(/\n( *(at )?)/); prefix = match && match[1] || ''; } } // We use the prefix to ensure our stacks line up with native stack frames. return '\n' + prefix + name; } } var reentry = false; var componentFrameCache; { var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; componentFrameCache = new PossiblyWeakMap(); } function describeNativeComponentFrame(fn, construct) { // If something asked for a stack inside a fake render, it should get ignored. if ( !fn || reentry) { return ''; } { var frame = componentFrameCache.get(fn); if (frame !== undefined) { return frame; } } var control; reentry = true; var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. Error.prepareStackTrace = undefined; var previousDispatcher; { previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function // for warnings. ReactCurrentDispatcher$1.current = null; disableLogs(); } try { // This should throw. if (construct) { // Something should be setting the props in the constructor. var Fake = function () { throw Error(); }; // $FlowFixMe Object.defineProperty(Fake.prototype, 'props', { set: function () { // We use a throwing setter instead of frozen or non-writable props // because that won't throw in a non-strict mode function. throw Error(); } }); if (typeof Reflect === 'object' && Reflect.construct) { // We construct a different control for this case to include any extra // frames added by the construct call. try { Reflect.construct(Fake, []); } catch (x) { control = x; } Reflect.construct(fn, [], Fake); } else { try { Fake.call(); } catch (x) { control = x; } fn.call(Fake.prototype); } } else { try { throw Error(); } catch (x) { control = x; } fn(); } } catch (sample) { // This is inlined manually because closure doesn't do it for us. if (sample && control && typeof sample.stack === 'string') { // This extracts the first frame from the sample that isn't also in the control. // Skipping one frame that we assume is the frame that calls the two. var sampleLines = sample.stack.split('\n'); var controlLines = control.stack.split('\n'); var s = sampleLines.length - 1; var c = controlLines.length - 1; while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { // We expect at least one stack frame to be shared. // Typically this will be the root most one. However, stack frames may be // cut off due to maximum stack limits. In this case, one maybe cut off // earlier than the other. We assume that the sample is longer or the same // and there for cut off earlier. So we should find the root most frame in // the sample somewhere in the control. c--; } for (; s >= 1 && c >= 0; s--, c--) { // Next we find the first one that isn't the same which should be the // frame that called our sample function and the control. if (sampleLines[s] !== controlLines[c]) { // In V8, the first line is describing the message but other VMs don't. // If we're about to return the first line, and the control is also on the same // line, that's a pretty good indicator that our sample threw at same line as // the control. I.e. before we entered the sample frame. So we ignore this result. // This can happen if you passed a class to function component, or non-function. if (s !== 1 || c !== 1) { do { s--; c--; // We may still have similar intermediate frames from the construct call. // The next one that isn't the same should be our match though. if (c < 0 || sampleLines[s] !== controlLines[c]) { // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier. var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>" // but we have a user-provided "displayName" // splice it in to make the stack more readable. if (fn.displayName && _frame.includes('<anonymous>')) { _frame = _frame.replace('<anonymous>', fn.displayName); } { if (typeof fn === 'function') { componentFrameCache.set(fn, _frame); } } // Return the line we found. return _frame; } } while (s >= 1 && c >= 0); } break; } } } } finally { reentry = false; { ReactCurrentDispatcher$1.current = previousDispatcher; reenableLogs(); } Error.prepareStackTrace = previousPrepareStackTrace; } // Fallback to just using the name if we couldn't make it throw. var name = fn ? fn.displayName || fn.name : ''; var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''; { if (typeof fn === 'function') { componentFrameCache.set(fn, syntheticFrame); } } return syntheticFrame; } function describeFunctionComponentFrame(fn, source, ownerFn) { { return describeNativeComponentFrame(fn, false); } } function shouldConstruct(Component) { var prototype = Component.prototype; return !!(prototype && prototype.isReactComponent); } function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { if (type == null) { return ''; } if (typeof type === 'function') { { return describeNativeComponentFrame(type, shouldConstruct(type)); } } if (typeof type === 'string') { return describeBuiltInComponentFrame(type); } switch (type) { case REACT_SUSPENSE_TYPE: return describeBuiltInComponentFrame('Suspense'); case REACT_SUSPENSE_LIST_TYPE: return describeBuiltInComponentFrame('SuspenseList'); } if (typeof type === 'object') { switch (type.$$typeof) { case REACT_FORWARD_REF_TYPE: return describeFunctionComponentFrame(type.render); case REACT_MEMO_TYPE: // Memo may contain any component type so we recursively resolve it. return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); case REACT_LAZY_TYPE: { var lazyComponent = type; var payload = lazyComponent._payload; var init = lazyComponent._init; try { // Lazy may contain any component type so we recursively resolve it. return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); } catch (x) {} } } } return ''; } var loggedTypeFailures = {}; var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; function setCurrentlyValidatingElement(element) { { if (element) { var owner = element._owner; var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); ReactDebugCurrentFrame$1.setExtraStackFrame(stack); } else { ReactDebugCurrentFrame$1.setExtraStackFrame(null); } } } function checkPropTypes(typeSpecs, values, location, componentName, element) { { // $FlowFixMe This is okay but Flow doesn't know it. var has = Function.call.bind(hasOwnProperty); for (var typeSpecName in typeSpecs) { if (has(typeSpecs, typeSpecName)) { var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to // fail the render phase where it didn't fail before. So we log it. // After these have been cleaned up, we'll let them throw. try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. if (typeof typeSpecs[typeSpecName] !== 'function') { // eslint-disable-next-line react-internal/prod-error-codes var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'); err.name = 'Invariant Violation'; throw err; } error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'); } catch (ex) { error$1 = ex; } if (error$1 && !(error$1 instanceof Error)) { setCurrentlyValidatingElement(element); error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1); setCurrentlyValidatingElement(null); } if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { // Only monitor this failure once because there tends to be a lot of the // same error. loggedTypeFailures[error$1.message] = true; setCurrentlyValidatingElement(element); error('Failed %s type: %s', location, error$1.message); setCurrentlyValidatingElement(null); } } } } } function setCurrentlyValidatingElement$1(element) { { if (element) { var owner = element._owner; var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); setExtraStackFrame(stack); } else { setExtraStackFrame(null); } } } var propTypesMisspellWarningShown; { propTypesMisspellWarningShown = false; } function getDeclarationErrorAddendum() { if (ReactCurrentOwner.current) { var name = getComponentNameFromType(ReactCurrentOwner.current.type); if (name) { return '\n\nCheck the render method of `' + name + '`.'; } } return ''; } function getSourceInfoErrorAddendum(source) { if (source !== undefined) { var fileName = source.fileName.replace(/^.*[\\\/]/, ''); var lineNumber = source.lineNumber; return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; } return ''; } function getSourceInfoErrorAddendumForProps(elementProps) { if (elementProps !== null && elementProps !== undefined) { return getSourceInfoErrorAddendum(elementProps.__source); } return ''; } /** * Warn if there's no key explicitly set on dynamic arrays of children or * object keys are not valid. This allows us to keep track of children between * updates. */ var ownerHasKeyUseWarning = {}; function getCurrentComponentErrorInfo(parentType) { var info = getDeclarationErrorAddendum(); if (!info) { var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; if (parentName) { info = "\n\nCheck the top-level render call using <" + parentName + ">."; } } return info; } /** * Warn if the element doesn't have an explicit key assigned to it. * This element is in an array. The array could grow and shrink or be * reordered. All children that haven't already been validated are required to * have a "key" property assigned to it. Error statuses are cached so a warning * will only be shown once. * * @internal * @param {ReactElement} element Element that requires a key. * @param {*} parentType element's parent's type. */ function validateExplicitKey(element, parentType) { if (!element._store || element._store.validated || element.key != null) { return; } element._store.validated = true; var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { return; } ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a // property, it may be the creator of the child that's responsible for // assigning it a key. var childOwner = ''; if (element && element._owner && element._owner !== ReactCurrentOwner.current) { // Give the component that originally created this child. childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; } { setCurrentlyValidatingElement$1(element); error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); setCurrentlyValidatingElement$1(null); } } /** * Ensure that every element either is passed in a static location, in an * array with an explicit keys property defined, or in an object literal * with valid key property. * * @internal * @param {ReactNode} node Statically passed child of any type. * @param {*} parentType node's parent's type. */ function validateChildKeys(node, parentType) { if (typeof node !== 'object') { return; } if (isArray(node)) { for (var i = 0; i < node.length; i++) { var child = node[i]; if (isValidElement(child)) { validateExplicitKey(child, parentType); } } } else if (isValidElement(node)) { // This element was passed in a valid location. if (node._store) { node._store.validated = true; } } else if (node) { var iteratorFn = getIteratorFn(node); if (typeof iteratorFn === 'function') { // Entry iterators used to provide implicit keys, // but now we print a separate warning for them later. if (iteratorFn !== node.entries) { var iterator = iteratorFn.call(node); var step; while (!(step = iterator.next()).done) { if (isValidElement(step.value)) { validateExplicitKey(step.value, parentType); } } } } } } /** * Given an element, validate that its props follow the propTypes definition, * provided by the type. * * @param {ReactElement} element */ function validatePropTypes(element) { { var type = element.type; if (type === null || type === undefined || typeof type === 'string') { return; } var propTypes; if (typeof type === 'function') { propTypes = type.propTypes; } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. type.$$typeof === REACT_MEMO_TYPE)) { propTypes = type.propTypes; } else { return; } if (propTypes) { // Intentionally inside to avoid triggering lazy initializers: var name = getComponentNameFromType(type); checkPropTypes(propTypes, element.props, 'prop', name, element); } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers: var _name = getComponentNameFromType(type); error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown'); } if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) { error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); } } } /** * Given a fragment, validate that it can only be provided with fragment props * @param {ReactElement} fragment */ function validateFragmentProps(fragment) { { var keys = Object.keys(fragment.props); for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (key !== 'children' && key !== 'key') { setCurrentlyValidatingElement$1(fragment); error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); setCurrentlyValidatingElement$1(null); break; } } if (fragment.ref !== null) { setCurrentlyValidatingElement$1(fragment); error('Invalid attribute `ref` supplied to `React.Fragment`.'); setCurrentlyValidatingElement$1(null); } } } function createElementWithValidation(type, props, children) { var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to // succeed and there will likely be errors in render. if (!validType) { var info = ''; if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; } var sourceInfo = getSourceInfoErrorAddendumForProps(props); if (sourceInfo) { info += sourceInfo; } else { info += getDeclarationErrorAddendum(); } var typeString; if (type === null) { typeString = 'null'; } else if (isArray(type)) { typeString = 'array'; } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />"; info = ' Did you accidentally export a JSX literal instead of a component?'; } else { typeString = typeof type; } { error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); } } var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used. // TODO: Drop this when these are no longer allowed as the type argument. if (element == null) { return element; } // Skip key warning if the type isn't valid since our key validation logic // doesn't expect a non-string/function type and can throw confusing errors. // We don't want exception behavior to differ between dev and prod. // (Rendering will throw with a helpful message and as soon as the type is // fixed, the key warnings will appear.) if (validType) { for (var i = 2; i < arguments.length; i++) { validateChildKeys(arguments[i], type); } } if (type === REACT_FRAGMENT_TYPE) { validateFragmentProps(element); } else { validatePropTypes(element); } return element; } var didWarnAboutDeprecatedCreateFactory = false; function createFactoryWithValidation(type) { var validatedFactory = createElementWithValidation.bind(null, type); validatedFactory.type = type; { if (!didWarnAboutDeprecatedCreateFactory) { didWarnAboutDeprecatedCreateFactory = true; warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.'); } // Legacy hook: remove it Object.defineProperty(validatedFactory, 'type', { enumerable: false, get: function () { warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.'); Object.defineProperty(this, 'type', { value: type }); return type; } }); } return validatedFactory; } function cloneElementWithValidation(element, props, children) { var newElement = cloneElement.apply(this, arguments); for (var i = 2; i < arguments.length; i++) { validateChildKeys(arguments[i], newElement.type); } validatePropTypes(newElement); return newElement; } function startTransition(scope, options) { var prevTransition = ReactCurrentBatchConfig.transition; ReactCurrentBatchConfig.transition = {}; var currentTransition = ReactCurrentBatchConfig.transition; { ReactCurrentBatchConfig.transition._updatedFibers = new Set(); } try { scope(); } finally { ReactCurrentBatchConfig.transition = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { var updatedFibersCount = currentTransition._updatedFibers.size; if (updatedFibersCount > 10) { warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.'); } currentTransition._updatedFibers.clear(); } } } } var didWarnAboutMessageChannel = false; var enqueueTaskImpl = null; function enqueueTask(task) { if (enqueueTaskImpl === null) { try { // read require off the module object to get around the bundlers. // we don't want them to detect a require and bundle a Node polyfill. var requireString = ('require' + Math.random()).slice(0, 7); var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's // version of setImmediate, bypassing fake timers if any. enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate; } catch (_err) { // we're in a browser // we can't use regular timers because they may still be faked // so we try MessageChannel+postMessage instead enqueueTaskImpl = function (callback) { { if (didWarnAboutMessageChannel === false) { didWarnAboutMessageChannel = true; if (typeof MessageChannel === 'undefined') { error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.'); } } } var channel = new MessageChannel(); channel.port1.onmessage = callback; channel.port2.postMessage(undefined); }; } } return enqueueTaskImpl(task); } var actScopeDepth = 0; var didWarnNoAwaitAct = false; function act(callback) { { // `act` calls can be nested, so we track the depth. This represents the // number of `act` scopes on the stack. var prevActScopeDepth = actScopeDepth; actScopeDepth++; if (ReactCurrentActQueue.current === null) { // This is the outermost `act` scope. Initialize the queue. The reconciler // will detect the queue and use it instead of Scheduler. ReactCurrentActQueue.current = []; } var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy; var result; try { // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only // set to `true` while the given callback is executed, not for updates // triggered during an async event, because this is how the legacy // implementation of `act` behaved. ReactCurrentActQueue.isBatchingLegacy = true; result = callback(); // Replicate behavior of original `act` implementation in legacy mode, // which flushed updates immediately after the scope function exits, even // if it's an async function. if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) { var queue = ReactCurrentActQueue.current; if (queue !== null) { ReactCurrentActQueue.didScheduleLegacyUpdate = false; flushActQueue(queue); } } } catch (error) { popActScope(prevActScopeDepth); throw error; } finally { ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy; } if (result !== null && typeof result === 'object' && typeof result.then === 'function') { var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait // for it to resolve before exiting the current scope. var wasAwaited = false; var thenable = { then: function (resolve, reject) { wasAwaited = true; thenableResult.then(function (returnValue) { popActScope(prevActScopeDepth); if (actScopeDepth === 0) { // We've exited the outermost act scope. Recursively flush the // queue until there's no remaining work. recursivelyFlushAsyncActWork(returnValue, resolve, reject); } else { resolve(returnValue); } }, function (error) { // The callback threw an error. popActScope(prevActScopeDepth); reject(error); }); } }; { if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') { // eslint-disable-next-line no-undef Promise.resolve().then(function () {}).then(function () { if (!wasAwaited) { didWarnNoAwaitAct = true; error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);'); } }); } } return thenable; } else { var returnValue = result; // The callback is not an async function. Exit the current scope // immediately, without awaiting. popActScope(prevActScopeDepth); if (actScopeDepth === 0) { // Exiting the outermost act scope. Flush the queue. var _queue = ReactCurrentActQueue.current; if (_queue !== null) { flushActQueue(_queue); ReactCurrentActQueue.current = null; } // Return a thenable. If the user awaits it, we'll flush again in // case additional work was scheduled by a microtask. var _thenable = { then: function (resolve, reject) { // Confirm we haven't re-entered another `act` scope, in case // the user does something weird like await the thenable // multiple times. if (ReactCurrentActQueue.current === null) { // Recursively flush the queue until there's no remaining work. ReactCurrentActQueue.current = []; recursivelyFlushAsyncActWork(returnValue, resolve, reject); } else { resolve(returnValue); } } }; return _thenable; } else { // Since we're inside a nested `act` scope, the returned thenable // immediately resolves. The outer scope will flush the queue. var _thenable2 = { then: function (resolve, reject) { resolve(returnValue); } }; return _thenable2; } } } } function popActScope(prevActScopeDepth) { { if (prevActScopeDepth !== actScopeDepth - 1) { error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. '); } actScopeDepth = prevActScopeDepth; } } function recursivelyFlushAsyncActWork(returnValue, resolve, reject) { { var queue = ReactCurrentActQueue.current; if (queue !== null) { try { flushActQueue(queue); enqueueTask(function () { if (queue.length === 0) { // No additional work was scheduled. Finish. ReactCurrentActQueue.current = null; resolve(returnValue); } else { // Keep flushing work until there's none left. recursivelyFlushAsyncActWork(returnValue, resolve, reject); } }); } catch (error) { reject(error); } } else { resolve(returnValue); } } } var isFlushing = false; function flushActQueue(queue) { { if (!isFlushing) { // Prevent re-entrance. isFlushing = true; var i = 0; try { for (; i < queue.length; i++) { var callback = queue[i]; do { callback = callback(true); } while (callback !== null); } queue.length = 0; } catch (error) { // If something throws, leave the remaining callbacks on the queue. queue = queue.slice(i + 1); throw error; } finally { isFlushing = false; } } } } var createElement$1 = createElementWithValidation ; var cloneElement$1 = cloneElementWithValidation ; var createFactory = createFactoryWithValidation ; var Children = { map: mapChildren, forEach: forEachChildren, count: countChildren, toArray: toArray, only: onlyChild }; exports.Children = Children; exports.Component = Component; exports.Fragment = REACT_FRAGMENT_TYPE; exports.Profiler = REACT_PROFILER_TYPE; exports.PureComponent = PureComponent; exports.StrictMode = REACT_STRICT_MODE_TYPE; exports.Suspense = REACT_SUSPENSE_TYPE; exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; exports.act = act; exports.cloneElement = cloneElement$1; exports.createContext = createContext; exports.createElement = createElement$1; exports.createFactory = createFactory; exports.createRef = createRef; exports.forwardRef = forwardRef; exports.isValidElement = isValidElement; exports.lazy = lazy; exports.memo = memo; exports.startTransition = startTransition; exports.unstable_act = act; exports.useCallback = useCallback; exports.useContext = useContext; exports.useDebugValue = useDebugValue; exports.useDeferredValue = useDeferredValue; exports.useEffect = useEffect; exports.useId = useId; exports.useImperativeHandle = useImperativeHandle; exports.useInsertionEffect = useInsertionEffect; exports.useLayoutEffect = useLayoutEffect; exports.useMemo = useMemo; exports.useReducer = useReducer; exports.useRef = useRef; exports.useState = useState; exports.useSyncExternalStore = useSyncExternalStore; exports.useTransition = useTransition; exports.version = ReactVersion; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === 'function' ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } })(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(65)(module))) /***/ }), /* 80 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* Modernizr 3.0.0pre (Custom Build) | MIT */ var aa=__webpack_require__(0),ca=__webpack_require__(51);function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var da=new Set,ea={};function fa(a,b){ha(a,b);ha(a+"Capture",b)} function ha(a,b){ea[a]=b;for(a=0;a<b.length;a++)da.add(b[a])} var ia=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),ja=Object.prototype.hasOwnProperty,ka=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,la= {},ma={};function oa(a){if(ja.call(ma,a))return!0;if(ja.call(la,a))return!1;if(ka.test(a))return ma[a]=!0;la[a]=!0;return!1}function pa(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}} function qa(a,b,c,d){if(null===b||"undefined"===typeof b||pa(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={}; "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)}); ["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)}); ["checked","multiple","muted","selected"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()} "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(ra, sa);z[b]=new v(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)}); z.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)}); function ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1])qa(b,c,e,d)&&(c=null),d||null===e?oa(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c)))} var ua=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,va=Symbol.for("react.element"),wa=Symbol.for("react.portal"),ya=Symbol.for("react.fragment"),za=Symbol.for("react.strict_mode"),Aa=Symbol.for("react.profiler"),Ba=Symbol.for("react.provider"),Ca=Symbol.for("react.context"),Da=Symbol.for("react.forward_ref"),Ea=Symbol.for("react.suspense"),Fa=Symbol.for("react.suspense_list"),Ga=Symbol.for("react.memo"),Ha=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode"); var Ia=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Ja=Symbol.iterator;function Ka(a){if(null===a||"object"!==typeof a)return null;a=Ja&&a[Ja]||a["@@iterator"];return"function"===typeof a?a:null}var A=Object.assign,La;function Ma(a){if(void 0===La)try{throw Error();}catch(c){var b=c.stack.trim().match(/\n( *(at )?)/);La=b&&b[1]||""}return"\n"+La+a}var Na=!1; function Oa(a,b){if(!a||Na)return"";Na=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(l){var d=l}Reflect.construct(a,[],b)}else{try{b.call()}catch(l){d=l}a.call(b.prototype)}else{try{throw Error();}catch(l){d=l}a()}}catch(l){if(l&&d&&"string"===typeof l.stack){for(var e=l.stack.split("\n"), f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h]){var k="\n"+e[g].replace(" at new "," at ");a.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?Ma(a):""} function Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return""}} function Qa(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ya:return"Fragment";case wa:return"Portal";case Aa:return"Profiler";case za:return"StrictMode";case Ea:return"Suspense";case Fa:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||"Context")+".Consumer";case Ba:return(a._context.displayName||"Context")+".Provider";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName|| b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||"Memo";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null} function Ra(a){var b=a.type;switch(a.tag){case 24:return"Cache";case 9:return(b.displayName||"Context")+".Consumer";case 10:return(b._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=b.render,a=a.displayName||a.name||"",b.displayName||(""!==a?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return b;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(b);case 8:return b===za?"StrictMode":"Mode";case 22:return"Offscreen"; case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof b)return b.displayName||b.name||null;if("string"===typeof b)return b}return null}function Sa(a){switch(typeof a){case "boolean":case "number":case "string":case "undefined":return a;case "object":return a;default:return""}} function Ta(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)} function Ua(a){var b=Ta(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker= null;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Ta(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}} function Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,"checked",b,!1)} function bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?cb(a,b.type,c):b.hasOwnProperty("defaultValue")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)} function db(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)} function cb(a,b,c){if("number"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}var eb=Array.isArray; function fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+Sa(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}} function gb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(p(91));return A({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function hb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(p(92));if(eb(c)){if(1<c.length)throw Error(p(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:Sa(c)}} function ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}function kb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}} function lb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?kb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a} var mb,nb=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{mb=mb||document.createElement("div");mb.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}); function ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b} var pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0, zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(""+b).trim():b+"px"} function sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=rb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}); function ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if("object"!==typeof b.dangerouslySetInnerHTML||!("__html"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(p(62));}} function vb(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null; function Bb(a){if(a=Cb(a)){if("function"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a<b.length;a++)Bb(b[a])}}function Gb(a,b){return a(b)}function Hb(){}var Ib=!1;function Jb(a,b,c){if(Ib)return a(b,c);Ib=!0;try{return Gb(a,b,c)}finally{if(Ib=!1,null!==zb||null!==Ab)Hb(),Fb()}} function Kb(a,b){var c=a.stateNode;if(null===c)return null;var d=Db(c);if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!== typeof c)throw Error(p(231,b,typeof c));return c}var Lb=!1;if(ia)try{var Mb={};Object.defineProperty(Mb,"passive",{get:function(){Lb=!0}});window.addEventListener("test",Mb,Mb);window.removeEventListener("test",Mb,Mb)}catch(a){Lb=!1}function Nb(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(m){this.onError(m)}}var Ob=!1,Pb=null,Qb=!1,Rb=null,Sb={onError:function(a){Ob=!0;Pb=a}};function Tb(a,b,c,d,e,f,g,h,k){Ob=!1;Pb=null;Nb.apply(Sb,arguments)} function Ub(a,b,c,d,e,f,g,h,k){Tb.apply(this,arguments);if(Ob){if(Ob){var l=Pb;Ob=!1;Pb=null}else throw Error(p(198));Qb||(Qb=!0,Rb=l)}}function Vb(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&4098)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function Wb(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function Xb(a){if(Vb(a)!==a)throw Error(p(188));} function Yb(a){var b=a.alternate;if(!b){b=Vb(a);if(null===b)throw Error(p(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return Xb(e),a;if(f===d)return Xb(e),b;f=f.sibling}throw Error(p(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h=== c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(p(189));}}if(c.alternate!==d)throw Error(p(190));}if(3!==c.tag)throw Error(p(188));return c.stateNode.current===c?a:b}function Zb(a){a=Yb(a);return null!==a?$b(a):null}function $b(a){if(5===a.tag||6===a.tag)return a;for(a=a.child;null!==a;){var b=$b(a);if(null!==b)return b;a=a.sibling}return null} var ac=ca.unstable_scheduleCallback,bc=ca.unstable_cancelCallback,cc=ca.unstable_shouldYield,dc=ca.unstable_requestPaint,B=ca.unstable_now,ec=ca.unstable_getCurrentPriorityLevel,fc=ca.unstable_ImmediatePriority,gc=ca.unstable_UserBlockingPriority,hc=ca.unstable_NormalPriority,ic=ca.unstable_LowPriority,jc=ca.unstable_IdlePriority,kc=null,lc=null;function mc(a){if(lc&&"function"===typeof lc.onCommitFiberRoot)try{lc.onCommitFiberRoot(kc,a,void 0,128===(a.current.flags&128))}catch(b){}} var oc=Math.clz32?Math.clz32:nc,pc=Math.log,qc=Math.LN2;function nc(a){a>>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304; function tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824; default:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-oc(b),e=1<<c,d|=a[c],b&=~e;return d} function vc(a,b){switch(a){case 1:case 2:case 4:return b+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return b+5E3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}} function wc(a,b){for(var c=a.suspendedLanes,d=a.pingedLanes,e=a.expirationTimes,f=a.pendingLanes;0<f;){var g=31-oc(f),h=1<<g,k=e[g];if(-1===k){if(0===(h&c)||0!==(h&d))e[g]=vc(h,b)}else k<=b&&(a.expiredLanes|=h);f&=~h}}function xc(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function yc(){var a=rc;rc<<=1;0===(rc&4194240)&&(rc=64);return a}function zc(a){for(var b=[],c=0;31>c;c++)b.push(a);return b} function Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0<c;){var e=31-oc(c),f=1<<e;b[e]=0;d[e]=-1;a[e]=-1;c&=~f}} function Cc(a,b){var c=a.entangledLanes|=b;for(a=a.entanglements;c;){var d=31-oc(c),e=1<<d;e&b|a[d]&b&&(a[d]|=b);c&=~e}}var C=0;function Dc(a){a&=-a;return 1<a?4<a?0!==(a&268435455)?16:536870912:4:1}var Ec,Fc,Gc,Hc,Ic,Jc=!1,Kc=[],Lc=null,Mc=null,Nc=null,Oc=new Map,Pc=new Map,Qc=[],Rc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "); function Sc(a,b){switch(a){case "focusin":case "focusout":Lc=null;break;case "dragenter":case "dragleave":Mc=null;break;case "mouseover":case "mouseout":Nc=null;break;case "pointerover":case "pointerout":Oc.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":Pc.delete(b.pointerId)}} function Tc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a={blockedOn:b,domEventName:c,eventSystemFlags:d,nativeEvent:f,targetContainers:[e]},null!==b&&(b=Cb(b),null!==b&&Fc(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a} function Uc(a,b,c,d,e){switch(b){case "focusin":return Lc=Tc(Lc,a,b,c,d,e),!0;case "dragenter":return Mc=Tc(Mc,a,b,c,d,e),!0;case "mouseover":return Nc=Tc(Nc,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;Oc.set(f,Tc(Oc.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,Pc.set(f,Tc(Pc.get(f)||null,a,b,c,d,e)),!0}return!1} function Vc(a){var b=Wc(a.target);if(null!==b){var c=Vb(b);if(null!==c)if(b=c.tag,13===b){if(b=Wb(c),null!==b){a.blockedOn=b;Ic(a.priority,function(){Gc(c)});return}}else if(3===b&&c.stateNode.current.memoizedState.isDehydrated){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null} function Xc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=Yc(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null===c){c=a.nativeEvent;var d=new c.constructor(c.type,c);wb=d;c.target.dispatchEvent(d);wb=null}else return b=Cb(c),null!==b&&Fc(b),a.blockedOn=c,!1;b.shift()}return!0}function Zc(a,b,c){Xc(a)&&c.delete(b)}function $c(){Jc=!1;null!==Lc&&Xc(Lc)&&(Lc=null);null!==Mc&&Xc(Mc)&&(Mc=null);null!==Nc&&Xc(Nc)&&(Nc=null);Oc.forEach(Zc);Pc.forEach(Zc)} function ad(a,b){a.blockedOn===b&&(a.blockedOn=null,Jc||(Jc=!0,ca.unstable_scheduleCallback(ca.unstable_NormalPriority,$c)))} function bd(a){function b(b){return ad(b,a)}if(0<Kc.length){ad(Kc[0],a);for(var c=1;c<Kc.length;c++){var d=Kc[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==Lc&&ad(Lc,a);null!==Mc&&ad(Mc,a);null!==Nc&&ad(Nc,a);Oc.forEach(b);Pc.forEach(b);for(c=0;c<Qc.length;c++)d=Qc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<Qc.length&&(c=Qc[0],null===c.blockedOn);)Vc(c),null===c.blockedOn&&Qc.shift()}var cd=ua.ReactCurrentBatchConfig,dd=!0; function ed(a,b,c,d){var e=C,f=cd.transition;cd.transition=null;try{C=1,fd(a,b,c,d)}finally{C=e,cd.transition=f}}function gd(a,b,c,d){var e=C,f=cd.transition;cd.transition=null;try{C=4,fd(a,b,c,d)}finally{C=e,cd.transition=f}} function fd(a,b,c,d){if(dd){var e=Yc(a,b,c,d);if(null===e)hd(a,b,d,id,c),Sc(a,d);else if(Uc(e,a,b,c,d))d.stopPropagation();else if(Sc(a,d),b&4&&-1<Rc.indexOf(a)){for(;null!==e;){var f=Cb(e);null!==f&&Ec(f);f=Yc(a,b,c,d);null===f&&hd(a,b,d,id,c);if(f===e)break;e=f}null!==e&&d.stopPropagation()}else hd(a,b,d,null,c)}}var id=null; function Yc(a,b,c,d){id=null;a=xb(d);a=Wc(a);if(null!==a)if(b=Vb(a),null===b)a=null;else if(c=b.tag,13===c){a=Wb(b);if(null!==a)return a;a=null}else if(3===c){if(b.stateNode.current.memoizedState.isDehydrated)return 3===b.tag?b.stateNode.containerInfo:null;a=null}else b!==a&&(a=null);id=a;return null} function jd(a){switch(a){case "cancel":case "click":case "close":case "contextmenu":case "copy":case "cut":case "auxclick":case "dblclick":case "dragend":case "dragstart":case "drop":case "focusin":case "focusout":case "input":case "invalid":case "keydown":case "keypress":case "keyup":case "mousedown":case "mouseup":case "paste":case "pause":case "play":case "pointercancel":case "pointerdown":case "pointerup":case "ratechange":case "reset":case "resize":case "seeked":case "submit":case "touchcancel":case "touchend":case "touchstart":case "volumechange":case "change":case "selectionchange":case "textInput":case "compositionstart":case "compositionend":case "compositionupdate":case "beforeblur":case "afterblur":case "beforeinput":case "blur":case "fullscreenchange":case "focus":case "hashchange":case "popstate":case "select":case "selectstart":return 1;case "drag":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "mousemove":case "mouseout":case "mouseover":case "pointermove":case "pointerout":case "pointerover":case "scroll":case "toggle":case "touchmove":case "wheel":case "mouseenter":case "mouseleave":case "pointerenter":case "pointerleave":return 4; case "message":switch(ec()){case fc:return 1;case gc:return 4;case hc:case ic:return 16;case jc:return 536870912;default:return 16}default:return 16}}var kd=null,ld=null,md=null;function nd(){if(md)return md;var a,b=ld,c=b.length,d,e="value"in kd?kd.value:kd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return md=e.slice(a,1<d?1-d:void 0)} function od(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function pd(){return!0}function qd(){return!1} function rd(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?pd:qd;this.isPropagationStopped=qd;return this}A(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&& (a.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd});return b} var sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td=rd(sd),ud=A({},sd,{view:0,detail:0}),vd=rd(ud),wd,xd,yd,Ad=A({},ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in a)return a.movementX;a!==yd&&(yd&&"mousemove"===a.type?(wd=a.screenX-yd.screenX,xd=a.screenY-yd.screenY):xd=wd=0,yd=a);return wd},movementY:function(a){return"movementY"in a?a.movementY:xd}}),Bd=rd(Ad),Cd=A({},Ad,{dataTransfer:0}),Dd=rd(Cd),Ed=A({},ud,{relatedTarget:0}),Fd=rd(Ed),Gd=A({},sd,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=rd(Gd),Id=A({},sd,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Jd=rd(Id),Kd=A({},sd,{data:0}),Ld=rd(Kd),Md={Esc:"Escape", Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7", 119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Od={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Od[a])?!!b[a]:!1}function zd(){return Pd} var Qd=A({},ud,{key:function(a){if(a.key){var b=Md[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=od(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Nd[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(a){return"keypress"===a.type?od(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"=== a.type?od(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),Rd=rd(Qd),Sd=A({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=A({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=A({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=A({},Ad,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0}, deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae=ia&&"CompositionEvent"in window,be=null;ia&&"documentMode"in document&&(be=document.documentMode);var ce=ia&&"TextEvent"in window&&!be,de=ia&&(!ae||be&&8<be&&11>=be),ee=String.fromCharCode(32),fe=!1; function ge(a,b){switch(a){case "keyup":return-1!==$d.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}function he(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case "compositionend":return he(b);case "keypress":if(32!==b.which)return null;fe=!0;return ee;case "textInput":return a=b.data,a===ee&&fe?null:a;default:return null}} function ke(a,b){if(ie)return"compositionend"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return de&&"ko"!==b.locale?null:b.data;default:return null}} var le={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!le[a.type]:"textarea"===b?!0:!1}function ne(a,b,c,d){Eb(d);b=oe(b,"onChange");0<b.length&&(c=new td("onChange","change",null,c,d),a.push({event:c,listeners:b}))}var pe=null,qe=null;function re(a){se(a,0)}function te(a){var b=ue(a);if(Wa(b))return a} function ve(a,b){if("change"===a)return b}var we=!1;if(ia){var xe;if(ia){var ye="oninput"in document;if(!ye){var ze=document.createElement("div");ze.setAttribute("oninput","return;");ye="function"===typeof ze.oninput}xe=ye}else xe=!1;we=xe&&(!document.documentMode||9<document.documentMode)}function Ae(){pe&&(pe.detachEvent("onpropertychange",Be),qe=pe=null)}function Be(a){if("value"===a.propertyName&&te(qe)){var b=[];ne(b,qe,a,xb(a));Jb(re,b)}} function Ce(a,b,c){"focusin"===a?(Ae(),pe=b,qe=c,pe.attachEvent("onpropertychange",Be)):"focusout"===a&&Ae()}function De(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return te(qe)}function Ee(a,b){if("click"===a)return te(b)}function Fe(a,b){if("input"===a||"change"===a)return te(b)}function Ge(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var He="function"===typeof Object.is?Object.is:Ge; function Ie(a,b){if(He(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++){var e=c[d];if(!ja.call(b,e)||!He(a[e],b[e]))return!1}return!0}function Je(a){for(;a&&a.firstChild;)a=a.firstChild;return a} function Ke(a,b){var c=Je(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1} function Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)} function Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c, d);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});"function"===typeof c.focus&&c.focus();for(c=0;c<b.length;c++)a=b[c],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}} var Pe=ia&&"documentMode"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1; function Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,"selectionStart"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,"onSelect"),0<d.length&&(b=new td("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=Qe)))} function Ve(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var We={animationend:Ve("Animation","AnimationEnd"),animationiteration:Ve("Animation","AnimationIteration"),animationstart:Ve("Animation","AnimationStart"),transitionend:Ve("Transition","TransitionEnd")},Xe={},Ye={}; ia&&(Ye=document.createElement("div").style,"AnimationEvent"in window||(delete We.animationend.animation,delete We.animationiteration.animation,delete We.animationstart.animation),"TransitionEvent"in window||delete We.transitionend.transition);function Ze(a){if(Xe[a])return Xe[a];if(!We[a])return a;var b=We[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Ye)return Xe[a]=b[c];return a}var $e=Ze("animationend"),af=Ze("animationiteration"),bf=Ze("animationstart"),cf=Ze("transitionend"),df=new Map,ef="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" "); function ff(a,b){df.set(a,b);fa(b,[a])}for(var gf=0;gf<ef.length;gf++){var hf=ef[gf],jf=hf.toLowerCase(),kf=hf[0].toUpperCase()+hf.slice(1);ff(jf,"on"+kf)}ff($e,"onAnimationEnd");ff(af,"onAnimationIteration");ff(bf,"onAnimationStart");ff("dblclick","onDoubleClick");ff("focusin","onFocus");ff("focusout","onBlur");ff(cf,"onTransitionEnd");ha("onMouseEnter",["mouseout","mouseover"]);ha("onMouseLeave",["mouseout","mouseover"]);ha("onPointerEnter",["pointerout","pointerover"]); ha("onPointerLeave",["pointerout","pointerover"]);fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fa("onBeforeInput",["compositionend","keypress","textInput","paste"]);fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")); fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),mf=new Set("cancel close invalid load scroll toggle".split(" ").concat(lf)); function nf(a,b,c){var d=a.type||"unknown-event";a.currentTarget=c;Ub(d,b,void 0,a);a.currentTarget=null} function se(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;nf(e,h,l);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;nf(e,h,l);f=k}}}if(Qb)throw a=Rb,Qb=!1,Rb=null,a;} function D(a,b){var c=b[of];void 0===c&&(c=b[of]=new Set);var d=a+"__bubble";c.has(d)||(pf(b,a,2,!1),c.add(d))}function qf(a,b,c){var d=0;b&&(d|=4);pf(c,a,d,b)}var rf="_reactListening"+Math.random().toString(36).slice(2);function sf(a){if(!a[rf]){a[rf]=!0;da.forEach(function(b){"selectionchange"!==b&&(mf.has(b)||qf(b,!1,a),qf(b,!0,a))});var b=9===a.nodeType?a:a.ownerDocument;null===b||b[rf]||(b[rf]=!0,qf("selectionchange",!1,b))}} function pf(a,b,c,d){switch(jd(b)){case 1:var e=ed;break;case 4:e=gd;break;default:e=fd}c=e.bind(null,b,c,a);e=void 0;!Lb||"touchstart"!==b&&"touchmove"!==b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)} function hd(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return}for(;null!==h;){g=Wc(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}Jb(function(){var d=f,e=xb(c),g=[]; a:{var h=df.get(a);if(void 0!==h){var k=td,n=a;switch(a){case "keypress":if(0===od(c))break a;case "keydown":case "keyup":k=Rd;break;case "focusin":n="focus";k=Fd;break;case "focusout":n="blur";k=Fd;break;case "beforeblur":case "afterblur":k=Fd;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=Bd;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k= Dd;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=Vd;break;case $e:case af:case bf:k=Hd;break;case cf:k=Xd;break;case "scroll":k=vd;break;case "wheel":k=Zd;break;case "copy":case "cut":case "paste":k=Jd;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=Td}var t=0!==(b&4),J=!t&&"scroll"===a,x=t?null!==h?h+"Capture":null:h;t=[];for(var w=d,u;null!== w;){u=w;var F=u.stateNode;5===u.tag&&null!==F&&(u=F,null!==x&&(F=Kb(w,x),null!=F&&t.push(tf(w,F,u))));if(J)break;w=w.return}0<t.length&&(h=new k(h,n,null,c,e),g.push({event:h,listeners:t}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&c!==wb&&(n=c.relatedTarget||c.fromElement)&&(Wc(n)||n[uf]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(n=c.relatedTarget||c.toElement,k=d,n=n?Wc(n):null,null!== n&&(J=Vb(n),n!==J||5!==n.tag&&6!==n.tag))n=null}else k=null,n=d;if(k!==n){t=Bd;F="onMouseLeave";x="onMouseEnter";w="mouse";if("pointerout"===a||"pointerover"===a)t=Td,F="onPointerLeave",x="onPointerEnter",w="pointer";J=null==k?h:ue(k);u=null==n?h:ue(n);h=new t(F,w+"leave",k,c,e);h.target=J;h.relatedTarget=u;F=null;Wc(e)===d&&(t=new t(x,w+"enter",n,c,e),t.target=u,t.relatedTarget=J,F=t);J=F;if(k&&n)b:{t=k;x=n;w=0;for(u=t;u;u=vf(u))w++;u=0;for(F=x;F;F=vf(F))u++;for(;0<w-u;)t=vf(t),w--;for(;0<u-w;)x= vf(x),u--;for(;w--;){if(t===x||null!==x&&t===x.alternate)break b;t=vf(t);x=vf(x)}t=null}else t=null;null!==k&&wf(g,h,k,t,!1);null!==n&&null!==J&&wf(g,J,n,t,!0)}}}a:{h=d?ue(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var na=ve;else if(me(h))if(we)na=Fe;else{na=De;var xa=Ce}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(na=Ee);if(na&&(na=na(a,d))){ne(g,na,c,e);break a}xa&&xa(a,h,d);"focusout"===a&&(xa=h._wrapperState)&& xa.controlled&&"number"===h.type&&cb(h,"number",h.value)}xa=d?ue(d):window;switch(a){case "focusin":if(me(xa)||"true"===xa.contentEditable)Qe=xa,Re=d,Se=null;break;case "focusout":Se=Re=Qe=null;break;case "mousedown":Te=!0;break;case "contextmenu":case "mouseup":case "dragend":Te=!1;Ue(g,c,e);break;case "selectionchange":if(Pe)break;case "keydown":case "keyup":Ue(g,c,e)}var $a;if(ae)b:{switch(a){case "compositionstart":var ba="onCompositionStart";break b;case "compositionend":ba="onCompositionEnd"; break b;case "compositionupdate":ba="onCompositionUpdate";break b}ba=void 0}else ie?ge(a,c)&&(ba="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(ba="onCompositionStart");ba&&(de&&"ko"!==c.locale&&(ie||"onCompositionStart"!==ba?"onCompositionEnd"===ba&&ie&&($a=nd()):(kd=e,ld="value"in kd?kd.value:kd.textContent,ie=!0)),xa=oe(d,ba),0<xa.length&&(ba=new Ld(ba,a,null,c,e),g.push({event:ba,listeners:xa}),$a?ba.data=$a:($a=he(c),null!==$a&&(ba.data=$a))));if($a=ce?je(a,c):ke(a,c))d=oe(d,"onBeforeInput"), 0<d.length&&(e=new Ld("onBeforeInput","beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=$a)}se(g,b)})}function tf(a,b,c){return{instance:a,listener:b,currentTarget:c}}function oe(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Kb(a,c),null!=f&&d.unshift(tf(a,f,e)),f=Kb(a,b),null!=f&&d.push(tf(a,f,e)));a=a.return}return d}function vf(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag);return a?a:null} function wf(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,l=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==l&&(h=l,e?(k=Kb(c,f),null!=k&&g.unshift(tf(c,k,h))):e||(k=Kb(c,f),null!=k&&g.push(tf(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}var xf=/\r\n?/g,yf=/\u0000|\uFFFD/g;function zf(a){return("string"===typeof a?a:""+a).replace(xf,"\n").replace(yf,"")}function Af(a,b,c){b=zf(b);if(zf(a)!==b&&c)throw Error(p(425));}function Bf(){} var Cf=null,Df=null;function Ef(a,b){return"textarea"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html} var Ff="function"===typeof setTimeout?setTimeout:void 0,Gf="function"===typeof clearTimeout?clearTimeout:void 0,Hf="function"===typeof Promise?Promise:void 0,Jf="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof Hf?function(a){return Hf.resolve(null).then(a).catch(If)}:Ff;function If(a){setTimeout(function(){throw a;})} function Kf(a,b){var c=b,d=0;do{var e=c.nextSibling;a.removeChild(c);if(e&&8===e.nodeType)if(c=e.data,"/$"===c){if(0===d){a.removeChild(e);bd(b);return}d--}else"$"!==c&&"$?"!==c&&"$!"!==c||d++;c=e}while(c);bd(b)}function Lf(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break;if(8===b){b=a.data;if("$"===b||"$!"===b||"$?"===b)break;if("/$"===b)return null}}return a} function Mf(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null}var Nf=Math.random().toString(36).slice(2),Of="__reactFiber$"+Nf,Pf="__reactProps$"+Nf,uf="__reactContainer$"+Nf,of="__reactEvents$"+Nf,Qf="__reactListeners$"+Nf,Rf="__reactHandles$"+Nf; function Wc(a){var b=a[Of];if(b)return b;for(var c=a.parentNode;c;){if(b=c[uf]||c[Of]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Mf(a);null!==a;){if(c=a[Of])return c;a=Mf(a)}return b}a=c;c=a.parentNode}return null}function Cb(a){a=a[Of]||a[uf];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function ue(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(p(33));}function Db(a){return a[Pf]||null}var Sf=[],Tf=-1;function Uf(a){return{current:a}} function E(a){0>Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e} function Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||"Unknown",e));return A({},c,d)} function cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)} function jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a<c.length;a++){var d=c[a];do d=d(!0);while(null!==d)}eg=null;fg=!1}catch(e){throw null!==eg&&(eg=eg.slice(a+1)),ac(fc,jg),e;}finally{C=b,gg=!1}}return null}var kg=[],lg=0,mg=null,ng=0,og=[],pg=0,qg=null,rg=1,sg="";function tg(a,b){kg[lg++]=ng;kg[lg++]=mg;mg=a;ng=b} function ug(a,b,c){og[pg++]=rg;og[pg++]=sg;og[pg++]=qg;qg=a;var d=rg;a=sg;var e=32-oc(d)-1;d&=~(1<<e);c+=1;var f=32-oc(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;rg=1<<32-oc(b)+e|c<<e|d;sg=f+a}else rg=1<<f|c<<e|d,sg=a}function vg(a){null!==a.return&&(tg(a,1),ug(a,1,0))}function wg(a){for(;a===mg;)mg=kg[--lg],kg[lg]=null,ng=kg[--lg],kg[lg]=null;for(;a===qg;)qg=og[--pg],og[pg]=null,sg=og[--pg],og[pg]=null,rg=og[--pg],og[pg]=null}var xg=null,yg=null,I=!1,zg=null; function Ag(a,b){var c=Bg(5,null,null,0);c.elementType="DELETED";c.stateNode=b;c.return=a;b=a.deletions;null===b?(a.deletions=[c],a.flags|=16):b.push(c)} function Cg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,xg=a,yg=Lf(b.firstChild),!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,xg=a,yg=null,!0):!1;case 13:return b=8!==b.nodeType?null:b,null!==b?(c=null!==qg?{id:rg,overflow:sg}:null,a.memoizedState={dehydrated:b,treeContext:c,retryLane:1073741824},c=Bg(18,null,null,0),c.stateNode=b,c.return=a,a.child=c,xg=a,yg= null,!0):!1;default:return!1}}function Dg(a){return 0!==(a.mode&1)&&0===(a.flags&128)}function Eg(a){if(I){var b=yg;if(b){var c=b;if(!Cg(a,b)){if(Dg(a))throw Error(p(418));b=Lf(c.nextSibling);var d=xg;b&&Cg(a,b)?Ag(d,c):(a.flags=a.flags&-4097|2,I=!1,xg=a)}}else{if(Dg(a))throw Error(p(418));a.flags=a.flags&-4097|2;I=!1;xg=a}}}function Fg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;xg=a} function Gg(a){if(a!==xg)return!1;if(!I)return Fg(a),I=!0,!1;var b;(b=3!==a.tag)&&!(b=5!==a.tag)&&(b=a.type,b="head"!==b&&"body"!==b&&!Ef(a.type,a.memoizedProps));if(b&&(b=yg)){if(Dg(a))throw Hg(),Error(p(418));for(;b;)Ag(a,b),b=Lf(b.nextSibling)}Fg(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(p(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){yg=Lf(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==c&&"$?"!==c||b++}a=a.nextSibling}yg= null}}else yg=xg?Lf(a.stateNode.nextSibling):null;return!0}function Hg(){for(var a=yg;a;)a=Lf(a.nextSibling)}function Ig(){yg=xg=null;I=!1}function Jg(a){null===zg?zg=[a]:zg.push(a)}var Kg=ua.ReactCurrentBatchConfig; function Lg(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(p(309));var d=c.stateNode}if(!d)throw Error(p(147,a));var e=d,f=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===f)return b.ref;b=function(a){var b=e.refs;null===a?delete b[f]:b[f]=a};b._stringRef=f;return b}if("string"!==typeof a)throw Error(p(284));if(!c._owner)throw Error(p(290,a));}return a} function Mg(a,b){a=Object.prototype.toString.call(b);throw Error(p(31,"[object Object]"===a?"object with keys {"+Object.keys(b).join(", ")+"}":a));}function Ng(a){var b=a._init;return b(a._payload)} function Og(a){function b(b,c){if(a){var d=b.deletions;null===d?(b.deletions=[c],b.flags|=16):d.push(c)}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Pg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return b.flags|=1048576,c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags|=2,c):d;b.flags|=2;return c}function g(b){a&& null===b.alternate&&(b.flags|=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Qg(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){var f=c.type;if(f===ya)return m(a,b,c.props.children,d,c.key);if(null!==b&&(b.elementType===f||"object"===typeof f&&null!==f&&f.$$typeof===Ha&&Ng(f)===b.type))return d=e(b,c.props),d.ref=Lg(a,b,c),d.return=a,d;d=Rg(c.type,c.key,c.props,null,a.mode,d);d.ref=Lg(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag|| b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=Sg(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function m(a,b,c,d,f){if(null===b||7!==b.tag)return b=Tg(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function q(a,b,c){if("string"===typeof b&&""!==b||"number"===typeof b)return b=Qg(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case va:return c=Rg(b.type,b.key,b.props,null,a.mode,c), c.ref=Lg(a,null,b),c.return=a,c;case wa:return b=Sg(b,a.mode,c),b.return=a,b;case Ha:var d=b._init;return q(a,d(b._payload),c)}if(eb(b)||Ka(b))return b=Tg(b,a.mode,c,null),b.return=a,b;Mg(a,b)}return null}function r(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c&&""!==c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case va:return c.key===e?k(a,b,c,d):null;case wa:return c.key===e?l(a,b,c,d):null;case Ha:return e=c._init,r(a, b,e(c._payload),d)}if(eb(c)||Ka(c))return null!==e?null:m(a,b,c,d,null);Mg(a,c)}return null}function y(a,b,c,d,e){if("string"===typeof d&&""!==d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case va:return a=a.get(null===d.key?c:d.key)||null,k(b,a,d,e);case wa:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e);case Ha:var f=d._init;return y(a,b,c,f(d._payload),e)}if(eb(d)||Ka(d))return a=a.get(c)||null,m(b,a,d,e,null);Mg(b,d)}return null} function n(e,g,h,k){for(var l=null,m=null,u=g,w=g=0,x=null;null!==u&&w<h.length;w++){u.index>w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;w<h.length;w++)u=q(e,h[w],k),null!==u&&(g=f(u,g,w),null===m?l=u:m.sibling=u,m=u);I&&tg(e,w);return l}for(u=d(e,u);w<h.length;w++)x=y(u,e,w,h[w],k),null!==x&&(a&&null!==x.alternate&&u.delete(null=== x.key?w:x.key),g=f(x,g,w),null===m?l=x:m.sibling=x,m=x);a&&u.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function t(e,g,h,k){var l=Ka(h);if("function"!==typeof l)throw Error(p(150));h=l.call(h);if(null==h)throw Error(p(151));for(var u=l=null,m=g,w=g=0,x=null,n=h.next();null!==m&&!n.done;w++,n=h.next()){m.index>w?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e, m),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){"object"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if("object"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k= f.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||"object"===typeof k&&null!==k&&k.$$typeof===Ha&&Ng(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=Lg(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Tg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Rg(f.type,f.key,f.props,null,a.mode,h),h.ref=Lg(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!== d;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Sg(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);Mg(a,f)}return"string"===typeof f&&""!==f||"number"===typeof f?(f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d): (c(a,d),d=Qg(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Ug=Og(!0),Vg=Og(!1),Wg=Uf(null),Xg=null,Yg=null,Zg=null;function $g(){Zg=Yg=Xg=null}function ah(a){var b=Wg.current;E(Wg);a._currentValue=b}function bh(a,b,c){for(;null!==a;){var d=a.alternate;(a.childLanes&b)!==b?(a.childLanes|=b,null!==d&&(d.childLanes|=b)):null!==d&&(d.childLanes&b)!==b&&(d.childLanes|=b);if(a===c)break;a=a.return}} function ch(a,b){Xg=a;Zg=Yg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(dh=!0),a.firstContext=null)}function eh(a){var b=a._currentValue;if(Zg!==a)if(a={context:a,memoizedValue:b,next:null},null===Yg){if(null===Xg)throw Error(p(308));Yg=a;Xg.dependencies={lanes:0,firstContext:a}}else Yg=Yg.next=a;return b}var fh=null;function gh(a){null===fh?fh=[a]:fh.push(a)} function hh(a,b,c,d){var e=b.interleaved;null===e?(c.next=c,gh(b)):(c.next=e.next,e.next=c);b.interleaved=c;return ih(a,d)}function ih(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}var jh=!1;function kh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}} function lh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function mh(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}} function nh(a,b,c){var d=a.updateQueue;if(null===d)return null;d=d.shared;if(0!==(K&2)){var e=d.pending;null===e?b.next=b:(b.next=e.next,e.next=b);d.pending=b;return ih(a,c)}e=d.interleaved;null===e?(b.next=b,gh(d)):(b.next=e.next,e.next=b);d.interleaved=b;return ih(a,c)}function oh(a,b,c){b=b.updateQueue;if(null!==b&&(b=b.shared,0!==(c&4194240))){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}} function ph(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next= b;c.lastBaseUpdate=b} function qh(a,b,c,d){var e=a.updateQueue;jh=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var m=a.alternate;null!==m&&(m=m.updateQueue,h=m.lastBaseUpdate,h!==g&&(null===h?m.firstBaseUpdate=l:h.next=l,m.lastBaseUpdate=k))}if(null!==f){var q=e.baseState;g=0;m=l=k=null;h=f;do{var r=h.lane,y=h.eventTime;if((d&r)===r){null!==m&&(m=m.next={eventTime:y,lane:0,tag:h.tag,payload:h.payload,callback:h.callback, next:null});a:{var n=a,t=h;r=b;y=c;switch(t.tag){case 1:n=t.payload;if("function"===typeof n){q=n.call(y,q,r);break a}q=n;break a;case 3:n.flags=n.flags&-65537|128;case 0:n=t.payload;r="function"===typeof n?n.call(y,q,r):n;if(null===r||void 0===r)break a;q=A({},q,r);break a;case 2:jh=!0}}null!==h.callback&&0!==h.lane&&(a.flags|=64,r=e.effects,null===r?e.effects=[h]:r.push(h))}else y={eventTime:y,lane:r,tag:h.tag,payload:h.payload,callback:h.callback,next:null},null===m?(l=m=y,k=q):m=m.next=y,g|=r; h=h.next;if(null===h)if(h=e.shared.pending,null===h)break;else r=h,h=r.next,r.next=null,e.lastBaseUpdate=r,e.shared.pending=null}while(1);null===m&&(k=q);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=m;b=e.shared.interleaved;if(null!==b){e=b;do g|=e.lane,e=e.next;while(e!==b)}else null===f&&(e.shared.lanes=0);rh|=g;a.lanes=g;a.memoizedState=q}} function sh(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if("function"!==typeof e)throw Error(p(191,e));e.call(d)}}}var th={},uh=Uf(th),vh=Uf(th),wh=Uf(th);function xh(a){if(a===th)throw Error(p(174));return a} function yh(a,b){G(wh,b);G(vh,a);G(uh,th);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(uh);G(uh,b)}function zh(){E(uh);E(vh);E(wh)}function Ah(a){xh(wh.current);var b=xh(uh.current);var c=lb(b,a.type);b!==c&&(G(vh,a),G(uh,c))}function Bh(a){vh.current===a&&(E(uh),E(vh))}var L=Uf(0); function Ch(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Dh=[]; function Eh(){for(var a=0;a<Dh.length;a++)Dh[a]._workInProgressVersionPrimary=null;Dh.length=0}var Fh=ua.ReactCurrentDispatcher,Gh=ua.ReactCurrentBatchConfig,Hh=0,M=null,N=null,O=null,Ih=!1,Jh=!1,Kh=0,Lh=0;function P(){throw Error(p(321));}function Mh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!He(a[c],b[c]))return!1;return!0} function Nh(a,b,c,d,e,f){Hh=f;M=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;Fh.current=null===a||null===a.memoizedState?Oh:Ph;a=c(d,e);if(Jh){f=0;do{Jh=!1;Kh=0;if(25<=f)throw Error(p(301));f+=1;O=N=null;b.updateQueue=null;Fh.current=Qh;a=c(d,e)}while(Jh)}Fh.current=Rh;b=null!==N&&null!==N.next;Hh=0;O=N=M=null;Ih=!1;if(b)throw Error(p(300));return a}function Sh(){var a=0!==Kh;Kh=0;return a} function Th(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===O?M.memoizedState=O=a:O=O.next=a;return O}function Uh(){if(null===N){var a=M.alternate;a=null!==a?a.memoizedState:null}else a=N.next;var b=null===O?M.memoizedState:O.next;if(null!==b)O=b,N=a;else{if(null===a)throw Error(p(310));N=a;a={memoizedState:N.memoizedState,baseState:N.baseState,baseQueue:N.baseQueue,queue:N.queue,next:null};null===O?M.memoizedState=O=a:O=O.next=a}return O} function Vh(a,b){return"function"===typeof b?b(a):b} function Wh(a){var b=Uh(),c=b.queue;if(null===c)throw Error(p(311));c.lastRenderedReducer=a;var d=N,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){f=e.next;d=d.baseState;var h=g=null,k=null,l=f;do{var m=l.lane;if((Hh&m)===m)null!==k&&(k=k.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),d=l.hasEagerState?l.eagerState:a(d,l.action);else{var q={lane:m,action:l.action,hasEagerState:l.hasEagerState, eagerState:l.eagerState,next:null};null===k?(h=k=q,g=d):k=k.next=q;M.lanes|=m;rh|=m}l=l.next}while(null!==l&&l!==f);null===k?g=d:k.next=h;He(d,b.memoizedState)||(dh=!0);b.memoizedState=d;b.baseState=g;b.baseQueue=k;c.lastRenderedState=d}a=c.interleaved;if(null!==a){e=a;do f=e.lane,M.lanes|=f,rh|=f,e=e.next;while(e!==a)}else null===e&&(c.lanes=0);return[b.memoizedState,c.dispatch]} function Xh(a){var b=Uh(),c=b.queue;if(null===c)throw Error(p(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(dh=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}function Yh(){} function Zh(a,b){var c=M,d=Uh(),e=b(),f=!He(d.memoizedState,e);f&&(d.memoizedState=e,dh=!0);d=d.queue;$h(ai.bind(null,c,d,a),[a]);if(d.getSnapshot!==b||f||null!==O&&O.memoizedState.tag&1){c.flags|=2048;bi(9,ci.bind(null,c,d,e,b),void 0,null);if(null===Q)throw Error(p(349));0!==(Hh&30)||di(c,b,e)}return e}function di(a,b,c){a.flags|=16384;a={getSnapshot:b,value:c};b=M.updateQueue;null===b?(b={lastEffect:null,stores:null},M.updateQueue=b,b.stores=[a]):(c=b.stores,null===c?b.stores=[a]:c.push(a))} function ci(a,b,c,d){b.value=c;b.getSnapshot=d;ei(b)&&fi(a)}function ai(a,b,c){return c(function(){ei(b)&&fi(a)})}function ei(a){var b=a.getSnapshot;a=a.value;try{var c=b();return!He(a,c)}catch(d){return!0}}function fi(a){var b=ih(a,1);null!==b&&gi(b,a,1,-1)} function hi(a){var b=Th();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vh,lastRenderedState:a};b.queue=a;a=a.dispatch=ii.bind(null,M,a);return[b.memoizedState,a]} function bi(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=M.updateQueue;null===b?(b={lastEffect:null,stores:null},M.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function ji(){return Uh().memoizedState}function ki(a,b,c,d){var e=Th();M.flags|=a;e.memoizedState=bi(1|b,c,void 0,void 0===d?null:d)} function li(a,b,c,d){var e=Uh();d=void 0===d?null:d;var f=void 0;if(null!==N){var g=N.memoizedState;f=g.destroy;if(null!==d&&Mh(d,g.deps)){e.memoizedState=bi(b,c,f,d);return}}M.flags|=a;e.memoizedState=bi(1|b,c,f,d)}function mi(a,b){return ki(8390656,8,a,b)}function $h(a,b){return li(2048,8,a,b)}function ni(a,b){return li(4,2,a,b)}function oi(a,b){return li(4,4,a,b)} function pi(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function qi(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return li(4,4,pi.bind(null,b,a),c)}function ri(){}function si(a,b){var c=Uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Mh(b,d[1]))return d[0];c.memoizedState=[a,b];return a} function ti(a,b){var c=Uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Mh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function ui(a,b,c){if(0===(Hh&21))return a.baseState&&(a.baseState=!1,dh=!0),a.memoizedState=c;He(c,b)||(c=yc(),M.lanes|=c,rh|=c,a.baseState=!0);return b}function vi(a,b){var c=C;C=0!==c&&4>c?c:4;a(!0);var d=Gh.transition;Gh.transition={};try{a(!1),b()}finally{C=c,Gh.transition=d}}function wi(){return Uh().memoizedState} function xi(a,b,c){var d=yi(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(zi(a))Ai(b,c);else if(c=hh(a,b,c,d),null!==c){var e=R();gi(c,a,d,e);Bi(c,b,d)}} function ii(a,b,c){var d=yi(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(zi(a))Ai(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,gh(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=hh(a,b,e,d);null!==c&&(e=R(),gi(c,a,d,e),Bi(c,b,d))}} function zi(a){var b=a.alternate;return a===M||null!==b&&b===M}function Ai(a,b){Jh=Ih=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Bi(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}} var Rh={readContext:eh,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useInsertionEffect:P,useLayoutEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useMutableSource:P,useSyncExternalStore:P,useId:P,unstable_isNewReconciler:!1},Oh={readContext:eh,useCallback:function(a,b){Th().memoizedState=[a,void 0===b?null:b];return a},useContext:eh,useEffect:mi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ki(4194308, 4,pi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ki(4194308,4,a,b)},useInsertionEffect:function(a,b){return ki(4,2,a,b)},useMemo:function(a,b){var c=Th();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Th();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=xi.bind(null,M,a);return[d.memoizedState,a]},useRef:function(a){var b= Th();a={current:a};return b.memoizedState=a},useState:hi,useDebugValue:ri,useDeferredValue:function(a){return Th().memoizedState=a},useTransition:function(){var a=hi(!1),b=a[0];a=vi.bind(null,a[1]);Th().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=M,e=Th();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===Q)throw Error(p(349));0!==(Hh&30)||di(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;mi(ai.bind(null,d, f,a),[a]);d.flags|=2048;bi(9,ci.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=Th(),b=Q.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=":"+b+"R"+c;c=Kh++;0<c&&(b+="H"+c.toString(32));b+=":"}else c=Lh++,b=":"+b+"r"+c.toString(32)+":";return a.memoizedState=b},unstable_isNewReconciler:!1},Ph={readContext:eh,useCallback:si,useContext:eh,useEffect:$h,useImperativeHandle:qi,useInsertionEffect:ni,useLayoutEffect:oi,useMemo:ti,useReducer:Wh,useRef:ji,useState:function(){return Wh(Vh)}, useDebugValue:ri,useDeferredValue:function(a){var b=Uh();return ui(b,N.memoizedState,a)},useTransition:function(){var a=Wh(Vh)[0],b=Uh().memoizedState;return[a,b]},useMutableSource:Yh,useSyncExternalStore:Zh,useId:wi,unstable_isNewReconciler:!1},Qh={readContext:eh,useCallback:si,useContext:eh,useEffect:$h,useImperativeHandle:qi,useInsertionEffect:ni,useLayoutEffect:oi,useMemo:ti,useReducer:Xh,useRef:ji,useState:function(){return Xh(Vh)},useDebugValue:ri,useDeferredValue:function(a){var b=Uh();return null=== N?b.memoizedState=a:ui(b,N.memoizedState,a)},useTransition:function(){var a=Xh(Vh)[0],b=Uh().memoizedState;return[a,b]},useMutableSource:Yh,useSyncExternalStore:Zh,useId:wi,unstable_isNewReconciler:!1};function Ci(a,b){if(a&&a.defaultProps){b=A({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}function Di(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:A({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)} var Ei={isMounted:function(a){return(a=a._reactInternals)?Vb(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=R(),e=yi(a),f=mh(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=nh(a,f,e);null!==b&&(gi(b,a,e,d),oh(b,a,e))},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=R(),e=yi(a),f=mh(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=nh(a,f,e);null!==b&&(gi(b,a,e,d),oh(b,a,e))},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=R(),d= yi(a),e=mh(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=b);b=nh(a,e,d);null!==b&&(gi(b,a,d,c),oh(b,a,d))}};function Fi(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Ie(c,d)||!Ie(e,f):!0} function Gi(a,b,c){var d=!1,e=Vf;var f=b.contextType;"object"===typeof f&&null!==f?f=eh(f):(e=Zf(b)?Xf:H.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Yf(a,e):Vf);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Ei;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b} function Hi(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Ei.enqueueReplaceState(b,b.state,null)} function Ii(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs={};kh(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=eh(f):(f=Zf(b)?Xf:H.current,e.context=Yf(a,f));e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(Di(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state, "function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Ei.enqueueReplaceState(e,e.state,null),qh(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4194308)}function Ji(a,b){try{var c="",d=b;do c+=Pa(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e,digest:null}} function Ki(a,b,c){return{value:a,source:null,stack:null!=c?c:null,digest:null!=b?b:null}}function Li(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Mi="function"===typeof WeakMap?WeakMap:Map;function Ni(a,b,c){c=mh(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Oi||(Oi=!0,Pi=d);Li(a,b)};return c} function Qi(a,b,c){c=mh(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){return d(e)};c.callback=function(){Li(a,b)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){Li(a,b);"function"!==typeof d&&(null===Ri?Ri=new Set([this]):Ri.add(this));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c} function Si(a,b,c){var d=a.pingCache;if(null===d){d=a.pingCache=new Mi;var e=new Set;d.set(b,e)}else e=d.get(b),void 0===e&&(e=new Set,d.set(b,e));e.has(c)||(e.add(c),a=Ti.bind(null,a,b,c),b.then(a,a))}function Ui(a){do{var b;if(b=13===a.tag)b=a.memoizedState,b=null!==b?null!==b.dehydrated?!0:!1:!0;if(b)return a;a=a.return}while(null!==a);return null} function Vi(a,b,c,d,e){if(0===(a.mode&1))return a===b?a.flags|=65536:(a.flags|=128,c.flags|=131072,c.flags&=-52805,1===c.tag&&(null===c.alternate?c.tag=17:(b=mh(-1,1),b.tag=2,nh(c,b,1))),c.lanes|=1),a;a.flags|=65536;a.lanes=e;return a}var Wi=ua.ReactCurrentOwner,dh=!1;function Xi(a,b,c,d){b.child=null===a?Vg(b,null,c,d):Ug(b,a.child,c,d)} function Yi(a,b,c,d,e){c=c.render;var f=b.ref;ch(b,e);d=Nh(a,b,c,d,f,e);c=Sh();if(null!==a&&!dh)return b.updateQueue=a.updateQueue,b.flags&=-2053,a.lanes&=~e,Zi(a,b,e);I&&c&&vg(b);b.flags|=1;Xi(a,b,d,e);return b.child} function $i(a,b,c,d,e){if(null===a){var f=c.type;if("function"===typeof f&&!aj(f)&&void 0===f.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=f,bj(a,b,f,d,e);a=Rg(c.type,null,d,b,b.mode,e);a.ref=b.ref;a.return=b;return b.child=a}f=a.child;if(0===(a.lanes&e)){var g=f.memoizedProps;c=c.compare;c=null!==c?c:Ie;if(c(g,d)&&a.ref===b.ref)return Zi(a,b,e)}b.flags|=1;a=Pg(f,d);a.ref=b.ref;a.return=b;return b.child=a} function bj(a,b,c,d,e){if(null!==a){var f=a.memoizedProps;if(Ie(f,d)&&a.ref===b.ref)if(dh=!1,b.pendingProps=d=f,0!==(a.lanes&e))0!==(a.flags&131072)&&(dh=!0);else return b.lanes=a.lanes,Zi(a,b,e)}return cj(a,b,c,d,e)} function dj(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if("hidden"===d.mode)if(0===(b.mode&1))b.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(ej,fj),fj|=c;else{if(0===(c&1073741824))return a=null!==f?f.baseLanes|c:c,b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a,cachePool:null,transitions:null},b.updateQueue=null,G(ej,fj),fj|=a,null;b.memoizedState={baseLanes:0,cachePool:null,transitions:null};d=null!==f?f.baseLanes:c;G(ej,fj);fj|=d}else null!== f?(d=f.baseLanes|c,b.memoizedState=null):d=c,G(ej,fj),fj|=d;Xi(a,b,e,c);return b.child}function gj(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=512,b.flags|=2097152}function cj(a,b,c,d,e){var f=Zf(c)?Xf:H.current;f=Yf(b,f);ch(b,e);c=Nh(a,b,c,d,f,e);d=Sh();if(null!==a&&!dh)return b.updateQueue=a.updateQueue,b.flags&=-2053,a.lanes&=~e,Zi(a,b,e);I&&d&&vg(b);b.flags|=1;Xi(a,b,c,e);return b.child} function hj(a,b,c,d,e){if(Zf(c)){var f=!0;cg(b)}else f=!1;ch(b,e);if(null===b.stateNode)ij(a,b),Gi(b,c,d),Ii(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=eh(l):(l=Zf(c)?Xf:H.current,l=Yf(b,l));var m=c.getDerivedStateFromProps,q="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;q||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps|| (h!==d||k!==l)&&Hi(b,g,d,l);jh=!1;var r=b.memoizedState;g.state=r;qh(b,d,g,e);k=b.memoizedState;h!==d||r!==k||Wf.current||jh?("function"===typeof m&&(Di(b,c,m,d),k=b.memoizedState),(h=jh||Fi(b,c,h,d,r,k,l))?(q||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.flags|=4194308)): ("function"===typeof g.componentDidMount&&(b.flags|=4194308),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4194308),d=!1)}else{g=b.stateNode;lh(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:Ci(b.type,h);g.props=l;q=b.pendingProps;r=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=eh(k):(k=Zf(c)?Xf:H.current,k=Yf(b,k));var y=c.getDerivedStateFromProps;(m="function"===typeof y||"function"===typeof g.getSnapshotBeforeUpdate)|| "function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==q||r!==k)&&Hi(b,g,d,k);jh=!1;r=b.memoizedState;g.state=r;qh(b,d,g,e);var n=b.memoizedState;h!==q||r!==n||Wf.current||jh?("function"===typeof y&&(Di(b,c,y,d),n=b.memoizedState),(l=jh||Fi(b,c,l,d,r,n,k)||!1)?(m||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,n,k),"function"===typeof g.UNSAFE_componentWillUpdate&& g.UNSAFE_componentWillUpdate(d,n,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=1024)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=1024),b.memoizedProps=d,b.memoizedState=n),g.props=d,g.state=n,g.context=k,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r=== a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=1024),d=!1)}return jj(a,b,c,d,f,e)} function jj(a,b,c,d,e,f){gj(a,b);var g=0!==(b.flags&128);if(!d&&!g)return e&&dg(b,c,!1),Zi(a,b,f);d=b.stateNode;Wi.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=Ug(b,a.child,null,f),b.child=Ug(b,null,h,f)):Xi(a,b,h,f);b.memoizedState=d.state;e&&dg(b,c,!0);return b.child}function kj(a){var b=a.stateNode;b.pendingContext?ag(a,b.pendingContext,b.pendingContext!==b.context):b.context&&ag(a,b.context,!1);yh(a,b.containerInfo)} function lj(a,b,c,d,e){Ig();Jg(e);b.flags|=256;Xi(a,b,c,d);return b.child}var mj={dehydrated:null,treeContext:null,retryLane:0};function nj(a){return{baseLanes:a,cachePool:null,transitions:null}} function oj(a,b,c){var d=b.pendingProps,e=L.current,f=!1,g=0!==(b.flags&128),h;(h=g)||(h=null!==a&&null===a.memoizedState?!1:0!==(e&2));if(h)f=!0,b.flags&=-129;else if(null===a||null!==a.memoizedState)e|=1;G(L,e&1);if(null===a){Eg(b);a=b.memoizedState;if(null!==a&&(a=a.dehydrated,null!==a))return 0===(b.mode&1)?b.lanes=1:"$!"===a.data?b.lanes=8:b.lanes=1073741824,null;g=d.children;a=d.fallback;return f?(d=b.mode,f=b.child,g={mode:"hidden",children:g},0===(d&1)&&null!==f?(f.childLanes=0,f.pendingProps= g):f=pj(g,d,0,null),a=Tg(a,d,c,null),f.return=b,a.return=b,f.sibling=a,b.child=f,b.child.memoizedState=nj(c),b.memoizedState=mj,a):qj(b,g)}e=a.memoizedState;if(null!==e&&(h=e.dehydrated,null!==h))return rj(a,b,g,d,h,e,c);if(f){f=d.fallback;g=b.mode;e=a.child;h=e.sibling;var k={mode:"hidden",children:d.children};0===(g&1)&&b.child!==e?(d=b.child,d.childLanes=0,d.pendingProps=k,b.deletions=null):(d=Pg(e,k),d.subtreeFlags=e.subtreeFlags&14680064);null!==h?f=Pg(h,f):(f=Tg(f,g,c,null),f.flags|=2);f.return= b;d.return=b;d.sibling=f;b.child=d;d=f;f=b.child;g=a.child.memoizedState;g=null===g?nj(c):{baseLanes:g.baseLanes|c,cachePool:null,transitions:g.transitions};f.memoizedState=g;f.childLanes=a.childLanes&~c;b.memoizedState=mj;return d}f=a.child;a=f.sibling;d=Pg(f,{mode:"visible",children:d.children});0===(b.mode&1)&&(d.lanes=c);d.return=b;d.sibling=null;null!==a&&(c=b.deletions,null===c?(b.deletions=[a],b.flags|=16):c.push(a));b.child=d;b.memoizedState=null;return d} function qj(a,b){b=pj({mode:"visible",children:b},a.mode,0,null);b.return=a;return a.child=b}function sj(a,b,c,d){null!==d&&Jg(d);Ug(b,a.child,null,c);a=qj(b,b.pendingProps.children);a.flags|=2;b.memoizedState=null;return a} function rj(a,b,c,d,e,f,g){if(c){if(b.flags&256)return b.flags&=-257,d=Ki(Error(p(422))),sj(a,b,g,d);if(null!==b.memoizedState)return b.child=a.child,b.flags|=128,null;f=d.fallback;e=b.mode;d=pj({mode:"visible",children:d.children},e,0,null);f=Tg(f,e,g,null);f.flags|=2;d.return=b;f.return=b;d.sibling=f;b.child=d;0!==(b.mode&1)&&Ug(b,a.child,null,g);b.child.memoizedState=nj(g);b.memoizedState=mj;return f}if(0===(b.mode&1))return sj(a,b,g,null);if("$!"===e.data){d=e.nextSibling&&e.nextSibling.dataset; if(d)var h=d.dgst;d=h;f=Error(p(419));d=Ki(f,d,void 0);return sj(a,b,g,d)}h=0!==(g&a.childLanes);if(dh||h){d=Q;if(null!==d){switch(g&-g){case 4:e=2;break;case 16:e=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:e=32;break;case 536870912:e=268435456;break;default:e=0}e=0!==(e&(d.suspendedLanes|g))?0:e; 0!==e&&e!==f.retryLane&&(f.retryLane=e,ih(a,e),gi(d,a,e,-1))}tj();d=Ki(Error(p(421)));return sj(a,b,g,d)}if("$?"===e.data)return b.flags|=128,b.child=a.child,b=uj.bind(null,a),e._reactRetry=b,null;a=f.treeContext;yg=Lf(e.nextSibling);xg=b;I=!0;zg=null;null!==a&&(og[pg++]=rg,og[pg++]=sg,og[pg++]=qg,rg=a.id,sg=a.overflow,qg=b);b=qj(b,d.children);b.flags|=4096;return b}function vj(a,b,c){a.lanes|=b;var d=a.alternate;null!==d&&(d.lanes|=b);bh(a.return,b,c)} function wj(a,b,c,d,e){var f=a.memoizedState;null===f?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e}:(f.isBackwards=b,f.rendering=null,f.renderingStartTime=0,f.last=d,f.tail=c,f.tailMode=e)} function xj(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;Xi(a,b,d.children,c);d=L.current;if(0!==(d&2))d=d&1|2,b.flags|=128;else{if(null!==a&&0!==(a.flags&128))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&vj(a,c,b);else if(19===a.tag)vj(a,c,b);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}G(L,d);if(0===(b.mode&1))b.memoizedState= null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===Ch(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);wj(b,!1,e,c,f);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===Ch(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}wj(b,!0,c,null,f);break;case "together":wj(b,!1,null,null,void 0);break;default:b.memoizedState=null}return b.child} function ij(a,b){0===(b.mode&1)&&null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2)}function Zi(a,b,c){null!==a&&(b.dependencies=a.dependencies);rh|=b.lanes;if(0===(c&b.childLanes))return null;if(null!==a&&b.child!==a.child)throw Error(p(153));if(null!==b.child){a=b.child;c=Pg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Pg(a,a.pendingProps),c.return=b;c.sibling=null}return b.child} function yj(a,b,c){switch(b.tag){case 3:kj(b);Ig();break;case 5:Ah(b);break;case 1:Zf(b.type)&&cg(b);break;case 4:yh(b,b.stateNode.containerInfo);break;case 10:var d=b.type._context,e=b.memoizedProps.value;G(Wg,d._currentValue);d._currentValue=e;break;case 13:d=b.memoizedState;if(null!==d){if(null!==d.dehydrated)return G(L,L.current&1),b.flags|=128,null;if(0!==(c&b.child.childLanes))return oj(a,b,c);G(L,L.current&1);a=Zi(a,b,c);return null!==a?a.sibling:null}G(L,L.current&1);break;case 19:d=0!==(c& b.childLanes);if(0!==(a.flags&128)){if(d)return xj(a,b,c);b.flags|=128}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);G(L,L.current);if(d)break;else return null;case 22:case 23:return b.lanes=0,dj(a,b,c)}return Zi(a,b,c)}var zj,Aj,Bj,Cj; zj=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};Aj=function(){}; Bj=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;xh(uh.current);var f=null;switch(c){case "input":e=Ya(a,e);d=Ya(a,d);f=[];break;case "select":e=A({},e,{value:void 0});d=A({},d,{value:void 0});f=[];break;case "textarea":e=gb(a,e);d=gb(a,d);f=[];break;default:"function"!==typeof e.onClick&&"function"===typeof d.onClick&&(a.onclick=Bf)}ub(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if("style"===l){var h=e[l];for(g in h)h.hasOwnProperty(g)&& (c||(c={}),c[g]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(ea.hasOwnProperty(l)?f||(f=[]):(f=f||[]).push(l,null));for(l in d){var k=d[l];h=null!=e?e[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||(c={}),c[g]=k[g])}else c||(f||(f=[]),f.push(l, c)),c=k;else"dangerouslySetInnerHTML"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(ea.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&D("scroll",a),f||h===k||(f=[])):(f=f||[]).push(l,k))}c&&(f=f||[]).push("style",c);var l=f;if(b.updateQueue=l)b.flags|=4}};Cj=function(a,b,c,d){c!==d&&(b.flags|=4)}; function Dj(a,b){if(!I)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}} function S(a){var b=null!==a.alternate&&a.alternate.child===a.child,c=0,d=0;if(b)for(var e=a.child;null!==e;)c|=e.lanes|e.childLanes,d|=e.subtreeFlags&14680064,d|=e.flags&14680064,e.return=a,e=e.sibling;else for(e=a.child;null!==e;)c|=e.lanes|e.childLanes,d|=e.subtreeFlags,d|=e.flags,e.return=a,e=e.sibling;a.subtreeFlags|=d;a.childLanes=c;return b} function Ej(a,b,c){var d=b.pendingProps;wg(b);switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S(b),null;case 1:return Zf(b.type)&&$f(),S(b),null;case 3:d=b.stateNode;zh();E(Wf);E(H);Eh();d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)Gg(b)?b.flags|=4:null===a||a.memoizedState.isDehydrated&&0===(b.flags&256)||(b.flags|=1024,null!==zg&&(Fj(zg),zg=null));Aj(a,b);S(b);return null;case 5:Bh(b);var e=xh(wh.current); c=b.type;if(null!==a&&null!=b.stateNode)Bj(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=512,b.flags|=2097152);else{if(!d){if(null===b.stateNode)throw Error(p(166));S(b);return null}a=xh(uh.current);if(Gg(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[Of]=b;d[Pf]=f;a=0!==(b.mode&1);switch(c){case "dialog":D("cancel",d);D("close",d);break;case "iframe":case "object":case "embed":D("load",d);break;case "video":case "audio":for(e=0;e<lf.length;e++)D(lf[e],d);break;case "source":D("error",d);break;case "img":case "image":case "link":D("error", d);D("load",d);break;case "details":D("toggle",d);break;case "input":Za(d,f);D("invalid",d);break;case "select":d._wrapperState={wasMultiple:!!f.multiple};D("invalid",d);break;case "textarea":hb(d,f),D("invalid",d)}ub(c,f);e=null;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];"children"===g?"string"===typeof h?d.textContent!==h&&(!0!==f.suppressHydrationWarning&&Af(d.textContent,h,a),e=["children",h]):"number"===typeof h&&d.textContent!==""+h&&(!0!==f.suppressHydrationWarning&&Af(d.textContent, h,a),e=["children",""+h]):ea.hasOwnProperty(g)&&null!=h&&"onScroll"===g&&D("scroll",d)}switch(c){case "input":Va(d);db(d,f,!0);break;case "textarea":Va(d);jb(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=Bf)}d=e;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;"http://www.w3.org/1999/xhtml"===a&&(a=kb(c));"http://www.w3.org/1999/xhtml"===a?"script"===c?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)): "string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;zj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case "dialog":D("cancel",a);D("close",a);e=d;break;case "iframe":case "object":case "embed":D("load",a);e=d;break;case "video":case "audio":for(e=0;e<lf.length;e++)D(lf[e],a);e=d;break;case "source":D("error",a);e=d;break;case "img":case "image":case "link":D("error", a);D("load",a);e=d;break;case "details":D("toggle",a);e=d;break;case "input":Za(a,d);e=Ya(a,d);D("invalid",a);break;case "option":e=d;break;case "select":a._wrapperState={wasMultiple:!!d.multiple};e=A({},d,{value:void 0});D("invalid",a);break;case "textarea":hb(a,d);e=gb(a,d);D("invalid",a);break;default:e=d}ub(c,e);h=e;for(f in h)if(h.hasOwnProperty(f)){var k=h[f];"style"===f?sb(a,k):"dangerouslySetInnerHTML"===f?(k=k?k.__html:void 0,null!=k&&nb(a,k)):"children"===f?"string"===typeof k?("textarea"!== c||""!==k)&&ob(a,k):"number"===typeof k&&ob(a,""+k):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(ea.hasOwnProperty(f)?null!=k&&"onScroll"===f&&D("scroll",a):null!=k&&ta(a,f,k,g))}switch(c){case "input":Va(a);db(a,d,!1);break;case "textarea":Va(a);jb(a);break;case "option":null!=d.value&&a.setAttribute("value",""+Sa(d.value));break;case "select":a.multiple=!!d.multiple;f=d.value;null!=f?fb(a,!!d.multiple,f,!1):null!=d.defaultValue&&fb(a,!!d.multiple,d.defaultValue, !0);break;default:"function"===typeof e.onClick&&(a.onclick=Bf)}switch(c){case "button":case "input":case "select":case "textarea":d=!!d.autoFocus;break a;case "img":d=!0;break a;default:d=!1}}d&&(b.flags|=4)}null!==b.ref&&(b.flags|=512,b.flags|=2097152)}S(b);return null;case 6:if(a&&null!=b.stateNode)Cj(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(p(166));c=xh(wh.current);xh(uh.current);if(Gg(b)){d=b.stateNode;c=b.memoizedProps;d[Of]=b;if(f=d.nodeValue!==c)if(a= xg,null!==a)switch(a.tag){case 3:Af(d.nodeValue,c,0!==(a.mode&1));break;case 5:!0!==a.memoizedProps.suppressHydrationWarning&&Af(d.nodeValue,c,0!==(a.mode&1))}f&&(b.flags|=4)}else d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[Of]=b,b.stateNode=d}S(b);return null;case 13:E(L);d=b.memoizedState;if(null===a||null!==a.memoizedState&&null!==a.memoizedState.dehydrated){if(I&&null!==yg&&0!==(b.mode&1)&&0===(b.flags&128))Hg(),Ig(),b.flags|=98560,f=!1;else if(f=Gg(b),null!==d&&null!==d.dehydrated){if(null=== a){if(!f)throw Error(p(318));f=b.memoizedState;f=null!==f?f.dehydrated:null;if(!f)throw Error(p(317));f[Of]=b}else Ig(),0===(b.flags&128)&&(b.memoizedState=null),b.flags|=4;S(b);f=!1}else null!==zg&&(Fj(zg),zg=null),f=!0;if(!f)return b.flags&65536?b:null}if(0!==(b.flags&128))return b.lanes=c,b;d=null!==d;d!==(null!==a&&null!==a.memoizedState)&&d&&(b.child.flags|=8192,0!==(b.mode&1)&&(null===a||0!==(L.current&1)?0===T&&(T=3):tj()));null!==b.updateQueue&&(b.flags|=4);S(b);return null;case 4:return zh(), Aj(a,b),null===a&&sf(b.stateNode.containerInfo),S(b),null;case 10:return ah(b.type._context),S(b),null;case 17:return Zf(b.type)&&$f(),S(b),null;case 19:E(L);f=b.memoizedState;if(null===f)return S(b),null;d=0!==(b.flags&128);g=f.rendering;if(null===g)if(d)Dj(f,!1);else{if(0!==T||null!==a&&0!==(a.flags&128))for(a=b.child;null!==a;){g=Ch(a);if(null!==g){b.flags|=128;Dj(f,!1);d=g.updateQueue;null!==d&&(b.updateQueue=d,b.flags|=4);b.subtreeFlags=0;d=c;for(c=b.child;null!==c;)f=c,a=d,f.flags&=14680066, g=f.alternate,null===g?(f.childLanes=0,f.lanes=a,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=g.childLanes,f.lanes=g.lanes,f.child=g.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,f.updateQueue=g.updateQueue,f.type=g.type,a=g.dependencies,f.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext}),c=c.sibling;G(L,L.current&1|2);return b.child}a= a.sibling}null!==f.tail&&B()>Gj&&(b.flags|=128,d=!0,Dj(f,!1),b.lanes=4194304)}else{if(!d)if(a=Ch(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Dj(f,!0),null===f.tail&&"hidden"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Gj&&1073741824!==c&&(b.flags|=128,d=!0,Dj(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering= b,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=L.current,G(L,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Hj(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(fj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));} function Ij(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return zh(),E(Wf),E(H),Eh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Bh(b),null;case 13:E(L);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(L),null;case 4:return zh(),null;case 10:return ah(b.type._context),null;case 22:case 23:return Hj(), null;case 24:return null;default:return null}}var Jj=!1,U=!1,Kj="function"===typeof WeakSet?WeakSet:Set,V=null;function Lj(a,b){var c=a.ref;if(null!==c)if("function"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Mj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Nj=!1; function Oj(a,b){Cf=dd;a=Me();if(Ne(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+= q.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break; case 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Ci(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent="":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Nj;Nj=!1;return n} function Pj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Mj(b,c,f)}e=e.next}while(e!==d)}}function Qj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Rj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}"function"===typeof b?b(a):b.current=a}} function Sj(a){var b=a.alternate;null!==b&&(a.alternate=null,Sj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Tj(a){return 5===a.tag||3===a.tag||4===a.tag} function Uj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Tj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}} function Vj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Vj(a,b,c),a=a.sibling;null!==a;)Vj(a,b,c),a=a.sibling} function Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}var X=null,Xj=!1;function Yj(a,b,c){for(c=c.child;null!==c;)Zj(a,b,c),c=c.sibling} function Zj(a,b,c){if(lc&&"function"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Lj(c,b);case 6:var d=X,e=Xj;X=null;Yj(a,b,c);X=d;Xj=e;null!==X&&(Xj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Xj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Xj;X=c.stateNode.containerInfo;Xj=!0; Yj(a,b,c);X=d;Xj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Mj(c,b,g):0!==(f&4)&&Mj(c,b,g));e=e.next}while(e!==d)}Yj(a,b,c);break;case 1:if(!U&&(Lj(c,b),d=c.stateNode,"function"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Yj(a,b,c);break;case 21:Yj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!== c.memoizedState,Yj(a,b,c),U=d):Yj(a,b,c);break;default:Yj(a,b,c)}}function ak(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Kj);b.forEach(function(b){var d=bk.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}} function ck(a,b){var c=b.deletions;if(null!==c)for(var d=0;d<c.length;d++){var e=c[d];try{var f=a,g=b,h=g;a:for(;null!==h;){switch(h.tag){case 5:X=h.stateNode;Xj=!1;break a;case 3:X=h.stateNode.containerInfo;Xj=!0;break a;case 4:X=h.stateNode.containerInfo;Xj=!0;break a}h=h.return}if(null===X)throw Error(p(160));Zj(f,g,e);X=null;Xj=!1;var k=e.alternate;null!==k&&(k.return=null);e.return=null}catch(l){W(e,b,l)}}if(b.subtreeFlags&12854)for(b=b.child;null!==b;)dk(b,a),b=b.sibling} function dk(a,b){var c=a.alternate,d=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:ck(b,a);ek(a);if(d&4){try{Pj(3,a,a.return),Qj(3,a)}catch(t){W(a,a.return,t)}try{Pj(5,a,a.return)}catch(t){W(a,a.return,t)}}break;case 1:ck(b,a);ek(a);d&512&&null!==c&&Lj(c,c.return);break;case 5:ck(b,a);ek(a);d&512&&null!==c&&Lj(c,c.return);if(a.flags&32){var e=a.stateNode;try{ob(e,"")}catch(t){W(a,a.return,t)}}if(d&4&&(e=a.stateNode,null!=e)){var f=a.memoizedProps,g=null!==c?c.memoizedProps:f,h=a.type,k=a.updateQueue; a.updateQueue=null;if(null!==k)try{"input"===h&&"radio"===f.type&&null!=f.name&&ab(e,f);vb(h,g);var l=vb(h,f);for(g=0;g<k.length;g+=2){var m=k[g],q=k[g+1];"style"===m?sb(e,q):"dangerouslySetInnerHTML"===m?nb(e,q):"children"===m?ob(e,q):ta(e,m,q,l)}switch(h){case "input":bb(e,f);break;case "textarea":ib(e,f);break;case "select":var r=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=!!f.multiple;var y=f.value;null!=y?fb(e,!!f.multiple,y,!1):r!==!!f.multiple&&(null!=f.defaultValue?fb(e,!!f.multiple, f.defaultValue,!0):fb(e,!!f.multiple,f.multiple?[]:"",!1))}e[Pf]=f}catch(t){W(a,a.return,t)}}break;case 6:ck(b,a);ek(a);if(d&4){if(null===a.stateNode)throw Error(p(162));e=a.stateNode;f=a.memoizedProps;try{e.nodeValue=f}catch(t){W(a,a.return,t)}}break;case 3:ck(b,a);ek(a);if(d&4&&null!==c&&c.memoizedState.isDehydrated)try{bd(b.containerInfo)}catch(t){W(a,a.return,t)}break;case 4:ck(b,a);ek(a);break;case 13:ck(b,a);ek(a);e=a.child;e.flags&8192&&(f=null!==e.memoizedState,e.stateNode.isHidden=f,!f|| null!==e.alternate&&null!==e.alternate.memoizedState||(fk=B()));d&4&&ak(a);break;case 22:m=null!==c&&null!==c.memoizedState;a.mode&1?(U=(l=U)||m,ck(b,a),U=l):ck(b,a);ek(a);if(d&8192){l=null!==a.memoizedState;if((a.stateNode.isHidden=l)&&!m&&0!==(a.mode&1))for(V=a,m=a.child;null!==m;){for(q=V=m;null!==V;){r=V;y=r.child;switch(r.tag){case 0:case 11:case 14:case 15:Pj(4,r,r.return);break;case 1:Lj(r,r.return);var n=r.stateNode;if("function"===typeof n.componentWillUnmount){d=r;c=r.return;try{b=d,n.props= b.memoizedProps,n.state=b.memoizedState,n.componentWillUnmount()}catch(t){W(d,c,t)}}break;case 5:Lj(r,r.return);break;case 22:if(null!==r.memoizedState){gk(q);continue}}null!==y?(y.return=r,V=y):gk(q)}m=m.sibling}a:for(m=null,q=a;;){if(5===q.tag){if(null===m){m=q;try{e=q.stateNode,l?(f=e.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(h=q.stateNode,k=q.memoizedProps.style,g=void 0!==k&&null!==k&&k.hasOwnProperty("display")?k.display:null,h.style.display= rb("display",g))}catch(t){W(a,a.return,t)}}}else if(6===q.tag){if(null===m)try{q.stateNode.nodeValue=l?"":q.memoizedProps}catch(t){W(a,a.return,t)}}else if((22!==q.tag&&23!==q.tag||null===q.memoizedState||q===a)&&null!==q.child){q.child.return=q;q=q.child;continue}if(q===a)break a;for(;null===q.sibling;){if(null===q.return||q.return===a)break a;m===q&&(m=null);q=q.return}m===q&&(m=null);q.sibling.return=q.return;q=q.sibling}}break;case 19:ck(b,a);ek(a);d&4&&ak(a);break;case 21:break;default:ck(b, a),ek(a)}}function ek(a){var b=a.flags;if(b&2){try{a:{for(var c=a.return;null!==c;){if(Tj(c)){var d=c;break a}c=c.return}throw Error(p(160));}switch(d.tag){case 5:var e=d.stateNode;d.flags&32&&(ob(e,""),d.flags&=-33);var f=Uj(a);Wj(a,f,e);break;case 3:case 4:var g=d.stateNode.containerInfo,h=Uj(a);Vj(a,h,g);break;default:throw Error(p(161));}}catch(k){W(a,a.return,k)}a.flags&=-3}b&4096&&(a.flags&=-4097)}function hk(a,b,c){V=a;ik(a,b,c)} function ik(a,b,c){for(var d=0!==(a.mode&1);null!==V;){var e=V,f=e.child;if(22===e.tag&&d){var g=null!==e.memoizedState||Jj;if(!g){var h=e.alternate,k=null!==h&&null!==h.memoizedState||U;h=Jj;var l=U;Jj=g;if((U=k)&&!l)for(V=e;null!==V;)g=V,k=g.child,22===g.tag&&null!==g.memoizedState?jk(e):null!==k?(k.return=g,V=k):jk(e);for(;null!==f;)V=f,ik(f,b,c),f=f.sibling;V=e;Jj=h;U=l}kk(a,b,c)}else 0!==(e.subtreeFlags&8772)&&null!==f?(f.return=e,V=f):kk(a,b,c)}} function kk(a){for(;null!==V;){var b=V;if(0!==(b.flags&8772)){var c=b.alternate;try{if(0!==(b.flags&8772))switch(b.tag){case 0:case 11:case 15:U||Qj(5,b);break;case 1:var d=b.stateNode;if(b.flags&4&&!U)if(null===c)d.componentDidMount();else{var e=b.elementType===b.type?c.memoizedProps:Ci(b.type,c.memoizedProps);d.componentDidUpdate(e,c.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var f=b.updateQueue;null!==f&&sh(b,f,d);break;case 3:var g=b.updateQueue;if(null!==g){c=null;if(null!==b.child)switch(b.child.tag){case 5:c= b.child.stateNode;break;case 1:c=b.child.stateNode}sh(b,g,c)}break;case 5:var h=b.stateNode;if(null===c&&b.flags&4){c=h;var k=b.memoizedProps;switch(b.type){case "button":case "input":case "select":case "textarea":k.autoFocus&&c.focus();break;case "img":k.src&&(c.src=k.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(null===b.memoizedState){var l=b.alternate;if(null!==l){var m=l.memoizedState;if(null!==m){var q=m.dehydrated;null!==q&&bd(q)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break; default:throw Error(p(163));}U||b.flags&512&&Rj(b)}catch(r){W(b,b.return,r)}}if(b===a){V=null;break}c=b.sibling;if(null!==c){c.return=b.return;V=c;break}V=b.return}}function gk(a){for(;null!==V;){var b=V;if(b===a){V=null;break}var c=b.sibling;if(null!==c){c.return=b.return;V=c;break}V=b.return}} function jk(a){for(;null!==V;){var b=V;try{switch(b.tag){case 0:case 11:case 15:var c=b.return;try{Qj(4,b)}catch(k){W(b,c,k)}break;case 1:var d=b.stateNode;if("function"===typeof d.componentDidMount){var e=b.return;try{d.componentDidMount()}catch(k){W(b,e,k)}}var f=b.return;try{Rj(b)}catch(k){W(b,f,k)}break;case 5:var g=b.return;try{Rj(b)}catch(k){W(b,g,k)}}}catch(k){W(b,b.return,k)}if(b===a){V=null;break}var h=b.sibling;if(null!==h){h.return=b.return;V=h;break}V=b.return}} var lk=Math.ceil,mk=ua.ReactCurrentDispatcher,nk=ua.ReactCurrentOwner,ok=ua.ReactCurrentBatchConfig,K=0,Q=null,Y=null,Z=0,fj=0,ej=Uf(0),T=0,pk=null,rh=0,qk=0,rk=0,sk=null,tk=null,fk=0,Gj=Infinity,uk=null,Oi=!1,Pi=null,Ri=null,vk=!1,wk=null,xk=0,yk=0,zk=null,Ak=-1,Bk=0;function R(){return 0!==(K&6)?B():-1!==Ak?Ak:Ak=B()} function yi(a){if(0===(a.mode&1))return 1;if(0!==(K&2)&&0!==Z)return Z&-Z;if(null!==Kg.transition)return 0===Bk&&(Bk=yc()),Bk;a=C;if(0!==a)return a;a=window.event;a=void 0===a?16:jd(a.type);return a}function gi(a,b,c,d){if(50<yk)throw yk=0,zk=null,Error(p(185));Ac(a,c,d);if(0===(K&2)||a!==Q)a===Q&&(0===(K&2)&&(qk|=c),4===T&&Ck(a,Z)),Dk(a,d),1===c&&0===K&&0===(b.mode&1)&&(Gj=B()+500,fg&&jg())} function Dk(a,b){var c=a.callbackNode;wc(a,b);var d=uc(a,a===Q?Z:0);if(0===d)null!==c&&bc(c),a.callbackNode=null,a.callbackPriority=0;else if(b=d&-d,a.callbackPriority!==b){null!=c&&bc(c);if(1===b)0===a.tag?ig(Ek.bind(null,a)):hg(Ek.bind(null,a)),Jf(function(){0===(K&6)&&jg()}),c=null;else{switch(Dc(d)){case 1:c=fc;break;case 4:c=gc;break;case 16:c=hc;break;case 536870912:c=jc;break;default:c=hc}c=Fk(c,Gk.bind(null,a))}a.callbackPriority=b;a.callbackNode=c}} function Gk(a,b){Ak=-1;Bk=0;if(0!==(K&6))throw Error(p(327));var c=a.callbackNode;if(Hk()&&a.callbackNode!==c)return null;var d=uc(a,a===Q?Z:0);if(0===d)return null;if(0!==(d&30)||0!==(d&a.expiredLanes)||b)b=Ik(a,d);else{b=d;var e=K;K|=2;var f=Jk();if(Q!==a||Z!==b)uk=null,Gj=B()+500,Kk(a,b);do try{Lk();break}catch(h){Mk(a,h)}while(1);$g();mk.current=f;K=e;null!==Y?b=0:(Q=null,Z=0,b=T)}if(0!==b){2===b&&(e=xc(a),0!==e&&(d=e,b=Nk(a,e)));if(1===b)throw c=pk,Kk(a,0),Ck(a,d),Dk(a,B()),c;if(6===b)Ck(a,d); else{e=a.current.alternate;if(0===(d&30)&&!Ok(e)&&(b=Ik(a,d),2===b&&(f=xc(a),0!==f&&(d=f,b=Nk(a,f))),1===b))throw c=pk,Kk(a,0),Ck(a,d),Dk(a,B()),c;a.finishedWork=e;a.finishedLanes=d;switch(b){case 0:case 1:throw Error(p(345));case 2:Pk(a,tk,uk);break;case 3:Ck(a,d);if((d&130023424)===d&&(b=fk+500-B(),10<b)){if(0!==uc(a,0))break;e=a.suspendedLanes;if((e&d)!==d){R();a.pingedLanes|=a.suspendedLanes&e;break}a.timeoutHandle=Ff(Pk.bind(null,a,tk,uk),b);break}Pk(a,tk,uk);break;case 4:Ck(a,d);if((d&4194240)=== d)break;b=a.eventTimes;for(e=-1;0<d;){var g=31-oc(d);f=1<<g;g=b[g];g>e&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*lk(d/1960))-d;if(10<d){a.timeoutHandle=Ff(Pk.bind(null,a,tk,uk),d);break}Pk(a,tk,uk);break;case 5:Pk(a,tk,uk);break;default:throw Error(p(329));}}}Dk(a,B());return a.callbackNode===c?Gk.bind(null,a):null} function Nk(a,b){var c=sk;a.current.memoizedState.isDehydrated&&(Kk(a,b).flags|=256);a=Ik(a,b);2!==a&&(b=tk,tk=c,null!==b&&Fj(b));return a}function Fj(a){null===tk?tk=a:tk.push.apply(tk,a)} function Ok(a){for(var b=a;;){if(b.flags&16384){var c=b.updateQueue;if(null!==c&&(c=c.stores,null!==c))for(var d=0;d<c.length;d++){var e=c[d],f=e.getSnapshot;e=e.value;try{if(!He(f(),e))return!1}catch(g){return!1}}}c=b.child;if(b.subtreeFlags&16384&&null!==c)c.return=b,b=c;else{if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return!0;b=b.return}b.sibling.return=b.return;b=b.sibling}}return!0} function Ck(a,b){b&=~rk;b&=~qk;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-oc(b),d=1<<c;a[c]=-1;b&=~d}}function Ek(a){if(0!==(K&6))throw Error(p(327));Hk();var b=uc(a,0);if(0===(b&1))return Dk(a,B()),null;var c=Ik(a,b);if(0!==a.tag&&2===c){var d=xc(a);0!==d&&(b=d,c=Nk(a,d))}if(1===c)throw c=pk,Kk(a,0),Ck(a,b),Dk(a,B()),c;if(6===c)throw Error(p(345));a.finishedWork=a.current.alternate;a.finishedLanes=b;Pk(a,tk,uk);Dk(a,B());return null} function Qk(a,b){var c=K;K|=1;try{return a(b)}finally{K=c,0===K&&(Gj=B()+500,fg&&jg())}}function Rk(a){null!==wk&&0===wk.tag&&0===(K&6)&&Hk();var b=K;K|=1;var c=ok.transition,d=C;try{if(ok.transition=null,C=1,a)return a()}finally{C=d,ok.transition=c,K=b,0===(K&6)&&jg()}}function Hj(){fj=ej.current;E(ej)} function Kk(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Gf(c));if(null!==Y)for(c=Y.return;null!==c;){var d=c;wg(d);switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&$f();break;case 3:zh();E(Wf);E(H);Eh();break;case 5:Bh(d);break;case 4:zh();break;case 13:E(L);break;case 19:E(L);break;case 10:ah(d.type._context);break;case 22:case 23:Hj()}c=c.return}Q=a;Y=a=Pg(a.current,null);Z=fj=b;T=0;pk=null;rk=qk=rh=0;tk=sk=null;if(null!==fh){for(b= 0;b<fh.length;b++)if(c=fh[b],d=c.interleaved,null!==d){c.interleaved=null;var e=d.next,f=c.pending;if(null!==f){var g=f.next;f.next=e;d.next=g}c.pending=d}fh=null}return a} function Mk(a,b){do{var c=Y;try{$g();Fh.current=Rh;if(Ih){for(var d=M.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}Ih=!1}Hh=0;O=N=M=null;Jh=!1;Kh=0;nk.current=null;if(null===c||null===c.return){T=1;pk=b;Y=null;break}a:{var f=a,g=c.return,h=c,k=b;b=Z;h.flags|=32768;if(null!==k&&"object"===typeof k&&"function"===typeof k.then){var l=k,m=h,q=m.tag;if(0===(m.mode&1)&&(0===q||11===q||15===q)){var r=m.alternate;r?(m.updateQueue=r.updateQueue,m.memoizedState=r.memoizedState, m.lanes=r.lanes):(m.updateQueue=null,m.memoizedState=null)}var y=Ui(g);if(null!==y){y.flags&=-257;Vi(y,g,h,f,b);y.mode&1&&Si(f,l,b);b=y;k=l;var n=b.updateQueue;if(null===n){var t=new Set;t.add(k);b.updateQueue=t}else n.add(k);break a}else{if(0===(b&1)){Si(f,l,b);tj();break a}k=Error(p(426))}}else if(I&&h.mode&1){var J=Ui(g);if(null!==J){0===(J.flags&65536)&&(J.flags|=256);Vi(J,g,h,f,b);Jg(Ji(k,h));break a}}f=k=Ji(k,h);4!==T&&(T=2);null===sk?sk=[f]:sk.push(f);f=g;do{switch(f.tag){case 3:f.flags|=65536; b&=-b;f.lanes|=b;var x=Ni(f,k,b);ph(f,x);break a;case 1:h=k;var w=f.type,u=f.stateNode;if(0===(f.flags&128)&&("function"===typeof w.getDerivedStateFromError||null!==u&&"function"===typeof u.componentDidCatch&&(null===Ri||!Ri.has(u)))){f.flags|=65536;b&=-b;f.lanes|=b;var F=Qi(f,h,b);ph(f,F);break a}}f=f.return}while(null!==f)}Sk(c)}catch(na){b=na;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}function Jk(){var a=mk.current;mk.current=Rh;return null===a?Rh:a} function tj(){if(0===T||3===T||2===T)T=4;null===Q||0===(rh&268435455)&&0===(qk&268435455)||Ck(Q,Z)}function Ik(a,b){var c=K;K|=2;var d=Jk();if(Q!==a||Z!==b)uk=null,Kk(a,b);do try{Tk();break}catch(e){Mk(a,e)}while(1);$g();K=c;mk.current=d;if(null!==Y)throw Error(p(261));Q=null;Z=0;return T}function Tk(){for(;null!==Y;)Uk(Y)}function Lk(){for(;null!==Y&&!cc();)Uk(Y)}function Uk(a){var b=Vk(a.alternate,a,fj);a.memoizedProps=a.pendingProps;null===b?Sk(a):Y=b;nk.current=null} function Sk(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&32768)){if(c=Ej(c,b,fj),null!==c){Y=c;return}}else{c=Ij(c,b);if(null!==c){c.flags&=32767;Y=c;return}if(null!==a)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{T=6;Y=null;return}}b=b.sibling;if(null!==b){Y=b;return}Y=b=a}while(null!==b);0===T&&(T=5)}function Pk(a,b,c){var d=C,e=ok.transition;try{ok.transition=null,C=1,Wk(a,b,c,d)}finally{ok.transition=e,C=d}return null} function Wk(a,b,c,d){do Hk();while(null!==wk);if(0!==(K&6))throw Error(p(327));c=a.finishedWork;var e=a.finishedLanes;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(p(177));a.callbackNode=null;a.callbackPriority=0;var f=c.lanes|c.childLanes;Bc(a,f);a===Q&&(Y=Q=null,Z=0);0===(c.subtreeFlags&2064)&&0===(c.flags&2064)||vk||(vk=!0,Fk(hc,function(){Hk();return null}));f=0!==(c.flags&15990);if(0!==(c.subtreeFlags&15990)||f){f=ok.transition;ok.transition=null; var g=C;C=1;var h=K;K|=4;nk.current=null;Oj(a,c);dk(c,a);Oe(Df);dd=!!Cf;Df=Cf=null;a.current=c;hk(c,a,e);dc();K=h;C=g;ok.transition=f}else a.current=c;vk&&(vk=!1,wk=a,xk=e);f=a.pendingLanes;0===f&&(Ri=null);mc(c.stateNode,d);Dk(a,B());if(null!==b)for(d=a.onRecoverableError,c=0;c<b.length;c++)e=b[c],d(e.value,{componentStack:e.stack,digest:e.digest});if(Oi)throw Oi=!1,a=Pi,Pi=null,a;0!==(xk&1)&&0!==a.tag&&Hk();f=a.pendingLanes;0!==(f&1)?a===zk?yk++:(yk=0,zk=a):yk=0;jg();return null} function Hk(){if(null!==wk){var a=Dc(xk),b=ok.transition,c=C;try{ok.transition=null;C=16>a?16:a;if(null===wk)var d=!1;else{a=wk;wk=null;xk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;k<h.length;k++){var l=h[k];for(V=l;null!==V;){var m=V;switch(m.tag){case 0:case 11:case 15:Pj(8,m,f)}var q=m.child;if(null!==q)q.return=m,V=q;else for(;null!==V;){m=V;var r=m.sibling,y=m.return;Sj(m);if(m=== l){V=null;break}if(null!==r){r.return=y;V=r;break}V=y}}}var n=f.alternate;if(null!==n){var t=n.child;if(null!==t){n.child=null;do{var J=t.sibling;t.sibling=null;t=J}while(null!==t)}}V=f}}if(0!==(f.subtreeFlags&2064)&&null!==g)g.return=f,V=g;else b:for(;null!==V;){f=V;if(0!==(f.flags&2048))switch(f.tag){case 0:case 11:case 15:Pj(9,f,f.return)}var x=f.sibling;if(null!==x){x.return=f.return;V=x;break b}V=f.return}}var w=a.current;for(V=w;null!==V;){g=V;var u=g.child;if(0!==(g.subtreeFlags&2064)&&null!== u)u.return=g,V=u;else b:for(g=w;null!==V;){h=V;if(0!==(h.flags&2048))try{switch(h.tag){case 0:case 11:case 15:Qj(9,h)}}catch(na){W(h,h.return,na)}if(h===g){V=null;break b}var F=h.sibling;if(null!==F){F.return=h.return;V=F;break b}V=h.return}}K=e;jg();if(lc&&"function"===typeof lc.onPostCommitFiberRoot)try{lc.onPostCommitFiberRoot(kc,a)}catch(na){}d=!0}return d}finally{C=c,ok.transition=b}}return!1}function Xk(a,b,c){b=Ji(c,b);b=Ni(a,b,1);a=nh(a,b,1);b=R();null!==a&&(Ac(a,1,b),Dk(a,b))} function W(a,b,c){if(3===a.tag)Xk(a,a,c);else for(;null!==b;){if(3===b.tag){Xk(b,a,c);break}else if(1===b.tag){var d=b.stateNode;if("function"===typeof b.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===Ri||!Ri.has(d))){a=Ji(c,a);a=Qi(b,a,1);b=nh(b,a,1);a=R();null!==b&&(Ac(b,1,a),Dk(b,a));break}}b=b.return}} function Ti(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=R();a.pingedLanes|=a.suspendedLanes&c;Q===a&&(Z&c)===c&&(4===T||3===T&&(Z&130023424)===Z&&500>B()-fk?Kk(a,0):rk|=c);Dk(a,b)}function Yk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=R();a=ih(a,b);null!==a&&(Ac(a,b,c),Dk(a,c))}function uj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Yk(a,c)} function bk(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Yk(a,c)}var Vk; Vk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)dh=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return dh=!1,yj(a,b,c);dh=0!==(a.flags&131072)?!0:!1}else dh=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;ij(a,b);a=b.pendingProps;var e=Yf(b,H.current);ch(b,c);e=Nh(null,b,d,a,e,c);var f=Sh();b.flags|=1;"object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue= null,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,kh(b),e.updater=Ei,b.stateNode=e,e._reactInternals=b,Ii(b,d,a,c),b=jj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Xi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{ij(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=Zk(d);a=Ci(d,a);switch(e){case 0:b=cj(null,b,d,a,c);break a;case 1:b=hj(null,b,d,a,c);break a;case 11:b=Yi(null,b,d,a,c);break a;case 14:b=$i(null,b,d,Ci(d.type,a),c);break a}throw Error(p(306, d,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),cj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),hj(a,b,d,e,c);case 3:a:{kj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;lh(a,b);qh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState= f,b.memoizedState=f,b.flags&256){e=Ji(Error(p(423)),b);b=lj(a,b,d,c,e);break a}else if(d!==e){e=Ji(Error(p(424)),b);b=lj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Vg(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=Zi(a,b,c);break a}Xi(a,b,d,c)}b=b.child}return b;case 5:return Ah(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32), gj(a,b),Xi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return oj(a,b,c);case 4:return yh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Ug(b,null,d,c):Xi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),Yi(a,b,d,e,c);case 7:return Xi(a,b,b.pendingProps,c),b.child;case 8:return Xi(a,b,b.pendingProps.children,c),b.child;case 12:return Xi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps; g=e.value;G(Wg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=Zi(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=mh(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);bh(f.return, c,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);bh(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Xi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,ch(b,c),e=eh(e),d=d(e),b.flags|=1,Xi(a,b,d,c), b.child;case 14:return d=b.type,e=Ci(d,b.pendingProps),e=Ci(d.type,e),$i(a,b,d,e,c);case 15:return bj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),ij(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,ch(b,c),Gi(b,d,e),Ii(b,d,e,c),jj(null,b,d,!0,a,c);case 19:return xj(a,b,c);case 22:return dj(a,b,c)}throw Error(p(156,b.tag));};function Fk(a,b){return ac(a,b)} function $k(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new $k(a,b,c,d)}function aj(a){a=a.prototype;return!(!a||!a.isReactComponent)} function Zk(a){if("function"===typeof a)return aj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2} function Pg(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext}; c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c} function Rg(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)aj(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ya:return Tg(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return pj(c,e,f,b);default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11; break a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,""));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Tg(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function pj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function Qg(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a} function Sg(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b} function al(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData= null}function bl(a,b,c,d,e,f,g,h,k){a=new al(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};kh(f);return a}function cl(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:wa,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}} function dl(a){if(!a)return Vf;a=a._reactInternals;a:{if(Vb(a)!==a||1!==a.tag)throw Error(p(170));var b=a;do{switch(b.tag){case 3:b=b.stateNode.context;break a;case 1:if(Zf(b.type)){b=b.stateNode.__reactInternalMemoizedMergedChildContext;break a}}b=b.return}while(null!==b);throw Error(p(171));}if(1===a.tag){var c=a.type;if(Zf(c))return bg(a,c,b)}return b} function el(a,b,c,d,e,f,g,h,k){a=bl(c,d,!0,a,e,f,g,h,k);a.context=dl(null);c=a.current;d=R();e=yi(c);f=mh(d,e);f.callback=void 0!==b&&null!==b?b:null;nh(c,f,e);a.current.lanes=e;Ac(a,e,d);Dk(a,d);return a}function fl(a,b,c,d){var e=b.current,f=R(),g=yi(e);c=dl(c);null===b.context?b.context=c:b.pendingContext=c;b=mh(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);a=nh(e,b,g);null!==a&&(gi(a,e,g,f),oh(a,e,g));return g} function gl(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function hl(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function il(a,b){hl(a,b);(a=a.alternate)&&hl(a,b)}function jl(){return null}var kl="function"===typeof reportError?reportError:function(a){console.error(a)};function ll(a){this._internalRoot=a} ml.prototype.render=ll.prototype.render=function(a){var b=this._internalRoot;if(null===b)throw Error(p(409));fl(a,b,null,null)};ml.prototype.unmount=ll.prototype.unmount=function(){var a=this._internalRoot;if(null!==a){this._internalRoot=null;var b=a.containerInfo;Rk(function(){fl(null,a,null,null)});b[uf]=null}};function ml(a){this._internalRoot=a} ml.prototype.unstable_scheduleHydration=function(a){if(a){var b=Hc();a={blockedOn:null,target:a,priority:b};for(var c=0;c<Qc.length&&0!==b&&b<Qc[c].priority;c++);Qc.splice(c,0,a);0===c&&Vc(a)}};function nl(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType)}function ol(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function pl(){} function ql(a,b,c,d,e){if(e){if("function"===typeof d){var f=d;d=function(){var a=gl(g);f.call(a)}}var g=el(b,d,a,0,null,!1,!1,"",pl);a._reactRootContainer=g;a[uf]=g.current;sf(8===a.nodeType?a.parentNode:a);Rk();return g}for(;e=a.lastChild;)a.removeChild(e);if("function"===typeof d){var h=d;d=function(){var a=gl(k);h.call(a)}}var k=bl(a,0,!1,null,null,!1,!1,"",pl);a._reactRootContainer=k;a[uf]=k.current;sf(8===a.nodeType?a.parentNode:a);Rk(function(){fl(b,k,c,d)});return k} function rl(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f;if("function"===typeof e){var h=e;e=function(){var a=gl(g);h.call(a)}}fl(b,g,a,e)}else g=ql(c,b,a,e,d);return gl(g)}Ec=function(a){switch(a.tag){case 3:var b=a.stateNode;if(b.current.memoizedState.isDehydrated){var c=tc(b.pendingLanes);0!==c&&(Cc(b,c|1),Dk(b,B()),0===(K&6)&&(Gj=B()+500,jg()))}break;case 13:Rk(function(){var b=ih(a,1);if(null!==b){var c=R();gi(b,a,1,c)}}),il(a,1)}}; Fc=function(a){if(13===a.tag){var b=ih(a,134217728);if(null!==b){var c=R();gi(b,a,134217728,c)}il(a,134217728)}};Gc=function(a){if(13===a.tag){var b=yi(a),c=ih(a,b);if(null!==c){var d=R();gi(c,a,b,d)}il(a,b)}};Hc=function(){return C};Ic=function(a,b){var c=C;try{return C=a,b()}finally{C=c}}; yb=function(a,b,c){switch(b){case "input":bb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Db(d);if(!e)throw Error(p(90));Wa(d);bb(d,e)}}}break;case "textarea":ib(a,c);break;case "select":b=c.value,null!=b&&fb(a,!!c.multiple,b,!1)}};Gb=Qk;Hb=Rk; var sl={usingClientEntryPoint:!1,Events:[Cb,ue,Db,Eb,Fb,Qk]},tl={findFiberByHostInstance:Wc,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"}; var ul={bundleType:tl.bundleType,version:tl.version,rendererPackageName:tl.rendererPackageName,rendererConfig:tl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ua.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=Zb(a);return null===a?null:a.stateNode},findFiberByHostInstance:tl.findFiberByHostInstance|| jl,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vl.isDisabled&&vl.supportsFiber)try{kc=vl.inject(ul),lc=vl}catch(a){}}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sl; exports.createPortal=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!nl(b))throw Error(p(200));return cl(a,b,null,c)};exports.createRoot=function(a,b){if(!nl(a))throw Error(p(299));var c=!1,d="",e=kl;null!==b&&void 0!==b&&(!0===b.unstable_strictMode&&(c=!0),void 0!==b.identifierPrefix&&(d=b.identifierPrefix),void 0!==b.onRecoverableError&&(e=b.onRecoverableError));b=bl(a,1,!1,null,null,c,!1,d,e);a[uf]=b.current;sf(8===a.nodeType?a.parentNode:a);return new ll(b)}; exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(p(188));a=Object.keys(a).join(",");throw Error(p(268,a));}a=Zb(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a){return Rk(a)};exports.hydrate=function(a,b,c){if(!ol(b))throw Error(p(200));return rl(null,a,b,!0,c)}; exports.hydrateRoot=function(a,b,c){if(!nl(a))throw Error(p(405));var d=null!=c&&c.hydratedSources||null,e=!1,f="",g=kl;null!==c&&void 0!==c&&(!0===c.unstable_strictMode&&(e=!0),void 0!==c.identifierPrefix&&(f=c.identifierPrefix),void 0!==c.onRecoverableError&&(g=c.onRecoverableError));b=el(b,null,a,1,null!=c?c:null,e,!1,f,g);a[uf]=b.current;sf(a);if(d)for(a=0;a<d.length;a++)c=d[a],e=c._getVersion,e=e(c._source),null==b.mutableSourceEagerHydrationData?b.mutableSourceEagerHydrationData=[c,e]:b.mutableSourceEagerHydrationData.push(c, e);return new ml(b)};exports.render=function(a,b,c){if(!ol(b))throw Error(p(200));return rl(null,a,b,!1,c)};exports.unmountComponentAtNode=function(a){if(!ol(a))throw Error(p(40));return a._reactRootContainer?(Rk(function(){rl(null,null,a,!1,function(){a._reactRootContainer=null;a[uf]=null})}),!0):!1};exports.unstable_batchedUpdates=Qk; exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!ol(c))throw Error(p(200));if(null==a||void 0===a._reactInternals)throw Error(p(38));return rl(a,b,c,!1,d)};exports.version="18.3.1-next-f1338f8080-20240426"; /***/ }), /* 81 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(setImmediate) {/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ function f(a,b){var c=a.length;a.push(b);a:for(;0<c;){var d=c-1>>>1,e=a[d];if(0<g(e,b))a[d]=b,a[c]=e,c=d;else break a}}function h(a){return 0===a.length?null:a[0]}function k(a){if(0===a.length)return null;var b=a[0],c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length,w=e>>>1;d<w;){var m=2*(d+1)-1,C=a[m],n=m+1,x=a[n];if(0>g(C,c))n<e&&0>g(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(n<e&&0>g(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b} function g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if("object"===typeof performance&&"function"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D="function"===typeof setTimeout?setTimeout:null,E="function"===typeof clearTimeout?clearTimeout:null,F="undefined"!==typeof setImmediate?setImmediate:null; "undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}} function J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if("function"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1; function M(){return exports.unstable_now()-Q<P?!1:!0}function R(){if(null!==O){var a=exports.unstable_now();Q=a;var b=!0;try{b=O(!0,a)}finally{b?S():(N=!1,O=null)}}else N=!1}var S;if("function"===typeof F)S=function(){F(R)};else if("undefined"!==typeof MessageChannel){var T=new MessageChannel,U=T.port2;T.port1.onmessage=R;S=function(){U.postMessage(null)}}else S=function(){D(R,0)};function I(a){O=a;N||(N=!0,S())}function K(a,b){L=D(function(){a(exports.unstable_now())},b)} exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){A||z||(A=!0,I(J))}; exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<a?Math.floor(1E3/a):5};exports.unstable_getCurrentPriorityLevel=function(){return y};exports.unstable_getFirstCallbackNode=function(){return h(r)};exports.unstable_next=function(a){switch(y){case 1:case 2:case 3:var b=3;break;default:b=y}var c=y;y=b;try{return a()}finally{y=c}};exports.unstable_pauseExecution=function(){}; exports.unstable_requestPaint=function(){};exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=y;y=a;try{return b()}finally{y=c}}; exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:u++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a}; exports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}}; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(52).setImmediate)) /***/ }), /* 82 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) { "use strict"; if (global.setImmediate) { return; } var nextHandle = 1; // Spec says greater than zero var tasksByHandle = {}; var currentlyRunningATask = false; var doc = global.document; var registerImmediate; function setImmediate(callback) { // Callback can either be a function or a string if (typeof callback !== "function") { callback = new Function("" + callback); } // Copy function arguments var args = new Array(arguments.length - 1); for (var i = 0; i < args.length; i++) { args[i] = arguments[i + 1]; } // Store and register the task var task = { callback: callback, args: args }; tasksByHandle[nextHandle] = task; registerImmediate(nextHandle); return nextHandle++; } function clearImmediate(handle) { delete tasksByHandle[handle]; } function run(task) { var callback = task.callback; var args = task.args; switch (args.length) { case 0: callback(); break; case 1: callback(args[0]); break; case 2: callback(args[0], args[1]); break; case 3: callback(args[0], args[1], args[2]); break; default: callback.apply(undefined, args); break; } } function runIfPresent(handle) { // From the spec: "Wait until any invocations of this algorithm started before this one have completed." // So if we're currently running a task, we'll need to delay this invocation. if (currentlyRunningATask) { // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a // "too much recursion" error. setTimeout(runIfPresent, 0, handle); } else { var task = tasksByHandle[handle]; if (task) { currentlyRunningATask = true; try { run(task); } finally { clearImmediate(handle); currentlyRunningATask = false; } } } } function installNextTickImplementation() { registerImmediate = function(handle) { process.nextTick(function () { runIfPresent(handle); }); }; } function canUsePostMessage() { // The test against `importScripts` prevents this implementation from being installed inside a web worker, // where `global.postMessage` means something completely different and can't be used for this purpose. if (global.postMessage && !global.importScripts) { var postMessageIsAsynchronous = true; var oldOnMessage = global.onmessage; global.onmessage = function() { postMessageIsAsynchronous = false; }; global.postMessage("", "*"); global.onmessage = oldOnMessage; return postMessageIsAsynchronous; } } function installPostMessageImplementation() { // Installs an event handler on `global` for the `message` event: see // * https://developer.mozilla.org/en/DOM/window.postMessage // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages var messagePrefix = "setImmediate$" + Math.random() + "$"; var onGlobalMessage = function(event) { if (event.source === global && typeof event.data === "string" && event.data.indexOf(messagePrefix) === 0) { runIfPresent(+event.data.slice(messagePrefix.length)); } }; if (global.addEventListener) { global.addEventListener("message", onGlobalMessage, false); } else { global.attachEvent("onmessage", onGlobalMessage); } registerImmediate = function(handle) { global.postMessage(messagePrefix + handle, "*"); }; } function installMessageChannelImplementation() { var channel = new MessageChannel(); channel.port1.onmessage = function(event) { var handle = event.data; runIfPresent(handle); }; registerImmediate = function(handle) { channel.port2.postMessage(handle); }; } function installReadyStateChangeImplementation() { var html = doc.documentElement; registerImmediate = function(handle) { // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called. var script = doc.createElement("script"); script.onreadystatechange = function () { runIfPresent(handle); script.onreadystatechange = null; html.removeChild(script); script = null; }; html.appendChild(script); }; } function installSetTimeoutImplementation() { registerImmediate = function(handle) { setTimeout(runIfPresent, 0, handle); }; } // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live. var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global); attachTo = attachTo && attachTo.setTimeout ? attachTo : global; // Don't get fooled by e.g. browserify environments. if ({}.toString.call(global.process) === "[object process]") { // For Node.js before 0.9 installNextTickImplementation(); } else if (canUsePostMessage()) { // For non-IE10 modern browsers installPostMessageImplementation(); } else if (global.MessageChannel) { // For web workers, where supported installMessageChannelImplementation(); } else if (doc && "onreadystatechange" in doc.createElement("script")) { // For IE 6–8 installReadyStateChangeImplementation(); } else { // For older browsers installSetTimeoutImplementation(); } attachTo.setImmediate = setImmediate; attachTo.clearImmediate = clearImmediate; }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self)); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(30), __webpack_require__(2))) /***/ }), /* 83 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process, setImmediate) {/** * @license React * scheduler.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (process.env.NODE_ENV !== "production") { (function() { 'use strict'; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === 'function' ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } var enableSchedulerDebugging = false; var enableProfiling = false; var frameYieldMs = 5; function push(heap, node) { var index = heap.length; heap.push(node); siftUp(heap, node, index); } function peek(heap) { return heap.length === 0 ? null : heap[0]; } function pop(heap) { if (heap.length === 0) { return null; } var first = heap[0]; var last = heap.pop(); if (last !== first) { heap[0] = last; siftDown(heap, last, 0); } return first; } function siftUp(heap, node, i) { var index = i; while (index > 0) { var parentIndex = index - 1 >>> 1; var parent = heap[parentIndex]; if (compare(parent, node) > 0) { // The parent is larger. Swap positions. heap[parentIndex] = node; heap[index] = parent; index = parentIndex; } else { // The parent is smaller. Exit. return; } } } function siftDown(heap, node, i) { var index = i; var length = heap.length; var halfLength = length >>> 1; while (index < halfLength) { var leftIndex = (index + 1) * 2 - 1; var left = heap[leftIndex]; var rightIndex = leftIndex + 1; var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those. if (compare(left, node) < 0) { if (rightIndex < length && compare(right, left) < 0) { heap[index] = right; heap[rightIndex] = node; index = rightIndex; } else { heap[index] = left; heap[leftIndex] = node; index = leftIndex; } } else if (rightIndex < length && compare(right, node) < 0) { heap[index] = right; heap[rightIndex] = node; index = rightIndex; } else { // Neither child is smaller. Exit. return; } } } function compare(a, b) { // Compare sort index first, then task id. var diff = a.sortIndex - b.sortIndex; return diff !== 0 ? diff : a.id - b.id; } // TODO: Use symbols? var ImmediatePriority = 1; var UserBlockingPriority = 2; var NormalPriority = 3; var LowPriority = 4; var IdlePriority = 5; function markTaskErrored(task, ms) { } /* eslint-disable no-var */ var hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function'; if (hasPerformanceNow) { var localPerformance = performance; exports.unstable_now = function () { return localPerformance.now(); }; } else { var localDate = Date; var initialTime = localDate.now(); exports.unstable_now = function () { return localDate.now() - initialTime; }; } // Max 31 bit integer. The max integer size in V8 for 32-bit systems. // Math.pow(2, 30) - 1 // 0b111111111111111111111111111111 var maxSigned31BitInt = 1073741823; // Times out immediately var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out var USER_BLOCKING_PRIORITY_TIMEOUT = 250; var NORMAL_PRIORITY_TIMEOUT = 5000; var LOW_PRIORITY_TIMEOUT = 10000; // Never times out var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap var taskQueue = []; var timerQueue = []; // Incrementing id counter. Used to maintain insertion order. var taskIdCounter = 1; // Pausing the scheduler is useful for debugging. var currentTask = null; var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrance. var isPerformingWork = false; var isHostCallbackScheduled = false; var isHostTimeoutScheduled = false; // Capture local references to native APIs, in case a polyfill overrides them. var localSetTimeout = typeof setTimeout === 'function' ? setTimeout : null; var localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : null; var localSetImmediate = typeof setImmediate !== 'undefined' ? setImmediate : null; // IE and Node.js + jsdom var isInputPending = typeof navigator !== 'undefined' && navigator.scheduling !== undefined && navigator.scheduling.isInputPending !== undefined ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null; function advanceTimers(currentTime) { // Check for tasks that are no longer delayed and add them to the queue. var timer = peek(timerQueue); while (timer !== null) { if (timer.callback === null) { // Timer was cancelled. pop(timerQueue); } else if (timer.startTime <= currentTime) { // Timer fired. Transfer to the task queue. pop(timerQueue); timer.sortIndex = timer.expirationTime; push(taskQueue, timer); } else { // Remaining timers are pending. return; } timer = peek(timerQueue); } } function handleTimeout(currentTime) { isHostTimeoutScheduled = false; advanceTimers(currentTime); if (!isHostCallbackScheduled) { if (peek(taskQueue) !== null) { isHostCallbackScheduled = true; requestHostCallback(flushWork); } else { var firstTimer = peek(timerQueue); if (firstTimer !== null) { requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); } } } } function flushWork(hasTimeRemaining, initialTime) { isHostCallbackScheduled = false; if (isHostTimeoutScheduled) { // We scheduled a timeout but it's no longer needed. Cancel it. isHostTimeoutScheduled = false; cancelHostTimeout(); } isPerformingWork = true; var previousPriorityLevel = currentPriorityLevel; try { if (enableProfiling) { try { return workLoop(hasTimeRemaining, initialTime); } catch (error) { if (currentTask !== null) { var currentTime = exports.unstable_now(); markTaskErrored(currentTask, currentTime); currentTask.isQueued = false; } throw error; } } else { // No catch in prod code path. return workLoop(hasTimeRemaining, initialTime); } } finally { currentTask = null; currentPriorityLevel = previousPriorityLevel; isPerformingWork = false; } } function workLoop(hasTimeRemaining, initialTime) { var currentTime = initialTime; advanceTimers(currentTime); currentTask = peek(taskQueue); while (currentTask !== null && !(enableSchedulerDebugging )) { if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) { // This currentTask hasn't expired, and we've reached the deadline. break; } var callback = currentTask.callback; if (typeof callback === 'function') { currentTask.callback = null; currentPriorityLevel = currentTask.priorityLevel; var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; var continuationCallback = callback(didUserCallbackTimeout); currentTime = exports.unstable_now(); if (typeof continuationCallback === 'function') { currentTask.callback = continuationCallback; } else { if (currentTask === peek(taskQueue)) { pop(taskQueue); } } advanceTimers(currentTime); } else { pop(taskQueue); } currentTask = peek(taskQueue); } // Return whether there's additional work if (currentTask !== null) { return true; } else { var firstTimer = peek(timerQueue); if (firstTimer !== null) { requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); } return false; } } function unstable_runWithPriority(priorityLevel, eventHandler) { switch (priorityLevel) { case ImmediatePriority: case UserBlockingPriority: case NormalPriority: case LowPriority: case IdlePriority: break; default: priorityLevel = NormalPriority; } var previousPriorityLevel = currentPriorityLevel; currentPriorityLevel = priorityLevel; try { return eventHandler(); } finally { currentPriorityLevel = previousPriorityLevel; } } function unstable_next(eventHandler) { var priorityLevel; switch (currentPriorityLevel) { case ImmediatePriority: case UserBlockingPriority: case NormalPriority: // Shift down to normal priority priorityLevel = NormalPriority; break; default: // Anything lower than normal priority should remain at the current level. priorityLevel = currentPriorityLevel; break; } var previousPriorityLevel = currentPriorityLevel; currentPriorityLevel = priorityLevel; try { return eventHandler(); } finally { currentPriorityLevel = previousPriorityLevel; } } function unstable_wrapCallback(callback) { var parentPriorityLevel = currentPriorityLevel; return function () { // This is a fork of runWithPriority, inlined for performance. var previousPriorityLevel = currentPriorityLevel; currentPriorityLevel = parentPriorityLevel; try { return callback.apply(this, arguments); } finally { currentPriorityLevel = previousPriorityLevel; } }; } function unstable_scheduleCallback(priorityLevel, callback, options) { var currentTime = exports.unstable_now(); var startTime; if (typeof options === 'object' && options !== null) { var delay = options.delay; if (typeof delay === 'number' && delay > 0) { startTime = currentTime + delay; } else { startTime = currentTime; } } else { startTime = currentTime; } var timeout; switch (priorityLevel) { case ImmediatePriority: timeout = IMMEDIATE_PRIORITY_TIMEOUT; break; case UserBlockingPriority: timeout = USER_BLOCKING_PRIORITY_TIMEOUT; break; case IdlePriority: timeout = IDLE_PRIORITY_TIMEOUT; break; case LowPriority: timeout = LOW_PRIORITY_TIMEOUT; break; case NormalPriority: default: timeout = NORMAL_PRIORITY_TIMEOUT; break; } var expirationTime = startTime + timeout; var newTask = { id: taskIdCounter++, callback: callback, priorityLevel: priorityLevel, startTime: startTime, expirationTime: expirationTime, sortIndex: -1 }; if (startTime > currentTime) { // This is a delayed task. newTask.sortIndex = startTime; push(timerQueue, newTask); if (peek(taskQueue) === null && newTask === peek(timerQueue)) { // All tasks are delayed, and this is the task with the earliest delay. if (isHostTimeoutScheduled) { // Cancel an existing timeout. cancelHostTimeout(); } else { isHostTimeoutScheduled = true; } // Schedule a timeout. requestHostTimeout(handleTimeout, startTime - currentTime); } } else { newTask.sortIndex = expirationTime; push(taskQueue, newTask); // wait until the next time we yield. if (!isHostCallbackScheduled && !isPerformingWork) { isHostCallbackScheduled = true; requestHostCallback(flushWork); } } return newTask; } function unstable_pauseExecution() { } function unstable_continueExecution() { if (!isHostCallbackScheduled && !isPerformingWork) { isHostCallbackScheduled = true; requestHostCallback(flushWork); } } function unstable_getFirstCallbackNode() { return peek(taskQueue); } function unstable_cancelCallback(task) { // remove from the queue because you can't remove arbitrary nodes from an // array based heap, only the first one.) task.callback = null; } function unstable_getCurrentPriorityLevel() { return currentPriorityLevel; } var isMessageLoopRunning = false; var scheduledHostCallback = null; var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main // thread, like user events. By default, it yields multiple times per frame. // It does not attempt to align with frame boundaries, since most tasks don't // need to be frame aligned; for those that do, use requestAnimationFrame. var frameInterval = frameYieldMs; var startTime = -1; function shouldYieldToHost() { var timeElapsed = exports.unstable_now() - startTime; if (timeElapsed < frameInterval) { // The main thread has only been blocked for a really short amount of time; // smaller than a single frame. Don't yield yet. return false; } // The main thread has been blocked for a non-negligible amount of time. We return true; } function requestPaint() { } function forceFrameRate(fps) { if (fps < 0 || fps > 125) { // Using console['error'] to evade Babel and ESLint console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported'); return; } if (fps > 0) { frameInterval = Math.floor(1000 / fps); } else { // reset the framerate frameInterval = frameYieldMs; } } var performWorkUntilDeadline = function () { if (scheduledHostCallback !== null) { var currentTime = exports.unstable_now(); // Keep track of the start time so we can measure how long the main thread // has been blocked. startTime = currentTime; var hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the // error can be observed. // // Intentionally not using a try-catch, since that makes some debugging // techniques harder. Instead, if `scheduledHostCallback` errors, then // `hasMoreWork` will remain true, and we'll continue the work loop. var hasMoreWork = true; try { hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); } finally { if (hasMoreWork) { // If there's more work, schedule the next message event at the end // of the preceding one. schedulePerformWorkUntilDeadline(); } else { isMessageLoopRunning = false; scheduledHostCallback = null; } } } else { isMessageLoopRunning = false; } // Yielding to the browser will give it a chance to paint, so we can }; var schedulePerformWorkUntilDeadline; if (typeof localSetImmediate === 'function') { // Node.js and old IE. // There's a few reasons for why we prefer setImmediate. // // Unlike MessageChannel, it doesn't prevent a Node.js process from exiting. // (Even though this is a DOM fork of the Scheduler, you could get here // with a mix of Node.js 15+, which has a MessageChannel, and jsdom.) // https://github.com/facebook/react/issues/20756 // // But also, it runs earlier which is the semantic we want. // If other browsers ever implement it, it's better to use it. // Although both of these would be inferior to native scheduling. schedulePerformWorkUntilDeadline = function () { localSetImmediate(performWorkUntilDeadline); }; } else if (typeof MessageChannel !== 'undefined') { // DOM and Worker environments. // We prefer MessageChannel because of the 4ms setTimeout clamping. var channel = new MessageChannel(); var port = channel.port2; channel.port1.onmessage = performWorkUntilDeadline; schedulePerformWorkUntilDeadline = function () { port.postMessage(null); }; } else { // We should only fallback here in non-browser environments. schedulePerformWorkUntilDeadline = function () { localSetTimeout(performWorkUntilDeadline, 0); }; } function requestHostCallback(callback) { scheduledHostCallback = callback; if (!isMessageLoopRunning) { isMessageLoopRunning = true; schedulePerformWorkUntilDeadline(); } } function requestHostTimeout(callback, ms) { taskTimeoutID = localSetTimeout(function () { callback(exports.unstable_now()); }, ms); } function cancelHostTimeout() { localClearTimeout(taskTimeoutID); taskTimeoutID = -1; } var unstable_requestPaint = requestPaint; var unstable_Profiling = null; exports.unstable_IdlePriority = IdlePriority; exports.unstable_ImmediatePriority = ImmediatePriority; exports.unstable_LowPriority = LowPriority; exports.unstable_NormalPriority = NormalPriority; exports.unstable_Profiling = unstable_Profiling; exports.unstable_UserBlockingPriority = UserBlockingPriority; exports.unstable_cancelCallback = unstable_cancelCallback; exports.unstable_continueExecution = unstable_continueExecution; exports.unstable_forceFrameRate = forceFrameRate; exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; exports.unstable_next = unstable_next; exports.unstable_pauseExecution = unstable_pauseExecution; exports.unstable_requestPaint = unstable_requestPaint; exports.unstable_runWithPriority = unstable_runWithPriority; exports.unstable_scheduleCallback = unstable_scheduleCallback; exports.unstable_shouldYield = shouldYieldToHost; exports.unstable_wrapCallback = unstable_wrapCallback; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === 'function' ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } })(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(52).setImmediate)) /***/ }), /* 84 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * @license React * react-dom.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (process.env.NODE_ENV !== "production") { (function() { 'use strict'; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === 'function' ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } var React = __webpack_require__(0); var Scheduler = __webpack_require__(51); var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; var suppressWarning = false; function setSuppressWarning(newSuppressWarning) { { suppressWarning = newSuppressWarning; } } // In DEV, calls to console.warn and console.error get replaced // by calls to these methods by a Babel plugin. // // In PROD (or in packages without access to React internals), // they are left as they are instead. function warn(format) { { if (!suppressWarning) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } printWarning('warn', format, args); } } } function error(format) { { if (!suppressWarning) { for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } printWarning('error', format, args); } } } function printWarning(level, format, args) { // When changing this logic, you might want to also // update consoleWithStackDev.www.js as well. { var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var stack = ReactDebugCurrentFrame.getStackAddendum(); if (stack !== '') { format += '%s'; args = args.concat([stack]); } // eslint-disable-next-line react-internal/safe-string-coercion var argsWithFormat = args.map(function (item) { return String(item); }); // Careful: RN currently depends on this prefix argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it // breaks IE9: https://github.com/facebook/react/issues/13610 // eslint-disable-next-line react-internal/no-production-logging Function.prototype.apply.call(console[level], console, argsWithFormat); } } var FunctionComponent = 0; var ClassComponent = 1; var IndeterminateComponent = 2; // Before we know whether it is function or class var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. var HostComponent = 5; var HostText = 6; var Fragment = 7; var Mode = 8; var ContextConsumer = 9; var ContextProvider = 10; var ForwardRef = 11; var Profiler = 12; var SuspenseComponent = 13; var MemoComponent = 14; var SimpleMemoComponent = 15; var LazyComponent = 16; var IncompleteClassComponent = 17; var DehydratedFragment = 18; var SuspenseListComponent = 19; var ScopeComponent = 21; var OffscreenComponent = 22; var LegacyHiddenComponent = 23; var CacheComponent = 24; var TracingMarkerComponent = 25; // ----------------------------------------------------------------------------- var enableClientRenderFallbackOnTextMismatch = true; // TODO: Need to review this code one more time before landing // the react-reconciler package. var enableNewReconciler = false; // Support legacy Primer support on internal FB www var enableLazyContextPropagation = false; // FB-only usage. The new API has different semantics. var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber var enableSuspenseAvoidThisFallback = false; // Enables unstable_avoidThisFallback feature in Fizz // React DOM Chopping Block // // Similar to main Chopping Block but only flags related to React DOM. These are // grouped because we will likely batch all of them into a single major release. // ----------------------------------------------------------------------------- // Disable support for comment nodes as React DOM containers. Already disabled // in open source, but www codebase still relies on it. Need to remove. var disableCommentsAsDOMContainers = true; // Disable javascript: URL strings in href for XSS protection. // and client rendering, mostly to allow JSX attributes to apply to the custom // element's object properties instead of only HTML attributes. // https://github.com/facebook/react/issues/11347 var enableCustomElementPropertySupport = false; // Disables children for <textarea> elements var warnAboutStringRefs = true; // ----------------------------------------------------------------------------- // Debugging and DevTools // ----------------------------------------------------------------------------- // Adds user timing marks for e.g. state updates, suspense, and work loop stuff, // for an experimental timeline tool. var enableSchedulingProfiler = true; // Helps identify side effects in render-phase lifecycle hooks and setState var enableProfilerTimer = true; // Record durations for commit and passive effects phases. var enableProfilerCommitHooks = true; // Phase param passed to onRender callback differentiates between an "update" and a "cascading-update". var allNativeEvents = new Set(); /** * Mapping from registration name to event name */ var registrationNameDependencies = {}; /** * Mapping from lowercase registration names to the properly cased version, * used to warn in the case of missing event handlers. Available * only in true. * @type {Object} */ var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true function registerTwoPhaseEvent(registrationName, dependencies) { registerDirectEvent(registrationName, dependencies); registerDirectEvent(registrationName + 'Capture', dependencies); } function registerDirectEvent(registrationName, dependencies) { { if (registrationNameDependencies[registrationName]) { error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName); } } registrationNameDependencies[registrationName] = dependencies; { var lowerCasedName = registrationName.toLowerCase(); possibleRegistrationNames[lowerCasedName] = registrationName; if (registrationName === 'onDoubleClick') { possibleRegistrationNames.ondblclick = registrationName; } } for (var i = 0; i < dependencies.length; i++) { allNativeEvents.add(dependencies[i]); } } var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined'); var hasOwnProperty = Object.prototype.hasOwnProperty; /* * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol * and Temporal.* types. See https://github.com/facebook/react/pull/22064. * * The functions in this module will throw an easier-to-understand, * easier-to-debug exception with a clear errors message message explaining the * problem. (Instead of a confusing exception thrown inside the implementation * of the `value` object). */ // $FlowFixMe only called in DEV, so void return is not possible. function typeName(value) { { // toStringTag is needed for namespaced types like Temporal.Instant var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag; var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; return type; } } // $FlowFixMe only called in DEV, so void return is not possible. function willCoercionThrow(value) { { try { testStringCoercion(value); return false; } catch (e) { return true; } } } function testStringCoercion(value) { // If you ended up here by following an exception call stack, here's what's // happened: you supplied an object or symbol value to React (as a prop, key, // DOM attribute, CSS property, string ref, etc.) and when React tried to // coerce it to a string using `'' + value`, an exception was thrown. // // The most common types that will cause this exception are `Symbol` instances // and Temporal objects like `Temporal.Instant`. But any object that has a // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this // exception. (Library authors do this to prevent users from using built-in // numeric operators like `+` or comparison operators like `>=` because custom // methods are needed to perform accurate arithmetic or comparison.) // // To fix the problem, coerce this object or symbol value to a string before // passing it to React. The most reliable way is usually `String(value)`. // // To find which value is throwing, check the browser or debugger console. // Before this exception was thrown, there should be `console.error` output // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the // problem and how that type was used: key, atrribute, input value prop, etc. // In most cases, this console output also shows the component and its // ancestor components where the exception happened. // // eslint-disable-next-line react-internal/safe-string-coercion return '' + value; } function checkAttributeStringCoercion(value, attributeName) { { if (willCoercionThrow(value)) { error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value)); return testStringCoercion(value); // throw (to help callers find troubleshooting comments) } } } function checkKeyStringCoercion(value) { { if (willCoercionThrow(value)) { error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value)); return testStringCoercion(value); // throw (to help callers find troubleshooting comments) } } } function checkPropStringCoercion(value, propName) { { if (willCoercionThrow(value)) { error('The provided `%s` prop is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value)); return testStringCoercion(value); // throw (to help callers find troubleshooting comments) } } } function checkCSSPropertyStringCoercion(value, propName) { { if (willCoercionThrow(value)) { error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value)); return testStringCoercion(value); // throw (to help callers find troubleshooting comments) } } } function checkHtmlStringCoercion(value) { { if (willCoercionThrow(value)) { error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value)); return testStringCoercion(value); // throw (to help callers find troubleshooting comments) } } } function checkFormFieldValueStringCoercion(value) { { if (willCoercionThrow(value)) { error('Form field values (value, checked, defaultValue, or defaultChecked props)' + ' must be strings, not %s.' + ' This value must be coerced to a string before before using it here.', typeName(value)); return testStringCoercion(value); // throw (to help callers find troubleshooting comments) } } } // A reserved attribute. // It is handled by React separately and shouldn't be written to the DOM. var RESERVED = 0; // A simple string attribute. // Attributes that aren't in the filter are presumed to have this type. var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called // "enumerated" attributes with "true" and "false" as possible values. // When true, it should be set to a "true" string. // When false, it should be set to a "false" string. var BOOLEANISH_STRING = 2; // A real boolean attribute. // When true, it should be present (set either to an empty string or its name). // When false, it should be omitted. var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value. // When true, it should be present (set either to an empty string or its name). // When false, it should be omitted. // For any other value, should be present with that value. var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric. // When falsy, it should be removed. var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. // When falsy, it should be removed. var POSITIVE_NUMERIC = 6; /* eslint-disable max-len */ var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; /* eslint-enable max-len */ var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$'); var illegalAttributeNameCache = {}; var validatedAttributeNameCache = {}; function isAttributeNameSafe(attributeName) { if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { return true; } if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { return false; } if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { validatedAttributeNameCache[attributeName] = true; return true; } illegalAttributeNameCache[attributeName] = true; { error('Invalid attribute name: `%s`', attributeName); } return false; } function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { if (propertyInfo !== null) { return propertyInfo.type === RESERVED; } if (isCustomComponentTag) { return false; } if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { return true; } return false; } function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { if (propertyInfo !== null && propertyInfo.type === RESERVED) { return false; } switch (typeof value) { case 'function': // $FlowIssue symbol is perfectly valid here case 'symbol': // eslint-disable-line return true; case 'boolean': { if (isCustomComponentTag) { return false; } if (propertyInfo !== null) { return !propertyInfo.acceptsBooleans; } else { var prefix = name.toLowerCase().slice(0, 5); return prefix !== 'data-' && prefix !== 'aria-'; } } default: return false; } } function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { if (value === null || typeof value === 'undefined') { return true; } if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { return true; } if (isCustomComponentTag) { return false; } if (propertyInfo !== null) { switch (propertyInfo.type) { case BOOLEAN: return !value; case OVERLOADED_BOOLEAN: return value === false; case NUMERIC: return isNaN(value); case POSITIVE_NUMERIC: return isNaN(value) || value < 1; } } return false; } function getPropertyInfo(name) { return properties.hasOwnProperty(name) ? properties[name] : null; } function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) { this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; this.attributeName = attributeName; this.attributeNamespace = attributeNamespace; this.mustUseProperty = mustUseProperty; this.propertyName = name; this.type = type; this.sanitizeURL = sanitizeURL; this.removeEmptyString = removeEmptyString; } // When adding attributes to this list, be sure to also add them to // the `possibleStandardNames` module to ensure casing and incorrect // name warnings. var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM. var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular // elements (not just inputs). Now that ReactDOMInput assigns to the // defaultValue property -- do we need this? 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style']; reservedProps.forEach(function (name) { properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty name, // attributeName null, // attributeNamespace false, // sanitizeURL false); }); // A few React string attributes have a different name. // This is a mapping from React prop names to the attribute names. [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) { var name = _ref[0], attributeName = _ref[1]; properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty attributeName, // attributeName null, // attributeNamespace false, // sanitizeURL false); }); // These are "enumerated" HTML attributes that accept "true" and "false". // In React, we let users pass `true` and `false` even though technically // these aren't boolean attributes (they are coerced to strings). ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) { properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty name.toLowerCase(), // attributeName null, // attributeNamespace false, // sanitizeURL false); }); // These are "enumerated" SVG attributes that accept "true" and "false". // In React, we let users pass `true` and `false` even though technically // these aren't boolean attributes (they are coerced to strings). // Since these are SVG attributes, their attribute names are case-sensitive. ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty name, // attributeName null, // attributeNamespace false, // sanitizeURL false); }); // These are HTML boolean attributes. ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM // on the client side because the browsers are inconsistent. Instead we call focus(). 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata 'itemScope'].forEach(function (name) { properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty name.toLowerCase(), // attributeName null, // attributeNamespace false, // sanitizeURL false); }); // These are the few React props that we set as DOM properties // rather than attributes. These are all booleans. ['checked', // Note: `option.selected` is not updated if `select.multiple` is // disabled with `removeAttribute`. We have special logic for handling this. 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function (name) { properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty name, // attributeName null, // attributeNamespace false, // sanitizeURL false); }); // These are HTML attributes that are "overloaded booleans": they behave like // booleans, but can also accept a string value. ['capture', 'download' // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function (name) { properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty name, // attributeName null, // attributeNamespace false, // sanitizeURL false); }); // These are HTML attributes that must be positive numbers. ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function (name) { properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty name, // attributeName null, // attributeNamespace false, // sanitizeURL false); }); // These are HTML attributes that must be numbers. ['rowSpan', 'start'].forEach(function (name) { properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty name.toLowerCase(), // attributeName null, // attributeNamespace false, // sanitizeURL false); }); var CAMELIZE = /[\-\:]([a-z])/g; var capitalize = function (token) { return token[1].toUpperCase(); }; // This is a list of all SVG attributes that need special casing, namespacing, // or boolean value assignment. Regular attributes that just accept strings // and have the same names are omitted, just like in the HTML attribute filter. // Some of these attributes can be hard to find. This list was created by // scraping the MDN documentation. ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function (attributeName) { var name = attributeName.replace(CAMELIZE, capitalize); properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty attributeName, null, // attributeNamespace false, // sanitizeURL false); }); // String SVG attributes with the xlink namespace. ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function (attributeName) { var name = attributeName.replace(CAMELIZE, capitalize); properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL false); }); // String SVG attributes with the xml namespace. ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function (attributeName) { var name = attributeName.replace(CAMELIZE, capitalize); properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL false); }); // These attribute exists both in HTML and SVG. // The attribute name is case-sensitive in SVG so we can't just use // the React name like we do for attributes that exist only in HTML. ['tabIndex', 'crossOrigin'].forEach(function (attributeName) { properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty attributeName.toLowerCase(), // attributeName null, // attributeNamespace false, // sanitizeURL false); }); // These attributes accept URLs. These must not allow javascript: URLS. // These will also need to accept Trusted Types object in the future. var xlinkHref = 'xlinkHref'; properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty 'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL false); ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) { properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty attributeName.toLowerCase(), // attributeName null, // attributeNamespace true, // sanitizeURL true); }); // and any newline or tab are filtered out as if they're not part of the URL. // https://url.spec.whatwg.org/#url-parsing // Tab or newline are defined as \r\n\t: // https://infra.spec.whatwg.org/#ascii-tab-or-newline // A C0 control is a code point in the range \u0000 NULL to \u001F // INFORMATION SEPARATOR ONE, inclusive: // https://infra.spec.whatwg.org/#c0-control-or-space /* eslint-disable max-len */ var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; var didWarn = false; function sanitizeURL(url) { { if (!didWarn && isJavaScriptProtocol.test(url)) { didWarn = true; error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url)); } } } /** * Get the value for a property on a node. Only used in DEV for SSR validation. * The "expected" argument is used as a hint of what the expected value is. * Some properties have multiple equivalent values. */ function getValueForProperty(node, name, expected, propertyInfo) { { if (propertyInfo.mustUseProperty) { var propertyName = propertyInfo.propertyName; return node[propertyName]; } else { // This check protects multiple uses of `expected`, which is why the // react-internal/safe-string-coercion rule is disabled in several spots // below. { checkAttributeStringCoercion(expected, name); } if ( propertyInfo.sanitizeURL) { // If we haven't fully disabled javascript: URLs, and if // the hydration is successful of a javascript: URL, we // still want to warn on the client. // eslint-disable-next-line react-internal/safe-string-coercion sanitizeURL('' + expected); } var attributeName = propertyInfo.attributeName; var stringValue = null; if (propertyInfo.type === OVERLOADED_BOOLEAN) { if (node.hasAttribute(attributeName)) { var value = node.getAttribute(attributeName); if (value === '') { return true; } if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { return value; } // eslint-disable-next-line react-internal/safe-string-coercion if (value === '' + expected) { return expected; } return value; } } else if (node.hasAttribute(attributeName)) { if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { // We had an attribute but shouldn't have had one, so read it // for the error message. return node.getAttribute(attributeName); } if (propertyInfo.type === BOOLEAN) { // If this was a boolean, it doesn't matter what the value is // the fact that we have it is the same as the expected. return expected; } // Even if this property uses a namespace we use getAttribute // because we assume its namespaced name is the same as our config. // To use getAttributeNS we need the local name which we don't have // in our config atm. stringValue = node.getAttribute(attributeName); } if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { return stringValue === null ? expected : stringValue; // eslint-disable-next-line react-internal/safe-string-coercion } else if (stringValue === '' + expected) { return expected; } else { return stringValue; } } } } /** * Get the value for a attribute on a node. Only used in DEV for SSR validation. * The third argument is used as a hint of what the expected value is. Some * attributes have multiple equivalent values. */ function getValueForAttribute(node, name, expected, isCustomComponentTag) { { if (!isAttributeNameSafe(name)) { return; } if (!node.hasAttribute(name)) { return expected === undefined ? undefined : null; } var value = node.getAttribute(name); { checkAttributeStringCoercion(expected, name); } if (value === '' + expected) { return expected; } return value; } } /** * Sets the value for a property on a node. * * @param {DOMElement} node * @param {string} name * @param {*} value */ function setValueForProperty(node, name, value, isCustomComponentTag) { var propertyInfo = getPropertyInfo(name); if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { return; } if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { value = null; } if (isCustomComponentTag || propertyInfo === null) { if (isAttributeNameSafe(name)) { var _attributeName = name; if (value === null) { node.removeAttribute(_attributeName); } else { { checkAttributeStringCoercion(value, name); } node.setAttribute(_attributeName, '' + value); } } return; } var mustUseProperty = propertyInfo.mustUseProperty; if (mustUseProperty) { var propertyName = propertyInfo.propertyName; if (value === null) { var type = propertyInfo.type; node[propertyName] = type === BOOLEAN ? false : ''; } else { // Contrary to `setAttribute`, object properties are properly // `toString`ed by IE8/9. node[propertyName] = value; } return; } // The rest are treated as attributes with special cases. var attributeName = propertyInfo.attributeName, attributeNamespace = propertyInfo.attributeNamespace; if (value === null) { node.removeAttribute(attributeName); } else { var _type = propertyInfo.type; var attributeValue; if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) { // If attribute type is boolean, we know for sure it won't be an execution sink // and we won't require Trusted Type here. attributeValue = ''; } else { // `setAttribute` with objects becomes only `[object]` in IE8/9, // ('' + value) makes it output the correct toString()-value. { { checkAttributeStringCoercion(value, attributeName); } attributeValue = '' + value; } if (propertyInfo.sanitizeURL) { sanitizeURL(attributeValue.toString()); } } if (attributeNamespace) { node.setAttributeNS(attributeNamespace, attributeName, attributeValue); } else { node.setAttribute(attributeName, attributeValue); } } } // ATTENTION // When adding new symbols to this file, // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' // The Symbol used to tag the ReactElement-like types. var REACT_ELEMENT_TYPE = Symbol.for('react.element'); var REACT_PORTAL_TYPE = Symbol.for('react.portal'); var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); var REACT_PROFILER_TYPE = Symbol.for('react.profiler'); var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); var REACT_CONTEXT_TYPE = Symbol.for('react.context'); var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'); var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'); var REACT_MEMO_TYPE = Symbol.for('react.memo'); var REACT_LAZY_TYPE = Symbol.for('react.lazy'); var REACT_SCOPE_TYPE = Symbol.for('react.scope'); var REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode'); var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen'); var REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden'); var REACT_CACHE_TYPE = Symbol.for('react.cache'); var REACT_TRACING_MARKER_TYPE = Symbol.for('react.tracing_marker'); var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; function getIteratorFn(maybeIterable) { if (maybeIterable === null || typeof maybeIterable !== 'object') { return null; } var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; if (typeof maybeIterator === 'function') { return maybeIterator; } return null; } var assign = Object.assign; // Helpers to patch console.logs to avoid logging during side-effect free // replaying on render function. This currently only patches the object // lazily which won't cover if the log function was extracted eagerly. // We could also eagerly patch the method. var disabledDepth = 0; var prevLog; var prevInfo; var prevWarn; var prevError; var prevGroup; var prevGroupCollapsed; var prevGroupEnd; function disabledLog() {} disabledLog.__reactDisabledLog = true; function disableLogs() { { if (disabledDepth === 0) { /* eslint-disable react-internal/no-production-logging */ prevLog = console.log; prevInfo = console.info; prevWarn = console.warn; prevError = console.error; prevGroup = console.group; prevGroupCollapsed = console.groupCollapsed; prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099 var props = { configurable: true, enumerable: true, value: disabledLog, writable: true }; // $FlowFixMe Flow thinks console is immutable. Object.defineProperties(console, { info: props, log: props, warn: props, error: props, group: props, groupCollapsed: props, groupEnd: props }); /* eslint-enable react-internal/no-production-logging */ } disabledDepth++; } } function reenableLogs() { { disabledDepth--; if (disabledDepth === 0) { /* eslint-disable react-internal/no-production-logging */ var props = { configurable: true, enumerable: true, writable: true }; // $FlowFixMe Flow thinks console is immutable. Object.defineProperties(console, { log: assign({}, props, { value: prevLog }), info: assign({}, props, { value: prevInfo }), warn: assign({}, props, { value: prevWarn }), error: assign({}, props, { value: prevError }), group: assign({}, props, { value: prevGroup }), groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), groupEnd: assign({}, props, { value: prevGroupEnd }) }); /* eslint-enable react-internal/no-production-logging */ } if (disabledDepth < 0) { error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.'); } } } var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name, source, ownerFn) { { if (prefix === undefined) { // Extract the VM specific prefix used by each line. try { throw Error(); } catch (x) { var match = x.stack.trim().match(/\n( *(at )?)/); prefix = match && match[1] || ''; } } // We use the prefix to ensure our stacks line up with native stack frames. return '\n' + prefix + name; } } var reentry = false; var componentFrameCache; { var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; componentFrameCache = new PossiblyWeakMap(); } function describeNativeComponentFrame(fn, construct) { // If something asked for a stack inside a fake render, it should get ignored. if ( !fn || reentry) { return ''; } { var frame = componentFrameCache.get(fn); if (frame !== undefined) { return frame; } } var control; reentry = true; var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. Error.prepareStackTrace = undefined; var previousDispatcher; { previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function // for warnings. ReactCurrentDispatcher.current = null; disableLogs(); } try { // This should throw. if (construct) { // Something should be setting the props in the constructor. var Fake = function () { throw Error(); }; // $FlowFixMe Object.defineProperty(Fake.prototype, 'props', { set: function () { // We use a throwing setter instead of frozen or non-writable props // because that won't throw in a non-strict mode function. throw Error(); } }); if (typeof Reflect === 'object' && Reflect.construct) { // We construct a different control for this case to include any extra // frames added by the construct call. try { Reflect.construct(Fake, []); } catch (x) { control = x; } Reflect.construct(fn, [], Fake); } else { try { Fake.call(); } catch (x) { control = x; } fn.call(Fake.prototype); } } else { try { throw Error(); } catch (x) { control = x; } fn(); } } catch (sample) { // This is inlined manually because closure doesn't do it for us. if (sample && control && typeof sample.stack === 'string') { // This extracts the first frame from the sample that isn't also in the control. // Skipping one frame that we assume is the frame that calls the two. var sampleLines = sample.stack.split('\n'); var controlLines = control.stack.split('\n'); var s = sampleLines.length - 1; var c = controlLines.length - 1; while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { // We expect at least one stack frame to be shared. // Typically this will be the root most one. However, stack frames may be // cut off due to maximum stack limits. In this case, one maybe cut off // earlier than the other. We assume that the sample is longer or the same // and there for cut off earlier. So we should find the root most frame in // the sample somewhere in the control. c--; } for (; s >= 1 && c >= 0; s--, c--) { // Next we find the first one that isn't the same which should be the // frame that called our sample function and the control. if (sampleLines[s] !== controlLines[c]) { // In V8, the first line is describing the message but other VMs don't. // If we're about to return the first line, and the control is also on the same // line, that's a pretty good indicator that our sample threw at same line as // the control. I.e. before we entered the sample frame. So we ignore this result. // This can happen if you passed a class to function component, or non-function. if (s !== 1 || c !== 1) { do { s--; c--; // We may still have similar intermediate frames from the construct call. // The next one that isn't the same should be our match though. if (c < 0 || sampleLines[s] !== controlLines[c]) { // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier. var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>" // but we have a user-provided "displayName" // splice it in to make the stack more readable. if (fn.displayName && _frame.includes('<anonymous>')) { _frame = _frame.replace('<anonymous>', fn.displayName); } { if (typeof fn === 'function') { componentFrameCache.set(fn, _frame); } } // Return the line we found. return _frame; } } while (s >= 1 && c >= 0); } break; } } } } finally { reentry = false; { ReactCurrentDispatcher.current = previousDispatcher; reenableLogs(); } Error.prepareStackTrace = previousPrepareStackTrace; } // Fallback to just using the name if we couldn't make it throw. var name = fn ? fn.displayName || fn.name : ''; var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''; { if (typeof fn === 'function') { componentFrameCache.set(fn, syntheticFrame); } } return syntheticFrame; } function describeClassComponentFrame(ctor, source, ownerFn) { { return describeNativeComponentFrame(ctor, true); } } function describeFunctionComponentFrame(fn, source, ownerFn) { { return describeNativeComponentFrame(fn, false); } } function shouldConstruct(Component) { var prototype = Component.prototype; return !!(prototype && prototype.isReactComponent); } function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { if (type == null) { return ''; } if (typeof type === 'function') { { return describeNativeComponentFrame(type, shouldConstruct(type)); } } if (typeof type === 'string') { return describeBuiltInComponentFrame(type); } switch (type) { case REACT_SUSPENSE_TYPE: return describeBuiltInComponentFrame('Suspense'); case REACT_SUSPENSE_LIST_TYPE: return describeBuiltInComponentFrame('SuspenseList'); } if (typeof type === 'object') { switch (type.$$typeof) { case REACT_FORWARD_REF_TYPE: return describeFunctionComponentFrame(type.render); case REACT_MEMO_TYPE: // Memo may contain any component type so we recursively resolve it. return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); case REACT_LAZY_TYPE: { var lazyComponent = type; var payload = lazyComponent._payload; var init = lazyComponent._init; try { // Lazy may contain any component type so we recursively resolve it. return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); } catch (x) {} } } } return ''; } function describeFiber(fiber) { var owner = fiber._debugOwner ? fiber._debugOwner.type : null ; var source = fiber._debugSource ; switch (fiber.tag) { case HostComponent: return describeBuiltInComponentFrame(fiber.type); case LazyComponent: return describeBuiltInComponentFrame('Lazy'); case SuspenseComponent: return describeBuiltInComponentFrame('Suspense'); case SuspenseListComponent: return describeBuiltInComponentFrame('SuspenseList'); case FunctionComponent: case IndeterminateComponent: case SimpleMemoComponent: return describeFunctionComponentFrame(fiber.type); case ForwardRef: return describeFunctionComponentFrame(fiber.type.render); case ClassComponent: return describeClassComponentFrame(fiber.type); default: return ''; } } function getStackByFiberInDevAndProd(workInProgress) { try { var info = ''; var node = workInProgress; do { info += describeFiber(node); node = node.return; } while (node); return info; } catch (x) { return '\nError generating stack: ' + x.message + '\n' + x.stack; } } function getWrappedName(outerType, innerType, wrapperName) { var displayName = outerType.displayName; if (displayName) { return displayName; } var functionName = innerType.displayName || innerType.name || ''; return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName; } // Keep in sync with react-reconciler/getComponentNameFromFiber function getContextName(type) { return type.displayName || 'Context'; } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. function getComponentNameFromType(type) { if (type == null) { // Host root, text node or just invalid type. return null; } { if (typeof type.tag === 'number') { error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.'); } } if (typeof type === 'function') { return type.displayName || type.name || null; } if (typeof type === 'string') { return type; } switch (type) { case REACT_FRAGMENT_TYPE: return 'Fragment'; case REACT_PORTAL_TYPE: return 'Portal'; case REACT_PROFILER_TYPE: return 'Profiler'; case REACT_STRICT_MODE_TYPE: return 'StrictMode'; case REACT_SUSPENSE_TYPE: return 'Suspense'; case REACT_SUSPENSE_LIST_TYPE: return 'SuspenseList'; } if (typeof type === 'object') { switch (type.$$typeof) { case REACT_CONTEXT_TYPE: var context = type; return getContextName(context) + '.Consumer'; case REACT_PROVIDER_TYPE: var provider = type; return getContextName(provider._context) + '.Provider'; case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, 'ForwardRef'); case REACT_MEMO_TYPE: var outerName = type.displayName || null; if (outerName !== null) { return outerName; } return getComponentNameFromType(type.type) || 'Memo'; case REACT_LAZY_TYPE: { var lazyComponent = type; var payload = lazyComponent._payload; var init = lazyComponent._init; try { return getComponentNameFromType(init(payload)); } catch (x) { return null; } } // eslint-disable-next-line no-fallthrough } } return null; } function getWrappedName$1(outerType, innerType, wrapperName) { var functionName = innerType.displayName || innerType.name || ''; return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName); } // Keep in sync with shared/getComponentNameFromType function getContextName$1(type) { return type.displayName || 'Context'; } function getComponentNameFromFiber(fiber) { var tag = fiber.tag, type = fiber.type; switch (tag) { case CacheComponent: return 'Cache'; case ContextConsumer: var context = type; return getContextName$1(context) + '.Consumer'; case ContextProvider: var provider = type; return getContextName$1(provider._context) + '.Provider'; case DehydratedFragment: return 'DehydratedFragment'; case ForwardRef: return getWrappedName$1(type, type.render, 'ForwardRef'); case Fragment: return 'Fragment'; case HostComponent: // Host component type is the display name (e.g. "div", "View") return type; case HostPortal: return 'Portal'; case HostRoot: return 'Root'; case HostText: return 'Text'; case LazyComponent: // Name comes from the type in this case; we don't have a tag. return getComponentNameFromType(type); case Mode: if (type === REACT_STRICT_MODE_TYPE) { // Don't be less specific than shared/getComponentNameFromType return 'StrictMode'; } return 'Mode'; case OffscreenComponent: return 'Offscreen'; case Profiler: return 'Profiler'; case ScopeComponent: return 'Scope'; case SuspenseComponent: return 'Suspense'; case SuspenseListComponent: return 'SuspenseList'; case TracingMarkerComponent: return 'TracingMarker'; // The display name for this tags come from the user-provided type: case ClassComponent: case FunctionComponent: case IncompleteClassComponent: case IndeterminateComponent: case MemoComponent: case SimpleMemoComponent: if (typeof type === 'function') { return type.displayName || type.name || null; } if (typeof type === 'string') { return type; } break; } return null; } var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var current = null; var isRendering = false; function getCurrentFiberOwnerNameInDevOrNull() { { if (current === null) { return null; } var owner = current._debugOwner; if (owner !== null && typeof owner !== 'undefined') { return getComponentNameFromFiber(owner); } } return null; } function getCurrentFiberStackInDev() { { if (current === null) { return ''; } // Safe because if current fiber exists, we are reconciling, // and it is guaranteed to be the work-in-progress version. return getStackByFiberInDevAndProd(current); } } function resetCurrentFiber() { { ReactDebugCurrentFrame.getCurrentStack = null; current = null; isRendering = false; } } function setCurrentFiber(fiber) { { ReactDebugCurrentFrame.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev; current = fiber; isRendering = false; } } function getCurrentFiber() { { return current; } } function setIsRendering(rendering) { { isRendering = rendering; } } // Flow does not allow string concatenation of most non-string types. To work // around this limitation, we use an opaque type that can only be obtained by // passing the value through getToStringValue first. function toString(value) { // The coercion safety check is performed in getToStringValue(). // eslint-disable-next-line react-internal/safe-string-coercion return '' + value; } function getToStringValue(value) { switch (typeof value) { case 'boolean': case 'number': case 'string': case 'undefined': return value; case 'object': { checkFormFieldValueStringCoercion(value); } return value; default: // function, symbol are assigned as empty strings return ''; } } var hasReadOnlyValue = { button: true, checkbox: true, image: true, hidden: true, radio: true, reset: true, submit: true }; function checkControlledValueProps(tagName, props) { { if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); } if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); } } } function isCheckable(elem) { var type = elem.type; var nodeName = elem.nodeName; return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio'); } function getTracker(node) { return node._valueTracker; } function detachTracker(node) { node._valueTracker = null; } function getValueFromNode(node) { var value = ''; if (!node) { return value; } if (isCheckable(node)) { value = node.checked ? 'true' : 'false'; } else { value = node.value; } return value; } function trackValueOnNode(node) { var valueField = isCheckable(node) ? 'checked' : 'value'; var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); { checkFormFieldValueStringCoercion(node[valueField]); } var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail // and don't track value will cause over reporting of changes, // but it's better then a hard failure // (needed for certain tests that spyOn input values and Safari) if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') { return; } var get = descriptor.get, set = descriptor.set; Object.defineProperty(node, valueField, { configurable: true, get: function () { return get.call(this); }, set: function (value) { { checkFormFieldValueStringCoercion(value); } currentValue = '' + value; set.call(this, value); } }); // We could've passed this the first time // but it triggers a bug in IE11 and Edge 14/15. // Calling defineProperty() again should be equivalent. // https://github.com/facebook/react/issues/11768 Object.defineProperty(node, valueField, { enumerable: descriptor.enumerable }); var tracker = { getValue: function () { return currentValue; }, setValue: function (value) { { checkFormFieldValueStringCoercion(value); } currentValue = '' + value; }, stopTracking: function () { detachTracker(node); delete node[valueField]; } }; return tracker; } function track(node) { if (getTracker(node)) { return; } // TODO: Once it's just Fiber we can move this to node._wrapperState node._valueTracker = trackValueOnNode(node); } function updateValueIfChanged(node) { if (!node) { return false; } var tracker = getTracker(node); // if there is no tracker at this point it's unlikely // that trying again will succeed if (!tracker) { return true; } var lastValue = tracker.getValue(); var nextValue = getValueFromNode(node); if (nextValue !== lastValue) { tracker.setValue(nextValue); return true; } return false; } function getActiveElement(doc) { doc = doc || (typeof document !== 'undefined' ? document : undefined); if (typeof doc === 'undefined') { return null; } try { return doc.activeElement || doc.body; } catch (e) { return doc.body; } } var didWarnValueDefaultValue = false; var didWarnCheckedDefaultChecked = false; var didWarnControlledToUncontrolled = false; var didWarnUncontrolledToControlled = false; function isControlled(props) { var usesChecked = props.type === 'checkbox' || props.type === 'radio'; return usesChecked ? props.checked != null : props.value != null; } /** * Implements an <input> host component that allows setting these optional * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. * * If `checked` or `value` are not supplied (or null/undefined), user actions * that affect the checked state or value will trigger updates to the element. * * If they are supplied (and not null/undefined), the rendered element will not * trigger updates to the element. Instead, the props must change in order for * the rendered element to be updated. * * The rendered element will be initialized as unchecked (or `defaultChecked`) * with an empty value (or `defaultValue`). * * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html */ function getHostProps(element, props) { var node = element; var checked = props.checked; var hostProps = assign({}, props, { defaultChecked: undefined, defaultValue: undefined, value: undefined, checked: checked != null ? checked : node._wrapperState.initialChecked }); return hostProps; } function initWrapperState(element, props) { { checkControlledValueProps('input', props); if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) { error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type); didWarnCheckedDefaultChecked = true; } if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type); didWarnValueDefaultValue = true; } } var node = element; var defaultValue = props.defaultValue == null ? '' : props.defaultValue; node._wrapperState = { initialChecked: props.checked != null ? props.checked : props.defaultChecked, initialValue: getToStringValue(props.value != null ? props.value : defaultValue), controlled: isControlled(props) }; } function updateChecked(element, props) { var node = element; var checked = props.checked; if (checked != null) { setValueForProperty(node, 'checked', checked, false); } } function updateWrapper(element, props) { var node = element; { var controlled = isControlled(props); if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components'); didWarnUncontrolledToControlled = true; } if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components'); didWarnControlledToUncontrolled = true; } } updateChecked(element, props); var value = getToStringValue(props.value); var type = props.type; if (value != null) { if (type === 'number') { if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible. // eslint-disable-next-line node.value != value) { node.value = toString(value); } } else if (node.value !== toString(value)) { node.value = toString(value); } } else if (type === 'submit' || type === 'reset') { // Submit/reset inputs need the attribute removed completely to avoid // blank-text buttons. node.removeAttribute('value'); return; } { // When syncing the value attribute, the value comes from a cascade of // properties: // 1. The value React property // 2. The defaultValue React property // 3. Otherwise there should be no change if (props.hasOwnProperty('value')) { setDefaultValue(node, props.type, value); } else if (props.hasOwnProperty('defaultValue')) { setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); } } { // When syncing the checked attribute, it only changes when it needs // to be removed, such as transitioning from a checkbox into a text input if (props.checked == null && props.defaultChecked != null) { node.defaultChecked = !!props.defaultChecked; } } } function postMountWrapper(element, props, isHydrating) { var node = element; // Do not assign value if it is already set. This prevents user text input // from being lost during SSR hydration. if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) { var type = props.type; var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the // default value provided by the browser. See: #12872 if (isButton && (props.value === undefined || props.value === null)) { return; } var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input // from being lost during SSR hydration. if (!isHydrating) { { // When syncing the value attribute, the value property should use // the wrapperState._initialValue property. This uses: // // 1. The value React property when present // 2. The defaultValue React property when present // 3. An empty string if (initialValue !== node.value) { node.value = initialValue; } } } { // Otherwise, the value attribute is synchronized to the property, // so we assign defaultValue to the same thing as the value property // assignment step above. node.defaultValue = initialValue; } } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug // this is needed to work around a chrome bug where setting defaultChecked // will sometimes influence the value of checked (even after detachment). // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 // We need to temporarily unset name to avoid disrupting radio button groups. var name = node.name; if (name !== '') { node.name = ''; } { // When syncing the checked attribute, both the checked property and // attribute are assigned at the same time using defaultChecked. This uses: // // 1. The checked React property when present // 2. The defaultChecked React property when present // 3. Otherwise, false node.defaultChecked = !node.defaultChecked; node.defaultChecked = !!node._wrapperState.initialChecked; } if (name !== '') { node.name = name; } } function restoreControlledState(element, props) { var node = element; updateWrapper(node, props); updateNamedCousins(node, props); } function updateNamedCousins(rootNode, props) { var name = props.name; if (props.type === 'radio' && name != null) { var queryRoot = rootNode; while (queryRoot.parentNode) { queryRoot = queryRoot.parentNode; } // If `rootNode.form` was non-null, then we could try `form.elements`, // but that sometimes behaves strangely in IE8. We could also try using // `form.getElementsByName`, but that will only return direct children // and won't include inputs that use the HTML5 `form=` attribute. Since // the input might not even be in a form. It might not even be in the // document. Let's just use the local `querySelectorAll` to ensure we don't // miss anything. { checkAttributeStringCoercion(name, 'name'); } var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); for (var i = 0; i < group.length; i++) { var otherNode = group[i]; if (otherNode === rootNode || otherNode.form !== rootNode.form) { continue; } // This will throw if radio buttons rendered by different copies of React // and the same name are rendered into the same form (same as #1939). // That's probably okay; we don't support it just as we don't support // mixing React radio buttons with non-React ones. var otherProps = getFiberCurrentPropsFromNode(otherNode); if (!otherProps) { throw new Error('ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.'); } // We need update the tracked value on the named cousin since the value // was changed but the input saw no event or value set updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that // was previously checked to update will cause it to be come re-checked // as appropriate. updateWrapper(otherNode, otherProps); } } } // In Chrome, assigning defaultValue to certain input types triggers input validation. // For number inputs, the display value loses trailing decimal points. For email inputs, // Chrome raises "The specified value <x> is not a valid email address". // // Here we check to see if the defaultValue has actually changed, avoiding these problems // when the user is inputting text // // https://github.com/facebook/react/issues/7253 function setDefaultValue(node, type, value) { if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js type !== 'number' || getActiveElement(node.ownerDocument) !== node) { if (value == null) { node.defaultValue = toString(node._wrapperState.initialValue); } else if (node.defaultValue !== toString(value)) { node.defaultValue = toString(value); } } } var didWarnSelectedSetOnOption = false; var didWarnInvalidChild = false; var didWarnInvalidInnerHTML = false; /** * Implements an <option> host component that warns when `selected` is set. */ function validateProps(element, props) { { // If a value is not provided, then the children must be simple. if (props.value == null) { if (typeof props.children === 'object' && props.children !== null) { React.Children.forEach(props.children, function (child) { if (child == null) { return; } if (typeof child === 'string' || typeof child === 'number') { return; } if (!didWarnInvalidChild) { didWarnInvalidChild = true; error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.'); } }); } else if (props.dangerouslySetInnerHTML != null) { if (!didWarnInvalidInnerHTML) { didWarnInvalidInnerHTML = true; error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.'); } } } // TODO: Remove support for `selected` in <option>. if (props.selected != null && !didWarnSelectedSetOnOption) { error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.'); didWarnSelectedSetOnOption = true; } } } function postMountWrapper$1(element, props) { // value="" should make a value attribute (#6219) if (props.value != null) { element.setAttribute('value', toString(getToStringValue(props.value))); } } var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare function isArray(a) { return isArrayImpl(a); } var didWarnValueDefaultValue$1; { didWarnValueDefaultValue$1 = false; } function getDeclarationErrorAddendum() { var ownerName = getCurrentFiberOwnerNameInDevOrNull(); if (ownerName) { return '\n\nCheck the render method of `' + ownerName + '`.'; } return ''; } var valuePropNames = ['value', 'defaultValue']; /** * Validation function for `value` and `defaultValue`. */ function checkSelectPropTypes(props) { { checkControlledValueProps('select', props); for (var i = 0; i < valuePropNames.length; i++) { var propName = valuePropNames[i]; if (props[propName] == null) { continue; } var propNameIsArray = isArray(props[propName]); if (props.multiple && !propNameIsArray) { error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum()); } else if (!props.multiple && propNameIsArray) { error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum()); } } } } function updateOptions(node, multiple, propValue, setDefaultSelected) { var options = node.options; if (multiple) { var selectedValues = propValue; var selectedValue = {}; for (var i = 0; i < selectedValues.length; i++) { // Prefix to avoid chaos with special keys. selectedValue['$' + selectedValues[i]] = true; } for (var _i = 0; _i < options.length; _i++) { var selected = selectedValue.hasOwnProperty('$' + options[_i].value); if (options[_i].selected !== selected) { options[_i].selected = selected; } if (selected && setDefaultSelected) { options[_i].defaultSelected = true; } } } else { // Do not set `select.value` as exact behavior isn't consistent across all // browsers for all cases. var _selectedValue = toString(getToStringValue(propValue)); var defaultSelected = null; for (var _i2 = 0; _i2 < options.length; _i2++) { if (options[_i2].value === _selectedValue) { options[_i2].selected = true; if (setDefaultSelected) { options[_i2].defaultSelected = true; } return; } if (defaultSelected === null && !options[_i2].disabled) { defaultSelected = options[_i2]; } } if (defaultSelected !== null) { defaultSelected.selected = true; } } } /** * Implements a <select> host component that allows optionally setting the * props `value` and `defaultValue`. If `multiple` is false, the prop must be a * stringable. If `multiple` is true, the prop must be an array of stringables. * * If `value` is not supplied (or null/undefined), user actions that change the * selected option will trigger updates to the rendered options. * * If it is supplied (and not null/undefined), the rendered options will not * update in response to user actions. Instead, the `value` prop must change in * order for the rendered options to update. * * If `defaultValue` is provided, any options with the supplied values will be * selected. */ function getHostProps$1(element, props) { return assign({}, props, { value: undefined }); } function initWrapperState$1(element, props) { var node = element; { checkSelectPropTypes(props); } node._wrapperState = { wasMultiple: !!props.multiple }; { if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) { error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); didWarnValueDefaultValue$1 = true; } } } function postMountWrapper$2(element, props) { var node = element; node.multiple = !!props.multiple; var value = props.value; if (value != null) { updateOptions(node, !!props.multiple, value, false); } else if (props.defaultValue != null) { updateOptions(node, !!props.multiple, props.defaultValue, true); } } function postUpdateWrapper(element, props) { var node = element; var wasMultiple = node._wrapperState.wasMultiple; node._wrapperState.wasMultiple = !!props.multiple; var value = props.value; if (value != null) { updateOptions(node, !!props.multiple, value, false); } else if (wasMultiple !== !!props.multiple) { // For simplicity, reapply `defaultValue` if `multiple` is toggled. if (props.defaultValue != null) { updateOptions(node, !!props.multiple, props.defaultValue, true); } else { // Revert the select back to its default unselected state. updateOptions(node, !!props.multiple, props.multiple ? [] : '', false); } } } function restoreControlledState$1(element, props) { var node = element; var value = props.value; if (value != null) { updateOptions(node, !!props.multiple, value, false); } } var didWarnValDefaultVal = false; /** * Implements a <textarea> host component that allows setting `value`, and * `defaultValue`. This differs from the traditional DOM API because value is * usually set as PCDATA children. * * If `value` is not supplied (or null/undefined), user actions that affect the * value will trigger updates to the element. * * If `value` is supplied (and not null/undefined), the rendered element will * not trigger updates to the element. Instead, the `value` prop must change in * order for the rendered element to be updated. * * The rendered element will be initialized with an empty value, the prop * `defaultValue` if specified, or the children content (deprecated). */ function getHostProps$2(element, props) { var node = element; if (props.dangerouslySetInnerHTML != null) { throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.'); } // Always set children to the same thing. In IE9, the selection range will // get reset if `textContent` is mutated. We could add a check in setTextContent // to only set the value if/when the value differs from the node value (which would // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this // solution. The value can be a boolean or object so that's why it's forced // to be a string. var hostProps = assign({}, props, { value: undefined, defaultValue: undefined, children: toString(node._wrapperState.initialValue) }); return hostProps; } function initWrapperState$2(element, props) { var node = element; { checkControlledValueProps('textarea', props); if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component'); didWarnValDefaultVal = true; } } var initialValue = props.value; // Only bother fetching default value if we're going to use it if (initialValue == null) { var children = props.children, defaultValue = props.defaultValue; if (children != null) { { error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.'); } { if (defaultValue != null) { throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); } if (isArray(children)) { if (children.length > 1) { throw new Error('<textarea> can only have at most one child.'); } children = children[0]; } defaultValue = children; } } if (defaultValue == null) { defaultValue = ''; } initialValue = defaultValue; } node._wrapperState = { initialValue: getToStringValue(initialValue) }; } function updateWrapper$1(element, props) { var node = element; var value = getToStringValue(props.value); var defaultValue = getToStringValue(props.defaultValue); if (value != null) { // Cast `value` to a string to ensure the value is set correctly. While // browsers typically do this as necessary, jsdom doesn't. var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed if (newValue !== node.value) { node.value = newValue; } if (props.defaultValue == null && node.defaultValue !== newValue) { node.defaultValue = newValue; } } if (defaultValue != null) { node.defaultValue = toString(defaultValue); } } function postMountWrapper$3(element, props) { var node = element; // This is in postMount because we need access to the DOM node, which is not // available until after the component has mounted. var textContent = node.textContent; // Only set node.value if textContent is equal to the expected // initial value. In IE10/IE11 there is a bug where the placeholder attribute // will populate textContent as well. // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ if (textContent === node._wrapperState.initialValue) { if (textContent !== '' && textContent !== null) { node.value = textContent; } } } function restoreControlledState$2(element, props) { // DOM component is still mounted; update updateWrapper$1(element, props); } var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'; var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; // Assumes there is no parent namespace. function getIntrinsicNamespace(type) { switch (type) { case 'svg': return SVG_NAMESPACE; case 'math': return MATH_NAMESPACE; default: return HTML_NAMESPACE; } } function getChildNamespace(parentNamespace, type) { if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) { // No (or default) parent namespace: potential entry point. return getIntrinsicNamespace(type); } if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') { // We're leaving SVG. return HTML_NAMESPACE; } // By default, pass namespace below. return parentNamespace; } /* globals MSApp */ /** * Create a function which has 'unsafe' privileges (required by windows8 apps) */ var createMicrosoftUnsafeLocalFunction = function (func) { if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { return function (arg0, arg1, arg2, arg3) { MSApp.execUnsafeLocalFunction(function () { return func(arg0, arg1, arg2, arg3); }); }; } else { return func; } }; var reusableSVGContainer; /** * Set the innerHTML property of a node * * @param {DOMElement} node * @param {string} html * @internal */ var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { if (node.namespaceURI === SVG_NAMESPACE) { if (!('innerHTML' in node)) { // IE does not have innerHTML for SVG nodes, so instead we inject the // new markup in a temp node and then move the child nodes across into // the target node reusableSVGContainer = reusableSVGContainer || document.createElement('div'); reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>'; var svgNode = reusableSVGContainer.firstChild; while (node.firstChild) { node.removeChild(node.firstChild); } while (svgNode.firstChild) { node.appendChild(svgNode.firstChild); } return; } } node.innerHTML = html; }); /** * HTML nodeType values that represent the type of the node */ var ELEMENT_NODE = 1; var TEXT_NODE = 3; var COMMENT_NODE = 8; var DOCUMENT_NODE = 9; var DOCUMENT_FRAGMENT_NODE = 11; /** * Set the textContent property of a node. For text updates, it's faster * to set the `nodeValue` of the Text node directly instead of using * `.textContent` which will remove the existing node and create a new one. * * @param {DOMElement} node * @param {string} text * @internal */ var setTextContent = function (node, text) { if (text) { var firstChild = node.firstChild; if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) { firstChild.nodeValue = text; return; } } node.textContent = text; }; // List derived from Gecko source code: // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js var shorthandToLonghand = { animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'], background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'], backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'], border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'], borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'], borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'], borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'], borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'], borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'], borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'], borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'], borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'], borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'], borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'], borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'], borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'], borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'], columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'], columns: ['columnCount', 'columnWidth'], flex: ['flexBasis', 'flexGrow', 'flexShrink'], flexFlow: ['flexDirection', 'flexWrap'], font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'], fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'], gap: ['columnGap', 'rowGap'], grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'], gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'], gridColumn: ['gridColumnEnd', 'gridColumnStart'], gridColumnGap: ['columnGap'], gridGap: ['columnGap', 'rowGap'], gridRow: ['gridRowEnd', 'gridRowStart'], gridRowGap: ['rowGap'], gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'], listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'], margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'], marker: ['markerEnd', 'markerMid', 'markerStart'], mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'], maskPosition: ['maskPositionX', 'maskPositionY'], outline: ['outlineColor', 'outlineStyle', 'outlineWidth'], overflow: ['overflowX', 'overflowY'], padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'], placeContent: ['alignContent', 'justifyContent'], placeItems: ['alignItems', 'justifyItems'], placeSelf: ['alignSelf', 'justifySelf'], textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'], textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'], transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'], wordWrap: ['overflowWrap'] }; /** * CSS properties which accept numbers but are not in units of "px". */ var isUnitlessNumber = { animationIterationCount: true, aspectRatio: true, borderImageOutset: true, borderImageSlice: true, borderImageWidth: true, boxFlex: true, boxFlexGroup: true, boxOrdinalGroup: true, columnCount: true, columns: true, flex: true, flexGrow: true, flexPositive: true, flexShrink: true, flexNegative: true, flexOrder: true, gridArea: true, gridRow: true, gridRowEnd: true, gridRowSpan: true, gridRowStart: true, gridColumn: true, gridColumnEnd: true, gridColumnSpan: true, gridColumnStart: true, fontWeight: true, lineClamp: true, lineHeight: true, opacity: true, order: true, orphans: true, tabSize: true, widows: true, zIndex: true, zoom: true, // SVG-related properties fillOpacity: true, floodOpacity: true, stopOpacity: true, strokeDasharray: true, strokeDashoffset: true, strokeMiterlimit: true, strokeOpacity: true, strokeWidth: true }; /** * @param {string} prefix vendor-specific prefix, eg: Webkit * @param {string} key style name, eg: transitionDuration * @return {string} style name prefixed with `prefix`, properly camelCased, eg: * WebkitTransitionDuration */ function prefixKey(prefix, key) { return prefix + key.charAt(0).toUpperCase() + key.substring(1); } /** * Support style names that may come passed in prefixed by adding permutations * of vendor prefixes. */ var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an // infinite loop, because it iterates over the newly added props too. Object.keys(isUnitlessNumber).forEach(function (prop) { prefixes.forEach(function (prefix) { isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; }); }); /** * Convert a value into the proper css writable value. The style name `name` * should be logical (no hyphens), as specified * in `CSSProperty.isUnitlessNumber`. * * @param {string} name CSS property name such as `topMargin`. * @param {*} value CSS property value such as `10px`. * @return {string} Normalized style value with dimensions applied. */ function dangerousStyleValue(name, value, isCustomProperty) { // Note that we've removed escapeTextForBrowser() calls here since the // whole string will be escaped when the attribute is injected into // the markup. If you provide unsafe user data here they can inject // arbitrary CSS which may be problematic (I couldn't repro this): // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ // This is not an XSS hole but instead a potential CSS injection issue // which has lead to a greater discussion about how we're going to // trust URLs moving forward. See #2115901 var isEmpty = value == null || typeof value === 'boolean' || value === ''; if (isEmpty) { return ''; } if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) { return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers } { checkCSSPropertyStringCoercion(value, name); } return ('' + value).trim(); } var uppercasePattern = /([A-Z])/g; var msPattern = /^ms-/; /** * Hyphenates a camelcased CSS property name, for example: * * > hyphenateStyleName('backgroundColor') * < "background-color" * > hyphenateStyleName('MozTransition') * < "-moz-transition" * > hyphenateStyleName('msTransition') * < "-ms-transition" * * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix * is converted to `-ms-`. */ function hyphenateStyleName(name) { return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); } var warnValidStyle = function () {}; { // 'msTransform' is correct, but the other prefixes should be capitalized var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; var msPattern$1 = /^-ms-/; var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon var badStyleValueWithSemicolonPattern = /;\s*$/; var warnedStyleNames = {}; var warnedStyleValues = {}; var warnedForNaNValue = false; var warnedForInfinityValue = false; var camelize = function (string) { return string.replace(hyphenPattern, function (_, character) { return character.toUpperCase(); }); }; var warnHyphenatedStyleName = function (name) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; } warnedStyleNames[name] = true; error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix // is converted to lowercase `ms`. camelize(name.replace(msPattern$1, 'ms-'))); }; var warnBadVendoredStyleName = function (name) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; } warnedStyleNames[name] = true; error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1)); }; var warnStyleValueWithSemicolon = function (name, value) { if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { return; } warnedStyleValues[value] = true; error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, '')); }; var warnStyleValueIsNaN = function (name, value) { if (warnedForNaNValue) { return; } warnedForNaNValue = true; error('`NaN` is an invalid value for the `%s` css style property.', name); }; var warnStyleValueIsInfinity = function (name, value) { if (warnedForInfinityValue) { return; } warnedForInfinityValue = true; error('`Infinity` is an invalid value for the `%s` css style property.', name); }; warnValidStyle = function (name, value) { if (name.indexOf('-') > -1) { warnHyphenatedStyleName(name); } else if (badVendoredStyleNamePattern.test(name)) { warnBadVendoredStyleName(name); } else if (badStyleValueWithSemicolonPattern.test(value)) { warnStyleValueWithSemicolon(name, value); } if (typeof value === 'number') { if (isNaN(value)) { warnStyleValueIsNaN(name, value); } else if (!isFinite(value)) { warnStyleValueIsInfinity(name, value); } } }; } var warnValidStyle$1 = warnValidStyle; /** * Operations for dealing with CSS properties. */ /** * This creates a string that is expected to be equivalent to the style * attribute generated by server-side rendering. It by-passes warnings and * security checks so it's not safe to use this value for anything other than * comparison. It is only used in DEV for SSR validation. */ function createDangerousStringForStyles(styles) { { var serialized = ''; var delimiter = ''; for (var styleName in styles) { if (!styles.hasOwnProperty(styleName)) { continue; } var styleValue = styles[styleName]; if (styleValue != null) { var isCustomProperty = styleName.indexOf('--') === 0; serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':'; serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty); delimiter = ';'; } } return serialized || null; } } /** * Sets the value for multiple styles on a node. If a value is specified as * '' (empty string), the corresponding style property will be unset. * * @param {DOMElement} node * @param {object} styles */ function setValueForStyles(node, styles) { var style = node.style; for (var styleName in styles) { if (!styles.hasOwnProperty(styleName)) { continue; } var isCustomProperty = styleName.indexOf('--') === 0; { if (!isCustomProperty) { warnValidStyle$1(styleName, styles[styleName]); } } var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty); if (styleName === 'float') { styleName = 'cssFloat'; } if (isCustomProperty) { style.setProperty(styleName, styleValue); } else { style[styleName] = styleValue; } } } function isValueEmpty(value) { return value == null || typeof value === 'boolean' || value === ''; } /** * Given {color: 'red', overflow: 'hidden'} returns { * color: 'color', * overflowX: 'overflow', * overflowY: 'overflow', * }. This can be read as "the overflowY property was set by the overflow * shorthand". That is, the values are the property that each was derived from. */ function expandShorthandMap(styles) { var expanded = {}; for (var key in styles) { var longhands = shorthandToLonghand[key] || [key]; for (var i = 0; i < longhands.length; i++) { expanded[longhands[i]] = key; } } return expanded; } /** * When mixing shorthand and longhand property names, we warn during updates if * we expect an incorrect result to occur. In particular, we warn for: * * Updating a shorthand property (longhand gets overwritten): * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'} * becomes .style.font = 'baz' * Removing a shorthand property (longhand gets lost too): * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'} * becomes .style.font = '' * Removing a longhand property (should revert to shorthand; doesn't): * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'} * becomes .style.fontVariant = '' */ function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) { { if (!nextStyles) { return; } var expandedUpdates = expandShorthandMap(styleUpdates); var expandedStyles = expandShorthandMap(nextStyles); var warnedAbout = {}; for (var key in expandedUpdates) { var originalKey = expandedUpdates[key]; var correctOriginalKey = expandedStyles[key]; if (correctOriginalKey && originalKey !== correctOriginalKey) { var warningKey = originalKey + ',' + correctOriginalKey; if (warnedAbout[warningKey]) { continue; } warnedAbout[warningKey] = true; error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + "avoid this, don't mix shorthand and non-shorthand properties " + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey); } } } } // For HTML, certain tags should omit their close tag. We keep a list for // those special-case tags. var omittedCloseTags = { area: true, base: true, br: true, col: true, embed: true, hr: true, img: true, input: true, keygen: true, link: true, meta: true, param: true, source: true, track: true, wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems. }; // `omittedCloseTags` except that `menuitem` should still have its closing tag. var voidElementTags = assign({ menuitem: true }, omittedCloseTags); var HTML = '__html'; function assertValidProps(tag, props) { if (!props) { return; } // Note the use of `==` which checks for null or undefined. if (voidElementTags[tag]) { if (props.children != null || props.dangerouslySetInnerHTML != null) { throw new Error(tag + " is a void element tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); } } if (props.dangerouslySetInnerHTML != null) { if (props.children != null) { throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); } if (typeof props.dangerouslySetInnerHTML !== 'object' || !(HTML in props.dangerouslySetInnerHTML)) { throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); } } { if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) { error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.'); } } if (props.style != null && typeof props.style !== 'object') { throw new Error('The `style` prop expects a mapping from style properties to values, ' + "not a string. For example, style={{marginRight: spacing + 'em'}} when " + 'using JSX.'); } } function isCustomComponent(tagName, props) { if (tagName.indexOf('-') === -1) { return typeof props.is === 'string'; } switch (tagName) { // These are reserved SVG and MathML elements. // We don't mind this list too much because we expect it to never grow. // The alternative is to track the namespace in a few places which is convoluted. // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts case 'annotation-xml': case 'color-profile': case 'font-face': case 'font-face-src': case 'font-face-uri': case 'font-face-format': case 'font-face-name': case 'missing-glyph': return false; default: return true; } } // When adding attributes to the HTML or SVG allowed attribute list, be sure to // also add them to this module to ensure casing and incorrect name // warnings. var possibleStandardNames = { // HTML accept: 'accept', acceptcharset: 'acceptCharset', 'accept-charset': 'acceptCharset', accesskey: 'accessKey', action: 'action', allowfullscreen: 'allowFullScreen', alt: 'alt', as: 'as', async: 'async', autocapitalize: 'autoCapitalize', autocomplete: 'autoComplete', autocorrect: 'autoCorrect', autofocus: 'autoFocus', autoplay: 'autoPlay', autosave: 'autoSave', capture: 'capture', cellpadding: 'cellPadding', cellspacing: 'cellSpacing', challenge: 'challenge', charset: 'charSet', checked: 'checked', children: 'children', cite: 'cite', class: 'className', classid: 'classID', classname: 'className', cols: 'cols', colspan: 'colSpan', content: 'content', contenteditable: 'contentEditable', contextmenu: 'contextMenu', controls: 'controls', controlslist: 'controlsList', coords: 'coords', crossorigin: 'crossOrigin', dangerouslysetinnerhtml: 'dangerouslySetInnerHTML', data: 'data', datetime: 'dateTime', default: 'default', defaultchecked: 'defaultChecked', defaultvalue: 'defaultValue', defer: 'defer', dir: 'dir', disabled: 'disabled', disablepictureinpicture: 'disablePictureInPicture', disableremoteplayback: 'disableRemotePlayback', download: 'download', draggable: 'draggable', enctype: 'encType', enterkeyhint: 'enterKeyHint', for: 'htmlFor', form: 'form', formmethod: 'formMethod', formaction: 'formAction', formenctype: 'formEncType', formnovalidate: 'formNoValidate', formtarget: 'formTarget', frameborder: 'frameBorder', headers: 'headers', height: 'height', hidden: 'hidden', high: 'high', href: 'href', hreflang: 'hrefLang', htmlfor: 'htmlFor', httpequiv: 'httpEquiv', 'http-equiv': 'httpEquiv', icon: 'icon', id: 'id', imagesizes: 'imageSizes', imagesrcset: 'imageSrcSet', innerhtml: 'innerHTML', inputmode: 'inputMode', integrity: 'integrity', is: 'is', itemid: 'itemID', itemprop: 'itemProp', itemref: 'itemRef', itemscope: 'itemScope', itemtype: 'itemType', keyparams: 'keyParams', keytype: 'keyType', kind: 'kind', label: 'label', lang: 'lang', list: 'list', loop: 'loop', low: 'low', manifest: 'manifest', marginwidth: 'marginWidth', marginheight: 'marginHeight', max: 'max', maxlength: 'maxLength', media: 'media', mediagroup: 'mediaGroup', method: 'method', min: 'min', minlength: 'minLength', multiple: 'multiple', muted: 'muted', name: 'name', nomodule: 'noModule', nonce: 'nonce', novalidate: 'noValidate', open: 'open', optimum: 'optimum', pattern: 'pattern', placeholder: 'placeholder', playsinline: 'playsInline', poster: 'poster', preload: 'preload', profile: 'profile', radiogroup: 'radioGroup', readonly: 'readOnly', referrerpolicy: 'referrerPolicy', rel: 'rel', required: 'required', reversed: 'reversed', role: 'role', rows: 'rows', rowspan: 'rowSpan', sandbox: 'sandbox', scope: 'scope', scoped: 'scoped', scrolling: 'scrolling', seamless: 'seamless', selected: 'selected', shape: 'shape', size: 'size', sizes: 'sizes', span: 'span', spellcheck: 'spellCheck', src: 'src', srcdoc: 'srcDoc', srclang: 'srcLang', srcset: 'srcSet', start: 'start', step: 'step', style: 'style', summary: 'summary', tabindex: 'tabIndex', target: 'target', title: 'title', type: 'type', usemap: 'useMap', value: 'value', width: 'width', wmode: 'wmode', wrap: 'wrap', // SVG about: 'about', accentheight: 'accentHeight', 'accent-height': 'accentHeight', accumulate: 'accumulate', additive: 'additive', alignmentbaseline: 'alignmentBaseline', 'alignment-baseline': 'alignmentBaseline', allowreorder: 'allowReorder', alphabetic: 'alphabetic', amplitude: 'amplitude', arabicform: 'arabicForm', 'arabic-form': 'arabicForm', ascent: 'ascent', attributename: 'attributeName', attributetype: 'attributeType', autoreverse: 'autoReverse', azimuth: 'azimuth', basefrequency: 'baseFrequency', baselineshift: 'baselineShift', 'baseline-shift': 'baselineShift', baseprofile: 'baseProfile', bbox: 'bbox', begin: 'begin', bias: 'bias', by: 'by', calcmode: 'calcMode', capheight: 'capHeight', 'cap-height': 'capHeight', clip: 'clip', clippath: 'clipPath', 'clip-path': 'clipPath', clippathunits: 'clipPathUnits', cliprule: 'clipRule', 'clip-rule': 'clipRule', color: 'color', colorinterpolation: 'colorInterpolation', 'color-interpolation': 'colorInterpolation', colorinterpolationfilters: 'colorInterpolationFilters', 'color-interpolation-filters': 'colorInterpolationFilters', colorprofile: 'colorProfile', 'color-profile': 'colorProfile', colorrendering: 'colorRendering', 'color-rendering': 'colorRendering', contentscripttype: 'contentScriptType', contentstyletype: 'contentStyleType', cursor: 'cursor', cx: 'cx', cy: 'cy', d: 'd', datatype: 'datatype', decelerate: 'decelerate', descent: 'descent', diffuseconstant: 'diffuseConstant', direction: 'direction', display: 'display', divisor: 'divisor', dominantbaseline: 'dominantBaseline', 'dominant-baseline': 'dominantBaseline', dur: 'dur', dx: 'dx', dy: 'dy', edgemode: 'edgeMode', elevation: 'elevation', enablebackground: 'enableBackground', 'enable-background': 'enableBackground', end: 'end', exponent: 'exponent', externalresourcesrequired: 'externalResourcesRequired', fill: 'fill', fillopacity: 'fillOpacity', 'fill-opacity': 'fillOpacity', fillrule: 'fillRule', 'fill-rule': 'fillRule', filter: 'filter', filterres: 'filterRes', filterunits: 'filterUnits', floodopacity: 'floodOpacity', 'flood-opacity': 'floodOpacity', floodcolor: 'floodColor', 'flood-color': 'floodColor', focusable: 'focusable', fontfamily: 'fontFamily', 'font-family': 'fontFamily', fontsize: 'fontSize', 'font-size': 'fontSize', fontsizeadjust: 'fontSizeAdjust', 'font-size-adjust': 'fontSizeAdjust', fontstretch: 'fontStretch', 'font-stretch': 'fontStretch', fontstyle: 'fontStyle', 'font-style': 'fontStyle', fontvariant: 'fontVariant', 'font-variant': 'fontVariant', fontweight: 'fontWeight', 'font-weight': 'fontWeight', format: 'format', from: 'from', fx: 'fx', fy: 'fy', g1: 'g1', g2: 'g2', glyphname: 'glyphName', 'glyph-name': 'glyphName', glyphorientationhorizontal: 'glyphOrientationHorizontal', 'glyph-orientation-horizontal': 'glyphOrientationHorizontal', glyphorientationvertical: 'glyphOrientationVertical', 'glyph-orientation-vertical': 'glyphOrientationVertical', glyphref: 'glyphRef', gradienttransform: 'gradientTransform', gradientunits: 'gradientUnits', hanging: 'hanging', horizadvx: 'horizAdvX', 'horiz-adv-x': 'horizAdvX', horizoriginx: 'horizOriginX', 'horiz-origin-x': 'horizOriginX', ideographic: 'ideographic', imagerendering: 'imageRendering', 'image-rendering': 'imageRendering', in2: 'in2', in: 'in', inlist: 'inlist', intercept: 'intercept', k1: 'k1', k2: 'k2', k3: 'k3', k4: 'k4', k: 'k', kernelmatrix: 'kernelMatrix', kernelunitlength: 'kernelUnitLength', kerning: 'kerning', keypoints: 'keyPoints', keysplines: 'keySplines', keytimes: 'keyTimes', lengthadjust: 'lengthAdjust', letterspacing: 'letterSpacing', 'letter-spacing': 'letterSpacing', lightingcolor: 'lightingColor', 'lighting-color': 'lightingColor', limitingconeangle: 'limitingConeAngle', local: 'local', markerend: 'markerEnd', 'marker-end': 'markerEnd', markerheight: 'markerHeight', markermid: 'markerMid', 'marker-mid': 'markerMid', markerstart: 'markerStart', 'marker-start': 'markerStart', markerunits: 'markerUnits', markerwidth: 'markerWidth', mask: 'mask', maskcontentunits: 'maskContentUnits', maskunits: 'maskUnits', mathematical: 'mathematical', mode: 'mode', numoctaves: 'numOctaves', offset: 'offset', opacity: 'opacity', operator: 'operator', order: 'order', orient: 'orient', orientation: 'orientation', origin: 'origin', overflow: 'overflow', overlineposition: 'overlinePosition', 'overline-position': 'overlinePosition', overlinethickness: 'overlineThickness', 'overline-thickness': 'overlineThickness', paintorder: 'paintOrder', 'paint-order': 'paintOrder', panose1: 'panose1', 'panose-1': 'panose1', pathlength: 'pathLength', patterncontentunits: 'patternContentUnits', patterntransform: 'patternTransform', patternunits: 'patternUnits', pointerevents: 'pointerEvents', 'pointer-events': 'pointerEvents', points: 'points', pointsatx: 'pointsAtX', pointsaty: 'pointsAtY', pointsatz: 'pointsAtZ', prefix: 'prefix', preservealpha: 'preserveAlpha', preserveaspectratio: 'preserveAspectRatio', primitiveunits: 'primitiveUnits', property: 'property', r: 'r', radius: 'radius', refx: 'refX', refy: 'refY', renderingintent: 'renderingIntent', 'rendering-intent': 'renderingIntent', repeatcount: 'repeatCount', repeatdur: 'repeatDur', requiredextensions: 'requiredExtensions', requiredfeatures: 'requiredFeatures', resource: 'resource', restart: 'restart', result: 'result', results: 'results', rotate: 'rotate', rx: 'rx', ry: 'ry', scale: 'scale', security: 'security', seed: 'seed', shaperendering: 'shapeRendering', 'shape-rendering': 'shapeRendering', slope: 'slope', spacing: 'spacing', specularconstant: 'specularConstant', specularexponent: 'specularExponent', speed: 'speed', spreadmethod: 'spreadMethod', startoffset: 'startOffset', stddeviation: 'stdDeviation', stemh: 'stemh', stemv: 'stemv', stitchtiles: 'stitchTiles', stopcolor: 'stopColor', 'stop-color': 'stopColor', stopopacity: 'stopOpacity', 'stop-opacity': 'stopOpacity', strikethroughposition: 'strikethroughPosition', 'strikethrough-position': 'strikethroughPosition', strikethroughthickness: 'strikethroughThickness', 'strikethrough-thickness': 'strikethroughThickness', string: 'string', stroke: 'stroke', strokedasharray: 'strokeDasharray', 'stroke-dasharray': 'strokeDasharray', strokedashoffset: 'strokeDashoffset', 'stroke-dashoffset': 'strokeDashoffset', strokelinecap: 'strokeLinecap', 'stroke-linecap': 'strokeLinecap', strokelinejoin: 'strokeLinejoin', 'stroke-linejoin': 'strokeLinejoin', strokemiterlimit: 'strokeMiterlimit', 'stroke-miterlimit': 'strokeMiterlimit', strokewidth: 'strokeWidth', 'stroke-width': 'strokeWidth', strokeopacity: 'strokeOpacity', 'stroke-opacity': 'strokeOpacity', suppresscontenteditablewarning: 'suppressContentEditableWarning', suppresshydrationwarning: 'suppressHydrationWarning', surfacescale: 'surfaceScale', systemlanguage: 'systemLanguage', tablevalues: 'tableValues', targetx: 'targetX', targety: 'targetY', textanchor: 'textAnchor', 'text-anchor': 'textAnchor', textdecoration: 'textDecoration', 'text-decoration': 'textDecoration', textlength: 'textLength', textrendering: 'textRendering', 'text-rendering': 'textRendering', to: 'to', transform: 'transform', typeof: 'typeof', u1: 'u1', u2: 'u2', underlineposition: 'underlinePosition', 'underline-position': 'underlinePosition', underlinethickness: 'underlineThickness', 'underline-thickness': 'underlineThickness', unicode: 'unicode', unicodebidi: 'unicodeBidi', 'unicode-bidi': 'unicodeBidi', unicoderange: 'unicodeRange', 'unicode-range': 'unicodeRange', unitsperem: 'unitsPerEm', 'units-per-em': 'unitsPerEm', unselectable: 'unselectable', valphabetic: 'vAlphabetic', 'v-alphabetic': 'vAlphabetic', values: 'values', vectoreffect: 'vectorEffect', 'vector-effect': 'vectorEffect', version: 'version', vertadvy: 'vertAdvY', 'vert-adv-y': 'vertAdvY', vertoriginx: 'vertOriginX', 'vert-origin-x': 'vertOriginX', vertoriginy: 'vertOriginY', 'vert-origin-y': 'vertOriginY', vhanging: 'vHanging', 'v-hanging': 'vHanging', videographic: 'vIdeographic', 'v-ideographic': 'vIdeographic', viewbox: 'viewBox', viewtarget: 'viewTarget', visibility: 'visibility', vmathematical: 'vMathematical', 'v-mathematical': 'vMathematical', vocab: 'vocab', widths: 'widths', wordspacing: 'wordSpacing', 'word-spacing': 'wordSpacing', writingmode: 'writingMode', 'writing-mode': 'writingMode', x1: 'x1', x2: 'x2', x: 'x', xchannelselector: 'xChannelSelector', xheight: 'xHeight', 'x-height': 'xHeight', xlinkactuate: 'xlinkActuate', 'xlink:actuate': 'xlinkActuate', xlinkarcrole: 'xlinkArcrole', 'xlink:arcrole': 'xlinkArcrole', xlinkhref: 'xlinkHref', 'xlink:href': 'xlinkHref', xlinkrole: 'xlinkRole', 'xlink:role': 'xlinkRole', xlinkshow: 'xlinkShow', 'xlink:show': 'xlinkShow', xlinktitle: 'xlinkTitle', 'xlink:title': 'xlinkTitle', xlinktype: 'xlinkType', 'xlink:type': 'xlinkType', xmlbase: 'xmlBase', 'xml:base': 'xmlBase', xmllang: 'xmlLang', 'xml:lang': 'xmlLang', xmlns: 'xmlns', 'xml:space': 'xmlSpace', xmlnsxlink: 'xmlnsXlink', 'xmlns:xlink': 'xmlnsXlink', xmlspace: 'xmlSpace', y1: 'y1', y2: 'y2', y: 'y', ychannelselector: 'yChannelSelector', z: 'z', zoomandpan: 'zoomAndPan' }; var ariaProperties = { 'aria-current': 0, // state 'aria-description': 0, 'aria-details': 0, 'aria-disabled': 0, // state 'aria-hidden': 0, // state 'aria-invalid': 0, // state 'aria-keyshortcuts': 0, 'aria-label': 0, 'aria-roledescription': 0, // Widget Attributes 'aria-autocomplete': 0, 'aria-checked': 0, 'aria-expanded': 0, 'aria-haspopup': 0, 'aria-level': 0, 'aria-modal': 0, 'aria-multiline': 0, 'aria-multiselectable': 0, 'aria-orientation': 0, 'aria-placeholder': 0, 'aria-pressed': 0, 'aria-readonly': 0, 'aria-required': 0, 'aria-selected': 0, 'aria-sort': 0, 'aria-valuemax': 0, 'aria-valuemin': 0, 'aria-valuenow': 0, 'aria-valuetext': 0, // Live Region Attributes 'aria-atomic': 0, 'aria-busy': 0, 'aria-live': 0, 'aria-relevant': 0, // Drag-and-Drop Attributes 'aria-dropeffect': 0, 'aria-grabbed': 0, // Relationship Attributes 'aria-activedescendant': 0, 'aria-colcount': 0, 'aria-colindex': 0, 'aria-colspan': 0, 'aria-controls': 0, 'aria-describedby': 0, 'aria-errormessage': 0, 'aria-flowto': 0, 'aria-labelledby': 0, 'aria-owns': 0, 'aria-posinset': 0, 'aria-rowcount': 0, 'aria-rowindex': 0, 'aria-rowspan': 0, 'aria-setsize': 0 }; var warnedProperties = {}; var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); function validateProperty(tagName, name) { { if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) { return true; } if (rARIACamel.test(name)) { var ariaName = 'aria-' + name.slice(4).toLowerCase(); var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM // DOM properties, then it is an invalid aria-* attribute. if (correctName == null) { error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name); warnedProperties[name] = true; return true; } // aria-* attributes should be lowercase; suggest the lowercase version. if (name !== correctName) { error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName); warnedProperties[name] = true; return true; } } if (rARIA.test(name)) { var lowerCasedName = name.toLowerCase(); var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM // DOM properties, then it is an invalid aria-* attribute. if (standardName == null) { warnedProperties[name] = true; return false; } // aria-* attributes should be lowercase; suggest the lowercase version. if (name !== standardName) { error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName); warnedProperties[name] = true; return true; } } } return true; } function warnInvalidARIAProps(type, props) { { var invalidProps = []; for (var key in props) { var isValid = validateProperty(type, key); if (!isValid) { invalidProps.push(key); } } var unknownPropString = invalidProps.map(function (prop) { return '`' + prop + '`'; }).join(', '); if (invalidProps.length === 1) { error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type); } else if (invalidProps.length > 1) { error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type); } } } function validateProperties(type, props) { if (isCustomComponent(type, props)) { return; } warnInvalidARIAProps(type, props); } var didWarnValueNull = false; function validateProperties$1(type, props) { { if (type !== 'input' && type !== 'textarea' && type !== 'select') { return; } if (props != null && props.value === null && !didWarnValueNull) { didWarnValueNull = true; if (type === 'select' && props.multiple) { error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type); } else { error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type); } } } } var validateProperty$1 = function () {}; { var warnedProperties$1 = {}; var EVENT_NAME_REGEX = /^on./; var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); validateProperty$1 = function (tagName, name, value, eventRegistry) { if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { return true; } var lowerCasedName = name.toLowerCase(); if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.'); warnedProperties$1[name] = true; return true; } // We can't rely on the event system being injected on the server. if (eventRegistry != null) { var registrationNameDependencies = eventRegistry.registrationNameDependencies, possibleRegistrationNames = eventRegistry.possibleRegistrationNames; if (registrationNameDependencies.hasOwnProperty(name)) { return true; } var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null; if (registrationName != null) { error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName); warnedProperties$1[name] = true; return true; } if (EVENT_NAME_REGEX.test(name)) { error('Unknown event handler property `%s`. It will be ignored.', name); warnedProperties$1[name] = true; return true; } } else if (EVENT_NAME_REGEX.test(name)) { // If no event plugins have been injected, we are in a server environment. // So we can't tell if the event name is correct for sure, but we can filter // out known bad ones like `onclick`. We can't suggest a specific replacement though. if (INVALID_EVENT_NAME_REGEX.test(name)) { error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name); } warnedProperties$1[name] = true; return true; } // Let the ARIA attribute hook validate ARIA attributes if (rARIA$1.test(name) || rARIACamel$1.test(name)) { return true; } if (lowerCasedName === 'innerhtml') { error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.'); warnedProperties$1[name] = true; return true; } if (lowerCasedName === 'aria') { error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.'); warnedProperties$1[name] = true; return true; } if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') { error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value); warnedProperties$1[name] = true; return true; } if (typeof value === 'number' && isNaN(value)) { error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name); warnedProperties$1[name] = true; return true; } var propertyInfo = getPropertyInfo(name); var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config. if (possibleStandardNames.hasOwnProperty(lowerCasedName)) { var standardName = possibleStandardNames[lowerCasedName]; if (standardName !== name) { error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName); warnedProperties$1[name] = true; return true; } } else if (!isReserved && name !== lowerCasedName) { // Unknown attributes should have lowercase casing since that's how they // will be cased anyway with server rendering. error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName); warnedProperties$1[name] = true; return true; } if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { if (value) { error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name); } else { error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name); } warnedProperties$1[name] = true; return true; } // Now that we've validated casing, do not validate // data types for reserved props if (isReserved) { return true; } // Warn when a known attribute is a bad type if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { warnedProperties$1[name] = true; return false; } // Warn when passing the strings 'false' or 'true' into a boolean prop if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) { error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value); warnedProperties$1[name] = true; return true; } return true; }; } var warnUnknownProperties = function (type, props, eventRegistry) { { var unknownProps = []; for (var key in props) { var isValid = validateProperty$1(type, key, props[key], eventRegistry); if (!isValid) { unknownProps.push(key); } } var unknownPropString = unknownProps.map(function (prop) { return '`' + prop + '`'; }).join(', '); if (unknownProps.length === 1) { error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type); } else if (unknownProps.length > 1) { error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type); } } }; function validateProperties$2(type, props, eventRegistry) { if (isCustomComponent(type, props)) { return; } warnUnknownProperties(type, props, eventRegistry); } var IS_EVENT_HANDLE_NON_MANAGED_NODE = 1; var IS_NON_DELEGATED = 1 << 1; var IS_CAPTURE_PHASE = 1 << 2; // set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when // we call willDeferLaterForLegacyFBSupport, thus not bailing out // will result in endless cycles like an infinite loop. // We also don't want to defer during event replaying. var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE; // This exists to avoid circular dependency between ReactDOMEventReplaying // and DOMPluginEventSystem. var currentReplayingEvent = null; function setReplayingEvent(event) { { if (currentReplayingEvent !== null) { error('Expected currently replaying event to be null. This error ' + 'is likely caused by a bug in React. Please file an issue.'); } } currentReplayingEvent = event; } function resetReplayingEvent() { { if (currentReplayingEvent === null) { error('Expected currently replaying event to not be null. This error ' + 'is likely caused by a bug in React. Please file an issue.'); } } currentReplayingEvent = null; } function isReplayingEvent(event) { return event === currentReplayingEvent; } /** * Gets the target node from a native browser event by accounting for * inconsistencies in browser DOM APIs. * * @param {object} nativeEvent Native browser event. * @return {DOMEventTarget} Target node. */ function getEventTarget(nativeEvent) { // Fallback to nativeEvent.srcElement for IE9 // https://github.com/facebook/react/issues/12506 var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963 if (target.correspondingUseElement) { target = target.correspondingUseElement; } // Safari may fire events on text nodes (Node.TEXT_NODE is 3). // @see http://www.quirksmode.org/js/events_properties.html return target.nodeType === TEXT_NODE ? target.parentNode : target; } var restoreImpl = null; var restoreTarget = null; var restoreQueue = null; function restoreStateOfTarget(target) { // We perform this translation at the end of the event loop so that we // always receive the correct fiber here var internalInstance = getInstanceFromNode(target); if (!internalInstance) { // Unmounted return; } if (typeof restoreImpl !== 'function') { throw new Error('setRestoreImplementation() needs to be called to handle a target for controlled ' + 'events. This error is likely caused by a bug in React. Please file an issue.'); } var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted. if (stateNode) { var _props = getFiberCurrentPropsFromNode(stateNode); restoreImpl(internalInstance.stateNode, internalInstance.type, _props); } } function setRestoreImplementation(impl) { restoreImpl = impl; } function enqueueStateRestore(target) { if (restoreTarget) { if (restoreQueue) { restoreQueue.push(target); } else { restoreQueue = [target]; } } else { restoreTarget = target; } } function needsStateRestore() { return restoreTarget !== null || restoreQueue !== null; } function restoreStateIfNeeded() { if (!restoreTarget) { return; } var target = restoreTarget; var queuedTargets = restoreQueue; restoreTarget = null; restoreQueue = null; restoreStateOfTarget(target); if (queuedTargets) { for (var i = 0; i < queuedTargets.length; i++) { restoreStateOfTarget(queuedTargets[i]); } } } // the renderer. Such as when we're dispatching events or if third party // libraries need to call batchedUpdates. Eventually, this API will go away when // everything is batched by default. We'll then have a similar API to opt-out of // scheduled work and instead do synchronous work. // Defaults var batchedUpdatesImpl = function (fn, bookkeeping) { return fn(bookkeeping); }; var flushSyncImpl = function () {}; var isInsideEventHandler = false; function finishEventHandler() { // Here we wait until all updates have propagated, which is important // when using controlled components within layers: // https://github.com/facebook/react/issues/1698 // Then we restore state of any controlled component. var controlledComponentsHavePendingUpdates = needsStateRestore(); if (controlledComponentsHavePendingUpdates) { // If a controlled event was fired, we may need to restore the state of // the DOM node back to the controlled value. This is necessary when React // bails out of the update without touching the DOM. // TODO: Restore state in the microtask, after the discrete updates flush, // instead of early flushing them here. flushSyncImpl(); restoreStateIfNeeded(); } } function batchedUpdates(fn, a, b) { if (isInsideEventHandler) { // If we are currently inside another batch, we need to wait until it // fully completes before restoring state. return fn(a, b); } isInsideEventHandler = true; try { return batchedUpdatesImpl(fn, a, b); } finally { isInsideEventHandler = false; finishEventHandler(); } } // TODO: Replace with flushSync function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushSyncImpl) { batchedUpdatesImpl = _batchedUpdatesImpl; flushSyncImpl = _flushSyncImpl; } function isInteractive(tag) { return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; } function shouldPreventMouseEvent(name, type, props) { switch (name) { case 'onClick': case 'onClickCapture': case 'onDoubleClick': case 'onDoubleClickCapture': case 'onMouseDown': case 'onMouseDownCapture': case 'onMouseMove': case 'onMouseMoveCapture': case 'onMouseUp': case 'onMouseUpCapture': case 'onMouseEnter': return !!(props.disabled && isInteractive(type)); default: return false; } } /** * @param {object} inst The instance, which is the source of events. * @param {string} registrationName Name of listener (e.g. `onClick`). * @return {?function} The stored callback. */ function getListener(inst, registrationName) { var stateNode = inst.stateNode; if (stateNode === null) { // Work in progress (ex: onload events in incremental mode). return null; } var props = getFiberCurrentPropsFromNode(stateNode); if (props === null) { // Work in progress. return null; } var listener = props[registrationName]; if (shouldPreventMouseEvent(registrationName, inst.type, props)) { return null; } if (listener && typeof listener !== 'function') { throw new Error("Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type."); } return listener; } var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support if (canUseDOM) { try { var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value Object.defineProperty(options, 'passive', { get: function () { passiveBrowserEventsSupported = true; } }); window.addEventListener('test', options, options); window.removeEventListener('test', options, options); } catch (e) { passiveBrowserEventsSupported = false; } } function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) { var funcArgs = Array.prototype.slice.call(arguments, 3); try { func.apply(context, funcArgs); } catch (error) { this.onError(error); } } var invokeGuardedCallbackImpl = invokeGuardedCallbackProd; { // In DEV mode, we swap out invokeGuardedCallback for a special version // that plays more nicely with the browser's DevTools. The idea is to preserve // "Pause on exceptions" behavior. Because React wraps all user-provided // functions in invokeGuardedCallback, and the production version of // invokeGuardedCallback uses a try-catch, all user exceptions are treated // like caught exceptions, and the DevTools won't pause unless the developer // takes the extra step of enabling pause on caught exceptions. This is // unintuitive, though, because even though React has caught the error, from // the developer's perspective, the error is uncaught. // // To preserve the expected "Pause on exceptions" behavior, we don't use a // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake // DOM node, and call the user-provided callback from inside an event handler // for that fake event. If the callback throws, the error is "captured" using // a global event handler. But because the error happens in a different // event loop context, it does not interrupt the normal program flow. // Effectively, this gives us try-catch behavior without actually using // try-catch. Neat! // Check that the browser supports the APIs we need to implement our special // DEV version of invokeGuardedCallback if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') { var fakeNode = document.createElement('react'); invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) { // If document doesn't exist we know for sure we will crash in this method // when we call document.createEvent(). However this can cause confusing // errors: https://github.com/facebook/create-react-app/issues/3482 // So we preemptively throw with a better message instead. if (typeof document === 'undefined' || document === null) { throw new Error('The `document` global was defined when React was initialized, but is not ' + 'defined anymore. This can happen in a test environment if a component ' + 'schedules an update from an asynchronous callback, but the test has already ' + 'finished running. To solve this, you can either unmount the component at ' + 'the end of your test (and ensure that any asynchronous operations get ' + 'canceled in `componentWillUnmount`), or you can change the test itself ' + 'to be asynchronous.'); } var evt = document.createEvent('Event'); var didCall = false; // Keeps track of whether the user-provided callback threw an error. We // set this to true at the beginning, then set it to false right after // calling the function. If the function errors, `didError` will never be // set to false. This strategy works even if the browser is flaky and // fails to call our global error handler, because it doesn't rely on // the error event at all. var didError = true; // Keeps track of the value of window.event so that we can reset it // during the callback to let user code access window.event in the // browsers that support it. var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event // dispatching: https://github.com/facebook/react/issues/13688 var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); function restoreAfterDispatch() { // We immediately remove the callback from event listeners so that // nested `invokeGuardedCallback` calls do not clash. Otherwise, a // nested call would trigger the fake event handlers of any call higher // in the stack. fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the // window.event assignment in both IE <= 10 as they throw an error // "Member not found" in strict mode, and in Firefox which does not // support window.event. if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) { window.event = windowEvent; } } // Create an event handler for our fake event. We will synchronously // dispatch our fake event using `dispatchEvent`. Inside the handler, we // call the user-provided callback. var funcArgs = Array.prototype.slice.call(arguments, 3); function callCallback() { didCall = true; restoreAfterDispatch(); func.apply(context, funcArgs); didError = false; } // Create a global error event handler. We use this to capture the value // that was thrown. It's possible that this error handler will fire more // than once; for example, if non-React code also calls `dispatchEvent` // and a handler for that event throws. We should be resilient to most of // those cases. Even if our error event handler fires more than once, the // last error event is always used. If the callback actually does error, // we know that the last error event is the correct one, because it's not // possible for anything else to have happened in between our callback // erroring and the code that follows the `dispatchEvent` call below. If // the callback doesn't error, but the error event was fired, we know to // ignore it because `didError` will be false, as described above. var error; // Use this to track whether the error event is ever called. var didSetError = false; var isCrossOriginError = false; function handleWindowError(event) { error = event.error; didSetError = true; if (error === null && event.colno === 0 && event.lineno === 0) { isCrossOriginError = true; } if (event.defaultPrevented) { // Some other error handler has prevented default. // Browsers silence the error report if this happens. // We'll remember this to later decide whether to log it or not. if (error != null && typeof error === 'object') { try { error._suppressLogging = true; } catch (inner) {// Ignore. } } } } // Create a fake event type. var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers window.addEventListener('error', handleWindowError); fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function // errors, it will trigger our global error handler. evt.initEvent(evtType, false, false); fakeNode.dispatchEvent(evt); if (windowEventDescriptor) { Object.defineProperty(window, 'event', windowEventDescriptor); } if (didCall && didError) { if (!didSetError) { // The callback errored, but the error event never fired. // eslint-disable-next-line react-internal/prod-error-codes error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.'); } else if (isCrossOriginError) { // eslint-disable-next-line react-internal/prod-error-codes error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.'); } this.onError(error); } // Remove our event listeners window.removeEventListener('error', handleWindowError); if (!didCall) { // Something went really wrong, and our event was not dispatched. // https://github.com/facebook/react/issues/16734 // https://github.com/facebook/react/issues/16585 // Fall back to the production implementation. restoreAfterDispatch(); return invokeGuardedCallbackProd.apply(this, arguments); } }; } } var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl; var hasError = false; var caughtError = null; // Used by event system to capture/rethrow the first error. var hasRethrowError = false; var rethrowError = null; var reporter = { onError: function (error) { hasError = true; caughtError = error; } }; /** * Call a function while guarding against errors that happens within it. * Returns an error if it throws, otherwise null. * * In production, this is implemented using a try-catch. The reason we don't * use a try-catch directly is so that we can swap out a different * implementation in DEV mode. * * @param {String} name of the guard to use for logging or debugging * @param {Function} func The function to invoke * @param {*} context The context to use when calling the function * @param {...*} args Arguments for function */ function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) { hasError = false; caughtError = null; invokeGuardedCallbackImpl$1.apply(reporter, arguments); } /** * Same as invokeGuardedCallback, but instead of returning an error, it stores * it in a global so it can be rethrown by `rethrowCaughtError` later. * TODO: See if caughtError and rethrowError can be unified. * * @param {String} name of the guard to use for logging or debugging * @param {Function} func The function to invoke * @param {*} context The context to use when calling the function * @param {...*} args Arguments for function */ function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) { invokeGuardedCallback.apply(this, arguments); if (hasError) { var error = clearCaughtError(); if (!hasRethrowError) { hasRethrowError = true; rethrowError = error; } } } /** * During execution of guarded functions we will capture the first error which * we will rethrow to be handled by the top level error handler. */ function rethrowCaughtError() { if (hasRethrowError) { var error = rethrowError; hasRethrowError = false; rethrowError = null; throw error; } } function hasCaughtError() { return hasError; } function clearCaughtError() { if (hasError) { var error = caughtError; hasError = false; caughtError = null; return error; } else { throw new Error('clearCaughtError was called but no error was captured. This error ' + 'is likely caused by a bug in React. Please file an issue.'); } } /** * `ReactInstanceMap` maintains a mapping from a public facing stateful * instance (key) and the internal representation (value). This allows public * methods to accept the user facing instance as an argument and map them back * to internal methods. * * Note that this module is currently shared and assumed to be stateless. * If this becomes an actual Map, that will break. */ function get(key) { return key._reactInternals; } function has(key) { return key._reactInternals !== undefined; } function set(key, value) { key._reactInternals = value; } // Don't change these two values. They're used by React Dev Tools. var NoFlags = /* */ 0; var PerformedWork = /* */ 1; // You can change the rest (and add more). var Placement = /* */ 2; var Update = /* */ 4; var ChildDeletion = /* */ 16; var ContentReset = /* */ 32; var Callback = /* */ 64; var DidCapture = /* */ 128; var ForceClientRender = /* */ 256; var Ref = /* */ 512; var Snapshot = /* */ 1024; var Passive = /* */ 2048; var Hydrating = /* */ 4096; var Visibility = /* */ 8192; var StoreConsistency = /* */ 16384; var LifecycleEffectMask = Passive | Update | Callback | Ref | Snapshot | StoreConsistency; // Union of all commit flags (flags with the lifetime of a particular commit) var HostEffectMask = /* */ 32767; // These are not really side effects, but we still reuse this field. var Incomplete = /* */ 32768; var ShouldCapture = /* */ 65536; var ForceUpdateForLegacySuspense = /* */ 131072; var Forked = /* */ 1048576; // Static tags describe aspects of a fiber that are not specific to a render, // e.g. a fiber uses a passive effect (even if there are no updates on this particular render). // This enables us to defer more work in the unmount case, // since we can defer traversing the tree during layout to look for Passive effects, // and instead rely on the static flag as a signal that there may be cleanup work. var RefStatic = /* */ 2097152; var LayoutStatic = /* */ 4194304; var PassiveStatic = /* */ 8388608; // These flags allow us to traverse to fibers that have effects on mount // without traversing the entire tree after every commit for // double invoking var MountLayoutDev = /* */ 16777216; var MountPassiveDev = /* */ 33554432; // Groups of flags that are used in the commit phase to skip over trees that // don't contain effects, by checking subtreeFlags. var BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visibility // flag logic (see #20043) Update | Snapshot | ( 0); var MutationMask = Placement | Update | ChildDeletion | ContentReset | Ref | Hydrating | Visibility; var LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask var PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset on clones. // This allows certain concepts to persist without recalculating them, // e.g. whether a subtree contains passive effects or portals. var StaticMask = LayoutStatic | PassiveStatic | RefStatic; var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; function getNearestMountedFiber(fiber) { var node = fiber; var nearestMounted = fiber; if (!fiber.alternate) { // If there is no alternate, this might be a new tree that isn't inserted // yet. If it is, then it will have a pending insertion effect on it. var nextNode = node; do { node = nextNode; if ((node.flags & (Placement | Hydrating)) !== NoFlags) { // This is an insertion or in-progress hydration. The nearest possible // mounted fiber is the parent but we need to continue to figure out // if that one is still mounted. nearestMounted = node.return; } nextNode = node.return; } while (nextNode); } else { while (node.return) { node = node.return; } } if (node.tag === HostRoot) { // TODO: Check if this was a nested HostRoot when used with // renderContainerIntoSubtree. return nearestMounted; } // If we didn't hit the root, that means that we're in an disconnected tree // that has been unmounted. return null; } function getSuspenseInstanceFromFiber(fiber) { if (fiber.tag === SuspenseComponent) { var suspenseState = fiber.memoizedState; if (suspenseState === null) { var current = fiber.alternate; if (current !== null) { suspenseState = current.memoizedState; } } if (suspenseState !== null) { return suspenseState.dehydrated; } } return null; } function getContainerFromFiber(fiber) { return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null; } function isFiberMounted(fiber) { return getNearestMountedFiber(fiber) === fiber; } function isMounted(component) { { var owner = ReactCurrentOwner.current; if (owner !== null && owner.tag === ClassComponent) { var ownerFiber = owner; var instance = ownerFiber.stateNode; if (!instance._warnedAboutRefsInRender) { error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromFiber(ownerFiber) || 'A component'); } instance._warnedAboutRefsInRender = true; } } var fiber = get(component); if (!fiber) { return false; } return getNearestMountedFiber(fiber) === fiber; } function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) { throw new Error('Unable to find node on an unmounted component.'); } } function findCurrentFiberUsingSlowPath(fiber) { var alternate = fiber.alternate; if (!alternate) { // If there is no alternate, then we only need to check if it is mounted. var nearestMounted = getNearestMountedFiber(fiber); if (nearestMounted === null) { throw new Error('Unable to find node on an unmounted component.'); } if (nearestMounted !== fiber) { return null; } return fiber; } // If we have two possible branches, we'll walk backwards up to the root // to see what path the root points to. On the way we may hit one of the // special cases and we'll deal with them. var a = fiber; var b = alternate; while (true) { var parentA = a.return; if (parentA === null) { // We're at the root. break; } var parentB = parentA.alternate; if (parentB === null) { // There is no alternate. This is an unusual case. Currently, it only // happens when a Suspense component is hidden. An extra fragment fiber // is inserted in between the Suspense fiber and its children. Skip // over this extra fragment fiber and proceed to the next parent. var nextParent = parentA.return; if (nextParent !== null) { a = b = nextParent; continue; } // If there's no parent, we're at the root. break; } // If both copies of the parent fiber point to the same child, we can // assume that the child is current. This happens when we bailout on low // priority: the bailed out fiber's child reuses the current child. if (parentA.child === parentB.child) { var child = parentA.child; while (child) { if (child === a) { // We've determined that A is the current branch. assertIsMounted(parentA); return fiber; } if (child === b) { // We've determined that B is the current branch. assertIsMounted(parentA); return alternate; } child = child.sibling; } // We should never have an alternate for any mounting node. So the only // way this could possibly happen is if this was unmounted, if at all. throw new Error('Unable to find node on an unmounted component.'); } if (a.return !== b.return) { // The return pointer of A and the return pointer of B point to different // fibers. We assume that return pointers never criss-cross, so A must // belong to the child set of A.return, and B must belong to the child // set of B.return. a = parentA; b = parentB; } else { // The return pointers point to the same fiber. We'll have to use the // default, slow path: scan the child sets of each parent alternate to see // which child belongs to which set. // // Search parent A's child set var didFindChild = false; var _child = parentA.child; while (_child) { if (_child === a) { didFindChild = true; a = parentA; b = parentB; break; } if (_child === b) { didFindChild = true; b = parentA; a = parentB; break; } _child = _child.sibling; } if (!didFindChild) { // Search parent B's child set _child = parentB.child; while (_child) { if (_child === a) { didFindChild = true; a = parentB; b = parentA; break; } if (_child === b) { didFindChild = true; b = parentB; a = parentA; break; } _child = _child.sibling; } if (!didFindChild) { throw new Error('Child was not found in either parent set. This indicates a bug ' + 'in React related to the return pointer. Please file an issue.'); } } } if (a.alternate !== b) { throw new Error("Return fibers should always be each others' alternates. " + 'This error is likely caused by a bug in React. Please file an issue.'); } } // If the root is not a host container, we're in a disconnected tree. I.e. // unmounted. if (a.tag !== HostRoot) { throw new Error('Unable to find node on an unmounted component.'); } if (a.stateNode.current === a) { // We've determined that A is the current branch. return fiber; } // Otherwise B has to be current branch. return alternate; } function findCurrentHostFiber(parent) { var currentParent = findCurrentFiberUsingSlowPath(parent); return currentParent !== null ? findCurrentHostFiberImpl(currentParent) : null; } function findCurrentHostFiberImpl(node) { // Next we'll drill down this component to find the first HostComponent/Text. if (node.tag === HostComponent || node.tag === HostText) { return node; } var child = node.child; while (child !== null) { var match = findCurrentHostFiberImpl(child); if (match !== null) { return match; } child = child.sibling; } return null; } function findCurrentHostFiberWithNoPortals(parent) { var currentParent = findCurrentFiberUsingSlowPath(parent); return currentParent !== null ? findCurrentHostFiberWithNoPortalsImpl(currentParent) : null; } function findCurrentHostFiberWithNoPortalsImpl(node) { // Next we'll drill down this component to find the first HostComponent/Text. if (node.tag === HostComponent || node.tag === HostText) { return node; } var child = node.child; while (child !== null) { if (child.tag !== HostPortal) { var match = findCurrentHostFiberWithNoPortalsImpl(child); if (match !== null) { return match; } } child = child.sibling; } return null; } // This module only exists as an ESM wrapper around the external CommonJS var scheduleCallback = Scheduler.unstable_scheduleCallback; var cancelCallback = Scheduler.unstable_cancelCallback; var shouldYield = Scheduler.unstable_shouldYield; var requestPaint = Scheduler.unstable_requestPaint; var now = Scheduler.unstable_now; var getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel; var ImmediatePriority = Scheduler.unstable_ImmediatePriority; var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority; var NormalPriority = Scheduler.unstable_NormalPriority; var LowPriority = Scheduler.unstable_LowPriority; var IdlePriority = Scheduler.unstable_IdlePriority; // this doesn't actually exist on the scheduler, but it *does* // on scheduler/unstable_mock, which we'll need for internal testing var unstable_yieldValue = Scheduler.unstable_yieldValue; var unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue; var rendererID = null; var injectedHook = null; var injectedProfilingHooks = null; var hasLoggedError = false; var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined'; function injectInternals(internals) { if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { // No DevTools return false; } var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; if (hook.isDisabled) { // This isn't a real property on the hook, but it can be set to opt out // of DevTools integration and associated warnings and logs. // https://github.com/facebook/react/issues/3877 return true; } if (!hook.supportsFiber) { { error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools'); } // DevTools exists, even though it doesn't support Fiber. return true; } try { if (enableSchedulingProfiler) { // Conditionally inject these hooks only if Timeline profiler is supported by this build. // This gives DevTools a way to feature detect that isn't tied to version number // (since profiling and timeline are controlled by different feature flags). internals = assign({}, internals, { getLaneLabelMap: getLaneLabelMap, injectProfilingHooks: injectProfilingHooks }); } rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks. injectedHook = hook; } catch (err) { // Catch all errors because it is unsafe to throw during initialization. { error('React instrumentation encountered an error: %s.', err); } } if (hook.checkDCE) { // This is the real DevTools. return true; } else { // This is likely a hook installed by Fast Refresh runtime. return false; } } function onScheduleRoot(root, children) { { if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') { try { injectedHook.onScheduleFiberRoot(rendererID, root, children); } catch (err) { if ( !hasLoggedError) { hasLoggedError = true; error('React instrumentation encountered an error: %s', err); } } } } } function onCommitRoot(root, eventPriority) { if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') { try { var didError = (root.current.flags & DidCapture) === DidCapture; if (enableProfilerTimer) { var schedulerPriority; switch (eventPriority) { case DiscreteEventPriority: schedulerPriority = ImmediatePriority; break; case ContinuousEventPriority: schedulerPriority = UserBlockingPriority; break; case DefaultEventPriority: schedulerPriority = NormalPriority; break; case IdleEventPriority: schedulerPriority = IdlePriority; break; default: schedulerPriority = NormalPriority; break; } injectedHook.onCommitFiberRoot(rendererID, root, schedulerPriority, didError); } else { injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError); } } catch (err) { { if (!hasLoggedError) { hasLoggedError = true; error('React instrumentation encountered an error: %s', err); } } } } } function onPostCommitRoot(root) { if (injectedHook && typeof injectedHook.onPostCommitFiberRoot === 'function') { try { injectedHook.onPostCommitFiberRoot(rendererID, root); } catch (err) { { if (!hasLoggedError) { hasLoggedError = true; error('React instrumentation encountered an error: %s', err); } } } } } function onCommitUnmount(fiber) { if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') { try { injectedHook.onCommitFiberUnmount(rendererID, fiber); } catch (err) { { if (!hasLoggedError) { hasLoggedError = true; error('React instrumentation encountered an error: %s', err); } } } } } function setIsStrictModeForDevtools(newIsStrictMode) { { if (typeof unstable_yieldValue === 'function') { // We're in a test because Scheduler.unstable_yieldValue only exists // in SchedulerMock. To reduce the noise in strict mode tests, // suppress warnings and disable scheduler yielding during the double render unstable_setDisableYieldValue(newIsStrictMode); setSuppressWarning(newIsStrictMode); } if (injectedHook && typeof injectedHook.setStrictMode === 'function') { try { injectedHook.setStrictMode(rendererID, newIsStrictMode); } catch (err) { { if (!hasLoggedError) { hasLoggedError = true; error('React instrumentation encountered an error: %s', err); } } } } } } // Profiler API hooks function injectProfilingHooks(profilingHooks) { injectedProfilingHooks = profilingHooks; } function getLaneLabelMap() { { var map = new Map(); var lane = 1; for (var index = 0; index < TotalLanes; index++) { var label = getLabelForLane(lane); map.set(lane, label); lane *= 2; } return map; } } function markCommitStarted(lanes) { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStarted === 'function') { injectedProfilingHooks.markCommitStarted(lanes); } } } function markCommitStopped() { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStopped === 'function') { injectedProfilingHooks.markCommitStopped(); } } } function markComponentRenderStarted(fiber) { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStarted === 'function') { injectedProfilingHooks.markComponentRenderStarted(fiber); } } } function markComponentRenderStopped() { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStopped === 'function') { injectedProfilingHooks.markComponentRenderStopped(); } } } function markComponentPassiveEffectMountStarted(fiber) { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted === 'function') { injectedProfilingHooks.markComponentPassiveEffectMountStarted(fiber); } } } function markComponentPassiveEffectMountStopped() { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped === 'function') { injectedProfilingHooks.markComponentPassiveEffectMountStopped(); } } } function markComponentPassiveEffectUnmountStarted(fiber) { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted === 'function') { injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(fiber); } } } function markComponentPassiveEffectUnmountStopped() { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped === 'function') { injectedProfilingHooks.markComponentPassiveEffectUnmountStopped(); } } } function markComponentLayoutEffectMountStarted(fiber) { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted === 'function') { injectedProfilingHooks.markComponentLayoutEffectMountStarted(fiber); } } } function markComponentLayoutEffectMountStopped() { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped === 'function') { injectedProfilingHooks.markComponentLayoutEffectMountStopped(); } } } function markComponentLayoutEffectUnmountStarted(fiber) { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted === 'function') { injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber); } } } function markComponentLayoutEffectUnmountStopped() { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped === 'function') { injectedProfilingHooks.markComponentLayoutEffectUnmountStopped(); } } } function markComponentErrored(fiber, thrownValue, lanes) { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentErrored === 'function') { injectedProfilingHooks.markComponentErrored(fiber, thrownValue, lanes); } } } function markComponentSuspended(fiber, wakeable, lanes) { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentSuspended === 'function') { injectedProfilingHooks.markComponentSuspended(fiber, wakeable, lanes); } } } function markLayoutEffectsStarted(lanes) { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStarted === 'function') { injectedProfilingHooks.markLayoutEffectsStarted(lanes); } } } function markLayoutEffectsStopped() { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStopped === 'function') { injectedProfilingHooks.markLayoutEffectsStopped(); } } } function markPassiveEffectsStarted(lanes) { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStarted === 'function') { injectedProfilingHooks.markPassiveEffectsStarted(lanes); } } } function markPassiveEffectsStopped() { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStopped === 'function') { injectedProfilingHooks.markPassiveEffectsStopped(); } } } function markRenderStarted(lanes) { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStarted === 'function') { injectedProfilingHooks.markRenderStarted(lanes); } } } function markRenderYielded() { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderYielded === 'function') { injectedProfilingHooks.markRenderYielded(); } } } function markRenderStopped() { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStopped === 'function') { injectedProfilingHooks.markRenderStopped(); } } } function markRenderScheduled(lane) { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderScheduled === 'function') { injectedProfilingHooks.markRenderScheduled(lane); } } } function markForceUpdateScheduled(fiber, lane) { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markForceUpdateScheduled === 'function') { injectedProfilingHooks.markForceUpdateScheduled(fiber, lane); } } } function markStateUpdateScheduled(fiber, lane) { { if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markStateUpdateScheduled === 'function') { injectedProfilingHooks.markStateUpdateScheduled(fiber, lane); } } } var NoMode = /* */ 0; // TODO: Remove ConcurrentMode by reading from the root tag instead var ConcurrentMode = /* */ 1; var ProfileMode = /* */ 2; var StrictLegacyMode = /* */ 8; var StrictEffectsMode = /* */ 16; // TODO: This is pretty well supported by browsers. Maybe we can drop it. var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros. // Based on: // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32 var log = Math.log; var LN2 = Math.LN2; function clz32Fallback(x) { var asUint = x >>> 0; if (asUint === 0) { return 32; } return 31 - (log(asUint) / LN2 | 0) | 0; } // If those values are changed that package should be rebuilt and redeployed. var TotalLanes = 31; var NoLanes = /* */ 0; var NoLane = /* */ 0; var SyncLane = /* */ 1; var InputContinuousHydrationLane = /* */ 2; var InputContinuousLane = /* */ 4; var DefaultHydrationLane = /* */ 8; var DefaultLane = /* */ 16; var TransitionHydrationLane = /* */ 32; var TransitionLanes = /* */ 4194240; var TransitionLane1 = /* */ 64; var TransitionLane2 = /* */ 128; var TransitionLane3 = /* */ 256; var TransitionLane4 = /* */ 512; var TransitionLane5 = /* */ 1024; var TransitionLane6 = /* */ 2048; var TransitionLane7 = /* */ 4096; var TransitionLane8 = /* */ 8192; var TransitionLane9 = /* */ 16384; var TransitionLane10 = /* */ 32768; var TransitionLane11 = /* */ 65536; var TransitionLane12 = /* */ 131072; var TransitionLane13 = /* */ 262144; var TransitionLane14 = /* */ 524288; var TransitionLane15 = /* */ 1048576; var TransitionLane16 = /* */ 2097152; var RetryLanes = /* */ 130023424; var RetryLane1 = /* */ 4194304; var RetryLane2 = /* */ 8388608; var RetryLane3 = /* */ 16777216; var RetryLane4 = /* */ 33554432; var RetryLane5 = /* */ 67108864; var SomeRetryLane = RetryLane1; var SelectiveHydrationLane = /* */ 134217728; var NonIdleLanes = /* */ 268435455; var IdleHydrationLane = /* */ 268435456; var IdleLane = /* */ 536870912; var OffscreenLane = /* */ 1073741824; // This function is used for the experimental timeline (react-devtools-timeline) // It should be kept in sync with the Lanes values above. function getLabelForLane(lane) { { if (lane & SyncLane) { return 'Sync'; } if (lane & InputContinuousHydrationLane) { return 'InputContinuousHydration'; } if (lane & InputContinuousLane) { return 'InputContinuous'; } if (lane & DefaultHydrationLane) { return 'DefaultHydration'; } if (lane & DefaultLane) { return 'Default'; } if (lane & TransitionHydrationLane) { return 'TransitionHydration'; } if (lane & TransitionLanes) { return 'Transition'; } if (lane & RetryLanes) { return 'Retry'; } if (lane & SelectiveHydrationLane) { return 'SelectiveHydration'; } if (lane & IdleHydrationLane) { return 'IdleHydration'; } if (lane & IdleLane) { return 'Idle'; } if (lane & OffscreenLane) { return 'Offscreen'; } } } var NoTimestamp = -1; var nextTransitionLane = TransitionLane1; var nextRetryLane = RetryLane1; function getHighestPriorityLanes(lanes) { switch (getHighestPriorityLane(lanes)) { case SyncLane: return SyncLane; case InputContinuousHydrationLane: return InputContinuousHydrationLane; case InputContinuousLane: return InputContinuousLane; case DefaultHydrationLane: return DefaultHydrationLane; case DefaultLane: return DefaultLane; case TransitionHydrationLane: return TransitionHydrationLane; case TransitionLane1: case TransitionLane2: case TransitionLane3: case TransitionLane4: case TransitionLane5: case TransitionLane6: case TransitionLane7: case TransitionLane8: case TransitionLane9: case TransitionLane10: case TransitionLane11: case TransitionLane12: case TransitionLane13: case TransitionLane14: case TransitionLane15: case TransitionLane16: return lanes & TransitionLanes; case RetryLane1: case RetryLane2: case RetryLane3: case RetryLane4: case RetryLane5: return lanes & RetryLanes; case SelectiveHydrationLane: return SelectiveHydrationLane; case IdleHydrationLane: return IdleHydrationLane; case IdleLane: return IdleLane; case OffscreenLane: return OffscreenLane; default: { error('Should have found matching lanes. This is a bug in React.'); } // This shouldn't be reachable, but as a fallback, return the entire bitmask. return lanes; } } function getNextLanes(root, wipLanes) { // Early bailout if there's no pending work left. var pendingLanes = root.pendingLanes; if (pendingLanes === NoLanes) { return NoLanes; } var nextLanes = NoLanes; var suspendedLanes = root.suspendedLanes; var pingedLanes = root.pingedLanes; // Do not work on any idle work until all the non-idle work has finished, // even if the work is suspended. var nonIdlePendingLanes = pendingLanes & NonIdleLanes; if (nonIdlePendingLanes !== NoLanes) { var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes; if (nonIdleUnblockedLanes !== NoLanes) { nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes); } else { var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes; if (nonIdlePingedLanes !== NoLanes) { nextLanes = getHighestPriorityLanes(nonIdlePingedLanes); } } } else { // The only remaining work is Idle. var unblockedLanes = pendingLanes & ~suspendedLanes; if (unblockedLanes !== NoLanes) { nextLanes = getHighestPriorityLanes(unblockedLanes); } else { if (pingedLanes !== NoLanes) { nextLanes = getHighestPriorityLanes(pingedLanes); } } } if (nextLanes === NoLanes) { // This should only be reachable if we're suspended // TODO: Consider warning in this path if a fallback timer is not scheduled. return NoLanes; } // If we're already in the middle of a render, switching lanes will interrupt // it and we'll lose our progress. We should only do this if the new lanes are // higher priority. if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't // bother waiting until the root is complete. (wipLanes & suspendedLanes) === NoLanes) { var nextLane = getHighestPriorityLane(nextLanes); var wipLane = getHighestPriorityLane(wipLanes); if ( // Tests whether the next lane is equal or lower priority than the wip // one. This works because the bits decrease in priority as you go left. nextLane >= wipLane || // Default priority updates should not interrupt transition updates. The // only difference between default updates and transition updates is that // default updates do not support refresh transitions. nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes) { // Keep working on the existing in-progress tree. Do not interrupt. return wipLanes; } } if ((nextLanes & InputContinuousLane) !== NoLanes) { // When updates are sync by default, we entangle continuous priority updates // and default updates, so they render in the same batch. The only reason // they use separate lanes is because continuous updates should interrupt // transitions, but default updates should not. nextLanes |= pendingLanes & DefaultLane; } // Check for entangled lanes and add them to the batch. // // A lane is said to be entangled with another when it's not allowed to render // in a batch that does not also include the other lane. Typically we do this // when multiple updates have the same source, and we only want to respond to // the most recent event from that source. // // Note that we apply entanglements *after* checking for partial work above. // This means that if a lane is entangled during an interleaved event while // it's already rendering, we won't interrupt it. This is intentional, since // entanglement is usually "best effort": we'll try our best to render the // lanes in the same batch, but it's not worth throwing out partially // completed work in order to do it. // TODO: Reconsider this. The counter-argument is that the partial work // represents an intermediate state, which we don't want to show to the user. // And by spending extra time finishing it, we're increasing the amount of // time it takes to show the final state, which is what they are actually // waiting for. // // For those exceptions where entanglement is semantically important, like // useMutableSource, we should ensure that there is no partial work at the // time we apply the entanglement. var entangledLanes = root.entangledLanes; if (entangledLanes !== NoLanes) { var entanglements = root.entanglements; var lanes = nextLanes & entangledLanes; while (lanes > 0) { var index = pickArbitraryLaneIndex(lanes); var lane = 1 << index; nextLanes |= entanglements[index]; lanes &= ~lane; } } return nextLanes; } function getMostRecentEventTime(root, lanes) { var eventTimes = root.eventTimes; var mostRecentEventTime = NoTimestamp; while (lanes > 0) { var index = pickArbitraryLaneIndex(lanes); var lane = 1 << index; var eventTime = eventTimes[index]; if (eventTime > mostRecentEventTime) { mostRecentEventTime = eventTime; } lanes &= ~lane; } return mostRecentEventTime; } function computeExpirationTime(lane, currentTime) { switch (lane) { case SyncLane: case InputContinuousHydrationLane: case InputContinuousLane: // User interactions should expire slightly more quickly. // // NOTE: This is set to the corresponding constant as in Scheduler.js. // When we made it larger, a product metric in www regressed, suggesting // there's a user interaction that's being starved by a series of // synchronous updates. If that theory is correct, the proper solution is // to fix the starvation. However, this scenario supports the idea that // expiration times are an important safeguard when starvation // does happen. return currentTime + 250; case DefaultHydrationLane: case DefaultLane: case TransitionHydrationLane: case TransitionLane1: case TransitionLane2: case TransitionLane3: case TransitionLane4: case TransitionLane5: case TransitionLane6: case TransitionLane7: case TransitionLane8: case TransitionLane9: case TransitionLane10: case TransitionLane11: case TransitionLane12: case TransitionLane13: case TransitionLane14: case TransitionLane15: case TransitionLane16: return currentTime + 5000; case RetryLane1: case RetryLane2: case RetryLane3: case RetryLane4: case RetryLane5: // TODO: Retries should be allowed to expire if they are CPU bound for // too long, but when I made this change it caused a spike in browser // crashes. There must be some other underlying bug; not super urgent but // ideally should figure out why and fix it. Unfortunately we don't have // a repro for the crashes, only detected via production metrics. return NoTimestamp; case SelectiveHydrationLane: case IdleHydrationLane: case IdleLane: case OffscreenLane: // Anything idle priority or lower should never expire. return NoTimestamp; default: { error('Should have found matching lanes. This is a bug in React.'); } return NoTimestamp; } } function markStarvedLanesAsExpired(root, currentTime) { // TODO: This gets called every time we yield. We can optimize by storing // the earliest expiration time on the root. Then use that to quickly bail out // of this function. var pendingLanes = root.pendingLanes; var suspendedLanes = root.suspendedLanes; var pingedLanes = root.pingedLanes; var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their // expiration time. If so, we'll assume the update is being starved and mark // it as expired to force it to finish. var lanes = pendingLanes; while (lanes > 0) { var index = pickArbitraryLaneIndex(lanes); var lane = 1 << index; var expirationTime = expirationTimes[index]; if (expirationTime === NoTimestamp) { // Found a pending lane with no expiration time. If it's not suspended, or // if it's pinged, assume it's CPU-bound. Compute a new expiration time // using the current time. if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) { // Assumes timestamps are monotonically increasing. expirationTimes[index] = computeExpirationTime(lane, currentTime); } } else if (expirationTime <= currentTime) { // This lane expired root.expiredLanes |= lane; } lanes &= ~lane; } } // This returns the highest priority pending lanes regardless of whether they // are suspended. function getHighestPriorityPendingLanes(root) { return getHighestPriorityLanes(root.pendingLanes); } function getLanesToRetrySynchronouslyOnError(root) { var everythingButOffscreen = root.pendingLanes & ~OffscreenLane; if (everythingButOffscreen !== NoLanes) { return everythingButOffscreen; } if (everythingButOffscreen & OffscreenLane) { return OffscreenLane; } return NoLanes; } function includesSyncLane(lanes) { return (lanes & SyncLane) !== NoLanes; } function includesNonIdleWork(lanes) { return (lanes & NonIdleLanes) !== NoLanes; } function includesOnlyRetries(lanes) { return (lanes & RetryLanes) === lanes; } function includesOnlyNonUrgentLanes(lanes) { var UrgentLanes = SyncLane | InputContinuousLane | DefaultLane; return (lanes & UrgentLanes) === NoLanes; } function includesOnlyTransitions(lanes) { return (lanes & TransitionLanes) === lanes; } function includesBlockingLane(root, lanes) { var SyncDefaultLanes = InputContinuousHydrationLane | InputContinuousLane | DefaultHydrationLane | DefaultLane; return (lanes & SyncDefaultLanes) !== NoLanes; } function includesExpiredLane(root, lanes) { // This is a separate check from includesBlockingLane because a lane can // expire after a render has already started. return (lanes & root.expiredLanes) !== NoLanes; } function isTransitionLane(lane) { return (lane & TransitionLanes) !== NoLanes; } function claimNextTransitionLane() { // Cycle through the lanes, assigning each new transition to the next lane. // In most cases, this means every transition gets its own lane, until we // run out of lanes and cycle back to the beginning. var lane = nextTransitionLane; nextTransitionLane <<= 1; if ((nextTransitionLane & TransitionLanes) === NoLanes) { nextTransitionLane = TransitionLane1; } return lane; } function claimNextRetryLane() { var lane = nextRetryLane; nextRetryLane <<= 1; if ((nextRetryLane & RetryLanes) === NoLanes) { nextRetryLane = RetryLane1; } return lane; } function getHighestPriorityLane(lanes) { return lanes & -lanes; } function pickArbitraryLane(lanes) { // This wrapper function gets inlined. Only exists so to communicate that it // doesn't matter which bit is selected; you can pick any bit without // affecting the algorithms where its used. Here I'm using // getHighestPriorityLane because it requires the fewest operations. return getHighestPriorityLane(lanes); } function pickArbitraryLaneIndex(lanes) { return 31 - clz32(lanes); } function laneToIndex(lane) { return pickArbitraryLaneIndex(lane); } function includesSomeLane(a, b) { return (a & b) !== NoLanes; } function isSubsetOfLanes(set, subset) { return (set & subset) === subset; } function mergeLanes(a, b) { return a | b; } function removeLanes(set, subset) { return set & ~subset; } function intersectLanes(a, b) { return a & b; } // Seems redundant, but it changes the type from a single lane (used for // updates) to a group of lanes (used for flushing work). function laneToLanes(lane) { return lane; } function higherPriorityLane(a, b) { // This works because the bit ranges decrease in priority as you go left. return a !== NoLane && a < b ? a : b; } function createLaneMap(initial) { // Intentionally pushing one by one. // https://v8.dev/blog/elements-kinds#avoid-creating-holes var laneMap = []; for (var i = 0; i < TotalLanes; i++) { laneMap.push(initial); } return laneMap; } function markRootUpdated(root, updateLane, eventTime) { root.pendingLanes |= updateLane; // If there are any suspended transitions, it's possible this new update // could unblock them. Clear the suspended lanes so that we can try rendering // them again. // // TODO: We really only need to unsuspend only lanes that are in the // `subtreeLanes` of the updated fiber, or the update lanes of the return // path. This would exclude suspended updates in an unrelated sibling tree, // since there's no way for this update to unblock it. // // We don't do this if the incoming update is idle, because we never process // idle updates until after all the regular updates have finished; there's no // way it could unblock a transition. if (updateLane !== IdleLane) { root.suspendedLanes = NoLanes; root.pingedLanes = NoLanes; } var eventTimes = root.eventTimes; var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most // recent event, and we assume time is monotonically increasing. eventTimes[index] = eventTime; } function markRootSuspended(root, suspendedLanes) { root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times. var expirationTimes = root.expirationTimes; var lanes = suspendedLanes; while (lanes > 0) { var index = pickArbitraryLaneIndex(lanes); var lane = 1 << index; expirationTimes[index] = NoTimestamp; lanes &= ~lane; } } function markRootPinged(root, pingedLanes, eventTime) { root.pingedLanes |= root.suspendedLanes & pingedLanes; } function markRootFinished(root, remainingLanes) { var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; root.pendingLanes = remainingLanes; // Let's try everything again root.suspendedLanes = NoLanes; root.pingedLanes = NoLanes; root.expiredLanes &= remainingLanes; root.mutableReadLanes &= remainingLanes; root.entangledLanes &= remainingLanes; var entanglements = root.entanglements; var eventTimes = root.eventTimes; var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work var lanes = noLongerPendingLanes; while (lanes > 0) { var index = pickArbitraryLaneIndex(lanes); var lane = 1 << index; entanglements[index] = NoLanes; eventTimes[index] = NoTimestamp; expirationTimes[index] = NoTimestamp; lanes &= ~lane; } } function markRootEntangled(root, entangledLanes) { // In addition to entangling each of the given lanes with each other, we also // have to consider _transitive_ entanglements. For each lane that is already // entangled with *any* of the given lanes, that lane is now transitively // entangled with *all* the given lanes. // // Translated: If C is entangled with A, then entangling A with B also // entangles C with B. // // If this is hard to grasp, it might help to intentionally break this // function and look at the tests that fail in ReactTransition-test.js. Try // commenting out one of the conditions below. var rootEntangledLanes = root.entangledLanes |= entangledLanes; var entanglements = root.entanglements; var lanes = rootEntangledLanes; while (lanes) { var index = pickArbitraryLaneIndex(lanes); var lane = 1 << index; if ( // Is this one of the newly entangled lanes? lane & entangledLanes | // Is this lane transitively entangled with the newly entangled lanes? entanglements[index] & entangledLanes) { entanglements[index] |= entangledLanes; } lanes &= ~lane; } } function getBumpedLaneForHydration(root, renderLanes) { var renderLane = getHighestPriorityLane(renderLanes); var lane; switch (renderLane) { case InputContinuousLane: lane = InputContinuousHydrationLane; break; case DefaultLane: lane = DefaultHydrationLane; break; case TransitionLane1: case TransitionLane2: case TransitionLane3: case TransitionLane4: case TransitionLane5: case TransitionLane6: case TransitionLane7: case TransitionLane8: case TransitionLane9: case TransitionLane10: case TransitionLane11: case TransitionLane12: case TransitionLane13: case TransitionLane14: case TransitionLane15: case TransitionLane16: case RetryLane1: case RetryLane2: case RetryLane3: case RetryLane4: case RetryLane5: lane = TransitionHydrationLane; break; case IdleLane: lane = IdleHydrationLane; break; default: // Everything else is already either a hydration lane, or shouldn't // be retried at a hydration lane. lane = NoLane; break; } // Check if the lane we chose is suspended. If so, that indicates that we // already attempted and failed to hydrate at that level. Also check if we're // already rendering that lane, which is rare but could happen. if ((lane & (root.suspendedLanes | renderLanes)) !== NoLane) { // Give up trying to hydrate and fall back to client render. return NoLane; } return lane; } function addFiberToLanesMap(root, fiber, lanes) { if (!isDevToolsPresent) { return; } var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap; while (lanes > 0) { var index = laneToIndex(lanes); var lane = 1 << index; var updaters = pendingUpdatersLaneMap[index]; updaters.add(fiber); lanes &= ~lane; } } function movePendingFibersToMemoized(root, lanes) { if (!isDevToolsPresent) { return; } var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap; var memoizedUpdaters = root.memoizedUpdaters; while (lanes > 0) { var index = laneToIndex(lanes); var lane = 1 << index; var updaters = pendingUpdatersLaneMap[index]; if (updaters.size > 0) { updaters.forEach(function (fiber) { var alternate = fiber.alternate; if (alternate === null || !memoizedUpdaters.has(alternate)) { memoizedUpdaters.add(fiber); } }); updaters.clear(); } lanes &= ~lane; } } function getTransitionsForLanes(root, lanes) { { return null; } } var DiscreteEventPriority = SyncLane; var ContinuousEventPriority = InputContinuousLane; var DefaultEventPriority = DefaultLane; var IdleEventPriority = IdleLane; var currentUpdatePriority = NoLane; function getCurrentUpdatePriority() { return currentUpdatePriority; } function setCurrentUpdatePriority(newPriority) { currentUpdatePriority = newPriority; } function runWithPriority(priority, fn) { var previousPriority = currentUpdatePriority; try { currentUpdatePriority = priority; return fn(); } finally { currentUpdatePriority = previousPriority; } } function higherEventPriority(a, b) { return a !== 0 && a < b ? a : b; } function lowerEventPriority(a, b) { return a === 0 || a > b ? a : b; } function isHigherEventPriority(a, b) { return a !== 0 && a < b; } function lanesToEventPriority(lanes) { var lane = getHighestPriorityLane(lanes); if (!isHigherEventPriority(DiscreteEventPriority, lane)) { return DiscreteEventPriority; } if (!isHigherEventPriority(ContinuousEventPriority, lane)) { return ContinuousEventPriority; } if (includesNonIdleWork(lane)) { return DefaultEventPriority; } return IdleEventPriority; } // This is imported by the event replaying implementation in React DOM. It's // in a separate file to break a circular dependency between the renderer and // the reconciler. function isRootDehydrated(root) { var currentState = root.current.memoizedState; return currentState.isDehydrated; } var _attemptSynchronousHydration; function setAttemptSynchronousHydration(fn) { _attemptSynchronousHydration = fn; } function attemptSynchronousHydration(fiber) { _attemptSynchronousHydration(fiber); } var attemptContinuousHydration; function setAttemptContinuousHydration(fn) { attemptContinuousHydration = fn; } var attemptHydrationAtCurrentPriority; function setAttemptHydrationAtCurrentPriority(fn) { attemptHydrationAtCurrentPriority = fn; } var getCurrentUpdatePriority$1; function setGetCurrentUpdatePriority(fn) { getCurrentUpdatePriority$1 = fn; } var attemptHydrationAtPriority; function setAttemptHydrationAtPriority(fn) { attemptHydrationAtPriority = fn; } // TODO: Upgrade this definition once we're on a newer version of Flow that // has this definition built-in. var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed. var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout. // if the last target was dehydrated. var queuedFocus = null; var queuedDrag = null; var queuedMouse = null; // For pointer events there can be one latest event per pointerId. var queuedPointers = new Map(); var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too. var queuedExplicitHydrationTargets = []; var discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase 'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit']; function isDiscreteEventThatRequiresHydration(eventType) { return discreteReplayableEvents.indexOf(eventType) > -1; } function createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) { return { blockedOn: blockedOn, domEventName: domEventName, eventSystemFlags: eventSystemFlags, nativeEvent: nativeEvent, targetContainers: [targetContainer] }; } function clearIfContinuousEvent(domEventName, nativeEvent) { switch (domEventName) { case 'focusin': case 'focusout': queuedFocus = null; break; case 'dragenter': case 'dragleave': queuedDrag = null; break; case 'mouseover': case 'mouseout': queuedMouse = null; break; case 'pointerover': case 'pointerout': { var pointerId = nativeEvent.pointerId; queuedPointers.delete(pointerId); break; } case 'gotpointercapture': case 'lostpointercapture': { var _pointerId = nativeEvent.pointerId; queuedPointerCaptures.delete(_pointerId); break; } } } function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) { if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) { var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent); if (blockedOn !== null) { var _fiber2 = getInstanceFromNode(blockedOn); if (_fiber2 !== null) { // Attempt to increase the priority of this target. attemptContinuousHydration(_fiber2); } } return queuedEvent; } // If we have already queued this exact event, then it's because // the different event systems have different DOM event listeners. // We can accumulate the flags, and the targetContainers, and // store a single event to be replayed. existingQueuedEvent.eventSystemFlags |= eventSystemFlags; var targetContainers = existingQueuedEvent.targetContainers; if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) { targetContainers.push(targetContainer); } return existingQueuedEvent; } function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) { // These set relatedTarget to null because the replayed event will be treated as if we // moved from outside the window (no target) onto the target once it hydrates. // Instead of mutating we could clone the event. switch (domEventName) { case 'focusin': { var focusEvent = nativeEvent; queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent); return true; } case 'dragenter': { var dragEvent = nativeEvent; queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent); return true; } case 'mouseover': { var mouseEvent = nativeEvent; queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent); return true; } case 'pointerover': { var pointerEvent = nativeEvent; var pointerId = pointerEvent.pointerId; queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent)); return true; } case 'gotpointercapture': { var _pointerEvent = nativeEvent; var _pointerId2 = _pointerEvent.pointerId; queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent)); return true; } } return false; } // Check if this target is unblocked. Returns true if it's unblocked. function attemptExplicitHydrationTarget(queuedTarget) { // TODO: This function shares a lot of logic with findInstanceBlockingEvent. // Try to unify them. It's a bit tricky since it would require two return // values. var targetInst = getClosestInstanceFromNode(queuedTarget.target); if (targetInst !== null) { var nearestMounted = getNearestMountedFiber(targetInst); if (nearestMounted !== null) { var tag = nearestMounted.tag; if (tag === SuspenseComponent) { var instance = getSuspenseInstanceFromFiber(nearestMounted); if (instance !== null) { // We're blocked on hydrating this boundary. // Increase its priority. queuedTarget.blockedOn = instance; attemptHydrationAtPriority(queuedTarget.priority, function () { attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if (tag === HostRoot) { var root = nearestMounted.stateNode; if (isRootDehydrated(root)) { queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of // a root other than sync. return; } } } } queuedTarget.blockedOn = null; } function queueExplicitHydrationTarget(target) { // TODO: This will read the priority if it's dispatched by the React // event system but not native events. Should read window.event.type, like // we do for updates (getCurrentEventPriority). var updatePriority = getCurrentUpdatePriority$1(); var queuedTarget = { blockedOn: null, target: target, priority: updatePriority }; var i = 0; for (; i < queuedExplicitHydrationTargets.length; i++) { // Stop once we hit the first target with lower priority than if (!isHigherEventPriority(updatePriority, queuedExplicitHydrationTargets[i].priority)) { break; } } queuedExplicitHydrationTargets.splice(i, 0, queuedTarget); if (i === 0) { attemptExplicitHydrationTarget(queuedTarget); } } function attemptReplayContinuousQueuedEvent(queuedEvent) { if (queuedEvent.blockedOn !== null) { return false; } var targetContainers = queuedEvent.targetContainers; while (targetContainers.length > 0) { var targetContainer = targetContainers[0]; var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent); if (nextBlockedOn === null) { { var nativeEvent = queuedEvent.nativeEvent; var nativeEventClone = new nativeEvent.constructor(nativeEvent.type, nativeEvent); setReplayingEvent(nativeEventClone); nativeEvent.target.dispatchEvent(nativeEventClone); resetReplayingEvent(); } } else { // We're still blocked. Try again later. var _fiber3 = getInstanceFromNode(nextBlockedOn); if (_fiber3 !== null) { attemptContinuousHydration(_fiber3); } queuedEvent.blockedOn = nextBlockedOn; return false; } // This target container was successfully dispatched. Try the next. targetContainers.shift(); } return true; } function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) { if (attemptReplayContinuousQueuedEvent(queuedEvent)) { map.delete(key); } } function replayUnblockedEvents() { hasScheduledReplayAttempt = false; if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) { queuedFocus = null; } if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) { queuedDrag = null; } if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) { queuedMouse = null; } queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap); queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap); } function scheduleCallbackIfUnblocked(queuedEvent, unblocked) { if (queuedEvent.blockedOn === unblocked) { queuedEvent.blockedOn = null; if (!hasScheduledReplayAttempt) { hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are // now unblocked. This first might not actually be unblocked yet. // We could check it early to avoid scheduling an unnecessary callback. Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents); } } } function retryIfBlockedOn(unblocked) { // Mark anything that was blocked on this as no longer blocked // and eligible for a replay. if (queuedDiscreteEvents.length > 0) { scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's // worth it because we expect very few discrete events to queue up and once // we are actually fully unblocked it will be fast to replay them. for (var i = 1; i < queuedDiscreteEvents.length; i++) { var queuedEvent = queuedDiscreteEvents[i]; if (queuedEvent.blockedOn === unblocked) { queuedEvent.blockedOn = null; } } } if (queuedFocus !== null) { scheduleCallbackIfUnblocked(queuedFocus, unblocked); } if (queuedDrag !== null) { scheduleCallbackIfUnblocked(queuedDrag, unblocked); } if (queuedMouse !== null) { scheduleCallbackIfUnblocked(queuedMouse, unblocked); } var unblock = function (queuedEvent) { return scheduleCallbackIfUnblocked(queuedEvent, unblocked); }; queuedPointers.forEach(unblock); queuedPointerCaptures.forEach(unblock); for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) { var queuedTarget = queuedExplicitHydrationTargets[_i]; if (queuedTarget.blockedOn === unblocked) { queuedTarget.blockedOn = null; } } while (queuedExplicitHydrationTargets.length > 0) { var nextExplicitTarget = queuedExplicitHydrationTargets[0]; if (nextExplicitTarget.blockedOn !== null) { // We're still blocked. break; } else { attemptExplicitHydrationTarget(nextExplicitTarget); if (nextExplicitTarget.blockedOn === null) { // We're unblocked. queuedExplicitHydrationTargets.shift(); } } } } var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; // TODO: can we stop exporting these? var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra. // We'd like to remove this but it's not clear if this is safe. function setEnabled(enabled) { _enabled = !!enabled; } function isEnabled() { return _enabled; } function createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) { var eventPriority = getEventPriority(domEventName); var listenerWrapper; switch (eventPriority) { case DiscreteEventPriority: listenerWrapper = dispatchDiscreteEvent; break; case ContinuousEventPriority: listenerWrapper = dispatchContinuousEvent; break; case DefaultEventPriority: default: listenerWrapper = dispatchEvent; break; } return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer); } function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) { var previousPriority = getCurrentUpdatePriority(); var prevTransition = ReactCurrentBatchConfig.transition; ReactCurrentBatchConfig.transition = null; try { setCurrentUpdatePriority(DiscreteEventPriority); dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { setCurrentUpdatePriority(previousPriority); ReactCurrentBatchConfig.transition = prevTransition; } } function dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) { var previousPriority = getCurrentUpdatePriority(); var prevTransition = ReactCurrentBatchConfig.transition; ReactCurrentBatchConfig.transition = null; try { setCurrentUpdatePriority(ContinuousEventPriority); dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { setCurrentUpdatePriority(previousPriority); ReactCurrentBatchConfig.transition = prevTransition; } } function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) { if (!_enabled) { return; } { dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent); } } function dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent) { var blockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent); if (blockedOn === null) { dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer); clearIfContinuousEvent(domEventName, nativeEvent); return; } if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) { nativeEvent.stopPropagation(); return; } // We need to clear only if we didn't queue because // queueing is accumulative. clearIfContinuousEvent(domEventName, nativeEvent); if (eventSystemFlags & IS_CAPTURE_PHASE && isDiscreteEventThatRequiresHydration(domEventName)) { while (blockedOn !== null) { var fiber = getInstanceFromNode(blockedOn); if (fiber !== null) { attemptSynchronousHydration(fiber); } var nextBlockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent); if (nextBlockedOn === null) { dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer); } if (nextBlockedOn === blockedOn) { break; } blockedOn = nextBlockedOn; } if (blockedOn !== null) { nativeEvent.stopPropagation(); } return; } // This is not replayable so we'll invoke it but without a target, // in case the event system needs to trace it. dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer); } var return_targetInst = null; // Returns a SuspenseInstance or Container if it's blocked. // The return_targetInst field above is conceptually part of the return value. function findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) { // TODO: Warn if _enabled is false. return_targetInst = null; var nativeEventTarget = getEventTarget(nativeEvent); var targetInst = getClosestInstanceFromNode(nativeEventTarget); if (targetInst !== null) { var nearestMounted = getNearestMountedFiber(targetInst); if (nearestMounted === null) { // This tree has been unmounted already. Dispatch without a target. targetInst = null; } else { var tag = nearestMounted.tag; if (tag === SuspenseComponent) { var instance = getSuspenseInstanceFromFiber(nearestMounted); if (instance !== null) { // Queue the event to be replayed later. Abort dispatching since we // don't want this event dispatched twice through the event system. // TODO: If this is the first discrete event in the queue. Schedule an increased // priority for this boundary. return instance; } // This shouldn't happen, something went wrong but to avoid blocking // the whole system, dispatch the event without a target. // TODO: Warn. targetInst = null; } else if (tag === HostRoot) { var root = nearestMounted.stateNode; if (isRootDehydrated(root)) { // If this happens during a replay something went wrong and it might block // the whole system. return getContainerFromFiber(nearestMounted); } targetInst = null; } else if (nearestMounted !== targetInst) { // If we get an event (ex: img onload) before committing that // component's mount, ignore it for now (that is, treat it as if it was an // event on a non-React tree). We might also consider queueing events and // dispatching them after the mount. targetInst = null; } } } return_targetInst = targetInst; // We're not blocked on anything. return null; } function getEventPriority(domEventName) { switch (domEventName) { // Used by SimpleEventPlugin: case 'cancel': case 'click': case 'close': case 'contextmenu': case 'copy': case 'cut': case 'auxclick': case 'dblclick': case 'dragend': case 'dragstart': case 'drop': case 'focusin': case 'focusout': case 'input': case 'invalid': case 'keydown': case 'keypress': case 'keyup': case 'mousedown': case 'mouseup': case 'paste': case 'pause': case 'play': case 'pointercancel': case 'pointerdown': case 'pointerup': case 'ratechange': case 'reset': case 'resize': case 'seeked': case 'submit': case 'touchcancel': case 'touchend': case 'touchstart': case 'volumechange': // Used by polyfills: // eslint-disable-next-line no-fallthrough case 'change': case 'selectionchange': case 'textInput': case 'compositionstart': case 'compositionend': case 'compositionupdate': // Only enableCreateEventHandleAPI: // eslint-disable-next-line no-fallthrough case 'beforeblur': case 'afterblur': // Not used by React but could be by user code: // eslint-disable-next-line no-fallthrough case 'beforeinput': case 'blur': case 'fullscreenchange': case 'focus': case 'hashchange': case 'popstate': case 'select': case 'selectstart': return DiscreteEventPriority; case 'drag': case 'dragenter': case 'dragexit': case 'dragleave': case 'dragover': case 'mousemove': case 'mouseout': case 'mouseover': case 'pointermove': case 'pointerout': case 'pointerover': case 'scroll': case 'toggle': case 'touchmove': case 'wheel': // Not used by React but could be by user code: // eslint-disable-next-line no-fallthrough case 'mouseenter': case 'mouseleave': case 'pointerenter': case 'pointerleave': return ContinuousEventPriority; case 'message': { // We might be in the Scheduler callback. // Eventually this mechanism will be replaced by a check // of the current priority on the native scheduler. var schedulerPriority = getCurrentPriorityLevel(); switch (schedulerPriority) { case ImmediatePriority: return DiscreteEventPriority; case UserBlockingPriority: return ContinuousEventPriority; case NormalPriority: case LowPriority: // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration. return DefaultEventPriority; case IdlePriority: return IdleEventPriority; default: return DefaultEventPriority; } } default: return DefaultEventPriority; } } function addEventBubbleListener(target, eventType, listener) { target.addEventListener(eventType, listener, false); return listener; } function addEventCaptureListener(target, eventType, listener) { target.addEventListener(eventType, listener, true); return listener; } function addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) { target.addEventListener(eventType, listener, { capture: true, passive: passive }); return listener; } function addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) { target.addEventListener(eventType, listener, { passive: passive }); return listener; } /** * These variables store information about text content of a target node, * allowing comparison of content before and after a given event. * * Identify the node where selection currently begins, then observe * both its text content and its current position in the DOM. Since the * browser may natively replace the target node during composition, we can * use its position to find its replacement. * * */ var root = null; var startText = null; var fallbackText = null; function initialize(nativeEventTarget) { root = nativeEventTarget; startText = getText(); return true; } function reset() { root = null; startText = null; fallbackText = null; } function getData() { if (fallbackText) { return fallbackText; } var start; var startValue = startText; var startLength = startValue.length; var end; var endValue = getText(); var endLength = endValue.length; for (start = 0; start < startLength; start++) { if (startValue[start] !== endValue[start]) { break; } } var minEnd = startLength - start; for (end = 1; end <= minEnd; end++) { if (startValue[startLength - end] !== endValue[endLength - end]) { break; } } var sliceTail = end > 1 ? 1 - end : undefined; fallbackText = endValue.slice(start, sliceTail); return fallbackText; } function getText() { if ('value' in root) { return root.value; } return root.textContent; } /** * `charCode` represents the actual "character code" and is safe to use with * `String.fromCharCode`. As such, only keys that correspond to printable * characters produce a valid `charCode`, the only exception to this is Enter. * The Tab-key is considered non-printable and does not have a `charCode`, * presumably because it does not produce a tab-character in browsers. * * @param {object} nativeEvent Native browser event. * @return {number} Normalized `charCode` property. */ function getEventCharCode(nativeEvent) { var charCode; var keyCode = nativeEvent.keyCode; if ('charCode' in nativeEvent) { charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`. if (charCode === 0 && keyCode === 13) { charCode = 13; } } else { // IE8 does not implement `charCode`, but `keyCode` has the correct value. charCode = keyCode; } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux) // report Enter as charCode 10 when ctrl is pressed. if (charCode === 10) { charCode = 13; } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. // Must not discard the (non-)printable Enter-key. if (charCode >= 32 || charCode === 13) { return charCode; } return 0; } function functionThatReturnsTrue() { return true; } function functionThatReturnsFalse() { return false; } // This is intentionally a factory so that we have different returned constructors. // If we had a single constructor, it would be megamorphic and engines would deopt. function createSyntheticEvent(Interface) { /** * Synthetic events are dispatched by event plugins, typically in response to a * top-level event delegation handler. * * These systems should generally use pooling to reduce the frequency of garbage * collection. The system should check `isPersistent` to determine whether the * event should be released into the pool after being dispatched. Users that * need a persisted event should invoke `persist`. * * Synthetic events (and subclasses) implement the DOM Level 3 Events API by * normalizing browser quirks. Subclasses do not necessarily have to implement a * DOM interface; custom application-specific events can also subclass this. */ function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) { this._reactName = reactName; this._targetInst = targetInst; this.type = reactEventType; this.nativeEvent = nativeEvent; this.target = nativeEventTarget; this.currentTarget = null; for (var _propName in Interface) { if (!Interface.hasOwnProperty(_propName)) { continue; } var normalize = Interface[_propName]; if (normalize) { this[_propName] = normalize(nativeEvent); } else { this[_propName] = nativeEvent[_propName]; } } var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false; if (defaultPrevented) { this.isDefaultPrevented = functionThatReturnsTrue; } else { this.isDefaultPrevented = functionThatReturnsFalse; } this.isPropagationStopped = functionThatReturnsFalse; return this; } assign(SyntheticBaseEvent.prototype, { preventDefault: function () { this.defaultPrevented = true; var event = this.nativeEvent; if (!event) { return; } if (event.preventDefault) { event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE } else if (typeof event.returnValue !== 'unknown') { event.returnValue = false; } this.isDefaultPrevented = functionThatReturnsTrue; }, stopPropagation: function () { var event = this.nativeEvent; if (!event) { return; } if (event.stopPropagation) { event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE } else if (typeof event.cancelBubble !== 'unknown') { // The ChangeEventPlugin registers a "propertychange" event for // IE. This event does not support bubbling or cancelling, and // any references to cancelBubble throw "Member not found". A // typeof check of "unknown" circumvents this issue (and is also // IE specific). event.cancelBubble = true; } this.isPropagationStopped = functionThatReturnsTrue; }, /** * We release all dispatched `SyntheticEvent`s after each event loop, adding * them back into the pool. This allows a way to hold onto a reference that * won't be added back into the pool. */ persist: function () {// Modern event system doesn't use pooling. }, /** * Checks if this event should be released back into the pool. * * @return {boolean} True if this should not be released, false otherwise. */ isPersistent: functionThatReturnsTrue }); return SyntheticBaseEvent; } /** * @interface Event * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ var EventInterface = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function (event) { return event.timeStamp || Date.now(); }, defaultPrevented: 0, isTrusted: 0 }; var SyntheticEvent = createSyntheticEvent(EventInterface); var UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }); var SyntheticUIEvent = createSyntheticEvent(UIEventInterface); var lastMovementX; var lastMovementY; var lastMouseEvent; function updateMouseMovementPolyfillState(event) { if (event !== lastMouseEvent) { if (lastMouseEvent && event.type === 'mousemove') { lastMovementX = event.screenX - lastMouseEvent.screenX; lastMovementY = event.screenY - lastMouseEvent.screenY; } else { lastMovementX = 0; lastMovementY = 0; } lastMouseEvent = event; } } /** * @interface MouseEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ var MouseEventInterface = assign({}, UIEventInterface, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: getEventModifierState, button: 0, buttons: 0, relatedTarget: function (event) { if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement; return event.relatedTarget; }, movementX: function (event) { if ('movementX' in event) { return event.movementX; } updateMouseMovementPolyfillState(event); return lastMovementX; }, movementY: function (event) { if ('movementY' in event) { return event.movementY; } // Don't need to call updateMouseMovementPolyfillState() here // because it's guaranteed to have already run when movementX // was copied. return lastMovementY; } }); var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface); /** * @interface DragEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ var DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }); var SyntheticDragEvent = createSyntheticEvent(DragEventInterface); /** * @interface FocusEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ var FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }); var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface); /** * @interface Event * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent */ var AnimationEventInterface = assign({}, EventInterface, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }); var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface); /** * @interface Event * @see http://www.w3.org/TR/clipboard-apis/ */ var ClipboardEventInterface = assign({}, EventInterface, { clipboardData: function (event) { return 'clipboardData' in event ? event.clipboardData : window.clipboardData; } }); var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface); /** * @interface Event * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents */ var CompositionEventInterface = assign({}, EventInterface, { data: 0 }); var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface); /** * @interface Event * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 * /#events-inputevents */ // Happens to share the same list for now. var SyntheticInputEvent = SyntheticCompositionEvent; /** * Normalization of deprecated HTML5 `key` values * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names */ var normalizeKey = { Esc: 'Escape', Spacebar: ' ', Left: 'ArrowLeft', Up: 'ArrowUp', Right: 'ArrowRight', Down: 'ArrowDown', Del: 'Delete', Win: 'OS', Menu: 'ContextMenu', Apps: 'ContextMenu', Scroll: 'ScrollLock', MozPrintableKey: 'Unidentified' }; /** * Translation from legacy `keyCode` to HTML5 `key` * Only special keys supported, all others depend on keyboard layout or browser * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names */ var translateToKey = { '8': 'Backspace', '9': 'Tab', '12': 'Clear', '13': 'Enter', '16': 'Shift', '17': 'Control', '18': 'Alt', '19': 'Pause', '20': 'CapsLock', '27': 'Escape', '32': ' ', '33': 'PageUp', '34': 'PageDown', '35': 'End', '36': 'Home', '37': 'ArrowLeft', '38': 'ArrowUp', '39': 'ArrowRight', '40': 'ArrowDown', '45': 'Insert', '46': 'Delete', '112': 'F1', '113': 'F2', '114': 'F3', '115': 'F4', '116': 'F5', '117': 'F6', '118': 'F7', '119': 'F8', '120': 'F9', '121': 'F10', '122': 'F11', '123': 'F12', '144': 'NumLock', '145': 'ScrollLock', '224': 'Meta' }; /** * @param {object} nativeEvent Native browser event. * @return {string} Normalized `key` property. */ function getEventKey(nativeEvent) { if (nativeEvent.key) { // Normalize inconsistent values reported by browsers due to // implementations of a working draft specification. // FireFox implements `key` but returns `MozPrintableKey` for all // printable characters (normalized to `Unidentified`), ignore it. var key = normalizeKey[nativeEvent.key] || nativeEvent.key; if (key !== 'Unidentified') { return key; } } // Browser does not implement `key`, polyfill as much of it as we can. if (nativeEvent.type === 'keypress') { var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can // thus be captured by `keypress`, no other non-printable key should. return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); } if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { // While user keyboard layout determines the actual meaning of each // `keyCode` value, almost all function keys have a universal value. return translateToKey[nativeEvent.keyCode] || 'Unidentified'; } return ''; } /** * Translation from modifier key to the associated property in the event. * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers */ var modifierKeyToProp = { Alt: 'altKey', Control: 'ctrlKey', Meta: 'metaKey', Shift: 'shiftKey' }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support // getModifierState. If getModifierState is not supported, we map it to a set of // modifier keys exposed by the event. In this case, Lock-keys are not supported. function modifierStateGetter(keyArg) { var syntheticEvent = this; var nativeEvent = syntheticEvent.nativeEvent; if (nativeEvent.getModifierState) { return nativeEvent.getModifierState(keyArg); } var keyProp = modifierKeyToProp[keyArg]; return keyProp ? !!nativeEvent[keyProp] : false; } function getEventModifierState(nativeEvent) { return modifierStateGetter; } /** * @interface KeyboardEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ var KeyboardEventInterface = assign({}, UIEventInterface, { key: getEventKey, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: getEventModifierState, // Legacy Interface charCode: function (event) { // `charCode` is the result of a KeyPress event and represents the value of // the actual printable character. // KeyPress is deprecated, but its replacement is not yet final and not // implemented in any major browser. Only KeyPress has charCode. if (event.type === 'keypress') { return getEventCharCode(event); } return 0; }, keyCode: function (event) { // `keyCode` is the result of a KeyDown/Up event and represents the value of // physical keyboard key. // The actual meaning of the value depends on the users' keyboard layout // which cannot be detected. Assuming that it is a US keyboard layout // provides a surprisingly accurate mapping for US and European users. // Due to this, it is left to the user to implement at this time. if (event.type === 'keydown' || event.type === 'keyup') { return event.keyCode; } return 0; }, which: function (event) { // `which` is an alias for either `keyCode` or `charCode` depending on the // type of the event. if (event.type === 'keypress') { return getEventCharCode(event); } if (event.type === 'keydown' || event.type === 'keyup') { return event.keyCode; } return 0; } }); var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface); /** * @interface PointerEvent * @see http://www.w3.org/TR/pointerevents/ */ var PointerEventInterface = assign({}, MouseEventInterface, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }); var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface); /** * @interface TouchEvent * @see http://www.w3.org/TR/touch-events/ */ var TouchEventInterface = assign({}, UIEventInterface, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: getEventModifierState }); var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface); /** * @interface Event * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent */ var TransitionEventInterface = assign({}, EventInterface, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }); var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface); /** * @interface WheelEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ var WheelEventInterface = assign({}, MouseEventInterface, { deltaX: function (event) { return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). 'wheelDeltaX' in event ? -event.wheelDeltaX : 0; }, deltaY: function (event) { return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). 'wheelDelta' in event ? -event.wheelDelta : 0; }, deltaZ: 0, // Browsers without "deltaMode" is reporting in raw wheel delta where one // notch on the scroll is always +/- 120, roughly equivalent to pixels. // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. deltaMode: 0 }); var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface); var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space var START_KEYCODE = 229; var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window; var documentMode = null; if (canUseDOM && 'documentMode' in document) { documentMode = document.documentMode; } // Webkit offers a very useful `textInput` event that can be used to // directly represent `beforeInput`. The IE `textinput` event is not as // useful, so we don't use it. var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied // by the native compositionend event may be incorrect. Japanese ideographic // spaces, for instance (\u3000) are not recorded correctly. var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); var SPACEBAR_CODE = 32; var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); function registerEvents() { registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']); registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']); registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']); registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']); } // Track whether we've ever handled a keypress on the space key. var hasSpaceKeypress = false; /** * Return whether a native keypress event is assumed to be a command. * This is required because Firefox fires `keypress` events for key commands * (cut, copy, select-all, etc.) even though no character is inserted. */ function isKeypressCommand(nativeEvent) { return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command. !(nativeEvent.ctrlKey && nativeEvent.altKey); } /** * Translate native top level events into event types. */ function getCompositionEventType(domEventName) { switch (domEventName) { case 'compositionstart': return 'onCompositionStart'; case 'compositionend': return 'onCompositionEnd'; case 'compositionupdate': return 'onCompositionUpdate'; } } /** * Does our fallback best-guess model think this event signifies that * composition has begun? */ function isFallbackCompositionStart(domEventName, nativeEvent) { return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE; } /** * Does our fallback mode think that this event is the end of composition? */ function isFallbackCompositionEnd(domEventName, nativeEvent) { switch (domEventName) { case 'keyup': // Command keys insert or clear IME input. return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; case 'keydown': // Expect IME keyCode on each keydown. If we get any other // code we must have exited earlier. return nativeEvent.keyCode !== START_KEYCODE; case 'keypress': case 'mousedown': case 'focusout': // Events are not possible without cancelling IME. return true; default: return false; } } /** * Google Input Tools provides composition data via a CustomEvent, * with the `data` property populated in the `detail` object. If this * is available on the event object, use it. If not, this is a plain * composition event and we have nothing special to extract. * * @param {object} nativeEvent * @return {?string} */ function getDataFromCustomEvent(nativeEvent) { var detail = nativeEvent.detail; if (typeof detail === 'object' && 'data' in detail) { return detail.data; } return null; } /** * Check if a composition event was triggered by Korean IME. * Our fallback mode does not work well with IE's Korean IME, * so just use native composition events when Korean IME is used. * Although CompositionEvent.locale property is deprecated, * it is available in IE, where our fallback mode is enabled. * * @param {object} nativeEvent * @return {boolean} */ function isUsingKoreanIME(nativeEvent) { return nativeEvent.locale === 'ko'; } // Track the current IME composition status, if any. var isComposing = false; /** * @return {?object} A SyntheticCompositionEvent. */ function extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) { var eventType; var fallbackData; if (canUseCompositionEvent) { eventType = getCompositionEventType(domEventName); } else if (!isComposing) { if (isFallbackCompositionStart(domEventName, nativeEvent)) { eventType = 'onCompositionStart'; } } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) { eventType = 'onCompositionEnd'; } if (!eventType) { return null; } if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) { // The current composition is stored statically and must not be // overwritten while composition continues. if (!isComposing && eventType === 'onCompositionStart') { isComposing = initialize(nativeEventTarget); } else if (eventType === 'onCompositionEnd') { if (isComposing) { fallbackData = getData(); } } } var listeners = accumulateTwoPhaseListeners(targetInst, eventType); if (listeners.length > 0) { var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget); dispatchQueue.push({ event: event, listeners: listeners }); if (fallbackData) { // Inject data generated from fallback path into the synthetic event. // This matches the property of native CompositionEventInterface. event.data = fallbackData; } else { var customData = getDataFromCustomEvent(nativeEvent); if (customData !== null) { event.data = customData; } } } } function getNativeBeforeInputChars(domEventName, nativeEvent) { switch (domEventName) { case 'compositionend': return getDataFromCustomEvent(nativeEvent); case 'keypress': /** * If native `textInput` events are available, our goal is to make * use of them. However, there is a special case: the spacebar key. * In Webkit, preventing default on a spacebar `textInput` event * cancels character insertion, but it *also* causes the browser * to fall back to its default spacebar behavior of scrolling the * page. * * Tracking at: * https://code.google.com/p/chromium/issues/detail?id=355103 * * To avoid this issue, use the keypress event as if no `textInput` * event is available. */ var which = nativeEvent.which; if (which !== SPACEBAR_CODE) { return null; } hasSpaceKeypress = true; return SPACEBAR_CHAR; case 'textInput': // Record the characters to be added to the DOM. var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled // it at the keypress level and bail immediately. Android Chrome // doesn't give us keycodes, so we need to ignore it. if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { return null; } return chars; default: // For other native event types, do nothing. return null; } } /** * For browsers that do not provide the `textInput` event, extract the * appropriate string to use for SyntheticInputEvent. */ function getFallbackBeforeInputChars(domEventName, nativeEvent) { // If we are currently composing (IME) and using a fallback to do so, // try to extract the composed characters from the fallback object. // If composition event is available, we extract a string only at // compositionevent, otherwise extract it at fallback events. if (isComposing) { if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) { var chars = getData(); reset(); isComposing = false; return chars; } return null; } switch (domEventName) { case 'paste': // If a paste event occurs after a keypress, throw out the input // chars. Paste events should not lead to BeforeInput events. return null; case 'keypress': /** * As of v27, Firefox may fire keypress events even when no character * will be inserted. A few possibilities: * * - `which` is `0`. Arrow keys, Esc key, etc. * * - `which` is the pressed key code, but no char is available. * Ex: 'AltGr + d` in Polish. There is no modified character for * this key combination and no character is inserted into the * document, but FF fires the keypress for char code `100` anyway. * No `input` event will occur. * * - `which` is the pressed key code, but a command combination is * being used. Ex: `Cmd+C`. No character is inserted, and no * `input` event will occur. */ if (!isKeypressCommand(nativeEvent)) { // IE fires the `keypress` event when a user types an emoji via // Touch keyboard of Windows. In such a case, the `char` property // holds an emoji character like `\uD83D\uDE0A`. Because its length // is 2, the property `which` does not represent an emoji correctly. // In such a case, we directly return the `char` property instead of // using `which`. if (nativeEvent.char && nativeEvent.char.length > 1) { return nativeEvent.char; } else if (nativeEvent.which) { return String.fromCharCode(nativeEvent.which); } } return null; case 'compositionend': return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data; default: return null; } } /** * Extract a SyntheticInputEvent for `beforeInput`, based on either native * `textInput` or fallback behavior. * * @return {?object} A SyntheticInputEvent. */ function extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) { var chars; if (canUseTextInputEvent) { chars = getNativeBeforeInputChars(domEventName, nativeEvent); } else { chars = getFallbackBeforeInputChars(domEventName, nativeEvent); } // If no characters are being inserted, no BeforeInput event should // be fired. if (!chars) { return null; } var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput'); if (listeners.length > 0) { var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget); dispatchQueue.push({ event: event, listeners: listeners }); event.data = chars; } } /** * Create an `onBeforeInput` event to match * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. * * This event plugin is based on the native `textInput` event * available in Chrome, Safari, Opera, and IE. This event fires after * `onKeyPress` and `onCompositionEnd`, but before `onInput`. * * `beforeInput` is spec'd but not implemented in any browsers, and * the `input` event does not provide any useful information about what has * actually been added, contrary to the spec. Thus, `textInput` is the best * available event to identify the characters that have actually been inserted * into the target node. * * This plugin is also responsible for emitting `composition` events, thus * allowing us to share composition fallback code for both `beforeInput` and * `composition` event types. */ function extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) { extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget); extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget); } /** * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary */ var supportedInputTypes = { color: true, date: true, datetime: true, 'datetime-local': true, email: true, month: true, number: true, password: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true }; function isTextInputElement(elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); if (nodeName === 'input') { return !!supportedInputTypes[elem.type]; } if (nodeName === 'textarea') { return true; } return false; } /** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */ function isEventSupported(eventNameSuffix) { if (!canUseDOM) { return false; } var eventName = 'on' + eventNameSuffix; var isSupported = (eventName in document); if (!isSupported) { var element = document.createElement('div'); element.setAttribute(eventName, 'return;'); isSupported = typeof element[eventName] === 'function'; } return isSupported; } function registerEvents$1() { registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']); } function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) { // Flag this event loop as needing state restore. enqueueStateRestore(target); var listeners = accumulateTwoPhaseListeners(inst, 'onChange'); if (listeners.length > 0) { var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target); dispatchQueue.push({ event: event, listeners: listeners }); } } /** * For IE shims */ var activeElement = null; var activeElementInst = null; /** * SECTION: handle `change` event */ function shouldUseChangeEvent(elem) { var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; } function manualDispatchChangeEvent(nativeEvent) { var dispatchQueue = []; createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the // other events and have it go through ReactBrowserEventEmitter. Since it // doesn't, we manually listen for the events and so we have to enqueue and // process the abstract event manually. // // Batching is necessary here in order to ensure that all event handlers run // before the next rerender (including event handlers attached to ancestor // elements instead of directly on the input). Without this, controlled // components don't work properly in conjunction with event bubbling because // the component is rerendered and the value reverted before all the event // handlers can run. See https://github.com/facebook/react/issues/708. batchedUpdates(runEventInBatch, dispatchQueue); } function runEventInBatch(dispatchQueue) { processDispatchQueue(dispatchQueue, 0); } function getInstIfValueChanged(targetInst) { var targetNode = getNodeFromInstance(targetInst); if (updateValueIfChanged(targetNode)) { return targetInst; } } function getTargetInstForChangeEvent(domEventName, targetInst) { if (domEventName === 'change') { return targetInst; } } /** * SECTION: handle `input` event */ var isInputEventSupported = false; if (canUseDOM) { // IE9 claims to support the input event but fails to trigger it when // deleting text, so we ignore its input events. isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9); } /** * (For IE <=9) Starts tracking propertychange events on the passed-in element * and override the value property so that we can distinguish user events from * value changes in JS. */ function startWatchingForValueChange(target, targetInst) { activeElement = target; activeElementInst = targetInst; activeElement.attachEvent('onpropertychange', handlePropertyChange); } /** * (For IE <=9) Removes the event listeners from the currently-tracked element, * if any exists. */ function stopWatchingForValueChange() { if (!activeElement) { return; } activeElement.detachEvent('onpropertychange', handlePropertyChange); activeElement = null; activeElementInst = null; } /** * (For IE <=9) Handles a propertychange event, sending a `change` event if * the value of the active element has changed. */ function handlePropertyChange(nativeEvent) { if (nativeEvent.propertyName !== 'value') { return; } if (getInstIfValueChanged(activeElementInst)) { manualDispatchChangeEvent(nativeEvent); } } function handleEventsForInputEventPolyfill(domEventName, target, targetInst) { if (domEventName === 'focusin') { // In IE9, propertychange fires for most input events but is buggy and // doesn't fire when text is deleted, but conveniently, selectionchange // appears to fire in all of the remaining cases so we catch those and // forward the event if the value has changed // In either case, we don't want to call the event handler if the value // is changed from JS so we redefine a setter for `.value` that updates // our activeElementValue variable, allowing us to ignore those changes // // stopWatching() should be a noop here but we call it just in case we // missed a blur event somehow. stopWatchingForValueChange(); startWatchingForValueChange(target, targetInst); } else if (domEventName === 'focusout') { stopWatchingForValueChange(); } } // For IE8 and IE9. function getTargetInstForInputEventPolyfill(domEventName, targetInst) { if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') { // On the selectionchange event, the target is just document which isn't // helpful for us so just check activeElement instead. // // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire // propertychange on the first input event after setting `value` from a // script and fires only keydown, keypress, keyup. Catching keyup usually // gets it and catching keydown lets us fire an event for the first // keystroke if user does a key repeat (it'll be a little delayed: right // before the second keystroke). Other input methods (e.g., paste) seem to // fire selectionchange normally. return getInstIfValueChanged(activeElementInst); } } /** * SECTION: handle `click` event */ function shouldUseClickEvent(elem) { // Use the `click` event to detect changes to checkbox and radio inputs. // This approach works across all browsers, whereas `change` does not fire // until `blur` in IE8. var nodeName = elem.nodeName; return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio'); } function getTargetInstForClickEvent(domEventName, targetInst) { if (domEventName === 'click') { return getInstIfValueChanged(targetInst); } } function getTargetInstForInputOrChangeEvent(domEventName, targetInst) { if (domEventName === 'input' || domEventName === 'change') { return getInstIfValueChanged(targetInst); } } function handleControlledInputBlur(node) { var state = node._wrapperState; if (!state || !state.controlled || node.type !== 'number') { return; } { // If controlled, assign the value attribute to the current value on blur setDefaultValue(node, 'number', node.value); } } /** * This plugin creates an `onChange` event that normalizes change events * across form elements. This event fires at a time when it's possible to * change the element's value without seeing a flicker. * * Supported elements are: * - input (see `isTextInputElement`) * - textarea * - select */ function extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) { var targetNode = targetInst ? getNodeFromInstance(targetInst) : window; var getTargetInstFunc, handleEventFunc; if (shouldUseChangeEvent(targetNode)) { getTargetInstFunc = getTargetInstForChangeEvent; } else if (isTextInputElement(targetNode)) { if (isInputEventSupported) { getTargetInstFunc = getTargetInstForInputOrChangeEvent; } else { getTargetInstFunc = getTargetInstForInputEventPolyfill; handleEventFunc = handleEventsForInputEventPolyfill; } } else if (shouldUseClickEvent(targetNode)) { getTargetInstFunc = getTargetInstForClickEvent; } if (getTargetInstFunc) { var inst = getTargetInstFunc(domEventName, targetInst); if (inst) { createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget); return; } } if (handleEventFunc) { handleEventFunc(domEventName, targetNode, targetInst); } // When blurring, set the value attribute for number inputs if (domEventName === 'focusout') { handleControlledInputBlur(targetNode); } } function registerEvents$2() { registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']); registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']); registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']); registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']); } /** * For almost every interaction we care about, there will be both a top-level * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that * we do not extract duplicate events. However, moving the mouse into the * browser from outside will not fire a `mouseout` event. In this case, we use * the `mouseover` top-level event. */ function extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) { var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover'; var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout'; if (isOverEvent && !isReplayingEvent(nativeEvent)) { // If this is an over event with a target, we might have already dispatched // the event in the out event of the other target. If this is replayed, // then it's because we couldn't dispatch against this target previously // so we have to do it now instead. var related = nativeEvent.relatedTarget || nativeEvent.fromElement; if (related) { // If the related node is managed by React, we can assume that we have // already dispatched the corresponding events during its mouseout. if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) { return; } } } if (!isOutEvent && !isOverEvent) { // Must not be a mouse or pointer in or out - ignoring. return; } var win; // TODO: why is this nullable in the types but we read from it? if (nativeEventTarget.window === nativeEventTarget) { // `nativeEventTarget` is probably a window object. win = nativeEventTarget; } else { // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. var doc = nativeEventTarget.ownerDocument; if (doc) { win = doc.defaultView || doc.parentWindow; } else { win = window; } } var from; var to; if (isOutEvent) { var _related = nativeEvent.relatedTarget || nativeEvent.toElement; from = targetInst; to = _related ? getClosestInstanceFromNode(_related) : null; if (to !== null) { var nearestMounted = getNearestMountedFiber(to); if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) { to = null; } } } else { // Moving to a node from outside the window. from = null; to = targetInst; } if (from === to) { // Nothing pertains to our managed components. return; } var SyntheticEventCtor = SyntheticMouseEvent; var leaveEventType = 'onMouseLeave'; var enterEventType = 'onMouseEnter'; var eventTypePrefix = 'mouse'; if (domEventName === 'pointerout' || domEventName === 'pointerover') { SyntheticEventCtor = SyntheticPointerEvent; leaveEventType = 'onPointerLeave'; enterEventType = 'onPointerEnter'; eventTypePrefix = 'pointer'; } var fromNode = from == null ? win : getNodeFromInstance(from); var toNode = to == null ? win : getNodeFromInstance(to); var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget); leave.target = fromNode; leave.relatedTarget = toNode; var enter = null; // We should only process this nativeEvent if we are processing // the first ancestor. Next time, we will ignore the event. var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget); if (nativeTargetInst === targetInst) { var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget); enterEvent.target = toNode; enterEvent.relatedTarget = fromNode; enter = enterEvent; } accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to); } /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ function is(x, y) { return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare ; } var objectIs = typeof Object.is === 'function' ? Object.is : is; /** * Performs equality by iterating through keys on an object and returning false * when any key has values which are not strictly equal between the arguments. * Returns true when the values of all keys are strictly equal. */ function shallowEqual(objA, objB) { if (objectIs(objA, objB)) { return true; } if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } // Test for A's keys different from B. for (var i = 0; i < keysA.length; i++) { var currentKey = keysA[i]; if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey])) { return false; } } return true; } /** * Given any node return the first leaf node without children. * * @param {DOMElement|DOMTextNode} node * @return {DOMElement|DOMTextNode} */ function getLeafNode(node) { while (node && node.firstChild) { node = node.firstChild; } return node; } /** * Get the next sibling within a container. This will walk up the * DOM if a node's siblings have been exhausted. * * @param {DOMElement|DOMTextNode} node * @return {?DOMElement|DOMTextNode} */ function getSiblingNode(node) { while (node) { if (node.nextSibling) { return node.nextSibling; } node = node.parentNode; } } /** * Get object describing the nodes which contain characters at offset. * * @param {DOMElement|DOMTextNode} root * @param {number} offset * @return {?object} */ function getNodeForCharacterOffset(root, offset) { var node = getLeafNode(root); var nodeStart = 0; var nodeEnd = 0; while (node) { if (node.nodeType === TEXT_NODE) { nodeEnd = nodeStart + node.textContent.length; if (nodeStart <= offset && nodeEnd >= offset) { return { node: node, offset: offset - nodeStart }; } nodeStart = nodeEnd; } node = getLeafNode(getSiblingNode(node)); } } /** * @param {DOMElement} outerNode * @return {?object} */ function getOffsets(outerNode) { var ownerDocument = outerNode.ownerDocument; var win = ownerDocument && ownerDocument.defaultView || window; var selection = win.getSelection && win.getSelection(); if (!selection || selection.rangeCount === 0) { return null; } var anchorNode = selection.anchorNode, anchorOffset = selection.anchorOffset, focusNode = selection.focusNode, focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the // up/down buttons on an <input type="number">. Anonymous divs do not seem to // expose properties, triggering a "Permission denied error" if any of its // properties are accessed. The only seemingly possible way to avoid erroring // is to access a property that typically works for non-anonymous divs and // catch any error that may otherwise arise. See // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 try { /* eslint-disable no-unused-expressions */ anchorNode.nodeType; focusNode.nodeType; /* eslint-enable no-unused-expressions */ } catch (e) { return null; } return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset); } /** * Returns {start, end} where `start` is the character/codepoint index of * (anchorNode, anchorOffset) within the textContent of `outerNode`, and * `end` is the index of (focusNode, focusOffset). * * Returns null if you pass in garbage input but we should probably just crash. * * Exported only for testing. */ function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) { var length = 0; var start = -1; var end = -1; var indexWithinAnchor = 0; var indexWithinFocus = 0; var node = outerNode; var parentNode = null; outer: while (true) { var next = null; while (true) { if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) { start = length + anchorOffset; } if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) { end = length + focusOffset; } if (node.nodeType === TEXT_NODE) { length += node.nodeValue.length; } if ((next = node.firstChild) === null) { break; } // Moving from `node` to its first child `next`. parentNode = node; node = next; } while (true) { if (node === outerNode) { // If `outerNode` has children, this is always the second time visiting // it. If it has no children, this is still the first loop, and the only // valid selection is anchorNode and focusNode both equal to this node // and both offsets 0, in which case we will have handled above. break outer; } if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) { start = length; } if (parentNode === focusNode && ++indexWithinFocus === focusOffset) { end = length; } if ((next = node.nextSibling) !== null) { break; } node = parentNode; parentNode = node.parentNode; } // Moving from `node` to its next sibling `next`. node = next; } if (start === -1 || end === -1) { // This should never happen. (Would happen if the anchor/focus nodes aren't // actually inside the passed-in node.) return null; } return { start: start, end: end }; } /** * In modern non-IE browsers, we can support both forward and backward * selections. * * Note: IE10+ supports the Selection object, but it does not support * the `extend` method, which means that even in modern IE, it's not possible * to programmatically create a backward selection. Thus, for all IE * versions, we use the old IE API to create our selections. * * @param {DOMElement|DOMTextNode} node * @param {object} offsets */ function setOffsets(node, offsets) { var doc = node.ownerDocument || document; var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios. // (For instance: TinyMCE editor used in a list component that supports pasting to add more, // fails when pasting 100+ items) if (!win.getSelection) { return; } var selection = win.getSelection(); var length = node.textContent.length; var start = Math.min(offsets.start, length); var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method. // Flip backward selections, so we can set with a single range. if (!selection.extend && start > end) { var temp = end; end = start; start = temp; } var startMarker = getNodeForCharacterOffset(node, start); var endMarker = getNodeForCharacterOffset(node, end); if (startMarker && endMarker) { if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) { return; } var range = doc.createRange(); range.setStart(startMarker.node, startMarker.offset); selection.removeAllRanges(); if (start > end) { selection.addRange(range); selection.extend(endMarker.node, endMarker.offset); } else { range.setEnd(endMarker.node, endMarker.offset); selection.addRange(range); } } } function isTextNode(node) { return node && node.nodeType === TEXT_NODE; } function containsNode(outerNode, innerNode) { if (!outerNode || !innerNode) { return false; } else if (outerNode === innerNode) { return true; } else if (isTextNode(outerNode)) { return false; } else if (isTextNode(innerNode)) { return containsNode(outerNode, innerNode.parentNode); } else if ('contains' in outerNode) { return outerNode.contains(innerNode); } else if (outerNode.compareDocumentPosition) { return !!(outerNode.compareDocumentPosition(innerNode) & 16); } else { return false; } } function isInDocument(node) { return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node); } function isSameOriginFrame(iframe) { try { // Accessing the contentDocument of a HTMLIframeElement can cause the browser // to throw, e.g. if it has a cross-origin src attribute. // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g: // iframe.contentDocument.defaultView; // A safety way is to access one of the cross origin properties: Window or Location // Which might result in "SecurityError" DOM Exception and it is compatible to Safari. // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl return typeof iframe.contentWindow.location.href === 'string'; } catch (err) { return false; } } function getActiveElementDeep() { var win = window; var element = getActiveElement(); while (element instanceof win.HTMLIFrameElement) { if (isSameOriginFrame(element)) { win = element.contentWindow; } else { return element; } element = getActiveElement(win.document); } return element; } /** * @ReactInputSelection: React input selection module. Based on Selection.js, * but modified to be suitable for react and has a couple of bug fixes (doesn't * assume buttons have range selections allowed). * Input selection module for React. */ /** * @hasSelectionCapabilities: we get the element types that support selection * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart` * and `selectionEnd` rows. */ function hasSelectionCapabilities(elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true'); } function getSelectionInformation() { var focusedElem = getActiveElementDeep(); return { focusedElem: focusedElem, selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null }; } /** * @restoreSelection: If any selection information was potentially lost, * restore it. This is useful when performing operations that could remove dom * nodes and place them back in, resulting in focus being lost. */ function restoreSelection(priorSelectionInformation) { var curFocusedElem = getActiveElementDeep(); var priorFocusedElem = priorSelectionInformation.focusedElem; var priorSelectionRange = priorSelectionInformation.selectionRange; if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) { setSelection(priorFocusedElem, priorSelectionRange); } // Focusing a node can change the scroll position, which is undesirable var ancestors = []; var ancestor = priorFocusedElem; while (ancestor = ancestor.parentNode) { if (ancestor.nodeType === ELEMENT_NODE) { ancestors.push({ element: ancestor, left: ancestor.scrollLeft, top: ancestor.scrollTop }); } } if (typeof priorFocusedElem.focus === 'function') { priorFocusedElem.focus(); } for (var i = 0; i < ancestors.length; i++) { var info = ancestors[i]; info.element.scrollLeft = info.left; info.element.scrollTop = info.top; } } } /** * @getSelection: Gets the selection bounds of a focused textarea, input or * contentEditable node. * -@input: Look up selection bounds of this input * -@return {start: selectionStart, end: selectionEnd} */ function getSelection(input) { var selection; if ('selectionStart' in input) { // Modern browser with input or textarea. selection = { start: input.selectionStart, end: input.selectionEnd }; } else { // Content editable or old IE textarea. selection = getOffsets(input); } return selection || { start: 0, end: 0 }; } /** * @setSelection: Sets the selection bounds of a textarea or input and focuses * the input. * -@input Set selection bounds of this input or textarea * -@offsets Object of same form that is returned from get* */ function setSelection(input, offsets) { var start = offsets.start; var end = offsets.end; if (end === undefined) { end = start; } if ('selectionStart' in input) { input.selectionStart = start; input.selectionEnd = Math.min(end, input.value.length); } else { setOffsets(input, offsets); } } var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11; function registerEvents$3() { registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']); } var activeElement$1 = null; var activeElementInst$1 = null; var lastSelection = null; var mouseDown = false; /** * Get an object which is a unique representation of the current selection. * * The return value will not be consistent across nodes or browsers, but * two identical selections on the same node will return identical objects. */ function getSelection$1(node) { if ('selectionStart' in node && hasSelectionCapabilities(node)) { return { start: node.selectionStart, end: node.selectionEnd }; } else { var win = node.ownerDocument && node.ownerDocument.defaultView || window; var selection = win.getSelection(); return { anchorNode: selection.anchorNode, anchorOffset: selection.anchorOffset, focusNode: selection.focusNode, focusOffset: selection.focusOffset }; } } /** * Get document associated with the event target. */ function getEventTargetDocument(eventTarget) { return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument; } /** * Poll selection to see whether it's changed. * * @param {object} nativeEvent * @param {object} nativeEventTarget * @return {?SyntheticEvent} */ function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) { // Ensure we have the right element, and that the user is not dragging a // selection (this matches native `select` event behavior). In HTML5, select // fires only on input and textarea thus if there's no focused element we // won't dispatch. var doc = getEventTargetDocument(nativeEventTarget); if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) { return; } // Only fire when selection has actually changed. var currentSelection = getSelection$1(activeElement$1); if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { lastSelection = currentSelection; var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect'); if (listeners.length > 0) { var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget); dispatchQueue.push({ event: event, listeners: listeners }); event.target = activeElement$1; } } } /** * This plugin creates an `onSelect` event that normalizes select events * across form elements. * * Supported elements are: * - input (see `isTextInputElement`) * - textarea * - contentEditable * * This differs from native browser implementations in the following ways: * - Fires on contentEditable fields as well as inputs. * - Fires for collapsed selection. * - Fires after user input. */ function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) { var targetNode = targetInst ? getNodeFromInstance(targetInst) : window; switch (domEventName) { // Track the input node that has focus. case 'focusin': if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { activeElement$1 = targetNode; activeElementInst$1 = targetInst; lastSelection = null; } break; case 'focusout': activeElement$1 = null; activeElementInst$1 = null; lastSelection = null; break; // Don't fire the event while the user is dragging. This matches the // semantics of the native select event. case 'mousedown': mouseDown = true; break; case 'contextmenu': case 'mouseup': case 'dragend': mouseDown = false; constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget); break; // Chrome and IE fire non-standard event when selection is changed (and // sometimes when it hasn't). IE's event fires out of order with respect // to key and input events on deletion, so we discard it. // // Firefox doesn't support selectionchange, so check selection status // after each key entry. The selection changes after keydown and before // keyup, but we check on keydown as well in the case of holding down a // key, when multiple keydown events are fired but only one keyup is. // This is also our approach for IE handling, for the reason above. case 'selectionchange': if (skipSelectionChangeEvent) { break; } // falls through case 'keydown': case 'keyup': constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget); } } /** * Generate a mapping of standard vendor prefixes using the defined style property and event name. * * @param {string} styleProp * @param {string} eventName * @returns {object} */ function makePrefixMap(styleProp, eventName) { var prefixes = {}; prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); prefixes['Webkit' + styleProp] = 'webkit' + eventName; prefixes['Moz' + styleProp] = 'moz' + eventName; return prefixes; } /** * A list of event names to a configurable list of vendor prefixes. */ var vendorPrefixes = { animationend: makePrefixMap('Animation', 'AnimationEnd'), animationiteration: makePrefixMap('Animation', 'AnimationIteration'), animationstart: makePrefixMap('Animation', 'AnimationStart'), transitionend: makePrefixMap('Transition', 'TransitionEnd') }; /** * Event names that have already been detected and prefixed (if applicable). */ var prefixedEventNames = {}; /** * Element to check for prefixes on. */ var style = {}; /** * Bootstrap if a DOM exists. */ if (canUseDOM) { style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x, // the un-prefixed "animation" and "transition" properties are defined on the // style object but the events that fire will still be prefixed, so we need // to check if the un-prefixed events are usable, and if not remove them from the map. if (!('AnimationEvent' in window)) { delete vendorPrefixes.animationend.animation; delete vendorPrefixes.animationiteration.animation; delete vendorPrefixes.animationstart.animation; } // Same as above if (!('TransitionEvent' in window)) { delete vendorPrefixes.transitionend.transition; } } /** * Attempts to determine the correct vendor prefixed event name. * * @param {string} eventName * @returns {string} */ function getVendorPrefixedEventName(eventName) { if (prefixedEventNames[eventName]) { return prefixedEventNames[eventName]; } else if (!vendorPrefixes[eventName]) { return eventName; } var prefixMap = vendorPrefixes[eventName]; for (var styleProp in prefixMap) { if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { return prefixedEventNames[eventName] = prefixMap[styleProp]; } } return eventName; } var ANIMATION_END = getVendorPrefixedEventName('animationend'); var ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration'); var ANIMATION_START = getVendorPrefixedEventName('animationstart'); var TRANSITION_END = getVendorPrefixedEventName('transitionend'); var topLevelEventsToReactNames = new Map(); // NOTE: Capitalization is important in this list! // // E.g. it needs "pointerDown", not "pointerdown". // This is because we derive both React name ("onPointerDown") // and DOM name ("pointerdown") from the same list. // // Exceptions that don't match this convention are listed separately. // // prettier-ignore var simpleEventPluginEvents = ['abort', 'auxClick', 'cancel', 'canPlay', 'canPlayThrough', 'click', 'close', 'contextMenu', 'copy', 'cut', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'pointerCancel', 'pointerDown', 'pointerMove', 'pointerOut', 'pointerOver', 'pointerUp', 'progress', 'rateChange', 'reset', 'resize', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'scroll', 'toggle', 'touchMove', 'waiting', 'wheel']; function registerSimpleEvent(domEventName, reactName) { topLevelEventsToReactNames.set(domEventName, reactName); registerTwoPhaseEvent(reactName, [domEventName]); } function registerSimpleEvents() { for (var i = 0; i < simpleEventPluginEvents.length; i++) { var eventName = simpleEventPluginEvents[i]; var domEventName = eventName.toLowerCase(); var capitalizedEvent = eventName[0].toUpperCase() + eventName.slice(1); registerSimpleEvent(domEventName, 'on' + capitalizedEvent); } // Special cases where event names don't match. registerSimpleEvent(ANIMATION_END, 'onAnimationEnd'); registerSimpleEvent(ANIMATION_ITERATION, 'onAnimationIteration'); registerSimpleEvent(ANIMATION_START, 'onAnimationStart'); registerSimpleEvent('dblclick', 'onDoubleClick'); registerSimpleEvent('focusin', 'onFocus'); registerSimpleEvent('focusout', 'onBlur'); registerSimpleEvent(TRANSITION_END, 'onTransitionEnd'); } function extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) { var reactName = topLevelEventsToReactNames.get(domEventName); if (reactName === undefined) { return; } var SyntheticEventCtor = SyntheticEvent; var reactEventType = domEventName; switch (domEventName) { case 'keypress': // Firefox creates a keypress event for function keys too. This removes // the unwanted keypress events. Enter is however both printable and // non-printable. One would expect Tab to be as well (but it isn't). if (getEventCharCode(nativeEvent) === 0) { return; } /* falls through */ case 'keydown': case 'keyup': SyntheticEventCtor = SyntheticKeyboardEvent; break; case 'focusin': reactEventType = 'focus'; SyntheticEventCtor = SyntheticFocusEvent; break; case 'focusout': reactEventType = 'blur'; SyntheticEventCtor = SyntheticFocusEvent; break; case 'beforeblur': case 'afterblur': SyntheticEventCtor = SyntheticFocusEvent; break; case 'click': // Firefox creates a click event on right mouse clicks. This removes the // unwanted click events. if (nativeEvent.button === 2) { return; } /* falls through */ case 'auxclick': case 'dblclick': case 'mousedown': case 'mousemove': case 'mouseup': // TODO: Disabled elements should not respond to mouse events /* falls through */ case 'mouseout': case 'mouseover': case 'contextmenu': SyntheticEventCtor = SyntheticMouseEvent; break; case 'drag': case 'dragend': case 'dragenter': case 'dragexit': case 'dragleave': case 'dragover': case 'dragstart': case 'drop': SyntheticEventCtor = SyntheticDragEvent; break; case 'touchcancel': case 'touchend': case 'touchmove': case 'touchstart': SyntheticEventCtor = SyntheticTouchEvent; break; case ANIMATION_END: case ANIMATION_ITERATION: case ANIMATION_START: SyntheticEventCtor = SyntheticAnimationEvent; break; case TRANSITION_END: SyntheticEventCtor = SyntheticTransitionEvent; break; case 'scroll': SyntheticEventCtor = SyntheticUIEvent; break; case 'wheel': SyntheticEventCtor = SyntheticWheelEvent; break; case 'copy': case 'cut': case 'paste': SyntheticEventCtor = SyntheticClipboardEvent; break; case 'gotpointercapture': case 'lostpointercapture': case 'pointercancel': case 'pointerdown': case 'pointermove': case 'pointerout': case 'pointerover': case 'pointerup': SyntheticEventCtor = SyntheticPointerEvent; break; } var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0; { // Some events don't bubble in the browser. // In the past, React has always bubbled them, but this can be surprising. // We're going to try aligning closer to the browser behavior by not bubbling // them in React either. We'll start by not bubbling onScroll, and then expand. var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from // nonDelegatedEvents list in DOMPluginEventSystem. // Then we can remove this special list. // This is a breaking change that can wait until React 18. domEventName === 'scroll'; var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly); if (_listeners.length > 0) { // Intentionally create event lazily. var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget); dispatchQueue.push({ event: _event, listeners: _listeners }); } } } // TODO: remove top-level side effect. registerSimpleEvents(); registerEvents$2(); registerEvents$1(); registerEvents$3(); registerEvents(); function extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) { // TODO: we should remove the concept of a "SimpleEventPlugin". // This is the basic functionality of the event system. All // the other plugins are essentially polyfills. So the plugin // should probably be inlined somewhere and have its logic // be core the to event system. This would potentially allow // us to ship builds of React without the polyfilled plugins below. extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags); var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the // event's native "bubble" phase, which means that we're // not in the capture phase. That's because we emulate // the capture phase here still. This is a trade-off, // because in an ideal world we would not emulate and use // the phases properly, like we do with the SimpleEvent // plugin. However, the plugins below either expect // emulation (EnterLeave) or use state localized to that // plugin (BeforeInput, Change, Select). The state in // these modules complicates things, as you'll essentially // get the case where the capture phase event might change // state, only for the following bubble event to come in // later and not trigger anything as the state now // invalidates the heuristics of the event plugin. We // could alter all these plugins to work in such ways, but // that might cause other unknown side-effects that we // can't foresee right now. if (shouldProcessPolyfillPlugins) { extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget); extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget); extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget); extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget); } } // List of events that need to be individually attached to media elements. var mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'resize', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather // set them on the actual target element itself. This is primarily // because these events do not consistently bubble in the DOM. var nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes)); function executeDispatch(event, listener, currentTarget) { var type = event.type || 'unknown-event'; event.currentTarget = currentTarget; invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event); event.currentTarget = null; } function processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) { var previousInstance; if (inCapturePhase) { for (var i = dispatchListeners.length - 1; i >= 0; i--) { var _dispatchListeners$i = dispatchListeners[i], instance = _dispatchListeners$i.instance, currentTarget = _dispatchListeners$i.currentTarget, listener = _dispatchListeners$i.listener; if (instance !== previousInstance && event.isPropagationStopped()) { return; } executeDispatch(event, listener, currentTarget); previousInstance = instance; } } else { for (var _i = 0; _i < dispatchListeners.length; _i++) { var _dispatchListeners$_i = dispatchListeners[_i], _instance = _dispatchListeners$_i.instance, _currentTarget = _dispatchListeners$_i.currentTarget, _listener = _dispatchListeners$_i.listener; if (_instance !== previousInstance && event.isPropagationStopped()) { return; } executeDispatch(event, _listener, _currentTarget); previousInstance = _instance; } } } function processDispatchQueue(dispatchQueue, eventSystemFlags) { var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0; for (var i = 0; i < dispatchQueue.length; i++) { var _dispatchQueue$i = dispatchQueue[i], event = _dispatchQueue$i.event, listeners = _dispatchQueue$i.listeners; processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling. } // This would be a good time to rethrow if any of the event handlers threw. rethrowCaughtError(); } function dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) { var nativeEventTarget = getEventTarget(nativeEvent); var dispatchQueue = []; extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags); processDispatchQueue(dispatchQueue, eventSystemFlags); } function listenToNonDelegatedEvent(domEventName, targetElement) { { if (!nonDelegatedEvents.has(domEventName)) { error('Did not expect a listenToNonDelegatedEvent() call for "%s". ' + 'This is a bug in React. Please file an issue.', domEventName); } } var isCapturePhaseListener = false; var listenerSet = getEventListenerSet(targetElement); var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener); if (!listenerSet.has(listenerSetKey)) { addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener); listenerSet.add(listenerSetKey); } } function listenToNativeEvent(domEventName, isCapturePhaseListener, target) { { if (nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener) { error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. ' + 'This is a bug in React. Please file an issue.', domEventName); } } var eventSystemFlags = 0; if (isCapturePhaseListener) { eventSystemFlags |= IS_CAPTURE_PHASE; } addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener); } // This is only used by createEventHandle when the var listeningMarker = '_reactListening' + Math.random().toString(36).slice(2); function listenToAllSupportedEvents(rootContainerElement) { if (!rootContainerElement[listeningMarker]) { rootContainerElement[listeningMarker] = true; allNativeEvents.forEach(function (domEventName) { // We handle selectionchange separately because it // doesn't bubble and needs to be on the document. if (domEventName !== 'selectionchange') { if (!nonDelegatedEvents.has(domEventName)) { listenToNativeEvent(domEventName, false, rootContainerElement); } listenToNativeEvent(domEventName, true, rootContainerElement); } }); var ownerDocument = rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument; if (ownerDocument !== null) { // The selectionchange event also needs deduplication // but it is attached to the document. if (!ownerDocument[listeningMarker]) { ownerDocument[listeningMarker] = true; listenToNativeEvent('selectionchange', false, ownerDocument); } } } } function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) { var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be // active and not passive. var isPassiveListener = undefined; if (passiveBrowserEventsSupported) { // Browsers introduced an intervention, making these events // passive by default on document. React doesn't bind them // to document anymore, but changing this now would undo // the performance wins from the change. So we emulate // the existing behavior manually on the roots now. // https://github.com/facebook/react/issues/19651 if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') { isPassiveListener = true; } } targetContainer = targetContainer; var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we if (isCapturePhaseListener) { if (isPassiveListener !== undefined) { unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener); } else { unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener); } } else { if (isPassiveListener !== undefined) { unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener); } else { unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener); } } } function isMatchingRootContainer(grandContainer, targetContainer) { return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer; } function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) { var ancestorInst = targetInst; if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) { var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we if (targetInst !== null) { // The below logic attempts to work out if we need to change // the target fiber to a different ancestor. We had similar logic // in the legacy event system, except the big difference between // systems is that the modern event system now has an event listener // attached to each React Root and React Portal Root. Together, // the DOM nodes representing these roots are the "rootContainer". // To figure out which ancestor instance we should use, we traverse // up the fiber tree from the target instance and attempt to find // root boundaries that match that of our current "rootContainer". // If we find that "rootContainer", we find the parent fiber // sub-tree for that root and make that our ancestor instance. var node = targetInst; mainLoop: while (true) { if (node === null) { return; } var nodeTag = node.tag; if (nodeTag === HostRoot || nodeTag === HostPortal) { var container = node.stateNode.containerInfo; if (isMatchingRootContainer(container, targetContainerNode)) { break; } if (nodeTag === HostPortal) { // The target is a portal, but it's not the rootContainer we're looking for. // Normally portals handle their own events all the way down to the root. // So we should be able to stop now. However, we don't know if this portal // was part of *our* root. var grandNode = node.return; while (grandNode !== null) { var grandTag = grandNode.tag; if (grandTag === HostRoot || grandTag === HostPortal) { var grandContainer = grandNode.stateNode.containerInfo; if (isMatchingRootContainer(grandContainer, targetContainerNode)) { // This is the rootContainer we're looking for and we found it as // a parent of the Portal. That means we can ignore it because the // Portal will bubble through to us. return; } } grandNode = grandNode.return; } } // Now we need to find it's corresponding host fiber in the other // tree. To do this we can use getClosestInstanceFromNode, but we // need to validate that the fiber is a host instance, otherwise // we need to traverse up through the DOM till we find the correct // node that is from the other tree. while (container !== null) { var parentNode = getClosestInstanceFromNode(container); if (parentNode === null) { return; } var parentTag = parentNode.tag; if (parentTag === HostComponent || parentTag === HostText) { node = ancestorInst = parentNode; continue mainLoop; } container = container.parentNode; } } node = node.return; } } } batchedUpdates(function () { return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst); }); } function createDispatchListener(instance, listener, currentTarget) { return { instance: instance, listener: listener, currentTarget: currentTarget }; } function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly, nativeEvent) { var captureName = reactName !== null ? reactName + 'Capture' : null; var reactEventName = inCapturePhase ? captureName : reactName; var listeners = []; var instance = targetFiber; var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path. while (instance !== null) { var _instance2 = instance, stateNode = _instance2.stateNode, tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>) if (tag === HostComponent && stateNode !== null) { lastHostComponent = stateNode; // createEventHandle listeners if (reactEventName !== null) { var listener = getListener(instance, reactEventName); if (listener != null) { listeners.push(createDispatchListener(instance, listener, lastHostComponent)); } } } // If we are only accumulating events for the target, then we don't // continue to propagate through the React fiber tree to find other // listeners. if (accumulateTargetOnly) { break; } // If we are processing the onBeforeBlur event, then we need to take instance = instance.return; } return listeners; } // We should only use this function for: // - BeforeInputEventPlugin // - ChangeEventPlugin // - SelectEventPlugin // This is because we only process these plugins // in the bubble phase, so we need to accumulate two // phase event listeners (via emulation). function accumulateTwoPhaseListeners(targetFiber, reactName) { var captureName = reactName + 'Capture'; var listeners = []; var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path. while (instance !== null) { var _instance3 = instance, stateNode = _instance3.stateNode, tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>) if (tag === HostComponent && stateNode !== null) { var currentTarget = stateNode; var captureListener = getListener(instance, captureName); if (captureListener != null) { listeners.unshift(createDispatchListener(instance, captureListener, currentTarget)); } var bubbleListener = getListener(instance, reactName); if (bubbleListener != null) { listeners.push(createDispatchListener(instance, bubbleListener, currentTarget)); } } instance = instance.return; } return listeners; } function getParent(inst) { if (inst === null) { return null; } do { inst = inst.return; // TODO: If this is a HostRoot we might want to bail out. // That is depending on if we want nested subtrees (layers) to bubble // events to their parent. We could also go through parentNode on the // host node but that wouldn't work for React Native and doesn't let us // do the portal feature. } while (inst && inst.tag !== HostComponent); if (inst) { return inst; } return null; } /** * Return the lowest common ancestor of A and B, or null if they are in * different trees. */ function getLowestCommonAncestor(instA, instB) { var nodeA = instA; var nodeB = instB; var depthA = 0; for (var tempA = nodeA; tempA; tempA = getParent(tempA)) { depthA++; } var depthB = 0; for (var tempB = nodeB; tempB; tempB = getParent(tempB)) { depthB++; } // If A is deeper, crawl up. while (depthA - depthB > 0) { nodeA = getParent(nodeA); depthA--; } // If B is deeper, crawl up. while (depthB - depthA > 0) { nodeB = getParent(nodeB); depthB--; } // Walk in lockstep until we find a match. var depth = depthA; while (depth--) { if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) { return nodeA; } nodeA = getParent(nodeA); nodeB = getParent(nodeB); } return null; } function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) { var registrationName = event._reactName; var listeners = []; var instance = target; while (instance !== null) { if (instance === common) { break; } var _instance4 = instance, alternate = _instance4.alternate, stateNode = _instance4.stateNode, tag = _instance4.tag; if (alternate !== null && alternate === common) { break; } if (tag === HostComponent && stateNode !== null) { var currentTarget = stateNode; if (inCapturePhase) { var captureListener = getListener(instance, registrationName); if (captureListener != null) { listeners.unshift(createDispatchListener(instance, captureListener, currentTarget)); } } else if (!inCapturePhase) { var bubbleListener = getListener(instance, registrationName); if (bubbleListener != null) { listeners.push(createDispatchListener(instance, bubbleListener, currentTarget)); } } } instance = instance.return; } if (listeners.length !== 0) { dispatchQueue.push({ event: event, listeners: listeners }); } } // We should only use this function for: // - EnterLeaveEventPlugin // This is because we only process this plugin // in the bubble phase, so we need to accumulate two // phase event listeners. function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) { var common = from && to ? getLowestCommonAncestor(from, to) : null; if (from !== null) { accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false); } if (to !== null && enterEvent !== null) { accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true); } } function getListenerSetKey(domEventName, capture) { return domEventName + "__" + (capture ? 'capture' : 'bubble'); } var didWarnInvalidHydration = false; var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML'; var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning'; var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning'; var AUTOFOCUS = 'autoFocus'; var CHILDREN = 'children'; var STYLE = 'style'; var HTML$1 = '__html'; var warnedUnknownTags; var validatePropertiesInDevelopment; var warnForPropDifference; var warnForExtraAttributes; var warnForInvalidEventListener; var canDiffStyleForHydrationWarning; var normalizeHTML; { warnedUnknownTags = { // There are working polyfills for <dialog>. Let people use it. dialog: true, // Electron ships a custom <webview> tag to display external web content in // an isolated frame and process. // This tag is not present in non Electron environments such as JSDom which // is often used for testing purposes. // @see https://electronjs.org/docs/api/webview-tag webview: true }; validatePropertiesInDevelopment = function (type, props) { validateProperties(type, props); validateProperties$1(type, props); validateProperties$2(type, props, { registrationNameDependencies: registrationNameDependencies, possibleRegistrationNames: possibleRegistrationNames }); }; // IE 11 parses & normalizes the style attribute as opposed to other // browsers. It adds spaces and sorts the properties in some // non-alphabetical order. Handling that would require sorting CSS // properties in the client & server versions or applying // `expectedStyle` to a temporary DOM node to read its `style` attribute // normalized. Since it only affects IE, we're skipping style warnings // in that browser completely in favor of doing all that work. // See https://github.com/facebook/react/issues/11807 canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; warnForPropDifference = function (propName, serverValue, clientValue) { if (didWarnInvalidHydration) { return; } var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue); var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue); if (normalizedServerValue === normalizedClientValue) { return; } didWarnInvalidHydration = true; error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue)); }; warnForExtraAttributes = function (attributeNames) { if (didWarnInvalidHydration) { return; } didWarnInvalidHydration = true; var names = []; attributeNames.forEach(function (name) { names.push(name); }); error('Extra attributes from the server: %s', names); }; warnForInvalidEventListener = function (registrationName, listener) { if (listener === false) { error('Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName); } else { error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener); } }; // Parse the HTML and read it back to normalize the HTML string so that it // can be used for comparison. normalizeHTML = function (parent, html) { // We could have created a separate document here to avoid // re-initializing custom elements if they exist. But this breaks // how <noscript> is being handled. So we use the same document. // See the discussion in https://github.com/facebook/react/pull/11157. var testElement = parent.namespaceURI === HTML_NAMESPACE ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName); testElement.innerHTML = html; return testElement.innerHTML; }; } // HTML parsing normalizes CR and CRLF to LF. // It also can turn \u0000 into \uFFFD inside attributes. // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream // If we have a mismatch, it might be caused by that. // We will still patch up in this case but not fire the warning. var NORMALIZE_NEWLINES_REGEX = /\r\n?/g; var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g; function normalizeMarkupForTextOrAttribute(markup) { { checkHtmlStringCoercion(markup); } var markupString = typeof markup === 'string' ? markup : '' + markup; return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ''); } function checkForUnmatchedText(serverText, clientText, isConcurrentMode, shouldWarnDev) { var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText); var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText); if (normalizedServerText === normalizedClientText) { return; } if (shouldWarnDev) { { if (!didWarnInvalidHydration) { didWarnInvalidHydration = true; error('Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText); } } } if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) { // In concurrent roots, we throw when there's a text mismatch and revert to // client rendering, up to the nearest Suspense boundary. throw new Error('Text content does not match server-rendered HTML.'); } } function getOwnerDocumentFromRootContainer(rootContainerElement) { return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument; } function noop() {} function trapClickOnNonInteractiveElement(node) { // Mobile Safari does not fire properly bubble click events on // non-interactive elements, which means delegated click listeners do not // fire. The workaround for this bug involves attaching an empty click // listener on the target node. // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html // Just set it using the onclick property so that we don't have to manage any // bookkeeping for it. Not sure if we need to clear it when the listener is // removed. // TODO: Only do this for the relevant Safaris maybe? node.onclick = noop; } function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) { for (var propKey in nextProps) { if (!nextProps.hasOwnProperty(propKey)) { continue; } var nextProp = nextProps[propKey]; if (propKey === STYLE) { { if (nextProp) { // Freeze the next style object so that we can assume it won't be // mutated. We have already warned for this in the past. Object.freeze(nextProp); } } // Relies on `updateStylesByID` not mutating `styleUpdates`. setValueForStyles(domElement, nextProp); } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { var nextHtml = nextProp ? nextProp[HTML$1] : undefined; if (nextHtml != null) { setInnerHTML(domElement, nextHtml); } } else if (propKey === CHILDREN) { if (typeof nextProp === 'string') { // Avoid setting initial textContent when the text is empty. In IE11 setting // textContent on a <textarea> will cause the placeholder to not // show within the <textarea> until it has been focused and blurred again. // https://github.com/facebook/react/issues/6731#issuecomment-254874553 var canSetTextContent = tag !== 'textarea' || nextProp !== ''; if (canSetTextContent) { setTextContent(domElement, nextProp); } } else if (typeof nextProp === 'number') { setTextContent(domElement, '' + nextProp); } } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) { if (nextProp != null) { if ( typeof nextProp !== 'function') { warnForInvalidEventListener(propKey, nextProp); } if (propKey === 'onScroll') { listenToNonDelegatedEvent('scroll', domElement); } } } else if (nextProp != null) { setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag); } } } function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) { // TODO: Handle wasCustomComponentTag for (var i = 0; i < updatePayload.length; i += 2) { var propKey = updatePayload[i]; var propValue = updatePayload[i + 1]; if (propKey === STYLE) { setValueForStyles(domElement, propValue); } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { setInnerHTML(domElement, propValue); } else if (propKey === CHILDREN) { setTextContent(domElement, propValue); } else { setValueForProperty(domElement, propKey, propValue, isCustomComponentTag); } } } function createElement(type, props, rootContainerElement, parentNamespace) { var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML // tags get no namespace. var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement); var domElement; var namespaceURI = parentNamespace; if (namespaceURI === HTML_NAMESPACE) { namespaceURI = getIntrinsicNamespace(type); } if (namespaceURI === HTML_NAMESPACE) { { isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to // allow <SVG> or <mATH>. if (!isCustomComponentTag && type !== type.toLowerCase()) { error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type); } } if (type === 'script') { // Create the script via .innerHTML so its "parser-inserted" flag is // set to true and it does not execute var div = ownerDocument.createElement('div'); div.innerHTML = '<script><' + '/script>'; // eslint-disable-line // This is guaranteed to yield a script element. var firstChild = div.firstChild; domElement = div.removeChild(firstChild); } else if (typeof props.is === 'string') { // $FlowIssue `createElement` should be updated for Web Components domElement = ownerDocument.createElement(type, { is: props.is }); } else { // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug. // See discussion in https://github.com/facebook/react/pull/6896 // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size` // attributes on `select`s needs to be added before `option`s are inserted. // This prevents: // - a bug where the `select` does not scroll to the correct option because singular // `select` elements automatically pick the first item #13222 // - a bug where the `select` set the first item as selected despite the `size` attribute #14239 // See https://github.com/facebook/react/issues/13222 // and https://github.com/facebook/react/issues/14239 if (type === 'select') { var node = domElement; if (props.multiple) { node.multiple = true; } else if (props.size) { // Setting a size greater than 1 causes a select to behave like `multiple=true`, where // it is possible that no option is selected. // // This is only necessary when a select in "single selection mode". node.size = props.size; } } } } else { domElement = ownerDocument.createElementNS(namespaceURI, type); } { if (namespaceURI === HTML_NAMESPACE) { if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !hasOwnProperty.call(warnedUnknownTags, type)) { warnedUnknownTags[type] = true; error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type); } } } return domElement; } function createTextNode(text, rootContainerElement) { return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text); } function setInitialProperties(domElement, tag, rawProps, rootContainerElement) { var isCustomComponentTag = isCustomComponent(tag, rawProps); { validatePropertiesInDevelopment(tag, rawProps); } // TODO: Make sure that we check isMounted before firing any of these events. var props; switch (tag) { case 'dialog': listenToNonDelegatedEvent('cancel', domElement); listenToNonDelegatedEvent('close', domElement); props = rawProps; break; case 'iframe': case 'object': case 'embed': // We listen to this event in case to ensure emulated bubble // listeners still fire for the load event. listenToNonDelegatedEvent('load', domElement); props = rawProps; break; case 'video': case 'audio': // We listen to these events in case to ensure emulated bubble // listeners still fire for all the media events. for (var i = 0; i < mediaEventTypes.length; i++) { listenToNonDelegatedEvent(mediaEventTypes[i], domElement); } props = rawProps; break; case 'source': // We listen to this event in case to ensure emulated bubble // listeners still fire for the error event. listenToNonDelegatedEvent('error', domElement); props = rawProps; break; case 'img': case 'image': case 'link': // We listen to these events in case to ensure emulated bubble // listeners still fire for error and load events. listenToNonDelegatedEvent('error', domElement); listenToNonDelegatedEvent('load', domElement); props = rawProps; break; case 'details': // We listen to this event in case to ensure emulated bubble // listeners still fire for the toggle event. listenToNonDelegatedEvent('toggle', domElement); props = rawProps; break; case 'input': initWrapperState(domElement, rawProps); props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble // listeners still fire for the invalid event. listenToNonDelegatedEvent('invalid', domElement); break; case 'option': validateProps(domElement, rawProps); props = rawProps; break; case 'select': initWrapperState$1(domElement, rawProps); props = getHostProps$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble // listeners still fire for the invalid event. listenToNonDelegatedEvent('invalid', domElement); break; case 'textarea': initWrapperState$2(domElement, rawProps); props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble // listeners still fire for the invalid event. listenToNonDelegatedEvent('invalid', domElement); break; default: props = rawProps; } assertValidProps(tag, props); setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag); switch (tag) { case 'input': // TODO: Make sure we check if this is still unmounted or do any clean // up necessary since we never stop tracking anymore. track(domElement); postMountWrapper(domElement, rawProps, false); break; case 'textarea': // TODO: Make sure we check if this is still unmounted or do any clean // up necessary since we never stop tracking anymore. track(domElement); postMountWrapper$3(domElement); break; case 'option': postMountWrapper$1(domElement, rawProps); break; case 'select': postMountWrapper$2(domElement, rawProps); break; default: if (typeof props.onClick === 'function') { // TODO: This cast may not be sound for SVG, MathML or custom elements. trapClickOnNonInteractiveElement(domElement); } break; } } // Calculate the diff between the two objects. function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) { { validatePropertiesInDevelopment(tag, nextRawProps); } var updatePayload = null; var lastProps; var nextProps; switch (tag) { case 'input': lastProps = getHostProps(domElement, lastRawProps); nextProps = getHostProps(domElement, nextRawProps); updatePayload = []; break; case 'select': lastProps = getHostProps$1(domElement, lastRawProps); nextProps = getHostProps$1(domElement, nextRawProps); updatePayload = []; break; case 'textarea': lastProps = getHostProps$2(domElement, lastRawProps); nextProps = getHostProps$2(domElement, nextRawProps); updatePayload = []; break; default: lastProps = lastRawProps; nextProps = nextRawProps; if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') { // TODO: This cast may not be sound for SVG, MathML or custom elements. trapClickOnNonInteractiveElement(domElement); } break; } assertValidProps(tag, nextProps); var propKey; var styleName; var styleUpdates = null; for (propKey in lastProps) { if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) { continue; } if (propKey === STYLE) { var lastStyle = lastProps[propKey]; for (styleName in lastStyle) { if (lastStyle.hasOwnProperty(styleName)) { if (!styleUpdates) { styleUpdates = {}; } styleUpdates[styleName] = ''; } } } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) { // This is a special case. If any listener updates we need to ensure // that the "current" fiber pointer gets updated so we need a commit // to update this element. if (!updatePayload) { updatePayload = []; } } else { // For all other deleted properties we add it to the queue. We use // the allowed property list in the commit phase instead. (updatePayload = updatePayload || []).push(propKey, null); } } for (propKey in nextProps) { var nextProp = nextProps[propKey]; var lastProp = lastProps != null ? lastProps[propKey] : undefined; if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) { continue; } if (propKey === STYLE) { { if (nextProp) { // Freeze the next style object so that we can assume it won't be // mutated. We have already warned for this in the past. Object.freeze(nextProp); } } if (lastProp) { // Unset styles on `lastProp` but not on `nextProp`. for (styleName in lastProp) { if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) { if (!styleUpdates) { styleUpdates = {}; } styleUpdates[styleName] = ''; } } // Update styles that changed since `lastProp`. for (styleName in nextProp) { if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { if (!styleUpdates) { styleUpdates = {}; } styleUpdates[styleName] = nextProp[styleName]; } } } else { // Relies on `updateStylesByID` not mutating `styleUpdates`. if (!styleUpdates) { if (!updatePayload) { updatePayload = []; } updatePayload.push(propKey, styleUpdates); } styleUpdates = nextProp; } } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { var nextHtml = nextProp ? nextProp[HTML$1] : undefined; var lastHtml = lastProp ? lastProp[HTML$1] : undefined; if (nextHtml != null) { if (lastHtml !== nextHtml) { (updatePayload = updatePayload || []).push(propKey, nextHtml); } } } else if (propKey === CHILDREN) { if (typeof nextProp === 'string' || typeof nextProp === 'number') { (updatePayload = updatePayload || []).push(propKey, '' + nextProp); } } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) { if (nextProp != null) { // We eagerly listen to this even though we haven't committed yet. if ( typeof nextProp !== 'function') { warnForInvalidEventListener(propKey, nextProp); } if (propKey === 'onScroll') { listenToNonDelegatedEvent('scroll', domElement); } } if (!updatePayload && lastProp !== nextProp) { // This is a special case. If any listener updates we need to ensure // that the "current" props pointer gets updated so we need a commit // to update this element. updatePayload = []; } } else { // For any other property we always add it to the queue and then we // filter it out using the allowed property list during the commit. (updatePayload = updatePayload || []).push(propKey, nextProp); } } if (styleUpdates) { { validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]); } (updatePayload = updatePayload || []).push(STYLE, styleUpdates); } return updatePayload; } // Apply the diff. function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) { // Update checked *before* name. // In the middle of an update, it is possible to have multiple checked. // When a checked radio tries to change name, browser makes another radio's checked false. if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) { updateChecked(domElement, nextRawProps); } var wasCustomComponentTag = isCustomComponent(tag, lastRawProps); var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff. updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props // changed. switch (tag) { case 'input': // Update the wrapper around inputs *after* updating props. This has to // happen after `updateDOMProperties`. Otherwise HTML5 input validations // raise warnings and prevent the new value from being assigned. updateWrapper(domElement, nextRawProps); break; case 'textarea': updateWrapper$1(domElement, nextRawProps); break; case 'select': // <select> value update needs to occur after <option> children // reconciliation postUpdateWrapper(domElement, nextRawProps); break; } } function getPossibleStandardName(propName) { { var lowerCasedName = propName.toLowerCase(); if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) { return null; } return possibleStandardNames[lowerCasedName] || null; } } function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement, isConcurrentMode, shouldWarnDev) { var isCustomComponentTag; var extraAttributeNames; { isCustomComponentTag = isCustomComponent(tag, rawProps); validatePropertiesInDevelopment(tag, rawProps); } // TODO: Make sure that we check isMounted before firing any of these events. switch (tag) { case 'dialog': listenToNonDelegatedEvent('cancel', domElement); listenToNonDelegatedEvent('close', domElement); break; case 'iframe': case 'object': case 'embed': // We listen to this event in case to ensure emulated bubble // listeners still fire for the load event. listenToNonDelegatedEvent('load', domElement); break; case 'video': case 'audio': // We listen to these events in case to ensure emulated bubble // listeners still fire for all the media events. for (var i = 0; i < mediaEventTypes.length; i++) { listenToNonDelegatedEvent(mediaEventTypes[i], domElement); } break; case 'source': // We listen to this event in case to ensure emulated bubble // listeners still fire for the error event. listenToNonDelegatedEvent('error', domElement); break; case 'img': case 'image': case 'link': // We listen to these events in case to ensure emulated bubble // listeners still fire for error and load events. listenToNonDelegatedEvent('error', domElement); listenToNonDelegatedEvent('load', domElement); break; case 'details': // We listen to this event in case to ensure emulated bubble // listeners still fire for the toggle event. listenToNonDelegatedEvent('toggle', domElement); break; case 'input': initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble // listeners still fire for the invalid event. listenToNonDelegatedEvent('invalid', domElement); break; case 'option': validateProps(domElement, rawProps); break; case 'select': initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble // listeners still fire for the invalid event. listenToNonDelegatedEvent('invalid', domElement); break; case 'textarea': initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble // listeners still fire for the invalid event. listenToNonDelegatedEvent('invalid', domElement); break; } assertValidProps(tag, rawProps); { extraAttributeNames = new Set(); var attributes = domElement.attributes; for (var _i = 0; _i < attributes.length; _i++) { var name = attributes[_i].name.toLowerCase(); switch (name) { // Controlled attributes are not validated // TODO: Only ignore them on controlled tags. case 'value': break; case 'checked': break; case 'selected': break; default: // Intentionally use the original name. // See discussion in https://github.com/facebook/react/pull/10676. extraAttributeNames.add(attributes[_i].name); } } } var updatePayload = null; for (var propKey in rawProps) { if (!rawProps.hasOwnProperty(propKey)) { continue; } var nextProp = rawProps[propKey]; if (propKey === CHILDREN) { // For text content children we compare against textContent. This // might match additional HTML that is hidden when we read it using // textContent. E.g. "foo" will match "f<span>oo</span>" but that still // satisfies our requirement. Our requirement is not to produce perfect // HTML and attributes. Ideally we should preserve structure but it's // ok not to if the visible content is still enough to indicate what // even listeners these nodes might be wired up to. // TODO: Warn if there is more than a single textNode as a child. // TODO: Should we use domElement.firstChild.nodeValue to compare? if (typeof nextProp === 'string') { if (domElement.textContent !== nextProp) { if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) { checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev); } updatePayload = [CHILDREN, nextProp]; } } else if (typeof nextProp === 'number') { if (domElement.textContent !== '' + nextProp) { if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) { checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev); } updatePayload = [CHILDREN, '' + nextProp]; } } } else if (registrationNameDependencies.hasOwnProperty(propKey)) { if (nextProp != null) { if ( typeof nextProp !== 'function') { warnForInvalidEventListener(propKey, nextProp); } if (propKey === 'onScroll') { listenToNonDelegatedEvent('scroll', domElement); } } } else if (shouldWarnDev && true && // Convince Flow we've calculated it (it's DEV-only in this method.) typeof isCustomComponentTag === 'boolean') { // Validate that the properties correspond to their expected values. var serverValue = void 0; var propertyInfo = isCustomComponentTag && enableCustomElementPropertySupport ? null : getPropertyInfo(propKey); if (rawProps[SUPPRESS_HYDRATION_WARNING] === true) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated // TODO: Only ignore them on controlled tags. propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) { var serverHTML = domElement.innerHTML; var nextHtml = nextProp ? nextProp[HTML$1] : undefined; if (nextHtml != null) { var expectedHTML = normalizeHTML(domElement, nextHtml); if (expectedHTML !== serverHTML) { warnForPropDifference(propKey, serverHTML, expectedHTML); } } } else if (propKey === STYLE) { // $FlowFixMe - Should be inferred as not undefined. extraAttributeNames.delete(propKey); if (canDiffStyleForHydrationWarning) { var expectedStyle = createDangerousStringForStyles(nextProp); serverValue = domElement.getAttribute('style'); if (expectedStyle !== serverValue) { warnForPropDifference(propKey, serverValue, expectedStyle); } } } else if (isCustomComponentTag && !enableCustomElementPropertySupport) { // $FlowFixMe - Should be inferred as not undefined. extraAttributeNames.delete(propKey.toLowerCase()); serverValue = getValueForAttribute(domElement, propKey, nextProp); if (nextProp !== serverValue) { warnForPropDifference(propKey, serverValue, nextProp); } } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) { var isMismatchDueToBadCasing = false; if (propertyInfo !== null) { // $FlowFixMe - Should be inferred as not undefined. extraAttributeNames.delete(propertyInfo.attributeName); serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo); } else { var ownNamespace = parentNamespace; if (ownNamespace === HTML_NAMESPACE) { ownNamespace = getIntrinsicNamespace(tag); } if (ownNamespace === HTML_NAMESPACE) { // $FlowFixMe - Should be inferred as not undefined. extraAttributeNames.delete(propKey.toLowerCase()); } else { var standardName = getPossibleStandardName(propKey); if (standardName !== null && standardName !== propKey) { // If an SVG prop is supplied with bad casing, it will // be successfully parsed from HTML, but will produce a mismatch // (and would be incorrectly rendered on the client). // However, we already warn about bad casing elsewhere. // So we'll skip the misleading extra mismatch warning in this case. isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined. extraAttributeNames.delete(standardName); } // $FlowFixMe - Should be inferred as not undefined. extraAttributeNames.delete(propKey); } serverValue = getValueForAttribute(domElement, propKey, nextProp); } var dontWarnCustomElement = enableCustomElementPropertySupport ; if (!dontWarnCustomElement && nextProp !== serverValue && !isMismatchDueToBadCasing) { warnForPropDifference(propKey, serverValue, nextProp); } } } } { if (shouldWarnDev) { if ( // $FlowFixMe - Should be inferred as not undefined. extraAttributeNames.size > 0 && rawProps[SUPPRESS_HYDRATION_WARNING] !== true) { // $FlowFixMe - Should be inferred as not undefined. warnForExtraAttributes(extraAttributeNames); } } } switch (tag) { case 'input': // TODO: Make sure we check if this is still unmounted or do any clean // up necessary since we never stop tracking anymore. track(domElement); postMountWrapper(domElement, rawProps, true); break; case 'textarea': // TODO: Make sure we check if this is still unmounted or do any clean // up necessary since we never stop tracking anymore. track(domElement); postMountWrapper$3(domElement); break; case 'select': case 'option': // For input and textarea we current always set the value property at // post mount to force it to diverge from attributes. However, for // option and select we don't quite do the same thing and select // is not resilient to the DOM state changing so we don't do that here. // TODO: Consider not doing this for input and textarea. break; default: if (typeof rawProps.onClick === 'function') { // TODO: This cast may not be sound for SVG, MathML or custom elements. trapClickOnNonInteractiveElement(domElement); } break; } return updatePayload; } function diffHydratedText(textNode, text, isConcurrentMode) { var isDifferent = textNode.nodeValue !== text; return isDifferent; } function warnForDeletedHydratableElement(parentNode, child) { { if (didWarnInvalidHydration) { return; } didWarnInvalidHydration = true; error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase()); } } function warnForDeletedHydratableText(parentNode, child) { { if (didWarnInvalidHydration) { return; } didWarnInvalidHydration = true; error('Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase()); } } function warnForInsertedHydratedElement(parentNode, tag, props) { { if (didWarnInvalidHydration) { return; } didWarnInvalidHydration = true; error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase()); } } function warnForInsertedHydratedText(parentNode, text) { { if (text === '') { // We expect to insert empty text nodes since they're not represented in // the HTML. // TODO: Remove this special case if we can just avoid inserting empty // text nodes. return; } if (didWarnInvalidHydration) { return; } didWarnInvalidHydration = true; error('Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase()); } } function restoreControlledState$3(domElement, tag, props) { switch (tag) { case 'input': restoreControlledState(domElement, props); return; case 'textarea': restoreControlledState$2(domElement, props); return; case 'select': restoreControlledState$1(domElement, props); return; } } var validateDOMNesting = function () {}; var updatedAncestorInfo = function () {}; { // This validation code was written based on the HTML5 parsing spec: // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope // // Note: this does not catch all invalid nesting, nor does it try to (as it's // not clear what practical benefit doing so provides); instead, we warn only // for cases where the parser will give a parse tree differing from what React // intended. For example, <b><div></div></b> is invalid but we don't warn // because it still parses correctly; we do warn for other cases like nested // <p> tags where the beginning of the second element implicitly closes the // first, causing a confusing mess. // https://html.spec.whatwg.org/multipage/syntax.html#special var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point // TODO: Distinguish by namespace here -- for <title>, including it here // errs on the side of fewer warnings 'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; var emptyAncestorInfo = { current: null, formTag: null, aTagInScope: null, buttonTagInScope: null, nobrTagInScope: null, pTagInButtonScope: null, listItemTagAutoclosing: null, dlItemTagAutoclosing: null }; updatedAncestorInfo = function (oldInfo, tag) { var ancestorInfo = assign({}, oldInfo || emptyAncestorInfo); var info = { tag: tag }; if (inScopeTags.indexOf(tag) !== -1) { ancestorInfo.aTagInScope = null; ancestorInfo.buttonTagInScope = null; ancestorInfo.nobrTagInScope = null; } if (buttonScopeTags.indexOf(tag) !== -1) { ancestorInfo.pTagInButtonScope = null; } // See rules for 'li', 'dd', 'dt' start tags in // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { ancestorInfo.listItemTagAutoclosing = null; ancestorInfo.dlItemTagAutoclosing = null; } ancestorInfo.current = info; if (tag === 'form') { ancestorInfo.formTag = info; } if (tag === 'a') { ancestorInfo.aTagInScope = info; } if (tag === 'button') { ancestorInfo.buttonTagInScope = info; } if (tag === 'nobr') { ancestorInfo.nobrTagInScope = info; } if (tag === 'p') { ancestorInfo.pTagInButtonScope = info; } if (tag === 'li') { ancestorInfo.listItemTagAutoclosing = info; } if (tag === 'dd' || tag === 'dt') { ancestorInfo.dlItemTagAutoclosing = info; } return ancestorInfo; }; /** * Returns whether */ var isTagValidWithParent = function (tag, parentTag) { // First, let's check if we're in an unusual parsing mode... switch (parentTag) { // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect case 'select': return tag === 'option' || tag === 'optgroup' || tag === '#text'; case 'optgroup': return tag === 'option' || tag === '#text'; // Strictly speaking, seeing an <option> doesn't mean we're in a <select> // but case 'option': return tag === '#text'; // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption // No special behavior since these rules fall back to "in body" mode for // all except special table nodes which cause bad parsing behavior anyway. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr case 'tr': return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template'; // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody case 'tbody': case 'thead': case 'tfoot': return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup case 'colgroup': return tag === 'col' || tag === 'template'; // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable case 'table': return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template'; // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead case 'head': return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template'; // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element case 'html': return tag === 'head' || tag === 'body' || tag === 'frameset'; case 'frameset': return tag === 'frame'; case '#document': return tag === 'html'; } // Probably in the "in body" parsing mode, so we outlaw only tag combos // where the parsing rules cause implicit opens or closes to be added. // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody switch (tag) { case 'h1': case 'h2': case 'h3': case 'h4': case 'h5': case 'h6': return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6'; case 'rp': case 'rt': return impliedEndTags.indexOf(parentTag) === -1; case 'body': case 'caption': case 'col': case 'colgroup': case 'frameset': case 'frame': case 'head': case 'html': case 'tbody': case 'td': case 'tfoot': case 'th': case 'thead': case 'tr': // These tags are only valid with a few parents that have special child // parsing rules -- if we're down here, then none of those matched and // so we allow it only if we don't know what the parent is, as all other // cases are invalid. return parentTag == null; } return true; }; /** * Returns whether */ var findInvalidAncestorForTag = function (tag, ancestorInfo) { switch (tag) { case 'address': case 'article': case 'aside': case 'blockquote': case 'center': case 'details': case 'dialog': case 'dir': case 'div': case 'dl': case 'fieldset': case 'figcaption': case 'figure': case 'footer': case 'header': case 'hgroup': case 'main': case 'menu': case 'nav': case 'ol': case 'p': case 'section': case 'summary': case 'ul': case 'pre': case 'listing': case 'table': case 'hr': case 'xmp': case 'h1': case 'h2': case 'h3': case 'h4': case 'h5': case 'h6': return ancestorInfo.pTagInButtonScope; case 'form': return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; case 'li': return ancestorInfo.listItemTagAutoclosing; case 'dd': case 'dt': return ancestorInfo.dlItemTagAutoclosing; case 'button': return ancestorInfo.buttonTagInScope; case 'a': // Spec says something about storing a list of markers, but it sounds // equivalent to this check. return ancestorInfo.aTagInScope; case 'nobr': return ancestorInfo.nobrTagInScope; } return null; }; var didWarn$1 = {}; validateDOMNesting = function (childTag, childText, ancestorInfo) { ancestorInfo = ancestorInfo || emptyAncestorInfo; var parentInfo = ancestorInfo.current; var parentTag = parentInfo && parentInfo.tag; if (childText != null) { if (childTag != null) { error('validateDOMNesting: when childText is passed, childTag should be null'); } childTag = '#text'; } var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); var invalidParentOrAncestor = invalidParent || invalidAncestor; if (!invalidParentOrAncestor) { return; } var ancestorTag = invalidParentOrAncestor.tag; var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag; if (didWarn$1[warnKey]) { return; } didWarn$1[warnKey] = true; var tagDisplayName = childTag; var whitespaceInfo = ''; if (childTag === '#text') { if (/\S/.test(childText)) { tagDisplayName = 'Text nodes'; } else { tagDisplayName = 'Whitespace text nodes'; whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.'; } } else { tagDisplayName = '<' + childTag + '>'; } if (invalidParent) { var info = ''; if (ancestorTag === 'table' && childTag === 'tr') { info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.'; } error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info); } else { error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag); } }; } var SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning'; var SUSPENSE_START_DATA = '$'; var SUSPENSE_END_DATA = '/$'; var SUSPENSE_PENDING_START_DATA = '$?'; var SUSPENSE_FALLBACK_START_DATA = '$!'; var STYLE$1 = 'style'; var eventsEnabled = null; var selectionInformation = null; function getRootHostContext(rootContainerInstance) { var type; var namespace; var nodeType = rootContainerInstance.nodeType; switch (nodeType) { case DOCUMENT_NODE: case DOCUMENT_FRAGMENT_NODE: { type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment'; var root = rootContainerInstance.documentElement; namespace = root ? root.namespaceURI : getChildNamespace(null, ''); break; } default: { var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance; var ownNamespace = container.namespaceURI || null; type = container.tagName; namespace = getChildNamespace(ownNamespace, type); break; } } { var validatedTag = type.toLowerCase(); var ancestorInfo = updatedAncestorInfo(null, validatedTag); return { namespace: namespace, ancestorInfo: ancestorInfo }; } } function getChildHostContext(parentHostContext, type, rootContainerInstance) { { var parentHostContextDev = parentHostContext; var namespace = getChildNamespace(parentHostContextDev.namespace, type); var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type); return { namespace: namespace, ancestorInfo: ancestorInfo }; } } function getPublicInstance(instance) { return instance; } function prepareForCommit(containerInfo) { eventsEnabled = isEnabled(); selectionInformation = getSelectionInformation(); var activeInstance = null; setEnabled(false); return activeInstance; } function resetAfterCommit(containerInfo) { restoreSelection(selectionInformation); setEnabled(eventsEnabled); eventsEnabled = null; selectionInformation = null; } function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) { var parentNamespace; { // TODO: take namespace into account when validating. var hostContextDev = hostContext; validateDOMNesting(type, null, hostContextDev.ancestorInfo); if (typeof props.children === 'string' || typeof props.children === 'number') { var string = '' + props.children; var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type); validateDOMNesting(null, string, ownAncestorInfo); } parentNamespace = hostContextDev.namespace; } var domElement = createElement(type, props, rootContainerInstance, parentNamespace); precacheFiberNode(internalInstanceHandle, domElement); updateFiberProps(domElement, props); return domElement; } function appendInitialChild(parentInstance, child) { parentInstance.appendChild(child); } function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) { setInitialProperties(domElement, type, props, rootContainerInstance); switch (type) { case 'button': case 'input': case 'select': case 'textarea': return !!props.autoFocus; case 'img': return true; default: return false; } } function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) { { var hostContextDev = hostContext; if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) { var string = '' + newProps.children; var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type); validateDOMNesting(null, string, ownAncestorInfo); } } return diffProperties(domElement, type, oldProps, newProps); } function shouldSetTextContent(type, props) { return type === 'textarea' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null; } function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) { { var hostContextDev = hostContext; validateDOMNesting(null, text, hostContextDev.ancestorInfo); } var textNode = createTextNode(text, rootContainerInstance); precacheFiberNode(internalInstanceHandle, textNode); return textNode; } function getCurrentEventPriority() { var currentEvent = window.event; if (currentEvent === undefined) { return DefaultEventPriority; } return getEventPriority(currentEvent.type); } // if a component just imports ReactDOM (e.g. for findDOMNode). // Some environments might not have setTimeout or clearTimeout. var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined; var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined; var noTimeout = -1; var localPromise = typeof Promise === 'function' ? Promise : undefined; // ------------------- var scheduleMicrotask = typeof queueMicrotask === 'function' ? queueMicrotask : typeof localPromise !== 'undefined' ? function (callback) { return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick); } : scheduleTimeout; // TODO: Determine the best fallback here. function handleErrorInNextTick(error) { setTimeout(function () { throw error; }); } // ------------------- function commitMount(domElement, type, newProps, internalInstanceHandle) { // Despite the naming that might imply otherwise, this method only // fires if there is an `Update` effect scheduled during mounting. // This happens if `finalizeInitialChildren` returns `true` (which it // does to implement the `autoFocus` attribute on the client). But // there are also other cases when this might happen (such as patching // up text content during hydration mismatch). So we'll check this again. switch (type) { case 'button': case 'input': case 'select': case 'textarea': if (newProps.autoFocus) { domElement.focus(); } return; case 'img': { if (newProps.src) { domElement.src = newProps.src; } return; } } } function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) { // Apply the diff to the DOM node. updateProperties(domElement, updatePayload, type, oldProps, newProps); // Update the props handle so that we know which props are the ones with // with current event handlers. updateFiberProps(domElement, newProps); } function resetTextContent(domElement) { setTextContent(domElement, ''); } function commitTextUpdate(textInstance, oldText, newText) { textInstance.nodeValue = newText; } function appendChild(parentInstance, child) { parentInstance.appendChild(child); } function appendChildToContainer(container, child) { var parentNode; if (container.nodeType === COMMENT_NODE) { parentNode = container.parentNode; parentNode.insertBefore(child, container); } else { parentNode = container; parentNode.appendChild(child); } // This container might be used for a portal. // If something inside a portal is clicked, that click should bubble // through the React tree. However, on Mobile Safari the click would // never bubble through the *DOM* tree unless an ancestor with onclick // event exists. So we wouldn't see it and dispatch it. // This is why we ensure that non React root containers have inline onclick // defined. // https://github.com/facebook/react/issues/11918 var reactRootContainer = container._reactRootContainer; if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) { // TODO: This cast may not be sound for SVG, MathML or custom elements. trapClickOnNonInteractiveElement(parentNode); } } function insertBefore(parentInstance, child, beforeChild) { parentInstance.insertBefore(child, beforeChild); } function insertInContainerBefore(container, child, beforeChild) { if (container.nodeType === COMMENT_NODE) { container.parentNode.insertBefore(child, beforeChild); } else { container.insertBefore(child, beforeChild); } } function removeChild(parentInstance, child) { parentInstance.removeChild(child); } function removeChildFromContainer(container, child) { if (container.nodeType === COMMENT_NODE) { container.parentNode.removeChild(child); } else { container.removeChild(child); } } function clearSuspenseBoundary(parentInstance, suspenseInstance) { var node = suspenseInstance; // Delete all nodes within this suspense boundary. // There might be nested nodes so we need to keep track of how // deep we are and only break out when we're back on top. var depth = 0; do { var nextNode = node.nextSibling; parentInstance.removeChild(node); if (nextNode && nextNode.nodeType === COMMENT_NODE) { var data = nextNode.data; if (data === SUSPENSE_END_DATA) { if (depth === 0) { parentInstance.removeChild(nextNode); // Retry if any event replaying was blocked on this. retryIfBlockedOn(suspenseInstance); return; } else { depth--; } } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_FALLBACK_START_DATA) { depth++; } } node = nextNode; } while (node); // TODO: Warn, we didn't find the end comment boundary. // Retry if any event replaying was blocked on this. retryIfBlockedOn(suspenseInstance); } function clearSuspenseBoundaryFromContainer(container, suspenseInstance) { if (container.nodeType === COMMENT_NODE) { clearSuspenseBoundary(container.parentNode, suspenseInstance); } else if (container.nodeType === ELEMENT_NODE) { clearSuspenseBoundary(container, suspenseInstance); } // Retry if any event replaying was blocked on this. retryIfBlockedOn(container); } function hideInstance(instance) { // TODO: Does this work for all element types? What about MathML? Should we // pass host context to this method? instance = instance; var style = instance.style; if (typeof style.setProperty === 'function') { style.setProperty('display', 'none', 'important'); } else { style.display = 'none'; } } function hideTextInstance(textInstance) { textInstance.nodeValue = ''; } function unhideInstance(instance, props) { instance = instance; var styleProp = props[STYLE$1]; var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null; instance.style.display = dangerousStyleValue('display', display); } function unhideTextInstance(textInstance, text) { textInstance.nodeValue = text; } function clearContainer(container) { if (container.nodeType === ELEMENT_NODE) { container.textContent = ''; } else if (container.nodeType === DOCUMENT_NODE) { if (container.documentElement) { container.removeChild(container.documentElement); } } } // ------------------- function canHydrateInstance(instance, type, props) { if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) { return null; } // This has now been refined to an element node. return instance; } function canHydrateTextInstance(instance, text) { if (text === '' || instance.nodeType !== TEXT_NODE) { // Empty strings are not parsed by HTML so there won't be a correct match here. return null; } // This has now been refined to a text node. return instance; } function canHydrateSuspenseInstance(instance) { if (instance.nodeType !== COMMENT_NODE) { // Empty strings are not parsed by HTML so there won't be a correct match here. return null; } // This has now been refined to a suspense node. return instance; } function isSuspenseInstancePending(instance) { return instance.data === SUSPENSE_PENDING_START_DATA; } function isSuspenseInstanceFallback(instance) { return instance.data === SUSPENSE_FALLBACK_START_DATA; } function getSuspenseInstanceFallbackErrorDetails(instance) { var dataset = instance.nextSibling && instance.nextSibling.dataset; var digest, message, stack; if (dataset) { digest = dataset.dgst; { message = dataset.msg; stack = dataset.stck; } } { return { message: message, digest: digest, stack: stack }; } // let value = {message: undefined, hash: undefined}; // const nextSibling = instance.nextSibling; // if (nextSibling) { // const dataset = ((nextSibling: any): HTMLTemplateElement).dataset; // value.message = dataset.msg; // value.hash = dataset.hash; // if (true) { // value.stack = dataset.stack; // } // } // return value; } function registerSuspenseInstanceRetry(instance, callback) { instance._reactRetry = callback; } function getNextHydratable(node) { // Skip non-hydratable nodes. for (; node != null; node = node.nextSibling) { var nodeType = node.nodeType; if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) { break; } if (nodeType === COMMENT_NODE) { var nodeData = node.data; if (nodeData === SUSPENSE_START_DATA || nodeData === SUSPENSE_FALLBACK_START_DATA || nodeData === SUSPENSE_PENDING_START_DATA) { break; } if (nodeData === SUSPENSE_END_DATA) { return null; } } } return node; } function getNextHydratableSibling(instance) { return getNextHydratable(instance.nextSibling); } function getFirstHydratableChild(parentInstance) { return getNextHydratable(parentInstance.firstChild); } function getFirstHydratableChildWithinContainer(parentContainer) { return getNextHydratable(parentContainer.firstChild); } function getFirstHydratableChildWithinSuspenseInstance(parentInstance) { return getNextHydratable(parentInstance.nextSibling); } function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle, shouldWarnDev) { precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events // get attached. updateFiberProps(instance, props); var parentNamespace; { var hostContextDev = hostContext; parentNamespace = hostContextDev.namespace; } // TODO: Temporary hack to check if we're in a concurrent root. We can delete // when the legacy root API is removed. var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode; return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance, isConcurrentMode, shouldWarnDev); } function hydrateTextInstance(textInstance, text, internalInstanceHandle, shouldWarnDev) { precacheFiberNode(internalInstanceHandle, textInstance); // TODO: Temporary hack to check if we're in a concurrent root. We can delete // when the legacy root API is removed. var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode; return diffHydratedText(textInstance, text); } function hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) { precacheFiberNode(internalInstanceHandle, suspenseInstance); } function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) { var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary. // There might be nested nodes so we need to keep track of how // deep we are and only break out when we're back on top. var depth = 0; while (node) { if (node.nodeType === COMMENT_NODE) { var data = node.data; if (data === SUSPENSE_END_DATA) { if (depth === 0) { return getNextHydratableSibling(node); } else { depth--; } } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) { depth++; } } node = node.nextSibling; } // TODO: Warn, we didn't find the end comment boundary. return null; } // Returns the SuspenseInstance if this node is a direct child of a // SuspenseInstance. I.e. if its previous sibling is a Comment with // SUSPENSE_x_START_DATA. Otherwise, null. function getParentSuspenseInstance(targetInstance) { var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary. // There might be nested nodes so we need to keep track of how // deep we are and only break out when we're back on top. var depth = 0; while (node) { if (node.nodeType === COMMENT_NODE) { var data = node.data; if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) { if (depth === 0) { return node; } else { depth--; } } else if (data === SUSPENSE_END_DATA) { depth++; } } node = node.previousSibling; } return null; } function commitHydratedContainer(container) { // Retry if any event replaying was blocked on this. retryIfBlockedOn(container); } function commitHydratedSuspenseInstance(suspenseInstance) { // Retry if any event replaying was blocked on this. retryIfBlockedOn(suspenseInstance); } function shouldDeleteUnhydratedTailInstances(parentType) { return parentType !== 'head' && parentType !== 'body'; } function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text, isConcurrentMode) { var shouldWarnDev = true; checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev); } function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text, isConcurrentMode) { if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) { var shouldWarnDev = true; checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev); } } function didNotHydrateInstanceWithinContainer(parentContainer, instance) { { if (instance.nodeType === ELEMENT_NODE) { warnForDeletedHydratableElement(parentContainer, instance); } else if (instance.nodeType === COMMENT_NODE) ; else { warnForDeletedHydratableText(parentContainer, instance); } } } function didNotHydrateInstanceWithinSuspenseInstance(parentInstance, instance) { { // $FlowFixMe: Only Element or Document can be parent nodes. var parentNode = parentInstance.parentNode; if (parentNode !== null) { if (instance.nodeType === ELEMENT_NODE) { warnForDeletedHydratableElement(parentNode, instance); } else if (instance.nodeType === COMMENT_NODE) ; else { warnForDeletedHydratableText(parentNode, instance); } } } } function didNotHydrateInstance(parentType, parentProps, parentInstance, instance, isConcurrentMode) { { if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) { if (instance.nodeType === ELEMENT_NODE) { warnForDeletedHydratableElement(parentInstance, instance); } else if (instance.nodeType === COMMENT_NODE) ; else { warnForDeletedHydratableText(parentInstance, instance); } } } } function didNotFindHydratableInstanceWithinContainer(parentContainer, type, props) { { warnForInsertedHydratedElement(parentContainer, type); } } function didNotFindHydratableTextInstanceWithinContainer(parentContainer, text) { { warnForInsertedHydratedText(parentContainer, text); } } function didNotFindHydratableInstanceWithinSuspenseInstance(parentInstance, type, props) { { // $FlowFixMe: Only Element or Document can be parent nodes. var parentNode = parentInstance.parentNode; if (parentNode !== null) warnForInsertedHydratedElement(parentNode, type); } } function didNotFindHydratableTextInstanceWithinSuspenseInstance(parentInstance, text) { { // $FlowFixMe: Only Element or Document can be parent nodes. var parentNode = parentInstance.parentNode; if (parentNode !== null) warnForInsertedHydratedText(parentNode, text); } } function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props, isConcurrentMode) { { if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) { warnForInsertedHydratedElement(parentInstance, type); } } } function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text, isConcurrentMode) { { if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) { warnForInsertedHydratedText(parentInstance, text); } } } function errorHydratingContainer(parentContainer) { { // TODO: This gets logged by onRecoverableError, too, so we should be // able to remove it. error('An error occurred during hydration. The server HTML was replaced with client content in <%s>.', parentContainer.nodeName.toLowerCase()); } } function preparePortalMount(portalInstance) { listenToAllSupportedEvents(portalInstance); } var randomKey = Math.random().toString(36).slice(2); var internalInstanceKey = '__reactFiber$' + randomKey; var internalPropsKey = '__reactProps$' + randomKey; var internalContainerInstanceKey = '__reactContainer$' + randomKey; var internalEventHandlersKey = '__reactEvents$' + randomKey; var internalEventHandlerListenersKey = '__reactListeners$' + randomKey; var internalEventHandlesSetKey = '__reactHandles$' + randomKey; function detachDeletedInstance(node) { // TODO: This function is only called on host components. I don't think all of // these fields are relevant. delete node[internalInstanceKey]; delete node[internalPropsKey]; delete node[internalEventHandlersKey]; delete node[internalEventHandlerListenersKey]; delete node[internalEventHandlesSetKey]; } function precacheFiberNode(hostInst, node) { node[internalInstanceKey] = hostInst; } function markContainerAsRoot(hostRoot, node) { node[internalContainerInstanceKey] = hostRoot; } function unmarkContainerAsRoot(node) { node[internalContainerInstanceKey] = null; } function isContainerMarkedAsRoot(node) { return !!node[internalContainerInstanceKey]; } // Given a DOM node, return the closest HostComponent or HostText fiber ancestor. // If the target node is part of a hydrated or not yet rendered subtree, then // this may also return a SuspenseComponent or HostRoot to indicate that. // Conceptually the HostRoot fiber is a child of the Container node. So if you // pass the Container node as the targetNode, you will not actually get the // HostRoot back. To get to the HostRoot, you need to pass a child of it. // The same thing applies to Suspense boundaries. function getClosestInstanceFromNode(targetNode) { var targetInst = targetNode[internalInstanceKey]; if (targetInst) { // Don't return HostRoot or SuspenseComponent here. return targetInst; } // If the direct event target isn't a React owned DOM node, we need to look // to see if one of its parents is a React owned DOM node. var parentNode = targetNode.parentNode; while (parentNode) { // We'll check if this is a container root that could include // React nodes in the future. We need to check this first because // if we're a child of a dehydrated container, we need to first // find that inner container before moving on to finding the parent // instance. Note that we don't check this field on the targetNode // itself because the fibers are conceptually between the container // node and the first child. It isn't surrounding the container node. // If it's not a container, we check if it's an instance. targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]; if (targetInst) { // Since this wasn't the direct target of the event, we might have // stepped past dehydrated DOM nodes to get here. However they could // also have been non-React nodes. We need to answer which one. // If we the instance doesn't have any children, then there can't be // a nested suspense boundary within it. So we can use this as a fast // bailout. Most of the time, when people add non-React children to // the tree, it is using a ref to a child-less DOM node. // Normally we'd only need to check one of the fibers because if it // has ever gone from having children to deleting them or vice versa // it would have deleted the dehydrated boundary nested inside already. // However, since the HostRoot starts out with an alternate it might // have one on the alternate so we need to check in case this was a // root. var alternate = targetInst.alternate; if (targetInst.child !== null || alternate !== null && alternate.child !== null) { // Next we need to figure out if the node that skipped past is // nested within a dehydrated boundary and if so, which one. var suspenseInstance = getParentSuspenseInstance(targetNode); while (suspenseInstance !== null) { // We found a suspense instance. That means that we haven't // hydrated it yet. Even though we leave the comments in the // DOM after hydrating, and there are boundaries in the DOM // that could already be hydrated, we wouldn't have found them // through this pass since if the target is hydrated it would // have had an internalInstanceKey on it. // Let's get the fiber associated with the SuspenseComponent // as the deepest instance. var targetSuspenseInst = suspenseInstance[internalInstanceKey]; if (targetSuspenseInst) { return targetSuspenseInst; } // If we don't find a Fiber on the comment, it might be because // we haven't gotten to hydrate it yet. There might still be a // parent boundary that hasn't above this one so we need to find // the outer most that is known. suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent // host component also hasn't hydrated yet. We can return it // below since it will bail out on the isMounted check later. } } return targetInst; } targetNode = parentNode; parentNode = targetNode.parentNode; } return null; } /** * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent * instance, or null if the node was not rendered by this React. */ function getInstanceFromNode(node) { var inst = node[internalInstanceKey] || node[internalContainerInstanceKey]; if (inst) { if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) { return inst; } else { return null; } } return null; } /** * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding * DOM node. */ function getNodeFromInstance(inst) { if (inst.tag === HostComponent || inst.tag === HostText) { // In Fiber this, is just the state node right now. We assume it will be // a host component or host text. return inst.stateNode; } // Without this first invariant, passing a non-DOM-component triggers the next // invariant for a missing parent, which is super confusing. throw new Error('getNodeFromInstance: Invalid argument.'); } function getFiberCurrentPropsFromNode(node) { return node[internalPropsKey] || null; } function updateFiberProps(node, props) { node[internalPropsKey] = props; } function getEventListenerSet(node) { var elementListenerSet = node[internalEventHandlersKey]; if (elementListenerSet === undefined) { elementListenerSet = node[internalEventHandlersKey] = new Set(); } return elementListenerSet; } var loggedTypeFailures = {}; var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; function setCurrentlyValidatingElement(element) { { if (element) { var owner = element._owner; var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); ReactDebugCurrentFrame$1.setExtraStackFrame(stack); } else { ReactDebugCurrentFrame$1.setExtraStackFrame(null); } } } function checkPropTypes(typeSpecs, values, location, componentName, element) { { // $FlowFixMe This is okay but Flow doesn't know it. var has = Function.call.bind(hasOwnProperty); for (var typeSpecName in typeSpecs) { if (has(typeSpecs, typeSpecName)) { var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to // fail the render phase where it didn't fail before. So we log it. // After these have been cleaned up, we'll let them throw. try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. if (typeof typeSpecs[typeSpecName] !== 'function') { // eslint-disable-next-line react-internal/prod-error-codes var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'); err.name = 'Invariant Violation'; throw err; } error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'); } catch (ex) { error$1 = ex; } if (error$1 && !(error$1 instanceof Error)) { setCurrentlyValidatingElement(element); error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1); setCurrentlyValidatingElement(null); } if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { // Only monitor this failure once because there tends to be a lot of the // same error. loggedTypeFailures[error$1.message] = true; setCurrentlyValidatingElement(element); error('Failed %s type: %s', location, error$1.message); setCurrentlyValidatingElement(null); } } } } } var valueStack = []; var fiberStack; { fiberStack = []; } var index = -1; function createCursor(defaultValue) { return { current: defaultValue }; } function pop(cursor, fiber) { if (index < 0) { { error('Unexpected pop.'); } return; } { if (fiber !== fiberStack[index]) { error('Unexpected Fiber popped.'); } } cursor.current = valueStack[index]; valueStack[index] = null; { fiberStack[index] = null; } index--; } function push(cursor, value, fiber) { index++; valueStack[index] = cursor.current; { fiberStack[index] = fiber; } cursor.current = value; } var warnedAboutMissingGetChildContext; { warnedAboutMissingGetChildContext = {}; } var emptyContextObject = {}; { Object.freeze(emptyContextObject); } // A cursor to the current merged context object on the stack. var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed. var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack. // We use this to get access to the parent context after we have already // pushed the next context provider, and now need to merge their contexts. var previousContext = emptyContextObject; function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) { { if (didPushOwnContextIfProvider && isContextProvider(Component)) { // If the fiber is a context provider itself, when we read its context // we may have already pushed its own child context on the stack. A context // provider should not "see" its own child context. Therefore we read the // previous (parent) context instead for a context provider. return previousContext; } return contextStackCursor.current; } } function cacheContext(workInProgress, unmaskedContext, maskedContext) { { var instance = workInProgress.stateNode; instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext; instance.__reactInternalMemoizedMaskedChildContext = maskedContext; } } function getMaskedContext(workInProgress, unmaskedContext) { { var type = workInProgress.type; var contextTypes = type.contextTypes; if (!contextTypes) { return emptyContextObject; } // Avoid recreating masked context unless unmasked context has changed. // Failing to do this will result in unnecessary calls to componentWillReceiveProps. // This may trigger infinite loops if componentWillReceiveProps calls setState. var instance = workInProgress.stateNode; if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) { return instance.__reactInternalMemoizedMaskedChildContext; } var context = {}; for (var key in contextTypes) { context[key] = unmaskedContext[key]; } { var name = getComponentNameFromFiber(workInProgress) || 'Unknown'; checkPropTypes(contextTypes, context, 'context', name); } // Cache unmasked context so we can avoid recreating masked context unless necessary. // Context is created before the class component is instantiated so check for instance. if (instance) { cacheContext(workInProgress, unmaskedContext, context); } return context; } } function hasContextChanged() { { return didPerformWorkStackCursor.current; } } function isContextProvider(type) { { var childContextTypes = type.childContextTypes; return childContextTypes !== null && childContextTypes !== undefined; } } function popContext(fiber) { { pop(didPerformWorkStackCursor, fiber); pop(contextStackCursor, fiber); } } function popTopLevelContextObject(fiber) { { pop(didPerformWorkStackCursor, fiber); pop(contextStackCursor, fiber); } } function pushTopLevelContextObject(fiber, context, didChange) { { if (contextStackCursor.current !== emptyContextObject) { throw new Error('Unexpected context found on stack. ' + 'This error is likely caused by a bug in React. Please file an issue.'); } push(contextStackCursor, context, fiber); push(didPerformWorkStackCursor, didChange, fiber); } } function processChildContext(fiber, type, parentContext) { { var instance = fiber.stateNode; var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future. // It has only been added in Fiber to match the (unintentional) behavior in Stack. if (typeof instance.getChildContext !== 'function') { { var componentName = getComponentNameFromFiber(fiber) || 'Unknown'; if (!warnedAboutMissingGetChildContext[componentName]) { warnedAboutMissingGetChildContext[componentName] = true; error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName); } } return parentContext; } var childContext = instance.getChildContext(); for (var contextKey in childContext) { if (!(contextKey in childContextTypes)) { throw new Error((getComponentNameFromFiber(fiber) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes."); } } { var name = getComponentNameFromFiber(fiber) || 'Unknown'; checkPropTypes(childContextTypes, childContext, 'child context', name); } return assign({}, parentContext, childContext); } } function pushContextProvider(workInProgress) { { var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity. // If the instance does not exist yet, we will push null at first, // and replace it on the stack later when invalidating the context. var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later. // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates. previousContext = contextStackCursor.current; push(contextStackCursor, memoizedMergedChildContext, workInProgress); push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress); return true; } } function invalidateContextProvider(workInProgress, type, didChange) { { var instance = workInProgress.stateNode; if (!instance) { throw new Error('Expected to have an instance by this point. ' + 'This error is likely caused by a bug in React. Please file an issue.'); } if (didChange) { // Merge parent and own context. // Skip this if we're not updating due to sCU. // This avoids unnecessarily recomputing memoized values. var mergedContext = processChildContext(workInProgress, type, previousContext); instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one. // It is important to unwind the context in the reverse order. pop(didPerformWorkStackCursor, workInProgress); pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed. push(contextStackCursor, mergedContext, workInProgress); push(didPerformWorkStackCursor, didChange, workInProgress); } else { pop(didPerformWorkStackCursor, workInProgress); push(didPerformWorkStackCursor, didChange, workInProgress); } } } function findCurrentUnmaskedContext(fiber) { { // Currently this is only used with renderSubtreeIntoContainer; not sure if it // makes sense elsewhere if (!isFiberMounted(fiber) || fiber.tag !== ClassComponent) { throw new Error('Expected subtree parent to be a mounted class component. ' + 'This error is likely caused by a bug in React. Please file an issue.'); } var node = fiber; do { switch (node.tag) { case HostRoot: return node.stateNode.context; case ClassComponent: { var Component = node.type; if (isContextProvider(Component)) { return node.stateNode.__reactInternalMemoizedMergedChildContext; } break; } } node = node.return; } while (node !== null); throw new Error('Found unexpected detached subtree parent. ' + 'This error is likely caused by a bug in React. Please file an issue.'); } } var LegacyRoot = 0; var ConcurrentRoot = 1; var syncQueue = null; var includesLegacySyncCallbacks = false; var isFlushingSyncQueue = false; function scheduleSyncCallback(callback) { // Push this callback into an internal queue. We'll flush these either in // the next tick, or earlier if something calls `flushSyncCallbackQueue`. if (syncQueue === null) { syncQueue = [callback]; } else { // Push onto existing queue. Don't need to schedule a callback because // we already scheduled one when we created the queue. syncQueue.push(callback); } } function scheduleLegacySyncCallback(callback) { includesLegacySyncCallbacks = true; scheduleSyncCallback(callback); } function flushSyncCallbacksOnlyInLegacyMode() { // Only flushes the queue if there's a legacy sync callback scheduled. // TODO: There's only a single type of callback: performSyncOnWorkOnRoot. So // it might make more sense for the queue to be a list of roots instead of a // list of generic callbacks. Then we can have two: one for legacy roots, one // for concurrent roots. And this method would only flush the legacy ones. if (includesLegacySyncCallbacks) { flushSyncCallbacks(); } } function flushSyncCallbacks() { if (!isFlushingSyncQueue && syncQueue !== null) { // Prevent re-entrance. isFlushingSyncQueue = true; var i = 0; var previousUpdatePriority = getCurrentUpdatePriority(); try { var isSync = true; var queue = syncQueue; // TODO: Is this necessary anymore? The only user code that runs in this // queue is in the render or commit phases. setCurrentUpdatePriority(DiscreteEventPriority); for (; i < queue.length; i++) { var callback = queue[i]; do { callback = callback(isSync); } while (callback !== null); } syncQueue = null; includesLegacySyncCallbacks = false; } catch (error) { // If something throws, leave the remaining callbacks on the queue. if (syncQueue !== null) { syncQueue = syncQueue.slice(i + 1); } // Resume flushing in the next tick scheduleCallback(ImmediatePriority, flushSyncCallbacks); throw error; } finally { setCurrentUpdatePriority(previousUpdatePriority); isFlushingSyncQueue = false; } } return null; } // TODO: Use the unified fiber stack module instead of this local one? // Intentionally not using it yet to derisk the initial implementation, because // the way we push/pop these values is a bit unusual. If there's a mistake, I'd // rather the ids be wrong than crash the whole reconciler. var forkStack = []; var forkStackIndex = 0; var treeForkProvider = null; var treeForkCount = 0; var idStack = []; var idStackIndex = 0; var treeContextProvider = null; var treeContextId = 1; var treeContextOverflow = ''; function isForkedChild(workInProgress) { warnIfNotHydrating(); return (workInProgress.flags & Forked) !== NoFlags; } function getForksAtLevel(workInProgress) { warnIfNotHydrating(); return treeForkCount; } function getTreeId() { var overflow = treeContextOverflow; var idWithLeadingBit = treeContextId; var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit); return id.toString(32) + overflow; } function pushTreeFork(workInProgress, totalChildren) { // This is called right after we reconcile an array (or iterator) of child // fibers, because that's the only place where we know how many children in // the whole set without doing extra work later, or storing addtional // information on the fiber. // // That's why this function is separate from pushTreeId — it's called during // the render phase of the fork parent, not the child, which is where we push // the other context values. // // In the Fizz implementation this is much simpler because the child is // rendered in the same callstack as the parent. // // It might be better to just add a `forks` field to the Fiber type. It would // make this module simpler. warnIfNotHydrating(); forkStack[forkStackIndex++] = treeForkCount; forkStack[forkStackIndex++] = treeForkProvider; treeForkProvider = workInProgress; treeForkCount = totalChildren; } function pushTreeId(workInProgress, totalChildren, index) { warnIfNotHydrating(); idStack[idStackIndex++] = treeContextId; idStack[idStackIndex++] = treeContextOverflow; idStack[idStackIndex++] = treeContextProvider; treeContextProvider = workInProgress; var baseIdWithLeadingBit = treeContextId; var baseOverflow = treeContextOverflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part // of the id; we use it to account for leading 0s. var baseLength = getBitLength(baseIdWithLeadingBit) - 1; var baseId = baseIdWithLeadingBit & ~(1 << baseLength); var slot = index + 1; var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into // consideration the leading 1 we use to mark the end of the sequence. if (length > 30) { // We overflowed the bitwise-safe range. Fall back to slower algorithm. // This branch assumes the length of the base id is greater than 5; it won't // work for smaller ids, because you need 5 bits per character. // // We encode the id in multiple steps: first the base id, then the // remaining digits. // // Each 5 bit sequence corresponds to a single base 32 character. So for // example, if the current id is 23 bits long, we can convert 20 of those // bits into a string of 4 characters, with 3 bits left over. // // First calculate how many bits in the base id represent a complete // sequence of characters. var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits. var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string. var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id. var restOfBaseId = baseId >> numberOfOverflowBits; var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because // we made more room, this time it won't overflow. var restOfLength = getBitLength(totalChildren) + restOfBaseLength; var restOfNewBits = slot << restOfBaseLength; var id = restOfNewBits | restOfBaseId; var overflow = newOverflow + baseOverflow; treeContextId = 1 << restOfLength | id; treeContextOverflow = overflow; } else { // Normal path var newBits = slot << baseLength; var _id = newBits | baseId; var _overflow = baseOverflow; treeContextId = 1 << length | _id; treeContextOverflow = _overflow; } } function pushMaterializedTreeId(workInProgress) { warnIfNotHydrating(); // This component materialized an id. This will affect any ids that appear // in its children. var returnFiber = workInProgress.return; if (returnFiber !== null) { var numberOfForks = 1; var slotIndex = 0; pushTreeFork(workInProgress, numberOfForks); pushTreeId(workInProgress, numberOfForks, slotIndex); } } function getBitLength(number) { return 32 - clz32(number); } function getLeadingBit(id) { return 1 << getBitLength(id) - 1; } function popTreeContext(workInProgress) { // Restore the previous values. // This is a bit more complicated than other context-like modules in Fiber // because the same Fiber may appear on the stack multiple times and for // different reasons. We have to keep popping until the work-in-progress is // no longer at the top of the stack. while (workInProgress === treeForkProvider) { treeForkProvider = forkStack[--forkStackIndex]; forkStack[forkStackIndex] = null; treeForkCount = forkStack[--forkStackIndex]; forkStack[forkStackIndex] = null; } while (workInProgress === treeContextProvider) { treeContextProvider = idStack[--idStackIndex]; idStack[idStackIndex] = null; treeContextOverflow = idStack[--idStackIndex]; idStack[idStackIndex] = null; treeContextId = idStack[--idStackIndex]; idStack[idStackIndex] = null; } } function getSuspendedTreeContext() { warnIfNotHydrating(); if (treeContextProvider !== null) { return { id: treeContextId, overflow: treeContextOverflow }; } else { return null; } } function restoreSuspendedTreeContext(workInProgress, suspendedContext) { warnIfNotHydrating(); idStack[idStackIndex++] = treeContextId; idStack[idStackIndex++] = treeContextOverflow; idStack[idStackIndex++] = treeContextProvider; treeContextId = suspendedContext.id; treeContextOverflow = suspendedContext.overflow; treeContextProvider = workInProgress; } function warnIfNotHydrating() { { if (!getIsHydrating()) { error('Expected to be hydrating. This is a bug in React. Please file ' + 'an issue.'); } } } // This may have been an insertion or a hydration. var hydrationParentFiber = null; var nextHydratableInstance = null; var isHydrating = false; // This flag allows for warning supression when we expect there to be mismatches // due to earlier mismatches or a suspended fiber. var didSuspendOrErrorDEV = false; // Hydration errors that were thrown inside this boundary var hydrationErrors = null; function warnIfHydrating() { { if (isHydrating) { error('We should not be hydrating here. This is a bug in React. Please file a bug.'); } } } function markDidThrowWhileHydratingDEV() { { didSuspendOrErrorDEV = true; } } function didSuspendOrErrorWhileHydratingDEV() { { return didSuspendOrErrorDEV; } } function enterHydrationState(fiber) { var parentInstance = fiber.stateNode.containerInfo; nextHydratableInstance = getFirstHydratableChildWithinContainer(parentInstance); hydrationParentFiber = fiber; isHydrating = true; hydrationErrors = null; didSuspendOrErrorDEV = false; return true; } function reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance, treeContext) { nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(suspenseInstance); hydrationParentFiber = fiber; isHydrating = true; hydrationErrors = null; didSuspendOrErrorDEV = false; if (treeContext !== null) { restoreSuspendedTreeContext(fiber, treeContext); } return true; } function warnUnhydratedInstance(returnFiber, instance) { { switch (returnFiber.tag) { case HostRoot: { didNotHydrateInstanceWithinContainer(returnFiber.stateNode.containerInfo, instance); break; } case HostComponent: { var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode; didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance, // TODO: Delete this argument when we remove the legacy root API. isConcurrentMode); break; } case SuspenseComponent: { var suspenseState = returnFiber.memoizedState; if (suspenseState.dehydrated !== null) didNotHydrateInstanceWithinSuspenseInstance(suspenseState.dehydrated, instance); break; } } } } function deleteHydratableInstance(returnFiber, instance) { warnUnhydratedInstance(returnFiber, instance); var childToDelete = createFiberFromHostInstanceForDeletion(); childToDelete.stateNode = instance; childToDelete.return = returnFiber; var deletions = returnFiber.deletions; if (deletions === null) { returnFiber.deletions = [childToDelete]; returnFiber.flags |= ChildDeletion; } else { deletions.push(childToDelete); } } function warnNonhydratedInstance(returnFiber, fiber) { { if (didSuspendOrErrorDEV) { // Inside a boundary that already suspended. We're currently rendering the // siblings of a suspended node. The mismatch may be due to the missing // data, so it's probably a false positive. return; } switch (returnFiber.tag) { case HostRoot: { var parentContainer = returnFiber.stateNode.containerInfo; switch (fiber.tag) { case HostComponent: var type = fiber.type; var props = fiber.pendingProps; didNotFindHydratableInstanceWithinContainer(parentContainer, type); break; case HostText: var text = fiber.pendingProps; didNotFindHydratableTextInstanceWithinContainer(parentContainer, text); break; } break; } case HostComponent: { var parentType = returnFiber.type; var parentProps = returnFiber.memoizedProps; var parentInstance = returnFiber.stateNode; switch (fiber.tag) { case HostComponent: { var _type = fiber.type; var _props = fiber.pendingProps; var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode; didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props, // TODO: Delete this argument when we remove the legacy root API. isConcurrentMode); break; } case HostText: { var _text = fiber.pendingProps; var _isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode; didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text, // TODO: Delete this argument when we remove the legacy root API. _isConcurrentMode); break; } } break; } case SuspenseComponent: { var suspenseState = returnFiber.memoizedState; var _parentInstance = suspenseState.dehydrated; if (_parentInstance !== null) switch (fiber.tag) { case HostComponent: var _type2 = fiber.type; var _props2 = fiber.pendingProps; didNotFindHydratableInstanceWithinSuspenseInstance(_parentInstance, _type2); break; case HostText: var _text2 = fiber.pendingProps; didNotFindHydratableTextInstanceWithinSuspenseInstance(_parentInstance, _text2); break; } break; } default: return; } } } function insertNonHydratedInstance(returnFiber, fiber) { fiber.flags = fiber.flags & ~Hydrating | Placement; warnNonhydratedInstance(returnFiber, fiber); } function tryHydrate(fiber, nextInstance) { switch (fiber.tag) { case HostComponent: { var type = fiber.type; var props = fiber.pendingProps; var instance = canHydrateInstance(nextInstance, type); if (instance !== null) { fiber.stateNode = instance; hydrationParentFiber = fiber; nextHydratableInstance = getFirstHydratableChild(instance); return true; } return false; } case HostText: { var text = fiber.pendingProps; var textInstance = canHydrateTextInstance(nextInstance, text); if (textInstance !== null) { fiber.stateNode = textInstance; hydrationParentFiber = fiber; // Text Instances don't have children so there's nothing to hydrate. nextHydratableInstance = null; return true; } return false; } case SuspenseComponent: { var suspenseInstance = canHydrateSuspenseInstance(nextInstance); if (suspenseInstance !== null) { var suspenseState = { dehydrated: suspenseInstance, treeContext: getSuspendedTreeContext(), retryLane: OffscreenLane }; fiber.memoizedState = suspenseState; // Store the dehydrated fragment as a child fiber. // This simplifies the code for getHostSibling and deleting nodes, // since it doesn't have to consider all Suspense boundaries and // check if they're dehydrated ones or not. var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance); dehydratedFragment.return = fiber; fiber.child = dehydratedFragment; hydrationParentFiber = fiber; // While a Suspense Instance does have children, we won't step into // it during the first pass. Instead, we'll reenter it later. nextHydratableInstance = null; return true; } return false; } default: return false; } } function shouldClientRenderOnMismatch(fiber) { return (fiber.mode & ConcurrentMode) !== NoMode && (fiber.flags & DidCapture) === NoFlags; } function throwOnHydrationMismatch(fiber) { throw new Error('Hydration failed because the initial UI does not match what was ' + 'rendered on the server.'); } function tryToClaimNextHydratableInstance(fiber) { if (!isHydrating) { return; } var nextInstance = nextHydratableInstance; if (!nextInstance) { if (shouldClientRenderOnMismatch(fiber)) { warnNonhydratedInstance(hydrationParentFiber, fiber); throwOnHydrationMismatch(); } // Nothing to hydrate. Make it an insertion. insertNonHydratedInstance(hydrationParentFiber, fiber); isHydrating = false; hydrationParentFiber = fiber; return; } var firstAttemptedInstance = nextInstance; if (!tryHydrate(fiber, nextInstance)) { if (shouldClientRenderOnMismatch(fiber)) { warnNonhydratedInstance(hydrationParentFiber, fiber); throwOnHydrationMismatch(); } // If we can't hydrate this instance let's try the next one. // We use this as a heuristic. It's based on intuition and not data so it // might be flawed or unnecessary. nextInstance = getNextHydratableSibling(firstAttemptedInstance); var prevHydrationParentFiber = hydrationParentFiber; if (!nextInstance || !tryHydrate(fiber, nextInstance)) { // Nothing to hydrate. Make it an insertion. insertNonHydratedInstance(hydrationParentFiber, fiber); isHydrating = false; hydrationParentFiber = fiber; return; } // We matched the next one, we'll now assume that the first one was // superfluous and we'll delete it. Since we can't eagerly delete it // we'll have to schedule a deletion. To do that, this node needs a dummy // fiber associated with it. deleteHydratableInstance(prevHydrationParentFiber, firstAttemptedInstance); } } function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) { var instance = fiber.stateNode; var shouldWarnIfMismatchDev = !didSuspendOrErrorDEV; var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber, shouldWarnIfMismatchDev); // TODO: Type this specific to this type of component. fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there // is a new ref we mark this as an update. if (updatePayload !== null) { return true; } return false; } function prepareToHydrateHostTextInstance(fiber) { var textInstance = fiber.stateNode; var textContent = fiber.memoizedProps; var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber); if (shouldUpdate) { // We assume that prepareToHydrateHostTextInstance is called in a context where the // hydration parent is the parent host component of this host text. var returnFiber = hydrationParentFiber; if (returnFiber !== null) { switch (returnFiber.tag) { case HostRoot: { var parentContainer = returnFiber.stateNode.containerInfo; var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode; didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API. isConcurrentMode); break; } case HostComponent: { var parentType = returnFiber.type; var parentProps = returnFiber.memoizedProps; var parentInstance = returnFiber.stateNode; var _isConcurrentMode2 = (returnFiber.mode & ConcurrentMode) !== NoMode; didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API. _isConcurrentMode2); break; } } } } return shouldUpdate; } function prepareToHydrateHostSuspenseInstance(fiber) { var suspenseState = fiber.memoizedState; var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null; if (!suspenseInstance) { throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.'); } hydrateSuspenseInstance(suspenseInstance, fiber); } function skipPastDehydratedSuspenseInstance(fiber) { var suspenseState = fiber.memoizedState; var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null; if (!suspenseInstance) { throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.'); } return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance); } function popToNextHostParent(fiber) { var parent = fiber.return; while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) { parent = parent.return; } hydrationParentFiber = parent; } function popHydrationState(fiber) { if (fiber !== hydrationParentFiber) { // We're deeper than the current hydration context, inside an inserted // tree. return false; } if (!isHydrating) { // If we're not currently hydrating but we're in a hydration context, then // we were an insertion and now need to pop up reenter hydration of our // siblings. popToNextHostParent(fiber); isHydrating = true; return false; } // If we have any remaining hydratable nodes, we need to delete them now. // We only do this deeper than head and body since they tend to have random // other nodes in them. We also ignore components with pure text content in // side of them. We also don't delete anything inside the root container. if (fiber.tag !== HostRoot && (fiber.tag !== HostComponent || shouldDeleteUnhydratedTailInstances(fiber.type) && !shouldSetTextContent(fiber.type, fiber.memoizedProps))) { var nextInstance = nextHydratableInstance; if (nextInstance) { if (shouldClientRenderOnMismatch(fiber)) { warnIfUnhydratedTailNodes(fiber); throwOnHydrationMismatch(); } else { while (nextInstance) { deleteHydratableInstance(fiber, nextInstance); nextInstance = getNextHydratableSibling(nextInstance); } } } } popToNextHostParent(fiber); if (fiber.tag === SuspenseComponent) { nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber); } else { nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null; } return true; } function hasUnhydratedTailNodes() { return isHydrating && nextHydratableInstance !== null; } function warnIfUnhydratedTailNodes(fiber) { var nextInstance = nextHydratableInstance; while (nextInstance) { warnUnhydratedInstance(fiber, nextInstance); nextInstance = getNextHydratableSibling(nextInstance); } } function resetHydrationState() { hydrationParentFiber = null; nextHydratableInstance = null; isHydrating = false; didSuspendOrErrorDEV = false; } function upgradeHydrationErrorsToRecoverable() { if (hydrationErrors !== null) { // Successfully completed a forced client render. The errors that occurred // during the hydration attempt are now recovered. We will log them in // commit phase, once the entire tree has finished. queueRecoverableErrors(hydrationErrors); hydrationErrors = null; } } function getIsHydrating() { return isHydrating; } function queueHydrationError(error) { if (hydrationErrors === null) { hydrationErrors = [error]; } else { hydrationErrors.push(error); } } var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig; var NoTransition = null; function requestCurrentTransition() { return ReactCurrentBatchConfig$1.transition; } var ReactStrictModeWarnings = { recordUnsafeLifecycleWarnings: function (fiber, instance) {}, flushPendingUnsafeLifecycleWarnings: function () {}, recordLegacyContextWarning: function (fiber, instance) {}, flushLegacyContextWarning: function () {}, discardPendingWarnings: function () {} }; { var findStrictRoot = function (fiber) { var maybeStrictRoot = null; var node = fiber; while (node !== null) { if (node.mode & StrictLegacyMode) { maybeStrictRoot = node; } node = node.return; } return maybeStrictRoot; }; var setToSortedString = function (set) { var array = []; set.forEach(function (value) { array.push(value); }); return array.sort().join(', '); }; var pendingComponentWillMountWarnings = []; var pendingUNSAFE_ComponentWillMountWarnings = []; var pendingComponentWillReceivePropsWarnings = []; var pendingUNSAFE_ComponentWillReceivePropsWarnings = []; var pendingComponentWillUpdateWarnings = []; var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about. var didWarnAboutUnsafeLifecycles = new Set(); ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) { // Dedupe strategy: Warn once per component. if (didWarnAboutUnsafeLifecycles.has(fiber.type)) { return; } if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components. instance.componentWillMount.__suppressDeprecationWarning !== true) { pendingComponentWillMountWarnings.push(fiber); } if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillMount === 'function') { pendingUNSAFE_ComponentWillMountWarnings.push(fiber); } if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) { pendingComponentWillReceivePropsWarnings.push(fiber); } if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') { pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber); } if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) { pendingComponentWillUpdateWarnings.push(fiber); } if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillUpdate === 'function') { pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber); } }; ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () { // We do an initial pass to gather component names var componentWillMountUniqueNames = new Set(); if (pendingComponentWillMountWarnings.length > 0) { pendingComponentWillMountWarnings.forEach(function (fiber) { componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component'); didWarnAboutUnsafeLifecycles.add(fiber.type); }); pendingComponentWillMountWarnings = []; } var UNSAFE_componentWillMountUniqueNames = new Set(); if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) { pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) { UNSAFE_componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component'); didWarnAboutUnsafeLifecycles.add(fiber.type); }); pendingUNSAFE_ComponentWillMountWarnings = []; } var componentWillReceivePropsUniqueNames = new Set(); if (pendingComponentWillReceivePropsWarnings.length > 0) { pendingComponentWillReceivePropsWarnings.forEach(function (fiber) { componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component'); didWarnAboutUnsafeLifecycles.add(fiber.type); }); pendingComponentWillReceivePropsWarnings = []; } var UNSAFE_componentWillReceivePropsUniqueNames = new Set(); if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) { pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) { UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component'); didWarnAboutUnsafeLifecycles.add(fiber.type); }); pendingUNSAFE_ComponentWillReceivePropsWarnings = []; } var componentWillUpdateUniqueNames = new Set(); if (pendingComponentWillUpdateWarnings.length > 0) { pendingComponentWillUpdateWarnings.forEach(function (fiber) { componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component'); didWarnAboutUnsafeLifecycles.add(fiber.type); }); pendingComponentWillUpdateWarnings = []; } var UNSAFE_componentWillUpdateUniqueNames = new Set(); if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) { pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) { UNSAFE_componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component'); didWarnAboutUnsafeLifecycles.add(fiber.type); }); pendingUNSAFE_ComponentWillUpdateWarnings = []; } // Finally, we flush all the warnings // UNSAFE_ ones before the deprecated ones, since they'll be 'louder' if (UNSAFE_componentWillMountUniqueNames.size > 0) { var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames); error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames); } if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) { var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames); error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '\nPlease update the following components: %s', _sortedNames); } if (UNSAFE_componentWillUpdateUniqueNames.size > 0) { var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames); error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2); } if (componentWillMountUniqueNames.size > 0) { var _sortedNames3 = setToSortedString(componentWillMountUniqueNames); warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3); } if (componentWillReceivePropsUniqueNames.size > 0) { var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames); warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4); } if (componentWillUpdateUniqueNames.size > 0) { var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames); warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5); } }; var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about. var didWarnAboutLegacyContext = new Set(); ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) { var strictRoot = findStrictRoot(fiber); if (strictRoot === null) { error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.'); return; } // Dedup strategy: Warn once per component. if (didWarnAboutLegacyContext.has(fiber.type)) { return; } var warningsForRoot = pendingLegacyContextWarning.get(strictRoot); if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') { if (warningsForRoot === undefined) { warningsForRoot = []; pendingLegacyContextWarning.set(strictRoot, warningsForRoot); } warningsForRoot.push(fiber); } }; ReactStrictModeWarnings.flushLegacyContextWarning = function () { pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) { if (fiberArray.length === 0) { return; } var firstFiber = fiberArray[0]; var uniqueNames = new Set(); fiberArray.forEach(function (fiber) { uniqueNames.add(getComponentNameFromFiber(fiber) || 'Component'); didWarnAboutLegacyContext.add(fiber.type); }); var sortedNames = setToSortedString(uniqueNames); try { setCurrentFiber(firstFiber); error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames); } finally { resetCurrentFiber(); } }); }; ReactStrictModeWarnings.discardPendingWarnings = function () { pendingComponentWillMountWarnings = []; pendingUNSAFE_ComponentWillMountWarnings = []; pendingComponentWillReceivePropsWarnings = []; pendingUNSAFE_ComponentWillReceivePropsWarnings = []; pendingComponentWillUpdateWarnings = []; pendingUNSAFE_ComponentWillUpdateWarnings = []; pendingLegacyContextWarning = new Map(); }; } var didWarnAboutMaps; var didWarnAboutGenerators; var didWarnAboutStringRefs; var ownerHasKeyUseWarning; var ownerHasFunctionTypeWarning; var warnForMissingKey = function (child, returnFiber) {}; { didWarnAboutMaps = false; didWarnAboutGenerators = false; didWarnAboutStringRefs = {}; /** * Warn if there's no key explicitly set on dynamic arrays of children or * object keys are not valid. This allows us to keep track of children between * updates. */ ownerHasKeyUseWarning = {}; ownerHasFunctionTypeWarning = {}; warnForMissingKey = function (child, returnFiber) { if (child === null || typeof child !== 'object') { return; } if (!child._store || child._store.validated || child.key != null) { return; } if (typeof child._store !== 'object') { throw new Error('React Component in warnForMissingKey should have a _store. ' + 'This error is likely caused by a bug in React. Please file an issue.'); } child._store.validated = true; var componentName = getComponentNameFromFiber(returnFiber) || 'Component'; if (ownerHasKeyUseWarning[componentName]) { return; } ownerHasKeyUseWarning[componentName] = true; error('Each child in a list should have a unique ' + '"key" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.'); }; } function isReactClass(type) { return type.prototype && type.prototype.isReactComponent; } function coerceRef(returnFiber, current, element) { var mixedRef = element.ref; if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') { { // TODO: Clean this up once we turn on the string ref warning for // everyone, because the strict mode case will no longer be relevant if ((returnFiber.mode & StrictLegacyMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs // because these cannot be automatically converted to an arrow function // using a codemod. Therefore, we don't have to warn about string refs again. !(element._owner && element._self && element._owner.stateNode !== element._self) && // Will already throw with "Function components cannot have string refs" !(element._owner && element._owner.tag !== ClassComponent) && // Will already warn with "Function components cannot be given refs" !(typeof element.type === 'function' && !isReactClass(element.type)) && // Will already throw with "Element ref was specified as a string (someStringRef) but no owner was set" element._owner) { var componentName = getComponentNameFromFiber(returnFiber) || 'Component'; if (!didWarnAboutStringRefs[componentName]) { { error('Component "%s" contains the string ref "%s". Support for string refs ' + 'will be removed in a future major release. We recommend using ' + 'useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, mixedRef); } didWarnAboutStringRefs[componentName] = true; } } } if (element._owner) { var owner = element._owner; var inst; if (owner) { var ownerFiber = owner; if (ownerFiber.tag !== ClassComponent) { throw new Error('Function components cannot have string refs. ' + 'We recommend using useRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref'); } inst = ownerFiber.stateNode; } if (!inst) { throw new Error("Missing owner for string ref " + mixedRef + ". This error is likely caused by a " + 'bug in React. Please file an issue.'); } // Assigning this to a const so Flow knows it won't change in the closure var resolvedInst = inst; { checkPropStringCoercion(mixedRef, 'ref'); } var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) { return current.ref; } var ref = function (value) { var refs = resolvedInst.refs; if (value === null) { delete refs[stringRef]; } else { refs[stringRef] = value; } }; ref._stringRef = stringRef; return ref; } else { if (typeof mixedRef !== 'string') { throw new Error('Expected ref to be a function, a string, an object returned by React.createRef(), or null.'); } if (!element._owner) { throw new Error("Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of" + ' the following reasons:\n' + '1. You may be adding a ref to a function component\n' + "2. You may be adding a ref to a component that was not created inside a component's render method\n" + '3. You have multiple copies of React loaded\n' + 'See https://reactjs.org/link/refs-must-have-owner for more information.'); } } } return mixedRef; } function throwOnInvalidObjectType(returnFiber, newChild) { var childString = Object.prototype.toString.call(newChild); throw new Error("Objects are not valid as a React child (found: " + (childString === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : childString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.'); } function warnOnFunctionType(returnFiber) { { var componentName = getComponentNameFromFiber(returnFiber) || 'Component'; if (ownerHasFunctionTypeWarning[componentName]) { return; } ownerHasFunctionTypeWarning[componentName] = true; error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.'); } } function resolveLazy(lazyType) { var payload = lazyType._payload; var init = lazyType._init; return init(payload); } // This wrapper function exists because I expect to clone the code in each path // to be able to optimize each path individually by branching early. This needs // a compiler or we can do it manually. Helpers that don't need this branching // live outside of this function. function ChildReconciler(shouldTrackSideEffects) { function deleteChild(returnFiber, childToDelete) { if (!shouldTrackSideEffects) { // Noop. return; } var deletions = returnFiber.deletions; if (deletions === null) { returnFiber.deletions = [childToDelete]; returnFiber.flags |= ChildDeletion; } else { deletions.push(childToDelete); } } function deleteRemainingChildren(returnFiber, currentFirstChild) { if (!shouldTrackSideEffects) { // Noop. return null; } // TODO: For the shouldClone case, this could be micro-optimized a bit by // assuming that after the first child we've already added everything. var childToDelete = currentFirstChild; while (childToDelete !== null) { deleteChild(returnFiber, childToDelete); childToDelete = childToDelete.sibling; } return null; } function mapRemainingChildren(returnFiber, currentFirstChild) { // Add the remaining children to a temporary map so that we can find them by // keys quickly. Implicit (null) keys get added to this set with their index // instead. var existingChildren = new Map(); var existingChild = currentFirstChild; while (existingChild !== null) { if (existingChild.key !== null) { existingChildren.set(existingChild.key, existingChild); } else { existingChildren.set(existingChild.index, existingChild); } existingChild = existingChild.sibling; } return existingChildren; } function useFiber(fiber, pendingProps) { // We currently set sibling to null and index to 0 here because it is easy // to forget to do before returning it. E.g. for the single child case. var clone = createWorkInProgress(fiber, pendingProps); clone.index = 0; clone.sibling = null; return clone; } function placeChild(newFiber, lastPlacedIndex, newIndex) { newFiber.index = newIndex; if (!shouldTrackSideEffects) { // During hydration, the useId algorithm needs to know which fibers are // part of a list of children (arrays, iterators). newFiber.flags |= Forked; return lastPlacedIndex; } var current = newFiber.alternate; if (current !== null) { var oldIndex = current.index; if (oldIndex < lastPlacedIndex) { // This is a move. newFiber.flags |= Placement; return lastPlacedIndex; } else { // This item can stay in place. return oldIndex; } } else { // This is an insertion. newFiber.flags |= Placement; return lastPlacedIndex; } } function placeSingleChild(newFiber) { // This is simpler for the single child case. We only need to do a // placement for inserting new children. if (shouldTrackSideEffects && newFiber.alternate === null) { newFiber.flags |= Placement; } return newFiber; } function updateTextNode(returnFiber, current, textContent, lanes) { if (current === null || current.tag !== HostText) { // Insert var created = createFiberFromText(textContent, returnFiber.mode, lanes); created.return = returnFiber; return created; } else { // Update var existing = useFiber(current, textContent); existing.return = returnFiber; return existing; } } function updateElement(returnFiber, current, element, lanes) { var elementType = element.type; if (elementType === REACT_FRAGMENT_TYPE) { return updateFragment(returnFiber, current, element.props.children, lanes, element.key); } if (current !== null) { if (current.elementType === elementType || ( // Keep this check inline so it only runs on the false path: isCompatibleFamilyForHotReloading(current, element) ) || // Lazy types should reconcile their resolved type. // We need to do this after the Hot Reloading check above, // because hot reloading has different semantics than prod because // it doesn't resuspend. So we can't let the call below suspend. typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current.type) { // Move based on index var existing = useFiber(current, element.props); existing.ref = coerceRef(returnFiber, current, element); existing.return = returnFiber; { existing._debugSource = element._source; existing._debugOwner = element._owner; } return existing; } } // Insert var created = createFiberFromElement(element, returnFiber.mode, lanes); created.ref = coerceRef(returnFiber, current, element); created.return = returnFiber; return created; } function updatePortal(returnFiber, current, portal, lanes) { if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) { // Insert var created = createFiberFromPortal(portal, returnFiber.mode, lanes); created.return = returnFiber; return created; } else { // Update var existing = useFiber(current, portal.children || []); existing.return = returnFiber; return existing; } } function updateFragment(returnFiber, current, fragment, lanes, key) { if (current === null || current.tag !== Fragment) { // Insert var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key); created.return = returnFiber; return created; } else { // Update var existing = useFiber(current, fragment); existing.return = returnFiber; return existing; } } function createChild(returnFiber, newChild, lanes) { if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') { // Text nodes don't have keys. If the previous node is implicitly keyed // we can continue to replace it without aborting even if it is not a text // node. var created = createFiberFromText('' + newChild, returnFiber.mode, lanes); created.return = returnFiber; return created; } if (typeof newChild === 'object' && newChild !== null) { switch (newChild.$$typeof) { case REACT_ELEMENT_TYPE: { var _created = createFiberFromElement(newChild, returnFiber.mode, lanes); _created.ref = coerceRef(returnFiber, null, newChild); _created.return = returnFiber; return _created; } case REACT_PORTAL_TYPE: { var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes); _created2.return = returnFiber; return _created2; } case REACT_LAZY_TYPE: { var payload = newChild._payload; var init = newChild._init; return createChild(returnFiber, init(payload), lanes); } } if (isArray(newChild) || getIteratorFn(newChild)) { var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null); _created3.return = returnFiber; return _created3; } throwOnInvalidObjectType(returnFiber, newChild); } { if (typeof newChild === 'function') { warnOnFunctionType(returnFiber); } } return null; } function updateSlot(returnFiber, oldFiber, newChild, lanes) { // Update the fiber if the keys match, otherwise return null. var key = oldFiber !== null ? oldFiber.key : null; if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') { // Text nodes don't have keys. If the previous node is implicitly keyed // we can continue to replace it without aborting even if it is not a text // node. if (key !== null) { return null; } return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes); } if (typeof newChild === 'object' && newChild !== null) { switch (newChild.$$typeof) { case REACT_ELEMENT_TYPE: { if (newChild.key === key) { return updateElement(returnFiber, oldFiber, newChild, lanes); } else { return null; } } case REACT_PORTAL_TYPE: { if (newChild.key === key) { return updatePortal(returnFiber, oldFiber, newChild, lanes); } else { return null; } } case REACT_LAZY_TYPE: { var payload = newChild._payload; var init = newChild._init; return updateSlot(returnFiber, oldFiber, init(payload), lanes); } } if (isArray(newChild) || getIteratorFn(newChild)) { if (key !== null) { return null; } return updateFragment(returnFiber, oldFiber, newChild, lanes, null); } throwOnInvalidObjectType(returnFiber, newChild); } { if (typeof newChild === 'function') { warnOnFunctionType(returnFiber); } } return null; } function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) { if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') { // Text nodes don't have keys, so we neither have to check the old nor // new node for the key. If both are text nodes, they match. var matchedFiber = existingChildren.get(newIdx) || null; return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes); } if (typeof newChild === 'object' && newChild !== null) { switch (newChild.$$typeof) { case REACT_ELEMENT_TYPE: { var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; return updateElement(returnFiber, _matchedFiber, newChild, lanes); } case REACT_PORTAL_TYPE: { var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; return updatePortal(returnFiber, _matchedFiber2, newChild, lanes); } case REACT_LAZY_TYPE: var payload = newChild._payload; var init = newChild._init; return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes); } if (isArray(newChild) || getIteratorFn(newChild)) { var _matchedFiber3 = existingChildren.get(newIdx) || null; return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null); } throwOnInvalidObjectType(returnFiber, newChild); } { if (typeof newChild === 'function') { warnOnFunctionType(returnFiber); } } return null; } /** * Warns if there is a duplicate or missing key */ function warnOnInvalidKey(child, knownKeys, returnFiber) { { if (typeof child !== 'object' || child === null) { return knownKeys; } switch (child.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: warnForMissingKey(child, returnFiber); var key = child.key; if (typeof key !== 'string') { break; } if (knownKeys === null) { knownKeys = new Set(); knownKeys.add(key); break; } if (!knownKeys.has(key)) { knownKeys.add(key); break; } error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key); break; case REACT_LAZY_TYPE: var payload = child._payload; var init = child._init; warnOnInvalidKey(init(payload), knownKeys, returnFiber); break; } } return knownKeys; } function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) { // This algorithm can't optimize by searching from both ends since we // don't have backpointers on fibers. I'm trying to see how far we can get // with that model. If it ends up not being worth the tradeoffs, we can // add it later. // Even with a two ended optimization, we'd want to optimize for the case // where there are few changes and brute force the comparison instead of // going for the Map. It'd like to explore hitting that path first in // forward-only mode and only go for the Map once we notice that we need // lots of look ahead. This doesn't handle reversal as well as two ended // search but that's unusual. Besides, for the two ended optimization to // work on Iterables, we'd need to copy the whole set. // In this first iteration, we'll just live with hitting the bad case // (adding everything to a Map) in for every insert/move. // If you change this code, also update reconcileChildrenIterator() which // uses the same algorithm. { // First, validate keys. var knownKeys = null; for (var i = 0; i < newChildren.length; i++) { var child = newChildren[i]; knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber); } } var resultingFirstChild = null; var previousNewFiber = null; var oldFiber = currentFirstChild; var lastPlacedIndex = 0; var newIdx = 0; var nextOldFiber = null; for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) { if (oldFiber.index > newIdx) { nextOldFiber = oldFiber; oldFiber = null; } else { nextOldFiber = oldFiber.sibling; } var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes); if (newFiber === null) { // TODO: This breaks on empty slots like null children. That's // unfortunate because it triggers the slow path all the time. We need // a better way to communicate whether this was a miss or null, // boolean, undefined, etc. if (oldFiber === null) { oldFiber = nextOldFiber; } break; } if (shouldTrackSideEffects) { if (oldFiber && newFiber.alternate === null) { // We matched the slot, but we didn't reuse the existing fiber, so we // need to delete the existing child. deleteChild(returnFiber, oldFiber); } } lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx); if (previousNewFiber === null) { // TODO: Move out of the loop. This only happens for the first run. resultingFirstChild = newFiber; } else { // TODO: Defer siblings if we're not at the right index for this slot. // I.e. if we had null values before, then we want to defer this // for each null value. However, we also don't want to call updateSlot // with the previous one. previousNewFiber.sibling = newFiber; } previousNewFiber = newFiber; oldFiber = nextOldFiber; } if (newIdx === newChildren.length) { // We've reached the end of the new children. We can delete the rest. deleteRemainingChildren(returnFiber, oldFiber); if (getIsHydrating()) { var numberOfForks = newIdx; pushTreeFork(returnFiber, numberOfForks); } return resultingFirstChild; } if (oldFiber === null) { // If we don't have any more existing children we can choose a fast path // since the rest will all be insertions. for (; newIdx < newChildren.length; newIdx++) { var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes); if (_newFiber === null) { continue; } lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx); if (previousNewFiber === null) { // TODO: Move out of the loop. This only happens for the first run. resultingFirstChild = _newFiber; } else { previousNewFiber.sibling = _newFiber; } previousNewFiber = _newFiber; } if (getIsHydrating()) { var _numberOfForks = newIdx; pushTreeFork(returnFiber, _numberOfForks); } return resultingFirstChild; } // Add all children to a key map for quick lookups. var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves. for (; newIdx < newChildren.length; newIdx++) { var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes); if (_newFiber2 !== null) { if (shouldTrackSideEffects) { if (_newFiber2.alternate !== null) { // The new fiber is a work in progress, but if there exists a // current, that means that we reused the fiber. We need to delete // it from the child list so that we don't add it to the deletion // list. existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key); } } lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx); if (previousNewFiber === null) { resultingFirstChild = _newFiber2; } else { previousNewFiber.sibling = _newFiber2; } previousNewFiber = _newFiber2; } } if (shouldTrackSideEffects) { // Any existing children that weren't consumed above were deleted. We need // to add them to the deletion list. existingChildren.forEach(function (child) { return deleteChild(returnFiber, child); }); } if (getIsHydrating()) { var _numberOfForks2 = newIdx; pushTreeFork(returnFiber, _numberOfForks2); } return resultingFirstChild; } function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) { // This is the same implementation as reconcileChildrenArray(), // but using the iterator instead. var iteratorFn = getIteratorFn(newChildrenIterable); if (typeof iteratorFn !== 'function') { throw new Error('An object is not an iterable. This error is likely caused by a bug in ' + 'React. Please file an issue.'); } { // We don't support rendering Generators because it's a mutation. // See https://github.com/facebook/react/issues/12995 if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag newChildrenIterable[Symbol.toStringTag] === 'Generator') { if (!didWarnAboutGenerators) { error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.'); } didWarnAboutGenerators = true; } // Warn about using Maps as children if (newChildrenIterable.entries === iteratorFn) { if (!didWarnAboutMaps) { error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.'); } didWarnAboutMaps = true; } // First, validate keys. // We'll get a different iterator later for the main pass. var _newChildren = iteratorFn.call(newChildrenIterable); if (_newChildren) { var knownKeys = null; var _step = _newChildren.next(); for (; !_step.done; _step = _newChildren.next()) { var child = _step.value; knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber); } } } var newChildren = iteratorFn.call(newChildrenIterable); if (newChildren == null) { throw new Error('An iterable object provided no iterator.'); } var resultingFirstChild = null; var previousNewFiber = null; var oldFiber = currentFirstChild; var lastPlacedIndex = 0; var newIdx = 0; var nextOldFiber = null; var step = newChildren.next(); for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) { if (oldFiber.index > newIdx) { nextOldFiber = oldFiber; oldFiber = null; } else { nextOldFiber = oldFiber.sibling; } var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes); if (newFiber === null) { // TODO: This breaks on empty slots like null children. That's // unfortunate because it triggers the slow path all the time. We need // a better way to communicate whether this was a miss or null, // boolean, undefined, etc. if (oldFiber === null) { oldFiber = nextOldFiber; } break; } if (shouldTrackSideEffects) { if (oldFiber && newFiber.alternate === null) { // We matched the slot, but we didn't reuse the existing fiber, so we // need to delete the existing child. deleteChild(returnFiber, oldFiber); } } lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx); if (previousNewFiber === null) { // TODO: Move out of the loop. This only happens for the first run. resultingFirstChild = newFiber; } else { // TODO: Defer siblings if we're not at the right index for this slot. // I.e. if we had null values before, then we want to defer this // for each null value. However, we also don't want to call updateSlot // with the previous one. previousNewFiber.sibling = newFiber; } previousNewFiber = newFiber; oldFiber = nextOldFiber; } if (step.done) { // We've reached the end of the new children. We can delete the rest. deleteRemainingChildren(returnFiber, oldFiber); if (getIsHydrating()) { var numberOfForks = newIdx; pushTreeFork(returnFiber, numberOfForks); } return resultingFirstChild; } if (oldFiber === null) { // If we don't have any more existing children we can choose a fast path // since the rest will all be insertions. for (; !step.done; newIdx++, step = newChildren.next()) { var _newFiber3 = createChild(returnFiber, step.value, lanes); if (_newFiber3 === null) { continue; } lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx); if (previousNewFiber === null) { // TODO: Move out of the loop. This only happens for the first run. resultingFirstChild = _newFiber3; } else { previousNewFiber.sibling = _newFiber3; } previousNewFiber = _newFiber3; } if (getIsHydrating()) { var _numberOfForks3 = newIdx; pushTreeFork(returnFiber, _numberOfForks3); } return resultingFirstChild; } // Add all children to a key map for quick lookups. var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves. for (; !step.done; newIdx++, step = newChildren.next()) { var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes); if (_newFiber4 !== null) { if (shouldTrackSideEffects) { if (_newFiber4.alternate !== null) { // The new fiber is a work in progress, but if there exists a // current, that means that we reused the fiber. We need to delete // it from the child list so that we don't add it to the deletion // list. existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key); } } lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx); if (previousNewFiber === null) { resultingFirstChild = _newFiber4; } else { previousNewFiber.sibling = _newFiber4; } previousNewFiber = _newFiber4; } } if (shouldTrackSideEffects) { // Any existing children that weren't consumed above were deleted. We need // to add them to the deletion list. existingChildren.forEach(function (child) { return deleteChild(returnFiber, child); }); } if (getIsHydrating()) { var _numberOfForks4 = newIdx; pushTreeFork(returnFiber, _numberOfForks4); } return resultingFirstChild; } function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) { // There's no need to check for keys on text nodes since we don't have a // way to define them. if (currentFirstChild !== null && currentFirstChild.tag === HostText) { // We already have an existing node so let's just update it and delete // the rest. deleteRemainingChildren(returnFiber, currentFirstChild.sibling); var existing = useFiber(currentFirstChild, textContent); existing.return = returnFiber; return existing; } // The existing first child is not a text node so we need to create one // and delete the existing ones. deleteRemainingChildren(returnFiber, currentFirstChild); var created = createFiberFromText(textContent, returnFiber.mode, lanes); created.return = returnFiber; return created; } function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) { var key = element.key; var child = currentFirstChild; while (child !== null) { // TODO: If key === null and child.key === null, then this only applies to // the first item in the list. if (child.key === key) { var elementType = element.type; if (elementType === REACT_FRAGMENT_TYPE) { if (child.tag === Fragment) { deleteRemainingChildren(returnFiber, child.sibling); var existing = useFiber(child, element.props.children); existing.return = returnFiber; { existing._debugSource = element._source; existing._debugOwner = element._owner; } return existing; } } else { if (child.elementType === elementType || ( // Keep this check inline so it only runs on the false path: isCompatibleFamilyForHotReloading(child, element) ) || // Lazy types should reconcile their resolved type. // We need to do this after the Hot Reloading check above, // because hot reloading has different semantics than prod because // it doesn't resuspend. So we can't let the call below suspend. typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === child.type) { deleteRemainingChildren(returnFiber, child.sibling); var _existing = useFiber(child, element.props); _existing.ref = coerceRef(returnFiber, child, element); _existing.return = returnFiber; { _existing._debugSource = element._source; _existing._debugOwner = element._owner; } return _existing; } } // Didn't match. deleteRemainingChildren(returnFiber, child); break; } else { deleteChild(returnFiber, child); } child = child.sibling; } if (element.type === REACT_FRAGMENT_TYPE) { var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key); created.return = returnFiber; return created; } else { var _created4 = createFiberFromElement(element, returnFiber.mode, lanes); _created4.ref = coerceRef(returnFiber, currentFirstChild, element); _created4.return = returnFiber; return _created4; } } function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) { var key = portal.key; var child = currentFirstChild; while (child !== null) { // TODO: If key === null and child.key === null, then this only applies to // the first item in the list. if (child.key === key) { if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) { deleteRemainingChildren(returnFiber, child.sibling); var existing = useFiber(child, portal.children || []); existing.return = returnFiber; return existing; } else { deleteRemainingChildren(returnFiber, child); break; } } else { deleteChild(returnFiber, child); } child = child.sibling; } var created = createFiberFromPortal(portal, returnFiber.mode, lanes); created.return = returnFiber; return created; } // This API will tag the children with the side-effect of the reconciliation // itself. They will be added to the side-effect list as we pass through the // children and the parent. function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) { // This function is not recursive. // If the top level item is an array, we treat it as a set of children, // not as a fragment. Nested arrays on the other hand will be treated as // fragment nodes. Recursion happens at the normal flow. // Handle top level unkeyed fragments as if they were arrays. // This leads to an ambiguity between <>{[...]}</> and <>...</>. // We treat the ambiguous cases above the same. var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null; if (isUnkeyedTopLevelFragment) { newChild = newChild.props.children; } // Handle object types if (typeof newChild === 'object' && newChild !== null) { switch (newChild.$$typeof) { case REACT_ELEMENT_TYPE: return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes)); case REACT_PORTAL_TYPE: return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes)); case REACT_LAZY_TYPE: var payload = newChild._payload; var init = newChild._init; // TODO: This function is supposed to be non-recursive. return reconcileChildFibers(returnFiber, currentFirstChild, init(payload), lanes); } if (isArray(newChild)) { return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes); } if (getIteratorFn(newChild)) { return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes); } throwOnInvalidObjectType(returnFiber, newChild); } if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') { return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes)); } { if (typeof newChild === 'function') { warnOnFunctionType(returnFiber); } } // Remaining cases are all treated as empty. return deleteRemainingChildren(returnFiber, currentFirstChild); } return reconcileChildFibers; } var reconcileChildFibers = ChildReconciler(true); var mountChildFibers = ChildReconciler(false); function cloneChildFibers(current, workInProgress) { if (current !== null && workInProgress.child !== current.child) { throw new Error('Resuming work not yet implemented.'); } if (workInProgress.child === null) { return; } var currentChild = workInProgress.child; var newChild = createWorkInProgress(currentChild, currentChild.pendingProps); workInProgress.child = newChild; newChild.return = workInProgress; while (currentChild.sibling !== null) { currentChild = currentChild.sibling; newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps); newChild.return = workInProgress; } newChild.sibling = null; } // Reset a workInProgress child set to prepare it for a second pass. function resetChildFibers(workInProgress, lanes) { var child = workInProgress.child; while (child !== null) { resetWorkInProgress(child, lanes); child = child.sibling; } } var valueCursor = createCursor(null); var rendererSigil; { // Use this to detect multiple renderers using the same context rendererSigil = {}; } var currentlyRenderingFiber = null; var lastContextDependency = null; var lastFullyObservedContext = null; var isDisallowedContextReadInDEV = false; function resetContextDependencies() { // This is called right before React yields execution, to ensure `readContext` // cannot be called outside the render phase. currentlyRenderingFiber = null; lastContextDependency = null; lastFullyObservedContext = null; { isDisallowedContextReadInDEV = false; } } function enterDisallowedContextReadInDEV() { { isDisallowedContextReadInDEV = true; } } function exitDisallowedContextReadInDEV() { { isDisallowedContextReadInDEV = false; } } function pushProvider(providerFiber, context, nextValue) { { push(valueCursor, context._currentValue, providerFiber); context._currentValue = nextValue; { if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) { error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.'); } context._currentRenderer = rendererSigil; } } } function popProvider(context, providerFiber) { var currentValue = valueCursor.current; pop(valueCursor, providerFiber); { { context._currentValue = currentValue; } } } function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { // Update the child lanes of all the ancestors, including the alternates. var node = parent; while (node !== null) { var alternate = node.alternate; if (!isSubsetOfLanes(node.childLanes, renderLanes)) { node.childLanes = mergeLanes(node.childLanes, renderLanes); if (alternate !== null) { alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes); } } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) { alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes); } if (node === propagationRoot) { break; } node = node.return; } { if (node !== propagationRoot) { error('Expected to find the propagation root when scheduling context work. ' + 'This error is likely caused by a bug in React. Please file an issue.'); } } } function propagateContextChange(workInProgress, context, renderLanes) { { propagateContextChange_eager(workInProgress, context, renderLanes); } } function propagateContextChange_eager(workInProgress, context, renderLanes) { var fiber = workInProgress.child; if (fiber !== null) { // Set the return pointer of the child to the work-in-progress fiber. fiber.return = workInProgress; } while (fiber !== null) { var nextFiber = void 0; // Visit this fiber. var list = fiber.dependencies; if (list !== null) { nextFiber = fiber.child; var dependency = list.firstContext; while (dependency !== null) { // Check if the context matches. if (dependency.context === context) { // Match! Schedule an update on this fiber. if (fiber.tag === ClassComponent) { // Schedule a force update on the work-in-progress. var lane = pickArbitraryLane(renderLanes); var update = createUpdate(NoTimestamp, lane); update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the // update to the current fiber, too, which means it will persist even if // this render is thrown away. Since it's a race condition, not sure it's // worth fixing. // Inlined `enqueueUpdate` to remove interleaved update check var updateQueue = fiber.updateQueue; if (updateQueue === null) ; else { var sharedQueue = updateQueue.shared; var pending = sharedQueue.pending; if (pending === null) { // This is the first update. Create a circular list. update.next = update; } else { update.next = pending.next; pending.next = update; } sharedQueue.pending = update; } } fiber.lanes = mergeLanes(fiber.lanes, renderLanes); var alternate = fiber.alternate; if (alternate !== null) { alternate.lanes = mergeLanes(alternate.lanes, renderLanes); } scheduleContextWorkOnParentPath(fiber.return, renderLanes, workInProgress); // Mark the updated lanes on the list, too. list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the // dependency list. break; } dependency = dependency.next; } } else if (fiber.tag === ContextProvider) { // Don't scan deeper if this is a matching provider nextFiber = fiber.type === workInProgress.type ? null : fiber.child; } else if (fiber.tag === DehydratedFragment) { // If a dehydrated suspense boundary is in this subtree, we don't know // if it will have any context consumers in it. The best we can do is // mark it as having updates. var parentSuspense = fiber.return; if (parentSuspense === null) { throw new Error('We just came from a parent so we must have had a parent. This is a bug in React.'); } parentSuspense.lanes = mergeLanes(parentSuspense.lanes, renderLanes); var _alternate = parentSuspense.alternate; if (_alternate !== null) { _alternate.lanes = mergeLanes(_alternate.lanes, renderLanes); } // This is intentionally passing this fiber as the parent // because we want to schedule this fiber as having work // on its children. We'll use the childLanes on // this fiber to indicate that a context has changed. scheduleContextWorkOnParentPath(parentSuspense, renderLanes, workInProgress); nextFiber = fiber.sibling; } else { // Traverse down. nextFiber = fiber.child; } if (nextFiber !== null) { // Set the return pointer of the child to the work-in-progress fiber. nextFiber.return = fiber; } else { // No child. Traverse to next sibling. nextFiber = fiber; while (nextFiber !== null) { if (nextFiber === workInProgress) { // We're back to the root of this subtree. Exit. nextFiber = null; break; } var sibling = nextFiber.sibling; if (sibling !== null) { // Set the return pointer of the sibling to the work-in-progress fiber. sibling.return = nextFiber.return; nextFiber = sibling; break; } // No more siblings. Traverse up. nextFiber = nextFiber.return; } } fiber = nextFiber; } } function prepareToReadContext(workInProgress, renderLanes) { currentlyRenderingFiber = workInProgress; lastContextDependency = null; lastFullyObservedContext = null; var dependencies = workInProgress.dependencies; if (dependencies !== null) { { var firstContext = dependencies.firstContext; if (firstContext !== null) { if (includesSomeLane(dependencies.lanes, renderLanes)) { // Context list has a pending update. Mark that this fiber performed work. markWorkInProgressReceivedUpdate(); } // Reset the work-in-progress list dependencies.firstContext = null; } } } } function readContext(context) { { // This warning would fire if you read context inside a Hook like useMemo. // Unlike the class check below, it's not enforced in production for perf. if (isDisallowedContextReadInDEV) { error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().'); } } var value = context._currentValue ; if (lastFullyObservedContext === context) ; else { var contextItem = { context: context, memoizedValue: value, next: null }; if (lastContextDependency === null) { if (currentlyRenderingFiber === null) { throw new Error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().'); } // This is the first dependency for this component. Create a new list. lastContextDependency = contextItem; currentlyRenderingFiber.dependencies = { lanes: NoLanes, firstContext: contextItem }; } else { // Append a new context item. lastContextDependency = lastContextDependency.next = contextItem; } } return value; } // render. When this render exits, either because it finishes or because it is // interrupted, the interleaved updates will be transferred onto the main part // of the queue. var concurrentQueues = null; function pushConcurrentUpdateQueue(queue) { if (concurrentQueues === null) { concurrentQueues = [queue]; } else { concurrentQueues.push(queue); } } function finishQueueingConcurrentUpdates() { // Transfer the interleaved updates onto the main queue. Each queue has a // `pending` field and an `interleaved` field. When they are not null, they // point to the last node in a circular linked list. We need to append the // interleaved list to the end of the pending list by joining them into a // single, circular list. if (concurrentQueues !== null) { for (var i = 0; i < concurrentQueues.length; i++) { var queue = concurrentQueues[i]; var lastInterleavedUpdate = queue.interleaved; if (lastInterleavedUpdate !== null) { queue.interleaved = null; var firstInterleavedUpdate = lastInterleavedUpdate.next; var lastPendingUpdate = queue.pending; if (lastPendingUpdate !== null) { var firstPendingUpdate = lastPendingUpdate.next; lastPendingUpdate.next = firstInterleavedUpdate; lastInterleavedUpdate.next = firstPendingUpdate; } queue.pending = lastInterleavedUpdate; } } concurrentQueues = null; } } function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { var interleaved = queue.interleaved; if (interleaved === null) { // This is the first update. Create a circular list. update.next = update; // At the end of the current render, this queue's interleaved updates will // be transferred to the pending queue. pushConcurrentUpdateQueue(queue); } else { update.next = interleaved.next; interleaved.next = update; } queue.interleaved = update; return markUpdateLaneFromFiberToRoot(fiber, lane); } function enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane) { var interleaved = queue.interleaved; if (interleaved === null) { // This is the first update. Create a circular list. update.next = update; // At the end of the current render, this queue's interleaved updates will // be transferred to the pending queue. pushConcurrentUpdateQueue(queue); } else { update.next = interleaved.next; interleaved.next = update; } queue.interleaved = update; } function enqueueConcurrentClassUpdate(fiber, queue, update, lane) { var interleaved = queue.interleaved; if (interleaved === null) { // This is the first update. Create a circular list. update.next = update; // At the end of the current render, this queue's interleaved updates will // be transferred to the pending queue. pushConcurrentUpdateQueue(queue); } else { update.next = interleaved.next; interleaved.next = update; } queue.interleaved = update; return markUpdateLaneFromFiberToRoot(fiber, lane); } function enqueueConcurrentRenderForLane(fiber, lane) { return markUpdateLaneFromFiberToRoot(fiber, lane); } // Calling this function outside this module should only be done for backwards // compatibility and should always be accompanied by a warning. var unsafe_markUpdateLaneFromFiberToRoot = markUpdateLaneFromFiberToRoot; function markUpdateLaneFromFiberToRoot(sourceFiber, lane) { // Update the source fiber's lanes sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane); var alternate = sourceFiber.alternate; if (alternate !== null) { alternate.lanes = mergeLanes(alternate.lanes, lane); } { if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) { warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); } } // Walk the parent path to the root and update the child lanes. var node = sourceFiber; var parent = sourceFiber.return; while (parent !== null) { parent.childLanes = mergeLanes(parent.childLanes, lane); alternate = parent.alternate; if (alternate !== null) { alternate.childLanes = mergeLanes(alternate.childLanes, lane); } else { { if ((parent.flags & (Placement | Hydrating)) !== NoFlags) { warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); } } } node = parent; parent = parent.return; } if (node.tag === HostRoot) { var root = node.stateNode; return root; } else { return null; } } var UpdateState = 0; var ReplaceState = 1; var ForceUpdate = 2; var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`. // It should only be read right after calling `processUpdateQueue`, via // `checkHasForceUpdateAfterProcessing`. var hasForceUpdate = false; var didWarnUpdateInsideUpdate; var currentlyProcessingQueue; { didWarnUpdateInsideUpdate = false; currentlyProcessingQueue = null; } function initializeUpdateQueue(fiber) { var queue = { baseState: fiber.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, interleaved: null, lanes: NoLanes }, effects: null }; fiber.updateQueue = queue; } function cloneUpdateQueue(current, workInProgress) { // Clone the update queue from current. Unless it's already a clone. var queue = workInProgress.updateQueue; var currentQueue = current.updateQueue; if (queue === currentQueue) { var clone = { baseState: currentQueue.baseState, firstBaseUpdate: currentQueue.firstBaseUpdate, lastBaseUpdate: currentQueue.lastBaseUpdate, shared: currentQueue.shared, effects: currentQueue.effects }; workInProgress.updateQueue = clone; } } function createUpdate(eventTime, lane) { var update = { eventTime: eventTime, lane: lane, tag: UpdateState, payload: null, callback: null, next: null }; return update; } function enqueueUpdate(fiber, update, lane) { var updateQueue = fiber.updateQueue; if (updateQueue === null) { // Only occurs if the fiber has been unmounted. return null; } var sharedQueue = updateQueue.shared; { if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) { error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.'); didWarnUpdateInsideUpdate = true; } } if (isUnsafeClassRenderPhaseUpdate()) { // This is an unsafe render phase update. Add directly to the update // queue so we can process it immediately during the current render. var pending = sharedQueue.pending; if (pending === null) { // This is the first update. Create a circular list. update.next = update; } else { update.next = pending.next; pending.next = update; } sharedQueue.pending = update; // Update the childLanes even though we're most likely already rendering // this fiber. This is for backwards compatibility in the case where you // update a different component during render phase than the one that is // currently renderings (a pattern that is accompanied by a warning). return unsafe_markUpdateLaneFromFiberToRoot(fiber, lane); } else { return enqueueConcurrentClassUpdate(fiber, sharedQueue, update, lane); } } function entangleTransitions(root, fiber, lane) { var updateQueue = fiber.updateQueue; if (updateQueue === null) { // Only occurs if the fiber has been unmounted. return; } var sharedQueue = updateQueue.shared; if (isTransitionLane(lane)) { var queueLanes = sharedQueue.lanes; // If any entangled lanes are no longer pending on the root, then they must // have finished. We can remove them from the shared queue, which represents // a superset of the actually pending lanes. In some cases we may entangle // more than we need to, but that's OK. In fact it's worse if we *don't* // entangle when we should. queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes. var newQueueLanes = mergeLanes(queueLanes, lane); sharedQueue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if // the lane finished since the last time we entangled it. So we need to // entangle it again, just to be sure. markRootEntangled(root, newQueueLanes); } } function enqueueCapturedUpdate(workInProgress, capturedUpdate) { // Captured updates are updates that are thrown by a child during the render // phase. They should be discarded if the render is aborted. Therefore, // we should only put them on the work-in-progress queue, not the current one. var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone. var current = workInProgress.alternate; if (current !== null) { var currentQueue = current.updateQueue; if (queue === currentQueue) { // The work-in-progress queue is the same as current. This happens when // we bail out on a parent fiber that then captures an error thrown by // a child. Since we want to append the update only to the work-in // -progress queue, we need to clone the updates. We usually clone during // processUpdateQueue, but that didn't happen in this case because we // skipped over the parent when we bailed out. var newFirst = null; var newLast = null; var firstBaseUpdate = queue.firstBaseUpdate; if (firstBaseUpdate !== null) { // Loop through the updates and clone them. var update = firstBaseUpdate; do { var clone = { eventTime: update.eventTime, lane: update.lane, tag: update.tag, payload: update.payload, callback: update.callback, next: null }; if (newLast === null) { newFirst = newLast = clone; } else { newLast.next = clone; newLast = clone; } update = update.next; } while (update !== null); // Append the captured update the end of the cloned list. if (newLast === null) { newFirst = newLast = capturedUpdate; } else { newLast.next = capturedUpdate; newLast = capturedUpdate; } } else { // There are no base updates. newFirst = newLast = capturedUpdate; } queue = { baseState: currentQueue.baseState, firstBaseUpdate: newFirst, lastBaseUpdate: newLast, shared: currentQueue.shared, effects: currentQueue.effects }; workInProgress.updateQueue = queue; return; } } // Append the update to the end of the list. var lastBaseUpdate = queue.lastBaseUpdate; if (lastBaseUpdate === null) { queue.firstBaseUpdate = capturedUpdate; } else { lastBaseUpdate.next = capturedUpdate; } queue.lastBaseUpdate = capturedUpdate; } function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) { switch (update.tag) { case ReplaceState: { var payload = update.payload; if (typeof payload === 'function') { // Updater function { enterDisallowedContextReadInDEV(); } var nextState = payload.call(instance, prevState, nextProps); { if ( workInProgress.mode & StrictLegacyMode) { setIsStrictModeForDevtools(true); try { payload.call(instance, prevState, nextProps); } finally { setIsStrictModeForDevtools(false); } } exitDisallowedContextReadInDEV(); } return nextState; } // State object return payload; } case CaptureUpdate: { workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture; } // Intentional fallthrough case UpdateState: { var _payload = update.payload; var partialState; if (typeof _payload === 'function') { // Updater function { enterDisallowedContextReadInDEV(); } partialState = _payload.call(instance, prevState, nextProps); { if ( workInProgress.mode & StrictLegacyMode) { setIsStrictModeForDevtools(true); try { _payload.call(instance, prevState, nextProps); } finally { setIsStrictModeForDevtools(false); } } exitDisallowedContextReadInDEV(); } } else { // Partial state object partialState = _payload; } if (partialState === null || partialState === undefined) { // Null and undefined are treated as no-ops. return prevState; } // Merge the partial state and the previous state. return assign({}, prevState, partialState); } case ForceUpdate: { hasForceUpdate = true; return prevState; } } return prevState; } function processUpdateQueue(workInProgress, props, instance, renderLanes) { // This is always non-null on a ClassComponent or HostRoot var queue = workInProgress.updateQueue; hasForceUpdate = false; { currentlyProcessingQueue = queue.shared; } var firstBaseUpdate = queue.firstBaseUpdate; var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue. var pendingQueue = queue.shared.pending; if (pendingQueue !== null) { queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first // and last so that it's non-circular. var lastPendingUpdate = pendingQueue; var firstPendingUpdate = lastPendingUpdate.next; lastPendingUpdate.next = null; // Append pending updates to base queue if (lastBaseUpdate === null) { firstBaseUpdate = firstPendingUpdate; } else { lastBaseUpdate.next = firstPendingUpdate; } lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then // we need to transfer the updates to that queue, too. Because the base // queue is a singly-linked list with no cycles, we can append to both // lists and take advantage of structural sharing. // TODO: Pass `current` as argument var current = workInProgress.alternate; if (current !== null) { // This is always non-null on a ClassComponent or HostRoot var currentQueue = current.updateQueue; var currentLastBaseUpdate = currentQueue.lastBaseUpdate; if (currentLastBaseUpdate !== lastBaseUpdate) { if (currentLastBaseUpdate === null) { currentQueue.firstBaseUpdate = firstPendingUpdate; } else { currentLastBaseUpdate.next = firstPendingUpdate; } currentQueue.lastBaseUpdate = lastPendingUpdate; } } } // These values may change as we process the queue. if (firstBaseUpdate !== null) { // Iterate through the list of updates to compute the result. var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes // from the original lanes. var newLanes = NoLanes; var newBaseState = null; var newFirstBaseUpdate = null; var newLastBaseUpdate = null; var update = firstBaseUpdate; do { var updateLane = update.lane; var updateEventTime = update.eventTime; if (!isSubsetOfLanes(renderLanes, updateLane)) { // Priority is insufficient. Skip this update. If this is the first // skipped update, the previous update/state is the new base // update/state. var clone = { eventTime: updateEventTime, lane: updateLane, tag: update.tag, payload: update.payload, callback: update.callback, next: null }; if (newLastBaseUpdate === null) { newFirstBaseUpdate = newLastBaseUpdate = clone; newBaseState = newState; } else { newLastBaseUpdate = newLastBaseUpdate.next = clone; } // Update the remaining priority in the queue. newLanes = mergeLanes(newLanes, updateLane); } else { // This update does have sufficient priority. if (newLastBaseUpdate !== null) { var _clone = { eventTime: updateEventTime, // This update is going to be committed so we never want uncommit // it. Using NoLane works because 0 is a subset of all bitmasks, so // this will never be skipped by the check above. lane: NoLane, tag: update.tag, payload: update.payload, callback: update.callback, next: null }; newLastBaseUpdate = newLastBaseUpdate.next = _clone; } // Process this update. newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance); var callback = update.callback; if (callback !== null && // If the update was already committed, we should not queue its // callback again. update.lane !== NoLane) { workInProgress.flags |= Callback; var effects = queue.effects; if (effects === null) { queue.effects = [update]; } else { effects.push(update); } } } update = update.next; if (update === null) { pendingQueue = queue.shared.pending; if (pendingQueue === null) { break; } else { // An update was scheduled from inside a reducer. Add the new // pending updates to the end of the list and keep processing. var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we // unravel them when transferring them to the base queue. var _firstPendingUpdate = _lastPendingUpdate.next; _lastPendingUpdate.next = null; update = _firstPendingUpdate; queue.lastBaseUpdate = _lastPendingUpdate; queue.shared.pending = null; } } } while (true); if (newLastBaseUpdate === null) { newBaseState = newState; } queue.baseState = newBaseState; queue.firstBaseUpdate = newFirstBaseUpdate; queue.lastBaseUpdate = newLastBaseUpdate; // Interleaved updates are stored on a separate queue. We aren't going to // process them during this render, but we do need to track which lanes // are remaining. var lastInterleaved = queue.shared.interleaved; if (lastInterleaved !== null) { var interleaved = lastInterleaved; do { newLanes = mergeLanes(newLanes, interleaved.lane); interleaved = interleaved.next; } while (interleaved !== lastInterleaved); } else if (firstBaseUpdate === null) { // `queue.lanes` is used for entangling transitions. We can set it back to // zero once the queue is empty. queue.shared.lanes = NoLanes; } // Set the remaining expiration time to be whatever is remaining in the queue. // This should be fine because the only two other things that contribute to // expiration time are props and context. We're already in the middle of the // begin phase by the time we start processing the queue, so we've already // dealt with the props. Context in components that specify // shouldComponentUpdate is tricky; but we'll have to account for // that regardless. markSkippedUpdateLanes(newLanes); workInProgress.lanes = newLanes; workInProgress.memoizedState = newState; } { currentlyProcessingQueue = null; } } function callCallback(callback, context) { if (typeof callback !== 'function') { throw new Error('Invalid argument passed as callback. Expected a function. Instead ' + ("received: " + callback)); } callback.call(context); } function resetHasForceUpdateBeforeProcessing() { hasForceUpdate = false; } function checkHasForceUpdateAfterProcessing() { return hasForceUpdate; } function commitUpdateQueue(finishedWork, finishedQueue, instance) { // Commit the effects var effects = finishedQueue.effects; finishedQueue.effects = null; if (effects !== null) { for (var i = 0; i < effects.length; i++) { var effect = effects[i]; var callback = effect.callback; if (callback !== null) { effect.callback = null; callCallback(callback, instance); } } } } var NO_CONTEXT = {}; var contextStackCursor$1 = createCursor(NO_CONTEXT); var contextFiberStackCursor = createCursor(NO_CONTEXT); var rootInstanceStackCursor = createCursor(NO_CONTEXT); function requiredContext(c) { if (c === NO_CONTEXT) { throw new Error('Expected host context to exist. This error is likely caused by a bug ' + 'in React. Please file an issue.'); } return c; } function getRootHostContainer() { var rootInstance = requiredContext(rootInstanceStackCursor.current); return rootInstance; } function pushHostContainer(fiber, nextRootInstance) { // Push current root instance onto the stack; // This allows us to reset root when portals are popped. push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it. // This enables us to pop only Fibers that provide unique contexts. push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack. // However, we can't just call getRootHostContext() and push it because // we'd have a different number of entries on the stack depending on // whether getRootHostContext() throws somewhere in renderer code or not. // So we push an empty value first. This lets us safely unwind on errors. push(contextStackCursor$1, NO_CONTEXT, fiber); var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it. pop(contextStackCursor$1, fiber); push(contextStackCursor$1, nextRootContext, fiber); } function popHostContainer(fiber) { pop(contextStackCursor$1, fiber); pop(contextFiberStackCursor, fiber); pop(rootInstanceStackCursor, fiber); } function getHostContext() { var context = requiredContext(contextStackCursor$1.current); return context; } function pushHostContext(fiber) { var rootInstance = requiredContext(rootInstanceStackCursor.current); var context = requiredContext(contextStackCursor$1.current); var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique. if (context === nextContext) { return; } // Track the context and the Fiber that provided it. // This enables us to pop only Fibers that provide unique contexts. push(contextFiberStackCursor, fiber, fiber); push(contextStackCursor$1, nextContext, fiber); } function popHostContext(fiber) { // Do not pop unless this Fiber provided the current context. // pushHostContext() only pushes Fibers that provide unique contexts. if (contextFiberStackCursor.current !== fiber) { return; } pop(contextStackCursor$1, fiber); pop(contextFiberStackCursor, fiber); } var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is // inherited deeply down the subtree. The upper bits only affect // this immediate suspense boundary and gets reset each new // boundary or suspense list. var SubtreeSuspenseContextMask = 1; // Subtree Flags: // InvisibleParentSuspenseContext indicates that one of our parent Suspense // boundaries is not currently showing visible main content. // Either because it is already showing a fallback or is not mounted at all. // We can use this to determine if it is desirable to trigger a fallback at // the parent. If not, then we might need to trigger undesirable boundaries // and/or suspend the commit to avoid hiding the parent content. var InvisibleParentSuspenseContext = 1; // Shallow Flags: // ForceSuspenseFallback can be used by SuspenseList to force newly added // items into their fallback state during one of the render passes. var ForceSuspenseFallback = 2; var suspenseStackCursor = createCursor(DefaultSuspenseContext); function hasSuspenseContext(parentContext, flag) { return (parentContext & flag) !== 0; } function setDefaultShallowSuspenseContext(parentContext) { return parentContext & SubtreeSuspenseContextMask; } function setShallowSuspenseContext(parentContext, shallowContext) { return parentContext & SubtreeSuspenseContextMask | shallowContext; } function addSubtreeSuspenseContext(parentContext, subtreeContext) { return parentContext | subtreeContext; } function pushSuspenseContext(fiber, newContext) { push(suspenseStackCursor, newContext, fiber); } function popSuspenseContext(fiber) { pop(suspenseStackCursor, fiber); } function shouldCaptureSuspense(workInProgress, hasInvisibleParent) { // If it was the primary children that just suspended, capture and render the // fallback. Otherwise, don't capture and bubble to the next boundary. var nextState = workInProgress.memoizedState; if (nextState !== null) { if (nextState.dehydrated !== null) { // A dehydrated boundary always captures. return true; } return false; } var props = workInProgress.memoizedProps; // Regular boundaries always capture. { return true; } // If it's a boundary we should avoid, then we prefer to bubble up to the } function findFirstSuspended(row) { var node = row; while (node !== null) { if (node.tag === SuspenseComponent) { var state = node.memoizedState; if (state !== null) { var dehydrated = state.dehydrated; if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) { return node; } } } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't // keep track of whether it suspended or not. node.memoizedProps.revealOrder !== undefined) { var didSuspend = (node.flags & DidCapture) !== NoFlags; if (didSuspend) { return node; } } else if (node.child !== null) { node.child.return = node; node = node.child; continue; } if (node === row) { return null; } while (node.sibling === null) { if (node.return === null || node.return === row) { return null; } node = node.return; } node.sibling.return = node.return; node = node.sibling; } return null; } var NoFlags$1 = /* */ 0; // Represents whether effect should fire. var HasEffect = /* */ 1; // Represents the phase in which the effect (not the clean-up) fires. var Insertion = /* */ 2; var Layout = /* */ 4; var Passive$1 = /* */ 8; // and should be reset before starting a new render. // This tracks which mutable sources need to be reset after a render. var workInProgressSources = []; function resetWorkInProgressVersions() { for (var i = 0; i < workInProgressSources.length; i++) { var mutableSource = workInProgressSources[i]; { mutableSource._workInProgressVersionPrimary = null; } } workInProgressSources.length = 0; } // This ensures that the version used for server rendering matches the one // that is eventually read during hydration. // If they don't match there's a potential tear and a full deopt render is required. function registerMutableSourceForHydration(root, mutableSource) { var getVersion = mutableSource._getVersion; var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished. // Retaining it forever may interfere with GC. if (root.mutableSourceEagerHydrationData == null) { root.mutableSourceEagerHydrationData = [mutableSource, version]; } else { root.mutableSourceEagerHydrationData.push(mutableSource, version); } } var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig; var didWarnAboutMismatchedHooksForComponent; var didWarnUncachedGetSnapshot; { didWarnAboutMismatchedHooksForComponent = new Set(); } // These are set right before calling the component. var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from // the work-in-progress hook. var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The // current hook list is the list that belongs to the current fiber. The // work-in-progress hook list is a new list that will be added to the // work-in-progress fiber. var currentHook = null; var workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This // does not get reset if we do another render pass; only when we're completely // finished evaluating this component. This is an optimization so we know // whether we need to clear render phase updates after a throw. var didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This // gets reset after each attempt. // TODO: Maybe there's some way to consolidate this with // `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`. var didScheduleRenderPhaseUpdateDuringThisPass = false; // Counts the number of useId hooks in this component. var localIdCounter = 0; // Used for ids that are generated completely client-side (i.e. not during // hydration). This counter is global, so client ids are not stable across // render attempts. var globalClientIdCounter = 0; var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders. // The list stores the order of hooks used during the initial render (mount). // Subsequent renders (updates) reference this list. var hookTypesDev = null; var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore // the dependencies for Hooks that need them (e.g. useEffect or useMemo). // When true, such Hooks will always be "remounted". Only used during hot reload. var ignorePreviousDependencies = false; function mountHookTypesDev() { { var hookName = currentHookNameInDev; if (hookTypesDev === null) { hookTypesDev = [hookName]; } else { hookTypesDev.push(hookName); } } } function updateHookTypesDev() { { var hookName = currentHookNameInDev; if (hookTypesDev !== null) { hookTypesUpdateIndexDev++; if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) { warnOnHookMismatchInDev(hookName); } } } } function checkDepsAreArrayDev(deps) { { if (deps !== undefined && deps !== null && !isArray(deps)) { // Verify deps, but only on mount to avoid extra checks. // It's unlikely their type would change as usually you define them inline. error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps); } } } function warnOnHookMismatchInDev(currentHookName) { { var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1); if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) { didWarnAboutMismatchedHooksForComponent.add(componentName); if (hookTypesDev !== null) { var table = ''; var secondColumnStart = 30; for (var i = 0; i <= hookTypesUpdateIndexDev; i++) { var oldHookName = hookTypesDev[i]; var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName; var row = i + 1 + ". " + oldHookName; // Extra space so second column lines up // lol @ IE not supporting String#repeat while (row.length < secondColumnStart) { row += ' '; } row += newHookName + '\n'; table += row; } error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table); } } } } function throwInvalidHookError() { throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.'); } function areHookInputsEqual(nextDeps, prevDeps) { { if (ignorePreviousDependencies) { // Only true when this component is being hot reloaded. return false; } } if (prevDeps === null) { { error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev); } return false; } { // Don't bother comparing lengths in prod because these arrays should be // passed inline. if (nextDeps.length !== prevDeps.length) { error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + prevDeps.join(', ') + "]", "[" + nextDeps.join(', ') + "]"); } } for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) { if (objectIs(nextDeps[i], prevDeps[i])) { continue; } return false; } return true; } function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) { renderLanes = nextRenderLanes; currentlyRenderingFiber$1 = workInProgress; { hookTypesDev = current !== null ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; // Used for hot reloading: ignorePreviousDependencies = current !== null && current.type !== workInProgress.type; } workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = NoLanes; // The following should have already been reset // currentHook = null; // workInProgressHook = null; // didScheduleRenderPhaseUpdate = false; // localIdCounter = 0; // TODO Warn if no hooks are used at all during mount, then some are used during update. // Currently we will identify the update render as a mount because memoizedState === null. // This is tricky because it's valid for certain types of components (e.g. React.lazy) // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used. // Non-stateful hooks (e.g. context) don't get added to memoizedState, // so memoizedState would be null during updates and mounts. { if (current !== null && current.memoizedState !== null) { ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; } else if (hookTypesDev !== null) { // This dispatcher handles an edge case where a component is updating, // but no stateful hooks have been used. // We want to match the production code behavior (which will use HooksDispatcherOnMount), // but with the extra DEV validation to ensure hooks ordering hasn't changed. // This dispatcher does that. ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV; } else { ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; } } var children = Component(props, secondArg); // Check if there was a render phase update if (didScheduleRenderPhaseUpdateDuringThisPass) { // Keep rendering in a loop for as long as render phase updates continue to // be scheduled. Use a counter to prevent infinite loops. var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass = false; localIdCounter = 0; if (numberOfReRenders >= RE_RENDER_LIMIT) { throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.'); } numberOfReRenders += 1; { // Even when hot reloading, allow dependencies to stabilize // after first render to prevent infinite render phase updates. ignorePreviousDependencies = false; } // Start over from the beginning of the list currentHook = null; workInProgressHook = null; workInProgress.updateQueue = null; { // Also validate hook order for cascading updates. hookTypesUpdateIndexDev = -1; } ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV ; children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); } // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; { workInProgress._debugHookTypes = hookTypesDev; } // This check uses currentHook so that it works the same in DEV and prod bundles. // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles. var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null; renderLanes = NoLanes; currentlyRenderingFiber$1 = null; currentHook = null; workInProgressHook = null; { currentHookNameInDev = null; hookTypesDev = null; hookTypesUpdateIndexDev = -1; // Confirm that a static flag was not added or removed since the last // render. If this fires, it suggests that we incorrectly reset the static // flags in some other part of the codebase. This has happened before, for // example, in the SuspenseList implementation. if (current !== null && (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird // and creates false positives. To make this work in legacy mode, we'd // need to mark fibers that commit in an incomplete state, somehow. For // now I'll disable the warning that most of the bugs that would trigger // it are either exclusive to concurrent mode or exist in both. (current.mode & ConcurrentMode) !== NoMode) { error('Internal React error: Expected static flag was missing. Please ' + 'notify the React team.'); } } didScheduleRenderPhaseUpdate = false; // This is reset by checkDidRenderIdHook // localIdCounter = 0; if (didRenderTooFewHooks) { throw new Error('Rendered fewer hooks than expected. This may be caused by an accidental ' + 'early return statement.'); } return children; } function checkDidRenderIdHook() { // This should be called immediately after every renderWithHooks call. // Conceptually, it's part of the return value of renderWithHooks; it's only a // separate function to avoid using an array tuple. var didRenderIdHook = localIdCounter !== 0; localIdCounter = 0; return didRenderIdHook; } function bailoutHooks(current, workInProgress, lanes) { workInProgress.updateQueue = current.updateQueue; // TODO: Don't need to reset the flags here, because they're reset in the // complete phase (bubbleProperties). if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) { workInProgress.flags &= ~(MountPassiveDev | MountLayoutDev | Passive | Update); } else { workInProgress.flags &= ~(Passive | Update); } current.lanes = removeLanes(current.lanes, lanes); } function resetHooksAfterThrow() { // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; if (didScheduleRenderPhaseUpdate) { // There were render phase updates. These are only valid for this render // phase, which we are now aborting. Remove the updates from the queues so // they do not persist to the next render. Do not remove updates from hooks // that weren't processed. // // Only reset the updates from the queue if it has a clone. If it does // not have a clone, that means it wasn't processed, and the updates were // scheduled before we entered the render phase. var hook = currentlyRenderingFiber$1.memoizedState; while (hook !== null) { var queue = hook.queue; if (queue !== null) { queue.pending = null; } hook = hook.next; } didScheduleRenderPhaseUpdate = false; } renderLanes = NoLanes; currentlyRenderingFiber$1 = null; currentHook = null; workInProgressHook = null; { hookTypesDev = null; hookTypesUpdateIndexDev = -1; currentHookNameInDev = null; isUpdatingOpaqueValueInRenderPhase = false; } didScheduleRenderPhaseUpdateDuringThisPass = false; localIdCounter = 0; } function mountWorkInProgressHook() { var hook = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null }; if (workInProgressHook === null) { // This is the first hook in the list currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook; } else { // Append to the end of the list workInProgressHook = workInProgressHook.next = hook; } return workInProgressHook; } function updateWorkInProgressHook() { // This function is used both for updates and for re-renders triggered by a // render phase update. It assumes there is either a current hook we can // clone, or a work-in-progress hook from a previous render pass that we can // use as a base. When we reach the end of the base list, we must switch to // the dispatcher used for mounts. var nextCurrentHook; if (currentHook === null) { var current = currentlyRenderingFiber$1.alternate; if (current !== null) { nextCurrentHook = current.memoizedState; } else { nextCurrentHook = null; } } else { nextCurrentHook = currentHook.next; } var nextWorkInProgressHook; if (workInProgressHook === null) { nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState; } else { nextWorkInProgressHook = workInProgressHook.next; } if (nextWorkInProgressHook !== null) { // There's already a work-in-progress. Reuse it. workInProgressHook = nextWorkInProgressHook; nextWorkInProgressHook = workInProgressHook.next; currentHook = nextCurrentHook; } else { // Clone from the current hook. if (nextCurrentHook === null) { throw new Error('Rendered more hooks than during the previous render.'); } currentHook = nextCurrentHook; var newHook = { memoizedState: currentHook.memoizedState, baseState: currentHook.baseState, baseQueue: currentHook.baseQueue, queue: currentHook.queue, next: null }; if (workInProgressHook === null) { // This is the first hook in the list. currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook; } else { // Append to the end of the list. workInProgressHook = workInProgressHook.next = newHook; } } return workInProgressHook; } function createFunctionComponentUpdateQueue() { return { lastEffect: null, stores: null }; } function basicStateReducer(state, action) { // $FlowFixMe: Flow doesn't like mixed types return typeof action === 'function' ? action(state) : action; } function mountReducer(reducer, initialArg, init) { var hook = mountWorkInProgressHook(); var initialState; if (init !== undefined) { initialState = init(initialArg); } else { initialState = initialArg; } hook.memoizedState = hook.baseState = initialState; var queue = { pending: null, interleaved: null, lanes: NoLanes, dispatch: null, lastRenderedReducer: reducer, lastRenderedState: initialState }; hook.queue = queue; var dispatch = queue.dispatch = dispatchReducerAction.bind(null, currentlyRenderingFiber$1, queue); return [hook.memoizedState, dispatch]; } function updateReducer(reducer, initialArg, init) { var hook = updateWorkInProgressHook(); var queue = hook.queue; if (queue === null) { throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.'); } queue.lastRenderedReducer = reducer; var current = currentHook; // The last rebase update that is NOT part of the base state. var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet. var pendingQueue = queue.pending; if (pendingQueue !== null) { // We have new updates that haven't been processed yet. // We'll add them to the base queue. if (baseQueue !== null) { // Merge the pending queue and the base queue. var baseFirst = baseQueue.next; var pendingFirst = pendingQueue.next; baseQueue.next = pendingFirst; pendingQueue.next = baseFirst; } { if (current.baseQueue !== baseQueue) { // Internal invariant that should never happen, but feasibly could in // the future if we implement resuming, or some form of that. error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.'); } } current.baseQueue = baseQueue = pendingQueue; queue.pending = null; } if (baseQueue !== null) { // We have a queue to process. var first = baseQueue.next; var newState = current.baseState; var newBaseState = null; var newBaseQueueFirst = null; var newBaseQueueLast = null; var update = first; do { var updateLane = update.lane; if (!isSubsetOfLanes(renderLanes, updateLane)) { // Priority is insufficient. Skip this update. If this is the first // skipped update, the previous update/state is the new base // update/state. var clone = { lane: updateLane, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, next: null }; if (newBaseQueueLast === null) { newBaseQueueFirst = newBaseQueueLast = clone; newBaseState = newState; } else { newBaseQueueLast = newBaseQueueLast.next = clone; } // Update the remaining priority in the queue. // TODO: Don't need to accumulate this. Instead, we can remove // renderLanes from the original lanes. currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane); markSkippedUpdateLanes(updateLane); } else { // This update does have sufficient priority. if (newBaseQueueLast !== null) { var _clone = { // This update is going to be committed so we never want uncommit // it. Using NoLane works because 0 is a subset of all bitmasks, so // this will never be skipped by the check above. lane: NoLane, action: update.action, hasEagerState: update.hasEagerState, eagerState: update.eagerState, next: null }; newBaseQueueLast = newBaseQueueLast.next = _clone; } // Process this update. if (update.hasEagerState) { // If this update is a state update (not a reducer) and was processed eagerly, // we can use the eagerly computed state newState = update.eagerState; } else { var action = update.action; newState = reducer(newState, action); } } update = update.next; } while (update !== null && update !== first); if (newBaseQueueLast === null) { newBaseState = newState; } else { newBaseQueueLast.next = newBaseQueueFirst; } // Mark that the fiber performed work, but only if the new state is // different from the current state. if (!objectIs(newState, hook.memoizedState)) { markWorkInProgressReceivedUpdate(); } hook.memoizedState = newState; hook.baseState = newBaseState; hook.baseQueue = newBaseQueueLast; queue.lastRenderedState = newState; } // Interleaved updates are stored on a separate queue. We aren't going to // process them during this render, but we do need to track which lanes // are remaining. var lastInterleaved = queue.interleaved; if (lastInterleaved !== null) { var interleaved = lastInterleaved; do { var interleavedLane = interleaved.lane; currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, interleavedLane); markSkippedUpdateLanes(interleavedLane); interleaved = interleaved.next; } while (interleaved !== lastInterleaved); } else if (baseQueue === null) { // `queue.lanes` is used for entangling transitions. We can set it back to // zero once the queue is empty. queue.lanes = NoLanes; } var dispatch = queue.dispatch; return [hook.memoizedState, dispatch]; } function rerenderReducer(reducer, initialArg, init) { var hook = updateWorkInProgressHook(); var queue = hook.queue; if (queue === null) { throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.'); } queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous // work-in-progress hook. var dispatch = queue.dispatch; var lastRenderPhaseUpdate = queue.pending; var newState = hook.memoizedState; if (lastRenderPhaseUpdate !== null) { // The queue doesn't persist past this render pass. queue.pending = null; var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next; var update = firstRenderPhaseUpdate; do { // Process this render phase update. We don't have to check the // priority because it will always be the same as the current // render's. var action = update.action; newState = reducer(newState, action); update = update.next; } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is // different from the current state. if (!objectIs(newState, hook.memoizedState)) { markWorkInProgressReceivedUpdate(); } hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to // the base state unless the queue is empty. // TODO: Not sure if this is the desired semantics, but it's what we // do for gDSFP. I can't remember why. if (hook.baseQueue === null) { hook.baseState = newState; } queue.lastRenderedState = newState; } return [newState, dispatch]; } function mountMutableSource(source, getSnapshot, subscribe) { { return undefined; } } function updateMutableSource(source, getSnapshot, subscribe) { { return undefined; } } function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { var fiber = currentlyRenderingFiber$1; var hook = mountWorkInProgressHook(); var nextSnapshot; var isHydrating = getIsHydrating(); if (isHydrating) { if (getServerSnapshot === undefined) { throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.'); } nextSnapshot = getServerSnapshot(); { if (!didWarnUncachedGetSnapshot) { if (nextSnapshot !== getServerSnapshot()) { error('The result of getServerSnapshot should be cached to avoid an infinite loop'); didWarnUncachedGetSnapshot = true; } } } } else { nextSnapshot = getSnapshot(); { if (!didWarnUncachedGetSnapshot) { var cachedSnapshot = getSnapshot(); if (!objectIs(nextSnapshot, cachedSnapshot)) { error('The result of getSnapshot should be cached to avoid an infinite loop'); didWarnUncachedGetSnapshot = true; } } } // Unless we're rendering a blocking lane, schedule a consistency check. // Right before committing, we will walk the tree and check if any of the // stores were mutated. // // We won't do this if we're hydrating server-rendered content, because if // the content is stale, it's already visible anyway. Instead we'll patch // it up in a passive effect. var root = getWorkInProgressRoot(); if (root === null) { throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.'); } if (!includesBlockingLane(root, renderLanes)) { pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); } } // Read the current snapshot from the store on every render. This breaks the // normal rules of React, and only works because store updates are // always synchronous. hook.memoizedState = nextSnapshot; var inst = { value: nextSnapshot, getSnapshot: getSnapshot }; hook.queue = inst; // Schedule an effect to subscribe to the store. mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Schedule an effect to update the mutable instance fields. We will update // this whenever subscribe, getSnapshot, or value changes. Because there's no // clean-up function, and we track the deps correctly, we can call pushEffect // directly, without storing any additional state. For the same reason, we // don't need to set a static flag, either. // TODO: We can move this to the passive phase once we add a pre-commit // consistency check. See the next comment. fiber.flags |= Passive; pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null); return nextSnapshot; } function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { var fiber = currentlyRenderingFiber$1; var hook = updateWorkInProgressHook(); // Read the current snapshot from the store on every render. This breaks the // normal rules of React, and only works because store updates are // always synchronous. var nextSnapshot = getSnapshot(); { if (!didWarnUncachedGetSnapshot) { var cachedSnapshot = getSnapshot(); if (!objectIs(nextSnapshot, cachedSnapshot)) { error('The result of getSnapshot should be cached to avoid an infinite loop'); didWarnUncachedGetSnapshot = true; } } } var prevSnapshot = hook.memoizedState; var snapshotChanged = !objectIs(prevSnapshot, nextSnapshot); if (snapshotChanged) { hook.memoizedState = nextSnapshot; markWorkInProgressReceivedUpdate(); } var inst = hook.queue; updateEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Whenever getSnapshot or subscribe changes, we need to check in the // commit phase if there was an interleaved mutation. In concurrent mode // this can happen all the time, but even in synchronous mode, an earlier // effect may have mutated the store. if (inst.getSnapshot !== getSnapshot || snapshotChanged || // Check if the susbcribe function changed. We can save some memory by // checking whether we scheduled a subscription effect above. workInProgressHook !== null && workInProgressHook.memoizedState.tag & HasEffect) { fiber.flags |= Passive; pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null); // Unless we're rendering a blocking lane, schedule a consistency check. // Right before committing, we will walk the tree and check if any of the // stores were mutated. var root = getWorkInProgressRoot(); if (root === null) { throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.'); } if (!includesBlockingLane(root, renderLanes)) { pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); } } return nextSnapshot; } function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= StoreConsistency; var check = { getSnapshot: getSnapshot, value: renderedSnapshot }; var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; if (componentUpdateQueue === null) { componentUpdateQueue = createFunctionComponentUpdateQueue(); currentlyRenderingFiber$1.updateQueue = componentUpdateQueue; componentUpdateQueue.stores = [check]; } else { var stores = componentUpdateQueue.stores; if (stores === null) { componentUpdateQueue.stores = [check]; } else { stores.push(check); } } } function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) { // These are updated in the passive phase inst.value = nextSnapshot; inst.getSnapshot = getSnapshot; // Something may have been mutated in between render and commit. This could // have been in an event that fired before the passive effects, or it could // have been in a layout effect. In that case, we would have used the old // snapsho and getSnapshot values to bail out. We need to check one more time. if (checkIfSnapshotChanged(inst)) { // Force a re-render. forceStoreRerender(fiber); } } function subscribeToStore(fiber, inst, subscribe) { var handleStoreChange = function () { // The store changed. Check if the snapshot changed since the last time we // read from the store. if (checkIfSnapshotChanged(inst)) { // Force a re-render. forceStoreRerender(fiber); } }; // Subscribe to the store and return a clean-up function. return subscribe(handleStoreChange); } function checkIfSnapshotChanged(inst) { var latestGetSnapshot = inst.getSnapshot; var prevValue = inst.value; try { var nextValue = latestGetSnapshot(); return !objectIs(prevValue, nextValue); } catch (error) { return true; } } function forceStoreRerender(fiber) { var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); } } function mountState(initialState) { var hook = mountWorkInProgressHook(); if (typeof initialState === 'function') { // $FlowFixMe: Flow doesn't like mixed types initialState = initialState(); } hook.memoizedState = hook.baseState = initialState; var queue = { pending: null, interleaved: null, lanes: NoLanes, dispatch: null, lastRenderedReducer: basicStateReducer, lastRenderedState: initialState }; hook.queue = queue; var dispatch = queue.dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue); return [hook.memoizedState, dispatch]; } function updateState(initialState) { return updateReducer(basicStateReducer); } function rerenderState(initialState) { return rerenderReducer(basicStateReducer); } function pushEffect(tag, create, destroy, deps) { var effect = { tag: tag, create: create, destroy: destroy, deps: deps, // Circular next: null }; var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; if (componentUpdateQueue === null) { componentUpdateQueue = createFunctionComponentUpdateQueue(); currentlyRenderingFiber$1.updateQueue = componentUpdateQueue; componentUpdateQueue.lastEffect = effect.next = effect; } else { var lastEffect = componentUpdateQueue.lastEffect; if (lastEffect === null) { componentUpdateQueue.lastEffect = effect.next = effect; } else { var firstEffect = lastEffect.next; lastEffect.next = effect; effect.next = firstEffect; componentUpdateQueue.lastEffect = effect; } } return effect; } function mountRef(initialValue) { var hook = mountWorkInProgressHook(); { var _ref2 = { current: initialValue }; hook.memoizedState = _ref2; return _ref2; } } function updateRef(initialValue) { var hook = updateWorkInProgressHook(); return hook.memoizedState; } function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; currentlyRenderingFiber$1.flags |= fiberFlags; hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps); } function updateEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; var destroy = undefined; if (currentHook !== null) { var prevEffect = currentHook.memoizedState; destroy = prevEffect.destroy; if (nextDeps !== null) { var prevDeps = prevEffect.deps; if (areHookInputsEqual(nextDeps, prevDeps)) { hook.memoizedState = pushEffect(hookFlags, create, destroy, nextDeps); return; } } } currentlyRenderingFiber$1.flags |= fiberFlags; hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps); } function mountEffect(create, deps) { if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) { return mountEffectImpl(MountPassiveDev | Passive | PassiveStatic, Passive$1, create, deps); } else { return mountEffectImpl(Passive | PassiveStatic, Passive$1, create, deps); } } function updateEffect(create, deps) { return updateEffectImpl(Passive, Passive$1, create, deps); } function mountInsertionEffect(create, deps) { return mountEffectImpl(Update, Insertion, create, deps); } function updateInsertionEffect(create, deps) { return updateEffectImpl(Update, Insertion, create, deps); } function mountLayoutEffect(create, deps) { var fiberFlags = Update; { fiberFlags |= LayoutStatic; } if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) { fiberFlags |= MountLayoutDev; } return mountEffectImpl(fiberFlags, Layout, create, deps); } function updateLayoutEffect(create, deps) { return updateEffectImpl(Update, Layout, create, deps); } function imperativeHandleEffect(create, ref) { if (typeof ref === 'function') { var refCallback = ref; var _inst = create(); refCallback(_inst); return function () { refCallback(null); }; } else if (ref !== null && ref !== undefined) { var refObject = ref; { if (!refObject.hasOwnProperty('current')) { error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}'); } } var _inst2 = create(); refObject.current = _inst2; return function () { refObject.current = null; }; } } function mountImperativeHandle(ref, create, deps) { { if (typeof create !== 'function') { error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null'); } } // TODO: If deps are provided, should we skip comparing the ref itself? var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null; var fiberFlags = Update; { fiberFlags |= LayoutStatic; } if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) { fiberFlags |= MountLayoutDev; } return mountEffectImpl(fiberFlags, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps); } function updateImperativeHandle(ref, create, deps) { { if (typeof create !== 'function') { error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null'); } } // TODO: If deps are provided, should we skip comparing the ref itself? var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null; return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps); } function mountDebugValue(value, formatterFn) {// This hook is normally a no-op. // The react-debug-hooks package injects its own implementation // so that e.g. DevTools can display custom hook values. } var updateDebugValue = mountDebugValue; function mountCallback(callback, deps) { var hook = mountWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; hook.memoizedState = [callback, nextDeps]; return callback; } function updateCallback(callback, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; var prevState = hook.memoizedState; if (prevState !== null) { if (nextDeps !== null) { var prevDeps = prevState[1]; if (areHookInputsEqual(nextDeps, prevDeps)) { return prevState[0]; } } } hook.memoizedState = [callback, nextDeps]; return callback; } function mountMemo(nextCreate, deps) { var hook = mountWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; var nextValue = nextCreate(); hook.memoizedState = [nextValue, nextDeps]; return nextValue; } function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; var prevState = hook.memoizedState; if (prevState !== null) { // Assume these are defined. If they're not, areHookInputsEqual will warn. if (nextDeps !== null) { var prevDeps = prevState[1]; if (areHookInputsEqual(nextDeps, prevDeps)) { return prevState[0]; } } } var nextValue = nextCreate(); hook.memoizedState = [nextValue, nextDeps]; return nextValue; } function mountDeferredValue(value) { var hook = mountWorkInProgressHook(); hook.memoizedState = value; return value; } function updateDeferredValue(value) { var hook = updateWorkInProgressHook(); var resolvedCurrentHook = currentHook; var prevValue = resolvedCurrentHook.memoizedState; return updateDeferredValueImpl(hook, prevValue, value); } function rerenderDeferredValue(value) { var hook = updateWorkInProgressHook(); if (currentHook === null) { // This is a rerender during a mount. hook.memoizedState = value; return value; } else { // This is a rerender during an update. var prevValue = currentHook.memoizedState; return updateDeferredValueImpl(hook, prevValue, value); } } function updateDeferredValueImpl(hook, prevValue, value) { var shouldDeferValue = !includesOnlyNonUrgentLanes(renderLanes); if (shouldDeferValue) { // This is an urgent update. If the value has changed, keep using the // previous value and spawn a deferred render to update it later. if (!objectIs(value, prevValue)) { // Schedule a deferred render var deferredLane = claimNextTransitionLane(); currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, deferredLane); markSkippedUpdateLanes(deferredLane); // Set this to true to indicate that the rendered value is inconsistent // from the latest value. The name "baseState" doesn't really match how we // use it because we're reusing a state hook field instead of creating a // new one. hook.baseState = true; } // Reuse the previous value return prevValue; } else { // This is not an urgent update, so we can use the latest value regardless // of what it is. No need to defer it. // However, if we're currently inside a spawned render, then we need to mark // this as an update to prevent the fiber from bailing out. // // `baseState` is true when the current value is different from the rendered // value. The name doesn't really match how we use it because we're reusing // a state hook field instead of creating a new one. if (hook.baseState) { // Flip this back to false. hook.baseState = false; markWorkInProgressReceivedUpdate(); } hook.memoizedState = value; return value; } } function startTransition(setPending, callback, options) { var previousPriority = getCurrentUpdatePriority(); setCurrentUpdatePriority(higherEventPriority(previousPriority, ContinuousEventPriority)); setPending(true); var prevTransition = ReactCurrentBatchConfig$2.transition; ReactCurrentBatchConfig$2.transition = {}; var currentTransition = ReactCurrentBatchConfig$2.transition; { ReactCurrentBatchConfig$2.transition._updatedFibers = new Set(); } try { setPending(false); callback(); } finally { setCurrentUpdatePriority(previousPriority); ReactCurrentBatchConfig$2.transition = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { var updatedFibersCount = currentTransition._updatedFibers.size; if (updatedFibersCount > 10) { warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.'); } currentTransition._updatedFibers.clear(); } } } } function mountTransition() { var _mountState = mountState(false), isPending = _mountState[0], setPending = _mountState[1]; // The `start` method never changes. var start = startTransition.bind(null, setPending); var hook = mountWorkInProgressHook(); hook.memoizedState = start; return [isPending, start]; } function updateTransition() { var _updateState = updateState(), isPending = _updateState[0]; var hook = updateWorkInProgressHook(); var start = hook.memoizedState; return [isPending, start]; } function rerenderTransition() { var _rerenderState = rerenderState(), isPending = _rerenderState[0]; var hook = updateWorkInProgressHook(); var start = hook.memoizedState; return [isPending, start]; } var isUpdatingOpaqueValueInRenderPhase = false; function getIsUpdatingOpaqueValueInRenderPhaseInDEV() { { return isUpdatingOpaqueValueInRenderPhase; } } function mountId() { var hook = mountWorkInProgressHook(); var root = getWorkInProgressRoot(); // TODO: In Fizz, id generation is specific to each server config. Maybe we // should do this in Fiber, too? Deferring this decision for now because // there's no other place to store the prefix except for an internal field on // the public createRoot object, which the fiber tree does not currently have // a reference to. var identifierPrefix = root.identifierPrefix; var id; if (getIsHydrating()) { var treeId = getTreeId(); // Use a captial R prefix for server-generated ids. id = ':' + identifierPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end // that represents the position of this useId hook among all the useId // hooks for this fiber. var localId = localIdCounter++; if (localId > 0) { id += 'H' + localId.toString(32); } id += ':'; } else { // Use a lowercase r prefix for client-generated ids. var globalClientId = globalClientIdCounter++; id = ':' + identifierPrefix + 'r' + globalClientId.toString(32) + ':'; } hook.memoizedState = id; return id; } function updateId() { var hook = updateWorkInProgressHook(); var id = hook.memoizedState; return id; } function dispatchReducerAction(fiber, queue, action) { { if (typeof arguments[3] === 'function') { error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().'); } } var lane = requestUpdateLane(fiber); var update = { lane: lane, action: action, hasEagerState: false, eagerState: null, next: null }; if (isRenderPhaseUpdate(fiber)) { enqueueRenderPhaseUpdate(queue, update); } else { var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane); if (root !== null) { var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitionUpdate(root, queue, lane); } } markUpdateInDevTools(fiber, lane); } function dispatchSetState(fiber, queue, action) { { if (typeof arguments[3] === 'function') { error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().'); } } var lane = requestUpdateLane(fiber); var update = { lane: lane, action: action, hasEagerState: false, eagerState: null, next: null }; if (isRenderPhaseUpdate(fiber)) { enqueueRenderPhaseUpdate(queue, update); } else { var alternate = fiber.alternate; if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) { // The queue is currently empty, which means we can eagerly compute the // next state before entering the render phase. If the new state is the // same as the current state, we may be able to bail out entirely. var lastRenderedReducer = queue.lastRenderedReducer; if (lastRenderedReducer !== null) { var prevDispatcher; { prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; } try { var currentState = queue.lastRenderedState; var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute // it, on the update object. If the reducer hasn't changed by the // time we enter the render phase, then the eager state can be used // without calling the reducer again. update.hasEagerState = true; update.eagerState = eagerState; if (objectIs(eagerState, currentState)) { // Fast path. We can bail out without scheduling React to re-render. // It's still possible that we'll need to rebase this update later, // if the component re-renders for a different reason and by that // time the reducer has changed. // TODO: Do we still need to entangle transitions in this case? enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane); return; } } catch (error) {// Suppress the error. It will throw again in the render phase. } finally { { ReactCurrentDispatcher$1.current = prevDispatcher; } } } } var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane); if (root !== null) { var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitionUpdate(root, queue, lane); } } markUpdateInDevTools(fiber, lane); } function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1; } function enqueueRenderPhaseUpdate(queue, update) { // This is a render phase update. Stash it in a lazily-created map of // queue -> linked list of updates. After this render pass, we'll restart // and apply the stashed updates on top of the work-in-progress hook. didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true; var pending = queue.pending; if (pending === null) { // This is the first update. Create a circular list. update.next = update; } else { update.next = pending.next; pending.next = update; } queue.pending = update; } // TODO: Move to ReactFiberConcurrentUpdates? function entangleTransitionUpdate(root, queue, lane) { if (isTransitionLane(lane)) { var queueLanes = queue.lanes; // If any entangled lanes are no longer pending on the root, then they // must have finished. We can remove them from the shared queue, which // represents a superset of the actually pending lanes. In some cases we // may entangle more than we need to, but that's OK. In fact it's worse if // we *don't* entangle when we should. queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes. var newQueueLanes = mergeLanes(queueLanes, lane); queue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if // the lane finished since the last time we entangled it. So we need to // entangle it again, just to be sure. markRootEntangled(root, newQueueLanes); } } function markUpdateInDevTools(fiber, lane, action) { { markStateUpdateScheduled(fiber, lane); } } var ContextOnlyDispatcher = { readContext: readContext, useCallback: throwInvalidHookError, useContext: throwInvalidHookError, useEffect: throwInvalidHookError, useImperativeHandle: throwInvalidHookError, useInsertionEffect: throwInvalidHookError, useLayoutEffect: throwInvalidHookError, useMemo: throwInvalidHookError, useReducer: throwInvalidHookError, useRef: throwInvalidHookError, useState: throwInvalidHookError, useDebugValue: throwInvalidHookError, useDeferredValue: throwInvalidHookError, useTransition: throwInvalidHookError, useMutableSource: throwInvalidHookError, useSyncExternalStore: throwInvalidHookError, useId: throwInvalidHookError, unstable_isNewReconciler: enableNewReconciler }; var HooksDispatcherOnMountInDEV = null; var HooksDispatcherOnMountWithHookTypesInDEV = null; var HooksDispatcherOnUpdateInDEV = null; var HooksDispatcherOnRerenderInDEV = null; var InvalidNestedHooksDispatcherOnMountInDEV = null; var InvalidNestedHooksDispatcherOnUpdateInDEV = null; var InvalidNestedHooksDispatcherOnRerenderInDEV = null; { var warnInvalidContextAccess = function () { error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().'); }; var warnInvalidHookAccess = function () { error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks'); }; HooksDispatcherOnMountInDEV = { readContext: function (context) { return readContext(context); }, useCallback: function (callback, deps) { currentHookNameInDev = 'useCallback'; mountHookTypesDev(); checkDepsAreArrayDev(deps); return mountCallback(callback, deps); }, useContext: function (context) { currentHookNameInDev = 'useContext'; mountHookTypesDev(); return readContext(context); }, useEffect: function (create, deps) { currentHookNameInDev = 'useEffect'; mountHookTypesDev(); checkDepsAreArrayDev(deps); return mountEffect(create, deps); }, useImperativeHandle: function (ref, create, deps) { currentHookNameInDev = 'useImperativeHandle'; mountHookTypesDev(); checkDepsAreArrayDev(deps); return mountImperativeHandle(ref, create, deps); }, useInsertionEffect: function (create, deps) { currentHookNameInDev = 'useInsertionEffect'; mountHookTypesDev(); checkDepsAreArrayDev(deps); return mountInsertionEffect(create, deps); }, useLayoutEffect: function (create, deps) { currentHookNameInDev = 'useLayoutEffect'; mountHookTypesDev(); checkDepsAreArrayDev(deps); return mountLayoutEffect(create, deps); }, useMemo: function (create, deps) { currentHookNameInDev = 'useMemo'; mountHookTypesDev(); checkDepsAreArrayDev(deps); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = 'useReducer'; mountHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useRef: function (initialValue) { currentHookNameInDev = 'useRef'; mountHookTypesDev(); return mountRef(initialValue); }, useState: function (initialState) { currentHookNameInDev = 'useState'; mountHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { currentHookNameInDev = 'useDebugValue'; mountHookTypesDev(); return mountDebugValue(); }, useDeferredValue: function (value) { currentHookNameInDev = 'useDeferredValue'; mountHookTypesDev(); return mountDeferredValue(value); }, useTransition: function () { currentHookNameInDev = 'useTransition'; mountHookTypesDev(); return mountTransition(); }, useMutableSource: function (source, getSnapshot, subscribe) { currentHookNameInDev = 'useMutableSource'; mountHookTypesDev(); return mountMutableSource(); }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { currentHookNameInDev = 'useSyncExternalStore'; mountHookTypesDev(); return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); }, useId: function () { currentHookNameInDev = 'useId'; mountHookTypesDev(); return mountId(); }, unstable_isNewReconciler: enableNewReconciler }; HooksDispatcherOnMountWithHookTypesInDEV = { readContext: function (context) { return readContext(context); }, useCallback: function (callback, deps) { currentHookNameInDev = 'useCallback'; updateHookTypesDev(); return mountCallback(callback, deps); }, useContext: function (context) { currentHookNameInDev = 'useContext'; updateHookTypesDev(); return readContext(context); }, useEffect: function (create, deps) { currentHookNameInDev = 'useEffect'; updateHookTypesDev(); return mountEffect(create, deps); }, useImperativeHandle: function (ref, create, deps) { currentHookNameInDev = 'useImperativeHandle'; updateHookTypesDev(); return mountImperativeHandle(ref, create, deps); }, useInsertionEffect: function (create, deps) { currentHookNameInDev = 'useInsertionEffect'; updateHookTypesDev(); return mountInsertionEffect(create, deps); }, useLayoutEffect: function (create, deps) { currentHookNameInDev = 'useLayoutEffect'; updateHookTypesDev(); return mountLayoutEffect(create, deps); }, useMemo: function (create, deps) { currentHookNameInDev = 'useMemo'; updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = 'useReducer'; updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useRef: function (initialValue) { currentHookNameInDev = 'useRef'; updateHookTypesDev(); return mountRef(initialValue); }, useState: function (initialState) { currentHookNameInDev = 'useState'; updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { currentHookNameInDev = 'useDebugValue'; updateHookTypesDev(); return mountDebugValue(); }, useDeferredValue: function (value) { currentHookNameInDev = 'useDeferredValue'; updateHookTypesDev(); return mountDeferredValue(value); }, useTransition: function () { currentHookNameInDev = 'useTransition'; updateHookTypesDev(); return mountTransition(); }, useMutableSource: function (source, getSnapshot, subscribe) { currentHookNameInDev = 'useMutableSource'; updateHookTypesDev(); return mountMutableSource(); }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { currentHookNameInDev = 'useSyncExternalStore'; updateHookTypesDev(); return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); }, useId: function () { currentHookNameInDev = 'useId'; updateHookTypesDev(); return mountId(); }, unstable_isNewReconciler: enableNewReconciler }; HooksDispatcherOnUpdateInDEV = { readContext: function (context) { return readContext(context); }, useCallback: function (callback, deps) { currentHookNameInDev = 'useCallback'; updateHookTypesDev(); return updateCallback(callback, deps); }, useContext: function (context) { currentHookNameInDev = 'useContext'; updateHookTypesDev(); return readContext(context); }, useEffect: function (create, deps) { currentHookNameInDev = 'useEffect'; updateHookTypesDev(); return updateEffect(create, deps); }, useImperativeHandle: function (ref, create, deps) { currentHookNameInDev = 'useImperativeHandle'; updateHookTypesDev(); return updateImperativeHandle(ref, create, deps); }, useInsertionEffect: function (create, deps) { currentHookNameInDev = 'useInsertionEffect'; updateHookTypesDev(); return updateInsertionEffect(create, deps); }, useLayoutEffect: function (create, deps) { currentHookNameInDev = 'useLayoutEffect'; updateHookTypesDev(); return updateLayoutEffect(create, deps); }, useMemo: function (create, deps) { currentHookNameInDev = 'useMemo'; updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = 'useReducer'; updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useRef: function (initialValue) { currentHookNameInDev = 'useRef'; updateHookTypesDev(); return updateRef(); }, useState: function (initialState) { currentHookNameInDev = 'useState'; updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { currentHookNameInDev = 'useDebugValue'; updateHookTypesDev(); return updateDebugValue(); }, useDeferredValue: function (value) { currentHookNameInDev = 'useDeferredValue'; updateHookTypesDev(); return updateDeferredValue(value); }, useTransition: function () { currentHookNameInDev = 'useTransition'; updateHookTypesDev(); return updateTransition(); }, useMutableSource: function (source, getSnapshot, subscribe) { currentHookNameInDev = 'useMutableSource'; updateHookTypesDev(); return updateMutableSource(); }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { currentHookNameInDev = 'useSyncExternalStore'; updateHookTypesDev(); return updateSyncExternalStore(subscribe, getSnapshot); }, useId: function () { currentHookNameInDev = 'useId'; updateHookTypesDev(); return updateId(); }, unstable_isNewReconciler: enableNewReconciler }; HooksDispatcherOnRerenderInDEV = { readContext: function (context) { return readContext(context); }, useCallback: function (callback, deps) { currentHookNameInDev = 'useCallback'; updateHookTypesDev(); return updateCallback(callback, deps); }, useContext: function (context) { currentHookNameInDev = 'useContext'; updateHookTypesDev(); return readContext(context); }, useEffect: function (create, deps) { currentHookNameInDev = 'useEffect'; updateHookTypesDev(); return updateEffect(create, deps); }, useImperativeHandle: function (ref, create, deps) { currentHookNameInDev = 'useImperativeHandle'; updateHookTypesDev(); return updateImperativeHandle(ref, create, deps); }, useInsertionEffect: function (create, deps) { currentHookNameInDev = 'useInsertionEffect'; updateHookTypesDev(); return updateInsertionEffect(create, deps); }, useLayoutEffect: function (create, deps) { currentHookNameInDev = 'useLayoutEffect'; updateHookTypesDev(); return updateLayoutEffect(create, deps); }, useMemo: function (create, deps) { currentHookNameInDev = 'useMemo'; updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return updateMemo(create, deps); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = 'useReducer'; updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useRef: function (initialValue) { currentHookNameInDev = 'useRef'; updateHookTypesDev(); return updateRef(); }, useState: function (initialState) { currentHookNameInDev = 'useState'; updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderState(initialState); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { currentHookNameInDev = 'useDebugValue'; updateHookTypesDev(); return updateDebugValue(); }, useDeferredValue: function (value) { currentHookNameInDev = 'useDeferredValue'; updateHookTypesDev(); return rerenderDeferredValue(value); }, useTransition: function () { currentHookNameInDev = 'useTransition'; updateHookTypesDev(); return rerenderTransition(); }, useMutableSource: function (source, getSnapshot, subscribe) { currentHookNameInDev = 'useMutableSource'; updateHookTypesDev(); return updateMutableSource(); }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { currentHookNameInDev = 'useSyncExternalStore'; updateHookTypesDev(); return updateSyncExternalStore(subscribe, getSnapshot); }, useId: function () { currentHookNameInDev = 'useId'; updateHookTypesDev(); return updateId(); }, unstable_isNewReconciler: enableNewReconciler }; InvalidNestedHooksDispatcherOnMountInDEV = { readContext: function (context) { warnInvalidContextAccess(); return readContext(context); }, useCallback: function (callback, deps) { currentHookNameInDev = 'useCallback'; warnInvalidHookAccess(); mountHookTypesDev(); return mountCallback(callback, deps); }, useContext: function (context) { currentHookNameInDev = 'useContext'; warnInvalidHookAccess(); mountHookTypesDev(); return readContext(context); }, useEffect: function (create, deps) { currentHookNameInDev = 'useEffect'; warnInvalidHookAccess(); mountHookTypesDev(); return mountEffect(create, deps); }, useImperativeHandle: function (ref, create, deps) { currentHookNameInDev = 'useImperativeHandle'; warnInvalidHookAccess(); mountHookTypesDev(); return mountImperativeHandle(ref, create, deps); }, useInsertionEffect: function (create, deps) { currentHookNameInDev = 'useInsertionEffect'; warnInvalidHookAccess(); mountHookTypesDev(); return mountInsertionEffect(create, deps); }, useLayoutEffect: function (create, deps) { currentHookNameInDev = 'useLayoutEffect'; warnInvalidHookAccess(); mountHookTypesDev(); return mountLayoutEffect(create, deps); }, useMemo: function (create, deps) { currentHookNameInDev = 'useMemo'; warnInvalidHookAccess(); mountHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = 'useReducer'; warnInvalidHookAccess(); mountHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useRef: function (initialValue) { currentHookNameInDev = 'useRef'; warnInvalidHookAccess(); mountHookTypesDev(); return mountRef(initialValue); }, useState: function (initialState) { currentHookNameInDev = 'useState'; warnInvalidHookAccess(); mountHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { currentHookNameInDev = 'useDebugValue'; warnInvalidHookAccess(); mountHookTypesDev(); return mountDebugValue(); }, useDeferredValue: function (value) { currentHookNameInDev = 'useDeferredValue'; warnInvalidHookAccess(); mountHookTypesDev(); return mountDeferredValue(value); }, useTransition: function () { currentHookNameInDev = 'useTransition'; warnInvalidHookAccess(); mountHookTypesDev(); return mountTransition(); }, useMutableSource: function (source, getSnapshot, subscribe) { currentHookNameInDev = 'useMutableSource'; warnInvalidHookAccess(); mountHookTypesDev(); return mountMutableSource(); }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { currentHookNameInDev = 'useSyncExternalStore'; warnInvalidHookAccess(); mountHookTypesDev(); return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); }, useId: function () { currentHookNameInDev = 'useId'; warnInvalidHookAccess(); mountHookTypesDev(); return mountId(); }, unstable_isNewReconciler: enableNewReconciler }; InvalidNestedHooksDispatcherOnUpdateInDEV = { readContext: function (context) { warnInvalidContextAccess(); return readContext(context); }, useCallback: function (callback, deps) { currentHookNameInDev = 'useCallback'; warnInvalidHookAccess(); updateHookTypesDev(); return updateCallback(callback, deps); }, useContext: function (context) { currentHookNameInDev = 'useContext'; warnInvalidHookAccess(); updateHookTypesDev(); return readContext(context); }, useEffect: function (create, deps) { currentHookNameInDev = 'useEffect'; warnInvalidHookAccess(); updateHookTypesDev(); return updateEffect(create, deps); }, useImperativeHandle: function (ref, create, deps) { currentHookNameInDev = 'useImperativeHandle'; warnInvalidHookAccess(); updateHookTypesDev(); return updateImperativeHandle(ref, create, deps); }, useInsertionEffect: function (create, deps) { currentHookNameInDev = 'useInsertionEffect'; warnInvalidHookAccess(); updateHookTypesDev(); return updateInsertionEffect(create, deps); }, useLayoutEffect: function (create, deps) { currentHookNameInDev = 'useLayoutEffect'; warnInvalidHookAccess(); updateHookTypesDev(); return updateLayoutEffect(create, deps); }, useMemo: function (create, deps) { currentHookNameInDev = 'useMemo'; warnInvalidHookAccess(); updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = 'useReducer'; warnInvalidHookAccess(); updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useRef: function (initialValue) { currentHookNameInDev = 'useRef'; warnInvalidHookAccess(); updateHookTypesDev(); return updateRef(); }, useState: function (initialState) { currentHookNameInDev = 'useState'; warnInvalidHookAccess(); updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { currentHookNameInDev = 'useDebugValue'; warnInvalidHookAccess(); updateHookTypesDev(); return updateDebugValue(); }, useDeferredValue: function (value) { currentHookNameInDev = 'useDeferredValue'; warnInvalidHookAccess(); updateHookTypesDev(); return updateDeferredValue(value); }, useTransition: function () { currentHookNameInDev = 'useTransition'; warnInvalidHookAccess(); updateHookTypesDev(); return updateTransition(); }, useMutableSource: function (source, getSnapshot, subscribe) { currentHookNameInDev = 'useMutableSource'; warnInvalidHookAccess(); updateHookTypesDev(); return updateMutableSource(); }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { currentHookNameInDev = 'useSyncExternalStore'; warnInvalidHookAccess(); updateHookTypesDev(); return updateSyncExternalStore(subscribe, getSnapshot); }, useId: function () { currentHookNameInDev = 'useId'; warnInvalidHookAccess(); updateHookTypesDev(); return updateId(); }, unstable_isNewReconciler: enableNewReconciler }; InvalidNestedHooksDispatcherOnRerenderInDEV = { readContext: function (context) { warnInvalidContextAccess(); return readContext(context); }, useCallback: function (callback, deps) { currentHookNameInDev = 'useCallback'; warnInvalidHookAccess(); updateHookTypesDev(); return updateCallback(callback, deps); }, useContext: function (context) { currentHookNameInDev = 'useContext'; warnInvalidHookAccess(); updateHookTypesDev(); return readContext(context); }, useEffect: function (create, deps) { currentHookNameInDev = 'useEffect'; warnInvalidHookAccess(); updateHookTypesDev(); return updateEffect(create, deps); }, useImperativeHandle: function (ref, create, deps) { currentHookNameInDev = 'useImperativeHandle'; warnInvalidHookAccess(); updateHookTypesDev(); return updateImperativeHandle(ref, create, deps); }, useInsertionEffect: function (create, deps) { currentHookNameInDev = 'useInsertionEffect'; warnInvalidHookAccess(); updateHookTypesDev(); return updateInsertionEffect(create, deps); }, useLayoutEffect: function (create, deps) { currentHookNameInDev = 'useLayoutEffect'; warnInvalidHookAccess(); updateHookTypesDev(); return updateLayoutEffect(create, deps); }, useMemo: function (create, deps) { currentHookNameInDev = 'useMemo'; warnInvalidHookAccess(); updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = 'useReducer'; warnInvalidHookAccess(); updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useRef: function (initialValue) { currentHookNameInDev = 'useRef'; warnInvalidHookAccess(); updateHookTypesDev(); return updateRef(); }, useState: function (initialState) { currentHookNameInDev = 'useState'; warnInvalidHookAccess(); updateHookTypesDev(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderState(initialState); } finally { ReactCurrentDispatcher$1.current = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { currentHookNameInDev = 'useDebugValue'; warnInvalidHookAccess(); updateHookTypesDev(); return updateDebugValue(); }, useDeferredValue: function (value) { currentHookNameInDev = 'useDeferredValue'; warnInvalidHookAccess(); updateHookTypesDev(); return rerenderDeferredValue(value); }, useTransition: function () { currentHookNameInDev = 'useTransition'; warnInvalidHookAccess(); updateHookTypesDev(); return rerenderTransition(); }, useMutableSource: function (source, getSnapshot, subscribe) { currentHookNameInDev = 'useMutableSource'; warnInvalidHookAccess(); updateHookTypesDev(); return updateMutableSource(); }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { currentHookNameInDev = 'useSyncExternalStore'; warnInvalidHookAccess(); updateHookTypesDev(); return updateSyncExternalStore(subscribe, getSnapshot); }, useId: function () { currentHookNameInDev = 'useId'; warnInvalidHookAccess(); updateHookTypesDev(); return updateId(); }, unstable_isNewReconciler: enableNewReconciler }; } var now$1 = Scheduler.unstable_now; var commitTime = 0; var layoutEffectStartTime = -1; var profilerStartTime = -1; var passiveEffectStartTime = -1; /** * Tracks whether the current update was a nested/cascading update (scheduled from a layout effect). * * The overall sequence is: * 1. render * 2. commit (and call `onRender`, `onCommit`) * 3. check for nested updates * 4. flush passive effects (and call `onPostCommit`) * * Nested updates are identified in step 3 above, * but step 4 still applies to the work that was just committed. * We use two flags to track nested updates then: * one tracks whether the upcoming update is a nested update, * and the other tracks whether the current update was a nested update. * The first value gets synced to the second at the start of the render phase. */ var currentUpdateIsNested = false; var nestedUpdateScheduled = false; function isCurrentUpdateNested() { return currentUpdateIsNested; } function markNestedUpdateScheduled() { { nestedUpdateScheduled = true; } } function resetNestedUpdateFlag() { { currentUpdateIsNested = false; nestedUpdateScheduled = false; } } function syncNestedUpdateFlag() { { currentUpdateIsNested = nestedUpdateScheduled; nestedUpdateScheduled = false; } } function getCommitTime() { return commitTime; } function recordCommitTime() { commitTime = now$1(); } function startProfilerTimer(fiber) { profilerStartTime = now$1(); if (fiber.actualStartTime < 0) { fiber.actualStartTime = now$1(); } } function stopProfilerTimerIfRunning(fiber) { profilerStartTime = -1; } function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) { if (profilerStartTime >= 0) { var elapsedTime = now$1() - profilerStartTime; fiber.actualDuration += elapsedTime; if (overrideBaseTime) { fiber.selfBaseDuration = elapsedTime; } profilerStartTime = -1; } } function recordLayoutEffectDuration(fiber) { if (layoutEffectStartTime >= 0) { var elapsedTime = now$1() - layoutEffectStartTime; layoutEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor // Or the root (for the DevTools Profiler to read) var parentFiber = fiber.return; while (parentFiber !== null) { switch (parentFiber.tag) { case HostRoot: var root = parentFiber.stateNode; root.effectDuration += elapsedTime; return; case Profiler: var parentStateNode = parentFiber.stateNode; parentStateNode.effectDuration += elapsedTime; return; } parentFiber = parentFiber.return; } } } function recordPassiveEffectDuration(fiber) { if (passiveEffectStartTime >= 0) { var elapsedTime = now$1() - passiveEffectStartTime; passiveEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor // Or the root (for the DevTools Profiler to read) var parentFiber = fiber.return; while (parentFiber !== null) { switch (parentFiber.tag) { case HostRoot: var root = parentFiber.stateNode; if (root !== null) { root.passiveEffectDuration += elapsedTime; } return; case Profiler: var parentStateNode = parentFiber.stateNode; if (parentStateNode !== null) { // Detached fibers have their state node cleared out. // In this case, the return pointer is also cleared out, // so we won't be able to report the time spent in this Profiler's subtree. parentStateNode.passiveEffectDuration += elapsedTime; } return; } parentFiber = parentFiber.return; } } } function startLayoutEffectTimer() { layoutEffectStartTime = now$1(); } function startPassiveEffectTimer() { passiveEffectStartTime = now$1(); } function transferActualDuration(fiber) { // Transfer time spent rendering these children so we don't lose it // after we rerender. This is used as a helper in special cases // where we should count the work of multiple passes. var child = fiber.child; while (child) { fiber.actualDuration += child.actualDuration; child = child.sibling; } } function resolveDefaultProps(Component, baseProps) { if (Component && Component.defaultProps) { // Resolve default props. Taken from ReactElement var props = assign({}, baseProps); var defaultProps = Component.defaultProps; for (var propName in defaultProps) { if (props[propName] === undefined) { props[propName] = defaultProps[propName]; } } return props; } return baseProps; } var fakeInternalInstance = {}; var didWarnAboutStateAssignmentForComponent; var didWarnAboutUninitializedState; var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate; var didWarnAboutLegacyLifecyclesAndDerivedState; var didWarnAboutUndefinedDerivedState; var warnOnUndefinedDerivedState; var warnOnInvalidCallback; var didWarnAboutDirectlyAssigningPropsToState; var didWarnAboutContextTypeAndContextTypes; var didWarnAboutInvalidateContextType; var didWarnAboutLegacyContext$1; { didWarnAboutStateAssignmentForComponent = new Set(); didWarnAboutUninitializedState = new Set(); didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set(); didWarnAboutLegacyLifecyclesAndDerivedState = new Set(); didWarnAboutDirectlyAssigningPropsToState = new Set(); didWarnAboutUndefinedDerivedState = new Set(); didWarnAboutContextTypeAndContextTypes = new Set(); didWarnAboutInvalidateContextType = new Set(); didWarnAboutLegacyContext$1 = new Set(); var didWarnOnInvalidCallback = new Set(); warnOnInvalidCallback = function (callback, callerName) { if (callback === null || typeof callback === 'function') { return; } var key = callerName + '_' + callback; if (!didWarnOnInvalidCallback.has(key)) { didWarnOnInvalidCallback.add(key); error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback); } }; warnOnUndefinedDerivedState = function (type, partialState) { if (partialState === undefined) { var componentName = getComponentNameFromType(type) || 'Component'; if (!didWarnAboutUndefinedDerivedState.has(componentName)) { didWarnAboutUndefinedDerivedState.add(componentName); error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName); } } }; // This is so gross but it's at least non-critical and can be removed if // it causes problems. This is meant to give a nicer error message for // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component, // ...)) which otherwise throws a "_processChildContext is not a function" // exception. Object.defineProperty(fakeInternalInstance, '_processChildContext', { enumerable: false, value: function () { throw new Error('_processChildContext is not available in React 16+. This likely ' + 'means you have multiple copies of React and are attempting to nest ' + 'a React 15 tree inside a React 16 tree using ' + "unstable_renderSubtreeIntoContainer, which isn't supported. Try " + 'to make sure you have only one copy of React (and ideally, switch ' + 'to ReactDOM.createPortal).'); } }); Object.freeze(fakeInternalInstance); } function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) { var prevState = workInProgress.memoizedState; var partialState = getDerivedStateFromProps(nextProps, prevState); { if ( workInProgress.mode & StrictLegacyMode) { setIsStrictModeForDevtools(true); try { // Invoke the function an extra time to help detect side-effects. partialState = getDerivedStateFromProps(nextProps, prevState); } finally { setIsStrictModeForDevtools(false); } } warnOnUndefinedDerivedState(ctor, partialState); } // Merge the partial state and the previous state. var memoizedState = partialState === null || partialState === undefined ? prevState : assign({}, prevState, partialState); workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the // base state. if (workInProgress.lanes === NoLanes) { // Queue is always non-null for classes var updateQueue = workInProgress.updateQueue; updateQueue.baseState = memoizedState; } } var classComponentUpdater = { isMounted: isMounted, enqueueSetState: function (inst, payload, callback) { var fiber = get(inst); var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); var update = createUpdate(eventTime, lane); update.payload = payload; if (callback !== undefined && callback !== null) { { warnOnInvalidCallback(callback, 'setState'); } update.callback = callback; } var root = enqueueUpdate(fiber, update, lane); if (root !== null) { scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } { markStateUpdateScheduled(fiber, lane); } }, enqueueReplaceState: function (inst, payload, callback) { var fiber = get(inst); var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); var update = createUpdate(eventTime, lane); update.tag = ReplaceState; update.payload = payload; if (callback !== undefined && callback !== null) { { warnOnInvalidCallback(callback, 'replaceState'); } update.callback = callback; } var root = enqueueUpdate(fiber, update, lane); if (root !== null) { scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } { markStateUpdateScheduled(fiber, lane); } }, enqueueForceUpdate: function (inst, callback) { var fiber = get(inst); var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); var update = createUpdate(eventTime, lane); update.tag = ForceUpdate; if (callback !== undefined && callback !== null) { { warnOnInvalidCallback(callback, 'forceUpdate'); } update.callback = callback; } var root = enqueueUpdate(fiber, update, lane); if (root !== null) { scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } { markForceUpdateScheduled(fiber, lane); } } }; function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) { var instance = workInProgress.stateNode; if (typeof instance.shouldComponentUpdate === 'function') { var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext); { if ( workInProgress.mode & StrictLegacyMode) { setIsStrictModeForDevtools(true); try { // Invoke the function an extra time to help detect side-effects. shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext); } finally { setIsStrictModeForDevtools(false); } } if (shouldUpdate === undefined) { error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentNameFromType(ctor) || 'Component'); } } return shouldUpdate; } if (ctor.prototype && ctor.prototype.isPureReactComponent) { return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState); } return true; } function checkClassInstance(workInProgress, ctor, newProps) { var instance = workInProgress.stateNode; { var name = getComponentNameFromType(ctor) || 'Component'; var renderPresent = instance.render; if (!renderPresent) { if (ctor.prototype && typeof ctor.prototype.render === 'function') { error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name); } else { error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name); } } if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) { error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name); } if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) { error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name); } if (instance.propTypes) { error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name); } if (instance.contextType) { error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name); } { if (ctor.childContextTypes && !didWarnAboutLegacyContext$1.has(ctor) && // Strict Mode has its own warning for legacy context, so we can skip // this one. (workInProgress.mode & StrictLegacyMode) === NoMode) { didWarnAboutLegacyContext$1.add(ctor); error('%s uses the legacy childContextTypes API which is no longer ' + 'supported and will be removed in the next major release. Use ' + 'React.createContext() instead\n\n.' + 'Learn more about this warning here: https://reactjs.org/link/legacy-context', name); } if (ctor.contextTypes && !didWarnAboutLegacyContext$1.has(ctor) && // Strict Mode has its own warning for legacy context, so we can skip // this one. (workInProgress.mode & StrictLegacyMode) === NoMode) { didWarnAboutLegacyContext$1.add(ctor); error('%s uses the legacy contextTypes API which is no longer supported ' + 'and will be removed in the next major release. Use ' + 'React.createContext() with static contextType instead.\n\n' + 'Learn more about this warning here: https://reactjs.org/link/legacy-context', name); } if (instance.contextTypes) { error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name); } if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) { didWarnAboutContextTypeAndContextTypes.add(ctor); error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name); } } if (typeof instance.componentShouldUpdate === 'function') { error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name); } if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') { error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component'); } if (typeof instance.componentDidUnmount === 'function') { error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name); } if (typeof instance.componentDidReceiveProps === 'function') { error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name); } if (typeof instance.componentWillRecieveProps === 'function') { error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name); } if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') { error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name); } var hasMutatedProps = instance.props !== newProps; if (instance.props !== undefined && hasMutatedProps) { error('%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name); } if (instance.defaultProps) { error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name); } if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) { didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor); error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor)); } if (typeof instance.getDerivedStateFromProps === 'function') { error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name); } if (typeof instance.getDerivedStateFromError === 'function') { error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name); } if (typeof ctor.getSnapshotBeforeUpdate === 'function') { error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name); } var _state = instance.state; if (_state && (typeof _state !== 'object' || isArray(_state))) { error('%s.state: must be set to an object or null', name); } if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') { error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name); } } } function adoptClassInstance(workInProgress, instance) { instance.updater = classComponentUpdater; workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates set(instance, workInProgress); { instance._reactInternalInstance = fakeInternalInstance; } } function constructClassInstance(workInProgress, ctor, props) { var isLegacyContextConsumer = false; var unmaskedContext = emptyContextObject; var context = emptyContextObject; var contextType = ctor.contextType; { if ('contextType' in ctor) { var isValid = // Allow null for conditional declaration contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer> if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) { didWarnAboutInvalidateContextType.add(ctor); var addendum = ''; if (contextType === undefined) { addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.'; } else if (typeof contextType !== 'object') { addendum = ' However, it is set to a ' + typeof contextType + '.'; } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { addendum = ' Did you accidentally pass the Context.Provider instead?'; } else if (contextType._context !== undefined) { // <Context.Consumer> addendum = ' Did you accidentally pass the Context.Consumer instead?'; } else { addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.'; } error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum); } } } if (typeof contextType === 'object' && contextType !== null) { context = readContext(contextType); } else { unmaskedContext = getUnmaskedContext(workInProgress, ctor, true); var contextTypes = ctor.contextTypes; isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined; context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject; } var instance = new ctor(props, context); // Instantiate twice to help detect side-effects. { if ( workInProgress.mode & StrictLegacyMode) { setIsStrictModeForDevtools(true); try { instance = new ctor(props, context); // eslint-disable-line no-new } finally { setIsStrictModeForDevtools(false); } } } var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null; adoptClassInstance(workInProgress, instance); { if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) { var componentName = getComponentNameFromType(ctor) || 'Component'; if (!didWarnAboutUninitializedState.has(componentName)) { didWarnAboutUninitializedState.add(componentName); error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName); } } // If new component APIs are defined, "unsafe" lifecycles won't be called. // Warn about these lifecycles if they are present. // Don't warn about react-lifecycles-compat polyfilled methods though. if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') { var foundWillMountName = null; var foundWillReceivePropsName = null; var foundWillUpdateName = null; if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) { foundWillMountName = 'componentWillMount'; } else if (typeof instance.UNSAFE_componentWillMount === 'function') { foundWillMountName = 'UNSAFE_componentWillMount'; } if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) { foundWillReceivePropsName = 'componentWillReceiveProps'; } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; } if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) { foundWillUpdateName = 'componentWillUpdate'; } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') { foundWillUpdateName = 'UNSAFE_componentWillUpdate'; } if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) { var _componentName = getComponentNameFromType(ctor) || 'Component'; var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()'; if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) { didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName); error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n " + foundWillUpdateName : ''); } } } } // Cache unmasked context so we can avoid recreating masked context unless necessary. // ReactFiberContext usually updates this cache but can't for newly-created instances. if (isLegacyContextConsumer) { cacheContext(workInProgress, unmaskedContext, context); } return instance; } function callComponentWillMount(workInProgress, instance) { var oldState = instance.state; if (typeof instance.componentWillMount === 'function') { instance.componentWillMount(); } if (typeof instance.UNSAFE_componentWillMount === 'function') { instance.UNSAFE_componentWillMount(); } if (oldState !== instance.state) { { error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentNameFromFiber(workInProgress) || 'Component'); } classComponentUpdater.enqueueReplaceState(instance, instance.state, null); } } function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) { var oldState = instance.state; if (typeof instance.componentWillReceiveProps === 'function') { instance.componentWillReceiveProps(newProps, nextContext); } if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { instance.UNSAFE_componentWillReceiveProps(newProps, nextContext); } if (instance.state !== oldState) { { var componentName = getComponentNameFromFiber(workInProgress) || 'Component'; if (!didWarnAboutStateAssignmentForComponent.has(componentName)) { didWarnAboutStateAssignmentForComponent.add(componentName); error('%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName); } } classComponentUpdater.enqueueReplaceState(instance, instance.state, null); } } // Invokes the mount life-cycles on a previously never rendered instance. function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { { checkClassInstance(workInProgress, ctor, newProps); } var instance = workInProgress.stateNode; instance.props = newProps; instance.state = workInProgress.memoizedState; instance.refs = {}; initializeUpdateQueue(workInProgress); var contextType = ctor.contextType; if (typeof contextType === 'object' && contextType !== null) { instance.context = readContext(contextType); } else { var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true); instance.context = getMaskedContext(workInProgress, unmaskedContext); } { if (instance.state === newProps) { var componentName = getComponentNameFromType(ctor) || 'Component'; if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) { didWarnAboutDirectlyAssigningPropsToState.add(componentName); error('%s: It is not recommended to assign props directly to state ' + "because updates to props won't be reflected in state. " + 'In most cases, it is better to use props directly.', componentName); } } if (workInProgress.mode & StrictLegacyMode) { ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance); } { ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance); } } instance.state = workInProgress.memoizedState; var getDerivedStateFromProps = ctor.getDerivedStateFromProps; if (typeof getDerivedStateFromProps === 'function') { applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); instance.state = workInProgress.memoizedState; } // In order to support react-lifecycles-compat polyfilled components, // Unsafe lifecycles should not be invoked for components using the new APIs. if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) { callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's // process them now. processUpdateQueue(workInProgress, newProps, instance, renderLanes); instance.state = workInProgress.memoizedState; } if (typeof instance.componentDidMount === 'function') { var fiberFlags = Update; { fiberFlags |= LayoutStatic; } if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) { fiberFlags |= MountLayoutDev; } workInProgress.flags |= fiberFlags; } } function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) { var instance = workInProgress.stateNode; var oldProps = workInProgress.memoizedProps; instance.props = oldProps; var oldContext = instance.context; var contextType = ctor.contextType; var nextContext = emptyContextObject; if (typeof contextType === 'object' && contextType !== null) { nextContext = readContext(contextType); } else { var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true); nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext); } var getDerivedStateFromProps = ctor.getDerivedStateFromProps; var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what // ever the previously attempted to render - not the "current". However, // during componentDidUpdate we pass the "current" props. // In order to support react-lifecycles-compat polyfilled components, // Unsafe lifecycles should not be invoked for components using the new APIs. if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) { if (oldProps !== newProps || oldContext !== nextContext) { callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext); } } resetHasForceUpdateBeforeProcessing(); var oldState = workInProgress.memoizedState; var newState = instance.state = oldState; processUpdateQueue(workInProgress, newProps, instance, renderLanes); newState = workInProgress.memoizedState; if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) { // If an update was already in progress, we should schedule an Update // effect even though we're bailing out, so that cWU/cDU are called. if (typeof instance.componentDidMount === 'function') { var fiberFlags = Update; { fiberFlags |= LayoutStatic; } if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) { fiberFlags |= MountLayoutDev; } workInProgress.flags |= fiberFlags; } return false; } if (typeof getDerivedStateFromProps === 'function') { applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); newState = workInProgress.memoizedState; } var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext); if (shouldUpdate) { // In order to support react-lifecycles-compat polyfilled components, // Unsafe lifecycles should not be invoked for components using the new APIs. if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) { if (typeof instance.componentWillMount === 'function') { instance.componentWillMount(); } if (typeof instance.UNSAFE_componentWillMount === 'function') { instance.UNSAFE_componentWillMount(); } } if (typeof instance.componentDidMount === 'function') { var _fiberFlags = Update; { _fiberFlags |= LayoutStatic; } if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) { _fiberFlags |= MountLayoutDev; } workInProgress.flags |= _fiberFlags; } } else { // If an update was already in progress, we should schedule an Update // effect even though we're bailing out, so that cWU/cDU are called. if (typeof instance.componentDidMount === 'function') { var _fiberFlags2 = Update; { _fiberFlags2 |= LayoutStatic; } if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) { _fiberFlags2 |= MountLayoutDev; } workInProgress.flags |= _fiberFlags2; } // If shouldComponentUpdate returned false, we should still update the // memoized state to indicate that this work can be reused. workInProgress.memoizedProps = newProps; workInProgress.memoizedState = newState; } // Update the existing instance's state, props, and context pointers even // if shouldComponentUpdate returns false. instance.props = newProps; instance.state = newState; instance.context = nextContext; return shouldUpdate; } // Invokes the update life-cycles and returns false if it shouldn't rerender. function updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) { var instance = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); var unresolvedOldProps = workInProgress.memoizedProps; var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps); instance.props = oldProps; var unresolvedNewProps = workInProgress.pendingProps; var oldContext = instance.context; var contextType = ctor.contextType; var nextContext = emptyContextObject; if (typeof contextType === 'object' && contextType !== null) { nextContext = readContext(contextType); } else { var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true); nextContext = getMaskedContext(workInProgress, nextUnmaskedContext); } var getDerivedStateFromProps = ctor.getDerivedStateFromProps; var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what // ever the previously attempted to render - not the "current". However, // during componentDidUpdate we pass the "current" props. // In order to support react-lifecycles-compat polyfilled components, // Unsafe lifecycles should not be invoked for components using the new APIs. if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) { if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) { callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext); } } resetHasForceUpdateBeforeProcessing(); var oldState = workInProgress.memoizedState; var newState = instance.state = oldState; processUpdateQueue(workInProgress, newProps, instance, renderLanes); newState = workInProgress.memoizedState; if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() && !(enableLazyContextPropagation )) { // If an update was already in progress, we should schedule an Update // effect even though we're bailing out, so that cWU/cDU are called. if (typeof instance.componentDidUpdate === 'function') { if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) { workInProgress.flags |= Update; } } if (typeof instance.getSnapshotBeforeUpdate === 'function') { if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) { workInProgress.flags |= Snapshot; } } return false; } if (typeof getDerivedStateFromProps === 'function') { applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); newState = workInProgress.memoizedState; } var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) || // TODO: In some cases, we'll end up checking if context has changed twice, // both before and after `shouldComponentUpdate` has been called. Not ideal, // but I'm loath to refactor this function. This only happens for memoized // components so it's not that common. enableLazyContextPropagation ; if (shouldUpdate) { // In order to support react-lifecycles-compat polyfilled components, // Unsafe lifecycles should not be invoked for components using the new APIs. if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) { if (typeof instance.componentWillUpdate === 'function') { instance.componentWillUpdate(newProps, newState, nextContext); } if (typeof instance.UNSAFE_componentWillUpdate === 'function') { instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext); } } if (typeof instance.componentDidUpdate === 'function') { workInProgress.flags |= Update; } if (typeof instance.getSnapshotBeforeUpdate === 'function') { workInProgress.flags |= Snapshot; } } else { // If an update was already in progress, we should schedule an Update // effect even though we're bailing out, so that cWU/cDU are called. if (typeof instance.componentDidUpdate === 'function') { if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) { workInProgress.flags |= Update; } } if (typeof instance.getSnapshotBeforeUpdate === 'function') { if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) { workInProgress.flags |= Snapshot; } } // If shouldComponentUpdate returned false, we should still update the // memoized props/state to indicate that this work can be reused. workInProgress.memoizedProps = newProps; workInProgress.memoizedState = newState; } // Update the existing instance's state, props, and context pointers even // if shouldComponentUpdate returns false. instance.props = newProps; instance.state = newState; instance.context = nextContext; return shouldUpdate; } function createCapturedValueAtFiber(value, source) { // If the value is an error, call this function immediately after it is thrown // so the stack is accurate. return { value: value, source: source, stack: getStackByFiberInDevAndProd(source), digest: null }; } function createCapturedValue(value, digest, stack) { return { value: value, source: null, stack: stack != null ? stack : null, digest: digest != null ? digest : null }; } // This module is forked in different environments. // By default, return `true` to log errors to the console. // Forks can return `false` if this isn't desirable. function showErrorDialog(boundary, errorInfo) { return true; } function logCapturedError(boundary, errorInfo) { try { var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging. // This enables renderers like ReactNative to better manage redbox behavior. if (logError === false) { return; } var error = errorInfo.value; if (true) { var source = errorInfo.source; var stack = errorInfo.stack; var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling // `preventDefault()` in window `error` handler. // We record this information as an expando on the error. if (error != null && error._suppressLogging) { if (boundary.tag === ClassComponent) { // The error is recoverable and was silenced. // Ignore it and don't print the stack addendum. // This is handy for testing error boundaries without noise. return; } // The error is fatal. Since the silencing might have // been accidental, we'll surface it anyway. // However, the browser would have silenced the original error // so we'll print it first, and then print the stack addendum. console['error'](error); // Don't transform to our wrapper // For a more detailed description of this block, see: // https://github.com/facebook/react/pull/13384 } var componentName = source ? getComponentNameFromFiber(source) : null; var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:'; var errorBoundaryMessage; if (boundary.tag === HostRoot) { errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.'; } else { var errorBoundaryName = getComponentNameFromFiber(boundary) || 'Anonymous'; errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + "."); } var combinedMessage = componentNameMessage + "\n" + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack. // We don't include the original error message and JS stack because the browser // has already printed it. Even if the application swallows the error, it is still // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils. console['error'](combinedMessage); // Don't transform to our wrapper } else { // In production, we print the error directly. // This will include the message, the JS stack, and anything the browser wants to show. // We pass the error object instead of custom message so that the browser displays the error natively. console['error'](error); // Don't transform to our wrapper } } catch (e) { // This method must not throw, or React internal state will get messed up. // If console.error is overridden, or logCapturedError() shows a dialog that throws, // we want to report this error outside of the normal stack as a last resort. // https://github.com/facebook/react/issues/13188 setTimeout(function () { throw e; }); } } var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map; function createRootErrorUpdate(fiber, errorInfo, lane) { var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null. update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property // being called "element". update.payload = { element: null }; var error = errorInfo.value; update.callback = function () { onUncaughtError(error); logCapturedError(fiber, errorInfo); }; return update; } function createClassErrorUpdate(fiber, errorInfo, lane) { var update = createUpdate(NoTimestamp, lane); update.tag = CaptureUpdate; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; if (typeof getDerivedStateFromError === 'function') { var error$1 = errorInfo.value; update.payload = function () { return getDerivedStateFromError(error$1); }; update.callback = function () { { markFailedErrorBoundaryForHotReloading(fiber); } logCapturedError(fiber, errorInfo); }; } var inst = fiber.stateNode; if (inst !== null && typeof inst.componentDidCatch === 'function') { update.callback = function callback() { { markFailedErrorBoundaryForHotReloading(fiber); } logCapturedError(fiber, errorInfo); if (typeof getDerivedStateFromError !== 'function') { // To preserve the preexisting retry behavior of error boundaries, // we keep track of which ones already failed during this batch. // This gets reset before we yield back to the browser. // TODO: Warn in strict mode if getDerivedStateFromError is // not defined. markLegacyErrorBoundaryAsFailed(this); } var error$1 = errorInfo.value; var stack = errorInfo.stack; this.componentDidCatch(error$1, { componentStack: stack !== null ? stack : '' }); { if (typeof getDerivedStateFromError !== 'function') { // If componentDidCatch is the only error boundary method defined, // then it needs to call setState to recover from errors. // If no state update is scheduled then the boundary will swallow the error. if (!includesSomeLane(fiber.lanes, SyncLane)) { error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentNameFromFiber(fiber) || 'Unknown'); } } } }; } return update; } function attachPingListener(root, wakeable, lanes) { // Attach a ping listener // // The data might resolve before we have a chance to commit the fallback. Or, // in the case of a refresh, we'll never commit a fallback. So we need to // attach a listener now. When it resolves ("pings"), we can decide whether to // try rendering the tree again. // // Only attach a listener if one does not already exist for the lanes // we're currently rendering (which acts like a "thread ID" here). // // We only need to do this in concurrent mode. Legacy Suspense always // commits fallbacks synchronously, so there are no pings. var pingCache = root.pingCache; var threadIDs; if (pingCache === null) { pingCache = root.pingCache = new PossiblyWeakMap$1(); threadIDs = new Set(); pingCache.set(wakeable, threadIDs); } else { threadIDs = pingCache.get(wakeable); if (threadIDs === undefined) { threadIDs = new Set(); pingCache.set(wakeable, threadIDs); } } if (!threadIDs.has(lanes)) { // Memoize using the thread ID to prevent redundant listeners. threadIDs.add(lanes); var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes); { if (isDevToolsPresent) { // If we have pending work still, restore the original updaters restorePendingUpdaters(root, lanes); } } wakeable.then(ping, ping); } } function attachRetryListener(suspenseBoundary, root, wakeable, lanes) { // Retry listener // // If the fallback does commit, we need to attach a different type of // listener. This one schedules an update on the Suspense boundary to turn // the fallback state off. // // Stash the wakeable on the boundary fiber so we can access it in the // commit phase. // // When the wakeable resolves, we'll attempt to render the boundary // again ("retry"). var wakeables = suspenseBoundary.updateQueue; if (wakeables === null) { var updateQueue = new Set(); updateQueue.add(wakeable); suspenseBoundary.updateQueue = updateQueue; } else { wakeables.add(wakeable); } } function resetSuspendedComponent(sourceFiber, rootRenderLanes) { // A legacy mode Suspense quirk, only relevant to hook components. var tag = sourceFiber.tag; if ((sourceFiber.mode & ConcurrentMode) === NoMode && (tag === FunctionComponent || tag === ForwardRef || tag === SimpleMemoComponent)) { var currentSource = sourceFiber.alternate; if (currentSource) { sourceFiber.updateQueue = currentSource.updateQueue; sourceFiber.memoizedState = currentSource.memoizedState; sourceFiber.lanes = currentSource.lanes; } else { sourceFiber.updateQueue = null; sourceFiber.memoizedState = null; } } } function getNearestSuspenseBoundaryToCapture(returnFiber) { var node = returnFiber; do { if (node.tag === SuspenseComponent && shouldCaptureSuspense(node)) { return node; } // This boundary already captured during this render. Continue to the next // boundary. node = node.return; } while (node !== null); return null; } function markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes) { // This marks a Suspense boundary so that when we're unwinding the stack, // it captures the suspended "exception" and does a second (fallback) pass. if ((suspenseBoundary.mode & ConcurrentMode) === NoMode) { // Legacy Mode Suspense // // If the boundary is in legacy mode, we should *not* // suspend the commit. Pretend as if the suspended component rendered // null and keep rendering. When the Suspense boundary completes, // we'll do a second pass to render the fallback. if (suspenseBoundary === returnFiber) { // Special case where we suspended while reconciling the children of // a Suspense boundary's inner Offscreen wrapper fiber. This happens // when a React.lazy component is a direct child of a // Suspense boundary. // // Suspense boundaries are implemented as multiple fibers, but they // are a single conceptual unit. The legacy mode behavior where we // pretend the suspended fiber committed as `null` won't work, // because in this case the "suspended" fiber is the inner // Offscreen wrapper. // // Because the contents of the boundary haven't started rendering // yet (i.e. nothing in the tree has partially rendered) we can // switch to the regular, concurrent mode behavior: mark the // boundary with ShouldCapture and enter the unwind phase. suspenseBoundary.flags |= ShouldCapture; } else { suspenseBoundary.flags |= DidCapture; sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete. // But we shouldn't call any lifecycle methods or callbacks. Remove // all lifecycle effect tags. sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete); if (sourceFiber.tag === ClassComponent) { var currentSourceFiber = sourceFiber.alternate; if (currentSourceFiber === null) { // This is a new mount. Change the tag so it's not mistaken for a // completed class component. For example, we should not call // componentWillUnmount if it is deleted. sourceFiber.tag = IncompleteClassComponent; } else { // When we try rendering again, we should not reuse the current fiber, // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. var update = createUpdate(NoTimestamp, SyncLane); update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } } // The source fiber did not complete. Mark it with Sync priority to // indicate that it still has pending work. sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane); } return suspenseBoundary; } // Confirmed that the boundary is in a concurrent mode tree. Continue // with the normal suspend path. // // After this we'll use a set of heuristics to determine whether this // render pass will run to completion or restart or "suspend" the commit. // The actual logic for this is spread out in different places. // // This first principle is that if we're going to suspend when we complete // a root, then we should also restart if we get an update or ping that // might unsuspend it, and vice versa. The only reason to suspend is // because you think you might want to restart before committing. However, // it doesn't make sense to restart only while in the period we're suspended. // // Restarting too aggressively is also not good because it starves out any // intermediate loading state. So we use heuristics to determine when. // Suspense Heuristics // // If nothing threw a Promise or all the same fallbacks are already showing, // then don't suspend/restart. // // If this is an initial render of a new tree of Suspense boundaries and // those trigger a fallback, then don't suspend/restart. We want to ensure // that we can show the initial loading state as quickly as possible. // // If we hit a "Delayed" case, such as when we'd switch from content back into // a fallback, then we should always suspend/restart. Transitions apply // to this case. If none is defined, JND is used instead. // // If we're already showing a fallback and it gets "retried", allowing us to show // another level, but there's still an inner boundary that would show a fallback, // then we suspend/restart for 500ms since the last time we showed a fallback // anywhere in the tree. This effectively throttles progressive loading into a // consistent train of commits. This also gives us an opportunity to restart to // get to the completed state slightly earlier. // // If there's ambiguity due to batching it's resolved in preference of: // 1) "delayed", 2) "initial render", 3) "retry". // // We want to ensure that a "busy" state doesn't get force committed. We want to // ensure that new initial loading states can commit as soon as possible. suspenseBoundary.flags |= ShouldCapture; // TODO: I think we can remove this, since we now use `DidCapture` in // the begin phase to prevent an early bailout. suspenseBoundary.lanes = rootRenderLanes; return suspenseBoundary; } function throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) { // The source fiber did not complete. sourceFiber.flags |= Incomplete; { if (isDevToolsPresent) { // If we have pending work still, restore the original updaters restorePendingUpdaters(root, rootRenderLanes); } } if (value !== null && typeof value === 'object' && typeof value.then === 'function') { // This is a wakeable. The component suspended. var wakeable = value; resetSuspendedComponent(sourceFiber); { if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) { markDidThrowWhileHydratingDEV(); } } var suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber); if (suspenseBoundary !== null) { suspenseBoundary.flags &= ~ForceClientRender; markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // We only attach ping listeners in concurrent mode. Legacy Suspense always // commits fallbacks synchronously, so there are no pings. if (suspenseBoundary.mode & ConcurrentMode) { attachPingListener(root, wakeable, rootRenderLanes); } attachRetryListener(suspenseBoundary, root, wakeable); return; } else { // No boundary was found. Unless this is a sync update, this is OK. // We can suspend and wait for more data to arrive. if (!includesSyncLane(rootRenderLanes)) { // This is not a sync update. Suspend. Since we're not activating a // Suspense boundary, this will unwind all the way to the root without // performing a second pass to render a fallback. (This is arguably how // refresh transitions should work, too, since we're not going to commit // the fallbacks anyway.) // // This case also applies to initial hydration. attachPingListener(root, wakeable, rootRenderLanes); renderDidSuspendDelayIfPossible(); return; } // This is a sync/discrete update. We treat this case like an error // because discrete renders are expected to produce a complete tree // synchronously to maintain consistency with external state. var uncaughtSuspenseError = new Error('A component suspended while responding to synchronous input. This ' + 'will cause the UI to be replaced with a loading indicator. To ' + 'fix, updates that suspend should be wrapped ' + 'with startTransition.'); // If we're outside a transition, fall through to the regular error path. // The error will be caught by the nearest suspense boundary. value = uncaughtSuspenseError; } } else { // This is a regular error, not a Suspense wakeable. if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) { markDidThrowWhileHydratingDEV(); var _suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber); // If the error was thrown during hydration, we may be able to recover by // discarding the dehydrated content and switching to a client render. // Instead of surfacing the error, find the nearest Suspense boundary // and render it again without hydration. if (_suspenseBoundary !== null) { if ((_suspenseBoundary.flags & ShouldCapture) === NoFlags) { // Set a flag to indicate that we should try rendering the normal // children again, not the fallback. _suspenseBoundary.flags |= ForceClientRender; } markSuspenseBoundaryShouldCapture(_suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // Even though the user may not be affected by this error, we should // still log it so it can be fixed. queueHydrationError(createCapturedValueAtFiber(value, sourceFiber)); return; } } } value = createCapturedValueAtFiber(value, sourceFiber); renderDidError(value); // We didn't find a boundary that could handle this type of exception. Start // over and traverse parent path again, this time treating the exception // as an error. var workInProgress = returnFiber; do { switch (workInProgress.tag) { case HostRoot: { var _errorInfo = value; workInProgress.flags |= ShouldCapture; var lane = pickArbitraryLane(rootRenderLanes); workInProgress.lanes = mergeLanes(workInProgress.lanes, lane); var update = createRootErrorUpdate(workInProgress, _errorInfo, lane); enqueueCapturedUpdate(workInProgress, update); return; } case ClassComponent: // Capture and retry var errorInfo = value; var ctor = workInProgress.type; var instance = workInProgress.stateNode; if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) { workInProgress.flags |= ShouldCapture; var _lane = pickArbitraryLane(rootRenderLanes); workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state var _update = createClassErrorUpdate(workInProgress, errorInfo, _lane); enqueueCapturedUpdate(workInProgress, _update); return; } break; } workInProgress = workInProgress.return; } while (workInProgress !== null); } function getSuspendedCache() { { return null; } // This function is called when a Suspense boundary suspends. It returns the } var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; var didReceiveUpdate = false; var didWarnAboutBadClass; var didWarnAboutModulePatternComponent; var didWarnAboutContextTypeOnFunctionComponent; var didWarnAboutGetDerivedStateOnFunctionComponent; var didWarnAboutFunctionRefs; var didWarnAboutReassigningProps; var didWarnAboutRevealOrder; var didWarnAboutTailOptions; var didWarnAboutDefaultPropsOnFunctionComponent; { didWarnAboutBadClass = {}; didWarnAboutModulePatternComponent = {}; didWarnAboutContextTypeOnFunctionComponent = {}; didWarnAboutGetDerivedStateOnFunctionComponent = {}; didWarnAboutFunctionRefs = {}; didWarnAboutReassigningProps = false; didWarnAboutRevealOrder = {}; didWarnAboutTailOptions = {}; didWarnAboutDefaultPropsOnFunctionComponent = {}; } function reconcileChildren(current, workInProgress, nextChildren, renderLanes) { if (current === null) { // If this is a fresh new component that hasn't been rendered yet, we // won't update its child set by applying minimal side-effects. Instead, // we will add them all to the child before it gets rendered. That means // we can optimize this reconciliation pass by not tracking side-effects. workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes); } else { // If the current child is the same as the work in progress, it means that // we haven't yet started any work on these children. Therefore, we use // the clone algorithm to create a copy of all the current children. // If we had any progressed work already, that is invalid at this point so // let's throw it out. workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes); } } function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) { // This function is fork of reconcileChildren. It's used in cases where we // want to reconcile without matching against the existing set. This has the // effect of all current children being unmounted; even if the type and key // are the same, the old child is unmounted and a new child is created. // // To do this, we're going to go through the reconcile algorithm twice. In // the first pass, we schedule a deletion for all the current children by // passing null. workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we // pass null in place of where we usually pass the current child set. This has // the effect of remounting all children regardless of whether their // identities match. workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes); } function updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) { // TODO: current can be non-null here even if the component // hasn't yet mounted. This happens after the first render suspends. // We'll need to figure out if this is fine or can cause issues. { if (workInProgress.type !== workInProgress.elementType) { // Lazy component props can't be validated in createElement // because they're only guaranteed to be resolved here. var innerPropTypes = Component.propTypes; if (innerPropTypes) { checkPropTypes(innerPropTypes, nextProps, // Resolved props 'prop', getComponentNameFromType(Component)); } } } var render = Component.render; var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent var nextChildren; var hasId; prepareToReadContext(workInProgress, renderLanes); { markComponentRenderStarted(workInProgress); } { ReactCurrentOwner$1.current = workInProgress; setIsRendering(true); nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes); hasId = checkDidRenderIdHook(); if ( workInProgress.mode & StrictLegacyMode) { setIsStrictModeForDevtools(true); try { nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes); hasId = checkDidRenderIdHook(); } finally { setIsStrictModeForDevtools(false); } } setIsRendering(false); } { markComponentRenderStopped(); } if (current !== null && !didReceiveUpdate) { bailoutHooks(current, workInProgress, renderLanes); return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); } if (getIsHydrating() && hasId) { pushMaterializedTreeId(workInProgress); } // React DevTools reads this flag. workInProgress.flags |= PerformedWork; reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } function updateMemoComponent(current, workInProgress, Component, nextProps, renderLanes) { if (current === null) { var type = Component.type; if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either. Component.defaultProps === undefined) { var resolvedType = type; { resolvedType = resolveFunctionForHotReloading(type); } // If this is a plain function component without default props, // and with only the default shallow comparison, we upgrade it // to a SimpleMemoComponent to allow fast path updates. workInProgress.tag = SimpleMemoComponent; workInProgress.type = resolvedType; { validateFunctionComponentInDev(workInProgress, type); } return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, renderLanes); } { var innerPropTypes = type.propTypes; if (innerPropTypes) { // Inner memo component props aren't currently validated in createElement. // We could move it there, but we'd still need this for lazy code path. checkPropTypes(innerPropTypes, nextProps, // Resolved props 'prop', getComponentNameFromType(type)); } if ( Component.defaultProps !== undefined) { var componentName = getComponentNameFromType(type) || 'Unknown'; if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) { error('%s: Support for defaultProps will be removed from memo components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName); didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true; } } } var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes); child.ref = workInProgress.ref; child.return = workInProgress; workInProgress.child = child; return child; } { var _type = Component.type; var _innerPropTypes = _type.propTypes; if (_innerPropTypes) { // Inner memo component props aren't currently validated in createElement. // We could move it there, but we'd still need this for lazy code path. checkPropTypes(_innerPropTypes, nextProps, // Resolved props 'prop', getComponentNameFromType(_type)); } } var currentChild = current.child; // This is always exactly one child var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes); if (!hasScheduledUpdateOrContext) { // This will be the props with resolved defaultProps, // unlike current.memoizedProps which will be the unresolved ones. var prevProps = currentChild.memoizedProps; // Default to shallow comparison var compare = Component.compare; compare = compare !== null ? compare : shallowEqual; if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) { return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); } } // React DevTools reads this flag. workInProgress.flags |= PerformedWork; var newChild = createWorkInProgress(currentChild, nextProps); newChild.ref = workInProgress.ref; newChild.return = workInProgress; workInProgress.child = newChild; return newChild; } function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, renderLanes) { // TODO: current can be non-null here even if the component // hasn't yet mounted. This happens when the inner render suspends. // We'll need to figure out if this is fine or can cause issues. { if (workInProgress.type !== workInProgress.elementType) { // Lazy component props can't be validated in createElement // because they're only guaranteed to be resolved here. var outerMemoType = workInProgress.elementType; if (outerMemoType.$$typeof === REACT_LAZY_TYPE) { // We warn when you define propTypes on lazy() // so let's just skip over it to find memo() outer wrapper. // Inner props for memo are validated later. var lazyComponent = outerMemoType; var payload = lazyComponent._payload; var init = lazyComponent._init; try { outerMemoType = init(payload); } catch (x) { outerMemoType = null; } // Inner propTypes will be validated in the function component path. var outerPropTypes = outerMemoType && outerMemoType.propTypes; if (outerPropTypes) { checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps) 'prop', getComponentNameFromType(outerMemoType)); } } } } if (current !== null) { var prevProps = current.memoizedProps; if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload. workInProgress.type === current.type )) { didReceiveUpdate = false; // The props are shallowly equal. Reuse the previous props object, like we // would during a normal fiber bailout. // // We don't have strong guarantees that the props object is referentially // equal during updates where we can't bail out anyway — like if the props // are shallowly equal, but there's a local state or context update in the // same batch. // // However, as a principle, we should aim to make the behavior consistent // across different ways of memoizing a component. For example, React.memo // has a different internal Fiber layout if you pass a normal function // component (SimpleMemoComponent) versus if you pass a different type // like forwardRef (MemoComponent). But this is an implementation detail. // Wrapping a component in forwardRef (or React.lazy, etc) shouldn't // affect whether the props object is reused during a bailout. workInProgress.pendingProps = nextProps = prevProps; if (!checkScheduledUpdateOrContext(current, renderLanes)) { // The pending lanes were cleared at the beginning of beginWork. We're // about to bail out, but there might be other lanes that weren't // included in the current render. Usually, the priority level of the // remaining updates is accumulated during the evaluation of the // component (i.e. when processing the update queue). But since since // we're bailing out early *without* evaluating the component, we need // to account for it here, too. Reset to the value of the current fiber. // NOTE: This only applies to SimpleMemoComponent, not MemoComponent, // because a MemoComponent fiber does not have hooks or an update queue; // rather, it wraps around an inner component, which may or may not // contains hooks. // TODO: Move the reset at in beginWork out of the common path so that // this is no longer necessary. workInProgress.lanes = current.lanes; return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) { // This is a special case that only exists for legacy mode. // See https://github.com/facebook/react/pull/19216. didReceiveUpdate = true; } } } return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes); } function updateOffscreenComponent(current, workInProgress, renderLanes) { var nextProps = workInProgress.pendingProps; var nextChildren = nextProps.children; var prevState = current !== null ? current.memoizedState : null; if (nextProps.mode === 'hidden' || enableLegacyHidden ) { // Rendering a hidden tree. if ((workInProgress.mode & ConcurrentMode) === NoMode) { // In legacy sync mode, don't defer the subtree. Render it now. // TODO: Consider how Offscreen should work with transitions in the future var nextState = { baseLanes: NoLanes, cachePool: null, transitions: null }; workInProgress.memoizedState = nextState; pushRenderLanes(workInProgress, renderLanes); } else if (!includesSomeLane(renderLanes, OffscreenLane)) { var spawnedCachePool = null; // We're hidden, and we're not rendering at Offscreen. We will bail out // and resume this tree later. var nextBaseLanes; if (prevState !== null) { var prevBaseLanes = prevState.baseLanes; nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes); } else { nextBaseLanes = renderLanes; } // Schedule this fiber to re-render at offscreen priority. Then bailout. workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane); var _nextState = { baseLanes: nextBaseLanes, cachePool: spawnedCachePool, transitions: null }; workInProgress.memoizedState = _nextState; workInProgress.updateQueue = null; // to avoid a push/pop misalignment. pushRenderLanes(workInProgress, nextBaseLanes); return null; } else { // This is the second render. The surrounding visible content has already // committed. Now we resume rendering the hidden tree. // Rendering at offscreen, so we can clear the base lanes. var _nextState2 = { baseLanes: NoLanes, cachePool: null, transitions: null }; workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out. var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes; pushRenderLanes(workInProgress, subtreeRenderLanes); } } else { // Rendering a visible tree. var _subtreeRenderLanes; if (prevState !== null) { // We're going from hidden -> visible. _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes); workInProgress.memoizedState = null; } else { // We weren't previously hidden, and we still aren't, so there's nothing // special to do. Need to push to the stack regardless, though, to avoid // a push/pop misalignment. _subtreeRenderLanes = renderLanes; } pushRenderLanes(workInProgress, _subtreeRenderLanes); } reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } // Note: These happen to have identical begin phases, for now. We shouldn't hold function updateFragment(current, workInProgress, renderLanes) { var nextChildren = workInProgress.pendingProps; reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } function updateMode(current, workInProgress, renderLanes) { var nextChildren = workInProgress.pendingProps.children; reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } function updateProfiler(current, workInProgress, renderLanes) { { workInProgress.flags |= Update; { // Reset effect durations for the next eventual effect phase. // These are reset during render to allow the DevTools commit hook a chance to read them, var stateNode = workInProgress.stateNode; stateNode.effectDuration = 0; stateNode.passiveEffectDuration = 0; } } var nextProps = workInProgress.pendingProps; var nextChildren = nextProps.children; reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (current === null && ref !== null || current !== null && current.ref !== ref) { // Schedule a Ref effect workInProgress.flags |= Ref; { workInProgress.flags |= RefStatic; } } } function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) { { if (workInProgress.type !== workInProgress.elementType) { // Lazy component props can't be validated in createElement // because they're only guaranteed to be resolved here. var innerPropTypes = Component.propTypes; if (innerPropTypes) { checkPropTypes(innerPropTypes, nextProps, // Resolved props 'prop', getComponentNameFromType(Component)); } } } var context; { var unmaskedContext = getUnmaskedContext(workInProgress, Component, true); context = getMaskedContext(workInProgress, unmaskedContext); } var nextChildren; var hasId; prepareToReadContext(workInProgress, renderLanes); { markComponentRenderStarted(workInProgress); } { ReactCurrentOwner$1.current = workInProgress; setIsRendering(true); nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes); hasId = checkDidRenderIdHook(); if ( workInProgress.mode & StrictLegacyMode) { setIsStrictModeForDevtools(true); try { nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes); hasId = checkDidRenderIdHook(); } finally { setIsStrictModeForDevtools(false); } } setIsRendering(false); } { markComponentRenderStopped(); } if (current !== null && !didReceiveUpdate) { bailoutHooks(current, workInProgress, renderLanes); return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); } if (getIsHydrating() && hasId) { pushMaterializedTreeId(workInProgress); } // React DevTools reads this flag. workInProgress.flags |= PerformedWork; reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } function updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) { { // This is used by DevTools to force a boundary to error. switch (shouldError(workInProgress)) { case false: { var _instance = workInProgress.stateNode; var ctor = workInProgress.type; // TODO This way of resetting the error boundary state is a hack. // Is there a better way to do this? var tempInstance = new ctor(workInProgress.memoizedProps, _instance.context); var state = tempInstance.state; _instance.updater.enqueueSetState(_instance, state, null); break; } case true: { workInProgress.flags |= DidCapture; workInProgress.flags |= ShouldCapture; // eslint-disable-next-line react-internal/prod-error-codes var error$1 = new Error('Simulated error coming from DevTools'); var lane = pickArbitraryLane(renderLanes); workInProgress.lanes = mergeLanes(workInProgress.lanes, lane); // Schedule the error boundary to re-render using updated state var update = createClassErrorUpdate(workInProgress, createCapturedValueAtFiber(error$1, workInProgress), lane); enqueueCapturedUpdate(workInProgress, update); break; } } if (workInProgress.type !== workInProgress.elementType) { // Lazy component props can't be validated in createElement // because they're only guaranteed to be resolved here. var innerPropTypes = Component.propTypes; if (innerPropTypes) { checkPropTypes(innerPropTypes, nextProps, // Resolved props 'prop', getComponentNameFromType(Component)); } } } // Push context providers early to prevent context stack mismatches. // During mounting we don't know the child context yet as the instance doesn't exist. // We will invalidate the child context in finishClassComponent() right after rendering. var hasContext; if (isContextProvider(Component)) { hasContext = true; pushContextProvider(workInProgress); } else { hasContext = false; } prepareToReadContext(workInProgress, renderLanes); var instance = workInProgress.stateNode; var shouldUpdate; if (instance === null) { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); // In the initial pass we might need to construct the instance. constructClassInstance(workInProgress, Component, nextProps); mountClassInstance(workInProgress, Component, nextProps, renderLanes); shouldUpdate = true; } else if (current === null) { // In a resume, we'll already have an instance we can reuse. shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes); } else { shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes); } var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes); { var inst = workInProgress.stateNode; if (shouldUpdate && inst.props !== nextProps) { if (!didWarnAboutReassigningProps) { error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentNameFromFiber(workInProgress) || 'a component'); } didWarnAboutReassigningProps = true; } } return nextUnitOfWork; } function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) { // Refs should update even if shouldComponentUpdate returns false markRef(current, workInProgress); var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags; if (!shouldUpdate && !didCaptureError) { // Context providers should defer to sCU for rendering if (hasContext) { invalidateContextProvider(workInProgress, Component, false); } return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); } var instance = workInProgress.stateNode; // Rerender ReactCurrentOwner$1.current = workInProgress; var nextChildren; if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') { // If we captured an error, but getDerivedStateFromError is not defined, // unmount all the children. componentDidCatch will schedule an update to // re-render a fallback. This is temporary until we migrate everyone to // the new API. // TODO: Warn in a future release. nextChildren = null; { stopProfilerTimerIfRunning(); } } else { { markComponentRenderStarted(workInProgress); } { setIsRendering(true); nextChildren = instance.render(); if ( workInProgress.mode & StrictLegacyMode) { setIsStrictModeForDevtools(true); try { instance.render(); } finally { setIsStrictModeForDevtools(false); } } setIsRendering(false); } { markComponentRenderStopped(); } } // React DevTools reads this flag. workInProgress.flags |= PerformedWork; if (current !== null && didCaptureError) { // If we're recovering from an error, reconcile without reusing any of // the existing children. Conceptually, the normal children and the children // that are shown on error are two different sets, so we shouldn't reuse // normal children even if their identities match. forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes); } else { reconcileChildren(current, workInProgress, nextChildren, renderLanes); } // Memoize state using the values we just used to render. // TODO: Restructure so we never read values from the instance. workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it. if (hasContext) { invalidateContextProvider(workInProgress, Component, true); } return workInProgress.child; } function pushHostRootContext(workInProgress) { var root = workInProgress.stateNode; if (root.pendingContext) { pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context); } else if (root.context) { // Should always be set pushTopLevelContextObject(workInProgress, root.context, false); } pushHostContainer(workInProgress, root.containerInfo); } function updateHostRoot(current, workInProgress, renderLanes) { pushHostRootContext(workInProgress); if (current === null) { throw new Error('Should have a current fiber. This is a bug in React.'); } var nextProps = workInProgress.pendingProps; var prevState = workInProgress.memoizedState; var prevChildren = prevState.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); var nextState = workInProgress.memoizedState; var root = workInProgress.stateNode; // being called "element". var nextChildren = nextState.element; if ( prevState.isDehydrated) { // This is a hydration root whose shell has not yet hydrated. We should // attempt to hydrate. // Flip isDehydrated to false to indicate that when this render // finishes, the root will no longer be dehydrated. var overrideState = { element: nextChildren, isDehydrated: false, cache: nextState.cache, pendingSuspenseBoundaries: nextState.pendingSuspenseBoundaries, transitions: nextState.transitions }; var updateQueue = workInProgress.updateQueue; // `baseState` can always be the last state because the root doesn't // have reducer functions so it doesn't need rebasing. updateQueue.baseState = overrideState; workInProgress.memoizedState = overrideState; if (workInProgress.flags & ForceClientRender) { // Something errored during a previous attempt to hydrate the shell, so we // forced a client render. var recoverableError = createCapturedValueAtFiber(new Error('There was an error while hydrating. Because the error happened outside ' + 'of a Suspense boundary, the entire root will switch to ' + 'client rendering.'), workInProgress); return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError); } else if (nextChildren !== prevChildren) { var _recoverableError = createCapturedValueAtFiber(new Error('This root received an early update, before anything was able ' + 'hydrate. Switched the entire root to client rendering.'), workInProgress); return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, _recoverableError); } else { // The outermost shell has not hydrated yet. Start hydrating. enterHydrationState(workInProgress); var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes); workInProgress.child = child; var node = child; while (node) { // Mark each child as hydrating. This is a fast path to know whether this // tree is part of a hydrating tree. This is used to determine if a child // node has fully mounted yet, and for scheduling event replaying. // Conceptually this is similar to Placement in that a new subtree is // inserted into the React tree here. It just happens to not need DOM // mutations because it already exists. node.flags = node.flags & ~Placement | Hydrating; node = node.sibling; } } } else { // Root is not dehydrated. Either this is a client-only root, or it // already hydrated. resetHydrationState(); if (nextChildren === prevChildren) { return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); } reconcileChildren(current, workInProgress, nextChildren, renderLanes); } return workInProgress.child; } function mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError) { // Revert to client rendering. resetHydrationState(); queueHydrationError(recoverableError); workInProgress.flags |= ForceClientRender; reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } function updateHostComponent(current, workInProgress, renderLanes) { pushHostContext(workInProgress); if (current === null) { tryToClaimNextHydratableInstance(workInProgress); } var type = workInProgress.type; var nextProps = workInProgress.pendingProps; var prevProps = current !== null ? current.memoizedProps : null; var nextChildren = nextProps.children; var isDirectTextChild = shouldSetTextContent(type, nextProps); if (isDirectTextChild) { // We special case a direct text child of a host node. This is a common // case. We won't handle it as a reified child. We will instead handle // this in the host environment that also has access to this prop. That // avoids allocating another HostText fiber and traversing it. nextChildren = null; } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) { // If we're switching from a direct text child to a normal child, or to // empty, we need to schedule the text content to be reset. workInProgress.flags |= ContentReset; } markRef(current, workInProgress); reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } function updateHostText(current, workInProgress) { if (current === null) { tryToClaimNextHydratableInstance(workInProgress); } // Nothing to do here. This is terminal. We'll do the completion step // immediately after. return null; } function mountLazyComponent(_current, workInProgress, elementType, renderLanes) { resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); var props = workInProgress.pendingProps; var lazyComponent = elementType; var payload = lazyComponent._payload; var init = lazyComponent._init; var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component); var resolvedProps = resolveDefaultProps(Component, props); var child; switch (resolvedTag) { case FunctionComponent: { { validateFunctionComponentInDev(workInProgress, Component); workInProgress.type = Component = resolveFunctionForHotReloading(Component); } child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes); return child; } case ClassComponent: { { workInProgress.type = Component = resolveClassForHotReloading(Component); } child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes); return child; } case ForwardRef: { { workInProgress.type = Component = resolveForwardRefForHotReloading(Component); } child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes); return child; } case MemoComponent: { { if (workInProgress.type !== workInProgress.elementType) { var outerPropTypes = Component.propTypes; if (outerPropTypes) { checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only 'prop', getComponentNameFromType(Component)); } } } child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too renderLanes); return child; } } var hint = ''; { if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) { hint = ' Did you wrap a component in React.lazy() more than once?'; } } // This message intentionally doesn't mention ForwardRef or MemoComponent // because the fact that it's a separate type of work is an // implementation detail. throw new Error("Element type is invalid. Received a promise that resolves to: " + Component + ". " + ("Lazy element type must resolve to a class or function." + hint)); } function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) { resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); // Promote the fiber to a class and try rendering again. workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent` // Push context providers early to prevent context stack mismatches. // During mounting we don't know the child context yet as the instance doesn't exist. // We will invalidate the child context in finishClassComponent() right after rendering. var hasContext; if (isContextProvider(Component)) { hasContext = true; pushContextProvider(workInProgress); } else { hasContext = false; } prepareToReadContext(workInProgress, renderLanes); constructClassInstance(workInProgress, Component, nextProps); mountClassInstance(workInProgress, Component, nextProps, renderLanes); return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes); } function mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) { resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); var props = workInProgress.pendingProps; var context; { var unmaskedContext = getUnmaskedContext(workInProgress, Component, false); context = getMaskedContext(workInProgress, unmaskedContext); } prepareToReadContext(workInProgress, renderLanes); var value; var hasId; { markComponentRenderStarted(workInProgress); } { if (Component.prototype && typeof Component.prototype.render === 'function') { var componentName = getComponentNameFromType(Component) || 'Unknown'; if (!didWarnAboutBadClass[componentName]) { error("The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName); didWarnAboutBadClass[componentName] = true; } } if (workInProgress.mode & StrictLegacyMode) { ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null); } setIsRendering(true); ReactCurrentOwner$1.current = workInProgress; value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes); hasId = checkDidRenderIdHook(); setIsRendering(false); } { markComponentRenderStopped(); } // React DevTools reads this flag. workInProgress.flags |= PerformedWork; { // Support for module components is deprecated and is removed behind a flag. // Whether or not it would crash later, we want to show a good message in DEV first. if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) { var _componentName = getComponentNameFromType(Component) || 'Unknown'; if (!didWarnAboutModulePatternComponent[_componentName]) { error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName); didWarnAboutModulePatternComponent[_componentName] = true; } } } if ( // Run these checks in production only if the flag is off. // Eventually we'll delete this branch altogether. typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) { { var _componentName2 = getComponentNameFromType(Component) || 'Unknown'; if (!didWarnAboutModulePatternComponent[_componentName2]) { error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2); didWarnAboutModulePatternComponent[_componentName2] = true; } } // Proceed under the assumption that this is a class instance workInProgress.tag = ClassComponent; // Throw out any hooks that were used. workInProgress.memoizedState = null; workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches. // During mounting we don't know the child context yet as the instance doesn't exist. // We will invalidate the child context in finishClassComponent() right after rendering. var hasContext = false; if (isContextProvider(Component)) { hasContext = true; pushContextProvider(workInProgress); } else { hasContext = false; } workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null; initializeUpdateQueue(workInProgress); adoptClassInstance(workInProgress, value); mountClassInstance(workInProgress, Component, props, renderLanes); return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes); } else { // Proceed under the assumption that this is a function component workInProgress.tag = FunctionComponent; { if ( workInProgress.mode & StrictLegacyMode) { setIsStrictModeForDevtools(true); try { value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes); hasId = checkDidRenderIdHook(); } finally { setIsStrictModeForDevtools(false); } } } if (getIsHydrating() && hasId) { pushMaterializedTreeId(workInProgress); } reconcileChildren(null, workInProgress, value, renderLanes); { validateFunctionComponentInDev(workInProgress, Component); } return workInProgress.child; } } function validateFunctionComponentInDev(workInProgress, Component) { { if (Component) { if (Component.childContextTypes) { error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component'); } } if (workInProgress.ref !== null) { var info = ''; var ownerName = getCurrentFiberOwnerNameInDevOrNull(); if (ownerName) { info += '\n\nCheck the render method of `' + ownerName + '`.'; } var warningKey = ownerName || ''; var debugSource = workInProgress._debugSource; if (debugSource) { warningKey = debugSource.fileName + ':' + debugSource.lineNumber; } if (!didWarnAboutFunctionRefs[warningKey]) { didWarnAboutFunctionRefs[warningKey] = true; error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info); } } if ( Component.defaultProps !== undefined) { var componentName = getComponentNameFromType(Component) || 'Unknown'; if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) { error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName); didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true; } } if (typeof Component.getDerivedStateFromProps === 'function') { var _componentName3 = getComponentNameFromType(Component) || 'Unknown'; if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) { error('%s: Function components do not support getDerivedStateFromProps.', _componentName3); didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true; } } if (typeof Component.contextType === 'object' && Component.contextType !== null) { var _componentName4 = getComponentNameFromType(Component) || 'Unknown'; if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { error('%s: Function components do not support contextType.', _componentName4); didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; } } } } var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: NoLane }; function mountSuspenseOffscreenState(renderLanes) { return { baseLanes: renderLanes, cachePool: getSuspendedCache(), transitions: null }; } function updateSuspenseOffscreenState(prevOffscreenState, renderLanes) { var cachePool = null; return { baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes), cachePool: cachePool, transitions: prevOffscreenState.transitions }; } // TODO: Probably should inline this back function shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) { // If we're already showing a fallback, there are cases where we need to // remain on that fallback regardless of whether the content has resolved. // For example, SuspenseList coordinates when nested content appears. if (current !== null) { var suspenseState = current.memoizedState; if (suspenseState === null) { // Currently showing content. Don't hide it, even if ForceSuspenseFallback // is true. More precise name might be "ForceRemainSuspenseFallback". // Note: This is a factoring smell. Can't remain on a fallback if there's // no fallback to remain on. return false; } } // Not currently showing content. Consult the Suspense context. return hasSuspenseContext(suspenseContext, ForceSuspenseFallback); } function getRemainingWorkInPrimaryTree(current, renderLanes) { // TODO: Should not remove render lanes that were pinged during this render return removeLanes(current.childLanes, renderLanes); } function updateSuspenseComponent(current, workInProgress, renderLanes) { var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend. { if (shouldSuspend(workInProgress)) { workInProgress.flags |= DidCapture; } } var suspenseContext = suspenseStackCursor.current; var showFallback = false; var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags; if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) { // Something in this boundary's subtree already suspended. Switch to // rendering the fallback children. showFallback = true; workInProgress.flags &= ~DidCapture; } else { // Attempting the main content if (current === null || current.memoizedState !== null) { // This is a new mount or this boundary is already showing a fallback state. // Mark this subtree context as having at least one invisible parent that could // handle the fallback state. // Avoided boundaries are not considered since they cannot handle preferred fallback states. { suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext); } } } suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense // boundary's children. This involves some custom reconciliation logic. Two // main reasons this is so complicated. // // First, Legacy Mode has different semantics for backwards compatibility. The // primary tree will commit in an inconsistent state, so when we do the // second pass to render the fallback, we do some exceedingly, uh, clever // hacks to make that not totally break. Like transferring effects and // deletions from hidden tree. In Concurrent Mode, it's much simpler, // because we bailout on the primary tree completely and leave it in its old // state, no effects. Same as what we do for Offscreen (except that // Offscreen doesn't have the first render pass). // // Second is hydration. During hydration, the Suspense fiber has a slightly // different layout, where the child points to a dehydrated fragment, which // contains the DOM rendered by the server. // // Third, even if you set all that aside, Suspense is like error boundaries in // that we first we try to render one tree, and if that fails, we render again // and switch to a different tree. Like a try/catch block. So we have to track // which branch we're currently rendering. Ideally we would model this using // a stack. if (current === null) { // Initial mount // Special path for hydration // If we're currently hydrating, try to hydrate this boundary. tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component. var suspenseState = workInProgress.memoizedState; if (suspenseState !== null) { var dehydrated = suspenseState.dehydrated; if (dehydrated !== null) { return mountDehydratedSuspenseComponent(workInProgress, dehydrated); } } var nextPrimaryChildren = nextProps.children; var nextFallbackChildren = nextProps.fallback; if (showFallback) { var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes); var primaryChildFragment = workInProgress.child; primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes); workInProgress.memoizedState = SUSPENDED_MARKER; return fallbackFragment; } else { return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren); } } else { // This is an update. // Special path for hydration var prevState = current.memoizedState; if (prevState !== null) { var _dehydrated = prevState.dehydrated; if (_dehydrated !== null) { return updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, _dehydrated, prevState, renderLanes); } } if (showFallback) { var _nextFallbackChildren = nextProps.fallback; var _nextPrimaryChildren = nextProps.children; var fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren, _nextFallbackChildren, renderLanes); var _primaryChildFragment2 = workInProgress.child; var prevOffscreenState = current.child.memoizedState; _primaryChildFragment2.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes); _primaryChildFragment2.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes); workInProgress.memoizedState = SUSPENDED_MARKER; return fallbackChildFragment; } else { var _nextPrimaryChildren2 = nextProps.children; var _primaryChildFragment3 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren2, renderLanes); workInProgress.memoizedState = null; return _primaryChildFragment3; } } } function mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) { var mode = workInProgress.mode; var primaryChildProps = { mode: 'visible', children: primaryChildren }; var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode); primaryChildFragment.return = workInProgress; workInProgress.child = primaryChildFragment; return primaryChildFragment; } function mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) { var mode = workInProgress.mode; var progressedPrimaryFragment = workInProgress.child; var primaryChildProps = { mode: 'hidden', children: primaryChildren }; var primaryChildFragment; var fallbackChildFragment; if ((mode & ConcurrentMode) === NoMode && progressedPrimaryFragment !== null) { // In legacy mode, we commit the primary tree as if it successfully // completed, even though it's in an inconsistent state. primaryChildFragment = progressedPrimaryFragment; primaryChildFragment.childLanes = NoLanes; primaryChildFragment.pendingProps = primaryChildProps; if ( workInProgress.mode & ProfileMode) { // Reset the durations from the first pass so they aren't included in the // final amounts. This seems counterintuitive, since we're intentionally // not measuring part of the render phase, but this makes it match what we // do in Concurrent Mode. primaryChildFragment.actualDuration = 0; primaryChildFragment.actualStartTime = -1; primaryChildFragment.selfBaseDuration = 0; primaryChildFragment.treeBaseDuration = 0; } fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); } else { primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode); fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); } primaryChildFragment.return = workInProgress; fallbackChildFragment.return = workInProgress; primaryChildFragment.sibling = fallbackChildFragment; workInProgress.child = primaryChildFragment; return fallbackChildFragment; } function mountWorkInProgressOffscreenFiber(offscreenProps, mode, renderLanes) { // The props argument to `createFiberFromOffscreen` is `any` typed, so we use // this wrapper function to constrain it. return createFiberFromOffscreen(offscreenProps, mode, NoLanes, null); } function updateWorkInProgressOffscreenFiber(current, offscreenProps) { // The props argument to `createWorkInProgress` is `any` typed, so we use this // wrapper function to constrain it. return createWorkInProgress(current, offscreenProps); } function updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) { var currentPrimaryChildFragment = current.child; var currentFallbackChildFragment = currentPrimaryChildFragment.sibling; var primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, { mode: 'visible', children: primaryChildren }); if ((workInProgress.mode & ConcurrentMode) === NoMode) { primaryChildFragment.lanes = renderLanes; } primaryChildFragment.return = workInProgress; primaryChildFragment.sibling = null; if (currentFallbackChildFragment !== null) { // Delete the fallback child fragment var deletions = workInProgress.deletions; if (deletions === null) { workInProgress.deletions = [currentFallbackChildFragment]; workInProgress.flags |= ChildDeletion; } else { deletions.push(currentFallbackChildFragment); } } workInProgress.child = primaryChildFragment; return primaryChildFragment; } function updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) { var mode = workInProgress.mode; var currentPrimaryChildFragment = current.child; var currentFallbackChildFragment = currentPrimaryChildFragment.sibling; var primaryChildProps = { mode: 'hidden', children: primaryChildren }; var primaryChildFragment; if ( // In legacy mode, we commit the primary tree as if it successfully // completed, even though it's in an inconsistent state. (mode & ConcurrentMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was // already cloned. In legacy mode, the only case where this isn't true is // when DevTools forces us to display a fallback; we skip the first render // pass entirely and go straight to rendering the fallback. (In Concurrent // Mode, SuspenseList can also trigger this scenario, but this is a legacy- // only codepath.) workInProgress.child !== currentPrimaryChildFragment) { var progressedPrimaryFragment = workInProgress.child; primaryChildFragment = progressedPrimaryFragment; primaryChildFragment.childLanes = NoLanes; primaryChildFragment.pendingProps = primaryChildProps; if ( workInProgress.mode & ProfileMode) { // Reset the durations from the first pass so they aren't included in the // final amounts. This seems counterintuitive, since we're intentionally // not measuring part of the render phase, but this makes it match what we // do in Concurrent Mode. primaryChildFragment.actualDuration = 0; primaryChildFragment.actualStartTime = -1; primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration; primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration; } // The fallback fiber was added as a deletion during the first pass. // However, since we're going to remain on the fallback, we no longer want // to delete it. workInProgress.deletions = null; } else { primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps); // Since we're reusing a current tree, we need to reuse the flags, too. // (We don't do this in legacy mode, because in legacy mode we don't re-use // the current tree; see previous branch.) primaryChildFragment.subtreeFlags = currentPrimaryChildFragment.subtreeFlags & StaticMask; } var fallbackChildFragment; if (currentFallbackChildFragment !== null) { fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren); } else { fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already // mounted but this is a new fiber. fallbackChildFragment.flags |= Placement; } fallbackChildFragment.return = workInProgress; primaryChildFragment.return = workInProgress; primaryChildFragment.sibling = fallbackChildFragment; workInProgress.child = primaryChildFragment; return fallbackChildFragment; } function retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, recoverableError) { // Falling back to client rendering. Because this has performance // implications, it's considered a recoverable error, even though the user // likely won't observe anything wrong with the UI. // // The error is passed in as an argument to enforce that every caller provide // a custom message, or explicitly opt out (currently the only path that opts // out is legacy mode; every concurrent path provides an error). if (recoverableError !== null) { queueHydrationError(recoverableError); } // This will add the old fiber to the deletion list reconcileChildFibers(workInProgress, current.child, null, renderLanes); // We're now not suspended nor dehydrated. var nextProps = workInProgress.pendingProps; var primaryChildren = nextProps.children; var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Needs a placement effect because the parent (the Suspense boundary) already // mounted but this is a new fiber. primaryChildFragment.flags |= Placement; workInProgress.memoizedState = null; return primaryChildFragment; } function mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) { var fiberMode = workInProgress.mode; var primaryChildProps = { mode: 'visible', children: primaryChildren }; var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, fiberMode); var fallbackChildFragment = createFiberFromFragment(fallbackChildren, fiberMode, renderLanes, null); // Needs a placement effect because the parent (the Suspense // boundary) already mounted but this is a new fiber. fallbackChildFragment.flags |= Placement; primaryChildFragment.return = workInProgress; fallbackChildFragment.return = workInProgress; primaryChildFragment.sibling = fallbackChildFragment; workInProgress.child = primaryChildFragment; if ((workInProgress.mode & ConcurrentMode) !== NoMode) { // We will have dropped the effect list which contains the // deletion. We need to reconcile to delete the current child. reconcileChildFibers(workInProgress, current.child, null, renderLanes); } return fallbackChildFragment; } function mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderLanes) { // During the first pass, we'll bail out and not drill into the children. // Instead, we'll leave the content in place and try to hydrate it later. if ((workInProgress.mode & ConcurrentMode) === NoMode) { { error('Cannot hydrate Suspense in legacy mode. Switch from ' + 'ReactDOM.hydrate(element, container) to ' + 'ReactDOMClient.hydrateRoot(container, <App />)' + '.render(element) or remove the Suspense components from ' + 'the server rendered components.'); } workInProgress.lanes = laneToLanes(SyncLane); } else if (isSuspenseInstanceFallback(suspenseInstance)) { // This is a client-only boundary. Since we won't get any content from the server // for this, we need to schedule that at a higher priority based on when it would // have timed out. In theory we could render it in this pass but it would have the // wrong priority associated with it and will prevent hydration of parent path. // Instead, we'll leave work left on it to render it in a separate commit. // TODO This time should be the time at which the server rendered response that is // a parent to this boundary was displayed. However, since we currently don't have // a protocol to transfer that time, we'll just estimate it by using the current // time. This will mean that Suspense timeouts are slightly shifted to later than // they should be. // Schedule a normal pri update to render this content. workInProgress.lanes = laneToLanes(DefaultHydrationLane); } else { // We'll continue hydrating the rest at offscreen priority since we'll already // be showing the right content coming from the server, it is no rush. workInProgress.lanes = laneToLanes(OffscreenLane); } return null; } function updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, suspenseInstance, suspenseState, renderLanes) { if (!didSuspend) { // This is the first render pass. Attempt to hydrate. // We should never be hydrating at this point because it is the first pass, // but after we've already committed once. warnIfHydrating(); if ((workInProgress.mode & ConcurrentMode) === NoMode) { return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, // TODO: When we delete legacy mode, we should make this error argument // required — every concurrent mode path that causes hydration to // de-opt to client rendering should have an error message. null); } if (isSuspenseInstanceFallback(suspenseInstance)) { // This boundary is in a permanent fallback state. In this case, we'll never // get an update and we'll never be able to hydrate the final content. Let's just try the // client side render instead. var digest, message, stack; { var _getSuspenseInstanceF = getSuspenseInstanceFallbackErrorDetails(suspenseInstance); digest = _getSuspenseInstanceF.digest; message = _getSuspenseInstanceF.message; stack = _getSuspenseInstanceF.stack; } var error; if (message) { // eslint-disable-next-line react-internal/prod-error-codes error = new Error(message); } else { error = new Error('The server could not finish this Suspense boundary, likely ' + 'due to an error during server rendering. Switched to ' + 'client rendering.'); } var capturedValue = createCapturedValue(error, digest, stack); return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, capturedValue); } // any context has changed, we need to treat is as if the input might have changed. var hasContextChanged = includesSomeLane(renderLanes, current.childLanes); if (didReceiveUpdate || hasContextChanged) { // This boundary has changed since the first render. This means that we are now unable to // hydrate it. We might still be able to hydrate it using a higher priority lane. var root = getWorkInProgressRoot(); if (root !== null) { var attemptHydrationAtLane = getBumpedLaneForHydration(root, renderLanes); if (attemptHydrationAtLane !== NoLane && attemptHydrationAtLane !== suspenseState.retryLane) { // Intentionally mutating since this render will get interrupted. This // is one of the very rare times where we mutate the current tree // during the render phase. suspenseState.retryLane = attemptHydrationAtLane; // TODO: Ideally this would inherit the event time of the current render var eventTime = NoTimestamp; enqueueConcurrentRenderForLane(current, attemptHydrationAtLane); scheduleUpdateOnFiber(root, current, attemptHydrationAtLane, eventTime); } } // If we have scheduled higher pri work above, this will probably just abort the render // since we now have higher priority work, but in case it doesn't, we need to prepare to // render something, if we time out. Even if that requires us to delete everything and // skip hydration. // Delay having to do this as long as the suspense timeout allows us. renderDidSuspendDelayIfPossible(); var _capturedValue = createCapturedValue(new Error('This Suspense boundary received an update before it finished ' + 'hydrating. This caused the boundary to switch to client rendering. ' + 'The usual way to fix this is to wrap the original update ' + 'in startTransition.')); return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue); } else if (isSuspenseInstancePending(suspenseInstance)) { // This component is still pending more data from the server, so we can't hydrate its // content. We treat it as if this component suspended itself. It might seem as if // we could just try to render it client-side instead. However, this will perform a // lot of unnecessary work and is unlikely to complete since it often will suspend // on missing data anyway. Additionally, the server might be able to render more // than we can on the client yet. In that case we'd end up with more fallback states // on the client than if we just leave it alone. If the server times out or errors // these should update this boundary to the permanent Fallback state instead. // Mark it as having captured (i.e. suspended). workInProgress.flags |= DidCapture; // Leave the child in place. I.e. the dehydrated fragment. workInProgress.child = current.child; // Register a callback to retry this boundary once the server has sent the result. var retry = retryDehydratedSuspenseBoundary.bind(null, current); registerSuspenseInstanceRetry(suspenseInstance, retry); return null; } else { // This is the first attempt. reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress, suspenseInstance, suspenseState.treeContext); var primaryChildren = nextProps.children; var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Mark the children as hydrating. This is a fast path to know whether this // tree is part of a hydrating tree. This is used to determine if a child // node has fully mounted yet, and for scheduling event replaying. // Conceptually this is similar to Placement in that a new subtree is // inserted into the React tree here. It just happens to not need DOM // mutations because it already exists. primaryChildFragment.flags |= Hydrating; return primaryChildFragment; } } else { // This is the second render pass. We already attempted to hydrated, but // something either suspended or errored. if (workInProgress.flags & ForceClientRender) { // Something errored during hydration. Try again without hydrating. workInProgress.flags &= ~ForceClientRender; var _capturedValue2 = createCapturedValue(new Error('There was an error while hydrating this Suspense boundary. ' + 'Switched to client rendering.')); return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue2); } else if (workInProgress.memoizedState !== null) { // Something suspended and we should still be in dehydrated mode. // Leave the existing child in place. workInProgress.child = current.child; // The dehydrated completion pass expects this flag to be there // but the normal suspense pass doesn't. workInProgress.flags |= DidCapture; return null; } else { // Suspended but we should no longer be in dehydrated mode. // Therefore we now have to render the fallback. var nextPrimaryChildren = nextProps.children; var nextFallbackChildren = nextProps.fallback; var fallbackChildFragment = mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes); var _primaryChildFragment4 = workInProgress.child; _primaryChildFragment4.memoizedState = mountSuspenseOffscreenState(renderLanes); workInProgress.memoizedState = SUSPENDED_MARKER; return fallbackChildFragment; } } } function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes = mergeLanes(fiber.lanes, renderLanes); var alternate = fiber.alternate; if (alternate !== null) { alternate.lanes = mergeLanes(alternate.lanes, renderLanes); } scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot); } function propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) { // Mark any Suspense boundaries with fallbacks as having work to do. // If they were previously forced into fallbacks, they may now be able // to unblock. var node = firstChild; while (node !== null) { if (node.tag === SuspenseComponent) { var state = node.memoizedState; if (state !== null) { scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress); } } else if (node.tag === SuspenseListComponent) { // If the tail is hidden there might not be an Suspense boundaries // to schedule work on. In this case we have to schedule it on the // list itself. // We don't have to traverse to the children of the list since // the list will propagate the change when it rerenders. scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress); } else if (node.child !== null) { node.child.return = node; node = node.child; continue; } if (node === workInProgress) { return; } while (node.sibling === null) { if (node.return === null || node.return === workInProgress) { return; } node = node.return; } node.sibling.return = node.return; node = node.sibling; } } function findLastContentRow(firstChild) { // This is going to find the last row among these children that is already // showing content on the screen, as opposed to being in fallback state or // new. If a row has multiple Suspense boundaries, any of them being in the // fallback state, counts as the whole row being in a fallback state. // Note that the "rows" will be workInProgress, but any nested children // will still be current since we haven't rendered them yet. The mounted // order may not be the same as the new order. We use the new order. var row = firstChild; var lastContentRow = null; while (row !== null) { var currentRow = row.alternate; // New rows can't be content rows. if (currentRow !== null && findFirstSuspended(currentRow) === null) { lastContentRow = row; } row = row.sibling; } return lastContentRow; } function validateRevealOrder(revealOrder) { { if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) { didWarnAboutRevealOrder[revealOrder] = true; if (typeof revealOrder === 'string') { switch (revealOrder.toLowerCase()) { case 'together': case 'forwards': case 'backwards': { error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase()); break; } case 'forward': case 'backward': { error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase()); break; } default: error('"%s" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder); break; } } else { error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder); } } } } function validateTailOptions(tailMode, revealOrder) { { if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) { if (tailMode !== 'collapsed' && tailMode !== 'hidden') { didWarnAboutTailOptions[tailMode] = true; error('"%s" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean "collapsed" or "hidden"?', tailMode); } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') { didWarnAboutTailOptions[tailMode] = true; error('<SuspenseList tail="%s" /> is only valid if revealOrder is ' + '"forwards" or "backwards". ' + 'Did you mean to specify revealOrder="forwards"?', tailMode); } } } } function validateSuspenseListNestedChild(childSlot, index) { { var isAnArray = isArray(childSlot); var isIterable = !isAnArray && typeof getIteratorFn(childSlot) === 'function'; if (isAnArray || isIterable) { var type = isAnArray ? 'array' : 'iterable'; error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type); return false; } } return true; } function validateSuspenseListChildren(children, revealOrder) { { if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) { if (isArray(children)) { for (var i = 0; i < children.length; i++) { if (!validateSuspenseListNestedChild(children[i], i)) { return; } } } else { var iteratorFn = getIteratorFn(children); if (typeof iteratorFn === 'function') { var childrenIterator = iteratorFn.call(children); if (childrenIterator) { var step = childrenIterator.next(); var _i = 0; for (; !step.done; step = childrenIterator.next()) { if (!validateSuspenseListNestedChild(step.value, _i)) { return; } _i++; } } } else { error('A single row was passed to a <SuspenseList revealOrder="%s" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder); } } } } } function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode) { var renderState = workInProgress.memoizedState; if (renderState === null) { workInProgress.memoizedState = { isBackwards: isBackwards, rendering: null, renderingStartTime: 0, last: lastContentRow, tail: tail, tailMode: tailMode }; } else { // We can reuse the existing object from previous renders. renderState.isBackwards = isBackwards; renderState.rendering = null; renderState.renderingStartTime = 0; renderState.last = lastContentRow; renderState.tail = tail; renderState.tailMode = tailMode; } } // This can end up rendering this component multiple passes. // The first pass splits the children fibers into two sets. A head and tail. // We first render the head. If anything is in fallback state, we do another // pass through beginWork to rerender all children (including the tail) with // the force suspend context. If the first render didn't have anything in // in fallback state. Then we render each row in the tail one-by-one. // That happens in the completeWork phase without going back to beginWork. function updateSuspenseListComponent(current, workInProgress, renderLanes) { var nextProps = workInProgress.pendingProps; var revealOrder = nextProps.revealOrder; var tailMode = nextProps.tail; var newChildren = nextProps.children; validateRevealOrder(revealOrder); validateTailOptions(tailMode, revealOrder); validateSuspenseListChildren(newChildren, revealOrder); reconcileChildren(current, workInProgress, newChildren, renderLanes); var suspenseContext = suspenseStackCursor.current; var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback); if (shouldForceFallback) { suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback); workInProgress.flags |= DidCapture; } else { var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags; if (didSuspendBefore) { // If we previously forced a fallback, we need to schedule work // on any nested boundaries to let them know to try to render // again. This is the same as context updating. propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes); } suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); } pushSuspenseContext(workInProgress, suspenseContext); if ((workInProgress.mode & ConcurrentMode) === NoMode) { // In legacy mode, SuspenseList doesn't work so we just // use make it a noop by treating it as the default revealOrder. workInProgress.memoizedState = null; } else { switch (revealOrder) { case 'forwards': { var lastContentRow = findLastContentRow(workInProgress.child); var tail; if (lastContentRow === null) { // The whole list is part of the tail. // TODO: We could fast path by just rendering the tail now. tail = workInProgress.child; workInProgress.child = null; } else { // Disconnect the tail rows after the content row. // We're going to render them separately later. tail = lastContentRow.sibling; lastContentRow.sibling = null; } initSuspenseListRenderState(workInProgress, false, // isBackwards tail, lastContentRow, tailMode); break; } case 'backwards': { // We're going to find the first row that has existing content. // At the same time we're going to reverse the list of everything // we pass in the meantime. That's going to be our tail in reverse // order. var _tail = null; var row = workInProgress.child; workInProgress.child = null; while (row !== null) { var currentRow = row.alternate; // New rows can't be content rows. if (currentRow !== null && findFirstSuspended(currentRow) === null) { // This is the beginning of the main content. workInProgress.child = row; break; } var nextRow = row.sibling; row.sibling = _tail; _tail = row; row = nextRow; } // TODO: If workInProgress.child is null, we can continue on the tail immediately. initSuspenseListRenderState(workInProgress, true, // isBackwards _tail, null, // last tailMode); break; } case 'together': { initSuspenseListRenderState(workInProgress, false, // isBackwards null, // tail null, // last undefined); break; } default: { // The default reveal order is the same as not having // a boundary. workInProgress.memoizedState = null; } } } return workInProgress.child; } function updatePortalComponent(current, workInProgress, renderLanes) { pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); var nextChildren = workInProgress.pendingProps; if (current === null) { // Portals are special because we don't append the children during mount // but at commit. Therefore we need to track insertions which the normal // flow doesn't do during mount. This doesn't happen at the root because // the root always starts with a "current" with a null child. // TODO: Consider unifying this with how the root works. workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes); } else { reconcileChildren(current, workInProgress, nextChildren, renderLanes); } return workInProgress.child; } var hasWarnedAboutUsingNoValuePropOnContextProvider = false; function updateContextProvider(current, workInProgress, renderLanes) { var providerType = workInProgress.type; var context = providerType._context; var newProps = workInProgress.pendingProps; var oldProps = workInProgress.memoizedProps; var newValue = newProps.value; { if (!('value' in newProps)) { if (!hasWarnedAboutUsingNoValuePropOnContextProvider) { hasWarnedAboutUsingNoValuePropOnContextProvider = true; error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?'); } } var providerPropTypes = workInProgress.type.propTypes; if (providerPropTypes) { checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider'); } } pushProvider(workInProgress, context, newValue); { if (oldProps !== null) { var oldValue = oldProps.value; if (objectIs(oldValue, newValue)) { // No change. Bailout early if children are the same. if (oldProps.children === newProps.children && !hasContextChanged()) { return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); } } else { // The context value changed. Search for matching consumers and schedule // them to update. propagateContextChange(workInProgress, context, renderLanes); } } } var newChildren = newProps.children; reconcileChildren(current, workInProgress, newChildren, renderLanes); return workInProgress.child; } var hasWarnedAboutUsingContextAsConsumer = false; function updateContextConsumer(current, workInProgress, renderLanes) { var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In // DEV mode, we create a separate object for Context.Consumer that acts // like a proxy to Context. This proxy object adds unnecessary code in PROD // so we use the old behaviour (Context.Consumer references Context) to // reduce size and overhead. The separate object references context via // a property called "_context", which also gives us the ability to check // in DEV mode if this property exists or not and warn if it does not. { if (context._context === undefined) { // This may be because it's a Context (rather than a Consumer). // Or it may be because it's older React where they're the same thing. // We only want to warn if we're sure it's a new React. if (context !== context.Consumer) { if (!hasWarnedAboutUsingContextAsConsumer) { hasWarnedAboutUsingContextAsConsumer = true; error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?'); } } } else { context = context._context; } } var newProps = workInProgress.pendingProps; var render = newProps.children; { if (typeof render !== 'function') { error('A context consumer was rendered with multiple children, or a child ' + "that isn't a function. A context consumer expects a single child " + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.'); } } prepareToReadContext(workInProgress, renderLanes); var newValue = readContext(context); { markComponentRenderStarted(workInProgress); } var newChildren; { ReactCurrentOwner$1.current = workInProgress; setIsRendering(true); newChildren = render(newValue); setIsRendering(false); } { markComponentRenderStopped(); } // React DevTools reads this flag. workInProgress.flags |= PerformedWork; reconcileChildren(current, workInProgress, newChildren, renderLanes); return workInProgress.child; } function markWorkInProgressReceivedUpdate() { didReceiveUpdate = true; } function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) { if ((workInProgress.mode & ConcurrentMode) === NoMode) { if (current !== null) { // A lazy component only mounts if it suspended inside a non- // concurrent tree, in an inconsistent state. We want to treat it like // a new mount, even though an empty version of it already committed. // Disconnect the alternate pointers. current.alternate = null; workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect workInProgress.flags |= Placement; } } } function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { if (current !== null) { // Reuse previous dependencies workInProgress.dependencies = current.dependencies; } { // Don't update "base" render times for bailouts. stopProfilerTimerIfRunning(); } markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work. if (!includesSomeLane(renderLanes, workInProgress.childLanes)) { // The children don't have any work either. We can skip them. // TODO: Once we add back resuming, we should check if the children are // a work-in-progress set. If so, we need to transfer their effects. { return null; } } // This fiber doesn't have work, but its subtree does. Clone the child // fibers and continue. cloneChildFibers(current, workInProgress); return workInProgress.child; } function remountFiber(current, oldWorkInProgress, newWorkInProgress) { { var returnFiber = oldWorkInProgress.return; if (returnFiber === null) { // eslint-disable-next-line react-internal/prod-error-codes throw new Error('Cannot swap the root fiber.'); } // Disconnect from the old current. // It will get deleted. current.alternate = null; oldWorkInProgress.alternate = null; // Connect to the new tree. newWorkInProgress.index = oldWorkInProgress.index; newWorkInProgress.sibling = oldWorkInProgress.sibling; newWorkInProgress.return = oldWorkInProgress.return; newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it. if (oldWorkInProgress === returnFiber.child) { returnFiber.child = newWorkInProgress; } else { var prevSibling = returnFiber.child; if (prevSibling === null) { // eslint-disable-next-line react-internal/prod-error-codes throw new Error('Expected parent to have a child.'); } while (prevSibling.sibling !== oldWorkInProgress) { prevSibling = prevSibling.sibling; if (prevSibling === null) { // eslint-disable-next-line react-internal/prod-error-codes throw new Error('Expected to find the previous sibling.'); } } prevSibling.sibling = newWorkInProgress; } // Delete the old fiber and place the new one. // Since the old fiber is disconnected, we have to schedule it manually. var deletions = returnFiber.deletions; if (deletions === null) { returnFiber.deletions = [current]; returnFiber.flags |= ChildDeletion; } else { deletions.push(current); } newWorkInProgress.flags |= Placement; // Restart work from the new fiber. return newWorkInProgress; } } function checkScheduledUpdateOrContext(current, renderLanes) { // Before performing an early bailout, we must check if there are pending // updates or context. var updateLanes = current.lanes; if (includesSomeLane(updateLanes, renderLanes)) { return true; } // No pending update, but because context is propagated lazily, we need return false; } function attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes) { // This fiber does not have any pending work. Bailout without entering // the begin phase. There's still some bookkeeping we that needs to be done // in this optimized path, mostly pushing stuff onto the stack. switch (workInProgress.tag) { case HostRoot: pushHostRootContext(workInProgress); var root = workInProgress.stateNode; resetHydrationState(); break; case HostComponent: pushHostContext(workInProgress); break; case ClassComponent: { var Component = workInProgress.type; if (isContextProvider(Component)) { pushContextProvider(workInProgress); } break; } case HostPortal: pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); break; case ContextProvider: { var newValue = workInProgress.memoizedProps.value; var context = workInProgress.type._context; pushProvider(workInProgress, context, newValue); break; } case Profiler: { // Profiler should only call onRender when one of its descendants actually rendered. var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes); if (hasChildWork) { workInProgress.flags |= Update; } { // Reset effect durations for the next eventual effect phase. // These are reset during render to allow the DevTools commit hook a chance to read them, var stateNode = workInProgress.stateNode; stateNode.effectDuration = 0; stateNode.passiveEffectDuration = 0; } } break; case SuspenseComponent: { var state = workInProgress.memoizedState; if (state !== null) { if (state.dehydrated !== null) { pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // We know that this component will suspend again because if it has // been unsuspended it has committed as a resolved Suspense component. // If it needs to be retried, it should have work scheduled on it. workInProgress.flags |= DidCapture; // We should never render the children of a dehydrated boundary until we // upgrade it. We return null instead of bailoutOnAlreadyFinishedWork. return null; } // If this boundary is currently timed out, we need to decide // whether to retry the primary children, or to skip over it and // go straight to the fallback. Check the priority of the primary // child fragment. var primaryChildFragment = workInProgress.child; var primaryChildLanes = primaryChildFragment.childLanes; if (includesSomeLane(renderLanes, primaryChildLanes)) { // The primary children have pending work. Use the normal path // to attempt to render the primary children again. return updateSuspenseComponent(current, workInProgress, renderLanes); } else { // The primary child fragment does not have pending work marked // on it pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient // priority. Bailout. var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); if (child !== null) { // The fallback children have pending work. Skip over the // primary children and work on the fallback. return child.sibling; } else { // Note: We can return `null` here because we already checked // whether there were nested context consumers, via the call to // `bailoutOnAlreadyFinishedWork` above. return null; } } } else { pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); } break; } case SuspenseListComponent: { var didSuspendBefore = (current.flags & DidCapture) !== NoFlags; var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes); if (didSuspendBefore) { if (_hasChildWork) { // If something was in fallback state last time, and we have all the // same children then we're still in progressive loading state. // Something might get unblocked by state updates or retries in the // tree which will affect the tail. So we need to use the normal // path to compute the correct tail. return updateSuspenseListComponent(current, workInProgress, renderLanes); } // If none of the children had any work, that means that none of // them got retried so they'll still be blocked in the same way // as before. We can fast bail out. workInProgress.flags |= DidCapture; } // If nothing suspended before and we're rendering the same children, // then the tail doesn't matter. Anything new that suspends will work // in the "together" mode, so we can continue from the state we had. var renderState = workInProgress.memoizedState; if (renderState !== null) { // Reset to the "together" mode in case we've started a different // update in the past but didn't complete it. renderState.rendering = null; renderState.tail = null; renderState.lastEffect = null; } pushSuspenseContext(workInProgress, suspenseStackCursor.current); if (_hasChildWork) { break; } else { // If none of the children had any work, that means that none of // them got retried so they'll still be blocked in the same way // as before. We can fast bail out. return null; } } case OffscreenComponent: case LegacyHiddenComponent: { // Need to check if the tree still needs to be deferred. This is // almost identical to the logic used in the normal update path, // so we'll just enter that. The only difference is we'll bail out // at the next level instead of this one, because the child props // have not changed. Which is fine. // TODO: Probably should refactor `beginWork` to split the bailout // path from the normal path. I'm tempted to do a labeled break here // but I won't :) workInProgress.lanes = NoLanes; return updateOffscreenComponent(current, workInProgress, renderLanes); } } return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); } function beginWork(current, workInProgress, renderLanes) { { if (workInProgress._debugNeedsRemount && current !== null) { // This will restart the begin phase with a new fiber. return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes)); } } if (current !== null) { var oldProps = current.memoizedProps; var newProps = workInProgress.pendingProps; if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload: workInProgress.type !== current.type )) { // If props or context changed, mark the fiber as having performed work. // This may be unset if the props are determined to be equal later (memo). didReceiveUpdate = true; } else { // Neither props nor legacy context changes. Check if there's a pending // update or context change. var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes); if (!hasScheduledUpdateOrContext && // If this is the second pass of an error or suspense boundary, there // may not be work scheduled on `current`, so we check for this flag. (workInProgress.flags & DidCapture) === NoFlags) { // No pending updates or context. Bail out now. didReceiveUpdate = false; return attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes); } if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) { // This is a special case that only exists for legacy mode. // See https://github.com/facebook/react/pull/19216. didReceiveUpdate = true; } else { // An update was scheduled on this fiber, but there are no new props // nor legacy context. Set this to false. If an update queue or context // consumer produces a changed value, it will set this to true. Otherwise, // the component will assume the children have not changed and bail out. didReceiveUpdate = false; } } } else { didReceiveUpdate = false; if (getIsHydrating() && isForkedChild(workInProgress)) { // Check if this child belongs to a list of muliple children in // its parent. // // In a true multi-threaded implementation, we would render children on // parallel threads. This would represent the beginning of a new render // thread for this subtree. // // We only use this for id generation during hydration, which is why the // logic is located in this special branch. var slotIndex = workInProgress.index; var numberOfForks = getForksAtLevel(); pushTreeId(workInProgress, numberOfForks, slotIndex); } } // Before entering the begin phase, clear pending update priority. // TODO: This assumes that we're about to evaluate the component and process // the update queue. However, there's an exception: SimpleMemoComponent // sometimes bails out later in the begin phase. This indicates that we should // move this assignment out of the common path and into each branch. workInProgress.lanes = NoLanes; switch (workInProgress.tag) { case IndeterminateComponent: { return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes); } case LazyComponent: { var elementType = workInProgress.elementType; return mountLazyComponent(current, workInProgress, elementType, renderLanes); } case FunctionComponent: { var Component = workInProgress.type; var unresolvedProps = workInProgress.pendingProps; var resolvedProps = workInProgress.elementType === Component ? unresolvedProps : resolveDefaultProps(Component, unresolvedProps); return updateFunctionComponent(current, workInProgress, Component, resolvedProps, renderLanes); } case ClassComponent: { var _Component = workInProgress.type; var _unresolvedProps = workInProgress.pendingProps; var _resolvedProps = workInProgress.elementType === _Component ? _unresolvedProps : resolveDefaultProps(_Component, _unresolvedProps); return updateClassComponent(current, workInProgress, _Component, _resolvedProps, renderLanes); } case HostRoot: return updateHostRoot(current, workInProgress, renderLanes); case HostComponent: return updateHostComponent(current, workInProgress, renderLanes); case HostText: return updateHostText(current, workInProgress); case SuspenseComponent: return updateSuspenseComponent(current, workInProgress, renderLanes); case HostPortal: return updatePortalComponent(current, workInProgress, renderLanes); case ForwardRef: { var type = workInProgress.type; var _unresolvedProps2 = workInProgress.pendingProps; var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2); return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes); } case Fragment: return updateFragment(current, workInProgress, renderLanes); case Mode: return updateMode(current, workInProgress, renderLanes); case Profiler: return updateProfiler(current, workInProgress, renderLanes); case ContextProvider: return updateContextProvider(current, workInProgress, renderLanes); case ContextConsumer: return updateContextConsumer(current, workInProgress, renderLanes); case MemoComponent: { var _type2 = workInProgress.type; var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props. var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3); { if (workInProgress.type !== workInProgress.elementType) { var outerPropTypes = _type2.propTypes; if (outerPropTypes) { checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only 'prop', getComponentNameFromType(_type2)); } } } _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3); return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, renderLanes); } case SimpleMemoComponent: { return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, renderLanes); } case IncompleteClassComponent: { var _Component2 = workInProgress.type; var _unresolvedProps4 = workInProgress.pendingProps; var _resolvedProps4 = workInProgress.elementType === _Component2 ? _unresolvedProps4 : resolveDefaultProps(_Component2, _unresolvedProps4); return mountIncompleteClassComponent(current, workInProgress, _Component2, _resolvedProps4, renderLanes); } case SuspenseListComponent: { return updateSuspenseListComponent(current, workInProgress, renderLanes); } case ScopeComponent: { break; } case OffscreenComponent: { return updateOffscreenComponent(current, workInProgress, renderLanes); } } throw new Error("Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in " + 'React. Please file an issue.'); } function markUpdate(workInProgress) { // Tag the fiber with an update effect. This turns a Placement into // a PlacementAndUpdate. workInProgress.flags |= Update; } function markRef$1(workInProgress) { workInProgress.flags |= Ref; { workInProgress.flags |= RefStatic; } } var appendAllChildren; var updateHostContainer; var updateHostComponent$1; var updateHostText$1; { // Mutation mode appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) { // We only have the top Fiber that was created but we need recurse down its // children to find all the terminal nodes. var node = workInProgress.child; while (node !== null) { if (node.tag === HostComponent || node.tag === HostText) { appendInitialChild(parent, node.stateNode); } else if (node.tag === HostPortal) ; else if (node.child !== null) { node.child.return = node; node = node.child; continue; } if (node === workInProgress) { return; } while (node.sibling === null) { if (node.return === null || node.return === workInProgress) { return; } node = node.return; } node.sibling.return = node.return; node = node.sibling; } }; updateHostContainer = function (current, workInProgress) {// Noop }; updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) { // If we have an alternate, that means this is an update and we need to // schedule a side-effect to do the updates. var oldProps = current.memoizedProps; if (oldProps === newProps) { // In mutation mode, this is sufficient for a bailout because // we won't touch this node even if children changed. return; } // If we get updated because one of our children updated, we don't // have newProps so we'll have to reuse them. // TODO: Split the update API as separate for the props vs. children. // Even better would be if children weren't special cased at all tho. var instance = workInProgress.stateNode; var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host // component is hitting the resume path. Figure out why. Possibly // related to `hidden`. var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component. workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there // is a new ref we mark this as an update. All the work is done in commitWork. if (updatePayload) { markUpdate(workInProgress); } }; updateHostText$1 = function (current, workInProgress, oldText, newText) { // If the text differs, mark it as an update. All the work in done in commitWork. if (oldText !== newText) { markUpdate(workInProgress); } }; } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (getIsHydrating()) { // If we're hydrating, we should consume as many items as we can // so we don't leave any behind. return; } switch (renderState.tailMode) { case 'hidden': { // Any insertions at the end of the tail list after this point // should be invisible. If there are already mounted boundaries // anything before them are not considered for collapsing. // Therefore we need to go through the whole tail to find if // there are any. var tailNode = renderState.tail; var lastTailNode = null; while (tailNode !== null) { if (tailNode.alternate !== null) { lastTailNode = tailNode; } tailNode = tailNode.sibling; } // Next we're simply going to delete all insertions after the // last rendered item. if (lastTailNode === null) { // All remaining items in the tail are insertions. renderState.tail = null; } else { // Detach the insertion after the last node that was already // inserted. lastTailNode.sibling = null; } break; } case 'collapsed': { // Any insertions at the end of the tail list after this point // should be invisible. If there are already mounted boundaries // anything before them are not considered for collapsing. // Therefore we need to go through the whole tail to find if // there are any. var _tailNode = renderState.tail; var _lastTailNode = null; while (_tailNode !== null) { if (_tailNode.alternate !== null) { _lastTailNode = _tailNode; } _tailNode = _tailNode.sibling; } // Next we're simply going to delete all insertions after the // last rendered item. if (_lastTailNode === null) { // All remaining items in the tail are insertions. if (!hasRenderedATailFallback && renderState.tail !== null) { // We suspended during the head. We want to show at least one // row at the tail. So we'll keep on and cut off the rest. renderState.tail.sibling = null; } else { renderState.tail = null; } } else { // Detach the insertion after the last node that was already // inserted. _lastTailNode.sibling = null; } break; } } } function bubbleProperties(completedWork) { var didBailout = completedWork.alternate !== null && completedWork.alternate.child === completedWork.child; var newChildLanes = NoLanes; var subtreeFlags = NoFlags; if (!didBailout) { // Bubble up the earliest expiration time. if ( (completedWork.mode & ProfileMode) !== NoMode) { // In profiling mode, resetChildExpirationTime is also used to reset // profiler durations. var actualDuration = completedWork.actualDuration; var treeBaseDuration = completedWork.selfBaseDuration; var child = completedWork.child; while (child !== null) { newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes)); subtreeFlags |= child.subtreeFlags; subtreeFlags |= child.flags; // When a fiber is cloned, its actualDuration is reset to 0. This value will // only be updated if work is done on the fiber (i.e. it doesn't bailout). // When work is done, it should bubble to the parent's actualDuration. If // the fiber has not been cloned though, (meaning no work was done), then // this value will reflect the amount of time spent working on a previous // render. In that case it should not bubble. We determine whether it was // cloned by comparing the child pointer. actualDuration += child.actualDuration; treeBaseDuration += child.treeBaseDuration; child = child.sibling; } completedWork.actualDuration = actualDuration; completedWork.treeBaseDuration = treeBaseDuration; } else { var _child = completedWork.child; while (_child !== null) { newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes)); subtreeFlags |= _child.subtreeFlags; subtreeFlags |= _child.flags; // Update the return pointer so the tree is consistent. This is a code // smell because it assumes the commit phase is never concurrent with // the render phase. Will address during refactor to alternate model. _child.return = completedWork; _child = _child.sibling; } } completedWork.subtreeFlags |= subtreeFlags; } else { // Bubble up the earliest expiration time. if ( (completedWork.mode & ProfileMode) !== NoMode) { // In profiling mode, resetChildExpirationTime is also used to reset // profiler durations. var _treeBaseDuration = completedWork.selfBaseDuration; var _child2 = completedWork.child; while (_child2 !== null) { newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child2.lanes, _child2.childLanes)); // "Static" flags share the lifetime of the fiber/hook they belong to, // so we should bubble those up even during a bailout. All the other // flags have a lifetime only of a single render + commit, so we should // ignore them. subtreeFlags |= _child2.subtreeFlags & StaticMask; subtreeFlags |= _child2.flags & StaticMask; _treeBaseDuration += _child2.treeBaseDuration; _child2 = _child2.sibling; } completedWork.treeBaseDuration = _treeBaseDuration; } else { var _child3 = completedWork.child; while (_child3 !== null) { newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child3.lanes, _child3.childLanes)); // "Static" flags share the lifetime of the fiber/hook they belong to, // so we should bubble those up even during a bailout. All the other // flags have a lifetime only of a single render + commit, so we should // ignore them. subtreeFlags |= _child3.subtreeFlags & StaticMask; subtreeFlags |= _child3.flags & StaticMask; // Update the return pointer so the tree is consistent. This is a code // smell because it assumes the commit phase is never concurrent with // the render phase. Will address during refactor to alternate model. _child3.return = completedWork; _child3 = _child3.sibling; } } completedWork.subtreeFlags |= subtreeFlags; } completedWork.childLanes = newChildLanes; return didBailout; } function completeDehydratedSuspenseBoundary(current, workInProgress, nextState) { if (hasUnhydratedTailNodes() && (workInProgress.mode & ConcurrentMode) !== NoMode && (workInProgress.flags & DidCapture) === NoFlags) { warnIfUnhydratedTailNodes(workInProgress); resetHydrationState(); workInProgress.flags |= ForceClientRender | Incomplete | ShouldCapture; return false; } var wasHydrated = popHydrationState(workInProgress); if (nextState !== null && nextState.dehydrated !== null) { // We might be inside a hydration state the first time we're picking up this // Suspense boundary, and also after we've reentered it for further hydration. if (current === null) { if (!wasHydrated) { throw new Error('A dehydrated suspense component was completed without a hydrated node. ' + 'This is probably a bug in React.'); } prepareToHydrateHostSuspenseInstance(workInProgress); bubbleProperties(workInProgress); { if ((workInProgress.mode & ProfileMode) !== NoMode) { var isTimedOutSuspense = nextState !== null; if (isTimedOutSuspense) { // Don't count time spent in a timed out Suspense subtree as part of the base duration. var primaryChildFragment = workInProgress.child; if (primaryChildFragment !== null) { // $FlowFixMe Flow doesn't support type casting in combination with the -= operator workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration; } } } } return false; } else { // We might have reentered this boundary to hydrate it. If so, we need to reset the hydration // state since we're now exiting out of it. popHydrationState doesn't do that for us. resetHydrationState(); if ((workInProgress.flags & DidCapture) === NoFlags) { // This boundary did not suspend so it's now hydrated and unsuspended. workInProgress.memoizedState = null; } // If nothing suspended, we need to schedule an effect to mark this boundary // as having hydrated so events know that they're free to be invoked. // It's also a signal to replay events and the suspense callback. // If something suspended, schedule an effect to attach retry listeners. // So we might as well always mark this. workInProgress.flags |= Update; bubbleProperties(workInProgress); { if ((workInProgress.mode & ProfileMode) !== NoMode) { var _isTimedOutSuspense = nextState !== null; if (_isTimedOutSuspense) { // Don't count time spent in a timed out Suspense subtree as part of the base duration. var _primaryChildFragment = workInProgress.child; if (_primaryChildFragment !== null) { // $FlowFixMe Flow doesn't support type casting in combination with the -= operator workInProgress.treeBaseDuration -= _primaryChildFragment.treeBaseDuration; } } } } return false; } } else { // Successfully completed this tree. If this was a forced client render, // there may have been recoverable errors during first hydration // attempt. If so, add them to a queue so we can log them in the // commit phase. upgradeHydrationErrorsToRecoverable(); // Fall through to normal Suspense path return true; } } function completeWork(current, workInProgress, renderLanes) { var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing // to the current tree provider fiber is just as fast and less error-prone. // Ideally we would have a special version of the work loop only // for hydration. popTreeContext(workInProgress); switch (workInProgress.tag) { case IndeterminateComponent: case LazyComponent: case SimpleMemoComponent: case FunctionComponent: case ForwardRef: case Fragment: case Mode: case Profiler: case ContextConsumer: case MemoComponent: bubbleProperties(workInProgress); return null; case ClassComponent: { var Component = workInProgress.type; if (isContextProvider(Component)) { popContext(workInProgress); } bubbleProperties(workInProgress); return null; } case HostRoot: { var fiberRoot = workInProgress.stateNode; popHostContainer(workInProgress); popTopLevelContextObject(workInProgress); resetWorkInProgressVersions(); if (fiberRoot.pendingContext) { fiberRoot.context = fiberRoot.pendingContext; fiberRoot.pendingContext = null; } if (current === null || current.child === null) { // If we hydrated, pop so that we can delete any remaining children // that weren't hydrated. var wasHydrated = popHydrationState(workInProgress); if (wasHydrated) { // If we hydrated, then we'll need to schedule an update for // the commit side-effects on the root. markUpdate(workInProgress); } else { if (current !== null) { var prevState = current.memoizedState; if ( // Check if this is a client root !prevState.isDehydrated || // Check if we reverted to client rendering (e.g. due to an error) (workInProgress.flags & ForceClientRender) !== NoFlags) { // Schedule an effect to clear this container at the start of the // next commit. This handles the case of React rendering into a // container with previous children. It's also safe to do for // updates too, because current.child would only be null if the // previous render was null (so the container would already // be empty). workInProgress.flags |= Snapshot; // If this was a forced client render, there may have been // recoverable errors during first hydration attempt. If so, add // them to a queue so we can log them in the commit phase. upgradeHydrationErrorsToRecoverable(); } } } } updateHostContainer(current, workInProgress); bubbleProperties(workInProgress); return null; } case HostComponent: { popHostContext(workInProgress); var rootContainerInstance = getRootHostContainer(); var type = workInProgress.type; if (current !== null && workInProgress.stateNode != null) { updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance); if (current.ref !== workInProgress.ref) { markRef$1(workInProgress); } } else { if (!newProps) { if (workInProgress.stateNode === null) { throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.'); } // This can happen when we abort work. bubbleProperties(workInProgress); return null; } var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context // "stack" as the parent. Then append children as we go in beginWork // or completeWork depending on whether we want to add them top->down or // bottom->up. Top->down is faster in IE11. var _wasHydrated = popHydrationState(workInProgress); if (_wasHydrated) { // TODO: Move this and createInstance step into the beginPhase // to consolidate. if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) { // If changes to the hydrated node need to be applied at the // commit-phase we mark this as such. markUpdate(workInProgress); } } else { var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress); appendAllChildren(instance, workInProgress, false, false); workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount. // (eg DOM renderer supports auto-focus for certain elements). // Make sure such renderers get scheduled for later work. if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) { markUpdate(workInProgress); } } if (workInProgress.ref !== null) { // If there is a ref on a host node we need to schedule a callback markRef$1(workInProgress); } } bubbleProperties(workInProgress); return null; } case HostText: { var newText = newProps; if (current && workInProgress.stateNode != null) { var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need // to schedule a side-effect to do the updates. updateHostText$1(current, workInProgress, oldText, newText); } else { if (typeof newText !== 'string') { if (workInProgress.stateNode === null) { throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.'); } // This can happen when we abort work. } var _rootContainerInstance = getRootHostContainer(); var _currentHostContext = getHostContext(); var _wasHydrated2 = popHydrationState(workInProgress); if (_wasHydrated2) { if (prepareToHydrateHostTextInstance(workInProgress)) { markUpdate(workInProgress); } } else { workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress); } } bubbleProperties(workInProgress); return null; } case SuspenseComponent: { popSuspenseContext(workInProgress); var nextState = workInProgress.memoizedState; // Special path for dehydrated boundaries. We may eventually move this // to its own fiber type so that we can add other kinds of hydration // boundaries that aren't associated with a Suspense tree. In anticipation // of such a refactor, all the hydration logic is contained in // this branch. if (current === null || current.memoizedState !== null && current.memoizedState.dehydrated !== null) { var fallthroughToNormalSuspensePath = completeDehydratedSuspenseBoundary(current, workInProgress, nextState); if (!fallthroughToNormalSuspensePath) { if (workInProgress.flags & ShouldCapture) { // Special case. There were remaining unhydrated nodes. We treat // this as a mismatch. Revert to client rendering. return workInProgress; } else { // Did not finish hydrating, either because this is the initial // render or because something suspended. return null; } } // Continue with the normal Suspense path. } if ((workInProgress.flags & DidCapture) !== NoFlags) { // Something suspended. Re-render with the fallback children. workInProgress.lanes = renderLanes; // Do not reset the effect list. if ( (workInProgress.mode & ProfileMode) !== NoMode) { transferActualDuration(workInProgress); } // Don't bubble properties in this case. return workInProgress; } var nextDidTimeout = nextState !== null; var prevDidTimeout = current !== null && current.memoizedState !== null; // a passive effect, which is when we process the transitions if (nextDidTimeout !== prevDidTimeout) { // an effect to toggle the subtree's visibility. When we switch from // fallback -> primary, the inner Offscreen fiber schedules this effect // as part of its normal complete phase. But when we switch from // primary -> fallback, the inner Offscreen fiber does not have a complete // phase. So we need to schedule its effect here. // // We also use this flag to connect/disconnect the effects, but the same // logic applies: when re-connecting, the Offscreen fiber's complete // phase will handle scheduling the effect. It's only when the fallback // is active that we have to do anything special. if (nextDidTimeout) { var _offscreenFiber2 = workInProgress.child; _offscreenFiber2.flags |= Visibility; // TODO: This will still suspend a synchronous tree if anything // in the concurrent tree already suspended during this render. // This is a known bug. if ((workInProgress.mode & ConcurrentMode) !== NoMode) { // TODO: Move this back to throwException because this is too late // if this is a large tree which is common for initial loads. We // don't know if we should restart a render or not until we get // this marker, and this is too late. // If this render already had a ping or lower pri updates, // and this is the first time we know we're going to suspend we // should be able to immediately restart from within throwException. var hasInvisibleChildContext = current === null && (workInProgress.memoizedProps.unstable_avoidThisFallback !== true || !enableSuspenseAvoidThisFallback); if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) { // If this was in an invisible tree or a new render, then showing // this boundary is ok. renderDidSuspend(); } else { // Otherwise, we're going to have to hide content so we should // suspend for longer if possible. renderDidSuspendDelayIfPossible(); } } } } var wakeables = workInProgress.updateQueue; if (wakeables !== null) { // Schedule an effect to attach a retry listener to the promise. // TODO: Move to passive phase workInProgress.flags |= Update; } bubbleProperties(workInProgress); { if ((workInProgress.mode & ProfileMode) !== NoMode) { if (nextDidTimeout) { // Don't count time spent in a timed out Suspense subtree as part of the base duration. var primaryChildFragment = workInProgress.child; if (primaryChildFragment !== null) { // $FlowFixMe Flow doesn't support type casting in combination with the -= operator workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration; } } } } return null; } case HostPortal: popHostContainer(workInProgress); updateHostContainer(current, workInProgress); if (current === null) { preparePortalMount(workInProgress.stateNode.containerInfo); } bubbleProperties(workInProgress); return null; case ContextProvider: // Pop provider fiber var context = workInProgress.type._context; popProvider(context, workInProgress); bubbleProperties(workInProgress); return null; case IncompleteClassComponent: { // Same as class component case. I put it down here so that the tags are // sequential to ensure this switch is compiled to a jump table. var _Component = workInProgress.type; if (isContextProvider(_Component)) { popContext(workInProgress); } bubbleProperties(workInProgress); return null; } case SuspenseListComponent: { popSuspenseContext(workInProgress); var renderState = workInProgress.memoizedState; if (renderState === null) { // We're running in the default, "independent" mode. // We don't do anything in this mode. bubbleProperties(workInProgress); return null; } var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags; var renderedTail = renderState.rendering; if (renderedTail === null) { // We just rendered the head. if (!didSuspendAlready) { // This is the first pass. We need to figure out if anything is still // suspended in the rendered set. // If new content unsuspended, but there's still some content that // didn't. Then we need to do a second pass that forces everything // to keep showing their fallbacks. // We might be suspended if something in this render pass suspended, or // something in the previous committed pass suspended. Otherwise, // there's no chance so we can skip the expensive call to // findFirstSuspended. var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags); if (!cannotBeSuspended) { var row = workInProgress.child; while (row !== null) { var suspended = findFirstSuspended(row); if (suspended !== null) { didSuspendAlready = true; workInProgress.flags |= DidCapture; cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as // part of the second pass. In that case nothing will subscribe to // its thenables. Instead, we'll transfer its thenables to the // SuspenseList so that it can retry if they resolve. // There might be multiple of these in the list but since we're // going to wait for all of them anyway, it doesn't really matter // which ones gets to ping. In theory we could get clever and keep // track of how many dependencies remain but it gets tricky because // in the meantime, we can add/remove/change items and dependencies. // We might bail out of the loop before finding any but that // doesn't matter since that means that the other boundaries that // we did find already has their listeners attached. var newThenables = suspended.updateQueue; if (newThenables !== null) { workInProgress.updateQueue = newThenables; workInProgress.flags |= Update; } // Rerender the whole list, but this time, we'll force fallbacks // to stay in place. // Reset the effect flags before doing the second pass since that's now invalid. // Reset the child fibers to their original state. workInProgress.subtreeFlags = NoFlags; resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately // rerender the children. pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback)); // Don't bubble properties in this case. return workInProgress.child; } row = row.sibling; } } if (renderState.tail !== null && now() > getRenderTargetTime()) { // We have already passed our CPU deadline but we still have rows // left in the tail. We'll just give up further attempts to render // the main content and only render fallbacks. workInProgress.flags |= DidCapture; didSuspendAlready = true; cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this // to get it started back up to attempt the next item. While in terms // of priority this work has the same priority as this current render, // it's not part of the same transition once the transition has // committed. If it's sync, we still want to yield so that it can be // painted. Conceptually, this is really the same as pinging. // We can use any RetryLane even if it's the one currently rendering // since we're leaving it behind on this node. workInProgress.lanes = SomeRetryLane; } } else { cutOffTailIfNeeded(renderState, false); } // Next we're going to render the tail. } else { // Append the rendered row to the child list. if (!didSuspendAlready) { var _suspended = findFirstSuspended(renderedTail); if (_suspended !== null) { workInProgress.flags |= DidCapture; didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't // get lost if this row ends up dropped during a second pass. var _newThenables = _suspended.updateQueue; if (_newThenables !== null) { workInProgress.updateQueue = _newThenables; workInProgress.flags |= Update; } cutOffTailIfNeeded(renderState, true); // This might have been modified. if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating. ) { // We're done. bubbleProperties(workInProgress); return null; } } else if ( // The time it took to render last row is greater than the remaining // time we have to render. So rendering one more row would likely // exceed it. now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) { // We have now passed our CPU deadline and we'll just give up further // attempts to render the main content and only render fallbacks. // The assumption is that this is usually faster. workInProgress.flags |= DidCapture; didSuspendAlready = true; cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this // to get it started back up to attempt the next item. While in terms // of priority this work has the same priority as this current render, // it's not part of the same transition once the transition has // committed. If it's sync, we still want to yield so that it can be // painted. Conceptually, this is really the same as pinging. // We can use any RetryLane even if it's the one currently rendering // since we're leaving it behind on this node. workInProgress.lanes = SomeRetryLane; } } if (renderState.isBackwards) { // The effect list of the backwards tail will have been added // to the end. This breaks the guarantee that life-cycles fire in // sibling order but that isn't a strong guarantee promised by React. // Especially since these might also just pop in during future commits. // Append to the beginning of the list. renderedTail.sibling = workInProgress.child; workInProgress.child = renderedTail; } else { var previousSibling = renderState.last; if (previousSibling !== null) { previousSibling.sibling = renderedTail; } else { workInProgress.child = renderedTail; } renderState.last = renderedTail; } } if (renderState.tail !== null) { // We still have tail rows to render. // Pop a row. var next = renderState.tail; renderState.rendering = next; renderState.tail = next.sibling; renderState.renderingStartTime = now(); next.sibling = null; // Restore the context. // TODO: We can probably just avoid popping it instead and only // setting it the first time we go from not suspended to suspended. var suspenseContext = suspenseStackCursor.current; if (didSuspendAlready) { suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback); } else { suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); } pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row. // Don't bubble properties in this case. return next; } bubbleProperties(workInProgress); return null; } case ScopeComponent: { break; } case OffscreenComponent: case LegacyHiddenComponent: { popRenderLanes(workInProgress); var _nextState = workInProgress.memoizedState; var nextIsHidden = _nextState !== null; if (current !== null) { var _prevState = current.memoizedState; var prevIsHidden = _prevState !== null; if (prevIsHidden !== nextIsHidden && ( // LegacyHidden doesn't do any hiding — it only pre-renders. !enableLegacyHidden )) { workInProgress.flags |= Visibility; } } if (!nextIsHidden || (workInProgress.mode & ConcurrentMode) === NoMode) { bubbleProperties(workInProgress); } else { // Don't bubble properties for hidden children unless we're rendering // at offscreen priority. if (includesSomeLane(subtreeRenderLanes, OffscreenLane)) { bubbleProperties(workInProgress); { // Check if there was an insertion or update in the hidden subtree. // If so, we need to hide those nodes in the commit phase, so // schedule a visibility effect. if ( workInProgress.subtreeFlags & (Placement | Update)) { workInProgress.flags |= Visibility; } } } } return null; } case CacheComponent: { return null; } case TracingMarkerComponent: { return null; } } throw new Error("Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in " + 'React. Please file an issue.'); } function unwindWork(current, workInProgress, renderLanes) { // Note: This intentionally doesn't check if we're hydrating because comparing // to the current tree provider fiber is just as fast and less error-prone. // Ideally we would have a special version of the work loop only // for hydration. popTreeContext(workInProgress); switch (workInProgress.tag) { case ClassComponent: { var Component = workInProgress.type; if (isContextProvider(Component)) { popContext(workInProgress); } var flags = workInProgress.flags; if (flags & ShouldCapture) { workInProgress.flags = flags & ~ShouldCapture | DidCapture; if ( (workInProgress.mode & ProfileMode) !== NoMode) { transferActualDuration(workInProgress); } return workInProgress; } return null; } case HostRoot: { var root = workInProgress.stateNode; popHostContainer(workInProgress); popTopLevelContextObject(workInProgress); resetWorkInProgressVersions(); var _flags = workInProgress.flags; if ((_flags & ShouldCapture) !== NoFlags && (_flags & DidCapture) === NoFlags) { // There was an error during render that wasn't captured by a suspense // boundary. Do a second pass on the root to unmount the children. workInProgress.flags = _flags & ~ShouldCapture | DidCapture; return workInProgress; } // We unwound to the root without completing it. Exit. return null; } case HostComponent: { // TODO: popHydrationState popHostContext(workInProgress); return null; } case SuspenseComponent: { popSuspenseContext(workInProgress); var suspenseState = workInProgress.memoizedState; if (suspenseState !== null && suspenseState.dehydrated !== null) { if (workInProgress.alternate === null) { throw new Error('Threw in newly mounted dehydrated component. This is likely a bug in ' + 'React. Please file an issue.'); } resetHydrationState(); } var _flags2 = workInProgress.flags; if (_flags2 & ShouldCapture) { workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary. if ( (workInProgress.mode & ProfileMode) !== NoMode) { transferActualDuration(workInProgress); } return workInProgress; } return null; } case SuspenseListComponent: { popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been // caught by a nested boundary. If not, it should bubble through. return null; } case HostPortal: popHostContainer(workInProgress); return null; case ContextProvider: var context = workInProgress.type._context; popProvider(context, workInProgress); return null; case OffscreenComponent: case LegacyHiddenComponent: popRenderLanes(workInProgress); return null; case CacheComponent: return null; default: return null; } } function unwindInterruptedWork(current, interruptedWork, renderLanes) { // Note: This intentionally doesn't check if we're hydrating because comparing // to the current tree provider fiber is just as fast and less error-prone. // Ideally we would have a special version of the work loop only // for hydration. popTreeContext(interruptedWork); switch (interruptedWork.tag) { case ClassComponent: { var childContextTypes = interruptedWork.type.childContextTypes; if (childContextTypes !== null && childContextTypes !== undefined) { popContext(interruptedWork); } break; } case HostRoot: { var root = interruptedWork.stateNode; popHostContainer(interruptedWork); popTopLevelContextObject(interruptedWork); resetWorkInProgressVersions(); break; } case HostComponent: { popHostContext(interruptedWork); break; } case HostPortal: popHostContainer(interruptedWork); break; case SuspenseComponent: popSuspenseContext(interruptedWork); break; case SuspenseListComponent: popSuspenseContext(interruptedWork); break; case ContextProvider: var context = interruptedWork.type._context; popProvider(context, interruptedWork); break; case OffscreenComponent: case LegacyHiddenComponent: popRenderLanes(interruptedWork); break; } } var didWarnAboutUndefinedSnapshotBeforeUpdate = null; { didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); } // Used during the commit phase to track the state of the Offscreen component stack. // Allows us to avoid traversing the return path to find the nearest Offscreen ancestor. // Only used when enableSuspenseLayoutEffectSemantics is enabled. var offscreenSubtreeIsHidden = false; var offscreenSubtreeWasHidden = false; var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set; var nextEffect = null; // Used for Profiling builds to track updaters. var inProgressLanes = null; var inProgressRoot = null; function reportUncaughtErrorInDEV(error) { // Wrapping each small part of the commit phase into a guarded // callback is a bit too slow (https://github.com/facebook/react/pull/21666). // But we rely on it to surface errors to DEV tools like overlays // (https://github.com/facebook/react/issues/21712). // As a compromise, rethrow only caught errors in a guard. { invokeGuardedCallback(null, function () { throw error; }); clearCaughtError(); } } var callComponentWillUnmountWithTimer = function (current, instance) { instance.props = current.memoizedProps; instance.state = current.memoizedState; if ( current.mode & ProfileMode) { try { startLayoutEffectTimer(); instance.componentWillUnmount(); } finally { recordLayoutEffectDuration(current); } } else { instance.componentWillUnmount(); } }; // Capture errors so they don't interrupt mounting. function safelyCallCommitHookLayoutEffectListMount(current, nearestMountedAncestor) { try { commitHookEffectListMount(Layout, current); } catch (error) { captureCommitPhaseError(current, nearestMountedAncestor, error); } } // Capture errors so they don't interrupt unmounting. function safelyCallComponentWillUnmount(current, nearestMountedAncestor, instance) { try { callComponentWillUnmountWithTimer(current, instance); } catch (error) { captureCommitPhaseError(current, nearestMountedAncestor, error); } } // Capture errors so they don't interrupt mounting. function safelyCallComponentDidMount(current, nearestMountedAncestor, instance) { try { instance.componentDidMount(); } catch (error) { captureCommitPhaseError(current, nearestMountedAncestor, error); } } // Capture errors so they don't interrupt mounting. function safelyAttachRef(current, nearestMountedAncestor) { try { commitAttachRef(current); } catch (error) { captureCommitPhaseError(current, nearestMountedAncestor, error); } } function safelyDetachRef(current, nearestMountedAncestor) { var ref = current.ref; if (ref !== null) { if (typeof ref === 'function') { var retVal; try { if (enableProfilerTimer && enableProfilerCommitHooks && current.mode & ProfileMode) { try { startLayoutEffectTimer(); retVal = ref(null); } finally { recordLayoutEffectDuration(current); } } else { retVal = ref(null); } } catch (error) { captureCommitPhaseError(current, nearestMountedAncestor, error); } { if (typeof retVal === 'function') { error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(current)); } } } else { ref.current = null; } } } function safelyCallDestroy(current, nearestMountedAncestor, destroy) { try { destroy(); } catch (error) { captureCommitPhaseError(current, nearestMountedAncestor, error); } } var focusedInstanceHandle = null; var shouldFireAfterActiveInstanceBlur = false; function commitBeforeMutationEffects(root, firstChild) { focusedInstanceHandle = prepareForCommit(root.containerInfo); nextEffect = firstChild; commitBeforeMutationEffects_begin(); // We no longer need to track the active instance fiber var shouldFire = shouldFireAfterActiveInstanceBlur; shouldFireAfterActiveInstanceBlur = false; focusedInstanceHandle = null; return shouldFire; } function commitBeforeMutationEffects_begin() { while (nextEffect !== null) { var fiber = nextEffect; // This phase is only used for beforeActiveInstanceBlur. var child = fiber.child; if ((fiber.subtreeFlags & BeforeMutationMask) !== NoFlags && child !== null) { child.return = fiber; nextEffect = child; } else { commitBeforeMutationEffects_complete(); } } } function commitBeforeMutationEffects_complete() { while (nextEffect !== null) { var fiber = nextEffect; setCurrentFiber(fiber); try { commitBeforeMutationEffectsOnFiber(fiber); } catch (error) { captureCommitPhaseError(fiber, fiber.return, error); } resetCurrentFiber(); var sibling = fiber.sibling; if (sibling !== null) { sibling.return = fiber.return; nextEffect = sibling; return; } nextEffect = fiber.return; } } function commitBeforeMutationEffectsOnFiber(finishedWork) { var current = finishedWork.alternate; var flags = finishedWork.flags; if ((flags & Snapshot) !== NoFlags) { setCurrentFiber(finishedWork); switch (finishedWork.tag) { case FunctionComponent: case ForwardRef: case SimpleMemoComponent: { break; } case ClassComponent: { if (current !== null) { var prevProps = current.memoizedProps; var prevState = current.memoizedState; var instance = finishedWork.stateNode; // We could update instance props and state here, // but instead we rely on them being set during last render. // TODO: revisit this when we implement resuming. { if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { if (instance.props !== finishedWork.memoizedProps) { error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance'); } if (instance.state !== finishedWork.memoizedState) { error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance'); } } } var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState); { var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate; if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) { didWarnSet.add(finishedWork.type); error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentNameFromFiber(finishedWork)); } } instance.__reactInternalSnapshotBeforeUpdate = snapshot; } break; } case HostRoot: { { var root = finishedWork.stateNode; clearContainer(root.containerInfo); } break; } case HostComponent: case HostText: case HostPortal: case IncompleteClassComponent: // Nothing to do for these component types break; default: { throw new Error('This unit of work tag should not have side-effects. This error is ' + 'likely caused by a bug in React. Please file an issue.'); } } resetCurrentFiber(); } } function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) { var updateQueue = finishedWork.updateQueue; var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null; if (lastEffect !== null) { var firstEffect = lastEffect.next; var effect = firstEffect; do { if ((effect.tag & flags) === flags) { // Unmount var destroy = effect.destroy; effect.destroy = undefined; if (destroy !== undefined) { { if ((flags & Passive$1) !== NoFlags$1) { markComponentPassiveEffectUnmountStarted(finishedWork); } else if ((flags & Layout) !== NoFlags$1) { markComponentLayoutEffectUnmountStarted(finishedWork); } } { if ((flags & Insertion) !== NoFlags$1) { setIsRunningInsertionEffect(true); } } safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy); { if ((flags & Insertion) !== NoFlags$1) { setIsRunningInsertionEffect(false); } } { if ((flags & Passive$1) !== NoFlags$1) { markComponentPassiveEffectUnmountStopped(); } else if ((flags & Layout) !== NoFlags$1) { markComponentLayoutEffectUnmountStopped(); } } } } effect = effect.next; } while (effect !== firstEffect); } } function commitHookEffectListMount(flags, finishedWork) { var updateQueue = finishedWork.updateQueue; var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null; if (lastEffect !== null) { var firstEffect = lastEffect.next; var effect = firstEffect; do { if ((effect.tag & flags) === flags) { { if ((flags & Passive$1) !== NoFlags$1) { markComponentPassiveEffectMountStarted(finishedWork); } else if ((flags & Layout) !== NoFlags$1) { markComponentLayoutEffectMountStarted(finishedWork); } } // Mount var create = effect.create; { if ((flags & Insertion) !== NoFlags$1) { setIsRunningInsertionEffect(true); } } effect.destroy = create(); { if ((flags & Insertion) !== NoFlags$1) { setIsRunningInsertionEffect(false); } } { if ((flags & Passive$1) !== NoFlags$1) { markComponentPassiveEffectMountStopped(); } else if ((flags & Layout) !== NoFlags$1) { markComponentLayoutEffectMountStopped(); } } { var destroy = effect.destroy; if (destroy !== undefined && typeof destroy !== 'function') { var hookName = void 0; if ((effect.tag & Layout) !== NoFlags) { hookName = 'useLayoutEffect'; } else if ((effect.tag & Insertion) !== NoFlags) { hookName = 'useInsertionEffect'; } else { hookName = 'useEffect'; } var addendum = void 0; if (destroy === null) { addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).'; } else if (typeof destroy.then === 'function') { addendum = '\n\nIt looks like you wrote ' + hookName + '(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + hookName + '(() => {\n' + ' async function fetchData() {\n' + ' // You can await here\n' + ' const response = await MyAPI.getData(someId);\n' + ' // ...\n' + ' }\n' + ' fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching'; } else { addendum = ' You returned: ' + destroy; } error('%s must not return anything besides a function, ' + 'which is used for clean-up.%s', hookName, addendum); } } } effect = effect.next; } while (effect !== firstEffect); } } function commitPassiveEffectDurations(finishedRoot, finishedWork) { { // Only Profilers with work in their subtree will have an Update effect scheduled. if ((finishedWork.flags & Update) !== NoFlags) { switch (finishedWork.tag) { case Profiler: { var passiveEffectDuration = finishedWork.stateNode.passiveEffectDuration; var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onPostCommit = _finishedWork$memoize.onPostCommit; // This value will still reflect the previous commit phase. // It does not get reset until the start of the next commit phase. var commitTime = getCommitTime(); var phase = finishedWork.alternate === null ? 'mount' : 'update'; { if (isCurrentUpdateNested()) { phase = 'nested-update'; } } if (typeof onPostCommit === 'function') { onPostCommit(id, phase, passiveEffectDuration, commitTime); } // Bubble times to the next nearest ancestor Profiler. // After we process that Profiler, we'll bubble further up. var parentFiber = finishedWork.return; outer: while (parentFiber !== null) { switch (parentFiber.tag) { case HostRoot: var root = parentFiber.stateNode; root.passiveEffectDuration += passiveEffectDuration; break outer; case Profiler: var parentStateNode = parentFiber.stateNode; parentStateNode.passiveEffectDuration += passiveEffectDuration; break outer; } parentFiber = parentFiber.return; } break; } } } } } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committedLanes) { if ((finishedWork.flags & LayoutMask) !== NoFlags) { switch (finishedWork.tag) { case FunctionComponent: case ForwardRef: case SimpleMemoComponent: { if ( !offscreenSubtreeWasHidden) { // At this point layout effects have already been destroyed (during mutation phase). // This is done to prevent sibling component effects from interfering with each other, // e.g. a destroy function in one component should never override a ref set // by a create function in another component during the same commit. if ( finishedWork.mode & ProfileMode) { try { startLayoutEffectTimer(); commitHookEffectListMount(Layout | HasEffect, finishedWork); } finally { recordLayoutEffectDuration(finishedWork); } } else { commitHookEffectListMount(Layout | HasEffect, finishedWork); } } break; } case ClassComponent: { var instance = finishedWork.stateNode; if (finishedWork.flags & Update) { if (!offscreenSubtreeWasHidden) { if (current === null) { // We could update instance props and state here, // but instead we rely on them being set during last render. // TODO: revisit this when we implement resuming. { if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { if (instance.props !== finishedWork.memoizedProps) { error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance'); } if (instance.state !== finishedWork.memoizedState) { error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance'); } } } if ( finishedWork.mode & ProfileMode) { try { startLayoutEffectTimer(); instance.componentDidMount(); } finally { recordLayoutEffectDuration(finishedWork); } } else { instance.componentDidMount(); } } else { var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps); var prevState = current.memoizedState; // We could update instance props and state here, // but instead we rely on them being set during last render. // TODO: revisit this when we implement resuming. { if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { if (instance.props !== finishedWork.memoizedProps) { error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance'); } if (instance.state !== finishedWork.memoizedState) { error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance'); } } } if ( finishedWork.mode & ProfileMode) { try { startLayoutEffectTimer(); instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate); } finally { recordLayoutEffectDuration(finishedWork); } } else { instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate); } } } } // TODO: I think this is now always non-null by the time it reaches the // commit phase. Consider removing the type check. var updateQueue = finishedWork.updateQueue; if (updateQueue !== null) { { if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { if (instance.props !== finishedWork.memoizedProps) { error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance'); } if (instance.state !== finishedWork.memoizedState) { error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance'); } } } // We could update instance props and state here, // but instead we rely on them being set during last render. // TODO: revisit this when we implement resuming. commitUpdateQueue(finishedWork, updateQueue, instance); } break; } case HostRoot: { // TODO: I think this is now always non-null by the time it reaches the // commit phase. Consider removing the type check. var _updateQueue = finishedWork.updateQueue; if (_updateQueue !== null) { var _instance = null; if (finishedWork.child !== null) { switch (finishedWork.child.tag) { case HostComponent: _instance = getPublicInstance(finishedWork.child.stateNode); break; case ClassComponent: _instance = finishedWork.child.stateNode; break; } } commitUpdateQueue(finishedWork, _updateQueue, _instance); } break; } case HostComponent: { var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted // (eg DOM renderer may schedule auto-focus for inputs and form controls). // These effects should only be committed when components are first mounted, // aka when there is no current/alternate. if (current === null && finishedWork.flags & Update) { var type = finishedWork.type; var props = finishedWork.memoizedProps; commitMount(_instance2, type, props); } break; } case HostText: { // We have no life-cycles associated with text. break; } case HostPortal: { // We have no life-cycles associated with portals. break; } case Profiler: { { var _finishedWork$memoize2 = finishedWork.memoizedProps, onCommit = _finishedWork$memoize2.onCommit, onRender = _finishedWork$memoize2.onRender; var effectDuration = finishedWork.stateNode.effectDuration; var commitTime = getCommitTime(); var phase = current === null ? 'mount' : 'update'; { if (isCurrentUpdateNested()) { phase = 'nested-update'; } } if (typeof onRender === 'function') { onRender(finishedWork.memoizedProps.id, phase, finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime); } { if (typeof onCommit === 'function') { onCommit(finishedWork.memoizedProps.id, phase, effectDuration, commitTime); } // Schedule a passive effect for this Profiler to call onPostCommit hooks. // This effect should be scheduled even if there is no onPostCommit callback for this Profiler, // because the effect is also where times bubble to parent Profilers. enqueuePendingPassiveProfilerEffect(finishedWork); // Propagate layout effect durations to the next nearest Profiler ancestor. // Do not reset these values until the next render so DevTools has a chance to read them first. var parentFiber = finishedWork.return; outer: while (parentFiber !== null) { switch (parentFiber.tag) { case HostRoot: var root = parentFiber.stateNode; root.effectDuration += effectDuration; break outer; case Profiler: var parentStateNode = parentFiber.stateNode; parentStateNode.effectDuration += effectDuration; break outer; } parentFiber = parentFiber.return; } } } break; } case SuspenseComponent: { commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); break; } case SuspenseListComponent: case IncompleteClassComponent: case ScopeComponent: case OffscreenComponent: case LegacyHiddenComponent: case TracingMarkerComponent: { break; } default: throw new Error('This unit of work tag should not have side-effects. This error is ' + 'likely caused by a bug in React. Please file an issue.'); } } if ( !offscreenSubtreeWasHidden) { { if (finishedWork.flags & Ref) { commitAttachRef(finishedWork); } } } } function reappearLayoutEffectsOnFiber(node) { // Turn on layout effects in a tree that previously disappeared. // TODO (Offscreen) Check: flags & LayoutStatic switch (node.tag) { case FunctionComponent: case ForwardRef: case SimpleMemoComponent: { if ( node.mode & ProfileMode) { try { startLayoutEffectTimer(); safelyCallCommitHookLayoutEffectListMount(node, node.return); } finally { recordLayoutEffectDuration(node); } } else { safelyCallCommitHookLayoutEffectListMount(node, node.return); } break; } case ClassComponent: { var instance = node.stateNode; if (typeof instance.componentDidMount === 'function') { safelyCallComponentDidMount(node, node.return, instance); } safelyAttachRef(node, node.return); break; } case HostComponent: { safelyAttachRef(node, node.return); break; } } } function hideOrUnhideAllChildren(finishedWork, isHidden) { // Only hide or unhide the top-most host nodes. var hostSubtreeRoot = null; { // We only have the top Fiber that was inserted but we need to recurse down its // children to find all the terminal nodes. var node = finishedWork; while (true) { if (node.tag === HostComponent) { if (hostSubtreeRoot === null) { hostSubtreeRoot = node; try { var instance = node.stateNode; if (isHidden) { hideInstance(instance); } else { unhideInstance(node.stateNode, node.memoizedProps); } } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } } else if (node.tag === HostText) { if (hostSubtreeRoot === null) { try { var _instance3 = node.stateNode; if (isHidden) { hideTextInstance(_instance3); } else { unhideTextInstance(_instance3, node.memoizedProps); } } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) { node.child.return = node; node = node.child; continue; } if (node === finishedWork) { return; } while (node.sibling === null) { if (node.return === null || node.return === finishedWork) { return; } if (hostSubtreeRoot === node) { hostSubtreeRoot = null; } node = node.return; } if (hostSubtreeRoot === node) { hostSubtreeRoot = null; } node.sibling.return = node.return; node = node.sibling; } } } function commitAttachRef(finishedWork) { var ref = finishedWork.ref; if (ref !== null) { var instance = finishedWork.stateNode; var instanceToUse; switch (finishedWork.tag) { case HostComponent: instanceToUse = getPublicInstance(instance); break; default: instanceToUse = instance; } // Moved outside to ensure DCE works with this flag if (typeof ref === 'function') { var retVal; if ( finishedWork.mode & ProfileMode) { try { startLayoutEffectTimer(); retVal = ref(instanceToUse); } finally { recordLayoutEffectDuration(finishedWork); } } else { retVal = ref(instanceToUse); } { if (typeof retVal === 'function') { error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(finishedWork)); } } } else { { if (!ref.hasOwnProperty('current')) { error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentNameFromFiber(finishedWork)); } } ref.current = instanceToUse; } } } function detachFiberMutation(fiber) { // Cut off the return pointer to disconnect it from the tree. // This enables us to detect and warn against state updates on an unmounted component. // It also prevents events from bubbling from within disconnected components. // // Ideally, we should also clear the child pointer of the parent alternate to let this // get GC:ed but we don't know which for sure which parent is the current // one so we'll settle for GC:ing the subtree of this child. // This child itself will be GC:ed when the parent updates the next time. // // Note that we can't clear child or sibling pointers yet. // They're needed for passive effects and for findDOMNode. // We defer those fields, and all other cleanup, to the passive phase (see detachFiberAfterEffects). // // Don't reset the alternate yet, either. We need that so we can detach the // alternate's fields in the passive phase. Clearing the return pointer is // sufficient for findDOMNode semantics. var alternate = fiber.alternate; if (alternate !== null) { alternate.return = null; } fiber.return = null; } function detachFiberAfterEffects(fiber) { var alternate = fiber.alternate; if (alternate !== null) { fiber.alternate = null; detachFiberAfterEffects(alternate); } // Note: Defensively using negation instead of < in case // `deletedTreeCleanUpLevel` is undefined. { // Clear cyclical Fiber fields. This level alone is designed to roughly // approximate the planned Fiber refactor. In that world, `setState` will be // bound to a special "instance" object instead of a Fiber. The Instance // object will not have any of these fields. It will only be connected to // the fiber tree via a single link at the root. So if this level alone is // sufficient to fix memory issues, that bodes well for our plans. fiber.child = null; fiber.deletions = null; fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host // tree, which has its own pointers to children, parents, and siblings. // The other host nodes also point back to fibers, so we should detach that // one, too. if (fiber.tag === HostComponent) { var hostInstance = fiber.stateNode; if (hostInstance !== null) { detachDeletedInstance(hostInstance); } } fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We // already disconnect the `return` pointer at the root of the deleted // subtree (in `detachFiberMutation`). Besides, `return` by itself is not // cyclical — it's only cyclical when combined with `child`, `sibling`, and // `alternate`. But we'll clear it in the next level anyway, just in case. { fiber._debugOwner = null; } { // Theoretically, nothing in here should be necessary, because we already // disconnected the fiber from the tree. So even if something leaks this // particular fiber, it won't leak anything else // // The purpose of this branch is to be super aggressive so we can measure // if there's any difference in memory impact. If there is, that could // indicate a React leak we don't know about. fiber.return = null; fiber.dependencies = null; fiber.memoizedProps = null; fiber.memoizedState = null; fiber.pendingProps = null; fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead. fiber.updateQueue = null; } } } function getHostParentFiber(fiber) { var parent = fiber.return; while (parent !== null) { if (isHostParent(parent)) { return parent; } parent = parent.return; } throw new Error('Expected to find a host parent. This error is likely caused by a bug ' + 'in React. Please file an issue.'); } function isHostParent(fiber) { return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal; } function getHostSibling(fiber) { // We're going to search forward into the tree until we find a sibling host // node. Unfortunately, if multiple insertions are done in a row we have to // search past them. This leads to exponential search for the next sibling. // TODO: Find a more efficient way to do this. var node = fiber; siblings: while (true) { // If we didn't find anything, let's try the next sibling. while (node.sibling === null) { if (node.return === null || isHostParent(node.return)) { // If we pop out of the root or hit the parent the fiber we are the // last sibling. return null; } node = node.return; } node.sibling.return = node.return; node = node.sibling; while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) { // If it is not host node and, we might have a host node inside it. // Try to search down until we find one. if (node.flags & Placement) { // If we don't have a child, try the siblings instead. continue siblings; } // If we don't have a child, try the siblings instead. // We also skip portals because they are not part of this host tree. if (node.child === null || node.tag === HostPortal) { continue siblings; } else { node.child.return = node; node = node.child; } } // Check if this host node is stable or about to be placed. if (!(node.flags & Placement)) { // Found it! return node.stateNode; } } } function commitPlacement(finishedWork) { var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together. switch (parentFiber.tag) { case HostComponent: { var parent = parentFiber.stateNode; if (parentFiber.flags & ContentReset) { // Reset the text content of the parent before doing any insertions resetTextContent(parent); // Clear ContentReset from the effect tag parentFiber.flags &= ~ContentReset; } var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its // children to find all the terminal nodes. insertOrAppendPlacementNode(finishedWork, before, parent); break; } case HostRoot: case HostPortal: { var _parent = parentFiber.stateNode.containerInfo; var _before = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer(finishedWork, _before, _parent); break; } // eslint-disable-next-line-no-fallthrough default: throw new Error('Invalid host parent fiber. This error is likely caused by a bug ' + 'in React. Please file an issue.'); } } function insertOrAppendPlacementNodeIntoContainer(node, before, parent) { var tag = node.tag; var isHost = tag === HostComponent || tag === HostText; if (isHost) { var stateNode = node.stateNode; if (before) { insertInContainerBefore(parent, stateNode, before); } else { appendChildToContainer(parent, stateNode); } } else if (tag === HostPortal) ; else { var child = node.child; if (child !== null) { insertOrAppendPlacementNodeIntoContainer(child, before, parent); var sibling = child.sibling; while (sibling !== null) { insertOrAppendPlacementNodeIntoContainer(sibling, before, parent); sibling = sibling.sibling; } } } } function insertOrAppendPlacementNode(node, before, parent) { var tag = node.tag; var isHost = tag === HostComponent || tag === HostText; if (isHost) { var stateNode = node.stateNode; if (before) { insertBefore(parent, stateNode, before); } else { appendChild(parent, stateNode); } } else if (tag === HostPortal) ; else { var child = node.child; if (child !== null) { insertOrAppendPlacementNode(child, before, parent); var sibling = child.sibling; while (sibling !== null) { insertOrAppendPlacementNode(sibling, before, parent); sibling = sibling.sibling; } } } } // These are tracked on the stack as we recursively traverse a // deleted subtree. // TODO: Update these during the whole mutation phase, not just during // a deletion. var hostParent = null; var hostParentIsContainer = false; function commitDeletionEffects(root, returnFiber, deletedFiber) { { // We only have the top Fiber that was deleted but we need to recurse down its // children to find all the terminal nodes. // Recursively delete all host nodes from the parent, detach refs, clean // up mounted layout effects, and call componentWillUnmount. // We only need to remove the topmost host child in each branch. But then we // still need to keep traversing to unmount effects, refs, and cWU. TODO: We // could split this into two separate traversals functions, where the second // one doesn't include any removeChild logic. This is maybe the same // function as "disappearLayoutEffects" (or whatever that turns into after // the layout phase is refactored to use recursion). // Before starting, find the nearest host parent on the stack so we know // which instance/container to remove the children from. // TODO: Instead of searching up the fiber return path on every deletion, we // can track the nearest host component on the JS stack as we traverse the // tree during the commit phase. This would make insertions faster, too. var parent = returnFiber; findParent: while (parent !== null) { switch (parent.tag) { case HostComponent: { hostParent = parent.stateNode; hostParentIsContainer = false; break findParent; } case HostRoot: { hostParent = parent.stateNode.containerInfo; hostParentIsContainer = true; break findParent; } case HostPortal: { hostParent = parent.stateNode.containerInfo; hostParentIsContainer = true; break findParent; } } parent = parent.return; } if (hostParent === null) { throw new Error('Expected to find a host parent. This error is likely caused by ' + 'a bug in React. Please file an issue.'); } commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber); hostParent = null; hostParentIsContainer = false; } detachFiberMutation(deletedFiber); } function recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) { // TODO: Use a static flag to skip trees that don't have unmount effects var child = parent.child; while (child !== null) { commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, child); child = child.sibling; } } function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) { onCommitUnmount(deletedFiber); // The cases in this outer switch modify the stack before they traverse // into their subtree. There are simpler cases in the inner switch // that don't modify the stack. switch (deletedFiber.tag) { case HostComponent: { if (!offscreenSubtreeWasHidden) { safelyDetachRef(deletedFiber, nearestMountedAncestor); } // Intentional fallthrough to next branch } // eslint-disable-next-line-no-fallthrough case HostText: { // We only need to remove the nearest host child. Set the host parent // to `null` on the stack to indicate that nested children don't // need to be removed. { var prevHostParent = hostParent; var prevHostParentIsContainer = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber); hostParent = prevHostParent; hostParentIsContainer = prevHostParentIsContainer; if (hostParent !== null) { // Now that all the child effects have unmounted, we can remove the // node from the tree. if (hostParentIsContainer) { removeChildFromContainer(hostParent, deletedFiber.stateNode); } else { removeChild(hostParent, deletedFiber.stateNode); } } } return; } case DehydratedFragment: { // Delete the dehydrated suspense boundary and all of its content. { if (hostParent !== null) { if (hostParentIsContainer) { clearSuspenseBoundaryFromContainer(hostParent, deletedFiber.stateNode); } else { clearSuspenseBoundary(hostParent, deletedFiber.stateNode); } } } return; } case HostPortal: { { // When we go into a portal, it becomes the parent to remove from. var _prevHostParent = hostParent; var _prevHostParentIsContainer = hostParentIsContainer; hostParent = deletedFiber.stateNode.containerInfo; hostParentIsContainer = true; recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber); hostParent = _prevHostParent; hostParentIsContainer = _prevHostParentIsContainer; } return; } case FunctionComponent: case ForwardRef: case MemoComponent: case SimpleMemoComponent: { if (!offscreenSubtreeWasHidden) { var updateQueue = deletedFiber.updateQueue; if (updateQueue !== null) { var lastEffect = updateQueue.lastEffect; if (lastEffect !== null) { var firstEffect = lastEffect.next; var effect = firstEffect; do { var _effect = effect, destroy = _effect.destroy, tag = _effect.tag; if (destroy !== undefined) { if ((tag & Insertion) !== NoFlags$1) { safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy); } else if ((tag & Layout) !== NoFlags$1) { { markComponentLayoutEffectUnmountStarted(deletedFiber); } if ( deletedFiber.mode & ProfileMode) { startLayoutEffectTimer(); safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy); recordLayoutEffectDuration(deletedFiber); } else { safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy); } { markComponentLayoutEffectUnmountStopped(); } } } effect = effect.next; } while (effect !== firstEffect); } } } recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber); return; } case ClassComponent: { if (!offscreenSubtreeWasHidden) { safelyDetachRef(deletedFiber, nearestMountedAncestor); var instance = deletedFiber.stateNode; if (typeof instance.componentWillUnmount === 'function') { safelyCallComponentWillUnmount(deletedFiber, nearestMountedAncestor, instance); } } recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber); return; } case ScopeComponent: { recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber); return; } case OffscreenComponent: { if ( // TODO: Remove this dead flag deletedFiber.mode & ConcurrentMode) { // If this offscreen component is hidden, we already unmounted it. Before // deleting the children, track that it's already unmounted so that we // don't attempt to unmount the effects again. // TODO: If the tree is hidden, in most cases we should be able to skip // over the nested children entirely. An exception is we haven't yet found // the topmost host node to delete, which we already track on the stack. // But the other case is portals, which need to be detached no matter how // deeply they are nested. We should use a subtree flag to track whether a // subtree includes a nested portal. var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || deletedFiber.memoizedState !== null; recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber); offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; } else { recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber); } break; } default: { recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber); return; } } } function commitSuspenseCallback(finishedWork) { // TODO: Move this to passive phase var newState = finishedWork.memoizedState; } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { var newState = finishedWork.memoizedState; if (newState === null) { var current = finishedWork.alternate; if (current !== null) { var prevState = current.memoizedState; if (prevState !== null) { var suspenseInstance = prevState.dehydrated; if (suspenseInstance !== null) { commitHydratedSuspenseInstance(suspenseInstance); } } } } } function attachSuspenseRetryListeners(finishedWork) { // If this boundary just timed out, then it will have a set of wakeables. // For each wakeable, attach a listener so that when it resolves, React // attempts to re-render the boundary in the primary (pre-timeout) state. var wakeables = finishedWork.updateQueue; if (wakeables !== null) { finishedWork.updateQueue = null; var retryCache = finishedWork.stateNode; if (retryCache === null) { retryCache = finishedWork.stateNode = new PossiblyWeakSet(); } wakeables.forEach(function (wakeable) { // Memoize using the boundary fiber to prevent redundant listeners. var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable); if (!retryCache.has(wakeable)) { retryCache.add(wakeable); { if (isDevToolsPresent) { if (inProgressLanes !== null && inProgressRoot !== null) { // If we have pending work still, associate the original updaters with it. restorePendingUpdaters(inProgressRoot, inProgressLanes); } else { throw Error('Expected finished root and lanes to be set. This is a bug in React.'); } } } wakeable.then(retry, retry); } }); } } // This function detects when a Suspense boundary goes from visible to hidden. function commitMutationEffects(root, finishedWork, committedLanes) { inProgressLanes = committedLanes; inProgressRoot = root; setCurrentFiber(finishedWork); commitMutationEffectsOnFiber(finishedWork, root); setCurrentFiber(finishedWork); inProgressLanes = null; inProgressRoot = null; } function recursivelyTraverseMutationEffects(root, parentFiber, lanes) { // Deletions effects can be scheduled on any fiber type. They need to happen // before the children effects hae fired. var deletions = parentFiber.deletions; if (deletions !== null) { for (var i = 0; i < deletions.length; i++) { var childToDelete = deletions[i]; try { commitDeletionEffects(root, parentFiber, childToDelete); } catch (error) { captureCommitPhaseError(childToDelete, parentFiber, error); } } } var prevDebugFiber = getCurrentFiber(); if (parentFiber.subtreeFlags & MutationMask) { var child = parentFiber.child; while (child !== null) { setCurrentFiber(child); commitMutationEffectsOnFiber(child, root); child = child.sibling; } } setCurrentFiber(prevDebugFiber); } function commitMutationEffectsOnFiber(finishedWork, root, lanes) { var current = finishedWork.alternate; var flags = finishedWork.flags; // The effect flag should be checked *after* we refine the type of fiber, // because the fiber tag is more specific. An exception is any flag related // to reconcilation, because those can be set on all fiber types. switch (finishedWork.tag) { case FunctionComponent: case ForwardRef: case MemoComponent: case SimpleMemoComponent: { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); if (flags & Update) { try { commitHookEffectListUnmount(Insertion | HasEffect, finishedWork, finishedWork.return); commitHookEffectListMount(Insertion | HasEffect, finishedWork); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } // Layout effects are destroyed during the mutation phase so that all // destroy functions for all fibers are called before any create functions. // This prevents sibling component effects from interfering with each other, // e.g. a destroy function in one component should never override a ref set // by a create function in another component during the same commit. if ( finishedWork.mode & ProfileMode) { try { startLayoutEffectTimer(); commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } recordLayoutEffectDuration(finishedWork); } else { try { commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } } return; } case ClassComponent: { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); if (flags & Ref) { if (current !== null) { safelyDetachRef(current, current.return); } } return; } case HostComponent: { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); if (flags & Ref) { if (current !== null) { safelyDetachRef(current, current.return); } } { // TODO: ContentReset gets cleared by the children during the commit // phase. This is a refactor hazard because it means we must read // flags the flags after `commitReconciliationEffects` has already run; // the order matters. We should refactor so that ContentReset does not // rely on mutating the flag during commit. Like by setting a flag // during the render phase instead. if (finishedWork.flags & ContentReset) { var instance = finishedWork.stateNode; try { resetTextContent(instance); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } if (flags & Update) { var _instance4 = finishedWork.stateNode; if (_instance4 != null) { // Commit the work prepared earlier. var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps // as the newProps. The updatePayload will contain the real change in // this case. var oldProps = current !== null ? current.memoizedProps : newProps; var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components. var updatePayload = finishedWork.updateQueue; finishedWork.updateQueue = null; if (updatePayload !== null) { try { commitUpdate(_instance4, updatePayload, type, oldProps, newProps, finishedWork); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } } } } return; } case HostText: { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); if (flags & Update) { { if (finishedWork.stateNode === null) { throw new Error('This should have a text node initialized. This error is likely ' + 'caused by a bug in React. Please file an issue.'); } var textInstance = finishedWork.stateNode; var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps // as the newProps. The updatePayload will contain the real change in // this case. var oldText = current !== null ? current.memoizedProps : newText; try { commitTextUpdate(textInstance, oldText, newText); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } } return; } case HostRoot: { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); if (flags & Update) { { if (current !== null) { var prevRootState = current.memoizedState; if (prevRootState.isDehydrated) { try { commitHydratedContainer(root.containerInfo); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } } } } return; } case HostPortal: { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); return; } case SuspenseComponent: { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); var offscreenFiber = finishedWork.child; if (offscreenFiber.flags & Visibility) { var offscreenInstance = offscreenFiber.stateNode; var newState = offscreenFiber.memoizedState; var isHidden = newState !== null; // Track the current state on the Offscreen instance so we can // read it during an event offscreenInstance.isHidden = isHidden; if (isHidden) { var wasHidden = offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null; if (!wasHidden) { // TODO: Move to passive phase markCommitTimeOfFallback(); } } } if (flags & Update) { try { commitSuspenseCallback(finishedWork); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } attachSuspenseRetryListeners(finishedWork); } return; } case OffscreenComponent: { var _wasHidden = current !== null && current.memoizedState !== null; if ( // TODO: Remove this dead flag finishedWork.mode & ConcurrentMode) { // Before committing the children, track on the stack whether this // offscreen subtree was already hidden, so that we don't unmount the // effects again. var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || _wasHidden; recursivelyTraverseMutationEffects(root, finishedWork); offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; } else { recursivelyTraverseMutationEffects(root, finishedWork); } commitReconciliationEffects(finishedWork); if (flags & Visibility) { var _offscreenInstance = finishedWork.stateNode; var _newState = finishedWork.memoizedState; var _isHidden = _newState !== null; var offscreenBoundary = finishedWork; // Track the current state on the Offscreen instance so we can // read it during an event _offscreenInstance.isHidden = _isHidden; { if (_isHidden) { if (!_wasHidden) { if ((offscreenBoundary.mode & ConcurrentMode) !== NoMode) { nextEffect = offscreenBoundary; var offscreenChild = offscreenBoundary.child; while (offscreenChild !== null) { nextEffect = offscreenChild; disappearLayoutEffects_begin(offscreenChild); offscreenChild = offscreenChild.sibling; } } } } } { // TODO: This needs to run whenever there's an insertion or update // inside a hidden Offscreen tree. hideOrUnhideAllChildren(offscreenBoundary, _isHidden); } } return; } case SuspenseListComponent: { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); if (flags & Update) { attachSuspenseRetryListeners(finishedWork); } return; } case ScopeComponent: { return; } default: { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); return; } } } function commitReconciliationEffects(finishedWork) { // Placement effects (insertions, reorders) can be scheduled on any fiber // type. They needs to happen after the children effects have fired, but // before the effects on this fiber have fired. var flags = finishedWork.flags; if (flags & Placement) { try { commitPlacement(finishedWork); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } // Clear the "placement" from effect tag so that we know that this is // inserted, before any life-cycles like componentDidMount gets called. // TODO: findDOMNode doesn't rely on this any more but isMounted does // and isMounted is deprecated anyway so we should be able to kill this. finishedWork.flags &= ~Placement; } if (flags & Hydrating) { finishedWork.flags &= ~Hydrating; } } function commitLayoutEffects(finishedWork, root, committedLanes) { inProgressLanes = committedLanes; inProgressRoot = root; nextEffect = finishedWork; commitLayoutEffects_begin(finishedWork, root, committedLanes); inProgressLanes = null; inProgressRoot = null; } function commitLayoutEffects_begin(subtreeRoot, root, committedLanes) { // Suspense layout effects semantics don't change for legacy roots. var isModernRoot = (subtreeRoot.mode & ConcurrentMode) !== NoMode; while (nextEffect !== null) { var fiber = nextEffect; var firstChild = fiber.child; if ( fiber.tag === OffscreenComponent && isModernRoot) { // Keep track of the current Offscreen stack's state. var isHidden = fiber.memoizedState !== null; var newOffscreenSubtreeIsHidden = isHidden || offscreenSubtreeIsHidden; if (newOffscreenSubtreeIsHidden) { // The Offscreen tree is hidden. Skip over its layout effects. commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes); continue; } else { // TODO (Offscreen) Also check: subtreeFlags & LayoutMask var current = fiber.alternate; var wasHidden = current !== null && current.memoizedState !== null; var newOffscreenSubtreeWasHidden = wasHidden || offscreenSubtreeWasHidden; var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden; var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; // Traverse the Offscreen subtree with the current Offscreen as the root. offscreenSubtreeIsHidden = newOffscreenSubtreeIsHidden; offscreenSubtreeWasHidden = newOffscreenSubtreeWasHidden; if (offscreenSubtreeWasHidden && !prevOffscreenSubtreeWasHidden) { // This is the root of a reappearing boundary. Turn its layout effects // back on. nextEffect = fiber; reappearLayoutEffects_begin(fiber); } var child = firstChild; while (child !== null) { nextEffect = child; commitLayoutEffects_begin(child, // New root; bubble back up to here and stop. root, committedLanes); child = child.sibling; } // Restore Offscreen state and resume in our-progress traversal. nextEffect = fiber; offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden; offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden; commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes); continue; } } if ((fiber.subtreeFlags & LayoutMask) !== NoFlags && firstChild !== null) { firstChild.return = fiber; nextEffect = firstChild; } else { commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes); } } } function commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes) { while (nextEffect !== null) { var fiber = nextEffect; if ((fiber.flags & LayoutMask) !== NoFlags) { var current = fiber.alternate; setCurrentFiber(fiber); try { commitLayoutEffectOnFiber(root, current, fiber, committedLanes); } catch (error) { captureCommitPhaseError(fiber, fiber.return, error); } resetCurrentFiber(); } if (fiber === subtreeRoot) { nextEffect = null; return; } var sibling = fiber.sibling; if (sibling !== null) { sibling.return = fiber.return; nextEffect = sibling; return; } nextEffect = fiber.return; } } function disappearLayoutEffects_begin(subtreeRoot) { while (nextEffect !== null) { var fiber = nextEffect; var firstChild = fiber.child; // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic) switch (fiber.tag) { case FunctionComponent: case ForwardRef: case MemoComponent: case SimpleMemoComponent: { if ( fiber.mode & ProfileMode) { try { startLayoutEffectTimer(); commitHookEffectListUnmount(Layout, fiber, fiber.return); } finally { recordLayoutEffectDuration(fiber); } } else { commitHookEffectListUnmount(Layout, fiber, fiber.return); } break; } case ClassComponent: { // TODO (Offscreen) Check: flags & RefStatic safelyDetachRef(fiber, fiber.return); var instance = fiber.stateNode; if (typeof instance.componentWillUnmount === 'function') { safelyCallComponentWillUnmount(fiber, fiber.return, instance); } break; } case HostComponent: { safelyDetachRef(fiber, fiber.return); break; } case OffscreenComponent: { // Check if this is a var isHidden = fiber.memoizedState !== null; if (isHidden) { // Nested Offscreen tree is already hidden. Don't disappear // its effects. disappearLayoutEffects_complete(subtreeRoot); continue; } break; } } // TODO (Offscreen) Check: subtreeFlags & LayoutStatic if (firstChild !== null) { firstChild.return = fiber; nextEffect = firstChild; } else { disappearLayoutEffects_complete(subtreeRoot); } } } function disappearLayoutEffects_complete(subtreeRoot) { while (nextEffect !== null) { var fiber = nextEffect; if (fiber === subtreeRoot) { nextEffect = null; return; } var sibling = fiber.sibling; if (sibling !== null) { sibling.return = fiber.return; nextEffect = sibling; return; } nextEffect = fiber.return; } } function reappearLayoutEffects_begin(subtreeRoot) { while (nextEffect !== null) { var fiber = nextEffect; var firstChild = fiber.child; if (fiber.tag === OffscreenComponent) { var isHidden = fiber.memoizedState !== null; if (isHidden) { // Nested Offscreen tree is still hidden. Don't re-appear its effects. reappearLayoutEffects_complete(subtreeRoot); continue; } } // TODO (Offscreen) Check: subtreeFlags & LayoutStatic if (firstChild !== null) { // This node may have been reused from a previous render, so we can't // assume its return pointer is correct. firstChild.return = fiber; nextEffect = firstChild; } else { reappearLayoutEffects_complete(subtreeRoot); } } } function reappearLayoutEffects_complete(subtreeRoot) { while (nextEffect !== null) { var fiber = nextEffect; // TODO (Offscreen) Check: flags & LayoutStatic setCurrentFiber(fiber); try { reappearLayoutEffectsOnFiber(fiber); } catch (error) { captureCommitPhaseError(fiber, fiber.return, error); } resetCurrentFiber(); if (fiber === subtreeRoot) { nextEffect = null; return; } var sibling = fiber.sibling; if (sibling !== null) { // This node may have been reused from a previous render, so we can't // assume its return pointer is correct. sibling.return = fiber.return; nextEffect = sibling; return; } nextEffect = fiber.return; } } function commitPassiveMountEffects(root, finishedWork, committedLanes, committedTransitions) { nextEffect = finishedWork; commitPassiveMountEffects_begin(finishedWork, root, committedLanes, committedTransitions); } function commitPassiveMountEffects_begin(subtreeRoot, root, committedLanes, committedTransitions) { while (nextEffect !== null) { var fiber = nextEffect; var firstChild = fiber.child; if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && firstChild !== null) { firstChild.return = fiber; nextEffect = firstChild; } else { commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions); } } } function commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions) { while (nextEffect !== null) { var fiber = nextEffect; if ((fiber.flags & Passive) !== NoFlags) { setCurrentFiber(fiber); try { commitPassiveMountOnFiber(root, fiber, committedLanes, committedTransitions); } catch (error) { captureCommitPhaseError(fiber, fiber.return, error); } resetCurrentFiber(); } if (fiber === subtreeRoot) { nextEffect = null; return; } var sibling = fiber.sibling; if (sibling !== null) { sibling.return = fiber.return; nextEffect = sibling; return; } nextEffect = fiber.return; } } function commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) { switch (finishedWork.tag) { case FunctionComponent: case ForwardRef: case SimpleMemoComponent: { if ( finishedWork.mode & ProfileMode) { startPassiveEffectTimer(); try { commitHookEffectListMount(Passive$1 | HasEffect, finishedWork); } finally { recordPassiveEffectDuration(finishedWork); } } else { commitHookEffectListMount(Passive$1 | HasEffect, finishedWork); } break; } } } function commitPassiveUnmountEffects(firstChild) { nextEffect = firstChild; commitPassiveUnmountEffects_begin(); } function commitPassiveUnmountEffects_begin() { while (nextEffect !== null) { var fiber = nextEffect; var child = fiber.child; if ((nextEffect.flags & ChildDeletion) !== NoFlags) { var deletions = fiber.deletions; if (deletions !== null) { for (var i = 0; i < deletions.length; i++) { var fiberToDelete = deletions[i]; nextEffect = fiberToDelete; commitPassiveUnmountEffectsInsideOfDeletedTree_begin(fiberToDelete, fiber); } { // A fiber was deleted from this parent fiber, but it's still part of // the previous (alternate) parent fiber's list of children. Because // children are a linked list, an earlier sibling that's still alive // will be connected to the deleted fiber via its `alternate`: // // live fiber // --alternate--> previous live fiber // --sibling--> deleted fiber // // We can't disconnect `alternate` on nodes that haven't been deleted // yet, but we can disconnect the `sibling` and `child` pointers. var previousFiber = fiber.alternate; if (previousFiber !== null) { var detachedChild = previousFiber.child; if (detachedChild !== null) { previousFiber.child = null; do { var detachedSibling = detachedChild.sibling; detachedChild.sibling = null; detachedChild = detachedSibling; } while (detachedChild !== null); } } } nextEffect = fiber; } } if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && child !== null) { child.return = fiber; nextEffect = child; } else { commitPassiveUnmountEffects_complete(); } } } function commitPassiveUnmountEffects_complete() { while (nextEffect !== null) { var fiber = nextEffect; if ((fiber.flags & Passive) !== NoFlags) { setCurrentFiber(fiber); commitPassiveUnmountOnFiber(fiber); resetCurrentFiber(); } var sibling = fiber.sibling; if (sibling !== null) { sibling.return = fiber.return; nextEffect = sibling; return; } nextEffect = fiber.return; } } function commitPassiveUnmountOnFiber(finishedWork) { switch (finishedWork.tag) { case FunctionComponent: case ForwardRef: case SimpleMemoComponent: { if ( finishedWork.mode & ProfileMode) { startPassiveEffectTimer(); commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return); recordPassiveEffectDuration(finishedWork); } else { commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return); } break; } } } function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) { while (nextEffect !== null) { var fiber = nextEffect; // Deletion effects fire in parent -> child order // TODO: Check if fiber has a PassiveStatic flag setCurrentFiber(fiber); commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor); resetCurrentFiber(); var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we // do this, still need to handle `deletedTreeCleanUpLevel` correctly.) if (child !== null) { child.return = fiber; nextEffect = child; } else { commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot); } } } function commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot) { while (nextEffect !== null) { var fiber = nextEffect; var sibling = fiber.sibling; var returnFiber = fiber.return; { // Recursively traverse the entire deleted tree and clean up fiber fields. // This is more aggressive than ideal, and the long term goal is to only // have to detach the deleted tree at the root. detachFiberAfterEffects(fiber); if (fiber === deletedSubtreeRoot) { nextEffect = null; return; } } if (sibling !== null) { sibling.return = returnFiber; nextEffect = sibling; return; } nextEffect = returnFiber; } } function commitPassiveUnmountInsideDeletedTreeOnFiber(current, nearestMountedAncestor) { switch (current.tag) { case FunctionComponent: case ForwardRef: case SimpleMemoComponent: { if ( current.mode & ProfileMode) { startPassiveEffectTimer(); commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor); recordPassiveEffectDuration(current); } else { commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor); } break; } } } // TODO: Reuse reappearLayoutEffects traversal here? function invokeLayoutEffectMountInDEV(fiber) { { // We don't need to re-check StrictEffectsMode here. // This function is only called if that check has already passed. switch (fiber.tag) { case FunctionComponent: case ForwardRef: case SimpleMemoComponent: { try { commitHookEffectListMount(Layout | HasEffect, fiber); } catch (error) { captureCommitPhaseError(fiber, fiber.return, error); } break; } case ClassComponent: { var instance = fiber.stateNode; try { instance.componentDidMount(); } catch (error) { captureCommitPhaseError(fiber, fiber.return, error); } break; } } } } function invokePassiveEffectMountInDEV(fiber) { { // We don't need to re-check StrictEffectsMode here. // This function is only called if that check has already passed. switch (fiber.tag) { case FunctionComponent: case ForwardRef: case SimpleMemoComponent: { try { commitHookEffectListMount(Passive$1 | HasEffect, fiber); } catch (error) { captureCommitPhaseError(fiber, fiber.return, error); } break; } } } } function invokeLayoutEffectUnmountInDEV(fiber) { { // We don't need to re-check StrictEffectsMode here. // This function is only called if that check has already passed. switch (fiber.tag) { case FunctionComponent: case ForwardRef: case SimpleMemoComponent: { try { commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return); } catch (error) { captureCommitPhaseError(fiber, fiber.return, error); } break; } case ClassComponent: { var instance = fiber.stateNode; if (typeof instance.componentWillUnmount === 'function') { safelyCallComponentWillUnmount(fiber, fiber.return, instance); } break; } } } } function invokePassiveEffectUnmountInDEV(fiber) { { // We don't need to re-check StrictEffectsMode here. // This function is only called if that check has already passed. switch (fiber.tag) { case FunctionComponent: case ForwardRef: case SimpleMemoComponent: { try { commitHookEffectListUnmount(Passive$1 | HasEffect, fiber, fiber.return); } catch (error) { captureCommitPhaseError(fiber, fiber.return, error); } } } } } var COMPONENT_TYPE = 0; var HAS_PSEUDO_CLASS_TYPE = 1; var ROLE_TYPE = 2; var TEST_NAME_TYPE = 3; var TEXT_TYPE = 4; if (typeof Symbol === 'function' && Symbol.for) { var symbolFor = Symbol.for; COMPONENT_TYPE = symbolFor('selector.component'); HAS_PSEUDO_CLASS_TYPE = symbolFor('selector.has_pseudo_class'); ROLE_TYPE = symbolFor('selector.role'); TEST_NAME_TYPE = symbolFor('selector.test_id'); TEXT_TYPE = symbolFor('selector.text'); } var commitHooks = []; function onCommitRoot$1() { { commitHooks.forEach(function (commitHook) { return commitHook(); }); } } var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; function isLegacyActEnvironment(fiber) { { // Legacy mode. We preserve the behavior of React 17's act. It assumes an // act environment whenever `jest` is defined, but you can still turn off // spurious warnings by setting IS_REACT_ACT_ENVIRONMENT explicitly // to false. var isReactActEnvironmentGlobal = // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined; // $FlowExpectedError - Flow doesn't know about jest var jestIsDefined = typeof jest !== 'undefined'; return jestIsDefined && isReactActEnvironmentGlobal !== false; } } function isConcurrentActEnvironment() { { var isReactActEnvironmentGlobal = // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined; if (!isReactActEnvironmentGlobal && ReactCurrentActQueue.current !== null) { // TODO: Include link to relevant documentation page. error('The current testing environment is not configured to support ' + 'act(...)'); } return isReactActEnvironmentGlobal; } } var ceil = Math.ceil; var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher, ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner, ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig, ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue; var NoContext = /* */ 0; var BatchedContext = /* */ 1; var RenderContext = /* */ 2; var CommitContext = /* */ 4; var RootInProgress = 0; var RootFatalErrored = 1; var RootErrored = 2; var RootSuspended = 3; var RootSuspendedWithDelay = 4; var RootCompleted = 5; var RootDidNotComplete = 6; // Describes where we are in the React execution stack var executionContext = NoContext; // The root we're working on var workInProgressRoot = null; // The fiber we're working on var workInProgress = null; // The lanes we're rendering var workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree // This is a superset of the lanes we started working on at the root. The only // case where it's different from `workInProgressRootRenderLanes` is when we // enter a subtree that is hidden and needs to be unhidden: Suspense and // Offscreen component. // // Most things in the work loop should deal with workInProgressRootRenderLanes. // Most things in begin/complete phases should deal with subtreeRenderLanes. var subtreeRenderLanes = NoLanes; var subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc. var workInProgressRootExitStatus = RootInProgress; // A fatal error, if one is thrown var workInProgressRootFatalError = null; // "Included" lanes refer to lanes that were worked on during this render. It's // slightly different than `renderLanes` because `renderLanes` can change as you // enter and exit an Offscreen tree. This value is the combination of all render // lanes for the entire render phase. var workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only // includes unprocessed updates, not work in bailed out children. var workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render. var workInProgressRootInterleavedUpdatedLanes = NoLanes; // Lanes that were updated during the render phase (*not* an interleaved event). var workInProgressRootPingedLanes = NoLanes; // Errors that are thrown during the render phase. var workInProgressRootConcurrentErrors = null; // These are errors that we recovered from without surfacing them to the UI. // We will log them once the tree commits. var workInProgressRootRecoverableErrors = null; // The most recent time we committed a fallback. This lets us ensure a train // model where we don't commit new loading states in too quick succession. var globalMostRecentFallbackTime = 0; var FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering // more and prefer CPU suspense heuristics instead. var workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU // suspense heuristics and opt out of rendering more content. var RENDER_TIMEOUT_MS = 500; var workInProgressTransitions = null; function resetRenderTimer() { workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS; } function getRenderTargetTime() { return workInProgressRootRenderTargetTime; } var hasUncaughtError = false; var firstUncaughtError = null; var legacyErrorBoundariesThatAlreadyFailed = null; // Only used when enableProfilerNestedUpdateScheduledHook is true; var rootDoesHavePassiveEffects = false; var rootWithPendingPassiveEffects = null; var pendingPassiveEffectsLanes = NoLanes; var pendingPassiveProfilerEffects = []; var pendingPassiveTransitions = null; // Use these to prevent an infinite loop of nested updates var NESTED_UPDATE_LIMIT = 50; var nestedUpdateCount = 0; var rootWithNestedUpdates = null; var isFlushingPassiveEffects = false; var didScheduleUpdateDuringPassiveEffects = false; var NESTED_PASSIVE_UPDATE_LIMIT = 50; var nestedPassiveUpdateCount = 0; var rootWithPassiveNestedUpdates = null; // If two updates are scheduled within the same event, we should treat their // event times as simultaneous, even if the actual clock time has advanced // between the first and second call. var currentEventTime = NoTimestamp; var currentEventTransitionLane = NoLanes; var isRunningInsertionEffect = false; function getWorkInProgressRoot() { return workInProgressRoot; } function requestEventTime() { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { // We're inside React, so it's fine to read the actual time. return now(); } // We're not inside React, so we may be in the middle of a browser event. if (currentEventTime !== NoTimestamp) { // Use the same start time for all updates until we enter React again. return currentEventTime; } // This is the first update since React yielded. Compute a new start time. currentEventTime = now(); return currentEventTime; } function requestUpdateLane(fiber) { // Special cases var mode = fiber.mode; if ((mode & ConcurrentMode) === NoMode) { return SyncLane; } else if ( (executionContext & RenderContext) !== NoContext && workInProgressRootRenderLanes !== NoLanes) { // This is a render phase update. These are not officially supported. The // old behavior is to give this the same "thread" (lanes) as // whatever is currently rendering. So if you call `setState` on a component // that happens later in the same render, it will flush. Ideally, we want to // remove the special case and treat them as if they came from an // interleaved event. Regardless, this pattern is not officially supported. // This behavior is only a fallback. The flag only exists until we can roll // out the setState warning, since existing code might accidentally rely on // the current behavior. return pickArbitraryLane(workInProgressRootRenderLanes); } var isTransition = requestCurrentTransition() !== NoTransition; if (isTransition) { if ( ReactCurrentBatchConfig$3.transition !== null) { var transition = ReactCurrentBatchConfig$3.transition; if (!transition._updatedFibers) { transition._updatedFibers = new Set(); } transition._updatedFibers.add(fiber); } // The algorithm for assigning an update to a lane should be stable for all // updates at the same priority within the same event. To do this, the // inputs to the algorithm must be the same. // // The trick we use is to cache the first of each of these inputs within an // event. Then reset the cached values once we can be sure the event is // over. Our heuristic for that is whenever we enter a concurrent work loop. if (currentEventTransitionLane === NoLane) { // All transitions within the same event are assigned the same lane. currentEventTransitionLane = claimNextTransitionLane(); } return currentEventTransitionLane; } // Updates originating inside certain React methods, like flushSync, have // their priority set by tracking it with a context variable. // // The opaque type returned by the host config is internally a lane, so we can // use that directly. // TODO: Move this type conversion to the event priority module. var updateLane = getCurrentUpdatePriority(); if (updateLane !== NoLane) { return updateLane; } // This update originated outside React. Ask the host environment for an // appropriate priority, based on the type of event. // // The opaque type returned by the host config is internally a lane, so we can // use that directly. // TODO: Move this type conversion to the event priority module. var eventLane = getCurrentEventPriority(); return eventLane; } function requestRetryLane(fiber) { // This is a fork of `requestUpdateLane` designed specifically for Suspense // "retries" — a special update that attempts to flip a Suspense boundary // from its placeholder state to its primary/resolved state. // Special cases var mode = fiber.mode; if ((mode & ConcurrentMode) === NoMode) { return SyncLane; } return claimNextRetryLane(); } function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { checkForNestedUpdates(); { if (isRunningInsertionEffect) { error('useInsertionEffect must not schedule updates.'); } } { if (isFlushingPassiveEffects) { didScheduleUpdateDuringPassiveEffects = true; } } // Mark that the root has a pending update. markRootUpdated(root, lane, eventTime); if ((executionContext & RenderContext) !== NoLanes && root === workInProgressRoot) { // This update was dispatched during the render phase. This is a mistake // if the update originates from user space (with the exception of local // hook updates, which are handled differently and don't reach this // function), but there are some internal React features that use this as // an implementation detail, like selective hydration. warnAboutRenderPhaseUpdatesInDEV(fiber); // Track lanes that were updated during the render phase } else { // This is a normal update, scheduled from outside the render phase. For // example, during an input event. { if (isDevToolsPresent) { addFiberToLanesMap(root, fiber, lane); } } warnIfUpdatesNotWrappedWithActDEV(fiber); if (root === workInProgressRoot) { // Received an update to a tree that's in the middle of rendering. Mark // that there was an interleaved update work on this root. Unless the // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render // phase update. In that case, we don't treat render phase updates as if // they were interleaved, for backwards compat reasons. if ( (executionContext & RenderContext) === NoContext) { workInProgressRootInterleavedUpdatedLanes = mergeLanes(workInProgressRootInterleavedUpdatedLanes, lane); } if (workInProgressRootExitStatus === RootSuspendedWithDelay) { // The root already suspended with a delay, which means this render // definitely won't finish. Since we have a new update, let's mark it as // suspended now, right before marking the incoming update. This has the // effect of interrupting the current render and switching to the update. // TODO: Make sure this doesn't override pings that happen while we've // already started rendering. markRootSuspended$1(root, workInProgressRootRenderLanes); } } ensureRootIsScheduled(root, eventTime); if (lane === SyncLane && executionContext === NoContext && (fiber.mode & ConcurrentMode) === NoMode && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode. !( ReactCurrentActQueue$1.isBatchingLegacy)) { // Flush the synchronous work now, unless we're already working or inside // a batch. This is intentionally inside scheduleUpdateOnFiber instead of // scheduleCallbackForFiber to preserve the ability to schedule a callback // without immediately flushing it. We only do this for user-initiated // updates, to preserve historical behavior of legacy mode. resetRenderTimer(); flushSyncCallbacksOnlyInLegacyMode(); } } } function scheduleInitialHydrationOnRoot(root, lane, eventTime) { // This is a special fork of scheduleUpdateOnFiber that is only used to // schedule the initial hydration of a root that has just been created. Most // of the stuff in scheduleUpdateOnFiber can be skipped. // // The main reason for this separate path, though, is to distinguish the // initial children from subsequent updates. In fully client-rendered roots // (createRoot instead of hydrateRoot), all top-level renders are modeled as // updates, but hydration roots are special because the initial render must // match what was rendered on the server. var current = root.current; current.lanes = lane; markRootUpdated(root, lane, eventTime); ensureRootIsScheduled(root, eventTime); } function isUnsafeClassRenderPhaseUpdate(fiber) { // Check if this is a render phase update. Only called by class components, // which special (deprecated) behavior for UNSAFE_componentWillReceive props. return (// TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We // decided not to enable it. (executionContext & RenderContext) !== NoContext ); } // Use this function to schedule a task for a root. There's only one task per // root; if a task was already scheduled, we'll check to make sure the priority // of the existing task is the same as the priority of the next level that the // root has work on. This function is called on every update, and right before // exiting a task. function ensureRootIsScheduled(root, currentTime) { var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as // expired so we know to work on those next. markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority. var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); if (nextLanes === NoLanes) { // Special case: There's nothing to work on. if (existingCallbackNode !== null) { cancelCallback$1(existingCallbackNode); } root.callbackNode = null; root.callbackPriority = NoLane; return; } // We use the highest priority lane to represent the priority of the callback. var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it. var existingCallbackPriority = root.callbackPriority; if (existingCallbackPriority === newCallbackPriority && // Special case related to `act`. If the currently scheduled task is a // Scheduler task, rather than an `act` task, cancel it and re-scheduled // on the `act` queue. !( ReactCurrentActQueue$1.current !== null && existingCallbackNode !== fakeActCallbackNode)) { { // If we're going to re-use an existing task, it needs to exist. // Assume that discrete update microtasks are non-cancellable and null. // TODO: Temporary until we confirm this warning is not fired. if (existingCallbackNode == null && existingCallbackPriority !== SyncLane) { error('Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.'); } } // The priority hasn't changed. We can reuse the existing task. Exit. return; } if (existingCallbackNode != null) { // Cancel the existing callback. We'll schedule a new one below. cancelCallback$1(existingCallbackNode); } // Schedule a new callback. var newCallbackNode; if (newCallbackPriority === SyncLane) { // Special case: Sync React callbacks are scheduled on a special // internal queue if (root.tag === LegacyRoot) { if ( ReactCurrentActQueue$1.isBatchingLegacy !== null) { ReactCurrentActQueue$1.didScheduleLegacyUpdate = true; } scheduleLegacySyncCallback(performSyncWorkOnRoot.bind(null, root)); } else { scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root)); } { // Flush the queue in a microtask. if ( ReactCurrentActQueue$1.current !== null) { // Inside `act`, use our internal `act` queue so that these get flushed // at the end of the current scope even when using the sync version // of `act`. ReactCurrentActQueue$1.current.push(flushSyncCallbacks); } else { scheduleMicrotask(function () { // In Safari, appending an iframe forces microtasks to run. // https://github.com/facebook/react/issues/22459 // We don't support running callbacks in the middle of render // or commit so we need to check against that. if ((executionContext & (RenderContext | CommitContext)) === NoContext) { // Note that this would still prematurely flush the callbacks // if this happens outside render or commit phase (e.g. in an event). flushSyncCallbacks(); } }); } } newCallbackNode = null; } else { var schedulerPriorityLevel; switch (lanesToEventPriority(nextLanes)) { case DiscreteEventPriority: schedulerPriorityLevel = ImmediatePriority; break; case ContinuousEventPriority: schedulerPriorityLevel = UserBlockingPriority; break; case DefaultEventPriority: schedulerPriorityLevel = NormalPriority; break; case IdleEventPriority: schedulerPriorityLevel = IdlePriority; break; default: schedulerPriorityLevel = NormalPriority; break; } newCallbackNode = scheduleCallback$1(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root)); } root.callbackPriority = newCallbackPriority; root.callbackNode = newCallbackNode; } // This is the entry point for every concurrent task, i.e. anything that // goes through Scheduler. function performConcurrentWorkOnRoot(root, didTimeout) { { resetNestedUpdateFlag(); } // Since we know we're in a React event, we can clear the current // event time. The next update will compute a new event time. currentEventTime = NoTimestamp; currentEventTransitionLane = NoLanes; if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { throw new Error('Should not already be working.'); } // Flush any pending passive effects before deciding which lanes to work on, // in case they schedule additional work. var originalCallbackNode = root.callbackNode; var didFlushPassiveEffects = flushPassiveEffects(); if (didFlushPassiveEffects) { // Something in the passive effect phase may have canceled the current task. // Check if the task node for this root was changed. if (root.callbackNode !== originalCallbackNode) { // The current task was canceled. Exit. We don't need to call // `ensureRootIsScheduled` because the check above implies either that // there's a new task, or that there's no remaining work on this root. return null; } } // Determine the next lanes to work on, using the fields stored // on the root. var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); if (lanes === NoLanes) { // Defensive coding. This is never expected to happen. return null; } // We disable time-slicing in some cases: if the work has been CPU-bound // for too long ("expired" work, to prevent starvation), or we're in // sync-updates-by-default mode. // TODO: We only check `didTimeout` defensively, to account for a Scheduler // bug we're still investigating. Once the bug in Scheduler is fixed, // we can remove this, since we track expiration ourselves. var shouldTimeSlice = !includesBlockingLane(root, lanes) && !includesExpiredLane(root, lanes) && ( !didTimeout); var exitStatus = shouldTimeSlice ? renderRootConcurrent(root, lanes) : renderRootSync(root, lanes); if (exitStatus !== RootInProgress) { if (exitStatus === RootErrored) { // If something threw an error, try rendering one more time. We'll // render synchronously to block concurrent data mutations, and we'll // includes all pending updates are included. If it still fails after // the second attempt, we'll give up and commit the resulting tree. var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root); if (errorRetryLanes !== NoLanes) { lanes = errorRetryLanes; exitStatus = recoverFromConcurrentError(root, errorRetryLanes); } } if (exitStatus === RootFatalErrored) { var fatalError = workInProgressRootFatalError; prepareFreshStack(root, NoLanes); markRootSuspended$1(root, lanes); ensureRootIsScheduled(root, now()); throw fatalError; } if (exitStatus === RootDidNotComplete) { // The render unwound without completing the tree. This happens in special // cases where need to exit the current render without producing a // consistent tree or committing. // // This should only happen during a concurrent render, not a discrete or // synchronous update. We should have already checked for this when we // unwound the stack. markRootSuspended$1(root, lanes); } else { // The render completed. // Check if this render may have yielded to a concurrent event, and if so, // confirm that any newly rendered stores are consistent. // TODO: It's possible that even a concurrent render may never have yielded // to the main thread, if it was fast enough, or if it expired. We could // skip the consistency check in that case, too. var renderWasConcurrent = !includesBlockingLane(root, lanes); var finishedWork = root.current.alternate; if (renderWasConcurrent && !isRenderConsistentWithExternalStores(finishedWork)) { // A store was mutated in an interleaved event. Render again, // synchronously, to block further mutations. exitStatus = renderRootSync(root, lanes); // We need to check again if something threw if (exitStatus === RootErrored) { var _errorRetryLanes = getLanesToRetrySynchronouslyOnError(root); if (_errorRetryLanes !== NoLanes) { lanes = _errorRetryLanes; exitStatus = recoverFromConcurrentError(root, _errorRetryLanes); // We assume the tree is now consistent because we didn't yield to any // concurrent events. } } if (exitStatus === RootFatalErrored) { var _fatalError = workInProgressRootFatalError; prepareFreshStack(root, NoLanes); markRootSuspended$1(root, lanes); ensureRootIsScheduled(root, now()); throw _fatalError; } } // We now have a consistent tree. The next step is either to commit it, // or, if something suspended, wait to commit it after a timeout. root.finishedWork = finishedWork; root.finishedLanes = lanes; finishConcurrentRender(root, exitStatus, lanes); } } ensureRootIsScheduled(root, now()); if (root.callbackNode === originalCallbackNode) { // The task node scheduled for this root is the same one that's // currently executed. Need to return a continuation. return performConcurrentWorkOnRoot.bind(null, root); } return null; } function recoverFromConcurrentError(root, errorRetryLanes) { // If an error occurred during hydration, discard server response and fall // back to client side render. // Before rendering again, save the errors from the previous attempt. var errorsFromFirstAttempt = workInProgressRootConcurrentErrors; if (isRootDehydrated(root)) { // The shell failed to hydrate. Set a flag to force a client rendering // during the next attempt. To do this, we call prepareFreshStack now // to create the root work-in-progress fiber. This is a bit weird in terms // of factoring, because it relies on renderRootSync not calling // prepareFreshStack again in the call below, which happens because the // root and lanes haven't changed. // // TODO: I think what we should do is set ForceClientRender inside // throwException, like we do for nested Suspense boundaries. The reason // it's here instead is so we can switch to the synchronous work loop, too. // Something to consider for a future refactor. var rootWorkInProgress = prepareFreshStack(root, errorRetryLanes); rootWorkInProgress.flags |= ForceClientRender; { errorHydratingContainer(root.containerInfo); } } var exitStatus = renderRootSync(root, errorRetryLanes); if (exitStatus !== RootErrored) { // Successfully finished rendering on retry // The errors from the failed first attempt have been recovered. Add // them to the collection of recoverable errors. We'll log them in the // commit phase. var errorsFromSecondAttempt = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = errorsFromFirstAttempt; // The errors from the second attempt should be queued after the errors // from the first attempt, to preserve the causal sequence. if (errorsFromSecondAttempt !== null) { queueRecoverableErrors(errorsFromSecondAttempt); } } return exitStatus; } function queueRecoverableErrors(errors) { if (workInProgressRootRecoverableErrors === null) { workInProgressRootRecoverableErrors = errors; } else { workInProgressRootRecoverableErrors.push.apply(workInProgressRootRecoverableErrors, errors); } } function finishConcurrentRender(root, exitStatus, lanes) { switch (exitStatus) { case RootInProgress: case RootFatalErrored: { throw new Error('Root did not complete. This is a bug in React.'); } // Flow knows about invariant, so it complains if I add a break // statement, but eslint doesn't know about invariant, so it complains // if I do. eslint-disable-next-line no-fallthrough case RootErrored: { // We should have already attempted to retry this tree. If we reached // this point, it errored again. Commit it. commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions); break; } case RootSuspended: { markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we // should immediately commit it or wait a bit. if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope !shouldForceFlushFallbacksInDEV()) { // This render only included retries, no updates. Throttle committing // retries so that we don't show too many loading states too quickly. var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time. if (msUntilTimeout > 10) { var nextLanes = getNextLanes(root, NoLanes); if (nextLanes !== NoLanes) { // There's additional work on this root. break; } var suspendedLanes = root.suspendedLanes; if (!isSubsetOfLanes(suspendedLanes, lanes)) { // We should prefer to render the fallback of at the last // suspended level. Ping the last suspended level to try // rendering it again. // FIXME: What if the suspended lanes are Idle? Should not restart. var eventTime = requestEventTime(); markRootPinged(root, suspendedLanes); break; } // The render is suspended, it hasn't timed out, and there's no // lower priority work to do. Instead of committing the fallback // immediately, wait for more data to arrive. root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), msUntilTimeout); break; } } // The work expired. Commit immediately. commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions); break; } case RootSuspendedWithDelay: { markRootSuspended$1(root, lanes); if (includesOnlyTransitions(lanes)) { // This is a transition, so we should exit without committing a // placeholder and without scheduling a timeout. Delay indefinitely // until we receive more data. break; } if (!shouldForceFlushFallbacksInDEV()) { // This is not a transition, but we did trigger an avoided state. // Schedule a placeholder to display after a short delay, using the Just // Noticeable Difference. // TODO: Is the JND optimization worth the added complexity? If this is // the only reason we track the event time, then probably not. // Consider removing. var mostRecentEventTime = getMostRecentEventTime(root, lanes); var eventTimeMs = mostRecentEventTime; var timeElapsedMs = now() - eventTimeMs; var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time. if (_msUntilTimeout > 10) { // Instead of committing the fallback immediately, wait for more data // to arrive. root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), _msUntilTimeout); break; } } // Commit the placeholder. commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions); break; } case RootCompleted: { // The work completed. Ready to commit. commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions); break; } default: { throw new Error('Unknown root exit status.'); } } } function isRenderConsistentWithExternalStores(finishedWork) { // Search the rendered tree for external store reads, and check whether the // stores were mutated in a concurrent event. Intentionally using an iterative // loop instead of recursion so we can exit early. var node = finishedWork; while (true) { if (node.flags & StoreConsistency) { var updateQueue = node.updateQueue; if (updateQueue !== null) { var checks = updateQueue.stores; if (checks !== null) { for (var i = 0; i < checks.length; i++) { var check = checks[i]; var getSnapshot = check.getSnapshot; var renderedValue = check.value; try { if (!objectIs(getSnapshot(), renderedValue)) { // Found an inconsistent store. return false; } } catch (error) { // If `getSnapshot` throws, return `false`. This will schedule // a re-render, and the error will be rethrown during render. return false; } } } } } var child = node.child; if (node.subtreeFlags & StoreConsistency && child !== null) { child.return = node; node = child; continue; } if (node === finishedWork) { return true; } while (node.sibling === null) { if (node.return === null || node.return === finishedWork) { return true; } node = node.return; } node.sibling.return = node.return; node = node.sibling; } // Flow doesn't know this is unreachable, but eslint does // eslint-disable-next-line no-unreachable return true; } function markRootSuspended$1(root, suspendedLanes) { // When suspending, we should always exclude lanes that were pinged or (more // rarely, since we try to avoid it) updated during the render phase. // TODO: Lol maybe there's a better way to factor this besides this // obnoxiously named function :) suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes); suspendedLanes = removeLanes(suspendedLanes, workInProgressRootInterleavedUpdatedLanes); markRootSuspended(root, suspendedLanes); } // This is the entry point for synchronous tasks that don't go // through Scheduler function performSyncWorkOnRoot(root) { { syncNestedUpdateFlag(); } if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { throw new Error('Should not already be working.'); } flushPassiveEffects(); var lanes = getNextLanes(root, NoLanes); if (!includesSomeLane(lanes, SyncLane)) { // There's no remaining sync work left. ensureRootIsScheduled(root, now()); return null; } var exitStatus = renderRootSync(root, lanes); if (root.tag !== LegacyRoot && exitStatus === RootErrored) { // If something threw an error, try rendering one more time. We'll render // synchronously to block concurrent data mutations, and we'll includes // all pending updates are included. If it still fails after the second // attempt, we'll give up and commit the resulting tree. var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root); if (errorRetryLanes !== NoLanes) { lanes = errorRetryLanes; exitStatus = recoverFromConcurrentError(root, errorRetryLanes); } } if (exitStatus === RootFatalErrored) { var fatalError = workInProgressRootFatalError; prepareFreshStack(root, NoLanes); markRootSuspended$1(root, lanes); ensureRootIsScheduled(root, now()); throw fatalError; } if (exitStatus === RootDidNotComplete) { throw new Error('Root did not complete. This is a bug in React.'); } // We now have a consistent tree. Because this is a sync render, we // will commit it even if something suspended. var finishedWork = root.current.alternate; root.finishedWork = finishedWork; root.finishedLanes = lanes; commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions); // Before exiting, make sure there's a callback scheduled for the next // pending level. ensureRootIsScheduled(root, now()); return null; } function flushRoot(root, lanes) { if (lanes !== NoLanes) { markRootEntangled(root, mergeLanes(lanes, SyncLane)); ensureRootIsScheduled(root, now()); if ((executionContext & (RenderContext | CommitContext)) === NoContext) { resetRenderTimer(); flushSyncCallbacks(); } } } function batchedUpdates$1(fn, a) { var prevExecutionContext = executionContext; executionContext |= BatchedContext; try { return fn(a); } finally { executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer // most batchedUpdates-like method. if (executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode. !( ReactCurrentActQueue$1.isBatchingLegacy)) { resetRenderTimer(); flushSyncCallbacksOnlyInLegacyMode(); } } } function discreteUpdates(fn, a, b, c, d) { var previousPriority = getCurrentUpdatePriority(); var prevTransition = ReactCurrentBatchConfig$3.transition; try { ReactCurrentBatchConfig$3.transition = null; setCurrentUpdatePriority(DiscreteEventPriority); return fn(a, b, c, d); } finally { setCurrentUpdatePriority(previousPriority); ReactCurrentBatchConfig$3.transition = prevTransition; if (executionContext === NoContext) { resetRenderTimer(); } } } // Overload the definition to the two valid signatures. // Warning, this opts-out of checking the function body. // eslint-disable-next-line no-redeclare function flushSync(fn) { // In legacy mode, we flush pending passive effects at the beginning of the // next event, not at the end of the previous one. if (rootWithPendingPassiveEffects !== null && rootWithPendingPassiveEffects.tag === LegacyRoot && (executionContext & (RenderContext | CommitContext)) === NoContext) { flushPassiveEffects(); } var prevExecutionContext = executionContext; executionContext |= BatchedContext; var prevTransition = ReactCurrentBatchConfig$3.transition; var previousPriority = getCurrentUpdatePriority(); try { ReactCurrentBatchConfig$3.transition = null; setCurrentUpdatePriority(DiscreteEventPriority); if (fn) { return fn(); } else { return undefined; } } finally { setCurrentUpdatePriority(previousPriority); ReactCurrentBatchConfig$3.transition = prevTransition; executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch. // Note that this will happen even if batchedUpdates is higher up // the stack. if ((executionContext & (RenderContext | CommitContext)) === NoContext) { flushSyncCallbacks(); } } } function isAlreadyRendering() { // Used by the renderer to print a warning if certain APIs are called from // the wrong context. return (executionContext & (RenderContext | CommitContext)) !== NoContext; } function pushRenderLanes(fiber, lanes) { push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber); subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes); workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes); } function popRenderLanes(fiber) { subtreeRenderLanes = subtreeRenderLanesCursor.current; pop(subtreeRenderLanesCursor, fiber); } function prepareFreshStack(root, lanes) { root.finishedWork = null; root.finishedLanes = NoLanes; var timeoutHandle = root.timeoutHandle; if (timeoutHandle !== noTimeout) { // The root previous suspended and scheduled a timeout to commit a fallback // state. Now that we have additional work, cancel the timeout. root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above cancelTimeout(timeoutHandle); } if (workInProgress !== null) { var interruptedWork = workInProgress.return; while (interruptedWork !== null) { var current = interruptedWork.alternate; unwindInterruptedWork(current, interruptedWork); interruptedWork = interruptedWork.return; } } workInProgressRoot = root; var rootWorkInProgress = createWorkInProgress(root.current, null); workInProgress = rootWorkInProgress; workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes; workInProgressRootExitStatus = RootInProgress; workInProgressRootFatalError = null; workInProgressRootSkippedLanes = NoLanes; workInProgressRootInterleavedUpdatedLanes = NoLanes; workInProgressRootPingedLanes = NoLanes; workInProgressRootConcurrentErrors = null; workInProgressRootRecoverableErrors = null; finishQueueingConcurrentUpdates(); { ReactStrictModeWarnings.discardPendingWarnings(); } return rootWorkInProgress; } function handleError(root, thrownValue) { do { var erroredWork = workInProgress; try { // Reset module-level state that was set during the render phase. resetContextDependencies(); resetHooksAfterThrow(); resetCurrentFiber(); // TODO: I found and added this missing line while investigating a // separate issue. Write a regression test using string refs. ReactCurrentOwner$2.current = null; if (erroredWork === null || erroredWork.return === null) { // Expected to be working on a non-root fiber. This is a fatal error // because there's no ancestor that can handle it; the root is // supposed to capture all errors that weren't caught by an error // boundary. workInProgressRootExitStatus = RootFatalErrored; workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next // sibling, or the parent if there are no siblings. But since the root // has no siblings nor a parent, we set it to null. Usually this is // handled by `completeUnitOfWork` or `unwindWork`, but since we're // intentionally not calling those, we need set it here. // TODO: Consider calling `unwindWork` to pop the contexts. workInProgress = null; return; } if (enableProfilerTimer && erroredWork.mode & ProfileMode) { // Record the time spent rendering before an error was thrown. This // avoids inaccurate Profiler durations in the case of a // suspended render. stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true); } if (enableSchedulingProfiler) { markComponentRenderStopped(); if (thrownValue !== null && typeof thrownValue === 'object' && typeof thrownValue.then === 'function') { var wakeable = thrownValue; markComponentSuspended(erroredWork, wakeable, workInProgressRootRenderLanes); } else { markComponentErrored(erroredWork, thrownValue, workInProgressRootRenderLanes); } } throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes); completeUnitOfWork(erroredWork); } catch (yetAnotherThrownValue) { // Something in the return path also threw. thrownValue = yetAnotherThrownValue; if (workInProgress === erroredWork && erroredWork !== null) { // If this boundary has already errored, then we had trouble processing // the error. Bubble it to the next boundary. erroredWork = erroredWork.return; workInProgress = erroredWork; } else { erroredWork = workInProgress; } continue; } // Return to the normal work loop. return; } while (true); } function pushDispatcher() { var prevDispatcher = ReactCurrentDispatcher$2.current; ReactCurrentDispatcher$2.current = ContextOnlyDispatcher; if (prevDispatcher === null) { // The React isomorphic package does not include a default dispatcher. // Instead the first renderer will lazily attach one, in order to give // nicer error messages. return ContextOnlyDispatcher; } else { return prevDispatcher; } } function popDispatcher(prevDispatcher) { ReactCurrentDispatcher$2.current = prevDispatcher; } function markCommitTimeOfFallback() { globalMostRecentFallbackTime = now(); } function markSkippedUpdateLanes(lane) { workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes); } function renderDidSuspend() { if (workInProgressRootExitStatus === RootInProgress) { workInProgressRootExitStatus = RootSuspended; } } function renderDidSuspendDelayIfPossible() { if (workInProgressRootExitStatus === RootInProgress || workInProgressRootExitStatus === RootSuspended || workInProgressRootExitStatus === RootErrored) { workInProgressRootExitStatus = RootSuspendedWithDelay; } // Check if there are updates that we skipped tree that might have unblocked // this render. if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes))) { // Mark the current render as suspended so that we switch to working on // the updates that were skipped. Usually we only suspend at the end of // the render phase. // TODO: We should probably always mark the root as suspended immediately // (inside this function), since by suspending at the end of the render // phase introduces a potential mistake where we suspend lanes that were // pinged or updated while we were rendering. markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes); } } function renderDidError(error) { if (workInProgressRootExitStatus !== RootSuspendedWithDelay) { workInProgressRootExitStatus = RootErrored; } if (workInProgressRootConcurrentErrors === null) { workInProgressRootConcurrentErrors = [error]; } else { workInProgressRootConcurrentErrors.push(error); } } // Called during render to determine if anything has suspended. // Returns false if we're not sure. function renderHasNotSuspendedYet() { // If something errored or completed, we can't really be sure, // so those are false. return workInProgressRootExitStatus === RootInProgress; } function renderRootSync(root, lanes) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack // and prepare a fresh one. Otherwise we'll continue where we left off. if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) { { if (isDevToolsPresent) { var memoizedUpdaters = root.memoizedUpdaters; if (memoizedUpdaters.size > 0) { restorePendingUpdaters(root, workInProgressRootRenderLanes); memoizedUpdaters.clear(); } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set. // If we bailout on this work, we'll move them back (like above). // It's important to move them now in case the work spawns more work at the same priority with different updaters. // That way we can keep the current update and future updates separate. movePendingFibersToMemoized(root, lanes); } } workInProgressTransitions = getTransitionsForLanes(); prepareFreshStack(root, lanes); } { markRenderStarted(lanes); } do { try { workLoopSync(); break; } catch (thrownValue) { handleError(root, thrownValue); } } while (true); resetContextDependencies(); executionContext = prevExecutionContext; popDispatcher(prevDispatcher); if (workInProgress !== null) { // This is a sync render, so we should have finished the whole tree. throw new Error('Cannot commit an incomplete root. This error is likely caused by a ' + 'bug in React. Please file an issue.'); } { markRenderStopped(); } // Set this to null to indicate there's no in-progress render. workInProgressRoot = null; workInProgressRootRenderLanes = NoLanes; return workInProgressRootExitStatus; } // The work loop is an extremely hot path. Tell Closure not to inline it. /** @noinline */ function workLoopSync() { // Already timed out, so perform work without checking if we need to yield. while (workInProgress !== null) { performUnitOfWork(workInProgress); } } function renderRootConcurrent(root, lanes) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack // and prepare a fresh one. Otherwise we'll continue where we left off. if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) { { if (isDevToolsPresent) { var memoizedUpdaters = root.memoizedUpdaters; if (memoizedUpdaters.size > 0) { restorePendingUpdaters(root, workInProgressRootRenderLanes); memoizedUpdaters.clear(); } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set. // If we bailout on this work, we'll move them back (like above). // It's important to move them now in case the work spawns more work at the same priority with different updaters. // That way we can keep the current update and future updates separate. movePendingFibersToMemoized(root, lanes); } } workInProgressTransitions = getTransitionsForLanes(); resetRenderTimer(); prepareFreshStack(root, lanes); } { markRenderStarted(lanes); } do { try { workLoopConcurrent(); break; } catch (thrownValue) { handleError(root, thrownValue); } } while (true); resetContextDependencies(); popDispatcher(prevDispatcher); executionContext = prevExecutionContext; if (workInProgress !== null) { // Still work remaining. { markRenderYielded(); } return RootInProgress; } else { // Completed the tree. { markRenderStopped(); } // Set this to null to indicate there's no in-progress render. workInProgressRoot = null; workInProgressRootRenderLanes = NoLanes; // Return the final exit status. return workInProgressRootExitStatus; } } /** @noinline */ function workLoopConcurrent() { // Perform work until Scheduler asks us to yield while (workInProgress !== null && !shouldYield()) { performUnitOfWork(workInProgress); } } function performUnitOfWork(unitOfWork) { // The current, flushed, state of this fiber is the alternate. Ideally // nothing should rely on this, but relying on it here means that we don't // need an additional field on the work in progress. var current = unitOfWork.alternate; setCurrentFiber(unitOfWork); var next; if ( (unitOfWork.mode & ProfileMode) !== NoMode) { startProfilerTimer(unitOfWork); next = beginWork$1(current, unitOfWork, subtreeRenderLanes); stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true); } else { next = beginWork$1(current, unitOfWork, subtreeRenderLanes); } resetCurrentFiber(); unitOfWork.memoizedProps = unitOfWork.pendingProps; if (next === null) { // If this doesn't spawn new work, complete the current work. completeUnitOfWork(unitOfWork); } else { workInProgress = next; } ReactCurrentOwner$2.current = null; } function completeUnitOfWork(unitOfWork) { // Attempt to complete the current unit of work, then move to the next // sibling. If there are no more siblings, return to the parent fiber. var completedWork = unitOfWork; do { // The current, flushed, state of this fiber is the alternate. Ideally // nothing should rely on this, but relying on it here means that we don't // need an additional field on the work in progress. var current = completedWork.alternate; var returnFiber = completedWork.return; // Check if the work completed or if something threw. if ((completedWork.flags & Incomplete) === NoFlags) { setCurrentFiber(completedWork); var next = void 0; if ( (completedWork.mode & ProfileMode) === NoMode) { next = completeWork(current, completedWork, subtreeRenderLanes); } else { startProfilerTimer(completedWork); next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error. stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); } resetCurrentFiber(); if (next !== null) { // Completing this fiber spawned new work. Work on that next. workInProgress = next; return; } } else { // This fiber did not complete because something threw. Pop values off // the stack without entering the complete phase. If this is a boundary, // capture values if possible. var _next = unwindWork(current, completedWork); // Because this fiber did not complete, don't reset its lanes. if (_next !== null) { // If completing this work spawned new work, do that next. We'll come // back here again. // Since we're restarting, remove anything that is not a host effect // from the effect tag. _next.flags &= HostEffectMask; workInProgress = _next; return; } if ( (completedWork.mode & ProfileMode) !== NoMode) { // Record the render duration for the fiber that errored. stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing. var actualDuration = completedWork.actualDuration; var child = completedWork.child; while (child !== null) { actualDuration += child.actualDuration; child = child.sibling; } completedWork.actualDuration = actualDuration; } if (returnFiber !== null) { // Mark the parent fiber as incomplete and clear its subtree flags. returnFiber.flags |= Incomplete; returnFiber.subtreeFlags = NoFlags; returnFiber.deletions = null; } else { // We've unwound all the way to the root. workInProgressRootExitStatus = RootDidNotComplete; workInProgress = null; return; } } var siblingFiber = completedWork.sibling; if (siblingFiber !== null) { // If there is more work to do in this returnFiber, do that next. workInProgress = siblingFiber; return; } // Otherwise, return to the parent completedWork = returnFiber; // Update the next thing we're working on in case something throws. workInProgress = completedWork; } while (completedWork !== null); // We've reached the root. if (workInProgressRootExitStatus === RootInProgress) { workInProgressRootExitStatus = RootCompleted; } } function commitRoot(root, recoverableErrors, transitions) { // TODO: This no longer makes any sense. We already wrap the mutation and // layout phases. Should be able to remove. var previousUpdateLanePriority = getCurrentUpdatePriority(); var prevTransition = ReactCurrentBatchConfig$3.transition; try { ReactCurrentBatchConfig$3.transition = null; setCurrentUpdatePriority(DiscreteEventPriority); commitRootImpl(root, recoverableErrors, transitions, previousUpdateLanePriority); } finally { ReactCurrentBatchConfig$3.transition = prevTransition; setCurrentUpdatePriority(previousUpdateLanePriority); } return null; } function commitRootImpl(root, recoverableErrors, transitions, renderPriorityLevel) { do { // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which // means `flushPassiveEffects` will sometimes result in additional // passive effects. So we need to keep flushing in a loop until there are // no more pending effects. // TODO: Might be better if `flushPassiveEffects` did not automatically // flush synchronous work at the end, to avoid factoring hazards like this. flushPassiveEffects(); } while (rootWithPendingPassiveEffects !== null); flushRenderPhaseStrictModeWarningsInDEV(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { throw new Error('Should not already be working.'); } var finishedWork = root.finishedWork; var lanes = root.finishedLanes; { markCommitStarted(lanes); } if (finishedWork === null) { { markCommitStopped(); } return null; } else { { if (lanes === NoLanes) { error('root.finishedLanes should not be empty during a commit. This is a ' + 'bug in React.'); } } } root.finishedWork = null; root.finishedLanes = NoLanes; if (finishedWork === root.current) { throw new Error('Cannot commit the same tree as before. This error is likely caused by ' + 'a bug in React. Please file an issue.'); } // commitRoot never returns a continuation; it always finishes synchronously. // So we can clear these now to allow a new callback to be scheduled. root.callbackNode = null; root.callbackPriority = NoLane; // Update the first and last pending times on this root. The new first // pending time is whatever is left on the root fiber. var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes); markRootFinished(root, remainingLanes); if (root === workInProgressRoot) { // We can reset these now that they are finished. workInProgressRoot = null; workInProgress = null; workInProgressRootRenderLanes = NoLanes; } // If there are pending passive effects, schedule a callback to process them. // Do this as early as possible, so it is queued before anything else that // might get scheduled in the commit phase. (See #16714.) // TODO: Delete all other places that schedule the passive effect callback // They're redundant. if ((finishedWork.subtreeFlags & PassiveMask) !== NoFlags || (finishedWork.flags & PassiveMask) !== NoFlags) { if (!rootDoesHavePassiveEffects) { rootDoesHavePassiveEffects = true; // to store it in pendingPassiveTransitions until they get processed // We need to pass this through as an argument to commitRoot // because workInProgressTransitions might have changed between // the previous render and commit if we throttle the commit // with setTimeout pendingPassiveTransitions = transitions; scheduleCallback$1(NormalPriority, function () { flushPassiveEffects(); // This render triggered passive effects: release the root cache pool // *after* passive effects fire to avoid freeing a cache pool that may // be referenced by a node in the tree (HostRoot, Cache boundary etc) return null; }); } } // Check if there are any effects in the whole tree. // TODO: This is left over from the effect list implementation, where we had // to check for the existence of `firstEffect` to satisfy Flow. I think the // only other reason this optimization exists is because it affects profiling. // Reconsider whether this is necessary. var subtreeHasEffects = (finishedWork.subtreeFlags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags; var rootHasEffect = (finishedWork.flags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags; if (subtreeHasEffects || rootHasEffect) { var prevTransition = ReactCurrentBatchConfig$3.transition; ReactCurrentBatchConfig$3.transition = null; var previousPriority = getCurrentUpdatePriority(); setCurrentUpdatePriority(DiscreteEventPriority); var prevExecutionContext = executionContext; executionContext |= CommitContext; // Reset this to null before calling lifecycles ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass // of the effect list for each phase: all mutation effects come before all // layout effects, and so on. // The first phase a "before mutation" phase. We use this phase to read the // state of the host tree right before we mutate it. This is where // getSnapshotBeforeUpdate is called. var shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects(root, finishedWork); { // Mark the current commit time to be shared by all Profilers in this // batch. This enables them to be grouped later. recordCommitTime(); } commitMutationEffects(root, finishedWork, lanes); resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after // the mutation phase, so that the previous tree is still current during // componentWillUnmount, but before the layout phase, so that the finished // work is current during componentDidMount/Update. root.current = finishedWork; // The next phase is the layout phase, where we call effects that read { markLayoutEffectsStarted(lanes); } commitLayoutEffects(finishedWork, root, lanes); { markLayoutEffectsStopped(); } // opportunity to paint. requestPaint(); executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value. setCurrentUpdatePriority(previousPriority); ReactCurrentBatchConfig$3.transition = prevTransition; } else { // No effects. root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were // no effects. // TODO: Maybe there's a better way to report this. { recordCommitTime(); } } var rootDidHavePassiveEffects = rootDoesHavePassiveEffects; if (rootDoesHavePassiveEffects) { // This commit has passive effects. Stash a reference to them. But don't // schedule a callback until after flushing layout work. rootDoesHavePassiveEffects = false; rootWithPendingPassiveEffects = root; pendingPassiveEffectsLanes = lanes; } else { { nestedPassiveUpdateCount = 0; rootWithPassiveNestedUpdates = null; } } // Read this again, since an effect might have updated it remainingLanes = root.pendingLanes; // Check if there's remaining work on this root // TODO: This is part of the `componentDidCatch` implementation. Its purpose // is to detect whether something might have called setState inside // `componentDidCatch`. The mechanism is known to be flawed because `setState` // inside `componentDidCatch` is itself flawed — that's why we recommend // `getDerivedStateFromError` instead. However, it could be improved by // checking if remainingLanes includes Sync work, instead of whether there's // any work remaining at all (which would also include stuff like Suspense // retries or transitions). It's been like this for a while, though, so fixing // it probably isn't that urgent. if (remainingLanes === NoLanes) { // If there's no remaining work, we can clear the set of already failed // error boundaries. legacyErrorBoundariesThatAlreadyFailed = null; } { if (!rootDidHavePassiveEffects) { commitDoubleInvokeEffectsInDEV(root.current, false); } } onCommitRoot(finishedWork.stateNode, renderPriorityLevel); { if (isDevToolsPresent) { root.memoizedUpdaters.clear(); } } { onCommitRoot$1(); } // Always call this before exiting `commitRoot`, to ensure that any // additional work on this root is scheduled. ensureRootIsScheduled(root, now()); if (recoverableErrors !== null) { // There were errors during this render, but recovered from them without // needing to surface it to the UI. We log them here. var onRecoverableError = root.onRecoverableError; for (var i = 0; i < recoverableErrors.length; i++) { var recoverableError = recoverableErrors[i]; var componentStack = recoverableError.stack; var digest = recoverableError.digest; onRecoverableError(recoverableError.value, { componentStack: componentStack, digest: digest }); } } if (hasUncaughtError) { hasUncaughtError = false; var error$1 = firstUncaughtError; firstUncaughtError = null; throw error$1; } // If the passive effects are the result of a discrete render, flush them // synchronously at the end of the current task so that the result is // immediately observable. Otherwise, we assume that they are not // order-dependent and do not need to be observed by external systems, so we // can wait until after paint. // TODO: We can optimize this by not scheduling the callback earlier. Since we // currently schedule the callback in multiple places, will wait until those // are consolidated. if (includesSomeLane(pendingPassiveEffectsLanes, SyncLane) && root.tag !== LegacyRoot) { flushPassiveEffects(); } // Read this again, since a passive effect might have updated it remainingLanes = root.pendingLanes; if (includesSomeLane(remainingLanes, SyncLane)) { { markNestedUpdateScheduled(); } // Count the number of times the root synchronously re-renders without // finishing. If there are too many, it indicates an infinite update loop. if (root === rootWithNestedUpdates) { nestedUpdateCount++; } else { nestedUpdateCount = 0; rootWithNestedUpdates = root; } } else { nestedUpdateCount = 0; } // If layout work was scheduled, flush it now. flushSyncCallbacks(); { markCommitStopped(); } return null; } function flushPassiveEffects() { // Returns whether passive effects were flushed. // TODO: Combine this check with the one in flushPassiveEFfectsImpl. We should // probably just combine the two functions. I believe they were only separate // in the first place because we used to wrap it with // `Scheduler.runWithPriority`, which accepts a function. But now we track the // priority within React itself, so we can mutate the variable directly. if (rootWithPendingPassiveEffects !== null) { var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); var priority = lowerEventPriority(DefaultEventPriority, renderPriority); var prevTransition = ReactCurrentBatchConfig$3.transition; var previousPriority = getCurrentUpdatePriority(); try { ReactCurrentBatchConfig$3.transition = null; setCurrentUpdatePriority(priority); return flushPassiveEffectsImpl(); } finally { setCurrentUpdatePriority(previousPriority); ReactCurrentBatchConfig$3.transition = prevTransition; // Once passive effects have run for the tree - giving components a } } return false; } function enqueuePendingPassiveProfilerEffect(fiber) { { pendingPassiveProfilerEffects.push(fiber); if (!rootDoesHavePassiveEffects) { rootDoesHavePassiveEffects = true; scheduleCallback$1(NormalPriority, function () { flushPassiveEffects(); return null; }); } } } function flushPassiveEffectsImpl() { if (rootWithPendingPassiveEffects === null) { return false; } // Cache and clear the transitions flag var transitions = pendingPassiveTransitions; pendingPassiveTransitions = null; var root = rootWithPendingPassiveEffects; var lanes = pendingPassiveEffectsLanes; rootWithPendingPassiveEffects = null; // TODO: This is sometimes out of sync with rootWithPendingPassiveEffects. // Figure out why and fix it. It's not causing any known issues (probably // because it's only used for profiling), but it's a refactor hazard. pendingPassiveEffectsLanes = NoLanes; if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { throw new Error('Cannot flush passive effects while already rendering.'); } { isFlushingPassiveEffects = true; didScheduleUpdateDuringPassiveEffects = false; } { markPassiveEffectsStarted(lanes); } var prevExecutionContext = executionContext; executionContext |= CommitContext; commitPassiveUnmountEffects(root.current); commitPassiveMountEffects(root, root.current, lanes, transitions); // TODO: Move to commitPassiveMountEffects { var profilerEffects = pendingPassiveProfilerEffects; pendingPassiveProfilerEffects = []; for (var i = 0; i < profilerEffects.length; i++) { var _fiber = profilerEffects[i]; commitPassiveEffectDurations(root, _fiber); } } { markPassiveEffectsStopped(); } { commitDoubleInvokeEffectsInDEV(root.current, true); } executionContext = prevExecutionContext; flushSyncCallbacks(); { // If additional passive effects were scheduled, increment a counter. If this // exceeds the limit, we'll fire a warning. if (didScheduleUpdateDuringPassiveEffects) { if (root === rootWithPassiveNestedUpdates) { nestedPassiveUpdateCount++; } else { nestedPassiveUpdateCount = 0; rootWithPassiveNestedUpdates = root; } } else { nestedPassiveUpdateCount = 0; } isFlushingPassiveEffects = false; didScheduleUpdateDuringPassiveEffects = false; } // TODO: Move to commitPassiveMountEffects onPostCommitRoot(root); { var stateNode = root.current.stateNode; stateNode.effectDuration = 0; stateNode.passiveEffectDuration = 0; } return true; } function isAlreadyFailedLegacyErrorBoundary(instance) { return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance); } function markLegacyErrorBoundaryAsFailed(instance) { if (legacyErrorBoundariesThatAlreadyFailed === null) { legacyErrorBoundariesThatAlreadyFailed = new Set([instance]); } else { legacyErrorBoundariesThatAlreadyFailed.add(instance); } } function prepareToThrowUncaughtError(error) { if (!hasUncaughtError) { hasUncaughtError = true; firstUncaughtError = error; } } var onUncaughtError = prepareToThrowUncaughtError; function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { var errorInfo = createCapturedValueAtFiber(error, sourceFiber); var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane); var root = enqueueUpdate(rootFiber, update, SyncLane); var eventTime = requestEventTime(); if (root !== null) { markRootUpdated(root, SyncLane, eventTime); ensureRootIsScheduled(root, eventTime); } } function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) { { reportUncaughtErrorInDEV(error$1); setIsRunningInsertionEffect(false); } if (sourceFiber.tag === HostRoot) { // Error was thrown at the root. There is no parent, so the root // itself should capture it. captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error$1); return; } var fiber = null; { fiber = nearestMountedAncestor; } while (fiber !== null) { if (fiber.tag === HostRoot) { captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error$1); return; } else if (fiber.tag === ClassComponent) { var ctor = fiber.type; var instance = fiber.stateNode; if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) { var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber); var update = createClassErrorUpdate(fiber, errorInfo, SyncLane); var root = enqueueUpdate(fiber, update, SyncLane); var eventTime = requestEventTime(); if (root !== null) { markRootUpdated(root, SyncLane, eventTime); ensureRootIsScheduled(root, eventTime); } return; } } fiber = fiber.return; } { // TODO: Until we re-land skipUnmountedBoundaries (see #20147), this warning // will fire for errors that are thrown by destroy functions inside deleted // trees. What it should instead do is propagate the error to the parent of // the deleted tree. In the meantime, do not add this warning to the // allowlist; this is only for our internal use. error('Internal React error: Attempted to capture a commit phase error ' + 'inside a detached tree. This indicates a bug in React. Likely ' + 'causes include deleting the same fiber more than once, committing an ' + 'already-finished tree, or an inconsistent return pointer.\n\n' + 'Error message:\n\n%s', error$1); } } function pingSuspendedRoot(root, wakeable, pingedLanes) { var pingCache = root.pingCache; if (pingCache !== null) { // The wakeable resolved, so we no longer need to memoize, because it will // never be thrown again. pingCache.delete(wakeable); } var eventTime = requestEventTime(); markRootPinged(root, pingedLanes); warnIfSuspenseResolutionNotWrappedWithActDEV(root); if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) { // Received a ping at the same priority level at which we're currently // rendering. We might want to restart this render. This should mirror // the logic of whether or not a root suspends once it completes. // TODO: If we're rendering sync either due to Sync, Batched or expired, // we should probably never restart. // If we're suspended with delay, or if it's a retry, we'll always suspend // so we can always restart. if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) { // Restart from the root. prepareFreshStack(root, NoLanes); } else { // Even though we can't restart right now, we might get an // opportunity later. So we mark this render as having a ping. workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes); } } ensureRootIsScheduled(root, eventTime); } function retryTimedOutBoundary(boundaryFiber, retryLane) { // The boundary fiber (a Suspense component or SuspenseList component) // previously was rendered in its fallback state. One of the promises that // suspended it has resolved, which means at least part of the tree was // likely unblocked. Try rendering again, at a new lanes. if (retryLane === NoLane) { // TODO: Assign this to `suspenseState.retryLane`? to avoid // unnecessary entanglement? retryLane = requestRetryLane(boundaryFiber); } // TODO: Special case idle priority? var eventTime = requestEventTime(); var root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); if (root !== null) { markRootUpdated(root, retryLane, eventTime); ensureRootIsScheduled(root, eventTime); } } function retryDehydratedSuspenseBoundary(boundaryFiber) { var suspenseState = boundaryFiber.memoizedState; var retryLane = NoLane; if (suspenseState !== null) { retryLane = suspenseState.retryLane; } retryTimedOutBoundary(boundaryFiber, retryLane); } function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = NoLane; // Default var retryCache; switch (boundaryFiber.tag) { case SuspenseComponent: retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; if (suspenseState !== null) { retryLane = suspenseState.retryLane; } break; case SuspenseListComponent: retryCache = boundaryFiber.stateNode; break; default: throw new Error('Pinged unknown suspense boundary type. ' + 'This is probably a bug in React.'); } if (retryCache !== null) { // The wakeable resolved, so we no longer need to memoize, because it will // never be thrown again. retryCache.delete(wakeable); } retryTimedOutBoundary(boundaryFiber, retryLane); } // Computes the next Just Noticeable Difference (JND) boundary. // The theory is that a person can't tell the difference between small differences in time. // Therefore, if we wait a bit longer than necessary that won't translate to a noticeable // difference in the experience. However, waiting for longer might mean that we can avoid // showing an intermediate loading state. The longer we have already waited, the harder it // is to tell small differences in time. Therefore, the longer we've already waited, // the longer we can wait additionally. At some point we have to give up though. // We pick a train model where the next boundary commits at a consistent schedule. // These particular numbers are vague estimates. We expect to adjust them based on research. function jnd(timeElapsed) { return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960; } function checkForNestedUpdates() { if (nestedUpdateCount > NESTED_UPDATE_LIMIT) { nestedUpdateCount = 0; rootWithNestedUpdates = null; throw new Error('Maximum update depth exceeded. This can happen when a component ' + 'repeatedly calls setState inside componentWillUpdate or ' + 'componentDidUpdate. React limits the number of nested updates to ' + 'prevent infinite loops.'); } { if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) { nestedPassiveUpdateCount = 0; rootWithPassiveNestedUpdates = null; error('Maximum update depth exceeded. This can happen when a component ' + "calls setState inside useEffect, but useEffect either doesn't " + 'have a dependency array, or one of the dependencies changes on ' + 'every render.'); } } } function flushRenderPhaseStrictModeWarningsInDEV() { { ReactStrictModeWarnings.flushLegacyContextWarning(); { ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); } } } function commitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) { { // TODO (StrictEffects) Should we set a marker on the root if it contains strict effects // so we don't traverse unnecessarily? similar to subtreeFlags but just at the root level. // Maybe not a big deal since this is DEV only behavior. setCurrentFiber(fiber); invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectUnmountInDEV); if (hasPassiveEffects) { invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectUnmountInDEV); } invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectMountInDEV); if (hasPassiveEffects) { invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectMountInDEV); } resetCurrentFiber(); } } function invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) { { // We don't need to re-check StrictEffectsMode here. // This function is only called if that check has already passed. var current = firstChild; var subtreeRoot = null; while (current !== null) { var primarySubtreeFlag = current.subtreeFlags & fiberFlags; if (current !== subtreeRoot && current.child !== null && primarySubtreeFlag !== NoFlags) { current = current.child; } else { if ((current.flags & fiberFlags) !== NoFlags) { invokeEffectFn(current); } if (current.sibling !== null) { current = current.sibling; } else { current = subtreeRoot = current.return; } } } } } var didWarnStateUpdateForNotYetMountedComponent = null; function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) { { if ((executionContext & RenderContext) !== NoContext) { // We let the other warning about render phase updates deal with this one. return; } if (!(fiber.mode & ConcurrentMode)) { return; } var tag = fiber.tag; if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent) { // Only warn for user-defined components, not internal ones like Suspense. return; } // We show the whole stack but dedupe on the top component's name because // the problematic code almost always lies inside that component. var componentName = getComponentNameFromFiber(fiber) || 'ReactComponent'; if (didWarnStateUpdateForNotYetMountedComponent !== null) { if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) { return; } didWarnStateUpdateForNotYetMountedComponent.add(componentName); } else { didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]); } var previousFiber = current; try { setCurrentFiber(fiber); error("Can't perform a React state update on a component that hasn't mounted yet. " + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.'); } finally { if (previousFiber) { setCurrentFiber(fiber); } else { resetCurrentFiber(); } } } } var beginWork$1; { var dummyFiber = null; beginWork$1 = function (current, unitOfWork, lanes) { // If a component throws an error, we replay it again in a synchronously // dispatched event, so that the debugger will treat it as an uncaught // error See ReactErrorUtils for more information. // Before entering the begin phase, copy the work-in-progress onto a dummy // fiber. If beginWork throws, we'll use this to reset the state. var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork); try { return beginWork(current, unitOfWork, lanes); } catch (originalError) { if (didSuspendOrErrorWhileHydratingDEV() || originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') { // Don't replay promises. // Don't replay errors if we are hydrating and have already suspended or handled an error throw originalError; } // Keep this code in sync with handleError; any changes here must have // corresponding changes there. resetContextDependencies(); resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the // same fiber again. // Unwind the failed stack frame unwindInterruptedWork(current, unitOfWork); // Restore the original properties of the fiber. assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy); if ( unitOfWork.mode & ProfileMode) { // Reset the profiler timer. startProfilerTimer(unitOfWork); } // Run beginWork again. invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes); if (hasCaughtError()) { var replayError = clearCaughtError(); if (typeof replayError === 'object' && replayError !== null && replayError._suppressLogging && typeof originalError === 'object' && originalError !== null && !originalError._suppressLogging) { // If suppressed, let the flag carry over to the original error which is the one we'll rethrow. originalError._suppressLogging = true; } } // We always throw the original error in case the second render pass is not idempotent. // This can happen if a memoized function or CommonJS module doesn't throw after first invocation. throw originalError; } }; } var didWarnAboutUpdateInRender = false; var didWarnAboutUpdateInRenderForAnotherComponent; { didWarnAboutUpdateInRenderForAnotherComponent = new Set(); } function warnAboutRenderPhaseUpdatesInDEV(fiber) { { if (isRendering && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) { switch (fiber.tag) { case FunctionComponent: case ForwardRef: case SimpleMemoComponent: { var renderingComponentName = workInProgress && getComponentNameFromFiber(workInProgress) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed. var dedupeKey = renderingComponentName; if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) { didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey); var setStateComponentName = getComponentNameFromFiber(fiber) || 'Unknown'; error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName); } break; } case ClassComponent: { if (!didWarnAboutUpdateInRender) { error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.'); didWarnAboutUpdateInRender = true; } break; } } } } } function restorePendingUpdaters(root, lanes) { { if (isDevToolsPresent) { var memoizedUpdaters = root.memoizedUpdaters; memoizedUpdaters.forEach(function (schedulingFiber) { addFiberToLanesMap(root, schedulingFiber, lanes); }); // This function intentionally does not clear memoized updaters. // Those may still be relevant to the current commit // and a future one (e.g. Suspense). } } } var fakeActCallbackNode = {}; function scheduleCallback$1(priorityLevel, callback) { { // If we're currently inside an `act` scope, bypass Scheduler and push to // the `act` queue instead. var actQueue = ReactCurrentActQueue$1.current; if (actQueue !== null) { actQueue.push(callback); return fakeActCallbackNode; } else { return scheduleCallback(priorityLevel, callback); } } } function cancelCallback$1(callbackNode) { if ( callbackNode === fakeActCallbackNode) { return; } // In production, always call Scheduler. This function will be stripped out. return cancelCallback(callbackNode); } function shouldForceFlushFallbacksInDEV() { // Never force flush in production. This function should get stripped out. return ReactCurrentActQueue$1.current !== null; } function warnIfUpdatesNotWrappedWithActDEV(fiber) { { if (fiber.mode & ConcurrentMode) { if (!isConcurrentActEnvironment()) { // Not in an act environment. No need to warn. return; } } else { // Legacy mode has additional cases where we suppress a warning. if (!isLegacyActEnvironment()) { // Not in an act environment. No need to warn. return; } if (executionContext !== NoContext) { // Legacy mode doesn't warn if the update is batched, i.e. // batchedUpdates or flushSync. return; } if (fiber.tag !== FunctionComponent && fiber.tag !== ForwardRef && fiber.tag !== SimpleMemoComponent) { // For backwards compatibility with pre-hooks code, legacy mode only // warns for updates that originate from a hook. return; } } if (ReactCurrentActQueue$1.current === null) { var previousFiber = current; try { setCurrentFiber(fiber); error('An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentNameFromFiber(fiber)); } finally { if (previousFiber) { setCurrentFiber(fiber); } else { resetCurrentFiber(); } } } } } function warnIfSuspenseResolutionNotWrappedWithActDEV(root) { { if (root.tag !== LegacyRoot && isConcurrentActEnvironment() && ReactCurrentActQueue$1.current === null) { error('A suspended resource finished loading inside a test, but the event ' + 'was not wrapped in act(...).\n\n' + 'When testing, code that resolves suspended data should be wrapped ' + 'into act(...):\n\n' + 'act(() => {\n' + ' /* finish loading suspended data */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act'); } } } function setIsRunningInsertionEffect(isRunning) { { isRunningInsertionEffect = isRunning; } } /* eslint-disable react-internal/prod-error-codes */ var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below. var failedBoundaries = null; var setRefreshHandler = function (handler) { { resolveFamily = handler; } }; function resolveFunctionForHotReloading(type) { { if (resolveFamily === null) { // Hot reloading is disabled. return type; } var family = resolveFamily(type); if (family === undefined) { return type; } // Use the latest known implementation. return family.current; } } function resolveClassForHotReloading(type) { // No implementation differences. return resolveFunctionForHotReloading(type); } function resolveForwardRefForHotReloading(type) { { if (resolveFamily === null) { // Hot reloading is disabled. return type; } var family = resolveFamily(type); if (family === undefined) { // Check if we're dealing with a real forwardRef. Don't want to crash early. if (type !== null && type !== undefined && typeof type.render === 'function') { // ForwardRef is special because its resolved .type is an object, // but it's possible that we only have its inner render function in the map. // If that inner render function is different, we'll build a new forwardRef type. var currentRender = resolveFunctionForHotReloading(type.render); if (type.render !== currentRender) { var syntheticType = { $$typeof: REACT_FORWARD_REF_TYPE, render: currentRender }; if (type.displayName !== undefined) { syntheticType.displayName = type.displayName; } return syntheticType; } } return type; } // Use the latest known implementation. return family.current; } } function isCompatibleFamilyForHotReloading(fiber, element) { { if (resolveFamily === null) { // Hot reloading is disabled. return false; } var prevType = fiber.elementType; var nextType = element.type; // If we got here, we know types aren't === equal. var needsCompareFamilies = false; var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null; switch (fiber.tag) { case ClassComponent: { if (typeof nextType === 'function') { needsCompareFamilies = true; } break; } case FunctionComponent: { if (typeof nextType === 'function') { needsCompareFamilies = true; } else if ($$typeofNextType === REACT_LAZY_TYPE) { // We don't know the inner type yet. // We're going to assume that the lazy inner type is stable, // and so it is sufficient to avoid reconciling it away. // We're not going to unwrap or actually use the new lazy type. needsCompareFamilies = true; } break; } case ForwardRef: { if ($$typeofNextType === REACT_FORWARD_REF_TYPE) { needsCompareFamilies = true; } else if ($$typeofNextType === REACT_LAZY_TYPE) { needsCompareFamilies = true; } break; } case MemoComponent: case SimpleMemoComponent: { if ($$typeofNextType === REACT_MEMO_TYPE) { // TODO: if it was but can no longer be simple, // we shouldn't set this. needsCompareFamilies = true; } else if ($$typeofNextType === REACT_LAZY_TYPE) { needsCompareFamilies = true; } break; } default: return false; } // Check if both types have a family and it's the same one. if (needsCompareFamilies) { // Note: memo() and forwardRef() we'll compare outer rather than inner type. // This means both of them need to be registered to preserve state. // If we unwrapped and compared the inner types for wrappers instead, // then we would risk falsely saying two separate memo(Foo) // calls are equivalent because they wrap the same Foo function. var prevFamily = resolveFamily(prevType); if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) { return true; } } return false; } } function markFailedErrorBoundaryForHotReloading(fiber) { { if (resolveFamily === null) { // Hot reloading is disabled. return; } if (typeof WeakSet !== 'function') { return; } if (failedBoundaries === null) { failedBoundaries = new WeakSet(); } failedBoundaries.add(fiber); } } var scheduleRefresh = function (root, update) { { if (resolveFamily === null) { // Hot reloading is disabled. return; } var staleFamilies = update.staleFamilies, updatedFamilies = update.updatedFamilies; flushPassiveEffects(); flushSync(function () { scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies); }); } }; var scheduleRoot = function (root, element) { { if (root.context !== emptyContextObject) { // Super edge case: root has a legacy _renderSubtree context // but we don't know the parentComponent so we can't pass it. // Just ignore. We'll delete this with _renderSubtree code path later. return; } flushPassiveEffects(); flushSync(function () { updateContainer(element, root, null, null); }); } }; function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) { { var alternate = fiber.alternate, child = fiber.child, sibling = fiber.sibling, tag = fiber.tag, type = fiber.type; var candidateType = null; switch (tag) { case FunctionComponent: case SimpleMemoComponent: case ClassComponent: candidateType = type; break; case ForwardRef: candidateType = type.render; break; } if (resolveFamily === null) { throw new Error('Expected resolveFamily to be set during hot reload.'); } var needsRender = false; var needsRemount = false; if (candidateType !== null) { var family = resolveFamily(candidateType); if (family !== undefined) { if (staleFamilies.has(family)) { needsRemount = true; } else if (updatedFamilies.has(family)) { if (tag === ClassComponent) { needsRemount = true; } else { needsRender = true; } } } } if (failedBoundaries !== null) { if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) { needsRemount = true; } } if (needsRemount) { fiber._debugNeedsRemount = true; } if (needsRemount || needsRender) { var _root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (_root !== null) { scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp); } } if (child !== null && !needsRemount) { scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies); } if (sibling !== null) { scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies); } } } var findHostInstancesForRefresh = function (root, families) { { var hostInstances = new Set(); var types = new Set(families.map(function (family) { return family.current; })); findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances); return hostInstances; } }; function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) { { var child = fiber.child, sibling = fiber.sibling, tag = fiber.tag, type = fiber.type; var candidateType = null; switch (tag) { case FunctionComponent: case SimpleMemoComponent: case ClassComponent: candidateType = type; break; case ForwardRef: candidateType = type.render; break; } var didMatch = false; if (candidateType !== null) { if (types.has(candidateType)) { didMatch = true; } } if (didMatch) { // We have a match. This only drills down to the closest host components. // There's no need to search deeper because for the purpose of giving // visual feedback, "flashing" outermost parent rectangles is sufficient. findHostInstancesForFiberShallowly(fiber, hostInstances); } else { // If there's no match, maybe there will be one further down in the child tree. if (child !== null) { findHostInstancesForMatchingFibersRecursively(child, types, hostInstances); } } if (sibling !== null) { findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances); } } } function findHostInstancesForFiberShallowly(fiber, hostInstances) { { var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances); if (foundHostInstances) { return; } // If we didn't find any host children, fallback to closest host parent. var node = fiber; while (true) { switch (node.tag) { case HostComponent: hostInstances.add(node.stateNode); return; case HostPortal: hostInstances.add(node.stateNode.containerInfo); return; case HostRoot: hostInstances.add(node.stateNode.containerInfo); return; } if (node.return === null) { throw new Error('Expected to reach root first.'); } node = node.return; } } } function findChildHostInstancesForFiberShallowly(fiber, hostInstances) { { var node = fiber; var foundHostInstances = false; while (true) { if (node.tag === HostComponent) { // We got a match. foundHostInstances = true; hostInstances.add(node.stateNode); // There may still be more, so keep searching. } else if (node.child !== null) { node.child.return = node; node = node.child; continue; } if (node === fiber) { return foundHostInstances; } while (node.sibling === null) { if (node.return === null || node.return === fiber) { return foundHostInstances; } node = node.return; } node.sibling.return = node.return; node = node.sibling; } } return false; } var hasBadMapPolyfill; { hasBadMapPolyfill = false; try { var nonExtensibleObject = Object.preventExtensions({}); /* eslint-disable no-new */ new Map([[nonExtensibleObject, null]]); new Set([nonExtensibleObject]); /* eslint-enable no-new */ } catch (e) { // TODO: Consider warning about bad polyfills hasBadMapPolyfill = true; } } function FiberNode(tag, pendingProps, key, mode) { // Instance this.tag = tag; this.key = key; this.elementType = null; this.type = null; this.stateNode = null; // Fiber this.return = null; this.child = null; this.sibling = null; this.index = 0; this.ref = null; this.pendingProps = pendingProps; this.memoizedProps = null; this.updateQueue = null; this.memoizedState = null; this.dependencies = null; this.mode = mode; // Effects this.flags = NoFlags; this.subtreeFlags = NoFlags; this.deletions = null; this.lanes = NoLanes; this.childLanes = NoLanes; this.alternate = null; { // Note: The following is done to avoid a v8 performance cliff. // // Initializing the fields below to smis and later updating them with // double values will cause Fibers to end up having separate shapes. // This behavior/bug has something to do with Object.preventExtension(). // Fortunately this only impacts DEV builds. // Unfortunately it makes React unusably slow for some applications. // To work around this, initialize the fields below with doubles. // // Learn more about this here: // https://github.com/facebook/react/issues/14365 // https://bugs.chromium.org/p/v8/issues/detail?id=8538 this.actualDuration = Number.NaN; this.actualStartTime = Number.NaN; this.selfBaseDuration = Number.NaN; this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization. // This won't trigger the performance cliff mentioned above, // and it simplifies other profiler code (including DevTools). this.actualDuration = 0; this.actualStartTime = -1; this.selfBaseDuration = 0; this.treeBaseDuration = 0; } { // This isn't directly used but is handy for debugging internals: this._debugSource = null; this._debugOwner = null; this._debugNeedsRemount = false; this._debugHookTypes = null; if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') { Object.preventExtensions(this); } } } // This is a constructor function, rather than a POJO constructor, still // please ensure we do the following: // 1) Nobody should add any instance methods on this. Instance methods can be // more difficult to predict when they get optimized and they are almost // never inlined properly in static compilers. // 2) Nobody should rely on `instanceof Fiber` for type testing. We should // always know when it is a fiber. // 3) We might want to experiment with using numeric keys since they are easier // to optimize in a non-JIT environment. // 4) We can easily go from a constructor to a createFiber object literal if that // is faster. // 5) It should be easy to port this to a C struct and keep a C implementation // compatible. var createFiber = function (tag, pendingProps, key, mode) { // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors return new FiberNode(tag, pendingProps, key, mode); }; function shouldConstruct$1(Component) { var prototype = Component.prototype; return !!(prototype && prototype.isReactComponent); } function isSimpleFunctionComponent(type) { return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined; } function resolveLazyComponentTag(Component) { if (typeof Component === 'function') { return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent; } else if (Component !== undefined && Component !== null) { var $$typeof = Component.$$typeof; if ($$typeof === REACT_FORWARD_REF_TYPE) { return ForwardRef; } if ($$typeof === REACT_MEMO_TYPE) { return MemoComponent; } } return IndeterminateComponent; } // This is used to create an alternate fiber to do work on. function createWorkInProgress(current, pendingProps) { var workInProgress = current.alternate; if (workInProgress === null) { // We use a double buffering pooling technique because we know that we'll // only ever need at most two versions of a tree. We pool the "other" unused // node that we're free to reuse. This is lazily created to avoid allocating // extra objects for things that are never updated. It also allow us to // reclaim the extra memory if needed. workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode); workInProgress.elementType = current.elementType; workInProgress.type = current.type; workInProgress.stateNode = current.stateNode; { // DEV-only fields workInProgress._debugSource = current._debugSource; workInProgress._debugOwner = current._debugOwner; workInProgress._debugHookTypes = current._debugHookTypes; } workInProgress.alternate = current; current.alternate = workInProgress; } else { workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type. workInProgress.type = current.type; // We already have an alternate. // Reset the effect tag. workInProgress.flags = NoFlags; // The effects are no longer valid. workInProgress.subtreeFlags = NoFlags; workInProgress.deletions = null; { // We intentionally reset, rather than copy, actualDuration & actualStartTime. // This prevents time from endlessly accumulating in new commits. // This has the downside of resetting values for different priority renders, // But works for yielding (the common case) and should support resuming. workInProgress.actualDuration = 0; workInProgress.actualStartTime = -1; } } // Reset all effects except static ones. // Static effects are not specific to a render. workInProgress.flags = current.flags & StaticMask; workInProgress.childLanes = current.childLanes; workInProgress.lanes = current.lanes; workInProgress.child = current.child; workInProgress.memoizedProps = current.memoizedProps; workInProgress.memoizedState = current.memoizedState; workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so // it cannot be shared with the current fiber. var currentDependencies = current.dependencies; workInProgress.dependencies = currentDependencies === null ? null : { lanes: currentDependencies.lanes, firstContext: currentDependencies.firstContext }; // These will be overridden during the parent's reconciliation workInProgress.sibling = current.sibling; workInProgress.index = current.index; workInProgress.ref = current.ref; { workInProgress.selfBaseDuration = current.selfBaseDuration; workInProgress.treeBaseDuration = current.treeBaseDuration; } { workInProgress._debugNeedsRemount = current._debugNeedsRemount; switch (workInProgress.tag) { case IndeterminateComponent: case FunctionComponent: case SimpleMemoComponent: workInProgress.type = resolveFunctionForHotReloading(current.type); break; case ClassComponent: workInProgress.type = resolveClassForHotReloading(current.type); break; case ForwardRef: workInProgress.type = resolveForwardRefForHotReloading(current.type); break; } } return workInProgress; } // Used to reuse a Fiber for a second pass. function resetWorkInProgress(workInProgress, renderLanes) { // This resets the Fiber to what createFiber or createWorkInProgress would // have set the values to before during the first pass. Ideally this wouldn't // be necessary but unfortunately many code paths reads from the workInProgress // when they should be reading from current and writing to workInProgress. // We assume pendingProps, index, key, ref, return are still untouched to // avoid doing another reconciliation. // Reset the effect flags but keep any Placement tags, since that's something // that child fiber is setting, not the reconciliation. workInProgress.flags &= StaticMask | Placement; // The effects are no longer valid. var current = workInProgress.alternate; if (current === null) { // Reset to createFiber's initial values. workInProgress.childLanes = NoLanes; workInProgress.lanes = renderLanes; workInProgress.child = null; workInProgress.subtreeFlags = NoFlags; workInProgress.memoizedProps = null; workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.dependencies = null; workInProgress.stateNode = null; { // Note: We don't reset the actualTime counts. It's useful to accumulate // actual time across multiple render passes. workInProgress.selfBaseDuration = 0; workInProgress.treeBaseDuration = 0; } } else { // Reset to the cloned values that createWorkInProgress would've. workInProgress.childLanes = current.childLanes; workInProgress.lanes = current.lanes; workInProgress.child = current.child; workInProgress.subtreeFlags = NoFlags; workInProgress.deletions = null; workInProgress.memoizedProps = current.memoizedProps; workInProgress.memoizedState = current.memoizedState; workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type. workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so // it cannot be shared with the current fiber. var currentDependencies = current.dependencies; workInProgress.dependencies = currentDependencies === null ? null : { lanes: currentDependencies.lanes, firstContext: currentDependencies.firstContext }; { // Note: We don't reset the actualTime counts. It's useful to accumulate // actual time across multiple render passes. workInProgress.selfBaseDuration = current.selfBaseDuration; workInProgress.treeBaseDuration = current.treeBaseDuration; } } return workInProgress; } function createHostRootFiber(tag, isStrictMode, concurrentUpdatesByDefaultOverride) { var mode; if (tag === ConcurrentRoot) { mode = ConcurrentMode; if (isStrictMode === true) { mode |= StrictLegacyMode; { mode |= StrictEffectsMode; } } } else { mode = NoMode; } if ( isDevToolsPresent) { // Always collect profile timings when DevTools are present. // This enables DevTools to start capturing timing at any point– // Without some nodes in the tree having empty base times. mode |= ProfileMode; } return createFiber(HostRoot, null, null, mode); } function createFiberFromTypeAndProps(type, // React$ElementType key, pendingProps, owner, mode, lanes) { var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. var resolvedType = type; if (typeof type === 'function') { if (shouldConstruct$1(type)) { fiberTag = ClassComponent; { resolvedType = resolveClassForHotReloading(resolvedType); } } else { { resolvedType = resolveFunctionForHotReloading(resolvedType); } } } else if (typeof type === 'string') { fiberTag = HostComponent; } else { getTag: switch (type) { case REACT_FRAGMENT_TYPE: return createFiberFromFragment(pendingProps.children, mode, lanes, key); case REACT_STRICT_MODE_TYPE: fiberTag = Mode; mode |= StrictLegacyMode; if ( (mode & ConcurrentMode) !== NoMode) { // Strict effects should never run on legacy roots mode |= StrictEffectsMode; } break; case REACT_PROFILER_TYPE: return createFiberFromProfiler(pendingProps, mode, lanes, key); case REACT_SUSPENSE_TYPE: return createFiberFromSuspense(pendingProps, mode, lanes, key); case REACT_SUSPENSE_LIST_TYPE: return createFiberFromSuspenseList(pendingProps, mode, lanes, key); case REACT_OFFSCREEN_TYPE: return createFiberFromOffscreen(pendingProps, mode, lanes, key); case REACT_LEGACY_HIDDEN_TYPE: // eslint-disable-next-line no-fallthrough case REACT_SCOPE_TYPE: // eslint-disable-next-line no-fallthrough case REACT_CACHE_TYPE: // eslint-disable-next-line no-fallthrough case REACT_TRACING_MARKER_TYPE: // eslint-disable-next-line no-fallthrough case REACT_DEBUG_TRACING_MODE_TYPE: // eslint-disable-next-line no-fallthrough default: { if (typeof type === 'object' && type !== null) { switch (type.$$typeof) { case REACT_PROVIDER_TYPE: fiberTag = ContextProvider; break getTag; case REACT_CONTEXT_TYPE: // This is a consumer fiberTag = ContextConsumer; break getTag; case REACT_FORWARD_REF_TYPE: fiberTag = ForwardRef; { resolvedType = resolveForwardRefForHotReloading(resolvedType); } break getTag; case REACT_MEMO_TYPE: fiberTag = MemoComponent; break getTag; case REACT_LAZY_TYPE: fiberTag = LazyComponent; resolvedType = null; break getTag; } } var info = ''; { if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.'; } var ownerName = owner ? getComponentNameFromFiber(owner) : null; if (ownerName) { info += '\n\nCheck the render method of `' + ownerName + '`.'; } } throw new Error('Element type is invalid: expected a string (for built-in ' + 'components) or a class/function (for composite components) ' + ("but got: " + (type == null ? type : typeof type) + "." + info)); } } } var fiber = createFiber(fiberTag, pendingProps, key, mode); fiber.elementType = type; fiber.type = resolvedType; fiber.lanes = lanes; { fiber._debugOwner = owner; } return fiber; } function createFiberFromElement(element, mode, lanes) { var owner = null; { owner = element._owner; } var type = element.type; var key = element.key; var pendingProps = element.props; var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes); { fiber._debugSource = element._source; fiber._debugOwner = element._owner; } return fiber; } function createFiberFromFragment(elements, mode, lanes, key) { var fiber = createFiber(Fragment, elements, key, mode); fiber.lanes = lanes; return fiber; } function createFiberFromProfiler(pendingProps, mode, lanes, key) { { if (typeof pendingProps.id !== 'string') { error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.', typeof pendingProps.id); } } var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); fiber.elementType = REACT_PROFILER_TYPE; fiber.lanes = lanes; { fiber.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }; } return fiber; } function createFiberFromSuspense(pendingProps, mode, lanes, key) { var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); fiber.elementType = REACT_SUSPENSE_TYPE; fiber.lanes = lanes; return fiber; } function createFiberFromSuspenseList(pendingProps, mode, lanes, key) { var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode); fiber.elementType = REACT_SUSPENSE_LIST_TYPE; fiber.lanes = lanes; return fiber; } function createFiberFromOffscreen(pendingProps, mode, lanes, key) { var fiber = createFiber(OffscreenComponent, pendingProps, key, mode); fiber.elementType = REACT_OFFSCREEN_TYPE; fiber.lanes = lanes; var primaryChildInstance = { isHidden: false }; fiber.stateNode = primaryChildInstance; return fiber; } function createFiberFromText(content, mode, lanes) { var fiber = createFiber(HostText, content, null, mode); fiber.lanes = lanes; return fiber; } function createFiberFromHostInstanceForDeletion() { var fiber = createFiber(HostComponent, null, null, NoMode); fiber.elementType = 'DELETED'; return fiber; } function createFiberFromDehydratedFragment(dehydratedNode) { var fiber = createFiber(DehydratedFragment, null, null, NoMode); fiber.stateNode = dehydratedNode; return fiber; } function createFiberFromPortal(portal, mode, lanes) { var pendingProps = portal.children !== null ? portal.children : []; var fiber = createFiber(HostPortal, pendingProps, portal.key, mode); fiber.lanes = lanes; fiber.stateNode = { containerInfo: portal.containerInfo, pendingChildren: null, // Used by persistent updates implementation: portal.implementation }; return fiber; } // Used for stashing WIP properties to replay failed work in DEV. function assignFiberPropertiesInDEV(target, source) { if (target === null) { // This Fiber's initial properties will always be overwritten. // We only use a Fiber to ensure the same hidden class so DEV isn't slow. target = createFiber(IndeterminateComponent, null, null, NoMode); } // This is intentionally written as a list of all properties. // We tried to use Object.assign() instead but this is called in // the hottest path, and Object.assign() was too slow: // https://github.com/facebook/react/issues/12502 // This code is DEV-only so size is not a concern. target.tag = source.tag; target.key = source.key; target.elementType = source.elementType; target.type = source.type; target.stateNode = source.stateNode; target.return = source.return; target.child = source.child; target.sibling = source.sibling; target.index = source.index; target.ref = source.ref; target.pendingProps = source.pendingProps; target.memoizedProps = source.memoizedProps; target.updateQueue = source.updateQueue; target.memoizedState = source.memoizedState; target.dependencies = source.dependencies; target.mode = source.mode; target.flags = source.flags; target.subtreeFlags = source.subtreeFlags; target.deletions = source.deletions; target.lanes = source.lanes; target.childLanes = source.childLanes; target.alternate = source.alternate; { target.actualDuration = source.actualDuration; target.actualStartTime = source.actualStartTime; target.selfBaseDuration = source.selfBaseDuration; target.treeBaseDuration = source.treeBaseDuration; } target._debugSource = source._debugSource; target._debugOwner = source._debugOwner; target._debugNeedsRemount = source._debugNeedsRemount; target._debugHookTypes = source._debugHookTypes; return target; } function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError) { this.tag = tag; this.containerInfo = containerInfo; this.pendingChildren = null; this.current = null; this.pingCache = null; this.finishedWork = null; this.timeoutHandle = noTimeout; this.context = null; this.pendingContext = null; this.callbackNode = null; this.callbackPriority = NoLane; this.eventTimes = createLaneMap(NoLanes); this.expirationTimes = createLaneMap(NoTimestamp); this.pendingLanes = NoLanes; this.suspendedLanes = NoLanes; this.pingedLanes = NoLanes; this.expiredLanes = NoLanes; this.mutableReadLanes = NoLanes; this.finishedLanes = NoLanes; this.entangledLanes = NoLanes; this.entanglements = createLaneMap(NoLanes); this.identifierPrefix = identifierPrefix; this.onRecoverableError = onRecoverableError; { this.mutableSourceEagerHydrationData = null; } { this.effectDuration = 0; this.passiveEffectDuration = 0; } { this.memoizedUpdaters = new Set(); var pendingUpdatersLaneMap = this.pendingUpdatersLaneMap = []; for (var _i = 0; _i < TotalLanes; _i++) { pendingUpdatersLaneMap.push(new Set()); } } { switch (tag) { case ConcurrentRoot: this._debugRootType = hydrate ? 'hydrateRoot()' : 'createRoot()'; break; case LegacyRoot: this._debugRootType = hydrate ? 'hydrate()' : 'render()'; break; } } } function createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, // TODO: We have several of these arguments that are conceptually part of the // host config, but because they are passed in at runtime, we have to thread // them through the root constructor. Perhaps we should put them all into a // single type, like a DynamicHostConfig that is defined by the renderer. identifierPrefix, onRecoverableError, transitionCallbacks) { var root = new FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError); // stateNode is any. var uninitializedFiber = createHostRootFiber(tag, isStrictMode); root.current = uninitializedFiber; uninitializedFiber.stateNode = root; { var _initialState = { element: initialChildren, isDehydrated: hydrate, cache: null, // not enabled yet transitions: null, pendingSuspenseBoundaries: null }; uninitializedFiber.memoizedState = _initialState; } initializeUpdateQueue(uninitializedFiber); return root; } var ReactVersion = '18.3.1'; function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. implementation) { var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; { checkKeyStringCoercion(key); } return { // This tag allow us to uniquely identify this as a React Portal $$typeof: REACT_PORTAL_TYPE, key: key == null ? null : '' + key, children: children, containerInfo: containerInfo, implementation: implementation }; } var didWarnAboutNestedUpdates; var didWarnAboutFindNodeInStrictMode; { didWarnAboutNestedUpdates = false; didWarnAboutFindNodeInStrictMode = {}; } function getContextForSubtree(parentComponent) { if (!parentComponent) { return emptyContextObject; } var fiber = get(parentComponent); var parentContext = findCurrentUnmaskedContext(fiber); if (fiber.tag === ClassComponent) { var Component = fiber.type; if (isContextProvider(Component)) { return processChildContext(fiber, Component, parentContext); } } return parentContext; } function findHostInstanceWithWarning(component, methodName) { { var fiber = get(component); if (fiber === undefined) { if (typeof component.render === 'function') { throw new Error('Unable to find node on an unmounted component.'); } else { var keys = Object.keys(component).join(','); throw new Error("Argument appears to not be a ReactComponent. Keys: " + keys); } } var hostFiber = findCurrentHostFiber(fiber); if (hostFiber === null) { return null; } if (hostFiber.mode & StrictLegacyMode) { var componentName = getComponentNameFromFiber(fiber) || 'Component'; if (!didWarnAboutFindNodeInStrictMode[componentName]) { didWarnAboutFindNodeInStrictMode[componentName] = true; var previousFiber = current; try { setCurrentFiber(hostFiber); if (fiber.mode & StrictLegacyMode) { error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName); } else { error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName); } } finally { // Ideally this should reset to previous but this shouldn't be called in // render and there's another warning for that anyway. if (previousFiber) { setCurrentFiber(previousFiber); } else { resetCurrentFiber(); } } } } return hostFiber.stateNode; } } function createContainer(containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) { var hydrate = false; var initialChildren = null; return createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError); } function createHydrationContainer(initialChildren, // TODO: Remove `callback` when we delete legacy mode. callback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) { var hydrate = true; var root = createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError); // TODO: Move this to FiberRoot constructor root.context = getContextForSubtree(null); // Schedule the initial render. In a hydration root, this is different from // a regular update because the initial render must match was was rendered // on the server. // NOTE: This update intentionally doesn't have a payload. We're only using // the update to schedule work on the root fiber (and, for legacy roots, to // enqueue the callback if one is provided). var current = root.current; var eventTime = requestEventTime(); var lane = requestUpdateLane(current); var update = createUpdate(eventTime, lane); update.callback = callback !== undefined && callback !== null ? callback : null; enqueueUpdate(current, update, lane); scheduleInitialHydrationOnRoot(root, lane, eventTime); return root; } function updateContainer(element, container, parentComponent, callback) { { onScheduleRoot(container, element); } var current$1 = container.current; var eventTime = requestEventTime(); var lane = requestUpdateLane(current$1); { markRenderScheduled(lane); } var context = getContextForSubtree(parentComponent); if (container.context === null) { container.context = context; } else { container.pendingContext = context; } { if (isRendering && current !== null && !didWarnAboutNestedUpdates) { didWarnAboutNestedUpdates = true; error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentNameFromFiber(current) || 'Unknown'); } } var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property // being called "element". update.payload = { element: element }; callback = callback === undefined ? null : callback; if (callback !== null) { { if (typeof callback !== 'function') { error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback); } } update.callback = callback; } var root = enqueueUpdate(current$1, update, lane); if (root !== null) { scheduleUpdateOnFiber(root, current$1, lane, eventTime); entangleTransitions(root, current$1, lane); } return lane; } function getPublicRootInstance(container) { var containerFiber = container.current; if (!containerFiber.child) { return null; } switch (containerFiber.child.tag) { case HostComponent: return getPublicInstance(containerFiber.child.stateNode); default: return containerFiber.child.stateNode; } } function attemptSynchronousHydration$1(fiber) { switch (fiber.tag) { case HostRoot: { var root = fiber.stateNode; if (isRootDehydrated(root)) { // Flush the first scheduled "update". var lanes = getHighestPriorityPendingLanes(root); flushRoot(root, lanes); } break; } case SuspenseComponent: { flushSync(function () { var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, SyncLane, eventTime); } }); // If we're still blocked after this, we need to increase // the priority of any promises resolving within this // boundary so that they next attempt also has higher pri. var retryLane = SyncLane; markRetryLaneIfNotHydrated(fiber, retryLane); break; } } } function markRetryLaneImpl(fiber, retryLane) { var suspenseState = fiber.memoizedState; if (suspenseState !== null && suspenseState.dehydrated !== null) { suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane); } } // Increases the priority of thenables when they resolve within this boundary. function markRetryLaneIfNotHydrated(fiber, retryLane) { markRetryLaneImpl(fiber, retryLane); var alternate = fiber.alternate; if (alternate) { markRetryLaneImpl(alternate, retryLane); } } function attemptContinuousHydration$1(fiber) { if (fiber.tag !== SuspenseComponent) { // We ignore HostRoots here because we can't increase // their priority and they should not suspend on I/O, // since you have to wrap anything that might suspend in // Suspense. return; } var lane = SelectiveHydrationLane; var root = enqueueConcurrentRenderForLane(fiber, lane); if (root !== null) { var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); } markRetryLaneIfNotHydrated(fiber, lane); } function attemptHydrationAtCurrentPriority$1(fiber) { if (fiber.tag !== SuspenseComponent) { // We ignore HostRoots here because we can't increase // their priority other than synchronously flush it. return; } var lane = requestUpdateLane(fiber); var root = enqueueConcurrentRenderForLane(fiber, lane); if (root !== null) { var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); } markRetryLaneIfNotHydrated(fiber, lane); } function findHostInstanceWithNoPortals(fiber) { var hostFiber = findCurrentHostFiberWithNoPortals(fiber); if (hostFiber === null) { return null; } return hostFiber.stateNode; } var shouldErrorImpl = function (fiber) { return null; }; function shouldError(fiber) { return shouldErrorImpl(fiber); } var shouldSuspendImpl = function (fiber) { return false; }; function shouldSuspend(fiber) { return shouldSuspendImpl(fiber); } var overrideHookState = null; var overrideHookStateDeletePath = null; var overrideHookStateRenamePath = null; var overrideProps = null; var overridePropsDeletePath = null; var overridePropsRenamePath = null; var scheduleUpdate = null; var setErrorHandler = null; var setSuspenseHandler = null; { var copyWithDeleteImpl = function (obj, path, index) { var key = path[index]; var updated = isArray(obj) ? obj.slice() : assign({}, obj); if (index + 1 === path.length) { if (isArray(updated)) { updated.splice(key, 1); } else { delete updated[key]; } return updated; } // $FlowFixMe number or string is fine here updated[key] = copyWithDeleteImpl(obj[key], path, index + 1); return updated; }; var copyWithDelete = function (obj, path) { return copyWithDeleteImpl(obj, path, 0); }; var copyWithRenameImpl = function (obj, oldPath, newPath, index) { var oldKey = oldPath[index]; var updated = isArray(obj) ? obj.slice() : assign({}, obj); if (index + 1 === oldPath.length) { var newKey = newPath[index]; // $FlowFixMe number or string is fine here updated[newKey] = updated[oldKey]; if (isArray(updated)) { updated.splice(oldKey, 1); } else { delete updated[oldKey]; } } else { // $FlowFixMe number or string is fine here updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here obj[oldKey], oldPath, newPath, index + 1); } return updated; }; var copyWithRename = function (obj, oldPath, newPath) { if (oldPath.length !== newPath.length) { warn('copyWithRename() expects paths of the same length'); return; } else { for (var i = 0; i < newPath.length - 1; i++) { if (oldPath[i] !== newPath[i]) { warn('copyWithRename() expects paths to be the same except for the deepest key'); return; } } } return copyWithRenameImpl(obj, oldPath, newPath, 0); }; var copyWithSetImpl = function (obj, path, index, value) { if (index >= path.length) { return value; } var key = path[index]; var updated = isArray(obj) ? obj.slice() : assign({}, obj); // $FlowFixMe number or string is fine here updated[key] = copyWithSetImpl(obj[key], path, index + 1, value); return updated; }; var copyWithSet = function (obj, path, value) { return copyWithSetImpl(obj, path, 0, value); }; var findHook = function (fiber, id) { // For now, the "id" of stateful hooks is just the stateful hook index. // This may change in the future with e.g. nested hooks. var currentHook = fiber.memoizedState; while (currentHook !== null && id > 0) { currentHook = currentHook.next; id--; } return currentHook; }; // Support DevTools editable values for useState and useReducer. overrideHookState = function (fiber, id, path, value) { var hook = findHook(fiber, id); if (hook !== null) { var newState = copyWithSet(hook.memoizedState, path, value); hook.memoizedState = newState; hook.baseState = newState; // We aren't actually adding an update to the queue, // because there is no update we can add for useReducer hooks that won't trigger an error. // (There's no appropriate action type for DevTools overrides.) // As a result though, React will see the scheduled update as a noop and bailout. // Shallow cloning props works as a workaround for now to bypass the bailout check. fiber.memoizedProps = assign({}, fiber.memoizedProps); var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); } } }; overrideHookStateDeletePath = function (fiber, id, path) { var hook = findHook(fiber, id); if (hook !== null) { var newState = copyWithDelete(hook.memoizedState, path); hook.memoizedState = newState; hook.baseState = newState; // We aren't actually adding an update to the queue, // because there is no update we can add for useReducer hooks that won't trigger an error. // (There's no appropriate action type for DevTools overrides.) // As a result though, React will see the scheduled update as a noop and bailout. // Shallow cloning props works as a workaround for now to bypass the bailout check. fiber.memoizedProps = assign({}, fiber.memoizedProps); var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); } } }; overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) { var hook = findHook(fiber, id); if (hook !== null) { var newState = copyWithRename(hook.memoizedState, oldPath, newPath); hook.memoizedState = newState; hook.baseState = newState; // We aren't actually adding an update to the queue, // because there is no update we can add for useReducer hooks that won't trigger an error. // (There's no appropriate action type for DevTools overrides.) // As a result though, React will see the scheduled update as a noop and bailout. // Shallow cloning props works as a workaround for now to bypass the bailout check. fiber.memoizedProps = assign({}, fiber.memoizedProps); var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); } } }; // Support DevTools props for function components, forwardRef, memo, host components, etc. overrideProps = function (fiber, path, value) { fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value); if (fiber.alternate) { fiber.alternate.pendingProps = fiber.pendingProps; } var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); } }; overridePropsDeletePath = function (fiber, path) { fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path); if (fiber.alternate) { fiber.alternate.pendingProps = fiber.pendingProps; } var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); } }; overridePropsRenamePath = function (fiber, oldPath, newPath) { fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath); if (fiber.alternate) { fiber.alternate.pendingProps = fiber.pendingProps; } var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); } }; scheduleUpdate = function (fiber) { var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); } }; setErrorHandler = function (newShouldErrorImpl) { shouldErrorImpl = newShouldErrorImpl; }; setSuspenseHandler = function (newShouldSuspendImpl) { shouldSuspendImpl = newShouldSuspendImpl; }; } function findHostInstanceByFiber(fiber) { var hostFiber = findCurrentHostFiber(fiber); if (hostFiber === null) { return null; } return hostFiber.stateNode; } function emptyFindFiberByHostInstance(instance) { return null; } function getCurrentFiberForDevTools() { return current; } function injectIntoDevTools(devToolsConfig) { var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; return injectInternals({ bundleType: devToolsConfig.bundleType, version: devToolsConfig.version, rendererPackageName: devToolsConfig.rendererPackageName, rendererConfig: devToolsConfig.rendererConfig, overrideHookState: overrideHookState, overrideHookStateDeletePath: overrideHookStateDeletePath, overrideHookStateRenamePath: overrideHookStateRenamePath, overrideProps: overrideProps, overridePropsDeletePath: overridePropsDeletePath, overridePropsRenamePath: overridePropsRenamePath, setErrorHandler: setErrorHandler, setSuspenseHandler: setSuspenseHandler, scheduleUpdate: scheduleUpdate, currentDispatcherRef: ReactCurrentDispatcher, findHostInstanceByFiber: findHostInstanceByFiber, findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance, // React Refresh findHostInstancesForRefresh: findHostInstancesForRefresh , scheduleRefresh: scheduleRefresh , scheduleRoot: scheduleRoot , setRefreshHandler: setRefreshHandler , // Enables DevTools to append owner stacks to error messages in DEV mode. getCurrentFiber: getCurrentFiberForDevTools , // Enables DevTools to detect reconciler version rather than renderer version // which may not match for third party renderers. reconcilerVersion: ReactVersion }); } /* global reportError */ var defaultOnRecoverableError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event, // emulating an uncaught JavaScript error. reportError : function (error) { // In older browsers and test environments, fallback to console.error. // eslint-disable-next-line react-internal/no-production-logging console['error'](error); }; function ReactDOMRoot(internalRoot) { this._internalRoot = internalRoot; } ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function (children) { var root = this._internalRoot; if (root === null) { throw new Error('Cannot update an unmounted root.'); } { if (typeof arguments[1] === 'function') { error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().'); } else if (isValidContainer(arguments[1])) { error('You passed a container to the second argument of root.render(...). ' + "You don't need to pass it again since you already passed it to create the root."); } else if (typeof arguments[1] !== 'undefined') { error('You passed a second argument to root.render(...) but it only accepts ' + 'one argument.'); } var container = root.containerInfo; if (container.nodeType !== COMMENT_NODE) { var hostInstance = findHostInstanceWithNoPortals(root.current); if (hostInstance) { if (hostInstance.parentNode !== container) { error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + "root.unmount() to empty a root's container."); } } } } updateContainer(children, root, null, null); }; ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function () { { if (typeof arguments[0] === 'function') { error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().'); } } var root = this._internalRoot; if (root !== null) { this._internalRoot = null; var container = root.containerInfo; { if (isAlreadyRendering()) { error('Attempted to synchronously unmount a root while React was already ' + 'rendering. React cannot finish unmounting the root until the ' + 'current render has completed, which may lead to a race condition.'); } } flushSync(function () { updateContainer(null, root, null, null); }); unmarkContainerAsRoot(container); } }; function createRoot(container, options) { if (!isValidContainer(container)) { throw new Error('createRoot(...): Target container is not a DOM element.'); } warnIfReactDOMContainerInDEV(container); var isStrictMode = false; var concurrentUpdatesByDefaultOverride = false; var identifierPrefix = ''; var onRecoverableError = defaultOnRecoverableError; var transitionCallbacks = null; if (options !== null && options !== undefined) { { if (options.hydrate) { warn('hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.'); } else { if (typeof options === 'object' && options !== null && options.$$typeof === REACT_ELEMENT_TYPE) { error('You passed a JSX element to createRoot. You probably meant to ' + 'call root.render instead. ' + 'Example usage:\n\n' + ' let root = createRoot(domContainer);\n' + ' root.render(<App />);'); } } } if (options.unstable_strictMode === true) { isStrictMode = true; } if (options.identifierPrefix !== undefined) { identifierPrefix = options.identifierPrefix; } if (options.onRecoverableError !== undefined) { onRecoverableError = options.onRecoverableError; } if (options.transitionCallbacks !== undefined) { transitionCallbacks = options.transitionCallbacks; } } var root = createContainer(container, ConcurrentRoot, null, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError); markContainerAsRoot(root.current, container); var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container; listenToAllSupportedEvents(rootContainerElement); return new ReactDOMRoot(root); } function ReactDOMHydrationRoot(internalRoot) { this._internalRoot = internalRoot; } function scheduleHydration(target) { if (target) { queueExplicitHydrationTarget(target); } } ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = scheduleHydration; function hydrateRoot(container, initialChildren, options) { if (!isValidContainer(container)) { throw new Error('hydrateRoot(...): Target container is not a DOM element.'); } warnIfReactDOMContainerInDEV(container); { if (initialChildren === undefined) { error('Must provide initial children as second argument to hydrateRoot. ' + 'Example usage: hydrateRoot(domContainer, <App />)'); } } // For now we reuse the whole bag of options since they contain // the hydration callbacks. var hydrationCallbacks = options != null ? options : null; // TODO: Delete this option var mutableSources = options != null && options.hydratedSources || null; var isStrictMode = false; var concurrentUpdatesByDefaultOverride = false; var identifierPrefix = ''; var onRecoverableError = defaultOnRecoverableError; if (options !== null && options !== undefined) { if (options.unstable_strictMode === true) { isStrictMode = true; } if (options.identifierPrefix !== undefined) { identifierPrefix = options.identifierPrefix; } if (options.onRecoverableError !== undefined) { onRecoverableError = options.onRecoverableError; } } var root = createHydrationContainer(initialChildren, null, container, ConcurrentRoot, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError); markContainerAsRoot(root.current, container); // This can't be a comment node since hydration doesn't work on comment nodes anyway. listenToAllSupportedEvents(container); if (mutableSources) { for (var i = 0; i < mutableSources.length; i++) { var mutableSource = mutableSources[i]; registerMutableSourceForHydration(root, mutableSource); } } return new ReactDOMHydrationRoot(root); } function isValidContainer(node) { return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || !disableCommentsAsDOMContainers )); } // TODO: Remove this function which also includes comment nodes. // We only use it in places that are currently more relaxed. function isValidContainerLegacy(node) { return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable ')); } function warnIfReactDOMContainerInDEV(container) { { if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') { error('createRoot(): Creating roots directly with document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try using a container element created ' + 'for your app.'); } if (isContainerMarkedAsRoot(container)) { if (container._reactRootContainer) { error('You are calling ReactDOMClient.createRoot() on a container that was previously ' + 'passed to ReactDOM.render(). This is not supported.'); } else { error('You are calling ReactDOMClient.createRoot() on a container that ' + 'has already been passed to createRoot() before. Instead, call ' + 'root.render() on the existing root instead if you want to update it.'); } } } } var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner; var topLevelUpdateWarnings; { topLevelUpdateWarnings = function (container) { if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) { var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer.current); if (hostInstance) { if (hostInstance.parentNode !== container) { error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.'); } } } var isRootRenderedBySomeReact = !!container._reactRootContainer; var rootEl = getReactRootElementInContainer(container); var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl)); if (hasNonRootReactChild && !isRootRenderedBySomeReact) { error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.'); } if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') { error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.'); } }; } function getReactRootElementInContainer(container) { if (!container) { return null; } if (container.nodeType === DOCUMENT_NODE) { return container.documentElement; } else { return container.firstChild; } } function noopOnRecoverableError() {// This isn't reachable because onRecoverableError isn't called in the // legacy API. } function legacyCreateRootFromDOMContainer(container, initialChildren, parentComponent, callback, isHydrationContainer) { if (isHydrationContainer) { if (typeof callback === 'function') { var originalCallback = callback; callback = function () { var instance = getPublicRootInstance(root); originalCallback.call(instance); }; } var root = createHydrationContainer(initialChildren, callback, container, LegacyRoot, null, // hydrationCallbacks false, // isStrictMode false, // concurrentUpdatesByDefaultOverride, '', // identifierPrefix noopOnRecoverableError); container._reactRootContainer = root; markContainerAsRoot(root.current, container); var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container; listenToAllSupportedEvents(rootContainerElement); flushSync(); return root; } else { // First clear any existing content. var rootSibling; while (rootSibling = container.lastChild) { container.removeChild(rootSibling); } if (typeof callback === 'function') { var _originalCallback = callback; callback = function () { var instance = getPublicRootInstance(_root); _originalCallback.call(instance); }; } var _root = createContainer(container, LegacyRoot, null, // hydrationCallbacks false, // isStrictMode false, // concurrentUpdatesByDefaultOverride, '', // identifierPrefix noopOnRecoverableError); container._reactRootContainer = _root; markContainerAsRoot(_root.current, container); var _rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container; listenToAllSupportedEvents(_rootContainerElement); // Initial mount should not be batched. flushSync(function () { updateContainer(initialChildren, _root, parentComponent, callback); }); return _root; } } function warnOnInvalidCallback$1(callback, callerName) { { if (callback !== null && typeof callback !== 'function') { error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback); } } } function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) { { topLevelUpdateWarnings(container); warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render'); } var maybeRoot = container._reactRootContainer; var root; if (!maybeRoot) { // Initial mount root = legacyCreateRootFromDOMContainer(container, children, parentComponent, callback, forceHydrate); } else { root = maybeRoot; if (typeof callback === 'function') { var originalCallback = callback; callback = function () { var instance = getPublicRootInstance(root); originalCallback.call(instance); }; } // Update updateContainer(children, root, parentComponent, callback); } return getPublicRootInstance(root); } var didWarnAboutFindDOMNode = false; function findDOMNode(componentOrElement) { { if (!didWarnAboutFindDOMNode) { didWarnAboutFindDOMNode = true; error('findDOMNode is deprecated and will be removed in the next major ' + 'release. Instead, add a ref directly to the element you want ' + 'to reference. Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node'); } var owner = ReactCurrentOwner$3.current; if (owner !== null && owner.stateNode !== null) { var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender; if (!warnedAboutRefsInRender) { error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromType(owner.type) || 'A component'); } owner.stateNode._warnedAboutRefsInRender = true; } } if (componentOrElement == null) { return null; } if (componentOrElement.nodeType === ELEMENT_NODE) { return componentOrElement; } { return findHostInstanceWithWarning(componentOrElement, 'findDOMNode'); } } function hydrate(element, container, callback) { { error('ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + "if it's running React 17. Learn " + 'more: https://reactjs.org/link/switch-to-createroot'); } if (!isValidContainerLegacy(container)) { throw new Error('Target container is not a DOM element.'); } { var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; if (isModernRoot) { error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call hydrateRoot(container, element)?'); } } // TODO: throw or warn if we couldn't hydrate? return legacyRenderSubtreeIntoContainer(null, element, container, true, callback); } function render(element, container, callback) { { error('ReactDOM.render is no longer supported in React 18. Use createRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + "if it's running React 17. Learn " + 'more: https://reactjs.org/link/switch-to-createroot'); } if (!isValidContainerLegacy(container)) { throw new Error('Target container is not a DOM element.'); } { var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; if (isModernRoot) { error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?'); } } return legacyRenderSubtreeIntoContainer(null, element, container, false, callback); } function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) { { error('ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported ' + 'in React 18. Consider using a portal instead. Until you switch to ' + "the createRoot API, your app will behave as if it's running React " + '17. Learn more: https://reactjs.org/link/switch-to-createroot'); } if (!isValidContainerLegacy(containerNode)) { throw new Error('Target container is not a DOM element.'); } if (parentComponent == null || !has(parentComponent)) { throw new Error('parentComponent must be a valid React Component'); } return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback); } var didWarnAboutUnmountComponentAtNode = false; function unmountComponentAtNode(container) { { if (!didWarnAboutUnmountComponentAtNode) { didWarnAboutUnmountComponentAtNode = true; error('unmountComponentAtNode is deprecated and will be removed in the ' + 'next major release. Switch to the createRoot API. Learn ' + 'more: https://reactjs.org/link/switch-to-createroot'); } } if (!isValidContainerLegacy(container)) { throw new Error('unmountComponentAtNode(...): Target container is not a DOM element.'); } { var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; if (isModernRoot) { error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?'); } } if (container._reactRootContainer) { { var rootEl = getReactRootElementInContainer(container); var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl); if (renderedByDifferentReact) { error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.'); } } // Unmount should not be batched. flushSync(function () { legacyRenderSubtreeIntoContainer(null, null, container, false, function () { // $FlowFixMe This should probably use `delete container._reactRootContainer` container._reactRootContainer = null; unmarkContainerAsRoot(container); }); }); // If you call unmountComponentAtNode twice in quick succession, you'll // get `true` twice. That's probably fine? return true; } else { { var _rootEl = getReactRootElementInContainer(container); var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node. var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainerLegacy(container.parentNode) && !!container.parentNode._reactRootContainer; if (hasNonRootReactChild) { error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.'); } } return false; } } setAttemptSynchronousHydration(attemptSynchronousHydration$1); setAttemptContinuousHydration(attemptContinuousHydration$1); setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1); setGetCurrentUpdatePriority(getCurrentUpdatePriority); setAttemptHydrationAtPriority(runWithPriority); { if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') { error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills'); } } setRestoreImplementation(restoreControlledState$3); setBatchingImplementation(batchedUpdates$1, discreteUpdates, flushSync); function createPortal$1(children, container) { var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; if (!isValidContainer(container)) { throw new Error('Target container is not a DOM element.'); } // TODO: pass ReactDOM portal implementation as third argument // $FlowFixMe The Flow type is opaque but there's no way to actually create it. return createPortal(children, container, null, key); } function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) { return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback); } var Internals = { usingClientEntryPoint: false, // Keep in sync with ReactTestUtils.js. // This is an array for better minification. Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, batchedUpdates$1] }; function createRoot$1(container, options) { { if (!Internals.usingClientEntryPoint && !false) { error('You are importing createRoot from "react-dom" which is not supported. ' + 'You should instead import it from "react-dom/client".'); } } return createRoot(container, options); } function hydrateRoot$1(container, initialChildren, options) { { if (!Internals.usingClientEntryPoint && !false) { error('You are importing hydrateRoot from "react-dom" which is not supported. ' + 'You should instead import it from "react-dom/client".'); } } return hydrateRoot(container, initialChildren, options); } // Overload the definition to the two valid signatures. // Warning, this opts-out of checking the function body. // eslint-disable-next-line no-redeclare function flushSync$1(fn) { { if (isAlreadyRendering()) { error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.'); } } return flushSync(fn); } var foundDevTools = injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 1 , version: ReactVersion, rendererPackageName: 'react-dom' }); { if (!foundDevTools && canUseDOM && window.top === window.self) { // If we're in Chrome or Firefox, provide a download link if not installed. if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) { var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://. if (/^(https?|file):$/.test(protocol)) { // eslint-disable-next-line react-internal/no-production-logging console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold'); } } } } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; exports.createPortal = createPortal$1; exports.createRoot = createRoot$1; exports.findDOMNode = findDOMNode; exports.flushSync = flushSync$1; exports.hydrate = hydrate; exports.hydrateRoot = hydrateRoot$1; exports.render = render; exports.unmountComponentAtNode = unmountComponentAtNode; exports.unstable_batchedUpdates = batchedUpdates$1; exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer; exports.version = ReactVersion; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === 'function' ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } })(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 85 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { var m = __webpack_require__(23); if (process.env.NODE_ENV === 'production') { exports.createRoot = m.createRoot; exports.hydrateRoot = m.hydrateRoot; } else { var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; exports.createRoot = function(c, o) { i.usingClientEntryPoint = true; try { return m.createRoot(c, o); } finally { i.usingClientEntryPoint = false; } }; exports.hydrateRoot = function(c, h, o) { i.usingClientEntryPoint = true; try { return m.hydrateRoot(c, h, o); } finally { i.usingClientEntryPoint = false; } }; } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 86 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = SemVer var debug /* istanbul ignore next */ if (typeof process === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) { debug = function () { var args = Array.prototype.slice.call(arguments, 0) args.unshift('SEMVER') console.log.apply(console, args) } } else { debug = function () {} } // Note: this is the semver.org version of the spec that it implements // Not necessarily the package version of this code. exports.SEMVER_SPEC_VERSION = '2.0.0' var MAX_LENGTH = 256 var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991 // Max safe segment length for coercion. var MAX_SAFE_COMPONENT_LENGTH = 16 var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 // The actual regexps go on exports.re var re = exports.re = [] var safeRe = exports.safeRe = [] var src = exports.src = [] var R = 0 var LETTERDASHNUMBER = '[a-zA-Z0-9-]' // Replace some greedy regex tokens to prevent regex dos issues. These regex are // used internally via the safeRe object since all inputs in this library get // normalized first to trim and collapse all extra whitespace. The original // regexes are exported for userland consumption and lower level usage. A // future breaking change could export the safer regex only with a note that // all input should have extra whitespace removed. var safeRegexReplacements = [ ['\\s', 1], ['\\d', MAX_LENGTH], [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], ] function makeSafeRe (value) { for (var i = 0; i < safeRegexReplacements.length; i++) { var token = safeRegexReplacements[i][0] var max = safeRegexReplacements[i][1] value = value .split(token + '*').join(token + '{0,' + max + '}') .split(token + '+').join(token + '{1,' + max + '}') } return value } // The following Regular Expressions can be used for tokenizing, // validating, and parsing SemVer version strings. // ## Numeric Identifier // A single `0`, or a non-zero digit followed by zero or more digits. var NUMERICIDENTIFIER = R++ src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' var NUMERICIDENTIFIERLOOSE = R++ src[NUMERICIDENTIFIERLOOSE] = '\\d+' // ## Non-numeric Identifier // Zero or more digits, followed by a letter or hyphen, and then zero or // more letters, digits, or hyphens. var NONNUMERICIDENTIFIER = R++ src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*' // ## Main Version // Three dot-separated numeric identifiers. var MAINVERSION = R++ src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')' var MAINVERSIONLOOSE = R++ src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')' // ## Pre-release Version Identifier // A numeric identifier, or a non-numeric identifier. var PRERELEASEIDENTIFIER = R++ src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + '|' + src[NONNUMERICIDENTIFIER] + ')' var PRERELEASEIDENTIFIERLOOSE = R++ src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + '|' + src[NONNUMERICIDENTIFIER] + ')' // ## Pre-release Version // Hyphen, followed by one or more dot-separated pre-release version // identifiers. var PRERELEASE = R++ src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' var PRERELEASELOOSE = R++ src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' // ## Build Metadata Identifier // Any combination of digits, letters, or hyphens. var BUILDIDENTIFIER = R++ src[BUILDIDENTIFIER] = LETTERDASHNUMBER + '+' // ## Build Metadata // Plus sign, followed by one or more period-separated build metadata // identifiers. var BUILD = R++ src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' // ## Full Version String // A main version, followed optionally by a pre-release version and // build metadata. // Note that the only major, minor, patch, and pre-release sections of // the version string are capturing groups. The build metadata is not a // capturing group, because it should not ever be used in version // comparison. var FULL = R++ var FULLPLAIN = 'v?' + src[MAINVERSION] + src[PRERELEASE] + '?' + src[BUILD] + '?' src[FULL] = '^' + FULLPLAIN + '$' // like full, but allows v1.2.3 and =1.2.3, which people do sometimes. // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty // common in the npm registry. var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + src[PRERELEASELOOSE] + '?' + src[BUILD] + '?' var LOOSE = R++ src[LOOSE] = '^' + LOOSEPLAIN + '$' var GTLT = R++ src[GTLT] = '((?:<|>)?=?)' // Something like "2.*" or "1.2.x". // Note that "x.x" is a valid xRange identifer, meaning "any version" // Only the first item is strictly required. var XRANGEIDENTIFIERLOOSE = R++ src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' var XRANGEIDENTIFIER = R++ src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' var XRANGEPLAIN = R++ src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:' + src[PRERELEASE] + ')?' + src[BUILD] + '?' + ')?)?' var XRANGEPLAINLOOSE = R++ src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[PRERELEASELOOSE] + ')?' + src[BUILD] + '?' + ')?)?' var XRANGE = R++ src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' var XRANGELOOSE = R++ src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' // Coercion. // Extract anything that could conceivably be a part of a valid semver var COERCE = R++ src[COERCE] = '(?:^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])' // Tilde ranges. // Meaning is "reasonably at or greater than" var LONETILDE = R++ src[LONETILDE] = '(?:~>?)' var TILDETRIM = R++ src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') safeRe[TILDETRIM] = new RegExp(makeSafeRe(src[TILDETRIM]), 'g') var tildeTrimReplace = '$1~' var TILDE = R++ src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' var TILDELOOSE = R++ src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' // Caret ranges. // Meaning is "at least and backwards compatible with" var LONECARET = R++ src[LONECARET] = '(?:\\^)' var CARETTRIM = R++ src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') safeRe[CARETTRIM] = new RegExp(makeSafeRe(src[CARETTRIM]), 'g') var caretTrimReplace = '$1^' var CARET = R++ src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' var CARETLOOSE = R++ src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' // A simple gt/lt/eq thing, or just "" to indicate "any version" var COMPARATORLOOSE = R++ src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' var COMPARATOR = R++ src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' // An expression to strip any whitespace between the gtlt and the thing // it modifies, so that `> 1.2.3` ==> `>1.2.3` var COMPARATORTRIM = R++ src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' // this one has to use the /g flag re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') safeRe[COMPARATORTRIM] = new RegExp(makeSafeRe(src[COMPARATORTRIM]), 'g') var comparatorTrimReplace = '$1$2$3' // Something like `1.2.3 - 1.2.4` // Note that these all use the loose form, because they'll be // checked against either the strict or loose comparator form // later. var HYPHENRANGE = R++ src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAIN] + ')' + '\\s*$' var HYPHENRANGELOOSE = R++ src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAINLOOSE] + ')' + '\\s*$' // Star ranges basically just allow anything at all. var STAR = R++ src[STAR] = '(<|>)?=?\\s*\\*' // Compile to actual regexp objects. // All are flag-free, unless they were created above with a flag. for (var i = 0; i < R; i++) { debug(i, src[i]) if (!re[i]) { re[i] = new RegExp(src[i]) // Replace all greedy whitespace to prevent regex dos issues. These regex are // used internally via the safeRe object since all inputs in this library get // normalized first to trim and collapse all extra whitespace. The original // regexes are exported for userland consumption and lower level usage. A // future breaking change could export the safer regex only with a note that // all input should have extra whitespace removed. safeRe[i] = new RegExp(makeSafeRe(src[i])) } } exports.parse = parse function parse (version, options) { if (!options || typeof options !== 'object') { options = { loose: !!options, includePrerelease: false } } if (version instanceof SemVer) { return version } if (typeof version !== 'string') { return null } if (version.length > MAX_LENGTH) { return null } var r = options.loose ? safeRe[LOOSE] : safeRe[FULL] if (!r.test(version)) { return null } try { return new SemVer(version, options) } catch (er) { return null } } exports.valid = valid function valid (version, options) { var v = parse(version, options) return v ? v.version : null } exports.clean = clean function clean (version, options) { var s = parse(version.trim().replace(/^[=v]+/, ''), options) return s ? s.version : null } exports.SemVer = SemVer function SemVer (version, options) { if (!options || typeof options !== 'object') { options = { loose: !!options, includePrerelease: false } } if (version instanceof SemVer) { if (version.loose === options.loose) { return version } else { version = version.version } } else if (typeof version !== 'string') { throw new TypeError('Invalid Version: ' + version) } if (version.length > MAX_LENGTH) { throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') } if (!(this instanceof SemVer)) { return new SemVer(version, options) } debug('SemVer', version, options) this.options = options this.loose = !!options.loose var m = version.trim().match(options.loose ? safeRe[LOOSE] : safeRe[FULL]) if (!m) { throw new TypeError('Invalid Version: ' + version) } this.raw = version // these are actually numbers this.major = +m[1] this.minor = +m[2] this.patch = +m[3] if (this.major > MAX_SAFE_INTEGER || this.major < 0) { throw new TypeError('Invalid major version') } if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { throw new TypeError('Invalid minor version') } if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { throw new TypeError('Invalid patch version') } // numberify any prerelease numeric ids if (!m[4]) { this.prerelease = [] } else { this.prerelease = m[4].split('.').map(function (id) { if (/^[0-9]+$/.test(id)) { var num = +id if (num >= 0 && num < MAX_SAFE_INTEGER) { return num } } return id }) } this.build = m[5] ? m[5].split('.') : [] this.format() } SemVer.prototype.format = function () { this.version = this.major + '.' + this.minor + '.' + this.patch if (this.prerelease.length) { this.version += '-' + this.prerelease.join('.') } return this.version } SemVer.prototype.toString = function () { return this.version } SemVer.prototype.compare = function (other) { debug('SemVer.compare', this.version, this.options, other) if (!(other instanceof SemVer)) { other = new SemVer(other, this.options) } return this.compareMain(other) || this.comparePre(other) } SemVer.prototype.compareMain = function (other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options) } return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch) } SemVer.prototype.comparePre = function (other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options) } // NOT having a prerelease is > having one if (this.prerelease.length && !other.prerelease.length) { return -1 } else if (!this.prerelease.length && other.prerelease.length) { return 1 } else if (!this.prerelease.length && !other.prerelease.length) { return 0 } var i = 0 do { var a = this.prerelease[i] var b = other.prerelease[i] debug('prerelease compare', i, a, b) if (a === undefined && b === undefined) { return 0 } else if (b === undefined) { return 1 } else if (a === undefined) { return -1 } else if (a === b) { continue } else { return compareIdentifiers(a, b) } } while (++i) } // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. SemVer.prototype.inc = function (release, identifier) { switch (release) { case 'premajor': this.prerelease.length = 0 this.patch = 0 this.minor = 0 this.major++ this.inc('pre', identifier) break case 'preminor': this.prerelease.length = 0 this.patch = 0 this.minor++ this.inc('pre', identifier) break case 'prepatch': // If this is already a prerelease, it will bump to the next version // drop any prereleases that might already exist, since they are not // relevant at this point. this.prerelease.length = 0 this.inc('patch', identifier) this.inc('pre', identifier) break // If the input is a non-prerelease version, this acts the same as // prepatch. case 'prerelease': if (this.prerelease.length === 0) { this.inc('patch', identifier) } this.inc('pre', identifier) break case 'major': // If this is a pre-major version, bump up to the same major version. // Otherwise increment major. // 1.0.0-5 bumps to 1.0.0 // 1.1.0 bumps to 2.0.0 if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { this.major++ } this.minor = 0 this.patch = 0 this.prerelease = [] break case 'minor': // If this is a pre-minor version, bump up to the same minor version. // Otherwise increment minor. // 1.2.0-5 bumps to 1.2.0 // 1.2.1 bumps to 1.3.0 if (this.patch !== 0 || this.prerelease.length === 0) { this.minor++ } this.patch = 0 this.prerelease = [] break case 'patch': // If this is not a pre-release version, it will increment the patch. // If it is a pre-release it will bump up to the same patch version. // 1.2.0-5 patches to 1.2.0 // 1.2.0 patches to 1.2.1 if (this.prerelease.length === 0) { this.patch++ } this.prerelease = [] break // This probably shouldn't be used publicly. // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. case 'pre': if (this.prerelease.length === 0) { this.prerelease = [0] } else { var i = this.prerelease.length while (--i >= 0) { if (typeof this.prerelease[i] === 'number') { this.prerelease[i]++ i = -2 } } if (i === -1) { // didn't increment anything this.prerelease.push(0) } } if (identifier) { // 1.2.0-beta.1 bumps to 1.2.0-beta.2, // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 if (this.prerelease[0] === identifier) { if (isNaN(this.prerelease[1])) { this.prerelease = [identifier, 0] } } else { this.prerelease = [identifier, 0] } } break default: throw new Error('invalid increment argument: ' + release) } this.format() this.raw = this.version return this } exports.inc = inc function inc (version, release, loose, identifier) { if (typeof (loose) === 'string') { identifier = loose loose = undefined } try { return new SemVer(version, loose).inc(release, identifier).version } catch (er) { return null } } exports.diff = diff function diff (version1, version2) { if (eq(version1, version2)) { return null } else { var v1 = parse(version1) var v2 = parse(version2) var prefix = '' if (v1.prerelease.length || v2.prerelease.length) { prefix = 'pre' var defaultResult = 'prerelease' } for (var key in v1) { if (key === 'major' || key === 'minor' || key === 'patch') { if (v1[key] !== v2[key]) { return prefix + key } } } return defaultResult // may be undefined } } exports.compareIdentifiers = compareIdentifiers var numeric = /^[0-9]+$/ function compareIdentifiers (a, b) { var anum = numeric.test(a) var bnum = numeric.test(b) if (anum && bnum) { a = +a b = +b } return a === b ? 0 : (anum && !bnum) ? -1 : (bnum && !anum) ? 1 : a < b ? -1 : 1 } exports.rcompareIdentifiers = rcompareIdentifiers function rcompareIdentifiers (a, b) { return compareIdentifiers(b, a) } exports.major = major function major (a, loose) { return new SemVer(a, loose).major } exports.minor = minor function minor (a, loose) { return new SemVer(a, loose).minor } exports.patch = patch function patch (a, loose) { return new SemVer(a, loose).patch } exports.compare = compare function compare (a, b, loose) { return new SemVer(a, loose).compare(new SemVer(b, loose)) } exports.compareLoose = compareLoose function compareLoose (a, b) { return compare(a, b, true) } exports.rcompare = rcompare function rcompare (a, b, loose) { return compare(b, a, loose) } exports.sort = sort function sort (list, loose) { return list.sort(function (a, b) { return exports.compare(a, b, loose) }) } exports.rsort = rsort function rsort (list, loose) { return list.sort(function (a, b) { return exports.rcompare(a, b, loose) }) } exports.gt = gt function gt (a, b, loose) { return compare(a, b, loose) > 0 } exports.lt = lt function lt (a, b, loose) { return compare(a, b, loose) < 0 } exports.eq = eq function eq (a, b, loose) { return compare(a, b, loose) === 0 } exports.neq = neq function neq (a, b, loose) { return compare(a, b, loose) !== 0 } exports.gte = gte function gte (a, b, loose) { return compare(a, b, loose) >= 0 } exports.lte = lte function lte (a, b, loose) { return compare(a, b, loose) <= 0 } exports.cmp = cmp function cmp (a, op, b, loose) { switch (op) { case '===': if (typeof a === 'object') a = a.version if (typeof b === 'object') b = b.version return a === b case '!==': if (typeof a === 'object') a = a.version if (typeof b === 'object') b = b.version return a !== b case '': case '=': case '==': return eq(a, b, loose) case '!=': return neq(a, b, loose) case '>': return gt(a, b, loose) case '>=': return gte(a, b, loose) case '<': return lt(a, b, loose) case '<=': return lte(a, b, loose) default: throw new TypeError('Invalid operator: ' + op) } } exports.Comparator = Comparator function Comparator (comp, options) { if (!options || typeof options !== 'object') { options = { loose: !!options, includePrerelease: false } } if (comp instanceof Comparator) { if (comp.loose === !!options.loose) { return comp } else { comp = comp.value } } if (!(this instanceof Comparator)) { return new Comparator(comp, options) } comp = comp.trim().split(/\s+/).join(' ') debug('comparator', comp, options) this.options = options this.loose = !!options.loose this.parse(comp) if (this.semver === ANY) { this.value = '' } else { this.value = this.operator + this.semver.version } debug('comp', this) } var ANY = {} Comparator.prototype.parse = function (comp) { var r = this.options.loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR] var m = comp.match(r) if (!m) { throw new TypeError('Invalid comparator: ' + comp) } this.operator = m[1] if (this.operator === '=') { this.operator = '' } // if it literally is just '>' or '' then allow anything. if (!m[2]) { this.semver = ANY } else { this.semver = new SemVer(m[2], this.options.loose) } } Comparator.prototype.toString = function () { return this.value } Comparator.prototype.test = function (version) { debug('Comparator.test', version, this.options.loose) if (this.semver === ANY) { return true } if (typeof version === 'string') { version = new SemVer(version, this.options) } return cmp(version, this.operator, this.semver, this.options) } Comparator.prototype.intersects = function (comp, options) { if (!(comp instanceof Comparator)) { throw new TypeError('a Comparator is required') } if (!options || typeof options !== 'object') { options = { loose: !!options, includePrerelease: false } } var rangeTmp if (this.operator === '') { rangeTmp = new Range(comp.value, options) return satisfies(this.value, rangeTmp, options) } else if (comp.operator === '') { rangeTmp = new Range(this.value, options) return satisfies(comp.semver, rangeTmp, options) } var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>') var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<') var sameSemVer = this.semver.version === comp.semver.version var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=') var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && ((this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<')) var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && ((this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>')) return sameDirectionIncreasing || sameDirectionDecreasing || (sameSemVer && differentDirectionsInclusive) || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan } exports.Range = Range function Range (range, options) { if (!options || typeof options !== 'object') { options = { loose: !!options, includePrerelease: false } } if (range instanceof Range) { if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { return range } else { return new Range(range.raw, options) } } if (range instanceof Comparator) { return new Range(range.value, options) } if (!(this instanceof Range)) { return new Range(range, options) } this.options = options this.loose = !!options.loose this.includePrerelease = !!options.includePrerelease // First reduce all whitespace as much as possible so we do not have to rely // on potentially slow regexes like \s*. This is then stored and used for // future error messages as well. this.raw = range .trim() .split(/\s+/) .join(' ') // First, split based on boolean or || this.set = this.raw.split('||').map(function (range) { return this.parseRange(range.trim()) }, this).filter(function (c) { // throw out any that are not relevant for whatever reason return c.length }) if (!this.set.length) { throw new TypeError('Invalid SemVer Range: ' + this.raw) } this.format() } Range.prototype.format = function () { this.range = this.set.map(function (comps) { return comps.join(' ').trim() }).join('||').trim() return this.range } Range.prototype.toString = function () { return this.range } Range.prototype.parseRange = function (range) { var loose = this.options.loose // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` var hr = loose ? safeRe[HYPHENRANGELOOSE] : safeRe[HYPHENRANGE] range = range.replace(hr, hyphenReplace) debug('hyphen replace', range) // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` range = range.replace(safeRe[COMPARATORTRIM], comparatorTrimReplace) debug('comparator trim', range, safeRe[COMPARATORTRIM]) // `~ 1.2.3` => `~1.2.3` range = range.replace(safeRe[TILDETRIM], tildeTrimReplace) // `^ 1.2.3` => `^1.2.3` range = range.replace(safeRe[CARETTRIM], caretTrimReplace) // At this point, the range is completely trimmed and // ready to be split into comparators. var compRe = loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR] var set = range.split(' ').map(function (comp) { return parseComparator(comp, this.options) }, this).join(' ').split(/\s+/) if (this.options.loose) { // in loose mode, throw out any that are not valid comparators set = set.filter(function (comp) { return !!comp.match(compRe) }) } set = set.map(function (comp) { return new Comparator(comp, this.options) }, this) return set } Range.prototype.intersects = function (range, options) { if (!(range instanceof Range)) { throw new TypeError('a Range is required') } return this.set.some(function (thisComparators) { return thisComparators.every(function (thisComparator) { return range.set.some(function (rangeComparators) { return rangeComparators.every(function (rangeComparator) { return thisComparator.intersects(rangeComparator, options) }) }) }) }) } // Mostly just for testing and legacy API reasons exports.toComparators = toComparators function toComparators (range, options) { return new Range(range, options).set.map(function (comp) { return comp.map(function (c) { return c.value }).join(' ').trim().split(' ') }) } // comprised of xranges, tildes, stars, and gtlt's at this point. // already replaced the hyphen ranges // turn into a set of JUST comparators. function parseComparator (comp, options) { debug('comp', comp, options) comp = replaceCarets(comp, options) debug('caret', comp) comp = replaceTildes(comp, options) debug('tildes', comp) comp = replaceXRanges(comp, options) debug('xrange', comp) comp = replaceStars(comp, options) debug('stars', comp) return comp } function isX (id) { return !id || id.toLowerCase() === 'x' || id === '*' } // ~, ~> --> * (any, kinda silly) // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 function replaceTildes (comp, options) { return comp.trim().split(/\s+/).map(function (comp) { return replaceTilde(comp, options) }).join(' ') } function replaceTilde (comp, options) { var r = options.loose ? safeRe[TILDELOOSE] : safeRe[TILDE] return comp.replace(r, function (_, M, m, p, pr) { debug('tilde', comp, _, M, m, p, pr) var ret if (isX(M)) { ret = '' } else if (isX(m)) { ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' } else if (isX(p)) { // ~1.2 == >=1.2.0 <1.3.0 ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' } else if (pr) { debug('replaceTilde pr', pr) ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0' } else { // ~1.2.3 == >=1.2.3 <1.3.0 ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0' } debug('tilde return', ret) return ret }) } // ^ --> * (any, kinda silly) // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 // ^1.2.3 --> >=1.2.3 <2.0.0 // ^1.2.0 --> >=1.2.0 <2.0.0 function replaceCarets (comp, options) { return comp.trim().split(/\s+/).map(function (comp) { return replaceCaret(comp, options) }).join(' ') } function replaceCaret (comp, options) { debug('caret', comp, options) var r = options.loose ? safeRe[CARETLOOSE] : safeRe[CARET] return comp.replace(r, function (_, M, m, p, pr) { debug('caret', comp, _, M, m, p, pr) var ret if (isX(M)) { ret = '' } else if (isX(m)) { ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' } else if (isX(p)) { if (M === '0') { ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' } else { ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' } } else if (pr) { debug('replaceCaret pr', pr) if (M === '0') { if (m === '0') { ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + m + '.' + (+p + 1) } else { ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0' } } else { ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + (+M + 1) + '.0.0' } } else { debug('no pr') if (M === '0') { if (m === '0') { ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1) } else { ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0' } } else { ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0' } } debug('caret return', ret) return ret }) } function replaceXRanges (comp, options) { debug('replaceXRanges', comp, options) return comp.split(/\s+/).map(function (comp) { return replaceXRange(comp, options) }).join(' ') } function replaceXRange (comp, options) { comp = comp.trim() var r = options.loose ? safeRe[XRANGELOOSE] : safeRe[XRANGE] return comp.replace(r, function (ret, gtlt, M, m, p, pr) { debug('xRange', comp, ret, gtlt, M, m, p, pr) var xM = isX(M) var xm = xM || isX(m) var xp = xm || isX(p) var anyX = xp if (gtlt === '=' && anyX) { gtlt = '' } if (xM) { if (gtlt === '>' || gtlt === '<') { // nothing is allowed ret = '<0.0.0' } else { // nothing is forbidden ret = '*' } } else if (gtlt && anyX) { // we know patch is an x, because we have any x at all. // replace X with 0 if (xm) { m = 0 } p = 0 if (gtlt === '>') { // >1 => >=2.0.0 // >1.2 => >=1.3.0 // >1.2.3 => >= 1.2.4 gtlt = '>=' if (xm) { M = +M + 1 m = 0 p = 0 } else { m = +m + 1 p = 0 } } else if (gtlt === '<=') { // <=0.7.x is actually <0.8.0, since any 0.7.x should // pass. Similarly, <=7.x is actually <8.0.0, etc. gtlt = '<' if (xm) { M = +M + 1 } else { m = +m + 1 } } ret = gtlt + M + '.' + m + '.' + p } else if (xm) { ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' } else if (xp) { ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' } debug('xRange return', ret) return ret }) } // Because * is AND-ed with everything else in the comparator, // and '' means "any version", just remove the *s entirely. function replaceStars (comp, options) { debug('replaceStars', comp, options) // Looseness is ignored here. star is always as loose as it gets! return comp.trim().replace(safeRe[STAR], '') } // This function is passed to string.replace(safeRe[HYPHENRANGE]) // M, m, patch, prerelease, build // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do // 1.2 - 3.4 => >=1.2.0 <3.5.0 function hyphenReplace ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { if (isX(fM)) { from = '' } else if (isX(fm)) { from = '>=' + fM + '.0.0' } else if (isX(fp)) { from = '>=' + fM + '.' + fm + '.0' } else { from = '>=' + from } if (isX(tM)) { to = '' } else if (isX(tm)) { to = '<' + (+tM + 1) + '.0.0' } else if (isX(tp)) { to = '<' + tM + '.' + (+tm + 1) + '.0' } else if (tpr) { to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr } else { to = '<=' + to } return (from + ' ' + to).trim() } // if ANY of the sets match ALL of its comparators, then pass Range.prototype.test = function (version) { if (!version) { return false } if (typeof version === 'string') { version = new SemVer(version, this.options) } for (var i = 0; i < this.set.length; i++) { if (testSet(this.set[i], version, this.options)) { return true } } return false } function testSet (set, version, options) { for (var i = 0; i < set.length; i++) { if (!set[i].test(version)) { return false } } if (version.prerelease.length && !options.includePrerelease) { // Find the set of versions that are allowed to have prereleases // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 // That should allow `1.2.3-pr.2` to pass. // However, `1.2.4-alpha.notready` should NOT be allowed, // even though it's within the range set by the comparators. for (i = 0; i < set.length; i++) { debug(set[i].semver) if (set[i].semver === ANY) { continue } if (set[i].semver.prerelease.length > 0) { var allowed = set[i].semver if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { return true } } } // Version has a -pre, but it's not one of the ones we like. return false } return true } exports.satisfies = satisfies function satisfies (version, range, options) { try { range = new Range(range, options) } catch (er) { return false } return range.test(version) } exports.maxSatisfying = maxSatisfying function maxSatisfying (versions, range, options) { var max = null var maxSV = null try { var rangeObj = new Range(range, options) } catch (er) { return null } versions.forEach(function (v) { if (rangeObj.test(v)) { // satisfies(v, range, options) if (!max || maxSV.compare(v) === -1) { // compare(max, v, true) max = v maxSV = new SemVer(max, options) } } }) return max } exports.minSatisfying = minSatisfying function minSatisfying (versions, range, options) { var min = null var minSV = null try { var rangeObj = new Range(range, options) } catch (er) { return null } versions.forEach(function (v) { if (rangeObj.test(v)) { // satisfies(v, range, options) if (!min || minSV.compare(v) === 1) { // compare(min, v, true) min = v minSV = new SemVer(min, options) } } }) return min } exports.minVersion = minVersion function minVersion (range, loose) { range = new Range(range, loose) var minver = new SemVer('0.0.0') if (range.test(minver)) { return minver } minver = new SemVer('0.0.0-0') if (range.test(minver)) { return minver } minver = null for (var i = 0; i < range.set.length; ++i) { var comparators = range.set[i] comparators.forEach(function (comparator) { // Clone to avoid manipulating the comparator's semver object. var compver = new SemVer(comparator.semver.version) switch (comparator.operator) { case '>': if (compver.prerelease.length === 0) { compver.patch++ } else { compver.prerelease.push(0) } compver.raw = compver.format() /* fallthrough */ case '': case '>=': if (!minver || gt(minver, compver)) { minver = compver } break case '<': case '<=': /* Ignore maximum versions */ break /* istanbul ignore next */ default: throw new Error('Unexpected operation: ' + comparator.operator) } }) } if (minver && range.test(minver)) { return minver } return null } exports.validRange = validRange function validRange (range, options) { try { // Return '*' instead of '' so that truthiness works. // This will throw if it's invalid anyway return new Range(range, options).range || '*' } catch (er) { return null } } // Determine if version is less than all the versions possible in the range exports.ltr = ltr function ltr (version, range, options) { return outside(version, range, '<', options) } // Determine if version is greater than all the versions possible in the range. exports.gtr = gtr function gtr (version, range, options) { return outside(version, range, '>', options) } exports.outside = outside function outside (version, range, hilo, options) { version = new SemVer(version, options) range = new Range(range, options) var gtfn, ltefn, ltfn, comp, ecomp switch (hilo) { case '>': gtfn = gt ltefn = lte ltfn = lt comp = '>' ecomp = '>=' break case '<': gtfn = lt ltefn = gte ltfn = gt comp = '<' ecomp = '<=' break default: throw new TypeError('Must provide a hilo val of "<" or ">"') } // If it satisifes the range it is not outside if (satisfies(version, range, options)) { return false } // From now on, variable terms are as if we're in "gtr" mode. // but note that everything is flipped for the "ltr" function. for (var i = 0; i < range.set.length; ++i) { var comparators = range.set[i] var high = null var low = null comparators.forEach(function (comparator) { if (comparator.semver === ANY) { comparator = new Comparator('>=0.0.0') } high = high || comparator low = low || comparator if (gtfn(comparator.semver, high.semver, options)) { high = comparator } else if (ltfn(comparator.semver, low.semver, options)) { low = comparator } }) // If the edge version comparator has a operator then our version // isn't outside it if (high.operator === comp || high.operator === ecomp) { return false } // If the lowest version comparator has an operator and our version // is less than it then it isn't higher than the range if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { return false } else if (low.operator === ecomp && ltfn(version, low.semver)) { return false } } return true } exports.prerelease = prerelease function prerelease (version, options) { var parsed = parse(version, options) return (parsed && parsed.prerelease.length) ? parsed.prerelease : null } exports.intersects = intersects function intersects (r1, r2, options) { r1 = new Range(r1, options) r2 = new Range(r2, options) return r1.intersects(r2) } exports.coerce = coerce function coerce (version) { if (version instanceof SemVer) { return version } if (typeof version !== 'string') { return null } var match = version.match(safeRe[COERCE]) if (match == null) { return null } return parse(match[1] + '.' + (match[2] || '0') + '.' + (match[3] || '0')) } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 87 */ /***/ (function(module, exports, __webpack_require__) { /** * External dependencies */ var debug = __webpack_require__( 88 )( 'i18n-wp-plugin' ), Jed = __webpack_require__( 91 ), sha1 = __webpack_require__( 92 ), EventEmitter = __webpack_require__( 55 ).EventEmitter, interpolateComponents = __webpack_require__( 95 ).default, LRU = __webpack_require__( 105 ), assign = __webpack_require__( 58 ); /** * Internal dependencies */ var numberFormatPHPJS = __webpack_require__( 106 ); /** * Constants */ var decimal_point_translation_key = 'number_format_decimals', thousands_sep_translation_key = 'number_format_thousands_sep'; var translationLookup = [ // By default don't modify the options when looking up translations. function( options ) { return options; } ]; var hashCache = {}; // raise a console warning function warn() { if ( ! I18N.throwErrors ) { return; } if ( 'undefined' !== typeof window && window.console && window.console.warn ) { window.console.warn.apply( window.console, arguments ); } } // turns Function.arguments into an array function simpleArguments( args ) { return Array.prototype.slice.call( args ); } /** * Coerce the possible arguments and normalize to a single object * @param {arguments} args - arguments passed in from `translate()` * @return {object} - a single object describing translation needs */ function normalizeTranslateArguments( args ) { var original = args[ 0 ], options = {}, i; // warn about older deprecated syntax if ( typeof original !== 'string' || args.length > 3 || ( args.length > 2 && typeof args[ 1 ] === 'object' && typeof args[ 2 ] === 'object' ) ) { warn( 'Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:', simpleArguments( args ), '. See https://github.com/pentatonicfunk/i18n-wp-plugin#translate-method' ); } if ( args.length === 2 && typeof original === 'string' && typeof args[ 1 ] === 'string' ) { warn( 'Invalid Invocation: `translate()` requires an options object for plural translations, but passed:', simpleArguments( args ) ); } // options could be in position 0, 1, or 2 // sending options as the first object is deprecated and will raise a warning for ( i = 0; i < args.length; i++ ) { if ( typeof args[ i ] === 'object' ) { options = args[ i ]; } } // `original` can be passed as first parameter or as part of the options object // though passing original as part of the options is a deprecated approach and will be removed if ( typeof original === 'string' ) { options.original = original; } else if ( typeof options.original === 'object' ) { options.plural = options.original.plural; options.count = options.original.count; options.original = options.original.single; } if ( typeof args[ 1 ] === 'string' ) { options.plural = args[ 1 ]; } if ( typeof options.original === 'undefined' ) { throw new Error( 'Translate called without a `string` value as first argument.' ); } return options; } /** * Pull the right set of arguments for the Jed method * @param {string} jedMethod Name of jed gettext-style method. [See docs](http://slexaxton.github.io/Jed/) * @param {[object]} props properties passed into `translate()` method * @return {[array]} array of properties to pass into gettext-style method */ function getJedArgs( jedMethod, props ) { switch ( jedMethod ) { case 'gettext': return [ props.original ]; case 'ngettext': return [ props.original, props.plural, props.count ]; case 'npgettext': return [ props.context, props.original, props.plural, props.count ]; case 'pgettext': return [ props.context, props.original ]; } return []; } /** * Takes translate options object and coerces to a Jed request to retrieve translation * @param {object} jed - jed data object * @param {object} options - object describing translation * @return {string} - the returned translation from Jed */ function getTranslationFromJed( jed, options ) { var jedMethod = 'gettext', jedArgs; if ( options.context ) { jedMethod = 'p' + jedMethod; } if ( typeof options.original === 'string' && typeof options.plural === 'string' ) { jedMethod = 'n' + jedMethod; } jedArgs = getJedArgs( jedMethod, options ); return jed[ jedMethod ].apply( jed, jedArgs ); } function getTranslation( i18n, options ) { var i, lookup; for ( i = translationLookup.length - 1; i >= 0; i-- ) { lookup = translationLookup[ i ]( assign( {}, options ) ); // Only get the translation from jed if it exists. if ( i18n.state.locale[ lookup.original ] ) { return getTranslationFromJed( i18n.state.jed, lookup ); } } return null; } function I18N() { if( ! ( this instanceof I18N ) ) { return new I18N(); } this.defaultLocaleSlug = 'en'; this.state = { numberFormatSettings: {}, jed: undefined, locale: undefined, localeSlug: undefined, translations: LRU( { max: 100 } ) }; this.componentUpdateHooks = []; this.translateHooks = []; this.stateObserver = new EventEmitter(); // Because the higher-order component can wrap a ton of React components, // we need to bump the number of listeners to infinity and beyond // FIXME: still valid? this.stateObserver.setMaxListeners( 0 ); // default configuration this.configure(); } I18N.throwErrors = false; /** * Formats numbers using locale settings and/or passed options * @param {String|Number|Int} number to format (required) * @param {Int|object} options Number of decimal places or options object (optional) * @return {string} Formatted number as string */ I18N.prototype.numberFormat = function( number ) { var options = arguments[ 1 ] || {}, decimals = ( typeof options === 'number' ) ? options : options.decimals || 0, decPoint = options.decPoint || this.state.numberFormatSettings.decimal_point || '.', thousandsSep = options.thousandsSep || this.state.numberFormatSettings.thousands_sep || ','; return numberFormatPHPJS( number, decimals, decPoint, thousandsSep ); }; I18N.prototype.configure = function( options ) { assign( this, options || {} ); this.setLocale(); }; I18N.prototype.setLocale = function( localeData ) { if ( localeData && localeData[ '' ] && localeData[ '' ][ 'key-hash' ] ) { var hashLength, minHashLength, maxHashLength, keyHash = localeData[ '' ][ 'key-hash' ]; var transform = function( string, hashLength ) { const lookupPrefix = hashLength === false ? '' : String( hashLength ); if ( typeof hashCache[ lookupPrefix + string ] !== 'undefined' ) { return hashCache[ lookupPrefix + string ]; } var hash = sha1().update( string ).digest('hex'); if ( hashLength ) { return hashCache[ lookupPrefix + string ] = hash.substr( 0, hashLength ); } return hashCache[ lookupPrefix + string ] = hash; }; var generateLookup = function( hashLength ) { return function( options ) { if ( options.context ) { options.original = transform( options.context + String.fromCharCode( 4 ) + options.original, hashLength ); delete options.context; } else { options.original = transform( options.original, hashLength ); } return options; }; } if ( keyHash.substr( 0, 4 ) === 'sha1' ) { if ( keyHash.length === 4 ) { translationLookup.push( generateLookup( false ) ); } else { var variableHashLengthPos = keyHash.substr( 5 ).indexOf( '-' ); if ( variableHashLengthPos < 0 ) { hashLength = Number( keyHash.substr( 5 ) ); translationLookup.push( generateLookup( hashLength ) ); } else { minHashLength = Number( keyHash.substr( 5, variableHashLengthPos ) ); maxHashLength = Number( keyHash.substr( 6 + variableHashLengthPos ) ); for ( hashLength = minHashLength; hashLength <= maxHashLength; hashLength++ ) { translationLookup.push( generateLookup( hashLength ) ); } } } } } // if localeData is not given, assumes default locale and reset if ( ! localeData || ! localeData[ '' ].localeSlug ) { this.state.locale = { '': { localeSlug: this.defaultLocaleSlug } }; } else if ( localeData[ '' ].localeSlug === this.state.localeSlug ) { // Exit if same data as current (comparing references only) if ( localeData === this.state.locale ) { return; } // merge new data into existing one assign( this.state.locale, localeData ); } else { this.state.locale = assign( {}, localeData ); } this.state.localeSlug = this.state.locale[ '' ].localeSlug; this.state.jed = new Jed( { locale_data: { messages: this.state.locale } } ); // Updates numberFormat preferences with settings from translations this.state.numberFormatSettings.decimal_point = getTranslationFromJed( this.state.jed, normalizeTranslateArguments( [ decimal_point_translation_key ] ) ); this.state.numberFormatSettings.thousands_sep = getTranslationFromJed( this.state.jed, normalizeTranslateArguments( [ thousands_sep_translation_key ] ) ); // If translation isn't set, define defaults. if ( this.state.numberFormatSettings.decimal_point === decimal_point_translation_key ) { this.state.numberFormatSettings.decimal_point = '.'; } if ( this.state.numberFormatSettings.thousands_sep === thousands_sep_translation_key ) { this.state.numberFormatSettings.thousands_sep = ','; } this.state.translations.clear(); this.stateObserver.emit( 'change' ); }; I18N.prototype.getLocale = function() { return this.state.locale; }; /** * Get the current locale slug. * @returns {string} The string representing the currently loaded locale **/ I18N.prototype.getLocaleSlug = function() { return this.state.localeSlug; }; /** * Adds new translations to the locale data, overwriting any existing translations with a matching key **/ I18N.prototype.addTranslations = function( localeData ) { for ( var prop in localeData ) { if ( prop !== '' ) { this.state.jed.options.locale_data.messages[prop] = localeData[prop]; } } this.state.translations.clear(); this.stateObserver.emit( 'change' ); }; /** * Checks whether the given original has a translation. Parameters are the same as for translate(). * * @param {string} original the string to translate * @param {string} plural the plural string to translate (if applicable), original used as singular * @param {object} options properties describing translation requirements for given text * @return {boolean} whether a translation exists */ I18N.prototype.hasTranslation = function() { return !! getTranslation( this, normalizeTranslateArguments( arguments ) ); } /** * Exposes single translation method, which is converted into its respective Jed method. * See sibling README * @param {string} original the string to translate * @param {string} plural the plural string to translate (if applicable), original used as singular * @param {object} options properties describing translation requirements for given text * @return {string|React-components} translated text or an object containing React children that can be inserted into a parent component */ I18N.prototype.translate = function() { var options, translation, sprintfArgs, errorMethod, optionsString, cacheable; options = normalizeTranslateArguments( arguments ); cacheable = ! options.components; if ( cacheable ) { // Safe JSON stringification here to catch Circular JSON error // caused by passing a React component into args where only scalars are allowed try { optionsString = JSON.stringify( options ); } catch ( e ) { cacheable = false; } if ( optionsString ) { translation = this.state.translations.get( optionsString ); // Return the cached translation. if ( translation ) { return translation; } } } translation = getTranslation( this, options ); if ( ! translation ) { // This purposefully calls jed for a case where there is no translation, // so that jed gives us the expected object with English text. translation = getTranslationFromJed( this.state.jed, options ); } // handle any string substitution if ( options.args ) { sprintfArgs = ( Array.isArray( options.args ) ) ? options.args.slice( 0 ) : [ options.args ]; sprintfArgs.unshift( translation ); try { translation = Jed.sprintf.apply( Jed, sprintfArgs ); } catch ( error ) { if ( ! window || ! window.console ) { return; } errorMethod = this.throwErrors ? 'error' : 'warn'; if ( typeof error !== 'string' ) { window.console[ errorMethod ]( error ); } else { window.console[ errorMethod ]( 'i18n sprintf error:', sprintfArgs ); } } } // interpolate any components if ( options.components ) { translation = interpolateComponents( { mixedString: translation, components: options.components, throwErrors: this.throwErrors } ); } // run any necessary hooks this.translateHooks.forEach( function( hook ) { translation = hook( translation, options ); } ); if ( cacheable ) { this.state.translations.set( optionsString, translation ); } return translation; }; /** * Causes i18n to re-render all translations. * * This can be necessary if an extension makes changes that i18n is unaware of * and needs those changes manifested immediately (e.g. adding an important * translation hook, or modifying the behaviour of an existing hook). * * If at all possible, react components should try to use the more local * updateTranslation() function inherited from the mixin. */ I18N.prototype.reRenderTranslations = function() { debug( 'Re-rendering all translations due to external request' ); this.state.translations.clear(); this.stateObserver.emit( 'change' ); }; I18N.prototype.registerComponentUpdateHook = function( callback ) { this.componentUpdateHooks.push( callback ); }; I18N.prototype.registerTranslateHook = function( callback ) { this.translateHooks.push( callback ); }; module.exports = I18N; /***/ }), /* 88 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { 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); } /* eslint-env browser */ /** * This is the web browser implementation of `debug()`. */ exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = localstorage(); /** * Colors. */ exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; /** * Currently only WebKit-based Web Inspectors, Firefox >= v31, * and the Firebug extension (any Firefox version) are known * to support "%c" CSS customizations. * * TODO: add a `localStorage` variable to explicitly enable/disable colors */ // eslint-disable-next-line complexity function useColors() { // NB: In an Electron preload script, document will be defined but not fully // initialized. Since we know we're in Chrome, we'll just detect this case // explicitly if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { return true; } // Internet Explorer and Edge do not support colors. if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { return false; } // Is webkit? http://stackoverflow.com/a/16459606/376773 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } /** * Colorize log arguments if enabled. * * @api public */ function formatArgs(args) { args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); if (!this.useColors) { return; } var c = 'color: ' + this.color; args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other // arguments passed either before or after the %c, so we need to // figure out the correct index to insert the CSS into var index = 0; var lastC = 0; args[0].replace(/%[a-zA-Z%]/g, function (match) { if (match === '%%') { return; } index++; if (match === '%c') { // We only are interested in the *last* %c // (the user may have provided their own) lastC = index; } }); args.splice(lastC, 0, c); } /** * Invokes `console.log()` when available. * No-op when `console.log` is not a "function". * * @api public */ function log() { var _console; // This hackery is required for IE8/9, where // the `console.log` function doesn't have 'apply' return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments); } /** * Save `namespaces`. * * @param {String} namespaces * @api private */ function save(namespaces) { try { if (namespaces) { exports.storage.setItem('debug', namespaces); } else { exports.storage.removeItem('debug'); } } catch (error) {// Swallow // XXX (@Qix-) should we be logging these? } } /** * Load `namespaces`. * * @return {String} returns the previously persisted debug modes * @api private */ function load() { var r; try { r = exports.storage.getItem('debug'); } catch (error) {} // Swallow // XXX (@Qix-) should we be logging these? // If debug isn't set in LS, and we're in Electron, try to load $DEBUG if (!r && typeof process !== 'undefined' && 'env' in process) { r = process.env.DEBUG; } return r; } /** * Localstorage attempts to return the localstorage. * * This is necessary because safari throws * when a user disables cookies/localstorage * and you attempt to access it. * * @return {LocalStorage} * @api private */ function localstorage() { try { // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context // The Browser also has localStorage in the global context. return localStorage; } catch (error) {// Swallow // XXX (@Qix-) should we be logging these? } } module.exports = __webpack_require__(89)(exports); var formatters = module.exports.formatters; /** * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. */ formatters.j = function (v) { try { return JSON.stringify(v); } catch (error) { return '[UnexpectedJSONParseError]: ' + error.message; } }; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 89 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * This is the common logic for both the Node.js and web browser * implementations of `debug()`. */ function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; createDebug.coerce = coerce; createDebug.disable = disable; createDebug.enable = enable; createDebug.enabled = enabled; createDebug.humanize = __webpack_require__(90); Object.keys(env).forEach(function (key) { createDebug[key] = env[key]; }); /** * Active `debug` instances. */ createDebug.instances = []; /** * The currently active debug mode names, and names to skip. */ createDebug.names = []; createDebug.skips = []; /** * Map of special "%n" handling functions, for the debug "format" argument. * * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". */ createDebug.formatters = {}; /** * Selects a color for a debug namespace * @param {String} namespace The namespace string for the for the debug instance to be colored * @return {Number|String} An ANSI color code for the given namespace * @api private */ function selectColor(namespace) { var hash = 0; for (var i = 0; i < namespace.length; i++) { hash = (hash << 5) - hash + namespace.charCodeAt(i); hash |= 0; // Convert to 32bit integer } return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; } createDebug.selectColor = selectColor; /** * Create a debugger with the given `namespace`. * * @param {String} namespace * @return {Function} * @api public */ function createDebug(namespace) { var prevTime; function debug() { // Disabled? if (!debug.enabled) { return; } for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var self = debug; // Set `diff` timestamp var curr = Number(new Date()); var ms = curr - (prevTime || curr); self.diff = ms; self.prev = prevTime; self.curr = curr; prevTime = curr; args[0] = createDebug.coerce(args[0]); if (typeof args[0] !== 'string') { // Anything else let's inspect with %O args.unshift('%O'); } // Apply any `formatters` transformations var index = 0; args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { // If we encounter an escaped % then don't increase the array index if (match === '%%') { return match; } index++; var formatter = createDebug.formatters[format]; if (typeof formatter === 'function') { var val = args[index]; match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` args.splice(index, 1); index--; } return match; }); // Apply env-specific formatting (colors, etc.) createDebug.formatArgs.call(self, args); var logFn = self.log || createDebug.log; logFn.apply(self, args); } debug.namespace = namespace; debug.enabled = createDebug.enabled(namespace); debug.useColors = createDebug.useColors(); debug.color = selectColor(namespace); debug.destroy = destroy; debug.extend = extend; // Debug.formatArgs = formatArgs; // debug.rawLog = rawLog; // env-specific initialization logic for debug instances if (typeof createDebug.init === 'function') { createDebug.init(debug); } createDebug.instances.push(debug); return debug; } function destroy() { var index = createDebug.instances.indexOf(this); if (index !== -1) { createDebug.instances.splice(index, 1); return true; } return false; } function extend(namespace, delimiter) { return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); } /** * Enables a debug mode by namespaces. This can include modes * separated by a colon and wildcards. * * @param {String} namespaces * @api public */ function enable(namespaces) { createDebug.save(namespaces); createDebug.names = []; createDebug.skips = []; var i; var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); var len = split.length; for (i = 0; i < len; i++) { if (!split[i]) { // ignore empty strings continue; } namespaces = split[i].replace(/\*/g, '.*?'); if (namespaces[0] === '-') { createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); } else { createDebug.names.push(new RegExp('^' + namespaces + '$')); } } for (i = 0; i < createDebug.instances.length; i++) { var instance = createDebug.instances[i]; instance.enabled = createDebug.enabled(instance.namespace); } } /** * Disable debug output. * * @api public */ function disable() { createDebug.enable(''); } /** * Returns true if the given mode name is enabled, false otherwise. * * @param {String} name * @return {Boolean} * @api public */ function enabled(name) { if (name[name.length - 1] === '*') { return true; } var i; var len; for (i = 0, len = createDebug.skips.length; i < len; i++) { if (createDebug.skips[i].test(name)) { return false; } } for (i = 0, len = createDebug.names.length; i < len; i++) { if (createDebug.names[i].test(name)) { return true; } } return false; } /** * Coerce `val`. * * @param {Mixed} val * @return {Mixed} * @api private */ function coerce(val) { if (val instanceof Error) { return val.stack || val.message; } return val; } createDebug.enable(createDebug.load()); return createDebug; } module.exports = setup; /***/ }), /* 90 */ /***/ (function(module, exports) { /** * Helpers. */ var s = 1000; var m = s * 60; var h = m * 60; var d = h * 24; var w = d * 7; var y = d * 365.25; /** * Parse or format the given `val`. * * Options: * * - `long` verbose formatting [false] * * @param {String|Number} val * @param {Object} [options] * @throws {Error} throw an error if val is not a non-empty string or a number * @return {String|Number} * @api public */ module.exports = function(val, options) { options = options || {}; var type = typeof val; if (type === 'string' && val.length > 0) { return parse(val); } else if (type === 'number' && isFinite(val)) { return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( 'val is not a non-empty string or a valid number. val=' + JSON.stringify(val) ); }; /** * Parse the given `str` and return milliseconds. * * @param {String} str * @return {Number} * @api private */ function parse(str) { str = String(str); if (str.length > 100) { return; } var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( str ); if (!match) { return; } var n = parseFloat(match[1]); var type = (match[2] || 'ms').toLowerCase(); switch (type) { case 'years': case 'year': case 'yrs': case 'yr': case 'y': return n * y; case 'weeks': case 'week': case 'w': return n * w; case 'days': case 'day': case 'd': return n * d; case 'hours': case 'hour': case 'hrs': case 'hr': case 'h': return n * h; case 'minutes': case 'minute': case 'mins': case 'min': case 'm': return n * m; case 'seconds': case 'second': case 'secs': case 'sec': case 's': return n * s; case 'milliseconds': case 'millisecond': case 'msecs': case 'msec': case 'ms': return n; default: return undefined; } } /** * Short format for `ms`. * * @param {Number} ms * @return {String} * @api private */ function fmtShort(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return Math.round(ms / d) + 'd'; } if (msAbs >= h) { return Math.round(ms / h) + 'h'; } if (msAbs >= m) { return Math.round(ms / m) + 'm'; } if (msAbs >= s) { return Math.round(ms / s) + 's'; } return ms + 'ms'; } /** * Long format for `ms`. * * @param {Number} ms * @return {String} * @api private */ function fmtLong(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return plural(ms, msAbs, d, 'day'); } if (msAbs >= h) { return plural(ms, msAbs, h, 'hour'); } if (msAbs >= m) { return plural(ms, msAbs, m, 'minute'); } if (msAbs >= s) { return plural(ms, msAbs, s, 'second'); } return ms + ' ms'; } /** * Pluralization helper. */ function plural(ms, msAbs, n, name) { var isPlural = msAbs >= n * 1.5; return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); } /***/ }), /* 91 */ /***/ (function(module, exports, __webpack_require__) { /** * @preserve jed.js v0.5.0beta https://github.com/SlexAxton/Jed */ /* ----------- A gettext compatible i18n library for modern JavaScript Applications by Alex Sexton - AlexSexton [at] gmail - @SlexAxton WTFPL license for use Dojo CLA for contributions Jed offers the entire applicable GNU gettext spec'd set of functions, but also offers some nicer wrappers around them. The api for gettext was written for a language with no function overloading, so Jed allows a little more of that. Many thanks to Joshua I. Miller - unrtst@cpan.org - who wrote gettext.js back in 2008. I was able to vet a lot of my ideas against his. I also made sure Jed passed against his tests in order to offer easy upgrades -- jsgettext.berlios.de */ (function (root, undef) { // Set up some underscore-style functions, if you already have // underscore, feel free to delete this section, and use it // directly, however, the amount of functions used doesn't // warrant having underscore as a full dependency. // Underscore 1.3.0 was used to port and is licensed // under the MIT License by Jeremy Ashkenas. var ArrayProto = Array.prototype, ObjProto = Object.prototype, slice = ArrayProto.slice, hasOwnProp = ObjProto.hasOwnProperty, nativeForEach = ArrayProto.forEach, breaker = {}; // We're not using the OOP style _ so we don't need the // extra level of indirection. This still means that you // sub out for real `_` though. var _ = { forEach : function( obj, iterator, context ) { var i, l, key; if ( obj === null ) { return; } if ( nativeForEach && obj.forEach === nativeForEach ) { obj.forEach( iterator, context ); } else if ( obj.length === +obj.length ) { for ( i = 0, l = obj.length; i < l; i++ ) { if ( i in obj && iterator.call( context, obj[i], i, obj ) === breaker ) { return; } } } else { for ( key in obj) { if ( hasOwnProp.call( obj, key ) ) { if ( iterator.call (context, obj[key], key, obj ) === breaker ) { return; } } } } }, extend : function( obj ) { this.forEach( slice.call( arguments, 1 ), function ( source ) { for ( var prop in source ) { obj[prop] = source[prop]; } }); return obj; } }; // END Miniature underscore impl // Jed is a constructor function var Jed = function ( options ) { // Some minimal defaults this.defaults = { "locale_data" : { "messages" : { "" : { "domain" : "messages", "lang" : "en", "plural_forms" : "nplurals=2; plural=(n != 1);" } // There are no default keys, though } }, // The default domain if one is missing "domain" : "messages", // enable debug mode to log untranslated strings to the console "debug" : false }; // Mix in the sent options with the default options this.options = _.extend( {}, this.defaults, options ); this.textdomain( this.options.domain ); if ( options.domain && ! this.options.locale_data[ this.options.domain ] ) { throw new Error('Text domain set to non-existent domain: `' + options.domain + '`'); } }; // The gettext spec sets this character as the default // delimiter for context lookups. // e.g.: context\u0004key // If your translation company uses something different, // just change this at any time and it will use that instead. Jed.context_delimiter = String.fromCharCode( 4 ); function getPluralFormFunc ( plural_form_string ) { return Jed.PF.compile( plural_form_string || "nplurals=2; plural=(n != 1);"); } function Chain( key, i18n ){ this._key = key; this._i18n = i18n; } // Create a chainable api for adding args prettily _.extend( Chain.prototype, { onDomain : function ( domain ) { this._domain = domain; return this; }, withContext : function ( context ) { this._context = context; return this; }, ifPlural : function ( num, pkey ) { this._val = num; this._pkey = pkey; return this; }, fetch : function ( sArr ) { if ( {}.toString.call( sArr ) != '[object Array]' ) { sArr = [].slice.call(arguments, 0); } return ( sArr && sArr.length ? Jed.sprintf : function(x){ return x; } )( this._i18n.dcnpgettext(this._domain, this._context, this._key, this._pkey, this._val), sArr ); } }); // Add functions to the Jed prototype. // These will be the functions on the object that's returned // from creating a `new Jed()` // These seem redundant, but they gzip pretty well. _.extend( Jed.prototype, { // The sexier api start point translate : function ( key ) { return new Chain( key, this ); }, textdomain : function ( domain ) { if ( ! domain ) { return this._textdomain; } this._textdomain = domain; }, gettext : function ( key ) { return this.dcnpgettext.call( this, undef, undef, key ); }, dgettext : function ( domain, key ) { return this.dcnpgettext.call( this, domain, undef, key ); }, dcgettext : function ( domain , key /*, category */ ) { // Ignores the category anyways return this.dcnpgettext.call( this, domain, undef, key ); }, ngettext : function ( skey, pkey, val ) { return this.dcnpgettext.call( this, undef, undef, skey, pkey, val ); }, dngettext : function ( domain, skey, pkey, val ) { return this.dcnpgettext.call( this, domain, undef, skey, pkey, val ); }, dcngettext : function ( domain, skey, pkey, val/*, category */) { return this.dcnpgettext.call( this, domain, undef, skey, pkey, val ); }, pgettext : function ( context, key ) { return this.dcnpgettext.call( this, undef, context, key ); }, dpgettext : function ( domain, context, key ) { return this.dcnpgettext.call( this, domain, context, key ); }, dcpgettext : function ( domain, context, key/*, category */) { return this.dcnpgettext.call( this, domain, context, key ); }, npgettext : function ( context, skey, pkey, val ) { return this.dcnpgettext.call( this, undef, context, skey, pkey, val ); }, dnpgettext : function ( domain, context, skey, pkey, val ) { return this.dcnpgettext.call( this, domain, context, skey, pkey, val ); }, // The most fully qualified gettext function. It has every option. // Since it has every option, we can use it from every other method. // This is the bread and butter. // Technically there should be one more argument in this function for 'Category', // but since we never use it, we might as well not waste the bytes to define it. dcnpgettext : function ( domain, context, singular_key, plural_key, val ) { // Set some defaults plural_key = plural_key || singular_key; // Use the global domain default if one // isn't explicitly passed in domain = domain || this._textdomain; var fallback; // Handle special cases // No options found if ( ! this.options ) { // There's likely something wrong, but we'll return the correct key for english // We do this by instantiating a brand new Jed instance with the default set // for everything that could be broken. fallback = new Jed(); return fallback.dcnpgettext.call( fallback, undefined, undefined, singular_key, plural_key, val ); } // No translation data provided if ( ! this.options.locale_data ) { throw new Error('No locale data provided.'); } if ( ! this.options.locale_data[ domain ] ) { throw new Error('Domain `' + domain + '` was not found.'); } if ( ! this.options.locale_data[ domain ][ "" ] ) { throw new Error('No locale meta information provided.'); } // Make sure we have a truthy key. Otherwise we might start looking // into the empty string key, which is the options for the locale // data. if ( ! singular_key ) { throw new Error('No translation key found.'); } var key = context ? context + Jed.context_delimiter + singular_key : singular_key, locale_data = this.options.locale_data, dict = locale_data[ domain ], defaultConf = (locale_data.messages || this.defaults.locale_data.messages)[""], pluralForms = dict[""].plural_forms || dict[""]["Plural-Forms"] || dict[""]["plural-forms"] || defaultConf.plural_forms || defaultConf["Plural-Forms"] || defaultConf["plural-forms"], val_list, res; var val_idx; if (val === undefined) { // No value passed in; assume singular key lookup. val_idx = 1; } else { // Value has been passed in; use plural-forms calculations. // Handle invalid numbers, but try casting strings for good measure if ( typeof val != 'number' ) { val = parseInt( val, 10 ); if ( isNaN( val ) ) { throw new Error('The number that was passed in is not a number.'); } } val_idx = getPluralFormFunc(pluralForms)(val) + 1; } // Throw an error if a domain isn't found if ( ! dict ) { throw new Error('No domain named `' + domain + '` could be found.'); } val_list = dict[ key ]; // If there is no match, then revert back to // english style singular/plural with the keys passed in. if ( ! val_list || val_idx >= val_list.length ) { if (this.options.missing_key_callback) { this.options.missing_key_callback(key, domain); } res = [ null, singular_key, plural_key ]; // collect untranslated strings if (this.options.debug===true) { console.log(res[ getPluralFormFunc(pluralForms)( val ) + 1 ]); } return res[ getPluralFormFunc()( val ) + 1 ]; } res = val_list[ val_idx ]; // This includes empty strings on purpose if ( ! res ) { res = [ null, singular_key, plural_key ]; return res[ getPluralFormFunc()( val ) + 1 ]; } return res; } }); // We add in sprintf capabilities for post translation value interolation // This is not internally used, so you can remove it if you have this // available somewhere else, or want to use a different system. // We _slightly_ modify the normal sprintf behavior to more gracefully handle // undefined values. /** sprintf() for JavaScript 0.7-beta1 http://www.diveintojavascript.com/projects/javascript-sprintf Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of sprintf() for JavaScript nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ var sprintf = (function() { function get_type(variable) { return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase(); } function str_repeat(input, multiplier) { for (var output = []; multiplier > 0; output[--multiplier] = input) {/* do nothing */} return output.join(''); } var str_format = function() { if (!str_format.cache.hasOwnProperty(arguments[0])) { str_format.cache[arguments[0]] = str_format.parse(arguments[0]); } return str_format.format.call(null, str_format.cache[arguments[0]], arguments); }; str_format.format = function(parse_tree, argv) { var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length; for (i = 0; i < tree_length; i++) { node_type = get_type(parse_tree[i]); if (node_type === 'string') { output.push(parse_tree[i]); } else if (node_type === 'array') { match = parse_tree[i]; // convenience purposes only if (match[2]) { // keyword argument arg = argv[cursor]; for (k = 0; k < match[2].length; k++) { if (!arg.hasOwnProperty(match[2][k])) { throw(sprintf('[sprintf] property "%s" does not exist', match[2][k])); } arg = arg[match[2][k]]; } } else if (match[1]) { // positional argument (explicit) arg = argv[match[1]]; } else { // positional argument (implicit) arg = argv[cursor++]; } if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) { throw(sprintf('[sprintf] expecting number but found %s', get_type(arg))); } // Jed EDIT if ( typeof arg == 'undefined' || arg === null ) { arg = ''; } // Jed EDIT switch (match[8]) { case 'b': arg = arg.toString(2); break; case 'c': arg = String.fromCharCode(arg); break; case 'd': arg = parseInt(arg, 10); break; case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break; case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break; case 'o': arg = arg.toString(8); break; case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break; case 'u': arg = Math.abs(arg); break; case 'x': arg = arg.toString(16); break; case 'X': arg = arg.toString(16).toUpperCase(); break; } arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg); pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' '; pad_length = match[6] - String(arg).length; pad = match[6] ? str_repeat(pad_character, pad_length) : ''; output.push(match[5] ? arg + pad : pad + arg); } } return output.join(''); }; str_format.cache = {}; str_format.parse = function(fmt) { var _fmt = fmt, match = [], parse_tree = [], arg_names = 0; while (_fmt) { if ((match = /^[^\x25]+/.exec(_fmt)) !== null) { parse_tree.push(match[0]); } else if ((match = /^\x25{2}/.exec(_fmt)) !== null) { parse_tree.push('%'); } else if ((match = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)) !== null) { if (match[2]) { arg_names |= 1; var field_list = [], replacement_field = match[2], field_match = []; if ((field_match = /^([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) { field_list.push(field_match[1]); while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') { if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) { field_list.push(field_match[1]); } else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) { field_list.push(field_match[1]); } else { throw('[sprintf] huh?'); } } } else { throw('[sprintf] huh?'); } match[2] = field_list; } else { arg_names |= 2; } if (arg_names === 3) { throw('[sprintf] mixing positional and named placeholders is not (yet) supported'); } parse_tree.push(match); } else { throw('[sprintf] huh?'); } _fmt = _fmt.substring(match[0].length); } return parse_tree; }; return str_format; })(); var vsprintf = function(fmt, argv) { argv.unshift(fmt); return sprintf.apply(null, argv); }; Jed.parse_plural = function ( plural_forms, n ) { plural_forms = plural_forms.replace(/n/g, n); return Jed.parse_expression(plural_forms); }; Jed.sprintf = function ( fmt, args ) { if ( {}.toString.call( args ) == '[object Array]' ) { return vsprintf( fmt, [].slice.call(args) ); } return sprintf.apply(this, [].slice.call(arguments) ); }; Jed.prototype.sprintf = function () { return Jed.sprintf.apply(this, arguments); }; // END sprintf Implementation // Start the Plural forms section // This is a full plural form expression parser. It is used to avoid // running 'eval' or 'new Function' directly against the plural // forms. // // This can be important if you get translations done through a 3rd // party vendor. I encourage you to use this instead, however, I // also will provide a 'precompiler' that you can use at build time // to output valid/safe function representations of the plural form // expressions. This means you can build this code out for the most // part. Jed.PF = {}; Jed.PF.parse = function ( p ) { var plural_str = Jed.PF.extractPluralExpr( p ); return Jed.PF.parser.parse.call(Jed.PF.parser, plural_str); }; Jed.PF.compile = function ( p ) { // Handle trues and falses as 0 and 1 function imply( val ) { return (val === true ? 1 : val ? val : 0); } var ast = Jed.PF.parse( p ); return function ( n ) { return imply( Jed.PF.interpreter( ast )( n ) ); }; }; Jed.PF.interpreter = function ( ast ) { return function ( n ) { var res; switch ( ast.type ) { case 'GROUP': return Jed.PF.interpreter( ast.expr )( n ); case 'TERNARY': if ( Jed.PF.interpreter( ast.expr )( n ) ) { return Jed.PF.interpreter( ast.truthy )( n ); } return Jed.PF.interpreter( ast.falsey )( n ); case 'OR': return Jed.PF.interpreter( ast.left )( n ) || Jed.PF.interpreter( ast.right )( n ); case 'AND': return Jed.PF.interpreter( ast.left )( n ) && Jed.PF.interpreter( ast.right )( n ); case 'LT': return Jed.PF.interpreter( ast.left )( n ) < Jed.PF.interpreter( ast.right )( n ); case 'GT': return Jed.PF.interpreter( ast.left )( n ) > Jed.PF.interpreter( ast.right )( n ); case 'LTE': return Jed.PF.interpreter( ast.left )( n ) <= Jed.PF.interpreter( ast.right )( n ); case 'GTE': return Jed.PF.interpreter( ast.left )( n ) >= Jed.PF.interpreter( ast.right )( n ); case 'EQ': return Jed.PF.interpreter( ast.left )( n ) == Jed.PF.interpreter( ast.right )( n ); case 'NEQ': return Jed.PF.interpreter( ast.left )( n ) != Jed.PF.interpreter( ast.right )( n ); case 'MOD': return Jed.PF.interpreter( ast.left )( n ) % Jed.PF.interpreter( ast.right )( n ); case 'VAR': return n; case 'NUM': return ast.val; default: throw new Error("Invalid Token found."); } }; }; Jed.PF.extractPluralExpr = function ( p ) { // trim first p = p.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); if (! /;\s*$/.test(p)) { p = p.concat(';'); } var nplurals_re = /nplurals\=(\d+);/, plural_re = /plural\=(.*);/, nplurals_matches = p.match( nplurals_re ), res = {}, plural_matches; // Find the nplurals number if ( nplurals_matches.length > 1 ) { res.nplurals = nplurals_matches[1]; } else { throw new Error('nplurals not found in plural_forms string: ' + p ); } // remove that data to get to the formula p = p.replace( nplurals_re, "" ); plural_matches = p.match( plural_re ); if (!( plural_matches && plural_matches.length > 1 ) ) { throw new Error('`plural` expression not found: ' + p); } return plural_matches[ 1 ]; }; /* Jison generated parser */ Jed.PF.parser = (function(){ var parser = {trace: function trace() { }, yy: {}, symbols_: {"error":2,"expressions":3,"e":4,"EOF":5,"?":6,":":7,"||":8,"&&":9,"<":10,"<=":11,">":12,">=":13,"!=":14,"==":15,"%":16,"(":17,")":18,"n":19,"NUMBER":20,"$accept":0,"$end":1}, terminals_: {2:"error",5:"EOF",6:"?",7:":",8:"||",9:"&&",10:"<",11:"<=",12:">",13:">=",14:"!=",15:"==",16:"%",17:"(",18:")",19:"n",20:"NUMBER"}, productions_: [0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]], performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) { var $0 = $$.length - 1; switch (yystate) { case 1: return { type : 'GROUP', expr: $$[$0-1] }; break; case 2:this.$ = { type: 'TERNARY', expr: $$[$0-4], truthy : $$[$0-2], falsey: $$[$0] }; break; case 3:this.$ = { type: "OR", left: $$[$0-2], right: $$[$0] }; break; case 4:this.$ = { type: "AND", left: $$[$0-2], right: $$[$0] }; break; case 5:this.$ = { type: 'LT', left: $$[$0-2], right: $$[$0] }; break; case 6:this.$ = { type: 'LTE', left: $$[$0-2], right: $$[$0] }; break; case 7:this.$ = { type: 'GT', left: $$[$0-2], right: $$[$0] }; break; case 8:this.$ = { type: 'GTE', left: $$[$0-2], right: $$[$0] }; break; case 9:this.$ = { type: 'NEQ', left: $$[$0-2], right: $$[$0] }; break; case 10:this.$ = { type: 'EQ', left: $$[$0-2], right: $$[$0] }; break; case 11:this.$ = { type: 'MOD', left: $$[$0-2], right: $$[$0] }; break; case 12:this.$ = { type: 'GROUP', expr: $$[$0-1] }; break; case 13:this.$ = { type: 'VAR' }; break; case 14:this.$ = { type: 'NUM', val: Number(yytext) }; break; } }, table: [{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}], defaultActions: {6:[2,1]}, parseError: function parseError(str, hash) { throw new Error(str); }, parse: function parse(input) { var self = this, stack = [0], vstack = [null], // semantic value stack lstack = [], // location stack table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; //this.reductionCount = this.shiftCount = 0; this.lexer.setInput(input); this.lexer.yy = this.yy; this.yy.lexer = this.lexer; if (typeof this.lexer.yylloc == 'undefined') this.lexer.yylloc = {}; var yyloc = this.lexer.yylloc; lstack.push(yyloc); if (typeof this.yy.parseError === 'function') this.parseError = this.yy.parseError; function popStack (n) { stack.length = stack.length - 2*n; vstack.length = vstack.length - n; lstack.length = lstack.length - n; } function lex() { var token; token = self.lexer.lex() || 1; // $end = 1 // if token isn't its numeric value, convert if (typeof token !== 'number') { token = self.symbols_[token] || token; } return token; } var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected; while (true) { // retreive state number from top of stack state = stack[stack.length-1]; // use default actions if available if (this.defaultActions[state]) { action = this.defaultActions[state]; } else { if (symbol == null) symbol = lex(); // read action for current state and first input action = table[state] && table[state][symbol]; } // handle parse error _handle_error: if (typeof action === 'undefined' || !action.length || !action[0]) { if (!recovering) { // Report error expected = []; for (p in table[state]) if (this.terminals_[p] && p > 2) { expected.push("'"+this.terminals_[p]+"'"); } var errStr = ''; if (this.lexer.showPosition) { errStr = 'Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(', ') + ", got '" + this.terminals_[symbol]+ "'"; } else { errStr = 'Parse error on line '+(yylineno+1)+": Unexpected " + (symbol == 1 /*EOF*/ ? "end of input" : ("'"+(this.terminals_[symbol] || symbol)+"'")); } this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); } // just recovered from another error if (recovering == 3) { if (symbol == EOF) { throw new Error(errStr || 'Parsing halted.'); } // discard current lookahead and grab another yyleng = this.lexer.yyleng; yytext = this.lexer.yytext; yylineno = this.lexer.yylineno; yyloc = this.lexer.yylloc; symbol = lex(); } // try to recover from error while (1) { // check for error recovery rule in this state if ((TERROR.toString()) in table[state]) { break; } if (state == 0) { throw new Error(errStr || 'Parsing halted.'); } popStack(1); state = stack[stack.length-1]; } preErrorSymbol = symbol; // save the lookahead token symbol = TERROR; // insert generic error symbol as new lookahead state = stack[stack.length-1]; action = table[state] && table[state][TERROR]; recovering = 3; // allow 3 real symbols to be shifted before reporting a new error } // this shouldn't happen, unless resolve defaults are off if (action[0] instanceof Array && action.length > 1) { throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol); } switch (action[0]) { case 1: // shift //this.shiftCount++; stack.push(symbol); vstack.push(this.lexer.yytext); lstack.push(this.lexer.yylloc); stack.push(action[1]); // push state symbol = null; if (!preErrorSymbol) { // normal execution/no error yyleng = this.lexer.yyleng; yytext = this.lexer.yytext; yylineno = this.lexer.yylineno; yyloc = this.lexer.yylloc; if (recovering > 0) recovering--; } else { // error just occurred, resume old lookahead f/ before error symbol = preErrorSymbol; preErrorSymbol = null; } break; case 2: // reduce //this.reductionCount++; len = this.productions_[action[1]][1]; // perform semantic action yyval.$ = vstack[vstack.length-len]; // default to $$ = $1 // default location, uses first token for firsts, last for lasts yyval._$ = { first_line: lstack[lstack.length-(len||1)].first_line, last_line: lstack[lstack.length-1].last_line, first_column: lstack[lstack.length-(len||1)].first_column, last_column: lstack[lstack.length-1].last_column }; r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); if (typeof r !== 'undefined') { return r; } // pop off stack if (len) { stack = stack.slice(0,-1*len*2); vstack = vstack.slice(0, -1*len); lstack = lstack.slice(0, -1*len); } stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce) vstack.push(yyval.$); lstack.push(yyval._$); // goto new state = table[STATE][NONTERMINAL] newState = table[stack[stack.length-2]][stack[stack.length-1]]; stack.push(newState); break; case 3: // accept return true; } } return true; }};/* Jison generated lexer */ var lexer = (function(){ var lexer = ({EOF:1, parseError:function parseError(str, hash) { if (this.yy.parseError) { this.yy.parseError(str, hash); } else { throw new Error(str); } }, setInput:function (input) { this._input = input; this._more = this._less = this.done = false; this.yylineno = this.yyleng = 0; this.yytext = this.matched = this.match = ''; this.conditionStack = ['INITIAL']; this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0}; return this; }, input:function () { var ch = this._input[0]; this.yytext+=ch; this.yyleng++; this.match+=ch; this.matched+=ch; var lines = ch.match(/\n/); if (lines) this.yylineno++; this._input = this._input.slice(1); return ch; }, unput:function (ch) { this._input = ch + this._input; return this; }, more:function () { this._more = true; return this; }, pastInput:function () { var past = this.matched.substr(0, this.matched.length - this.match.length); return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); }, upcomingInput:function () { var next = this.match; if (next.length < 20) { next += this._input.substr(0, 20-next.length); } return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, ""); }, showPosition:function () { var pre = this.pastInput(); var c = new Array(pre.length + 1).join("-"); return pre + this.upcomingInput() + "\n" + c+"^"; }, next:function () { if (this.done) { return this.EOF; } if (!this._input) this.done = true; var token, match, col, lines; if (!this._more) { this.yytext = ''; this.match = ''; } var rules = this._currentRules(); for (var i=0;i < rules.length; i++) { match = this._input.match(this.rules[rules[i]]); if (match) { lines = match[0].match(/\n.*/g); if (lines) this.yylineno += lines.length; this.yylloc = {first_line: this.yylloc.last_line, last_line: this.yylineno+1, first_column: this.yylloc.last_column, last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length} this.yytext += match[0]; this.match += match[0]; this.matches = match; this.yyleng = this.yytext.length; this._more = false; this._input = this._input.slice(match[0].length); this.matched += match[0]; token = this.performAction.call(this, this.yy, this, rules[i],this.conditionStack[this.conditionStack.length-1]); if (token) return token; else return; } } if (this._input === "") { return this.EOF; } else { this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(), {text: "", token: null, line: this.yylineno}); } }, lex:function lex() { var r = this.next(); if (typeof r !== 'undefined') { return r; } else { return this.lex(); } }, begin:function begin(condition) { this.conditionStack.push(condition); }, popState:function popState() { return this.conditionStack.pop(); }, _currentRules:function _currentRules() { return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules; }, topState:function () { return this.conditionStack[this.conditionStack.length-2]; }, pushState:function begin(condition) { this.begin(condition); }}); lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { var YYSTATE=YY_START; switch($avoiding_name_collisions) { case 0:/* skip whitespace */ break; case 1:return 20 break; case 2:return 19 break; case 3:return 8 break; case 4:return 9 break; case 5:return 6 break; case 6:return 7 break; case 7:return 11 break; case 8:return 13 break; case 9:return 10 break; case 10:return 12 break; case 11:return 14 break; case 12:return 15 break; case 13:return 16 break; case 14:return 17 break; case 15:return 18 break; case 16:return 5 break; case 17:return 'INVALID' break; } }; lexer.rules = [/^\s+/,/^[0-9]+(\.[0-9]+)?\b/,/^n\b/,/^\|\|/,/^&&/,/^\?/,/^:/,/^<=/,/^>=/,/^</,/^>/,/^!=/,/^==/,/^%/,/^\(/,/^\)/,/^$/,/^./]; lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],"inclusive":true}};return lexer;})() parser.lexer = lexer; return parser; })(); // End parser // Handle node, amd, and global systems if (true) { if (typeof module !== 'undefined' && module.exports) { exports = module.exports = Jed; } exports.Jed = Jed; } else { if (typeof define === 'function' && define.amd) { define('jed', function() { return Jed; }); } // Leak a global regardless of module system root['Jed'] = Jed; } })(this); /***/ }), /* 92 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(36); var common = __webpack_require__(93); var shaCommon = __webpack_require__(94); var rotl32 = utils.rotl32; var sum32 = utils.sum32; var sum32_5 = utils.sum32_5; var ft_1 = shaCommon.ft_1; var BlockHash = common.BlockHash; var sha1_K = [ 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6 ]; function SHA1() { if (!(this instanceof SHA1)) return new SHA1(); BlockHash.call(this); this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ]; this.W = new Array(80); } utils.inherits(SHA1, BlockHash); module.exports = SHA1; SHA1.blockSize = 512; SHA1.outSize = 160; SHA1.hmacStrength = 80; SHA1.padLength = 64; SHA1.prototype._update = function _update(msg, start) { var W = this.W; for (var i = 0; i < 16; i++) W[i] = msg[start + i]; for(; i < W.length; i++) W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); var a = this.h[0]; var b = this.h[1]; var c = this.h[2]; var d = this.h[3]; var e = this.h[4]; for (i = 0; i < W.length; i++) { var s = ~~(i / 20); var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]); e = d; d = c; c = rotl32(b, 30); b = a; a = t; } this.h[0] = sum32(this.h[0], a); this.h[1] = sum32(this.h[1], b); this.h[2] = sum32(this.h[2], c); this.h[3] = sum32(this.h[3], d); this.h[4] = sum32(this.h[4], e); }; SHA1.prototype._digest = function digest(enc) { if (enc === 'hex') return utils.toHex32(this.h, 'big'); else return utils.split32(this.h, 'big'); }; /***/ }), /* 93 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(36); var assert = __webpack_require__(53); function BlockHash() { this.pending = null; this.pendingTotal = 0; this.blockSize = this.constructor.blockSize; this.outSize = this.constructor.outSize; this.hmacStrength = this.constructor.hmacStrength; this.padLength = this.constructor.padLength / 8; this.endian = 'big'; this._delta8 = this.blockSize / 8; this._delta32 = this.blockSize / 32; } exports.BlockHash = BlockHash; BlockHash.prototype.update = function update(msg, enc) { // Convert message to array, pad it, and join into 32bit blocks msg = utils.toArray(msg, enc); if (!this.pending) this.pending = msg; else this.pending = this.pending.concat(msg); this.pendingTotal += msg.length; // Enough data, try updating if (this.pending.length >= this._delta8) { msg = this.pending; // Process pending data in blocks var r = msg.length % this._delta8; this.pending = msg.slice(msg.length - r, msg.length); if (this.pending.length === 0) this.pending = null; msg = utils.join32(msg, 0, msg.length - r, this.endian); for (var i = 0; i < msg.length; i += this._delta32) this._update(msg, i, i + this._delta32); } return this; }; BlockHash.prototype.digest = function digest(enc) { this.update(this._pad()); assert(this.pending === null); return this._digest(enc); }; BlockHash.prototype._pad = function pad() { var len = this.pendingTotal; var bytes = this._delta8; var k = bytes - ((len + this.padLength) % bytes); var res = new Array(k + this.padLength); res[0] = 0x80; for (var i = 1; i < k; i++) res[i] = 0; // Append length len <<= 3; if (this.endian === 'big') { for (var t = 8; t < this.padLength; t++) res[i++] = 0; res[i++] = 0; res[i++] = 0; res[i++] = 0; res[i++] = 0; res[i++] = (len >>> 24) & 0xff; res[i++] = (len >>> 16) & 0xff; res[i++] = (len >>> 8) & 0xff; res[i++] = len & 0xff; } else { res[i++] = len & 0xff; res[i++] = (len >>> 8) & 0xff; res[i++] = (len >>> 16) & 0xff; res[i++] = (len >>> 24) & 0xff; res[i++] = 0; res[i++] = 0; res[i++] = 0; res[i++] = 0; for (t = 8; t < this.padLength; t++) res[i++] = 0; } return res; }; /***/ }), /* 94 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(36); var rotr32 = utils.rotr32; function ft_1(s, x, y, z) { if (s === 0) return ch32(x, y, z); if (s === 1 || s === 3) return p32(x, y, z); if (s === 2) return maj32(x, y, z); } exports.ft_1 = ft_1; function ch32(x, y, z) { return (x & y) ^ ((~x) & z); } exports.ch32 = ch32; function maj32(x, y, z) { return (x & y) ^ (x & z) ^ (y & z); } exports.maj32 = maj32; function p32(x, y, z) { return x ^ y ^ z; } exports.p32 = p32; function s0_256(x) { return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22); } exports.s0_256 = s0_256; function s1_256(x) { return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25); } exports.s1_256 = s1_256; function g0_256(x) { return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3); } exports.g0_256 = g0_256; function g1_256(x) { return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10); } exports.g1_256 = g1_256; /***/ }), /* 95 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /** * External Dependencies */ /** * Internal Dependencies */ var _react = __webpack_require__(96); var _react2 = _interopRequireDefault(_react); var _reactAddonsCreateFragment = __webpack_require__(101); var _reactAddonsCreateFragment2 = _interopRequireDefault(_reactAddonsCreateFragment); var _tokenize = __webpack_require__(104); var _tokenize2 = _interopRequireDefault(_tokenize); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var currentMixedString = void 0; function getCloseIndex(openIndex, tokens) { var openToken = tokens[openIndex], nestLevel = 0, token, i; for (i = openIndex + 1; i < tokens.length; i++) { token = tokens[i]; if (token.value === openToken.value) { if (token.type === 'componentOpen') { nestLevel++; continue; } if (token.type === 'componentClose') { if (nestLevel === 0) { return i; } nestLevel--; } } } // if we get this far, there was no matching close token throw new Error('Missing closing component token `' + openToken.value + '`'); } function buildChildren(tokens, components) { var children = [], childrenObject = {}, openComponent, clonedOpenComponent, openIndex, closeIndex, token, i, grandChildTokens, grandChildren, siblingTokens, siblings; for (i = 0; i < tokens.length; i++) { token = tokens[i]; if (token.type === 'string') { children.push(token.value); continue; } // component node should at least be set if (!components.hasOwnProperty(token.value) || typeof components[token.value] === 'undefined') { throw new Error('Invalid interpolation, missing component node: `' + token.value + '`'); } // should be either ReactElement or null (both type "object"), all other types deprecated if (_typeof(components[token.value]) !== 'object') { throw new Error('Invalid interpolation, component node must be a ReactElement or null: `' + token.value + '`', '\n> ' + currentMixedString); } // we should never see a componentClose token in this loop if (token.type === 'componentClose') { throw new Error('Missing opening component token: `' + token.value + '`'); } if (token.type === 'componentOpen') { openComponent = components[token.value]; openIndex = i; break; } // componentSelfClosing token children.push(components[token.value]); continue; } if (openComponent) { closeIndex = getCloseIndex(openIndex, tokens); grandChildTokens = tokens.slice(openIndex + 1, closeIndex); grandChildren = buildChildren(grandChildTokens, components); clonedOpenComponent = _react2.default.cloneElement(openComponent, {}, grandChildren); children.push(clonedOpenComponent); if (closeIndex < tokens.length - 1) { siblingTokens = tokens.slice(closeIndex + 1); siblings = buildChildren(siblingTokens, components); children = children.concat(siblings); } } if (children.length === 1) { return children[0]; } children.forEach(function (child, index) { if (child) { childrenObject['interpolation-child-' + index] = child; } }); return (0, _reactAddonsCreateFragment2.default)(childrenObject); } function interpolate(options) { var mixedString = options.mixedString, components = options.components, throwErrors = options.throwErrors; currentMixedString = mixedString; if (!components) { return mixedString; } if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) !== 'object') { if (throwErrors) { throw new Error('Interpolation Error: unable to process `' + mixedString + '` because components is not an object'); } return mixedString; } var tokens = (0, _tokenize2.default)(mixedString); try { return buildChildren(tokens, components); } catch (error) { if (throwErrors) { throw new Error('Interpolation Error: unable to process `' + mixedString + '` because of error `' + error.message + '`'); } return mixedString; } }; exports.default = interpolate; //# sourceMappingURL=index.js.map /***/ }), /* 96 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { if (process.env.NODE_ENV === 'production') { module.exports = __webpack_require__(97); } else { module.exports = __webpack_require__(98); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 97 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @license React v16.14.0 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var l=__webpack_require__(20),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.forward_ref"):60112,y=n?Symbol.for("react.suspense"):60113,z=n?Symbol.for("react.memo"):60115,A=n?Symbol.for("react.lazy"): 60116,B="function"===typeof Symbol&&Symbol.iterator;function C(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."} var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E={};function F(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}F.prototype.isReactComponent={};F.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(C(85));this.updater.enqueueSetState(this,a,b,"setState")};F.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")}; function G(){}G.prototype=F.prototype;function H(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}var I=H.prototype=new G;I.constructor=H;l(I,F.prototype);I.isPureReactComponent=!0;var J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0}; function M(a,b,c){var e,d={},g=null,k=null;if(null!=b)for(e in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=""+b.key),b)K.call(b,e)&&!L.hasOwnProperty(e)&&(d[e]=b[e]);var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){for(var h=Array(f),m=0;m<f;m++)h[m]=arguments[m+2];d.children=h}if(a&&a.defaultProps)for(e in f=a.defaultProps,f)void 0===d[e]&&(d[e]=f[e]);return{$$typeof:p,type:a,key:g,ref:k,props:d,_owner:J.current}} function N(a,b){return{$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return"object"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g,Q=[];function R(a,b,c,e){if(Q.length){var d=Q.pop();d.result=a;d.keyPrefix=b;d.func=c;d.context=e;d.count=0;return d}return{result:a,keyPrefix:b,func:c,context:e,count:0}} function S(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>Q.length&&Q.push(a)} function T(a,b,c,e){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0}}if(g)return c(e,a,""===b?"."+U(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){d=a[k];var f=b+U(d,k);g+=T(d,f,c,e)}else if(null===a||"object"!==typeof a?f=null:(f=B&&a[B]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),k= 0;!(d=a.next()).done;)d=d.value,f=b+U(d,k++),g+=T(d,f,c,e);else if("object"===d)throw c=""+a,Error(C(31,"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c,""));return g}function V(a,b,c){return null==a?0:T(a,"",b,c)}function U(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function W(a,b){a.func.call(a.context,b,a.count++)} function aa(a,b,c){var e=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?X(a,e,c,function(a){return a}):null!=a&&(O(a)&&(a=N(a,d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(P,"$&/")+"/")+c)),e.push(a))}function X(a,b,c,e,d){var g="";null!=c&&(g=(""+c).replace(P,"$&/")+"/");b=R(b,g,e,d);V(a,aa,b);S(b)}var Y={current:null};function Z(){var a=Y.current;if(null===a)throw Error(C(321));return a} var ba={ReactCurrentDispatcher:Y,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:J,IsSomeRendererActing:{current:!1},assign:l};exports.Children={map:function(a,b,c){if(null==a)return a;var e=[];X(a,e,null,b,c);return e},forEach:function(a,b,c){if(null==a)return a;b=R(null,null,b,c);V(a,W,b);S(b)},count:function(a){return V(a,function(){return null},null)},toArray:function(a){var b=[];X(a,b,null,function(a){return a});return b},only:function(a){if(!O(a))throw Error(C(143));return a}}; exports.Component=F;exports.Fragment=r;exports.Profiler=u;exports.PureComponent=H;exports.StrictMode=t;exports.Suspense=y;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ba; exports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(C(267,a));var e=l({},a.props),d=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=J.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)K.call(b,h)&&!L.hasOwnProperty(h)&&(e[h]=void 0===b[h]&&void 0!==f?f[h]:b[h])}var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){f=Array(h);for(var m=0;m<h;m++)f[m]=arguments[m+2];e.children=f}return{$$typeof:p,type:a.type, key:d,ref:g,props:e,_owner:k}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:x,render:a}};exports.isValidElement=O; exports.lazy=function(a){return{$$typeof:A,_ctor:a,_status:-1,_result:null}};exports.memo=function(a,b){return{$$typeof:z,type:a,compare:void 0===b?null:b}};exports.useCallback=function(a,b){return Z().useCallback(a,b)};exports.useContext=function(a,b){return Z().useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return Z().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return Z().useImperativeHandle(a,b,c)}; exports.useLayoutEffect=function(a,b){return Z().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return Z().useMemo(a,b)};exports.useReducer=function(a,b,c){return Z().useReducer(a,b,c)};exports.useRef=function(a){return Z().useRef(a)};exports.useState=function(a){return Z().useState(a)};exports.version="16.14.0"; /***/ }), /* 98 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.14.0 * react.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (process.env.NODE_ENV !== "production") { (function() { 'use strict'; var _assign = __webpack_require__(20); var checkPropTypes = __webpack_require__(56); var ReactVersion = '16.14.0'; // The Symbol used to tag the ReactElement-like types. If there is no native Symbol // nor polyfill, then a plain number is used for performance. var hasSymbol = typeof Symbol === 'function' && Symbol.for; var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; function getIteratorFn(maybeIterable) { if (maybeIterable === null || typeof maybeIterable !== 'object') { return null; } var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; if (typeof maybeIterator === 'function') { return maybeIterator; } return null; } /** * Keeps track of the current dispatcher. */ var ReactCurrentDispatcher = { /** * @internal * @type {ReactComponent} */ current: null }; /** * Keeps track of the current batch's configuration such as how long an update * should suspend for if it needs to. */ var ReactCurrentBatchConfig = { suspense: null }; /** * Keeps track of the current owner. * * The current owner is the component who should own any components that are * currently being constructed. */ var ReactCurrentOwner = { /** * @internal * @type {ReactComponent} */ current: null }; var BEFORE_SLASH_RE = /^(.*)[\\\/]/; function describeComponentFrame (name, source, ownerName) { var sourceInfo = ''; if (source) { var path = source.fileName; var fileName = path.replace(BEFORE_SLASH_RE, ''); { // In DEV, include code for a common special case: // prefer "folder/index.js" instead of just "index.js". if (/^index\./.test(fileName)) { var match = path.match(BEFORE_SLASH_RE); if (match) { var pathBeforeSlash = match[1]; if (pathBeforeSlash) { var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); fileName = folderName + '/' + fileName; } } } } sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; } else if (ownerName) { sourceInfo = ' (created by ' + ownerName + ')'; } return '\n in ' + (name || 'Unknown') + sourceInfo; } var Resolved = 1; function refineResolvedLazyComponent(lazyComponent) { return lazyComponent._status === Resolved ? lazyComponent._result : null; } function getWrappedName(outerType, innerType, wrapperName) { var functionName = innerType.displayName || innerType.name || ''; return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName); } function getComponentName(type) { if (type == null) { // Host root, text node or just invalid type. return null; } { if (typeof type.tag === 'number') { error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.'); } } if (typeof type === 'function') { return type.displayName || type.name || null; } if (typeof type === 'string') { return type; } switch (type) { case REACT_FRAGMENT_TYPE: return 'Fragment'; case REACT_PORTAL_TYPE: return 'Portal'; case REACT_PROFILER_TYPE: return "Profiler"; case REACT_STRICT_MODE_TYPE: return 'StrictMode'; case REACT_SUSPENSE_TYPE: return 'Suspense'; case REACT_SUSPENSE_LIST_TYPE: return 'SuspenseList'; } if (typeof type === 'object') { switch (type.$$typeof) { case REACT_CONTEXT_TYPE: return 'Context.Consumer'; case REACT_PROVIDER_TYPE: return 'Context.Provider'; case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, 'ForwardRef'); case REACT_MEMO_TYPE: return getComponentName(type.type); case REACT_BLOCK_TYPE: return getComponentName(type.render); case REACT_LAZY_TYPE: { var thenable = type; var resolvedThenable = refineResolvedLazyComponent(thenable); if (resolvedThenable) { return getComponentName(resolvedThenable); } break; } } } return null; } var ReactDebugCurrentFrame = {}; var currentlyValidatingElement = null; function setCurrentlyValidatingElement(element) { { currentlyValidatingElement = element; } } { // Stack implementation injected by the current renderer. ReactDebugCurrentFrame.getCurrentStack = null; ReactDebugCurrentFrame.getStackAddendum = function () { var stack = ''; // Add an extra top frame while an element is being validated if (currentlyValidatingElement) { var name = getComponentName(currentlyValidatingElement.type); var owner = currentlyValidatingElement._owner; stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type)); } // Delegate to the injected renderer-specific implementation var impl = ReactDebugCurrentFrame.getCurrentStack; if (impl) { stack += impl() || ''; } return stack; }; } /** * Used by act() to track whether you're inside an act() scope. */ var IsSomeRendererActing = { current: false }; var ReactSharedInternals = { ReactCurrentDispatcher: ReactCurrentDispatcher, ReactCurrentBatchConfig: ReactCurrentBatchConfig, ReactCurrentOwner: ReactCurrentOwner, IsSomeRendererActing: IsSomeRendererActing, // Used by renderers to avoid bundling object-assign twice in UMD bundles: assign: _assign }; { _assign(ReactSharedInternals, { // These should not be included in production. ReactDebugCurrentFrame: ReactDebugCurrentFrame, // Shim for React DOM 16.0.0 which still destructured (but not used) this. // TODO: remove in React 17.0. ReactComponentTreeHook: {} }); } // by calls to these methods by a Babel plugin. // // In PROD (or in packages without access to React internals), // they are left as they are instead. function warn(format) { { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } printWarning('warn', format, args); } } function error(format) { { for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } printWarning('error', format, args); } } function printWarning(level, format, args) { // When changing this logic, you might want to also // update consoleWithStackDev.www.js as well. { var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0; if (!hasExistingStack) { var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var stack = ReactDebugCurrentFrame.getStackAddendum(); if (stack !== '') { format += '%s'; args = args.concat([stack]); } } var argsWithFormat = args.map(function (item) { return '' + item; }); // Careful: RN currently depends on this prefix argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it // breaks IE9: https://github.com/facebook/react/issues/13610 // eslint-disable-next-line react-internal/no-production-logging Function.prototype.apply.call(console[level], console, argsWithFormat); try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); throw new Error(message); } catch (x) {} } } var didWarnStateUpdateForUnmountedComponent = {}; function warnNoop(publicInstance, callerName) { { var _constructor = publicInstance.constructor; var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass'; var warningKey = componentName + "." + callerName; if (didWarnStateUpdateForUnmountedComponent[warningKey]) { return; } error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName); didWarnStateUpdateForUnmountedComponent[warningKey] = true; } } /** * This is the abstract API for an update queue. */ var ReactNoopUpdateQueue = { /** * Checks whether or not this composite component is mounted. * @param {ReactClass} publicInstance The instance we want to test. * @return {boolean} True if mounted, false otherwise. * @protected * @final */ isMounted: function (publicInstance) { return false; }, /** * Forces an update. This should only be invoked when it is known with * certainty that we are **not** in a DOM transaction. * * You may want to call this when you know that some deeper aspect of the * component's state has changed but `setState` was not called. * * This will not invoke `shouldComponentUpdate`, but it will invoke * `componentWillUpdate` and `componentDidUpdate`. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {?function} callback Called after component is updated. * @param {?string} callerName name of the calling function in the public API. * @internal */ enqueueForceUpdate: function (publicInstance, callback, callerName) { warnNoop(publicInstance, 'forceUpdate'); }, /** * Replaces all of the state. Always use this or `setState` to mutate state. * You should treat `this.state` as immutable. * * There is no guarantee that `this.state` will be immediately updated, so * accessing `this.state` after calling this method may return the old value. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {object} completeState Next state. * @param {?function} callback Called after component is updated. * @param {?string} callerName name of the calling function in the public API. * @internal */ enqueueReplaceState: function (publicInstance, completeState, callback, callerName) { warnNoop(publicInstance, 'replaceState'); }, /** * Sets a subset of the state. This only exists because _pendingState is * internal. This provides a merging strategy that is not available to deep * properties which is confusing. TODO: Expose pendingState or don't use it * during the merge. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {object} partialState Next partial state to be merged with state. * @param {?function} callback Called after component is updated. * @param {?string} Name of the calling function in the public API. * @internal */ enqueueSetState: function (publicInstance, partialState, callback, callerName) { warnNoop(publicInstance, 'setState'); } }; var emptyObject = {}; { Object.freeze(emptyObject); } /** * Base class helpers for the updating state of a component. */ function Component(props, context, updater) { this.props = props; this.context = context; // If a component has string refs, we will assign a different object later. this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. this.updater = updater || ReactNoopUpdateQueue; } Component.prototype.isReactComponent = {}; /** * Sets a subset of the state. Always use this to mutate * state. You should treat `this.state` as immutable. * * There is no guarantee that `this.state` will be immediately updated, so * accessing `this.state` after calling this method may return the old value. * * There is no guarantee that calls to `setState` will run synchronously, * as they may eventually be batched together. You can provide an optional * callback that will be executed when the call to setState is actually * completed. * * When a function is provided to setState, it will be called at some point in * the future (not synchronously). It will be called with the up to date * component arguments (state, props, context). These values can be different * from this.* because your function may be called after receiveProps but before * shouldComponentUpdate, and this new state, props, and context will not yet be * assigned to this. * * @param {object|function} partialState Next partial state or function to * produce next partial state to be merged with current state. * @param {?function} callback Called after state is updated. * @final * @protected */ Component.prototype.setState = function (partialState, callback) { if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) { { throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." ); } } this.updater.enqueueSetState(this, partialState, callback, 'setState'); }; /** * Forces an update. This should only be invoked when it is known with * certainty that we are **not** in a DOM transaction. * * You may want to call this when you know that some deeper aspect of the * component's state has changed but `setState` was not called. * * This will not invoke `shouldComponentUpdate`, but it will invoke * `componentWillUpdate` and `componentDidUpdate`. * * @param {?function} callback Called after update is complete. * @final * @protected */ Component.prototype.forceUpdate = function (callback) { this.updater.enqueueForceUpdate(this, callback, 'forceUpdate'); }; /** * Deprecated APIs. These APIs used to exist on classic React classes but since * we would like to deprecate them, we're not going to move them over to this * modern base class. Instead, we define a getter that warns if it's accessed. */ { var deprecatedAPIs = { isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] }; var defineDeprecationWarning = function (methodName, info) { Object.defineProperty(Component.prototype, methodName, { get: function () { warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); return undefined; } }); }; for (var fnName in deprecatedAPIs) { if (deprecatedAPIs.hasOwnProperty(fnName)) { defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); } } } function ComponentDummy() {} ComponentDummy.prototype = Component.prototype; /** * Convenience component with default shallow equality check for sCU. */ function PureComponent(props, context, updater) { this.props = props; this.context = context; // If a component has string refs, we will assign a different object later. this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; } var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods. _assign(pureComponentPrototype, Component.prototype); pureComponentPrototype.isPureReactComponent = true; // an immutable object with a single mutable value function createRef() { var refObject = { current: null }; { Object.seal(refObject); } return refObject; } var hasOwnProperty = Object.prototype.hasOwnProperty; var RESERVED_PROPS = { key: true, ref: true, __self: true, __source: true }; var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; { didWarnAboutStringRefs = {}; } function hasValidRef(config) { { if (hasOwnProperty.call(config, 'ref')) { var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; if (getter && getter.isReactWarning) { return false; } } } return config.ref !== undefined; } function hasValidKey(config) { { if (hasOwnProperty.call(config, 'key')) { var getter = Object.getOwnPropertyDescriptor(config, 'key').get; if (getter && getter.isReactWarning) { return false; } } } return config.key !== undefined; } function defineKeyPropWarningGetter(props, displayName) { var warnAboutAccessingKey = function () { { if (!specialPropKeyWarningShown) { specialPropKeyWarningShown = true; error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); } } }; warnAboutAccessingKey.isReactWarning = true; Object.defineProperty(props, 'key', { get: warnAboutAccessingKey, configurable: true }); } function defineRefPropWarningGetter(props, displayName) { var warnAboutAccessingRef = function () { { if (!specialPropRefWarningShown) { specialPropRefWarningShown = true; error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); } } }; warnAboutAccessingRef.isReactWarning = true; Object.defineProperty(props, 'ref', { get: warnAboutAccessingRef, configurable: true }); } function warnIfStringRefCannotBeAutoConverted(config) { { if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { var componentName = getComponentName(ReactCurrentOwner.current.type); if (!didWarnAboutStringRefs[componentName]) { error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref); didWarnAboutStringRefs[componentName] = true; } } } } /** * Factory method to create a new React element. This no longer adheres to * the class pattern, so do not use new to call it. Also, instanceof check * will not work. Instead test $$typeof field against Symbol.for('react.element') to check * if something is a React Element. * * @param {*} type * @param {*} props * @param {*} key * @param {string|object} ref * @param {*} owner * @param {*} self A *temporary* helper to detect places where `this` is * different from the `owner` when React.createElement is called, so that we * can warn. We want to get rid of owner and replace string `ref`s with arrow * functions, and as long as `this` and owner are the same, there will be no * change in behavior. * @param {*} source An annotation object (added by a transpiler or otherwise) * indicating filename, line number, and/or other information. * @internal */ var ReactElement = function (type, key, ref, self, source, owner, props) { var element = { // This tag allows us to uniquely identify this as a React Element $$typeof: REACT_ELEMENT_TYPE, // Built-in properties that belong on the element type: type, key: key, ref: ref, props: props, // Record the component responsible for creating this element. _owner: owner }; { // The validation flag is currently mutative. We put it on // an external backing store so that we can freeze the whole object. // This can be replaced with a WeakMap once they are implemented in // commonly used development environments. element._store = {}; // To make comparing ReactElements easier for testing purposes, we make // the validation flag non-enumerable (where possible, which should // include every environment we run tests in), so the test framework // ignores it. Object.defineProperty(element._store, 'validated', { configurable: false, enumerable: false, writable: true, value: false }); // self and source are DEV only properties. Object.defineProperty(element, '_self', { configurable: false, enumerable: false, writable: false, value: self }); // Two elements created in two different places should be considered // equal for testing purposes and therefore we hide it from enumeration. Object.defineProperty(element, '_source', { configurable: false, enumerable: false, writable: false, value: source }); if (Object.freeze) { Object.freeze(element.props); Object.freeze(element); } } return element; }; /** * Create and return a new ReactElement of the given type. * See https://reactjs.org/docs/react-api.html#createelement */ function createElement(type, config, children) { var propName; // Reserved names are extracted var props = {}; var key = null; var ref = null; var self = null; var source = null; if (config != null) { if (hasValidRef(config)) { ref = config.ref; { warnIfStringRefCannotBeAutoConverted(config); } } if (hasValidKey(config)) { key = '' + config.key; } self = config.__self === undefined ? null : config.__self; source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object for (propName in config) { if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } } // Children can be more than one argument, and those are transferred onto // the newly allocated props object. var childrenLength = arguments.length - 2; if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 2]; } { if (Object.freeze) { Object.freeze(childArray); } } props.children = childArray; } // Resolve default props if (type && type.defaultProps) { var defaultProps = type.defaultProps; for (propName in defaultProps) { if (props[propName] === undefined) { props[propName] = defaultProps[propName]; } } } { if (key || ref) { var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; if (key) { defineKeyPropWarningGetter(props, displayName); } if (ref) { defineRefPropWarningGetter(props, displayName); } } } return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); } function cloneAndReplaceKey(oldElement, newKey) { var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); return newElement; } /** * Clone and return a new ReactElement using element as the starting point. * See https://reactjs.org/docs/react-api.html#cloneelement */ function cloneElement(element, config, children) { if (!!(element === null || element === undefined)) { { throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." ); } } var propName; // Original props are copied var props = _assign({}, element.props); // Reserved names are extracted var key = element.key; var ref = element.ref; // Self is preserved since the owner is preserved. var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a // transpiler, and the original source is probably a better indicator of the // true owner. var source = element._source; // Owner will be preserved, unless ref is overridden var owner = element._owner; if (config != null) { if (hasValidRef(config)) { // Silently steal the ref from the parent. ref = config.ref; owner = ReactCurrentOwner.current; } if (hasValidKey(config)) { key = '' + config.key; } // Remaining properties override existing props var defaultProps; if (element.type && element.type.defaultProps) { defaultProps = element.type.defaultProps; } for (propName in config) { if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { if (config[propName] === undefined && defaultProps !== undefined) { // Resolve default props props[propName] = defaultProps[propName]; } else { props[propName] = config[propName]; } } } } // Children can be more than one argument, and those are transferred onto // the newly allocated props object. var childrenLength = arguments.length - 2; if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 2]; } props.children = childArray; } return ReactElement(element.type, key, ref, self, source, owner, props); } /** * Verifies the object is a ReactElement. * See https://reactjs.org/docs/react-api.html#isvalidelement * @param {?object} object * @return {boolean} True if `object` is a ReactElement. * @final */ function isValidElement(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } var SEPARATOR = '.'; var SUBSEPARATOR = ':'; /** * Escape and wrap key so it is safe to use as a reactid * * @param {string} key to be escaped. * @return {string} the escaped key. */ function escape(key) { var escapeRegex = /[=:]/g; var escaperLookup = { '=': '=0', ':': '=2' }; var escapedString = ('' + key).replace(escapeRegex, function (match) { return escaperLookup[match]; }); return '$' + escapedString; } /** * TODO: Test that a single child and an array with one item have the same key * pattern. */ var didWarnAboutMaps = false; var userProvidedKeyEscapeRegex = /\/+/g; function escapeUserProvidedKey(text) { return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); } var POOL_SIZE = 10; var traverseContextPool = []; function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) { if (traverseContextPool.length) { var traverseContext = traverseContextPool.pop(); traverseContext.result = mapResult; traverseContext.keyPrefix = keyPrefix; traverseContext.func = mapFunction; traverseContext.context = mapContext; traverseContext.count = 0; return traverseContext; } else { return { result: mapResult, keyPrefix: keyPrefix, func: mapFunction, context: mapContext, count: 0 }; } } function releaseTraverseContext(traverseContext) { traverseContext.result = null; traverseContext.keyPrefix = null; traverseContext.func = null; traverseContext.context = null; traverseContext.count = 0; if (traverseContextPool.length < POOL_SIZE) { traverseContextPool.push(traverseContext); } } /** * @param {?*} children Children tree container. * @param {!string} nameSoFar Name of the key path so far. * @param {!function} callback Callback to invoke with each child found. * @param {?*} traverseContext Used to pass information throughout the traversal * process. * @return {!number} The number of children in this subtree. */ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { var type = typeof children; if (type === 'undefined' || type === 'boolean') { // All of the above are perceived as null. children = null; } var invokeCallback = false; if (children === null) { invokeCallback = true; } else { switch (type) { case 'string': case 'number': invokeCallback = true; break; case 'object': switch (children.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = true; } } } if (invokeCallback) { callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array // so that it's consistent if the number of children grows. nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); return 1; } var child; var nextName; var subtreeCount = 0; // Count of children found in the current subtree. var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; if (Array.isArray(children)) { for (var i = 0; i < children.length; i++) { child = children[i]; nextName = nextNamePrefix + getComponentKey(child, i); subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); } } else { var iteratorFn = getIteratorFn(children); if (typeof iteratorFn === 'function') { { // Warn about using Maps as children if (iteratorFn === children.entries) { if (!didWarnAboutMaps) { warn('Using Maps as children is deprecated and will be removed in ' + 'a future major release. Consider converting children to ' + 'an array of keyed ReactElements instead.'); } didWarnAboutMaps = true; } } var iterator = iteratorFn.call(children); var step; var ii = 0; while (!(step = iterator.next()).done) { child = step.value; nextName = nextNamePrefix + getComponentKey(child, ii++); subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); } } else if (type === 'object') { var addendum = ''; { addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum(); } var childrenString = '' + children; { { throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ")." + addendum ); } } } } return subtreeCount; } /** * Traverses children that are typically specified as `props.children`, but * might also be specified through attributes: * * - `traverseAllChildren(this.props.children, ...)` * - `traverseAllChildren(this.props.leftPanelChildren, ...)` * * The `traverseContext` is an optional argument that is passed through the * entire traversal. It can be used to store accumulations or anything else that * the callback might find relevant. * * @param {?*} children Children tree object. * @param {!function} callback To invoke upon traversing each child. * @param {?*} traverseContext Context for traversal. * @return {!number} The number of children in this subtree. */ function traverseAllChildren(children, callback, traverseContext) { if (children == null) { return 0; } return traverseAllChildrenImpl(children, '', callback, traverseContext); } /** * Generate a key string that identifies a component within a set. * * @param {*} component A component that could contain a manual key. * @param {number} index Index that is used if a manual key is not provided. * @return {string} */ function getComponentKey(component, index) { // Do some typechecking here since we call this blindly. We want to ensure // that we don't block potential future ES APIs. if (typeof component === 'object' && component !== null && component.key != null) { // Explicit key return escape(component.key); } // Implicit key determined by the index in the set return index.toString(36); } function forEachSingleChild(bookKeeping, child, name) { var func = bookKeeping.func, context = bookKeeping.context; func.call(context, child, bookKeeping.count++); } /** * Iterates through children that are typically specified as `props.children`. * * See https://reactjs.org/docs/react-api.html#reactchildrenforeach * * The provided forEachFunc(child, index) will be called for each * leaf child. * * @param {?*} children Children tree container. * @param {function(*, int)} forEachFunc * @param {*} forEachContext Context for forEachContext. */ function forEachChildren(children, forEachFunc, forEachContext) { if (children == null) { return children; } var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext); traverseAllChildren(children, forEachSingleChild, traverseContext); releaseTraverseContext(traverseContext); } function mapSingleChildIntoContext(bookKeeping, child, childKey) { var result = bookKeeping.result, keyPrefix = bookKeeping.keyPrefix, func = bookKeeping.func, context = bookKeeping.context; var mappedChild = func.call(context, child, bookKeeping.count++); if (Array.isArray(mappedChild)) { mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) { return c; }); } else if (mappedChild != null) { if (isValidElement(mappedChild)) { mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as // traverseAllChildren used to do for objects as children keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); } result.push(mappedChild); } } function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { var escapedPrefix = ''; if (prefix != null) { escapedPrefix = escapeUserProvidedKey(prefix) + '/'; } var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context); traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); releaseTraverseContext(traverseContext); } /** * Maps children that are typically specified as `props.children`. * * See https://reactjs.org/docs/react-api.html#reactchildrenmap * * The provided mapFunction(child, key, index) will be called for each * leaf child. * * @param {?*} children Children tree container. * @param {function(*, int)} func The map function. * @param {*} context Context for mapFunction. * @return {object} Object containing the ordered map of results. */ function mapChildren(children, func, context) { if (children == null) { return children; } var result = []; mapIntoWithKeyPrefixInternal(children, result, null, func, context); return result; } /** * Count the number of children that are typically specified as * `props.children`. * * See https://reactjs.org/docs/react-api.html#reactchildrencount * * @param {?*} children Children tree container. * @return {number} The number of children. */ function countChildren(children) { return traverseAllChildren(children, function () { return null; }, null); } /** * Flatten a children object (typically specified as `props.children`) and * return an array with appropriately re-keyed children. * * See https://reactjs.org/docs/react-api.html#reactchildrentoarray */ function toArray(children) { var result = []; mapIntoWithKeyPrefixInternal(children, result, null, function (child) { return child; }); return result; } /** * Returns the first child in a collection of children and verifies that there * is only one child in the collection. * * See https://reactjs.org/docs/react-api.html#reactchildrenonly * * The current implementation of this function assumes that a single child gets * passed without a wrapper, but the purpose of this helper function is to * abstract away the particular structure of children. * * @param {?object} children Child collection structure. * @return {ReactElement} The first and only `ReactElement` contained in the * structure. */ function onlyChild(children) { if (!isValidElement(children)) { { throw Error( "React.Children.only expected to receive a single React element child." ); } } return children; } function createContext(defaultValue, calculateChangedBits) { if (calculateChangedBits === undefined) { calculateChangedBits = null; } else { { if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') { error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits); } } } var context = { $$typeof: REACT_CONTEXT_TYPE, _calculateChangedBits: calculateChangedBits, // As a workaround to support multiple concurrent renderers, we categorize // some renderers as primary and others as secondary. We only expect // there to be two concurrent renderers at most: React Native (primary) and // Fabric (secondary); React DOM (primary) and React ART (secondary). // Secondary renderers store their context values on separate fields. _currentValue: defaultValue, _currentValue2: defaultValue, // Used to track how many concurrent renderers this context currently // supports within in a single renderer. Such as parallel server rendering. _threadCount: 0, // These are circular Provider: null, Consumer: null }; context.Provider = { $$typeof: REACT_PROVIDER_TYPE, _context: context }; var hasWarnedAboutUsingNestedContextConsumers = false; var hasWarnedAboutUsingConsumerProvider = false; { // A separate object, but proxies back to the original context object for // backwards compatibility. It has a different $$typeof, so we can properly // warn for the incorrect usage of Context as a Consumer. var Consumer = { $$typeof: REACT_CONTEXT_TYPE, _context: context, _calculateChangedBits: context._calculateChangedBits }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here Object.defineProperties(Consumer, { Provider: { get: function () { if (!hasWarnedAboutUsingConsumerProvider) { hasWarnedAboutUsingConsumerProvider = true; error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?'); } return context.Provider; }, set: function (_Provider) { context.Provider = _Provider; } }, _currentValue: { get: function () { return context._currentValue; }, set: function (_currentValue) { context._currentValue = _currentValue; } }, _currentValue2: { get: function () { return context._currentValue2; }, set: function (_currentValue2) { context._currentValue2 = _currentValue2; } }, _threadCount: { get: function () { return context._threadCount; }, set: function (_threadCount) { context._threadCount = _threadCount; } }, Consumer: { get: function () { if (!hasWarnedAboutUsingNestedContextConsumers) { hasWarnedAboutUsingNestedContextConsumers = true; error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?'); } return context.Consumer; } } }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty context.Consumer = Consumer; } { context._currentRenderer = null; context._currentRenderer2 = null; } return context; } function lazy(ctor) { var lazyType = { $$typeof: REACT_LAZY_TYPE, _ctor: ctor, // React uses these fields to store the result. _status: -1, _result: null }; { // In production, this would just set it on the object. var defaultProps; var propTypes; Object.defineProperties(lazyType, { defaultProps: { configurable: true, get: function () { return defaultProps; }, set: function (newDefaultProps) { error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.'); defaultProps = newDefaultProps; // Match production behavior more closely: Object.defineProperty(lazyType, 'defaultProps', { enumerable: true }); } }, propTypes: { configurable: true, get: function () { return propTypes; }, set: function (newPropTypes) { error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.'); propTypes = newPropTypes; // Match production behavior more closely: Object.defineProperty(lazyType, 'propTypes', { enumerable: true }); } } }); } return lazyType; } function forwardRef(render) { { if (render != null && render.$$typeof === REACT_MEMO_TYPE) { error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).'); } else if (typeof render !== 'function') { error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render); } else { if (render.length !== 0 && render.length !== 2) { error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.'); } } if (render != null) { if (render.defaultProps != null || render.propTypes != null) { error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?'); } } } return { $$typeof: REACT_FORWARD_REF_TYPE, render: render }; } function isValidElementType(type) { return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); } function memo(type, compare) { { if (!isValidElementType(type)) { error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type); } } return { $$typeof: REACT_MEMO_TYPE, type: type, compare: compare === undefined ? null : compare }; } function resolveDispatcher() { var dispatcher = ReactCurrentDispatcher.current; if (!(dispatcher !== null)) { { throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." ); } } return dispatcher; } function useContext(Context, unstable_observedBits) { var dispatcher = resolveDispatcher(); { if (unstable_observedBits !== undefined) { error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : ''); } // TODO: add a more generic warning for invalid values. if (Context._context !== undefined) { var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs // and nobody should be using this in existing code. if (realContext.Consumer === Context) { error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?'); } else if (realContext.Provider === Context) { error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?'); } } } return dispatcher.useContext(Context, unstable_observedBits); } function useState(initialState) { var dispatcher = resolveDispatcher(); return dispatcher.useState(initialState); } function useReducer(reducer, initialArg, init) { var dispatcher = resolveDispatcher(); return dispatcher.useReducer(reducer, initialArg, init); } function useRef(initialValue) { var dispatcher = resolveDispatcher(); return dispatcher.useRef(initialValue); } function useEffect(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useEffect(create, deps); } function useLayoutEffect(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useLayoutEffect(create, deps); } function useCallback(callback, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useCallback(callback, deps); } function useMemo(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useMemo(create, deps); } function useImperativeHandle(ref, create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useImperativeHandle(ref, create, deps); } function useDebugValue(value, formatterFn) { { var dispatcher = resolveDispatcher(); return dispatcher.useDebugValue(value, formatterFn); } } var propTypesMisspellWarningShown; { propTypesMisspellWarningShown = false; } function getDeclarationErrorAddendum() { if (ReactCurrentOwner.current) { var name = getComponentName(ReactCurrentOwner.current.type); if (name) { return '\n\nCheck the render method of `' + name + '`.'; } } return ''; } function getSourceInfoErrorAddendum(source) { if (source !== undefined) { var fileName = source.fileName.replace(/^.*[\\\/]/, ''); var lineNumber = source.lineNumber; return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; } return ''; } function getSourceInfoErrorAddendumForProps(elementProps) { if (elementProps !== null && elementProps !== undefined) { return getSourceInfoErrorAddendum(elementProps.__source); } return ''; } /** * Warn if there's no key explicitly set on dynamic arrays of children or * object keys are not valid. This allows us to keep track of children between * updates. */ var ownerHasKeyUseWarning = {}; function getCurrentComponentErrorInfo(parentType) { var info = getDeclarationErrorAddendum(); if (!info) { var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; if (parentName) { info = "\n\nCheck the top-level render call using <" + parentName + ">."; } } return info; } /** * Warn if the element doesn't have an explicit key assigned to it. * This element is in an array. The array could grow and shrink or be * reordered. All children that haven't already been validated are required to * have a "key" property assigned to it. Error statuses are cached so a warning * will only be shown once. * * @internal * @param {ReactElement} element Element that requires a key. * @param {*} parentType element's parent's type. */ function validateExplicitKey(element, parentType) { if (!element._store || element._store.validated || element.key != null) { return; } element._store.validated = true; var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { return; } ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a // property, it may be the creator of the child that's responsible for // assigning it a key. var childOwner = ''; if (element && element._owner && element._owner !== ReactCurrentOwner.current) { // Give the component that originally created this child. childOwner = " It was passed a child from " + getComponentName(element._owner.type) + "."; } setCurrentlyValidatingElement(element); { error('Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner); } setCurrentlyValidatingElement(null); } /** * Ensure that every element either is passed in a static location, in an * array with an explicit keys property defined, or in an object literal * with valid key property. * * @internal * @param {ReactNode} node Statically passed child of any type. * @param {*} parentType node's parent's type. */ function validateChildKeys(node, parentType) { if (typeof node !== 'object') { return; } if (Array.isArray(node)) { for (var i = 0; i < node.length; i++) { var child = node[i]; if (isValidElement(child)) { validateExplicitKey(child, parentType); } } } else if (isValidElement(node)) { // This element was passed in a valid location. if (node._store) { node._store.validated = true; } } else if (node) { var iteratorFn = getIteratorFn(node); if (typeof iteratorFn === 'function') { // Entry iterators used to provide implicit keys, // but now we print a separate warning for them later. if (iteratorFn !== node.entries) { var iterator = iteratorFn.call(node); var step; while (!(step = iterator.next()).done) { if (isValidElement(step.value)) { validateExplicitKey(step.value, parentType); } } } } } } /** * Given an element, validate that its props follow the propTypes definition, * provided by the type. * * @param {ReactElement} element */ function validatePropTypes(element) { { var type = element.type; if (type === null || type === undefined || typeof type === 'string') { return; } var name = getComponentName(type); var propTypes; if (typeof type === 'function') { propTypes = type.propTypes; } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. type.$$typeof === REACT_MEMO_TYPE)) { propTypes = type.propTypes; } else { return; } if (propTypes) { setCurrentlyValidatingElement(element); checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum); setCurrentlyValidatingElement(null); } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { propTypesMisspellWarningShown = true; error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown'); } if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) { error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); } } } /** * Given a fragment, validate that it can only be provided with fragment props * @param {ReactElement} fragment */ function validateFragmentProps(fragment) { { setCurrentlyValidatingElement(fragment); var keys = Object.keys(fragment.props); for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (key !== 'children' && key !== 'key') { error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); break; } } if (fragment.ref !== null) { error('Invalid attribute `ref` supplied to `React.Fragment`.'); } setCurrentlyValidatingElement(null); } } function createElementWithValidation(type, props, children) { var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to // succeed and there will likely be errors in render. if (!validType) { var info = ''; if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; } var sourceInfo = getSourceInfoErrorAddendumForProps(props); if (sourceInfo) { info += sourceInfo; } else { info += getDeclarationErrorAddendum(); } var typeString; if (type === null) { typeString = 'null'; } else if (Array.isArray(type)) { typeString = 'array'; } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />"; info = ' Did you accidentally export a JSX literal instead of a component?'; } else { typeString = typeof type; } { error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); } } var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used. // TODO: Drop this when these are no longer allowed as the type argument. if (element == null) { return element; } // Skip key warning if the type isn't valid since our key validation logic // doesn't expect a non-string/function type and can throw confusing errors. // We don't want exception behavior to differ between dev and prod. // (Rendering will throw with a helpful message and as soon as the type is // fixed, the key warnings will appear.) if (validType) { for (var i = 2; i < arguments.length; i++) { validateChildKeys(arguments[i], type); } } if (type === REACT_FRAGMENT_TYPE) { validateFragmentProps(element); } else { validatePropTypes(element); } return element; } var didWarnAboutDeprecatedCreateFactory = false; function createFactoryWithValidation(type) { var validatedFactory = createElementWithValidation.bind(null, type); validatedFactory.type = type; { if (!didWarnAboutDeprecatedCreateFactory) { didWarnAboutDeprecatedCreateFactory = true; warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.'); } // Legacy hook: remove it Object.defineProperty(validatedFactory, 'type', { enumerable: false, get: function () { warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.'); Object.defineProperty(this, 'type', { value: type }); return type; } }); } return validatedFactory; } function cloneElementWithValidation(element, props, children) { var newElement = cloneElement.apply(this, arguments); for (var i = 2; i < arguments.length; i++) { validateChildKeys(arguments[i], newElement.type); } validatePropTypes(newElement); return newElement; } { try { var frozenObject = Object.freeze({}); var testMap = new Map([[frozenObject, null]]); var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused. // https://github.com/rollup/rollup/issues/1771 // TODO: we can remove these if Rollup fixes the bug. testMap.set(0, 0); testSet.add(0); } catch (e) { } } var createElement$1 = createElementWithValidation ; var cloneElement$1 = cloneElementWithValidation ; var createFactory = createFactoryWithValidation ; var Children = { map: mapChildren, forEach: forEachChildren, count: countChildren, toArray: toArray, only: onlyChild }; exports.Children = Children; exports.Component = Component; exports.Fragment = REACT_FRAGMENT_TYPE; exports.Profiler = REACT_PROFILER_TYPE; exports.PureComponent = PureComponent; exports.StrictMode = REACT_STRICT_MODE_TYPE; exports.Suspense = REACT_SUSPENSE_TYPE; exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; exports.cloneElement = cloneElement$1; exports.createContext = createContext; exports.createElement = createElement$1; exports.createFactory = createFactory; exports.createRef = createRef; exports.forwardRef = forwardRef; exports.isValidElement = isValidElement; exports.lazy = lazy; exports.memo = memo; exports.useCallback = useCallback; exports.useContext = useContext; exports.useDebugValue = useDebugValue; exports.useEffect = useEffect; exports.useImperativeHandle = useImperativeHandle; exports.useLayoutEffect = useLayoutEffect; exports.useMemo = useMemo; exports.useReducer = useReducer; exports.useRef = useRef; exports.useState = useState; exports.version = ReactVersion; })(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 99 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 100 */ /***/ (function(module, exports) { module.exports = Function.call.bind(Object.prototype.hasOwnProperty); /***/ }), /* 101 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var React = __webpack_require__(0); var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7; var emptyFunction = __webpack_require__(57); var invariant = __webpack_require__(102); var warning = __webpack_require__(103); var SEPARATOR = '.'; var SUBSEPARATOR = ':'; var didWarnAboutMaps = false; var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. function getIteratorFn(maybeIterable) { var iteratorFn = maybeIterable && ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || maybeIterable[FAUX_ITERATOR_SYMBOL]); if (typeof iteratorFn === 'function') { return iteratorFn; } } function escape(key) { var escapeRegex = /[=:]/g; var escaperLookup = { '=': '=0', ':': '=2' }; var escapedString = ('' + key).replace(escapeRegex, function(match) { return escaperLookup[match]; }); return '$' + escapedString; } function getComponentKey(component, index) { // Do some typechecking here since we call this blindly. We want to ensure // that we don't block potential future ES APIs. if (component && typeof component === 'object' && component.key != null) { // Explicit key return escape(component.key); } // Implicit key determined by the index in the set return index.toString(36); } function traverseAllChildrenImpl( children, nameSoFar, callback, traverseContext ) { var type = typeof children; if (type === 'undefined' || type === 'boolean') { // All of the above are perceived as null. children = null; } if ( children === null || type === 'string' || type === 'number' || // The following is inlined from ReactElement. This means we can optimize // some checks. React Fiber also inlines this logic for similar purposes. (type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) ) { callback( traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array // so that it's consistent if the number of children grows. nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar ); return 1; } var child; var nextName; var subtreeCount = 0; // Count of children found in the current subtree. var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; if (Array.isArray(children)) { for (var i = 0; i < children.length; i++) { child = children[i]; nextName = nextNamePrefix + getComponentKey(child, i); subtreeCount += traverseAllChildrenImpl( child, nextName, callback, traverseContext ); } } else { var iteratorFn = getIteratorFn(children); if (iteratorFn) { if (process.env.NODE_ENV !== 'production') { // Warn about using Maps as children if (iteratorFn === children.entries) { warning( didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.' ); didWarnAboutMaps = true; } } var iterator = iteratorFn.call(children); var step; var ii = 0; while (!(step = iterator.next()).done) { child = step.value; nextName = nextNamePrefix + getComponentKey(child, ii++); subtreeCount += traverseAllChildrenImpl( child, nextName, callback, traverseContext ); } } else if (type === 'object') { var addendum = ''; if (process.env.NODE_ENV !== 'production') { addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; } var childrenString = '' + children; invariant( false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum ); } } return subtreeCount; } function traverseAllChildren(children, callback, traverseContext) { if (children == null) { return 0; } return traverseAllChildrenImpl(children, '', callback, traverseContext); } var userProvidedKeyEscapeRegex = /\/+/g; function escapeUserProvidedKey(text) { return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); } function cloneAndReplaceKey(oldElement, newKey) { return React.cloneElement( oldElement, {key: newKey}, oldElement.props !== undefined ? oldElement.props.children : undefined ); } var DEFAULT_POOL_SIZE = 10; var DEFAULT_POOLER = oneArgumentPooler; var oneArgumentPooler = function(copyFieldsFrom) { var Klass = this; if (Klass.instancePool.length) { var instance = Klass.instancePool.pop(); Klass.call(instance, copyFieldsFrom); return instance; } else { return new Klass(copyFieldsFrom); } }; var addPoolingTo = function addPoolingTo(CopyConstructor, pooler) { // Casting as any so that flow ignores the actual implementation and trusts // it to match the type we declared var NewKlass = CopyConstructor; NewKlass.instancePool = []; NewKlass.getPooled = pooler || DEFAULT_POOLER; if (!NewKlass.poolSize) { NewKlass.poolSize = DEFAULT_POOL_SIZE; } NewKlass.release = standardReleaser; return NewKlass; }; var standardReleaser = function standardReleaser(instance) { var Klass = this; invariant( instance instanceof Klass, 'Trying to release an instance into a pool of a different type.' ); instance.destructor(); if (Klass.instancePool.length < Klass.poolSize) { Klass.instancePool.push(instance); } }; var fourArgumentPooler = function fourArgumentPooler(a1, a2, a3, a4) { var Klass = this; if (Klass.instancePool.length) { var instance = Klass.instancePool.pop(); Klass.call(instance, a1, a2, a3, a4); return instance; } else { return new Klass(a1, a2, a3, a4); } }; function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { this.result = mapResult; this.keyPrefix = keyPrefix; this.func = mapFunction; this.context = mapContext; this.count = 0; } MapBookKeeping.prototype.destructor = function() { this.result = null; this.keyPrefix = null; this.func = null; this.context = null; this.count = 0; }; addPoolingTo(MapBookKeeping, fourArgumentPooler); function mapSingleChildIntoContext(bookKeeping, child, childKey) { var result = bookKeeping.result; var keyPrefix = bookKeeping.keyPrefix; var func = bookKeeping.func; var context = bookKeeping.context; var mappedChild = func.call(context, child, bookKeeping.count++); if (Array.isArray(mappedChild)) { mapIntoWithKeyPrefixInternal( mappedChild, result, childKey, emptyFunction.thatReturnsArgument ); } else if (mappedChild != null) { if (React.isValidElement(mappedChild)) { mappedChild = cloneAndReplaceKey( mappedChild, // Keep both the (mapped) and old keys if they differ, just as // traverseAllChildren used to do for objects as children keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey ); } result.push(mappedChild); } } function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { var escapedPrefix = ''; if (prefix != null) { escapedPrefix = escapeUserProvidedKey(prefix) + '/'; } var traverseContext = MapBookKeeping.getPooled( array, escapedPrefix, func, context ); traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); MapBookKeeping.release(traverseContext); } var numericPropertyRegex = /^\d+$/; var warnedAboutNumeric = false; function createReactFragment(object) { if (typeof object !== 'object' || !object || Array.isArray(object)) { warning( false, 'React.addons.createFragment only accepts a single object. Got: %s', object ); return object; } if (React.isValidElement(object)) { warning( false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.' ); return object; } invariant( object.nodeType !== 1, 'React.addons.createFragment(...): Encountered an invalid child; DOM ' + 'elements are not valid children of React components.' ); var result = []; for (var key in object) { if (process.env.NODE_ENV !== 'production') { if (!warnedAboutNumeric && numericPropertyRegex.test(key)) { warning( false, 'React.addons.createFragment(...): Child objects should have ' + 'non-numeric keys so ordering is preserved.' ); warnedAboutNumeric = true; } } mapIntoWithKeyPrefixInternal( object[key], result, key, emptyFunction.thatReturnsArgument ); } return result; } module.exports = createReactFragment; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 102 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var validateFormat = function validateFormat(format) {}; if (process.env.NODE_ENV !== 'production') { validateFormat = function validateFormat(format) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } }; } function invariant(condition, format, a, b, c, d, e, f) { validateFormat(format); if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error(format.replace(/%s/g, function () { return args[argIndex++]; })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } } module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 103 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ var emptyFunction = __webpack_require__(57); /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var warning = emptyFunction; if (process.env.NODE_ENV !== 'production') { var printWarning = function printWarning(format) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; warning = function warning(condition, format) { if (format === undefined) { throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); } if (format.indexOf('Failed Composite propType: ') === 0) { return; // Ignore CompositeComponent proptype check. } if (!condition) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } printWarning.apply(undefined, [format].concat(args)); } }; } module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 104 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function identifyToken(item) { // {{/example}} if (item.match(/^\{\{\//)) { return { type: 'componentClose', value: item.replace(/\W/g, '') }; } // {{example /}} if (item.match(/\/\}\}$/)) { return { type: 'componentSelfClosing', value: item.replace(/\W/g, '') }; } // {{example}} if (item.match(/^\{\{/)) { return { type: 'componentOpen', value: item.replace(/\W/g, '') }; } return { type: 'string', value: item }; } module.exports = function (mixedString) { var tokenStrings = mixedString.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g); // split to components and strings return tokenStrings.map(identifyToken); }; //# sourceMappingURL=tokenize.js.map /***/ }), /* 105 */ /***/ (function(module, exports, __webpack_require__) { var events = __webpack_require__(55) var inherits = __webpack_require__(54) module.exports = LRU function LRU (opts) { if (!(this instanceof LRU)) return new LRU(opts) if (typeof opts === 'number') opts = {max: opts} if (!opts) opts = {} events.EventEmitter.call(this) this.cache = {} this.head = this.tail = null this.length = 0 this.max = opts.max || 1000 this.maxAge = opts.maxAge || 0 } inherits(LRU, events.EventEmitter) Object.defineProperty(LRU.prototype, 'keys', { get: function () { return Object.keys(this.cache) } }) LRU.prototype.clear = function () { this.cache = {} this.head = this.tail = null this.length = 0 } LRU.prototype.remove = function (key) { if (typeof key !== 'string') key = '' + key if (!this.cache.hasOwnProperty(key)) return var element = this.cache[key] delete this.cache[key] this._unlink(key, element.prev, element.next) return element.value } LRU.prototype._unlink = function (key, prev, next) { this.length-- if (this.length === 0) { this.head = this.tail = null } else { if (this.head === key) { this.head = prev this.cache[this.head].next = null } else if (this.tail === key) { this.tail = next this.cache[this.tail].prev = null } else { this.cache[prev].next = next this.cache[next].prev = prev } } } LRU.prototype.peek = function (key) { if (!this.cache.hasOwnProperty(key)) return var element = this.cache[key] if (!this._checkAge(key, element)) return return element.value } LRU.prototype.set = function (key, value) { if (typeof key !== 'string') key = '' + key var element if (this.cache.hasOwnProperty(key)) { element = this.cache[key] element.value = value if (this.maxAge) element.modified = Date.now() // If it's already the head, there's nothing more to do: if (key === this.head) return value this._unlink(key, element.prev, element.next) } else { element = {value: value, modified: 0, next: null, prev: null} if (this.maxAge) element.modified = Date.now() this.cache[key] = element // Eviction is only possible if the key didn't already exist: if (this.length === this.max) this.evict() } this.length++ element.next = null element.prev = this.head if (this.head) this.cache[this.head].next = key this.head = key if (!this.tail) this.tail = key return value } LRU.prototype._checkAge = function (key, element) { if (this.maxAge && (Date.now() - element.modified) > this.maxAge) { this.remove(key) this.emit('evict', {key: key, value: element.value}) return false } return true } LRU.prototype.get = function (key) { if (typeof key !== 'string') key = '' + key if (!this.cache.hasOwnProperty(key)) return var element = this.cache[key] if (!this._checkAge(key, element)) return if (this.head !== key) { if (key === this.tail) { this.tail = element.next this.cache[this.tail].prev = null } else { // Set prev.next -> element.next: this.cache[element.prev].next = element.next } // Set element.next.prev -> element.prev: this.cache[element.next].prev = element.prev // Element is the new head this.cache[this.head].next = key element.prev = this.head element.next = null this.head = key } return element.value } LRU.prototype.evict = function () { if (!this.tail) return var key = this.tail var value = this.remove(this.tail) this.emit('evict', {key: key, value: value}) } /***/ }), /* 106 */ /***/ (function(module, exports) { /** * Exposes number format capability * * @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors). * @license See CREDITS.md * @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js */ function number_format( number, decimals, dec_point, thousands_sep ) { number = ( number + '' ) .replace( /[^0-9+\-Ee.]/g, '' ); var n = ! isFinite( +number ) ? 0 : +number, prec = ! isFinite( +decimals ) ? 0 : Math.abs( decimals ), sep = ( typeof thousands_sep === 'undefined' ) ? ',' : thousands_sep, dec = ( typeof dec_point === 'undefined' ) ? '.' : dec_point, s = '', toFixedFix = function( n, prec ) { var k = Math.pow( 10, prec ); return '' + ( Math.round( n * k ) / k ) .toFixed( prec ); }; // Fix for IE parseFloat(0.55).toFixed(0) = 0; s = ( prec ? toFixedFix( n, prec ) : '' + Math.round( n ) ) .split( '.' ); if ( s[ 0 ].length > 3 ) { s[ 0 ] = s[ 0 ].replace( /\B(?=(?:\d{3})+(?!\d))/g, sep ); } if ( ( s[ 1 ] || '' ) .length < prec ) { s[ 1 ] = s[ 1 ] || ''; s[ 1 ] += new Array( prec - s[ 1 ].length + 1 ) .join( '0' ); } return s.join( dec ); } module.exports = number_format; /***/ }), /* 107 */ /***/ (function(module, exports, __webpack_require__) { var React = __webpack_require__( 108 ), assign = __webpack_require__( 58 ), createClass = __webpack_require__( 111 ); /** * Localize a React component * @param ComposedComponent * @returns A new Localized React Component */ module.exports = function( i18n ) { var i18nProps = { numberFormat: i18n.numberFormat.bind( i18n ), translate: i18n.translate.bind( i18n ) }; return function( ComposedComponent ) { var componentName = ComposedComponent.displayName || ComposedComponent.name || ''; var component = createClass({ displayName: 'Localized(' + componentName + ')', componentDidMount: function() { this.boundForceUpdate = this.forceUpdate.bind( this ); i18n.stateObserver.addListener( 'change', this.boundForceUpdate ); }, componentWillUnmount: function() { // in some cases, componentWillUnmount is called before componentDidMount // Supposedly fixed in React 15.1.0: https://github.com/facebook/react/issues/2410 if ( this.boundForceUpdate ) { i18n.stateObserver.removeListener( 'change', this.boundForceUpdate ); } }, render: function() { var props = assign( {}, this.props, i18nProps ); return React.createElement( ComposedComponent, props ); } } ); component._composedComponent = ComposedComponent; return component; }; }; /***/ }), /* 108 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { if (process.env.NODE_ENV === 'production') { module.exports = __webpack_require__(109); } else { module.exports = __webpack_require__(110); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 109 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @license React v16.14.0 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var l=__webpack_require__(20),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.forward_ref"):60112,y=n?Symbol.for("react.suspense"):60113,z=n?Symbol.for("react.memo"):60115,A=n?Symbol.for("react.lazy"): 60116,B="function"===typeof Symbol&&Symbol.iterator;function C(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."} var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E={};function F(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}F.prototype.isReactComponent={};F.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(C(85));this.updater.enqueueSetState(this,a,b,"setState")};F.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")}; function G(){}G.prototype=F.prototype;function H(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}var I=H.prototype=new G;I.constructor=H;l(I,F.prototype);I.isPureReactComponent=!0;var J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0}; function M(a,b,c){var e,d={},g=null,k=null;if(null!=b)for(e in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=""+b.key),b)K.call(b,e)&&!L.hasOwnProperty(e)&&(d[e]=b[e]);var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){for(var h=Array(f),m=0;m<f;m++)h[m]=arguments[m+2];d.children=h}if(a&&a.defaultProps)for(e in f=a.defaultProps,f)void 0===d[e]&&(d[e]=f[e]);return{$$typeof:p,type:a,key:g,ref:k,props:d,_owner:J.current}} function N(a,b){return{$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return"object"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g,Q=[];function R(a,b,c,e){if(Q.length){var d=Q.pop();d.result=a;d.keyPrefix=b;d.func=c;d.context=e;d.count=0;return d}return{result:a,keyPrefix:b,func:c,context:e,count:0}} function S(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>Q.length&&Q.push(a)} function T(a,b,c,e){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0}}if(g)return c(e,a,""===b?"."+U(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){d=a[k];var f=b+U(d,k);g+=T(d,f,c,e)}else if(null===a||"object"!==typeof a?f=null:(f=B&&a[B]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),k= 0;!(d=a.next()).done;)d=d.value,f=b+U(d,k++),g+=T(d,f,c,e);else if("object"===d)throw c=""+a,Error(C(31,"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c,""));return g}function V(a,b,c){return null==a?0:T(a,"",b,c)}function U(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function W(a,b){a.func.call(a.context,b,a.count++)} function aa(a,b,c){var e=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?X(a,e,c,function(a){return a}):null!=a&&(O(a)&&(a=N(a,d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(P,"$&/")+"/")+c)),e.push(a))}function X(a,b,c,e,d){var g="";null!=c&&(g=(""+c).replace(P,"$&/")+"/");b=R(b,g,e,d);V(a,aa,b);S(b)}var Y={current:null};function Z(){var a=Y.current;if(null===a)throw Error(C(321));return a} var ba={ReactCurrentDispatcher:Y,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:J,IsSomeRendererActing:{current:!1},assign:l};exports.Children={map:function(a,b,c){if(null==a)return a;var e=[];X(a,e,null,b,c);return e},forEach:function(a,b,c){if(null==a)return a;b=R(null,null,b,c);V(a,W,b);S(b)},count:function(a){return V(a,function(){return null},null)},toArray:function(a){var b=[];X(a,b,null,function(a){return a});return b},only:function(a){if(!O(a))throw Error(C(143));return a}}; exports.Component=F;exports.Fragment=r;exports.Profiler=u;exports.PureComponent=H;exports.StrictMode=t;exports.Suspense=y;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ba; exports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(C(267,a));var e=l({},a.props),d=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=J.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)K.call(b,h)&&!L.hasOwnProperty(h)&&(e[h]=void 0===b[h]&&void 0!==f?f[h]:b[h])}var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){f=Array(h);for(var m=0;m<h;m++)f[m]=arguments[m+2];e.children=f}return{$$typeof:p,type:a.type, key:d,ref:g,props:e,_owner:k}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:x,render:a}};exports.isValidElement=O; exports.lazy=function(a){return{$$typeof:A,_ctor:a,_status:-1,_result:null}};exports.memo=function(a,b){return{$$typeof:z,type:a,compare:void 0===b?null:b}};exports.useCallback=function(a,b){return Z().useCallback(a,b)};exports.useContext=function(a,b){return Z().useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return Z().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return Z().useImperativeHandle(a,b,c)}; exports.useLayoutEffect=function(a,b){return Z().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return Z().useMemo(a,b)};exports.useReducer=function(a,b,c){return Z().useReducer(a,b,c)};exports.useRef=function(a){return Z().useRef(a)};exports.useState=function(a){return Z().useState(a)};exports.version="16.14.0"; /***/ }), /* 110 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.14.0 * react.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (process.env.NODE_ENV !== "production") { (function() { 'use strict'; var _assign = __webpack_require__(20); var checkPropTypes = __webpack_require__(56); var ReactVersion = '16.14.0'; // The Symbol used to tag the ReactElement-like types. If there is no native Symbol // nor polyfill, then a plain number is used for performance. var hasSymbol = typeof Symbol === 'function' && Symbol.for; var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; function getIteratorFn(maybeIterable) { if (maybeIterable === null || typeof maybeIterable !== 'object') { return null; } var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; if (typeof maybeIterator === 'function') { return maybeIterator; } return null; } /** * Keeps track of the current dispatcher. */ var ReactCurrentDispatcher = { /** * @internal * @type {ReactComponent} */ current: null }; /** * Keeps track of the current batch's configuration such as how long an update * should suspend for if it needs to. */ var ReactCurrentBatchConfig = { suspense: null }; /** * Keeps track of the current owner. * * The current owner is the component who should own any components that are * currently being constructed. */ var ReactCurrentOwner = { /** * @internal * @type {ReactComponent} */ current: null }; var BEFORE_SLASH_RE = /^(.*)[\\\/]/; function describeComponentFrame (name, source, ownerName) { var sourceInfo = ''; if (source) { var path = source.fileName; var fileName = path.replace(BEFORE_SLASH_RE, ''); { // In DEV, include code for a common special case: // prefer "folder/index.js" instead of just "index.js". if (/^index\./.test(fileName)) { var match = path.match(BEFORE_SLASH_RE); if (match) { var pathBeforeSlash = match[1]; if (pathBeforeSlash) { var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); fileName = folderName + '/' + fileName; } } } } sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; } else if (ownerName) { sourceInfo = ' (created by ' + ownerName + ')'; } return '\n in ' + (name || 'Unknown') + sourceInfo; } var Resolved = 1; function refineResolvedLazyComponent(lazyComponent) { return lazyComponent._status === Resolved ? lazyComponent._result : null; } function getWrappedName(outerType, innerType, wrapperName) { var functionName = innerType.displayName || innerType.name || ''; return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName); } function getComponentName(type) { if (type == null) { // Host root, text node or just invalid type. return null; } { if (typeof type.tag === 'number') { error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.'); } } if (typeof type === 'function') { return type.displayName || type.name || null; } if (typeof type === 'string') { return type; } switch (type) { case REACT_FRAGMENT_TYPE: return 'Fragment'; case REACT_PORTAL_TYPE: return 'Portal'; case REACT_PROFILER_TYPE: return "Profiler"; case REACT_STRICT_MODE_TYPE: return 'StrictMode'; case REACT_SUSPENSE_TYPE: return 'Suspense'; case REACT_SUSPENSE_LIST_TYPE: return 'SuspenseList'; } if (typeof type === 'object') { switch (type.$$typeof) { case REACT_CONTEXT_TYPE: return 'Context.Consumer'; case REACT_PROVIDER_TYPE: return 'Context.Provider'; case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, 'ForwardRef'); case REACT_MEMO_TYPE: return getComponentName(type.type); case REACT_BLOCK_TYPE: return getComponentName(type.render); case REACT_LAZY_TYPE: { var thenable = type; var resolvedThenable = refineResolvedLazyComponent(thenable); if (resolvedThenable) { return getComponentName(resolvedThenable); } break; } } } return null; } var ReactDebugCurrentFrame = {}; var currentlyValidatingElement = null; function setCurrentlyValidatingElement(element) { { currentlyValidatingElement = element; } } { // Stack implementation injected by the current renderer. ReactDebugCurrentFrame.getCurrentStack = null; ReactDebugCurrentFrame.getStackAddendum = function () { var stack = ''; // Add an extra top frame while an element is being validated if (currentlyValidatingElement) { var name = getComponentName(currentlyValidatingElement.type); var owner = currentlyValidatingElement._owner; stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type)); } // Delegate to the injected renderer-specific implementation var impl = ReactDebugCurrentFrame.getCurrentStack; if (impl) { stack += impl() || ''; } return stack; }; } /** * Used by act() to track whether you're inside an act() scope. */ var IsSomeRendererActing = { current: false }; var ReactSharedInternals = { ReactCurrentDispatcher: ReactCurrentDispatcher, ReactCurrentBatchConfig: ReactCurrentBatchConfig, ReactCurrentOwner: ReactCurrentOwner, IsSomeRendererActing: IsSomeRendererActing, // Used by renderers to avoid bundling object-assign twice in UMD bundles: assign: _assign }; { _assign(ReactSharedInternals, { // These should not be included in production. ReactDebugCurrentFrame: ReactDebugCurrentFrame, // Shim for React DOM 16.0.0 which still destructured (but not used) this. // TODO: remove in React 17.0. ReactComponentTreeHook: {} }); } // by calls to these methods by a Babel plugin. // // In PROD (or in packages without access to React internals), // they are left as they are instead. function warn(format) { { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } printWarning('warn', format, args); } } function error(format) { { for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } printWarning('error', format, args); } } function printWarning(level, format, args) { // When changing this logic, you might want to also // update consoleWithStackDev.www.js as well. { var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0; if (!hasExistingStack) { var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var stack = ReactDebugCurrentFrame.getStackAddendum(); if (stack !== '') { format += '%s'; args = args.concat([stack]); } } var argsWithFormat = args.map(function (item) { return '' + item; }); // Careful: RN currently depends on this prefix argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it // breaks IE9: https://github.com/facebook/react/issues/13610 // eslint-disable-next-line react-internal/no-production-logging Function.prototype.apply.call(console[level], console, argsWithFormat); try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); throw new Error(message); } catch (x) {} } } var didWarnStateUpdateForUnmountedComponent = {}; function warnNoop(publicInstance, callerName) { { var _constructor = publicInstance.constructor; var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass'; var warningKey = componentName + "." + callerName; if (didWarnStateUpdateForUnmountedComponent[warningKey]) { return; } error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName); didWarnStateUpdateForUnmountedComponent[warningKey] = true; } } /** * This is the abstract API for an update queue. */ var ReactNoopUpdateQueue = { /** * Checks whether or not this composite component is mounted. * @param {ReactClass} publicInstance The instance we want to test. * @return {boolean} True if mounted, false otherwise. * @protected * @final */ isMounted: function (publicInstance) { return false; }, /** * Forces an update. This should only be invoked when it is known with * certainty that we are **not** in a DOM transaction. * * You may want to call this when you know that some deeper aspect of the * component's state has changed but `setState` was not called. * * This will not invoke `shouldComponentUpdate`, but it will invoke * `componentWillUpdate` and `componentDidUpdate`. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {?function} callback Called after component is updated. * @param {?string} callerName name of the calling function in the public API. * @internal */ enqueueForceUpdate: function (publicInstance, callback, callerName) { warnNoop(publicInstance, 'forceUpdate'); }, /** * Replaces all of the state. Always use this or `setState` to mutate state. * You should treat `this.state` as immutable. * * There is no guarantee that `this.state` will be immediately updated, so * accessing `this.state` after calling this method may return the old value. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {object} completeState Next state. * @param {?function} callback Called after component is updated. * @param {?string} callerName name of the calling function in the public API. * @internal */ enqueueReplaceState: function (publicInstance, completeState, callback, callerName) { warnNoop(publicInstance, 'replaceState'); }, /** * Sets a subset of the state. This only exists because _pendingState is * internal. This provides a merging strategy that is not available to deep * properties which is confusing. TODO: Expose pendingState or don't use it * during the merge. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {object} partialState Next partial state to be merged with state. * @param {?function} callback Called after component is updated. * @param {?string} Name of the calling function in the public API. * @internal */ enqueueSetState: function (publicInstance, partialState, callback, callerName) { warnNoop(publicInstance, 'setState'); } }; var emptyObject = {}; { Object.freeze(emptyObject); } /** * Base class helpers for the updating state of a component. */ function Component(props, context, updater) { this.props = props; this.context = context; // If a component has string refs, we will assign a different object later. this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. this.updater = updater || ReactNoopUpdateQueue; } Component.prototype.isReactComponent = {}; /** * Sets a subset of the state. Always use this to mutate * state. You should treat `this.state` as immutable. * * There is no guarantee that `this.state` will be immediately updated, so * accessing `this.state` after calling this method may return the old value. * * There is no guarantee that calls to `setState` will run synchronously, * as they may eventually be batched together. You can provide an optional * callback that will be executed when the call to setState is actually * completed. * * When a function is provided to setState, it will be called at some point in * the future (not synchronously). It will be called with the up to date * component arguments (state, props, context). These values can be different * from this.* because your function may be called after receiveProps but before * shouldComponentUpdate, and this new state, props, and context will not yet be * assigned to this. * * @param {object|function} partialState Next partial state or function to * produce next partial state to be merged with current state. * @param {?function} callback Called after state is updated. * @final * @protected */ Component.prototype.setState = function (partialState, callback) { if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) { { throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." ); } } this.updater.enqueueSetState(this, partialState, callback, 'setState'); }; /** * Forces an update. This should only be invoked when it is known with * certainty that we are **not** in a DOM transaction. * * You may want to call this when you know that some deeper aspect of the * component's state has changed but `setState` was not called. * * This will not invoke `shouldComponentUpdate`, but it will invoke * `componentWillUpdate` and `componentDidUpdate`. * * @param {?function} callback Called after update is complete. * @final * @protected */ Component.prototype.forceUpdate = function (callback) { this.updater.enqueueForceUpdate(this, callback, 'forceUpdate'); }; /** * Deprecated APIs. These APIs used to exist on classic React classes but since * we would like to deprecate them, we're not going to move them over to this * modern base class. Instead, we define a getter that warns if it's accessed. */ { var deprecatedAPIs = { isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] }; var defineDeprecationWarning = function (methodName, info) { Object.defineProperty(Component.prototype, methodName, { get: function () { warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); return undefined; } }); }; for (var fnName in deprecatedAPIs) { if (deprecatedAPIs.hasOwnProperty(fnName)) { defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); } } } function ComponentDummy() {} ComponentDummy.prototype = Component.prototype; /** * Convenience component with default shallow equality check for sCU. */ function PureComponent(props, context, updater) { this.props = props; this.context = context; // If a component has string refs, we will assign a different object later. this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; } var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods. _assign(pureComponentPrototype, Component.prototype); pureComponentPrototype.isPureReactComponent = true; // an immutable object with a single mutable value function createRef() { var refObject = { current: null }; { Object.seal(refObject); } return refObject; } var hasOwnProperty = Object.prototype.hasOwnProperty; var RESERVED_PROPS = { key: true, ref: true, __self: true, __source: true }; var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; { didWarnAboutStringRefs = {}; } function hasValidRef(config) { { if (hasOwnProperty.call(config, 'ref')) { var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; if (getter && getter.isReactWarning) { return false; } } } return config.ref !== undefined; } function hasValidKey(config) { { if (hasOwnProperty.call(config, 'key')) { var getter = Object.getOwnPropertyDescriptor(config, 'key').get; if (getter && getter.isReactWarning) { return false; } } } return config.key !== undefined; } function defineKeyPropWarningGetter(props, displayName) { var warnAboutAccessingKey = function () { { if (!specialPropKeyWarningShown) { specialPropKeyWarningShown = true; error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); } } }; warnAboutAccessingKey.isReactWarning = true; Object.defineProperty(props, 'key', { get: warnAboutAccessingKey, configurable: true }); } function defineRefPropWarningGetter(props, displayName) { var warnAboutAccessingRef = function () { { if (!specialPropRefWarningShown) { specialPropRefWarningShown = true; error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); } } }; warnAboutAccessingRef.isReactWarning = true; Object.defineProperty(props, 'ref', { get: warnAboutAccessingRef, configurable: true }); } function warnIfStringRefCannotBeAutoConverted(config) { { if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { var componentName = getComponentName(ReactCurrentOwner.current.type); if (!didWarnAboutStringRefs[componentName]) { error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref); didWarnAboutStringRefs[componentName] = true; } } } } /** * Factory method to create a new React element. This no longer adheres to * the class pattern, so do not use new to call it. Also, instanceof check * will not work. Instead test $$typeof field against Symbol.for('react.element') to check * if something is a React Element. * * @param {*} type * @param {*} props * @param {*} key * @param {string|object} ref * @param {*} owner * @param {*} self A *temporary* helper to detect places where `this` is * different from the `owner` when React.createElement is called, so that we * can warn. We want to get rid of owner and replace string `ref`s with arrow * functions, and as long as `this` and owner are the same, there will be no * change in behavior. * @param {*} source An annotation object (added by a transpiler or otherwise) * indicating filename, line number, and/or other information. * @internal */ var ReactElement = function (type, key, ref, self, source, owner, props) { var element = { // This tag allows us to uniquely identify this as a React Element $$typeof: REACT_ELEMENT_TYPE, // Built-in properties that belong on the element type: type, key: key, ref: ref, props: props, // Record the component responsible for creating this element. _owner: owner }; { // The validation flag is currently mutative. We put it on // an external backing store so that we can freeze the whole object. // This can be replaced with a WeakMap once they are implemented in // commonly used development environments. element._store = {}; // To make comparing ReactElements easier for testing purposes, we make // the validation flag non-enumerable (where possible, which should // include every environment we run tests in), so the test framework // ignores it. Object.defineProperty(element._store, 'validated', { configurable: false, enumerable: false, writable: true, value: false }); // self and source are DEV only properties. Object.defineProperty(element, '_self', { configurable: false, enumerable: false, writable: false, value: self }); // Two elements created in two different places should be considered // equal for testing purposes and therefore we hide it from enumeration. Object.defineProperty(element, '_source', { configurable: false, enumerable: false, writable: false, value: source }); if (Object.freeze) { Object.freeze(element.props); Object.freeze(element); } } return element; }; /** * Create and return a new ReactElement of the given type. * See https://reactjs.org/docs/react-api.html#createelement */ function createElement(type, config, children) { var propName; // Reserved names are extracted var props = {}; var key = null; var ref = null; var self = null; var source = null; if (config != null) { if (hasValidRef(config)) { ref = config.ref; { warnIfStringRefCannotBeAutoConverted(config); } } if (hasValidKey(config)) { key = '' + config.key; } self = config.__self === undefined ? null : config.__self; source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object for (propName in config) { if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } } // Children can be more than one argument, and those are transferred onto // the newly allocated props object. var childrenLength = arguments.length - 2; if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 2]; } { if (Object.freeze) { Object.freeze(childArray); } } props.children = childArray; } // Resolve default props if (type && type.defaultProps) { var defaultProps = type.defaultProps; for (propName in defaultProps) { if (props[propName] === undefined) { props[propName] = defaultProps[propName]; } } } { if (key || ref) { var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; if (key) { defineKeyPropWarningGetter(props, displayName); } if (ref) { defineRefPropWarningGetter(props, displayName); } } } return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); } function cloneAndReplaceKey(oldElement, newKey) { var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); return newElement; } /** * Clone and return a new ReactElement using element as the starting point. * See https://reactjs.org/docs/react-api.html#cloneelement */ function cloneElement(element, config, children) { if (!!(element === null || element === undefined)) { { throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." ); } } var propName; // Original props are copied var props = _assign({}, element.props); // Reserved names are extracted var key = element.key; var ref = element.ref; // Self is preserved since the owner is preserved. var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a // transpiler, and the original source is probably a better indicator of the // true owner. var source = element._source; // Owner will be preserved, unless ref is overridden var owner = element._owner; if (config != null) { if (hasValidRef(config)) { // Silently steal the ref from the parent. ref = config.ref; owner = ReactCurrentOwner.current; } if (hasValidKey(config)) { key = '' + config.key; } // Remaining properties override existing props var defaultProps; if (element.type && element.type.defaultProps) { defaultProps = element.type.defaultProps; } for (propName in config) { if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { if (config[propName] === undefined && defaultProps !== undefined) { // Resolve default props props[propName] = defaultProps[propName]; } else { props[propName] = config[propName]; } } } } // Children can be more than one argument, and those are transferred onto // the newly allocated props object. var childrenLength = arguments.length - 2; if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 2]; } props.children = childArray; } return ReactElement(element.type, key, ref, self, source, owner, props); } /** * Verifies the object is a ReactElement. * See https://reactjs.org/docs/react-api.html#isvalidelement * @param {?object} object * @return {boolean} True if `object` is a ReactElement. * @final */ function isValidElement(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } var SEPARATOR = '.'; var SUBSEPARATOR = ':'; /** * Escape and wrap key so it is safe to use as a reactid * * @param {string} key to be escaped. * @return {string} the escaped key. */ function escape(key) { var escapeRegex = /[=:]/g; var escaperLookup = { '=': '=0', ':': '=2' }; var escapedString = ('' + key).replace(escapeRegex, function (match) { return escaperLookup[match]; }); return '$' + escapedString; } /** * TODO: Test that a single child and an array with one item have the same key * pattern. */ var didWarnAboutMaps = false; var userProvidedKeyEscapeRegex = /\/+/g; function escapeUserProvidedKey(text) { return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); } var POOL_SIZE = 10; var traverseContextPool = []; function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) { if (traverseContextPool.length) { var traverseContext = traverseContextPool.pop(); traverseContext.result = mapResult; traverseContext.keyPrefix = keyPrefix; traverseContext.func = mapFunction; traverseContext.context = mapContext; traverseContext.count = 0; return traverseContext; } else { return { result: mapResult, keyPrefix: keyPrefix, func: mapFunction, context: mapContext, count: 0 }; } } function releaseTraverseContext(traverseContext) { traverseContext.result = null; traverseContext.keyPrefix = null; traverseContext.func = null; traverseContext.context = null; traverseContext.count = 0; if (traverseContextPool.length < POOL_SIZE) { traverseContextPool.push(traverseContext); } } /** * @param {?*} children Children tree container. * @param {!string} nameSoFar Name of the key path so far. * @param {!function} callback Callback to invoke with each child found. * @param {?*} traverseContext Used to pass information throughout the traversal * process. * @return {!number} The number of children in this subtree. */ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { var type = typeof children; if (type === 'undefined' || type === 'boolean') { // All of the above are perceived as null. children = null; } var invokeCallback = false; if (children === null) { invokeCallback = true; } else { switch (type) { case 'string': case 'number': invokeCallback = true; break; case 'object': switch (children.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = true; } } } if (invokeCallback) { callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array // so that it's consistent if the number of children grows. nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); return 1; } var child; var nextName; var subtreeCount = 0; // Count of children found in the current subtree. var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; if (Array.isArray(children)) { for (var i = 0; i < children.length; i++) { child = children[i]; nextName = nextNamePrefix + getComponentKey(child, i); subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); } } else { var iteratorFn = getIteratorFn(children); if (typeof iteratorFn === 'function') { { // Warn about using Maps as children if (iteratorFn === children.entries) { if (!didWarnAboutMaps) { warn('Using Maps as children is deprecated and will be removed in ' + 'a future major release. Consider converting children to ' + 'an array of keyed ReactElements instead.'); } didWarnAboutMaps = true; } } var iterator = iteratorFn.call(children); var step; var ii = 0; while (!(step = iterator.next()).done) { child = step.value; nextName = nextNamePrefix + getComponentKey(child, ii++); subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); } } else if (type === 'object') { var addendum = ''; { addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum(); } var childrenString = '' + children; { { throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ")." + addendum ); } } } } return subtreeCount; } /** * Traverses children that are typically specified as `props.children`, but * might also be specified through attributes: * * - `traverseAllChildren(this.props.children, ...)` * - `traverseAllChildren(this.props.leftPanelChildren, ...)` * * The `traverseContext` is an optional argument that is passed through the * entire traversal. It can be used to store accumulations or anything else that * the callback might find relevant. * * @param {?*} children Children tree object. * @param {!function} callback To invoke upon traversing each child. * @param {?*} traverseContext Context for traversal. * @return {!number} The number of children in this subtree. */ function traverseAllChildren(children, callback, traverseContext) { if (children == null) { return 0; } return traverseAllChildrenImpl(children, '', callback, traverseContext); } /** * Generate a key string that identifies a component within a set. * * @param {*} component A component that could contain a manual key. * @param {number} index Index that is used if a manual key is not provided. * @return {string} */ function getComponentKey(component, index) { // Do some typechecking here since we call this blindly. We want to ensure // that we don't block potential future ES APIs. if (typeof component === 'object' && component !== null && component.key != null) { // Explicit key return escape(component.key); } // Implicit key determined by the index in the set return index.toString(36); } function forEachSingleChild(bookKeeping, child, name) { var func = bookKeeping.func, context = bookKeeping.context; func.call(context, child, bookKeeping.count++); } /** * Iterates through children that are typically specified as `props.children`. * * See https://reactjs.org/docs/react-api.html#reactchildrenforeach * * The provided forEachFunc(child, index) will be called for each * leaf child. * * @param {?*} children Children tree container. * @param {function(*, int)} forEachFunc * @param {*} forEachContext Context for forEachContext. */ function forEachChildren(children, forEachFunc, forEachContext) { if (children == null) { return children; } var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext); traverseAllChildren(children, forEachSingleChild, traverseContext); releaseTraverseContext(traverseContext); } function mapSingleChildIntoContext(bookKeeping, child, childKey) { var result = bookKeeping.result, keyPrefix = bookKeeping.keyPrefix, func = bookKeeping.func, context = bookKeeping.context; var mappedChild = func.call(context, child, bookKeeping.count++); if (Array.isArray(mappedChild)) { mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) { return c; }); } else if (mappedChild != null) { if (isValidElement(mappedChild)) { mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as // traverseAllChildren used to do for objects as children keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); } result.push(mappedChild); } } function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { var escapedPrefix = ''; if (prefix != null) { escapedPrefix = escapeUserProvidedKey(prefix) + '/'; } var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context); traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); releaseTraverseContext(traverseContext); } /** * Maps children that are typically specified as `props.children`. * * See https://reactjs.org/docs/react-api.html#reactchildrenmap * * The provided mapFunction(child, key, index) will be called for each * leaf child. * * @param {?*} children Children tree container. * @param {function(*, int)} func The map function. * @param {*} context Context for mapFunction. * @return {object} Object containing the ordered map of results. */ function mapChildren(children, func, context) { if (children == null) { return children; } var result = []; mapIntoWithKeyPrefixInternal(children, result, null, func, context); return result; } /** * Count the number of children that are typically specified as * `props.children`. * * See https://reactjs.org/docs/react-api.html#reactchildrencount * * @param {?*} children Children tree container. * @return {number} The number of children. */ function countChildren(children) { return traverseAllChildren(children, function () { return null; }, null); } /** * Flatten a children object (typically specified as `props.children`) and * return an array with appropriately re-keyed children. * * See https://reactjs.org/docs/react-api.html#reactchildrentoarray */ function toArray(children) { var result = []; mapIntoWithKeyPrefixInternal(children, result, null, function (child) { return child; }); return result; } /** * Returns the first child in a collection of children and verifies that there * is only one child in the collection. * * See https://reactjs.org/docs/react-api.html#reactchildrenonly * * The current implementation of this function assumes that a single child gets * passed without a wrapper, but the purpose of this helper function is to * abstract away the particular structure of children. * * @param {?object} children Child collection structure. * @return {ReactElement} The first and only `ReactElement` contained in the * structure. */ function onlyChild(children) { if (!isValidElement(children)) { { throw Error( "React.Children.only expected to receive a single React element child." ); } } return children; } function createContext(defaultValue, calculateChangedBits) { if (calculateChangedBits === undefined) { calculateChangedBits = null; } else { { if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') { error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits); } } } var context = { $$typeof: REACT_CONTEXT_TYPE, _calculateChangedBits: calculateChangedBits, // As a workaround to support multiple concurrent renderers, we categorize // some renderers as primary and others as secondary. We only expect // there to be two concurrent renderers at most: React Native (primary) and // Fabric (secondary); React DOM (primary) and React ART (secondary). // Secondary renderers store their context values on separate fields. _currentValue: defaultValue, _currentValue2: defaultValue, // Used to track how many concurrent renderers this context currently // supports within in a single renderer. Such as parallel server rendering. _threadCount: 0, // These are circular Provider: null, Consumer: null }; context.Provider = { $$typeof: REACT_PROVIDER_TYPE, _context: context }; var hasWarnedAboutUsingNestedContextConsumers = false; var hasWarnedAboutUsingConsumerProvider = false; { // A separate object, but proxies back to the original context object for // backwards compatibility. It has a different $$typeof, so we can properly // warn for the incorrect usage of Context as a Consumer. var Consumer = { $$typeof: REACT_CONTEXT_TYPE, _context: context, _calculateChangedBits: context._calculateChangedBits }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here Object.defineProperties(Consumer, { Provider: { get: function () { if (!hasWarnedAboutUsingConsumerProvider) { hasWarnedAboutUsingConsumerProvider = true; error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?'); } return context.Provider; }, set: function (_Provider) { context.Provider = _Provider; } }, _currentValue: { get: function () { return context._currentValue; }, set: function (_currentValue) { context._currentValue = _currentValue; } }, _currentValue2: { get: function () { return context._currentValue2; }, set: function (_currentValue2) { context._currentValue2 = _currentValue2; } }, _threadCount: { get: function () { return context._threadCount; }, set: function (_threadCount) { context._threadCount = _threadCount; } }, Consumer: { get: function () { if (!hasWarnedAboutUsingNestedContextConsumers) { hasWarnedAboutUsingNestedContextConsumers = true; error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?'); } return context.Consumer; } } }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty context.Consumer = Consumer; } { context._currentRenderer = null; context._currentRenderer2 = null; } return context; } function lazy(ctor) { var lazyType = { $$typeof: REACT_LAZY_TYPE, _ctor: ctor, // React uses these fields to store the result. _status: -1, _result: null }; { // In production, this would just set it on the object. var defaultProps; var propTypes; Object.defineProperties(lazyType, { defaultProps: { configurable: true, get: function () { return defaultProps; }, set: function (newDefaultProps) { error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.'); defaultProps = newDefaultProps; // Match production behavior more closely: Object.defineProperty(lazyType, 'defaultProps', { enumerable: true }); } }, propTypes: { configurable: true, get: function () { return propTypes; }, set: function (newPropTypes) { error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.'); propTypes = newPropTypes; // Match production behavior more closely: Object.defineProperty(lazyType, 'propTypes', { enumerable: true }); } } }); } return lazyType; } function forwardRef(render) { { if (render != null && render.$$typeof === REACT_MEMO_TYPE) { error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).'); } else if (typeof render !== 'function') { error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render); } else { if (render.length !== 0 && render.length !== 2) { error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.'); } } if (render != null) { if (render.defaultProps != null || render.propTypes != null) { error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?'); } } } return { $$typeof: REACT_FORWARD_REF_TYPE, render: render }; } function isValidElementType(type) { return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); } function memo(type, compare) { { if (!isValidElementType(type)) { error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type); } } return { $$typeof: REACT_MEMO_TYPE, type: type, compare: compare === undefined ? null : compare }; } function resolveDispatcher() { var dispatcher = ReactCurrentDispatcher.current; if (!(dispatcher !== null)) { { throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." ); } } return dispatcher; } function useContext(Context, unstable_observedBits) { var dispatcher = resolveDispatcher(); { if (unstable_observedBits !== undefined) { error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : ''); } // TODO: add a more generic warning for invalid values. if (Context._context !== undefined) { var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs // and nobody should be using this in existing code. if (realContext.Consumer === Context) { error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?'); } else if (realContext.Provider === Context) { error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?'); } } } return dispatcher.useContext(Context, unstable_observedBits); } function useState(initialState) { var dispatcher = resolveDispatcher(); return dispatcher.useState(initialState); } function useReducer(reducer, initialArg, init) { var dispatcher = resolveDispatcher(); return dispatcher.useReducer(reducer, initialArg, init); } function useRef(initialValue) { var dispatcher = resolveDispatcher(); return dispatcher.useRef(initialValue); } function useEffect(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useEffect(create, deps); } function useLayoutEffect(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useLayoutEffect(create, deps); } function useCallback(callback, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useCallback(callback, deps); } function useMemo(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useMemo(create, deps); } function useImperativeHandle(ref, create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useImperativeHandle(ref, create, deps); } function useDebugValue(value, formatterFn) { { var dispatcher = resolveDispatcher(); return dispatcher.useDebugValue(value, formatterFn); } } var propTypesMisspellWarningShown; { propTypesMisspellWarningShown = false; } function getDeclarationErrorAddendum() { if (ReactCurrentOwner.current) { var name = getComponentName(ReactCurrentOwner.current.type); if (name) { return '\n\nCheck the render method of `' + name + '`.'; } } return ''; } function getSourceInfoErrorAddendum(source) { if (source !== undefined) { var fileName = source.fileName.replace(/^.*[\\\/]/, ''); var lineNumber = source.lineNumber; return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; } return ''; } function getSourceInfoErrorAddendumForProps(elementProps) { if (elementProps !== null && elementProps !== undefined) { return getSourceInfoErrorAddendum(elementProps.__source); } return ''; } /** * Warn if there's no key explicitly set on dynamic arrays of children or * object keys are not valid. This allows us to keep track of children between * updates. */ var ownerHasKeyUseWarning = {}; function getCurrentComponentErrorInfo(parentType) { var info = getDeclarationErrorAddendum(); if (!info) { var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; if (parentName) { info = "\n\nCheck the top-level render call using <" + parentName + ">."; } } return info; } /** * Warn if the element doesn't have an explicit key assigned to it. * This element is in an array. The array could grow and shrink or be * reordered. All children that haven't already been validated are required to * have a "key" property assigned to it. Error statuses are cached so a warning * will only be shown once. * * @internal * @param {ReactElement} element Element that requires a key. * @param {*} parentType element's parent's type. */ function validateExplicitKey(element, parentType) { if (!element._store || element._store.validated || element.key != null) { return; } element._store.validated = true; var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { return; } ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a // property, it may be the creator of the child that's responsible for // assigning it a key. var childOwner = ''; if (element && element._owner && element._owner !== ReactCurrentOwner.current) { // Give the component that originally created this child. childOwner = " It was passed a child from " + getComponentName(element._owner.type) + "."; } setCurrentlyValidatingElement(element); { error('Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner); } setCurrentlyValidatingElement(null); } /** * Ensure that every element either is passed in a static location, in an * array with an explicit keys property defined, or in an object literal * with valid key property. * * @internal * @param {ReactNode} node Statically passed child of any type. * @param {*} parentType node's parent's type. */ function validateChildKeys(node, parentType) { if (typeof node !== 'object') { return; } if (Array.isArray(node)) { for (var i = 0; i < node.length; i++) { var child = node[i]; if (isValidElement(child)) { validateExplicitKey(child, parentType); } } } else if (isValidElement(node)) { // This element was passed in a valid location. if (node._store) { node._store.validated = true; } } else if (node) { var iteratorFn = getIteratorFn(node); if (typeof iteratorFn === 'function') { // Entry iterators used to provide implicit keys, // but now we print a separate warning for them later. if (iteratorFn !== node.entries) { var iterator = iteratorFn.call(node); var step; while (!(step = iterator.next()).done) { if (isValidElement(step.value)) { validateExplicitKey(step.value, parentType); } } } } } } /** * Given an element, validate that its props follow the propTypes definition, * provided by the type. * * @param {ReactElement} element */ function validatePropTypes(element) { { var type = element.type; if (type === null || type === undefined || typeof type === 'string') { return; } var name = getComponentName(type); var propTypes; if (typeof type === 'function') { propTypes = type.propTypes; } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. type.$$typeof === REACT_MEMO_TYPE)) { propTypes = type.propTypes; } else { return; } if (propTypes) { setCurrentlyValidatingElement(element); checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum); setCurrentlyValidatingElement(null); } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { propTypesMisspellWarningShown = true; error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown'); } if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) { error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); } } } /** * Given a fragment, validate that it can only be provided with fragment props * @param {ReactElement} fragment */ function validateFragmentProps(fragment) { { setCurrentlyValidatingElement(fragment); var keys = Object.keys(fragment.props); for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (key !== 'children' && key !== 'key') { error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); break; } } if (fragment.ref !== null) { error('Invalid attribute `ref` supplied to `React.Fragment`.'); } setCurrentlyValidatingElement(null); } } function createElementWithValidation(type, props, children) { var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to // succeed and there will likely be errors in render. if (!validType) { var info = ''; if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; } var sourceInfo = getSourceInfoErrorAddendumForProps(props); if (sourceInfo) { info += sourceInfo; } else { info += getDeclarationErrorAddendum(); } var typeString; if (type === null) { typeString = 'null'; } else if (Array.isArray(type)) { typeString = 'array'; } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />"; info = ' Did you accidentally export a JSX literal instead of a component?'; } else { typeString = typeof type; } { error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); } } var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used. // TODO: Drop this when these are no longer allowed as the type argument. if (element == null) { return element; } // Skip key warning if the type isn't valid since our key validation logic // doesn't expect a non-string/function type and can throw confusing errors. // We don't want exception behavior to differ between dev and prod. // (Rendering will throw with a helpful message and as soon as the type is // fixed, the key warnings will appear.) if (validType) { for (var i = 2; i < arguments.length; i++) { validateChildKeys(arguments[i], type); } } if (type === REACT_FRAGMENT_TYPE) { validateFragmentProps(element); } else { validatePropTypes(element); } return element; } var didWarnAboutDeprecatedCreateFactory = false; function createFactoryWithValidation(type) { var validatedFactory = createElementWithValidation.bind(null, type); validatedFactory.type = type; { if (!didWarnAboutDeprecatedCreateFactory) { didWarnAboutDeprecatedCreateFactory = true; warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.'); } // Legacy hook: remove it Object.defineProperty(validatedFactory, 'type', { enumerable: false, get: function () { warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.'); Object.defineProperty(this, 'type', { value: type }); return type; } }); } return validatedFactory; } function cloneElementWithValidation(element, props, children) { var newElement = cloneElement.apply(this, arguments); for (var i = 2; i < arguments.length; i++) { validateChildKeys(arguments[i], newElement.type); } validatePropTypes(newElement); return newElement; } { try { var frozenObject = Object.freeze({}); var testMap = new Map([[frozenObject, null]]); var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused. // https://github.com/rollup/rollup/issues/1771 // TODO: we can remove these if Rollup fixes the bug. testMap.set(0, 0); testSet.add(0); } catch (e) { } } var createElement$1 = createElementWithValidation ; var cloneElement$1 = cloneElementWithValidation ; var createFactory = createFactoryWithValidation ; var Children = { map: mapChildren, forEach: forEachChildren, count: countChildren, toArray: toArray, only: onlyChild }; exports.Children = Children; exports.Component = Component; exports.Fragment = REACT_FRAGMENT_TYPE; exports.Profiler = REACT_PROFILER_TYPE; exports.PureComponent = PureComponent; exports.StrictMode = REACT_STRICT_MODE_TYPE; exports.Suspense = REACT_SUSPENSE_TYPE; exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; exports.cloneElement = cloneElement$1; exports.createContext = createContext; exports.createElement = createElement$1; exports.createFactory = createFactory; exports.createRef = createRef; exports.forwardRef = forwardRef; exports.isValidElement = isValidElement; exports.lazy = lazy; exports.memo = memo; exports.useCallback = useCallback; exports.useContext = useContext; exports.useDebugValue = useDebugValue; exports.useEffect = useEffect; exports.useImperativeHandle = useImperativeHandle; exports.useLayoutEffect = useLayoutEffect; exports.useMemo = useMemo; exports.useReducer = useReducer; exports.useRef = useRef; exports.useState = useState; exports.version = ReactVersion; })(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 111 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ var React = __webpack_require__(0); var factory = __webpack_require__(112); if (typeof React === 'undefined') { throw Error( 'create-react-class could not find the React object. If you are using script tags, ' + 'make sure that React is being loaded before create-react-class.' ); } // Hack to grab NoopUpdateQueue from isomorphic React var ReactNoopUpdateQueue = new React.Component().updater; module.exports = factory( React.Component, React.isValidElement, ReactNoopUpdateQueue ); /***/ }), /* 112 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ var _assign = __webpack_require__(20); // -- Inlined from fbjs -- var emptyObject = {}; if (process.env.NODE_ENV !== 'production') { Object.freeze(emptyObject); } var validateFormat = function validateFormat(format) {}; if (process.env.NODE_ENV !== 'production') { validateFormat = function validateFormat(format) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } }; } function _invariant(condition, format, a, b, c, d, e, f) { validateFormat(format); if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error(format.replace(/%s/g, function () { return args[argIndex++]; })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } } var warning = function(){}; if (process.env.NODE_ENV !== 'production') { var printWarning = function printWarning(format) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; warning = function warning(condition, format) { if (format === undefined) { throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); } if (format.indexOf('Failed Composite propType: ') === 0) { return; // Ignore CompositeComponent proptype check. } if (!condition) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } printWarning.apply(undefined, [format].concat(args)); } }; } // /-- Inlined from fbjs -- var MIXINS_KEY = 'mixins'; // Helper function to allow the creation of anonymous functions which do not // have .name set to the name of the variable being assigned to. function identity(fn) { return fn; } var ReactPropTypeLocationNames; if (process.env.NODE_ENV !== 'production') { ReactPropTypeLocationNames = { prop: 'prop', context: 'context', childContext: 'child context' }; } else { ReactPropTypeLocationNames = {}; } function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { /** * Policies that describe methods in `ReactClassInterface`. */ var injectedMixins = []; /** * Composite components are higher-level components that compose other composite * or host components. * * To create a new type of `ReactClass`, pass a specification of * your new class to `React.createClass`. The only requirement of your class * specification is that you implement a `render` method. * * var MyComponent = React.createClass({ * render: function() { * return <div>Hello World</div>; * } * }); * * The class specification supports a specific protocol of methods that have * special meaning (e.g. `render`). See `ReactClassInterface` for * more the comprehensive protocol. Any other properties and methods in the * class specification will be available on the prototype. * * @interface ReactClassInterface * @internal */ var ReactClassInterface = { /** * An array of Mixin objects to include when defining your component. * * @type {array} * @optional */ mixins: 'DEFINE_MANY', /** * An object containing properties and methods that should be defined on * the component's constructor instead of its prototype (static methods). * * @type {object} * @optional */ statics: 'DEFINE_MANY', /** * Definition of prop types for this component. * * @type {object} * @optional */ propTypes: 'DEFINE_MANY', /** * Definition of context types for this component. * * @type {object} * @optional */ contextTypes: 'DEFINE_MANY', /** * Definition of context types this component sets for its children. * * @type {object} * @optional */ childContextTypes: 'DEFINE_MANY', // ==== Definition methods ==== /** * Invoked when the component is mounted. Values in the mapping will be set on * `this.props` if that prop is not specified (i.e. using an `in` check). * * This method is invoked before `getInitialState` and therefore cannot rely * on `this.state` or use `this.setState`. * * @return {object} * @optional */ getDefaultProps: 'DEFINE_MANY_MERGED', /** * Invoked once before the component is mounted. The return value will be used * as the initial value of `this.state`. * * getInitialState: function() { * return { * isOn: false, * fooBaz: new BazFoo() * } * } * * @return {object} * @optional */ getInitialState: 'DEFINE_MANY_MERGED', /** * @return {object} * @optional */ getChildContext: 'DEFINE_MANY_MERGED', /** * Uses props from `this.props` and state from `this.state` to render the * structure of the component. * * No guarantees are made about when or how often this method is invoked, so * it must not have side effects. * * render: function() { * var name = this.props.name; * return <div>Hello, {name}!</div>; * } * * @return {ReactComponent} * @required */ render: 'DEFINE_ONCE', // ==== Delegate methods ==== /** * Invoked when the component is initially created and about to be mounted. * This may have side effects, but any external subscriptions or data created * by this method must be cleaned up in `componentWillUnmount`. * * @optional */ componentWillMount: 'DEFINE_MANY', /** * Invoked when the component has been mounted and has a DOM representation. * However, there is no guarantee that the DOM node is in the document. * * Use this as an opportunity to operate on the DOM when the component has * been mounted (initialized and rendered) for the first time. * * @param {DOMElement} rootNode DOM element representing the component. * @optional */ componentDidMount: 'DEFINE_MANY', /** * Invoked before the component receives new props. * * Use this as an opportunity to react to a prop transition by updating the * state using `this.setState`. Current props are accessed via `this.props`. * * componentWillReceiveProps: function(nextProps, nextContext) { * this.setState({ * likesIncreasing: nextProps.likeCount > this.props.likeCount * }); * } * * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop * transition may cause a state change, but the opposite is not true. If you * need it, you are probably looking for `componentWillUpdate`. * * @param {object} nextProps * @optional */ componentWillReceiveProps: 'DEFINE_MANY', /** * Invoked while deciding if the component should be updated as a result of * receiving new props, state and/or context. * * Use this as an opportunity to `return false` when you're certain that the * transition to the new props/state/context will not require a component * update. * * shouldComponentUpdate: function(nextProps, nextState, nextContext) { * return !equal(nextProps, this.props) || * !equal(nextState, this.state) || * !equal(nextContext, this.context); * } * * @param {object} nextProps * @param {?object} nextState * @param {?object} nextContext * @return {boolean} True if the component should update. * @optional */ shouldComponentUpdate: 'DEFINE_ONCE', /** * Invoked when the component is about to update due to a transition from * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` * and `nextContext`. * * Use this as an opportunity to perform preparation before an update occurs. * * NOTE: You **cannot** use `this.setState()` in this method. * * @param {object} nextProps * @param {?object} nextState * @param {?object} nextContext * @param {ReactReconcileTransaction} transaction * @optional */ componentWillUpdate: 'DEFINE_MANY', /** * Invoked when the component's DOM representation has been updated. * * Use this as an opportunity to operate on the DOM when the component has * been updated. * * @param {object} prevProps * @param {?object} prevState * @param {?object} prevContext * @param {DOMElement} rootNode DOM element representing the component. * @optional */ componentDidUpdate: 'DEFINE_MANY', /** * Invoked when the component is about to be removed from its parent and have * its DOM representation destroyed. * * Use this as an opportunity to deallocate any external resources. * * NOTE: There is no `componentDidUnmount` since your component will have been * destroyed by that point. * * @optional */ componentWillUnmount: 'DEFINE_MANY', /** * Replacement for (deprecated) `componentWillMount`. * * @optional */ UNSAFE_componentWillMount: 'DEFINE_MANY', /** * Replacement for (deprecated) `componentWillReceiveProps`. * * @optional */ UNSAFE_componentWillReceiveProps: 'DEFINE_MANY', /** * Replacement for (deprecated) `componentWillUpdate`. * * @optional */ UNSAFE_componentWillUpdate: 'DEFINE_MANY', // ==== Advanced methods ==== /** * Updates the component's currently mounted DOM representation. * * By default, this implements React's rendering and reconciliation algorithm. * Sophisticated clients may wish to override this. * * @param {ReactReconcileTransaction} transaction * @internal * @overridable */ updateComponent: 'OVERRIDE_BASE' }; /** * Similar to ReactClassInterface but for static methods. */ var ReactClassStaticInterface = { /** * This method is invoked after a component is instantiated and when it * receives new props. Return an object to update state in response to * prop changes. Return null to indicate no change to state. * * If an object is returned, its keys will be merged into the existing state. * * @return {object || null} * @optional */ getDerivedStateFromProps: 'DEFINE_MANY_MERGED' }; /** * Mapping from class specification keys to special processing functions. * * Although these are declared like instance properties in the specification * when defining classes using `React.createClass`, they are actually static * and are accessible on the constructor instead of the prototype. Despite * being static, they must be defined outside of the "statics" key under * which all other static methods are defined. */ var RESERVED_SPEC_KEYS = { displayName: function(Constructor, displayName) { Constructor.displayName = displayName; }, mixins: function(Constructor, mixins) { if (mixins) { for (var i = 0; i < mixins.length; i++) { mixSpecIntoComponent(Constructor, mixins[i]); } } }, childContextTypes: function(Constructor, childContextTypes) { if (process.env.NODE_ENV !== 'production') { validateTypeDef(Constructor, childContextTypes, 'childContext'); } Constructor.childContextTypes = _assign( {}, Constructor.childContextTypes, childContextTypes ); }, contextTypes: function(Constructor, contextTypes) { if (process.env.NODE_ENV !== 'production') { validateTypeDef(Constructor, contextTypes, 'context'); } Constructor.contextTypes = _assign( {}, Constructor.contextTypes, contextTypes ); }, /** * Special case getDefaultProps which should move into statics but requires * automatic merging. */ getDefaultProps: function(Constructor, getDefaultProps) { if (Constructor.getDefaultProps) { Constructor.getDefaultProps = createMergedResultFunction( Constructor.getDefaultProps, getDefaultProps ); } else { Constructor.getDefaultProps = getDefaultProps; } }, propTypes: function(Constructor, propTypes) { if (process.env.NODE_ENV !== 'production') { validateTypeDef(Constructor, propTypes, 'prop'); } Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); }, statics: function(Constructor, statics) { mixStaticSpecIntoComponent(Constructor, statics); }, autobind: function() {} }; function validateTypeDef(Constructor, typeDef, location) { for (var propName in typeDef) { if (typeDef.hasOwnProperty(propName)) { // use a warning instead of an _invariant so components // don't show up in prod but only in __DEV__ if (process.env.NODE_ENV !== 'production') { warning( typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName ); } } } } function validateMethodOverride(isAlreadyDefined, name) { var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; // Disallow overriding of base class methods unless explicitly allowed. if (ReactClassMixin.hasOwnProperty(name)) { _invariant( specPolicy === 'OVERRIDE_BASE', 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name ); } // Disallow defining methods more than once unless explicitly allowed. if (isAlreadyDefined) { _invariant( specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name ); } } /** * Mixin helper which handles policy validation and reserved * specification keys when building React classes. */ function mixSpecIntoComponent(Constructor, spec) { if (!spec) { if (process.env.NODE_ENV !== 'production') { var typeofSpec = typeof spec; var isMixinValid = typeofSpec === 'object' && spec !== null; if (process.env.NODE_ENV !== 'production') { warning( isMixinValid, "%s: You're attempting to include a mixin that is either null " + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec ); } } return; } _invariant( typeof spec !== 'function', "ReactClass: You're attempting to " + 'use a component class or function as a mixin. Instead, just use a ' + 'regular object.' ); _invariant( !isValidElement(spec), "ReactClass: You're attempting to " + 'use a component as a mixin. Instead, just use a regular object.' ); var proto = Constructor.prototype; var autoBindPairs = proto.__reactAutoBindPairs; // By handling mixins before any other properties, we ensure the same // chaining order is applied to methods with DEFINE_MANY policy, whether // mixins are listed before or after these methods in the spec. if (spec.hasOwnProperty(MIXINS_KEY)) { RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); } for (var name in spec) { if (!spec.hasOwnProperty(name)) { continue; } if (name === MIXINS_KEY) { // We have already handled mixins in a special case above. continue; } var property = spec[name]; var isAlreadyDefined = proto.hasOwnProperty(name); validateMethodOverride(isAlreadyDefined, name); if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { RESERVED_SPEC_KEYS[name](Constructor, property); } else { // Setup methods on prototype: // The following member methods should not be automatically bound: // 1. Expected ReactClass methods (in the "interface"). // 2. Overridden methods (that were mixed in). var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); var isFunction = typeof property === 'function'; var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; if (shouldAutoBind) { autoBindPairs.push(name, property); proto[name] = property; } else { if (isAlreadyDefined) { var specPolicy = ReactClassInterface[name]; // These cases should already be caught by validateMethodOverride. _invariant( isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name ); // For methods which are defined more than once, call the existing // methods before calling the new property, merging if appropriate. if (specPolicy === 'DEFINE_MANY_MERGED') { proto[name] = createMergedResultFunction(proto[name], property); } else if (specPolicy === 'DEFINE_MANY') { proto[name] = createChainedFunction(proto[name], property); } } else { proto[name] = property; if (process.env.NODE_ENV !== 'production') { // Add verbose displayName to the function, which helps when looking // at profiling tools. if (typeof property === 'function' && spec.displayName) { proto[name].displayName = spec.displayName + '_' + name; } } } } } } } function mixStaticSpecIntoComponent(Constructor, statics) { if (!statics) { return; } for (var name in statics) { var property = statics[name]; if (!statics.hasOwnProperty(name)) { continue; } var isReserved = name in RESERVED_SPEC_KEYS; _invariant( !isReserved, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name ); var isAlreadyDefined = name in Constructor; if (isAlreadyDefined) { var specPolicy = ReactClassStaticInterface.hasOwnProperty(name) ? ReactClassStaticInterface[name] : null; _invariant( specPolicy === 'DEFINE_MANY_MERGED', 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name ); Constructor[name] = createMergedResultFunction(Constructor[name], property); return; } Constructor[name] = property; } } /** * Merge two objects, but throw if both contain the same key. * * @param {object} one The first object, which is mutated. * @param {object} two The second object * @return {object} one after it has been mutated to contain everything in two. */ function mergeIntoWithNoDuplicateKeys(one, two) { _invariant( one && two && typeof one === 'object' && typeof two === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' ); for (var key in two) { if (two.hasOwnProperty(key)) { _invariant( one[key] === undefined, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key ); one[key] = two[key]; } } return one; } /** * Creates a function that invokes two functions and merges their return values. * * @param {function} one Function to invoke first. * @param {function} two Function to invoke second. * @return {function} Function that invokes the two argument functions. * @private */ function createMergedResultFunction(one, two) { return function mergedResult() { var a = one.apply(this, arguments); var b = two.apply(this, arguments); if (a == null) { return b; } else if (b == null) { return a; } var c = {}; mergeIntoWithNoDuplicateKeys(c, a); mergeIntoWithNoDuplicateKeys(c, b); return c; }; } /** * Creates a function that invokes two functions and ignores their return vales. * * @param {function} one Function to invoke first. * @param {function} two Function to invoke second. * @return {function} Function that invokes the two argument functions. * @private */ function createChainedFunction(one, two) { return function chainedFunction() { one.apply(this, arguments); two.apply(this, arguments); }; } /** * Binds a method to the component. * * @param {object} component Component whose method is going to be bound. * @param {function} method Method to be bound. * @return {function} The bound method. */ function bindAutoBindMethod(component, method) { var boundMethod = method.bind(component); if (process.env.NODE_ENV !== 'production') { boundMethod.__reactBoundContext = component; boundMethod.__reactBoundMethod = method; boundMethod.__reactBoundArguments = null; var componentName = component.constructor.displayName; var _bind = boundMethod.bind; boundMethod.bind = function(newThis) { for ( var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++ ) { args[_key - 1] = arguments[_key]; } // User is trying to bind() an autobound method; we effectively will // ignore the value of "this" that the user is trying to use, so // let's warn. if (newThis !== component && newThis !== null) { if (process.env.NODE_ENV !== 'production') { warning( false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName ); } } else if (!args.length) { if (process.env.NODE_ENV !== 'production') { warning( false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName ); } return boundMethod; } var reboundMethod = _bind.apply(boundMethod, arguments); reboundMethod.__reactBoundContext = component; reboundMethod.__reactBoundMethod = method; reboundMethod.__reactBoundArguments = args; return reboundMethod; }; } return boundMethod; } /** * Binds all auto-bound methods in a component. * * @param {object} component Component whose method is going to be bound. */ function bindAutoBindMethods(component) { var pairs = component.__reactAutoBindPairs; for (var i = 0; i < pairs.length; i += 2) { var autoBindKey = pairs[i]; var method = pairs[i + 1]; component[autoBindKey] = bindAutoBindMethod(component, method); } } var IsMountedPreMixin = { componentDidMount: function() { this.__isMounted = true; } }; var IsMountedPostMixin = { componentWillUnmount: function() { this.__isMounted = false; } }; /** * Add more to the ReactClass base class. These are all legacy features and * therefore not already part of the modern ReactComponent. */ var ReactClassMixin = { /** * TODO: This will be deprecated because state should always keep a consistent * type signature and the only use case for this, is to avoid that. */ replaceState: function(newState, callback) { this.updater.enqueueReplaceState(this, newState, callback); }, /** * Checks whether or not this composite component is mounted. * @return {boolean} True if mounted, false otherwise. * @protected * @final */ isMounted: function() { if (process.env.NODE_ENV !== 'production') { warning( this.__didWarnIsMounted, '%s: isMounted is deprecated. Instead, make sure to clean up ' + 'subscriptions and pending requests in componentWillUnmount to ' + 'prevent memory leaks.', (this.constructor && this.constructor.displayName) || this.name || 'Component' ); this.__didWarnIsMounted = true; } return !!this.__isMounted; } }; var ReactClassComponent = function() {}; _assign( ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin ); /** * Creates a composite component class given a class specification. * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass * * @param {object} spec Class specification (which must define `render`). * @return {function} Component constructor function. * @public */ function createClass(spec) { // To keep our warnings more understandable, we'll use a little hack here to // ensure that Constructor.name !== 'Constructor'. This makes sure we don't // unnecessarily identify a class without displayName as 'Constructor'. var Constructor = identity(function(props, context, updater) { // This constructor gets overridden by mocks. The argument is used // by mocks to assert on what gets mounted. if (process.env.NODE_ENV !== 'production') { warning( this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory' ); } // Wire up auto-binding if (this.__reactAutoBindPairs.length) { bindAutoBindMethods(this); } this.props = props; this.context = context; this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; this.state = null; // ReactClasses doesn't have constructors. Instead, they use the // getInitialState and componentWillMount methods for initialization. var initialState = this.getInitialState ? this.getInitialState() : null; if (process.env.NODE_ENV !== 'production') { // We allow auto-mocks to proceed as if they're returning null. if ( initialState === undefined && this.getInitialState._isMockFunction ) { // This is probably bad practice. Consider warning here and // deprecating this convenience. initialState = null; } } _invariant( typeof initialState === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent' ); this.state = initialState; }); Constructor.prototype = new ReactClassComponent(); Constructor.prototype.constructor = Constructor; Constructor.prototype.__reactAutoBindPairs = []; injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); mixSpecIntoComponent(Constructor, IsMountedPreMixin); mixSpecIntoComponent(Constructor, spec); mixSpecIntoComponent(Constructor, IsMountedPostMixin); // Initialize the defaultProps property after all mixins have been merged. if (Constructor.getDefaultProps) { Constructor.defaultProps = Constructor.getDefaultProps(); } if (process.env.NODE_ENV !== 'production') { // This is a tag to indicate that the use of these method names is ok, // since it's used with createClass. If it's not, then it's likely a // mistake so we'll warn you to use the static property, property // initializer or constructor respectively. if (Constructor.getDefaultProps) { Constructor.getDefaultProps.isReactClassApproved = {}; } if (Constructor.prototype.getInitialState) { Constructor.prototype.getInitialState.isReactClassApproved = {}; } } _invariant( Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.' ); if (process.env.NODE_ENV !== 'production') { warning( !Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component' ); warning( !Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component' ); warning( !Constructor.prototype.UNSAFE_componentWillRecieveProps, '%s has a method called UNSAFE_componentWillRecieveProps(). ' + 'Did you mean UNSAFE_componentWillReceiveProps()?', spec.displayName || 'A component' ); } // Reduce time spent doing lookups by setting these on the prototype. for (var methodName in ReactClassInterface) { if (!Constructor.prototype[methodName]) { Constructor.prototype[methodName] = null; } } return Constructor; } return createClass; } module.exports = factory; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 113 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var updateSetting = exports.updateSetting = function updateSetting(setting, value) { return function (dispatch) { // Update global variable with Changes window.forminatorChanges.settings = true; dispatch({ type: 'UPDATE_SETTING', setting: setting, value: value }); }; }; var updateSettings = exports.updateSettings = function updateSettings(settings) { return function (dispatch) { // Update global variable with Changes window.forminatorChanges.settings = true; dispatch({ type: 'UPDATE_SETTINGS', settings: settings }); }; }; var resetSettings = exports.resetSettings = function resetSettings(settings) { return function (dispatch) { // Update global variable with Changes window.forminatorChanges.settings = true; dispatch({ type: 'RESET_SETTINGS', settings: settings }); }; }; var saveBuilder = exports.saveBuilder = function saveBuilder(setting, value) { return function (dispatch) { // Empty global changed variable window.forminatorChanges = { fields: [], settings: false, saved: true }; dispatch({ type: 'UPDATE_SETTING', setting: setting, value: value }); }; }; /***/ }), /* 114 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var DatePicker = function (_Component) { _inherits(DatePicker, _Component); function DatePicker(props) { _classCallCheck(this, DatePicker); var _this = _possibleConstructorReturn(this, (DatePicker.__proto__ || Object.getPrototypeOf(DatePicker)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); // Propery to set if dateFormat has words in it like month names _this.hasWordFormat = _.isUndefined(_this.props.hasWordFormat) ? false : _this.props.hasWordFormat; return _this; } _createClass(DatePicker, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; this.$el = jQuery(this.el); var value = _.isUndefined(this.props.settings[this.props.property]) ? this.props.defaultValue : this.props.settings[this.props.property]; var dateFormat = this.props.dateFormat ? this.props.dateFormat : 'd MM yy'; var inputId = _.isUndefined(this.props.id) ? 'forminator-field-' + this.props.property : 'forminator-field-' + this.props.id; if (!this.hasWordFormat) { this.$el.val(value); } this.$el.datepicker({ beforeShow: function beforeShow(input, inst) { jQuery('#ui-datepicker-div').addClass('sui-calendar'); if ('forminator-field-date' === _this2.$el.attr('id')) { if ('disable' === _this2.props.state.past_dates) { _this2.$el.datepicker('option', 'minDate', _this2.$el.datepicker('getDate')); } else if ('enable' === _this2.props.state.past_dates) { _this2.$el.datepicker('option', 'minDate', null); } } }, dateFormat: dateFormat, dayNamesMin: forminatorl10n.calendar.day_names_min, monthNames: forminatorl10n.calendar.month_names, onSelect: function onSelect(date) { _this2.updateValue(date); } }); if (this.hasWordFormat) { this.$el.datepicker('option', 'altField', '#' + inputId + '-altfield'); this.$el.datepicker('option', 'altFormat', '@'); if (!_.isUndefined(value)) { if (isNaN(value)) { value = new Date(value).getTime(); } jQuery('#' + inputId + '-altfield').val(value); this.$el.datepicker('setDate', new Date(parseInt(value))); } } this.updateValue = this.updateValue.bind(this); } }, { key: 'updateValue', value: function updateValue(value) { if (this.hasWordFormat) { value = jQuery(this.$el.datepicker("option", "altField")).val(); } // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.$el.datepicker('destroy'); this.$el.unbind().removeData(); } }, { key: 'render', value: function render() { var _this3 = this; var customClass = !_.isUndefined(this.props.customClass) ? this.props.customClass : 'sui-form-control'; var calendarIcon = !_.isUndefined(this.props.calendarIcon) ? this.props.calendarIcon : 'right'; var fieldClass = 'sui-form-field'; if (!_.isUndefined(this.props.fieldClass)) { fieldClass += ' ' + this.props.fieldClass; } if (this.props.mediumSize) { fieldClass += ' sui-input-md'; } var fieldLabel = void 0; var iconButton = void 0; if (this.props.label) { fieldLabel = _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property, className: 'sui-label' }, this.props.label, this.props.note && _react2.default.createElement( 'span', { className: 'sui-label-note' }, this.props.note ) ); } if (this.props.canTrash) { iconButton = _react2.default.createElement( 'button', { className: 'sui-button-icon' }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Remove this date range') ) ); } if (this.props.canAdd) { iconButton = _react2.default.createElement( 'button', { className: 'sui-button-icon' }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Add selected date') ) ); } var inputId = _.isUndefined(this.props.id) ? 'forminator-field-' + this.props.property : 'forminator-field-' + this.props.id; var dateInput = _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement('input', _extends({ ref: function ref(el) { return _this3.el = el; }, id: inputId, className: customClass, placeholder: this.props.placeholder, type: 'text', autoComplete: 'off' }, this.props.onlyRead && { 'readonly="readonly"': '' })), this.hasWordFormat && _react2.default.createElement('input', { id: inputId + '-altfield', style: { display: 'none' } }) ); var dateField = _react2.default.createElement( 'div', { className: fieldClass }, fieldLabel, this.props.noCalendar ? dateInput : _react2.default.createElement( 'div', { className: 'sui-date' }, 'left' === calendarIcon && _react2.default.createElement('i', { className: 'sui-icon-calendar', 'aria-hidden': 'true' }), dateInput, 'right' === calendarIcon && _react2.default.createElement('i', { className: 'sui-icon-calendar', 'aria-hidden': 'true' }) ), _react2.default.createElement('div', { id: inputId + '-calendar', className: 'sui-date-calendar' }), this.props.description && _react2.default.createElement( 'span', { className: 'sui-description' }, this.props.description ) ); if (this.props.multiDate) { dateField = _react2.default.createElement( 'div', { className: 'sui-multi-date' }, _react2.default.createElement( 'div', { className: fieldClass }, fieldLabel, this.props.noCalendar ? dateInput : _react2.default.createElement( 'div', { className: 'sui-date' }, dateInput, _react2.default.createElement('i', { className: 'sui-icon-calendar', 'aria-hidden': 'true' }) ), this.props.description && _react2.default.createElement( 'span', { className: 'sui-description' }, this.props.description ) ), iconButton ); } return dateField; } }]); return DatePicker; }(_react.Component); exports.default = DatePicker; /***/ }), /* 115 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var RadioOptions = function (_Component) { _inherits(RadioOptions, _Component); function RadioOptions(props) { _classCallCheck(this, RadioOptions); return _possibleConstructorReturn(this, (RadioOptions.__proto__ || Object.getPrototypeOf(RadioOptions)).call(this, props)); } _createClass(RadioOptions, [{ key: 'updateValue', value: function updateValue(value) { // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } } }, { key: 'render', value: function render() { var _this2 = this; var radioClass = !_.isUndefined(this.props.radioClass) ? 'sui-radio ' + this.props.radioClass : 'sui-radio'; var value = _.isUndefined(this.props.settings[this.props.property]) ? this.props.defaultValue : this.props.settings[this.props.property]; var radioOptions = _react2.default.Children.map(this.props.children, function (tab) { var optionImage = ''; var optionLabel = !_.isUndefined(tab.props.label) ? tab.props.label : tab.props.children; if (tab.props.image1x && tab.props.image2x) { optionImage = _react2.default.createElement('img', { src: forminatorData.imagesUrl + '/' + tab.props.image1x, srcSet: forminatorData.imagesUrl + '/' + tab.props.image1x + ' 1x,\n\t\t\t\t\t\t\t' + forminatorData.imagesUrl + '/' + tab.props.image2x + ' 2x', 'aria-hidden': 'true' }); } if (tab.props.image1x && !tab.props.image2x) { optionImage = _react2.default.createElement('img', { src: forminatorData.imagesUrl + '/' + tab.props.image1x, 'aria-hidden': 'true' }); } if (tab.props.image2x && !tab.props.image1x) { optionImage = _react2.default.createElement('img', { src: forminatorData.imagesUrl + '/' + tab.props.image2x, srcSet: forminatorData.imagesUrl + '/' + tab.props.image2x + ' 2x', 'aria-hidden': 'true' }); } if (tab.props.hasImage) { return _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + tab.props.value, className: 'sui-radio-image' }, optionImage, _react2.default.createElement( 'span', { className: radioClass }, _react2.default.createElement('input', { type: 'radio', name: 'forminator-' + _this2.props.property, value: tab.props.value, id: 'forminator-field-' + tab.props.value, checked: value === tab.props.value, onChange: _this2.updateValue.bind(_this2, tab.props.value) }), _react2.default.createElement('span', { 'aria-hidden': 'true' }), _react2.default.createElement( 'span', null, optionLabel ) ) ); } if (!tab.props.hasImage) { return _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + tab.props.value, className: radioClass }, _react2.default.createElement('input', { type: 'radio', name: 'forminator-' + _this2.props.property, id: 'forminator-field-' + tab.props.value, value: tab.props.value, checked: value === tab.props.value, onChange: _this2.updateValue.bind(_this2, tab.props.value) }), _react2.default.createElement('span', { 'aria-hidden': 'true' }), _react2.default.createElement( 'span', null, optionLabel ) ); } }); var radioContent = _react2.default.Children.map(this.props.children, function (tab) { if ('true' === _this2.props.radioContent && !_.isUndefined(tab.props.children)) { return _react2.default.createElement( 'div', { className: 'sui-border-frame' + (tab.props.value === value ? '' : ' sui-hidden'), style: { marginLeft: '0' } }, tab.props.value === value && tab ); } return _react2.default.createElement(_react2.default.Fragment, null); }); var label = ''; if (this.props.label && '' !== this.props.label) { label = _react2.default.createElement( 'label', { className: 'sui-label' }, this.props.label, this.props.note && _react2.default.createElement( 'span', { className: 'sui-label-note' }, this.props.note ) ); } var description = ''; if (this.props.description && '' !== this.props.description) { description = _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, this.props.description ); } var settingsLabel = ''; if (this.props.settingsLabel && '' !== this.props.settingsLabel) { settingsLabel = _react2.default.createElement( 'label', { className: 'sui-settings-label' }, this.props.settingsLabel ); } var settingsDescription = ''; if (this.props.settingsDesc && '' !== this.props.settingsDesc) { settingsDescription = _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, this.props.settingsDesc ); } if (!this.props.noWrapper) { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { role: 'radiogroup', className: 'sui-form-field' }, label, settingsLabel, description, settingsDescription, radioOptions, radioContent ) ); } return radioOptions; } }]); return RadioOptions; }(_react.Component); exports.default = RadioOptions; /***/ }), /* 116 */, /* 117 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /** A function that accepts a potential "extra argument" value to be injected later, * and returns an instance of the thunk middleware that uses that value */ function createThunkMiddleware(extraArgument) { // Standard Redux middleware definition pattern: // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware var middleware = function middleware(_ref) { var dispatch = _ref.dispatch, getState = _ref.getState; return function (next) { return function (action) { // The thunk middleware looks for any functions that were passed to `store.dispatch`. // If this "action" is really a function, call it and return the result. if (typeof action === 'function') { // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg" return action(dispatch, getState, extraArgument); } // Otherwise, pass the action down the middleware chain as usual return next(action); }; }; }; return middleware; } var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version // with whatever "extra arg" they want to inject into their thunks thunk.withExtraArgument = createThunkMiddleware; /* harmony default export */ __webpack_exports__["default"] = (thunk); /***/ }), /* 118 */ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(360); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /* 119 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { if (process.env.NODE_ENV === 'production') { module.exports = __webpack_require__(120); } else { module.exports = __webpack_require__(121); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 120 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * @license React * use-sync-external-store-with-selector.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var g=__webpack_require__(0);function n(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var p="function"===typeof Object.is?Object.is:n,q=g.useSyncExternalStore,r=g.useRef,t=g.useEffect,u=g.useMemo,v=g.useDebugValue; exports.useSyncExternalStoreWithSelector=function(a,b,e,l,h){var c=r(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=u(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==h&&f.hasValue){var b=f.value;if(h(b,a))return k=b}return k=a}b=k;if(p(d,a))return b;var e=l(a);if(void 0!==h&&h(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,h]);var d=q(a,c[0],c[1]); t(function(){f.hasValue=!0;f.value=d},[d]);v(d);return d}; /***/ }), /* 121 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * @license React * use-sync-external-store-with-selector.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (process.env.NODE_ENV !== "production") { (function() { 'use strict'; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === 'function' ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } var React = __webpack_require__(0); /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ function is(x, y) { return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare ; } var objectIs = typeof Object.is === 'function' ? Object.is : is; var useSyncExternalStore = React.useSyncExternalStore; // for CommonJS interop. var useRef = React.useRef, useEffect = React.useEffect, useMemo = React.useMemo, useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments. function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) { // Use this to track the rendered snapshot. var instRef = useRef(null); var inst; if (instRef.current === null) { inst = { hasValue: false, value: null }; instRef.current = inst; } else { inst = instRef.current; } var _useMemo = useMemo(function () { // Track the memoized state using closure variables that are local to this // memoized instance of a getSnapshot function. Intentionally not using a // useRef hook, because that state would be shared across all concurrent // copies of the hook/component. var hasMemo = false; var memoizedSnapshot; var memoizedSelection; var memoizedSelector = function (nextSnapshot) { if (!hasMemo) { // The first time the hook is called, there is no memoized result. hasMemo = true; memoizedSnapshot = nextSnapshot; var _nextSelection = selector(nextSnapshot); if (isEqual !== undefined) { // Even if the selector has changed, the currently rendered selection // may be equal to the new selection. We should attempt to reuse the // current value if possible, to preserve downstream memoizations. if (inst.hasValue) { var currentSelection = inst.value; if (isEqual(currentSelection, _nextSelection)) { memoizedSelection = currentSelection; return currentSelection; } } } memoizedSelection = _nextSelection; return _nextSelection; } // We may be able to reuse the previous invocation's result. // We may be able to reuse the previous invocation's result. var prevSnapshot = memoizedSnapshot; var prevSelection = memoizedSelection; if (objectIs(prevSnapshot, nextSnapshot)) { // The snapshot is the same as last time. Reuse the previous selection. return prevSelection; } // The snapshot has changed, so we need to compute a new selection. // The snapshot has changed, so we need to compute a new selection. var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data // has changed. If it hasn't, return the previous selection. That signals // to React that the selections are conceptually equal, and we can bail // out of rendering. // If a custom isEqual function is provided, use that to check if the data // has changed. If it hasn't, return the previous selection. That signals // to React that the selections are conceptually equal, and we can bail // out of rendering. if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) { return prevSelection; } memoizedSnapshot = nextSnapshot; memoizedSelection = nextSelection; return nextSelection; }; // Assigning this to a constant so that Flow knows it can't change. // Assigning this to a constant so that Flow knows it can't change. var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot; var getSnapshotWithSelector = function () { return memoizedSelector(getSnapshot()); }; var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () { return memoizedSelector(maybeGetServerSnapshot()); }; return [getSnapshotWithSelector, getServerSnapshotWithSelector]; }, [getSnapshot, getServerSnapshot, selector, isEqual]), getSelection = _useMemo[0], getServerSelection = _useMemo[1]; var value = useSyncExternalStore(subscribe, getSelection, getServerSelection); useEffect(function () { inst.hasValue = true; inst.value = value; }, [value]); useDebugValue(value); return value; } exports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === 'function' ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } })(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 122 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread2; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__ = __webpack_require__(123); function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { Object(__WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /***/ }), /* 123 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toPropertyKey_js__ = __webpack_require__(124); function _defineProperty(e, r, t) { return (r = Object(__WEBPACK_IMPORTED_MODULE_0__toPropertyKey_js__["a" /* default */])(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } /***/ }), /* 124 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return toPropertyKey; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__typeof_js__ = __webpack_require__(67); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toPrimitive_js__ = __webpack_require__(125); function toPropertyKey(t) { var i = Object(__WEBPACK_IMPORTED_MODULE_1__toPrimitive_js__["a" /* default */])(t, "string"); return "symbol" == Object(__WEBPACK_IMPORTED_MODULE_0__typeof_js__["a" /* default */])(i) ? i : i + ""; } /***/ }), /* 125 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return toPrimitive; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__typeof_js__ = __webpack_require__(67); function toPrimitive(t, r) { if ("object" != Object(__WEBPACK_IMPORTED_MODULE_0__typeof_js__["a" /* default */])(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != Object(__WEBPACK_IMPORTED_MODULE_0__typeof_js__["a" /* default */])(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /***/ }), /* 126 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(13); var bind = __webpack_require__(68); var Axios = __webpack_require__(128); var defaults = __webpack_require__(42); /** * Create an instance of Axios * * @param {Object} defaultConfig The default config for the instance * @return {Axios} A new instance of Axios */ function createInstance(defaultConfig) { var context = new Axios(defaultConfig); var instance = bind(Axios.prototype.request, context); // Copy axios.prototype to instance utils.extend(instance, Axios.prototype, context); // Copy context to instance utils.extend(instance, context); return instance; } // Create the default instance to be exported var axios = createInstance(defaults); // Expose Axios class to allow class inheritance axios.Axios = Axios; // Factory for creating new instances axios.create = function create(instanceConfig) { return createInstance(utils.merge(defaults, instanceConfig)); }; // Expose Cancel & CancelToken axios.Cancel = __webpack_require__(72); axios.CancelToken = __webpack_require__(141); axios.isCancel = __webpack_require__(71); // Expose all/spread axios.all = function all(promises) { return Promise.all(promises); }; axios.spread = __webpack_require__(142); module.exports = axios; // Allow use of default import syntax in TypeScript module.exports.default = axios; /***/ }), /* 127 */ /***/ (function(module, exports) { /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh <https://feross.org> * @license MIT */ module.exports = function isBuffer (obj) { return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) } /***/ }), /* 128 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var defaults = __webpack_require__(42); var utils = __webpack_require__(13); var InterceptorManager = __webpack_require__(136); var dispatchRequest = __webpack_require__(137); /** * Create a new instance of Axios * * @param {Object} instanceConfig The default config for the instance */ function Axios(instanceConfig) { this.defaults = instanceConfig; this.interceptors = { request: new InterceptorManager(), response: new InterceptorManager() }; } /** * Dispatch a request * * @param {Object} config The config specific for this request (merged with this.defaults) */ Axios.prototype.request = function request(config) { /*eslint no-param-reassign:0*/ // Allow for axios('example/url'[, config]) a la fetch API if (typeof config === 'string') { config = utils.merge({ url: arguments[0] }, arguments[1]); } config = utils.merge(defaults, {method: 'get'}, this.defaults, config); config.method = config.method.toLowerCase(); // Hook up interceptors middleware var chain = [dispatchRequest, undefined]; var promise = Promise.resolve(config); this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { chain.unshift(interceptor.fulfilled, interceptor.rejected); }); this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { chain.push(interceptor.fulfilled, interceptor.rejected); }); while (chain.length) { promise = promise.then(chain.shift(), chain.shift()); } return promise; }; // Provide aliases for supported request methods utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { /*eslint func-names:0*/ Axios.prototype[method] = function(url, config) { return this.request(utils.merge(config || {}, { method: method, url: url })); }; }); utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { /*eslint func-names:0*/ Axios.prototype[method] = function(url, data, config) { return this.request(utils.merge(config || {}, { method: method, url: url, data: data })); }; }); module.exports = Axios; /***/ }), /* 129 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(13); module.exports = function normalizeHeaderName(headers, normalizedName) { utils.forEach(headers, function processHeader(value, name) { if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { headers[normalizedName] = value; delete headers[name]; } }); }; /***/ }), /* 130 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var createError = __webpack_require__(70); /** * Resolve or reject a Promise based on response status. * * @param {Function} resolve A function that resolves the promise. * @param {Function} reject A function that rejects the promise. * @param {object} response The response. */ module.exports = function settle(resolve, reject, response) { var validateStatus = response.config.validateStatus; // Note: status is not exposed by XDomainRequest if (!response.status || !validateStatus || validateStatus(response.status)) { resolve(response); } else { reject(createError( 'Request failed with status code ' + response.status, response.config, null, response.request, response )); } }; /***/ }), /* 131 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Update an Error with the specified config, error code, and response. * * @param {Error} error The error to update. * @param {Object} config The config. * @param {string} [code] The error code (for example, 'ECONNABORTED'). * @param {Object} [request] The request. * @param {Object} [response] The response. * @returns {Error} The error. */ module.exports = function enhanceError(error, config, code, request, response) { error.config = config; if (code) { error.code = code; } error.request = request; error.response = response; return error; }; /***/ }), /* 132 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(13); function encode(val) { return encodeURIComponent(val). replace(/%40/gi, '@'). replace(/%3A/gi, ':'). replace(/%24/g, '$'). replace(/%2C/gi, ','). replace(/%20/g, '+'). replace(/%5B/gi, '['). replace(/%5D/gi, ']'); } /** * Build a URL by appending params to the end * * @param {string} url The base of the url (e.g., http://www.google.com) * @param {object} [params] The params to be appended * @returns {string} The formatted url */ module.exports = function buildURL(url, params, paramsSerializer) { /*eslint no-param-reassign:0*/ if (!params) { return url; } var serializedParams; if (paramsSerializer) { serializedParams = paramsSerializer(params); } else if (utils.isURLSearchParams(params)) { serializedParams = params.toString(); } else { var parts = []; utils.forEach(params, function serialize(val, key) { if (val === null || typeof val === 'undefined') { return; } if (utils.isArray(val)) { key = key + '[]'; } else { val = [val]; } utils.forEach(val, function parseValue(v) { if (utils.isDate(v)) { v = v.toISOString(); } else if (utils.isObject(v)) { v = JSON.stringify(v); } parts.push(encode(key) + '=' + encode(v)); }); }); serializedParams = parts.join('&'); } if (serializedParams) { url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; } return url; }; /***/ }), /* 133 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(13); // Headers whose duplicates are ignored by node // c.f. https://nodejs.org/api/http.html#http_message_headers var ignoreDuplicateOf = [ 'age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent' ]; /** * Parse headers into an object * * ``` * Date: Wed, 27 Aug 2014 08:58:49 GMT * Content-Type: application/json * Connection: keep-alive * Transfer-Encoding: chunked * ``` * * @param {String} headers Headers needing to be parsed * @returns {Object} Headers parsed into an object */ module.exports = function parseHeaders(headers) { var parsed = {}; var key; var val; var i; if (!headers) { return parsed; } utils.forEach(headers.split('\n'), function parser(line) { i = line.indexOf(':'); key = utils.trim(line.substr(0, i)).toLowerCase(); val = utils.trim(line.substr(i + 1)); if (key) { if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { return; } if (key === 'set-cookie') { parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); } else { parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; } } }); return parsed; }; /***/ }), /* 134 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(13); module.exports = ( utils.isStandardBrowserEnv() ? // Standard browser envs have full support of the APIs needed to test // whether the request URL is of the same origin as current location. (function standardBrowserEnv() { var msie = /(msie|trident)/i.test(navigator.userAgent); var urlParsingNode = document.createElement('a'); var originURL; /** * Parse a URL to discover it's components * * @param {String} url The URL to be parsed * @returns {Object} */ function resolveURL(url) { var href = url; if (msie) { // IE needs attribute set twice to normalize properties urlParsingNode.setAttribute('href', href); href = urlParsingNode.href; } urlParsingNode.setAttribute('href', href); // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils return { href: urlParsingNode.href, protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', host: urlParsingNode.host, search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', hostname: urlParsingNode.hostname, port: urlParsingNode.port, pathname: (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname : '/' + urlParsingNode.pathname }; } originURL = resolveURL(window.location.href); /** * Determine if a URL shares the same origin as the current location * * @param {String} requestURL The URL to test * @returns {boolean} True if URL shares the same origin, otherwise false */ return function isURLSameOrigin(requestURL) { var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; return (parsed.protocol === originURL.protocol && parsed.host === originURL.host); }; })() : // Non standard browser envs (web workers, react-native) lack needed support. (function nonStandardBrowserEnv() { return function isURLSameOrigin() { return true; }; })() ); /***/ }), /* 135 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(13); module.exports = ( utils.isStandardBrowserEnv() ? // Standard browser envs support document.cookie (function standardBrowserEnv() { return { write: function write(name, value, expires, path, domain, secure) { var cookie = []; cookie.push(name + '=' + encodeURIComponent(value)); if (utils.isNumber(expires)) { cookie.push('expires=' + new Date(expires).toGMTString()); } if (utils.isString(path)) { cookie.push('path=' + path); } if (utils.isString(domain)) { cookie.push('domain=' + domain); } if (secure === true) { cookie.push('secure'); } document.cookie = cookie.join('; '); }, read: function read(name) { var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); return (match ? decodeURIComponent(match[3]) : null); }, remove: function remove(name) { this.write(name, '', Date.now() - 86400000); } }; })() : // Non standard browser env (web workers, react-native) lack needed support. (function nonStandardBrowserEnv() { return { write: function write() {}, read: function read() { return null; }, remove: function remove() {} }; })() ); /***/ }), /* 136 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(13); function InterceptorManager() { this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` * * @return {Number} An ID used to remove interceptor later */ InterceptorManager.prototype.use = function use(fulfilled, rejected) { this.handlers.push({ fulfilled: fulfilled, rejected: rejected }); return this.handlers.length - 1; }; /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` */ InterceptorManager.prototype.eject = function eject(id) { if (this.handlers[id]) { this.handlers[id] = null; } }; /** * Iterate over all the registered interceptors * * This method is particularly useful for skipping over any * interceptors that may have become `null` calling `eject`. * * @param {Function} fn The function to call for each interceptor */ InterceptorManager.prototype.forEach = function forEach(fn) { utils.forEach(this.handlers, function forEachHandler(h) { if (h !== null) { fn(h); } }); }; module.exports = InterceptorManager; /***/ }), /* 137 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(13); var transformData = __webpack_require__(138); var isCancel = __webpack_require__(71); var defaults = __webpack_require__(42); var isAbsoluteURL = __webpack_require__(139); var combineURLs = __webpack_require__(140); /** * Throws a `Cancel` if cancellation has been requested. */ function throwIfCancellationRequested(config) { if (config.cancelToken) { config.cancelToken.throwIfRequested(); } } /** * Dispatch a request to the server using the configured adapter. * * @param {object} config The config that is to be used for the request * @returns {Promise} The Promise to be fulfilled */ module.exports = function dispatchRequest(config) { throwIfCancellationRequested(config); // Support baseURL config if (config.baseURL && !isAbsoluteURL(config.url)) { config.url = combineURLs(config.baseURL, config.url); } // Ensure headers exist config.headers = config.headers || {}; // Transform request data config.data = transformData( config.data, config.headers, config.transformRequest ); // Flatten headers config.headers = utils.merge( config.headers.common || {}, config.headers[config.method] || {}, config.headers || {} ); utils.forEach( ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function cleanHeaderConfig(method) { delete config.headers[method]; } ); var adapter = config.adapter || defaults.adapter; return adapter(config).then(function onAdapterResolution(response) { throwIfCancellationRequested(config); // Transform response data response.data = transformData( response.data, response.headers, config.transformResponse ); return response; }, function onAdapterRejection(reason) { if (!isCancel(reason)) { throwIfCancellationRequested(config); // Transform response data if (reason && reason.response) { reason.response.data = transformData( reason.response.data, reason.response.headers, config.transformResponse ); } } return Promise.reject(reason); }); }; /***/ }), /* 138 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(13); /** * Transform the data for a request or a response * * @param {Object|String} data The data to be transformed * @param {Array} headers The headers for the request or response * @param {Array|Function} fns A single function or Array of functions * @returns {*} The resulting transformed data */ module.exports = function transformData(data, headers, fns) { /*eslint no-param-reassign:0*/ utils.forEach(fns, function transform(fn) { data = fn(data, headers); }); return data; }; /***/ }), /* 139 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Determines whether the specified URL is absolute * * @param {string} url The URL to test * @returns {boolean} True if the specified URL is absolute, otherwise false */ module.exports = function isAbsoluteURL(url) { // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL). // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed // by any combination of letters, digits, plus, period, or hyphen. return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); }; /***/ }), /* 140 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Creates a new URL by combining the specified URLs * * @param {string} baseURL The base URL * @param {string} relativeURL The relative URL * @returns {string} The combined URL */ module.exports = function combineURLs(baseURL, relativeURL) { return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; }; /***/ }), /* 141 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Cancel = __webpack_require__(72); /** * A `CancelToken` is an object that can be used to request cancellation of an operation. * * @class * @param {Function} executor The executor function. */ function CancelToken(executor) { if (typeof executor !== 'function') { throw new TypeError('executor must be a function.'); } var resolvePromise; this.promise = new Promise(function promiseExecutor(resolve) { resolvePromise = resolve; }); var token = this; executor(function cancel(message) { if (token.reason) { // Cancellation has already been requested return; } token.reason = new Cancel(message); resolvePromise(token.reason); }); } /** * Throws a `Cancel` if cancellation has been requested. */ CancelToken.prototype.throwIfRequested = function throwIfRequested() { if (this.reason) { throw this.reason; } }; /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ CancelToken.source = function source() { var cancel; var token = new CancelToken(function executor(c) { cancel = c; }); return { token: token, cancel: cancel }; }; module.exports = CancelToken; /***/ }), /* 142 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Syntactic sugar for invoking a function and expanding an array for arguments. * * Common use case would be to use `Function.prototype.apply`. * * ```js * function f(x, y, z) {} * var args = [1, 2, 3]; * f.apply(null, args); * ``` * * With `spread` this example can be re-written. * * ```js * spread(function(x, y, z) {})([1, 2, 3]); * ``` * * @param {Function} callback * @returns {Function} */ module.exports = function spread(callback) { return function wrap(arr) { return callback.apply(null, arr); }; }; /***/ }), /* 143 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var getSideChannel = __webpack_require__(144); var utils = __webpack_require__(75); var formats = __webpack_require__(45); var has = Object.prototype.hasOwnProperty; var arrayPrefixGenerators = { brackets: function brackets(prefix) { return prefix + '[]'; }, comma: 'comma', indices: function indices(prefix, key) { return prefix + '[' + key + ']'; }, repeat: function repeat(prefix) { return prefix; } }; var isArray = Array.isArray; var push = Array.prototype.push; var pushToArray = function (arr, valueOrArray) { push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); }; var toISO = Date.prototype.toISOString; var defaultFormat = formats['default']; var defaults = { addQueryPrefix: false, allowDots: false, allowEmptyArrays: false, arrayFormat: 'indices', charset: 'utf-8', charsetSentinel: false, delimiter: '&', encode: true, encodeDotInKeys: false, encoder: utils.encode, encodeValuesOnly: false, format: defaultFormat, formatter: formats.formatters[defaultFormat], // deprecated indices: false, serializeDate: function serializeDate(date) { return toISO.call(date); }, skipNulls: false, strictNullHandling: false }; var isNonNullishPrimitive = function isNonNullishPrimitive(v) { return typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean' || typeof v === 'symbol' || typeof v === 'bigint'; }; var sentinel = {}; var stringify = function stringify( object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel ) { var obj = object; var tmpSc = sideChannel; var step = 0; var findFlag = false; while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { // Where object last appeared in the ref tree var pos = tmpSc.get(object); step += 1; if (typeof pos !== 'undefined') { if (pos === step) { throw new RangeError('Cyclic object value'); } else { findFlag = true; // Break while } } if (typeof tmpSc.get(sentinel) === 'undefined') { step = 0; } } if (typeof filter === 'function') { obj = filter(prefix, obj); } else if (obj instanceof Date) { obj = serializeDate(obj); } else if (generateArrayPrefix === 'comma' && isArray(obj)) { obj = utils.maybeMap(obj, function (value) { if (value instanceof Date) { return serializeDate(value); } return value; }); } if (obj === null) { if (strictNullHandling) { return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix; } obj = ''; } if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { if (encoder) { var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; } return [formatter(prefix) + '=' + formatter(String(obj))]; } var values = []; if (typeof obj === 'undefined') { return values; } var objKeys; if (generateArrayPrefix === 'comma' && isArray(obj)) { // we need to join elements in if (encodeValuesOnly && encoder) { obj = utils.maybeMap(obj, encoder); } objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }]; } else if (isArray(filter)) { objKeys = filter; } else { var keys = Object.keys(obj); objKeys = sort ? keys.sort(sort) : keys; } var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, '%2E') : prefix; var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix; if (allowEmptyArrays && isArray(obj) && obj.length === 0) { return adjustedPrefix + '[]'; } for (var j = 0; j < objKeys.length; ++j) { var key = objKeys[j]; var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key]; if (skipNulls && value === null) { continue; } var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, '%2E') : key; var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']'); sideChannel.set(object, step); var valueSideChannel = getSideChannel(); valueSideChannel.set(sentinel, sideChannel); pushToArray(values, stringify( value, keyPrefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel )); } return values; }; var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { if (!opts) { return defaults; } if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') { throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided'); } if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') { throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided'); } if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') { throw new TypeError('Encoder has to be a function.'); } var charset = opts.charset || defaults.charset; if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); } var format = formats['default']; if (typeof opts.format !== 'undefined') { if (!has.call(formats.formatters, opts.format)) { throw new TypeError('Unknown format option provided.'); } format = opts.format; } var formatter = formats.formatters[format]; var filter = defaults.filter; if (typeof opts.filter === 'function' || isArray(opts.filter)) { filter = opts.filter; } var arrayFormat; if (opts.arrayFormat in arrayPrefixGenerators) { arrayFormat = opts.arrayFormat; } else if ('indices' in opts) { arrayFormat = opts.indices ? 'indices' : 'repeat'; } else { arrayFormat = defaults.arrayFormat; } if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') { throw new TypeError('`commaRoundTrip` must be a boolean, or absent'); } var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; return { addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, allowDots: allowDots, allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, arrayFormat: arrayFormat, charset: charset, charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, commaRoundTrip: opts.commaRoundTrip, delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys, encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, filter: filter, format: format, formatter: formatter, serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, sort: typeof opts.sort === 'function' ? opts.sort : null, strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling }; }; module.exports = function (object, opts) { var obj = object; var options = normalizeStringifyOptions(opts); var objKeys; var filter; if (typeof options.filter === 'function') { filter = options.filter; obj = filter('', obj); } else if (isArray(options.filter)) { filter = options.filter; objKeys = filter; } var keys = []; if (typeof obj !== 'object' || obj === null) { return ''; } var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat]; var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip; if (!objKeys) { objKeys = Object.keys(obj); } if (options.sort) { objKeys.sort(options.sort); } var sideChannel = getSideChannel(); for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (options.skipNulls && obj[key] === null) { continue; } pushToArray(keys, stringify( obj[key], key, generateArrayPrefix, commaRoundTrip, options.allowEmptyArrays, options.strictNullHandling, options.skipNulls, options.encodeDotInKeys, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel )); } var joined = keys.join(options.delimiter); var prefix = options.addQueryPrefix === true ? '?' : ''; if (options.charsetSentinel) { if (options.charset === 'iso-8859-1') { // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark prefix += 'utf8=%26%2310003%3B&'; } else { // encodeURIComponent('✓') prefix += 'utf8=%E2%9C%93&'; } } return joined.length > 0 ? prefix + joined : ''; }; /***/ }), /* 144 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var GetIntrinsic = __webpack_require__(25); var callBound = __webpack_require__(155); var inspect = __webpack_require__(160); var $TypeError = __webpack_require__(29); var $WeakMap = GetIntrinsic('%WeakMap%', true); var $Map = GetIntrinsic('%Map%', true); var $weakMapGet = callBound('WeakMap.prototype.get', true); var $weakMapSet = callBound('WeakMap.prototype.set', true); var $weakMapHas = callBound('WeakMap.prototype.has', true); var $mapGet = callBound('Map.prototype.get', true); var $mapSet = callBound('Map.prototype.set', true); var $mapHas = callBound('Map.prototype.has', true); /* * This function traverses the list returning the node corresponding to the given key. * * That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly. */ /** @type {import('.').listGetNode} */ var listGetNode = function (list, key) { // eslint-disable-line consistent-return /** @type {typeof list | NonNullable<(typeof list)['next']>} */ var prev = list; /** @type {(typeof list)['next']} */ var curr; for (; (curr = prev.next) !== null; prev = curr) { if (curr.key === key) { prev.next = curr.next; // eslint-disable-next-line no-extra-parens curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next); list.next = curr; // eslint-disable-line no-param-reassign return curr; } } }; /** @type {import('.').listGet} */ var listGet = function (objects, key) { var node = listGetNode(objects, key); return node && node.value; }; /** @type {import('.').listSet} */ var listSet = function (objects, key, value) { var node = listGetNode(objects, key); if (node) { node.value = value; } else { // Prepend the new node to the beginning of the list objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens key: key, next: objects.next, value: value }); } }; /** @type {import('.').listHas} */ var listHas = function (objects, key) { return !!listGetNode(objects, key); }; /** @type {import('.')} */ module.exports = function getSideChannel() { /** @type {WeakMap<object, unknown>} */ var $wm; /** @type {Map<object, unknown>} */ var $m; /** @type {import('.').RootNode<unknown>} */ var $o; /** @type {import('.').Channel} */ var channel = { assert: function (key) { if (!channel.has(key)) { throw new $TypeError('Side channel does not contain ' + inspect(key)); } }, get: function (key) { // eslint-disable-line consistent-return if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { if ($wm) { return $weakMapGet($wm, key); } } else if ($Map) { if ($m) { return $mapGet($m, key); } } else { if ($o) { // eslint-disable-line no-lonely-if return listGet($o, key); } } }, has: function (key) { if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { if ($wm) { return $weakMapHas($wm, key); } } else if ($Map) { if ($m) { return $mapHas($m, key); } } else { if ($o) { // eslint-disable-line no-lonely-if return listHas($o, key); } } return false; }, set: function (key, value) { if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { if (!$wm) { $wm = new $WeakMap(); } $weakMapSet($wm, key, value); } else if ($Map) { if (!$m) { $m = new $Map(); } $mapSet($m, key, value); } else { if (!$o) { // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head $o = { key: {}, next: null }; } listSet($o, key, value); } } }; return channel; }; /***/ }), /* 145 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @type {import('.')} */ module.exports = Error; /***/ }), /* 146 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @type {import('./eval')} */ module.exports = EvalError; /***/ }), /* 147 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @type {import('./range')} */ module.exports = RangeError; /***/ }), /* 148 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @type {import('./ref')} */ module.exports = ReferenceError; /***/ }), /* 149 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @type {import('./uri')} */ module.exports = URIError; /***/ }), /* 150 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var origSymbol = typeof Symbol !== 'undefined' && Symbol; var hasSymbolSham = __webpack_require__(151); module.exports = function hasNativeSymbols() { if (typeof origSymbol !== 'function') { return false; } if (typeof Symbol !== 'function') { return false; } if (typeof origSymbol('foo') !== 'symbol') { return false; } if (typeof Symbol('bar') !== 'symbol') { return false; } return hasSymbolSham(); }; /***/ }), /* 151 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* eslint complexity: [2, 18], max-statements: [2, 33] */ module.exports = function hasSymbols() { if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } if (typeof Symbol.iterator === 'symbol') { return true; } var obj = {}; var sym = Symbol('test'); var symObj = Object(sym); if (typeof sym === 'string') { return false; } if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } // temp disabled per https://github.com/ljharb/object.assign/issues/17 // if (sym instanceof Symbol) { return false; } // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 // if (!(symObj instanceof Symbol)) { return false; } // if (typeof Symbol.prototype.toString !== 'function') { return false; } // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } var symVal = 42; obj[sym] = symVal; for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } var syms = Object.getOwnPropertySymbols(obj); if (syms.length !== 1 || syms[0] !== sym) { return false; } if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } if (typeof Object.getOwnPropertyDescriptor === 'function') { var descriptor = Object.getOwnPropertyDescriptor(obj, sym); if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } } return true; }; /***/ }), /* 152 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var test = { __proto__: null, foo: {} }; var $Object = Object; /** @type {import('.')} */ module.exports = function hasProto() { // @ts-expect-error: TS errors on an inherited property for some reason return { __proto__: test }.foo === test.foo && !(test instanceof $Object); }; /***/ }), /* 153 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* eslint no-invalid-this: 1 */ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; var toStr = Object.prototype.toString; var max = Math.max; var funcType = '[object Function]'; var concatty = function concatty(a, b) { var arr = []; for (var i = 0; i < a.length; i += 1) { arr[i] = a[i]; } for (var j = 0; j < b.length; j += 1) { arr[j + a.length] = b[j]; } return arr; }; var slicy = function slicy(arrLike, offset) { var arr = []; for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { arr[j] = arrLike[i]; } return arr; }; var joiny = function (arr, joiner) { var str = ''; for (var i = 0; i < arr.length; i += 1) { str += arr[i]; if (i + 1 < arr.length) { str += joiner; } } return str; }; module.exports = function bind(that) { var target = this; if (typeof target !== 'function' || toStr.apply(target) !== funcType) { throw new TypeError(ERROR_MESSAGE + target); } var args = slicy(arguments, 1); var bound; var binder = function () { if (this instanceof bound) { var result = target.apply( this, concatty(args, arguments) ); if (Object(result) === result) { return result; } return this; } return target.apply( that, concatty(args, arguments) ); }; var boundLength = max(0, target.length - args.length); var boundArgs = []; for (var i = 0; i < boundLength; i++) { boundArgs[i] = '$' + i; } bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); if (target.prototype) { var Empty = function Empty() {}; Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; /***/ }), /* 154 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var call = Function.prototype.call; var $hasOwn = Object.prototype.hasOwnProperty; var bind = __webpack_require__(43); /** @type {import('.')} */ module.exports = bind.call(call, $hasOwn); /***/ }), /* 155 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var GetIntrinsic = __webpack_require__(25); var callBind = __webpack_require__(156); var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); module.exports = function callBoundIntrinsic(name, allowMissing) { var intrinsic = GetIntrinsic(name, !!allowMissing); if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { return callBind(intrinsic); } return intrinsic; }; /***/ }), /* 156 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var bind = __webpack_require__(43); var GetIntrinsic = __webpack_require__(25); var setFunctionLength = __webpack_require__(157); var $TypeError = __webpack_require__(29); var $apply = GetIntrinsic('%Function.prototype.apply%'); var $call = GetIntrinsic('%Function.prototype.call%'); var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); var $defineProperty = __webpack_require__(44); var $max = GetIntrinsic('%Math.max%'); module.exports = function callBind(originalFunction) { if (typeof originalFunction !== 'function') { throw new $TypeError('a function is required'); } var func = $reflectApply(bind, $call, arguments); return setFunctionLength( func, 1 + $max(0, originalFunction.length - (arguments.length - 1)), true ); }; var applyBind = function applyBind() { return $reflectApply(bind, $apply, arguments); }; if ($defineProperty) { $defineProperty(module.exports, 'apply', { value: applyBind }); } else { module.exports.apply = applyBind; } /***/ }), /* 157 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var GetIntrinsic = __webpack_require__(25); var define = __webpack_require__(158); var hasDescriptors = __webpack_require__(159)(); var gOPD = __webpack_require__(74); var $TypeError = __webpack_require__(29); var $floor = GetIntrinsic('%Math.floor%'); /** @type {import('.')} */ module.exports = function setFunctionLength(fn, length) { if (typeof fn !== 'function') { throw new $TypeError('`fn` is not a function'); } if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { throw new $TypeError('`length` must be a positive 32-bit integer'); } var loose = arguments.length > 2 && !!arguments[2]; var functionLengthIsConfigurable = true; var functionLengthIsWritable = true; if ('length' in fn && gOPD) { var desc = gOPD(fn, 'length'); if (desc && !desc.configurable) { functionLengthIsConfigurable = false; } if (desc && !desc.writable) { functionLengthIsWritable = false; } } if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { if (hasDescriptors) { define(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true); } else { define(/** @type {Parameters<define>[0]} */ (fn), 'length', length); } } return fn; }; /***/ }), /* 158 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $defineProperty = __webpack_require__(44); var $SyntaxError = __webpack_require__(73); var $TypeError = __webpack_require__(29); var gopd = __webpack_require__(74); /** @type {import('.')} */ module.exports = function defineDataProperty( obj, property, value ) { if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { throw new $TypeError('`obj` must be an object or a function`'); } if (typeof property !== 'string' && typeof property !== 'symbol') { throw new $TypeError('`property` must be a string or a symbol`'); } if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); } if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); } if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); } if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { throw new $TypeError('`loose`, if provided, must be a boolean'); } var nonEnumerable = arguments.length > 3 ? arguments[3] : null; var nonWritable = arguments.length > 4 ? arguments[4] : null; var nonConfigurable = arguments.length > 5 ? arguments[5] : null; var loose = arguments.length > 6 ? arguments[6] : false; /* @type {false | TypedPropertyDescriptor<unknown>} */ var desc = !!gopd && gopd(obj, property); if ($defineProperty) { $defineProperty(obj, property, { configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, value: value, writable: nonWritable === null && desc ? desc.writable : !nonWritable }); } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) { // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable obj[property] = value; // eslint-disable-line no-param-reassign } else { throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); } }; /***/ }), /* 159 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $defineProperty = __webpack_require__(44); var hasPropertyDescriptors = function hasPropertyDescriptors() { return !!$defineProperty; }; hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { // node v0.6 has a bug where array lengths can be Set but not Defined if (!$defineProperty) { return null; } try { return $defineProperty([], 'length', { value: 1 }).length !== 1; } catch (e) { // In Firefox 4-22, defining length on an array throws an exception. return true; } }; module.exports = hasPropertyDescriptors; /***/ }), /* 160 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var hasMap = typeof Map === 'function' && Map.prototype; var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; var mapForEach = hasMap && Map.prototype.forEach; var hasSet = typeof Set === 'function' && Set.prototype; var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; var setForEach = hasSet && Set.prototype.forEach; var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; var booleanValueOf = Boolean.prototype.valueOf; var objectToString = Object.prototype.toString; var functionToString = Function.prototype.toString; var $match = String.prototype.match; var $slice = String.prototype.slice; var $replace = String.prototype.replace; var $toUpperCase = String.prototype.toUpperCase; var $toLowerCase = String.prototype.toLowerCase; var $test = RegExp.prototype.test; var $concat = Array.prototype.concat; var $join = Array.prototype.join; var $arrSlice = Array.prototype.slice; var $floor = Math.floor; var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; var gOPS = Object.getOwnPropertySymbols; var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; // ie, `has-tostringtag/shams var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') ? Symbol.toStringTag : null; var isEnumerable = Object.prototype.propertyIsEnumerable; var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( [].__proto__ === Array.prototype // eslint-disable-line no-proto ? function (O) { return O.__proto__; // eslint-disable-line no-proto } : null ); function addNumericSeparator(num, str) { if ( num === Infinity || num === -Infinity || num !== num || (num && num > -1000 && num < 1000) || $test.call(/e/, str) ) { return str; } var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; if (typeof num === 'number') { var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) if (int !== num) { var intStr = String(int); var dec = $slice.call(str, intStr.length + 1); return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); } } return $replace.call(str, sepRegex, '$&_'); } var utilInspect = __webpack_require__(161); var inspectCustom = utilInspect.custom; var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; module.exports = function inspect_(obj, options, depth, seen) { var opts = options || {}; if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { throw new TypeError('option "quoteStyle" must be "single" or "double"'); } if ( has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null ) ) { throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); } var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); } if ( has(opts, 'indent') && opts.indent !== null && opts.indent !== '\t' && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) ) { throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); } if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); } var numericSeparator = opts.numericSeparator; if (typeof obj === 'undefined') { return 'undefined'; } if (obj === null) { return 'null'; } if (typeof obj === 'boolean') { return obj ? 'true' : 'false'; } if (typeof obj === 'string') { return inspectString(obj, opts); } if (typeof obj === 'number') { if (obj === 0) { return Infinity / obj > 0 ? '0' : '-0'; } var str = String(obj); return numericSeparator ? addNumericSeparator(obj, str) : str; } if (typeof obj === 'bigint') { var bigIntStr = String(obj) + 'n'; return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; } var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; if (typeof depth === 'undefined') { depth = 0; } if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { return isArray(obj) ? '[Array]' : '[Object]'; } var indent = getIndent(opts, depth); if (typeof seen === 'undefined') { seen = []; } else if (indexOf(seen, obj) >= 0) { return '[Circular]'; } function inspect(value, from, noIndent) { if (from) { seen = $arrSlice.call(seen); seen.push(from); } if (noIndent) { var newOpts = { depth: opts.depth }; if (has(opts, 'quoteStyle')) { newOpts.quoteStyle = opts.quoteStyle; } return inspect_(value, newOpts, depth + 1, seen); } return inspect_(value, opts, depth + 1, seen); } if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable var name = nameOf(obj); var keys = arrObjKeys(obj, inspect); return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); } if (isSymbol(obj)) { var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; } if (isElement(obj)) { var s = '<' + $toLowerCase.call(String(obj.nodeName)); var attrs = obj.attributes || []; for (var i = 0; i < attrs.length; i++) { s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); } s += '>'; if (obj.childNodes && obj.childNodes.length) { s += '...'; } s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>'; return s; } if (isArray(obj)) { if (obj.length === 0) { return '[]'; } var xs = arrObjKeys(obj, inspect); if (indent && !singleLineValues(xs)) { return '[' + indentedJoin(xs, indent) + ']'; } return '[ ' + $join.call(xs, ', ') + ' ]'; } if (isError(obj)) { var parts = arrObjKeys(obj, inspect); if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; } if (parts.length === 0) { return '[' + String(obj) + ']'; } return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; } if (typeof obj === 'object' && customInspect) { if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { return utilInspect(obj, { depth: maxDepth - depth }); } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { return obj.inspect(); } } if (isMap(obj)) { var mapParts = []; if (mapForEach) { mapForEach.call(obj, function (value, key) { mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); }); } return collectionOf('Map', mapSize.call(obj), mapParts, indent); } if (isSet(obj)) { var setParts = []; if (setForEach) { setForEach.call(obj, function (value) { setParts.push(inspect(value, obj)); }); } return collectionOf('Set', setSize.call(obj), setParts, indent); } if (isWeakMap(obj)) { return weakCollectionOf('WeakMap'); } if (isWeakSet(obj)) { return weakCollectionOf('WeakSet'); } if (isWeakRef(obj)) { return weakCollectionOf('WeakRef'); } if (isNumber(obj)) { return markBoxed(inspect(Number(obj))); } if (isBigInt(obj)) { return markBoxed(inspect(bigIntValueOf.call(obj))); } if (isBoolean(obj)) { return markBoxed(booleanValueOf.call(obj)); } if (isString(obj)) { return markBoxed(inspect(String(obj))); } // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other /* eslint-env browser */ if (typeof window !== 'undefined' && obj === window) { return '{ [object Window] }'; } if ( (typeof globalThis !== 'undefined' && obj === globalThis) || (typeof global !== 'undefined' && obj === global) ) { return '{ [object globalThis] }'; } if (!isDate(obj) && !isRegExp(obj)) { var ys = arrObjKeys(obj, inspect); var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; var protoTag = obj instanceof Object ? '' : 'null prototype'; var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); if (ys.length === 0) { return tag + '{}'; } if (indent) { return tag + '{' + indentedJoin(ys, indent) + '}'; } return tag + '{ ' + $join.call(ys, ', ') + ' }'; } return String(obj); }; function wrapQuotes(s, defaultStyle, opts) { var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; return quoteChar + s + quoteChar; } function quote(s) { return $replace.call(String(s), /"/g, '"'); } function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives function isSymbol(obj) { if (hasShammedSymbols) { return obj && typeof obj === 'object' && obj instanceof Symbol; } if (typeof obj === 'symbol') { return true; } if (!obj || typeof obj !== 'object' || !symToString) { return false; } try { symToString.call(obj); return true; } catch (e) {} return false; } function isBigInt(obj) { if (!obj || typeof obj !== 'object' || !bigIntValueOf) { return false; } try { bigIntValueOf.call(obj); return true; } catch (e) {} return false; } var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; function has(obj, key) { return hasOwn.call(obj, key); } function toStr(obj) { return objectToString.call(obj); } function nameOf(f) { if (f.name) { return f.name; } var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); if (m) { return m[1]; } return null; } function indexOf(xs, x) { if (xs.indexOf) { return xs.indexOf(x); } for (var i = 0, l = xs.length; i < l; i++) { if (xs[i] === x) { return i; } } return -1; } function isMap(x) { if (!mapSize || !x || typeof x !== 'object') { return false; } try { mapSize.call(x); try { setSize.call(x); } catch (s) { return true; } return x instanceof Map; // core-js workaround, pre-v2.5.0 } catch (e) {} return false; } function isWeakMap(x) { if (!weakMapHas || !x || typeof x !== 'object') { return false; } try { weakMapHas.call(x, weakMapHas); try { weakSetHas.call(x, weakSetHas); } catch (s) { return true; } return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 } catch (e) {} return false; } function isWeakRef(x) { if (!weakRefDeref || !x || typeof x !== 'object') { return false; } try { weakRefDeref.call(x); return true; } catch (e) {} return false; } function isSet(x) { if (!setSize || !x || typeof x !== 'object') { return false; } try { setSize.call(x); try { mapSize.call(x); } catch (m) { return true; } return x instanceof Set; // core-js workaround, pre-v2.5.0 } catch (e) {} return false; } function isWeakSet(x) { if (!weakSetHas || !x || typeof x !== 'object') { return false; } try { weakSetHas.call(x, weakSetHas); try { weakMapHas.call(x, weakMapHas); } catch (s) { return true; } return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 } catch (e) {} return false; } function isElement(x) { if (!x || typeof x !== 'object') { return false; } if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { return true; } return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; } function inspectString(str, opts) { if (str.length > opts.maxStringLength) { var remaining = str.length - opts.maxStringLength; var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; } // eslint-disable-next-line no-control-regex var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); return wrapQuotes(s, 'single', opts); } function lowbyte(c) { var n = c.charCodeAt(0); var x = { 8: 'b', 9: 't', 10: 'n', 12: 'f', 13: 'r' }[n]; if (x) { return '\\' + x; } return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); } function markBoxed(str) { return 'Object(' + str + ')'; } function weakCollectionOf(type) { return type + ' { ? }'; } function collectionOf(type, size, entries, indent) { var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); return type + ' (' + size + ') {' + joinedEntries + '}'; } function singleLineValues(xs) { for (var i = 0; i < xs.length; i++) { if (indexOf(xs[i], '\n') >= 0) { return false; } } return true; } function getIndent(opts, depth) { var baseIndent; if (opts.indent === '\t') { baseIndent = '\t'; } else if (typeof opts.indent === 'number' && opts.indent > 0) { baseIndent = $join.call(Array(opts.indent + 1), ' '); } else { return null; } return { base: baseIndent, prev: $join.call(Array(depth + 1), baseIndent) }; } function indentedJoin(xs, indent) { if (xs.length === 0) { return ''; } var lineJoiner = '\n' + indent.prev + indent.base; return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; } function arrObjKeys(obj, inspect) { var isArr = isArray(obj); var xs = []; if (isArr) { xs.length = obj.length; for (var i = 0; i < obj.length; i++) { xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; } } var syms = typeof gOPS === 'function' ? gOPS(obj) : []; var symMap; if (hasShammedSymbols) { symMap = {}; for (var k = 0; k < syms.length; k++) { symMap['$' + syms[k]] = syms[k]; } } for (var key in obj) { // eslint-disable-line no-restricted-syntax if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section continue; // eslint-disable-line no-restricted-syntax, no-continue } else if ($test.call(/[^\w$]/, key)) { xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); } else { xs.push(key + ': ' + inspect(obj[key], obj)); } } if (typeof gOPS === 'function') { for (var j = 0; j < syms.length; j++) { if (isEnumerable.call(obj, syms[j])) { xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); } } } return xs; } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(30))) /***/ }), /* 161 */ /***/ (function(module, exports) { /* (ignored) */ /***/ }), /* 162 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(75); var has = Object.prototype.hasOwnProperty; var isArray = Array.isArray; var defaults = { allowDots: false, allowEmptyArrays: false, allowPrototypes: false, allowSparse: false, arrayLimit: 20, charset: 'utf-8', charsetSentinel: false, comma: false, decodeDotInKeys: false, decoder: utils.decode, delimiter: '&', depth: 5, duplicates: 'combine', ignoreQueryPrefix: false, interpretNumericEntities: false, parameterLimit: 1000, parseArrays: true, plainObjects: false, strictNullHandling: false }; var interpretNumericEntities = function (str) { return str.replace(/&#(\d+);/g, function ($0, numberStr) { return String.fromCharCode(parseInt(numberStr, 10)); }); }; var parseArrayValue = function (val, options) { if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { return val.split(','); } return val; }; // This is what browsers will submit when the ✓ character occurs in an // application/x-www-form-urlencoded body and the encoding of the page containing // the form is iso-8859-1, or when the submitted form has an accept-charset // attribute of iso-8859-1. Presumably also with other charsets that do not contain // the ✓ character, such as us-ascii. var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') var parseValues = function parseQueryStringValues(str, options) { var obj = { __proto__: null }; var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']'); var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; var parts = cleanStr.split(options.delimiter, limit); var skipIndex = -1; // Keep track of where the utf8 sentinel was found var i; var charset = options.charset; if (options.charsetSentinel) { for (i = 0; i < parts.length; ++i) { if (parts[i].indexOf('utf8=') === 0) { if (parts[i] === charsetSentinel) { charset = 'utf-8'; } else if (parts[i] === isoSentinel) { charset = 'iso-8859-1'; } skipIndex = i; i = parts.length; // The eslint settings do not allow break; } } } for (i = 0; i < parts.length; ++i) { if (i === skipIndex) { continue; } var part = parts[i]; var bracketEqualsPos = part.indexOf(']='); var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; var key, val; if (pos === -1) { key = options.decoder(part, defaults.decoder, charset, 'key'); val = options.strictNullHandling ? null : ''; } else { key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); val = utils.maybeMap( parseArrayValue(part.slice(pos + 1), options), function (encodedVal) { return options.decoder(encodedVal, defaults.decoder, charset, 'value'); } ); } if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { val = interpretNumericEntities(val); } if (part.indexOf('[]=') > -1) { val = isArray(val) ? [val] : val; } var existing = has.call(obj, key); if (existing && options.duplicates === 'combine') { obj[key] = utils.combine(obj[key], val); } else if (!existing || options.duplicates === 'last') { obj[key] = val; } } return obj; }; var parseObject = function (chain, val, options, valuesParsed) { var leaf = valuesParsed ? val : parseArrayValue(val, options); for (var i = chain.length - 1; i >= 0; --i) { var obj; var root = chain[i]; if (root === '[]' && options.parseArrays) { obj = options.allowEmptyArrays && leaf === '' ? [] : [].concat(leaf); } else { obj = options.plainObjects ? Object.create(null) : {}; var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot; var index = parseInt(decodedRoot, 10); if (!options.parseArrays && decodedRoot === '') { obj = { 0: leaf }; } else if ( !isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit) ) { obj = []; obj[index] = leaf; } else if (decodedRoot !== '__proto__') { obj[decodedRoot] = leaf; } } leaf = obj; } return leaf; }; var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { if (!givenKey) { return; } // Transform dot notation to bracket notation var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; // The regex chunks var brackets = /(\[[^[\]]*])/; var child = /(\[[^[\]]*])/g; // Get the parent var segment = options.depth > 0 && brackets.exec(key); var parent = segment ? key.slice(0, segment.index) : key; // Stash the parent if it exists var keys = []; if (parent) { // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties if (!options.plainObjects && has.call(Object.prototype, parent)) { if (!options.allowPrototypes) { return; } } keys.push(parent); } // Loop through children appending to the array until we hit depth var i = 0; while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { i += 1; if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { if (!options.allowPrototypes) { return; } } keys.push(segment[1]); } // If there's a remainder, just add whatever is left if (segment) { keys.push('[' + key.slice(segment.index) + ']'); } return parseObject(keys, val, options, valuesParsed); }; var normalizeParseOptions = function normalizeParseOptions(opts) { if (!opts) { return defaults; } if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') { throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided'); } if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') { throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided'); } if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') { throw new TypeError('Decoder has to be a function.'); } if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); } var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates; if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') { throw new TypeError('The duplicates option must be either combine, first, or last'); } var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; return { allowDots: allowDots, allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse, arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, charset: charset, charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys, decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, // eslint-disable-next-line no-implicit-coercion, no-extra-parens depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, duplicates: duplicates, ignoreQueryPrefix: opts.ignoreQueryPrefix === true, interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, parseArrays: opts.parseArrays !== false, plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling }; }; module.exports = function (str, opts) { var options = normalizeParseOptions(opts); if (str === '' || str === null || typeof str === 'undefined') { return options.plainObjects ? Object.create(null) : {}; } var tempObj = typeof str === 'string' ? parseValues(str, options) : str; var obj = options.plainObjects ? Object.create(null) : {}; // Iterate over the keys and setup the new object var keys = Object.keys(tempObj); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); obj = utils.merge(obj, newObj, options); } if (options.allowSparse === true) { return obj; } return utils.compact(obj); }; /***/ }), /* 163 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var AceEditor = function (_Component) { _inherits(AceEditor, _Component); function AceEditor(props) { _classCallCheck(this, AceEditor); var _this = _possibleConstructorReturn(this, (AceEditor.__proto__ || Object.getPrototypeOf(AceEditor)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); _this.insertSelector = _this.insertSelector.bind(_this); return _this; } _createClass(AceEditor, [{ key: 'componentDidMount', value: function componentDidMount() { // eslint-disable-next-line no-undef this.editor = ace.edit('forminator-field-' + this.props.property); this.session = this.editor.getSession(); this.session.setUseWorker(false); this.editor.setShowPrintMargin(false); this.session.setMode('ace/mode/css'); this.editor.setTheme('ace/theme/sui'); this.editor.renderer.setShowGutter(true); this.editor.setHighlightActiveLine(true); this.editor.focus(); this.editor.on('change', this.updateValue); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.editor.destroy(); this.editor = null; } }, { key: 'insertSelector', value: function insertSelector(selector) { var selectClass = selector + '{}'; this.editor.navigateFileEnd(); this.editor.insert(selectClass); this.editor.navigateLeft(1); this.editor.focus(); } }, { key: 'shouldComponentUpdate', value: function shouldComponentUpdate() { return false; } }, { key: 'updateValue', value: function updateValue() { this.props.actions.settingsActions.updateSetting(this.props.property, this.editor.getValue()); } }, { key: 'render', value: function render() { var _this2 = this; var value = _.isUndefined(this.props.settings[this.props.property]) ? '' : this.props.settings[this.props.property]; var type = !_.isUndefined(this.props.type) ? this.props.type : 'form'; if ('pdf-form' === this.props.formType) { type = this.props.formType; } var basicSelectors = _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Basic selectors') ), _react2.default.createElement( 'div', { className: 'sui-ace-selectors' }, _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector(' '); } }, (0, _utils.translate)('Form') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector(' .forminator-title '); } }, (0, _utils.translate)('Section Title') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector(' .forminator-subtitle '); } }, (0, _utils.translate)('Section Subtitle') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector(' .forminator-label '); } }, (0, _utils.translate)('Field Label') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector(' .forminator-description '); } }, (0, _utils.translate)('Field Description') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector(' .forminator-input '); } }, (0, _utils.translate)('Input') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector(' .forminator-textarea '); } }, (0, _utils.translate)('Textarea') ) ) ); var pollSelectors = _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Basic selectors') ), _react2.default.createElement( 'div', { className: 'sui-ace-selectors' }, _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector(' '); } }, (0, _utils.translate)('Poll') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector(' .forminator-poll--question '); } }, (0, _utils.translate)('Question') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector(' .forminator-radio .forminator-radio-bullet '); } }, (0, _utils.translate)('Answer Input') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector('.forminator-radio .forminator-radio-label '); } }, (0, _utils.translate)('Answer Label') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector(' .forminator-button '); } }, (0, _utils.translate)('Submit Button') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector(' .forminator-poll-footer a.forminator-link, ' + '.forminator-poll-footer a.forminator-link:visited '); } }, (0, _utils.translate)('View Results Link') ) ) ); var quizSelectors = _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Basic selectors') ), _react2.default.createElement( 'div', { className: 'sui-ace-selectors' }, _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector(' '); } }, (0, _utils.translate)('Quiz') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector('.forminator-quiz--title '); } }, (0, _utils.translate)('Title') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector('.forminator-quiz--description p '); } }, (0, _utils.translate)('Description') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector('.forminator-question .forminator-legend '); } }, (0, _utils.translate)('Question') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector('.forminator-answer .forminator-answer--design '); } }, (0, _utils.translate)('Answer Container') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector('.forminator-answer .forminator-answer--name '); } }, (0, _utils.translate)('Answer Text') ) ) ); var pdfSelectors = _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('PDF selectors') ), _react2.default.createElement( 'div', { className: 'sui-ace-selectors' }, _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector('body'); } }, (0, _utils.translate)('Body') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector('.forminator-pdf-header'); } }, (0, _utils.translate)('PDF Header') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector('.pdf-logo'); } }, (0, _utils.translate)('Logo') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector('.pdf-title'); } }, (0, _utils.translate)('Title') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector('.forminator-row-heading td'); } }, (0, _utils.translate)('Field Label') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector('.forminator-row-content td'); } }, (0, _utils.translate)('Field Value') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector('.forminator-pdf-footer-text td'); } }, (0, _utils.translate)('Footer') ), _react2.default.createElement( 'a', { className: 'sui-selector sui-insert-selector', onClick: function onClick() { return _this2.insertSelector('.forminator-pdf-pagination td'); } }, (0, _utils.translate)('Pagination') ) ) ); return _react2.default.createElement( _react2.default.Fragment, null, type === 'form' && basicSelectors, type === 'poll' && pollSelectors, type === 'quiz' && quizSelectors, type === 'pdf-form' && pdfSelectors, _react2.default.createElement( 'div', { id: 'forminator-field-' + this.props.property, 'data-value': value, style: { height: '210px' } }, value ), type === 'pdf-form' && _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Learn more about using custom CSS in your PDF file ' + '{{link}}here{{/link}}.', { components: { link: _react2.default.createElement('a', { href: 'https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#pdf-custom-css', target: '_blank' }) } }) ) ); } }]); return AceEditor; }(_react.Component); exports.default = AceEditor; /***/ }), /* 164 */, /* 165 */, /* 166 */, /* 167 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _notifications = __webpack_require__(28); var _notifications2 = _interopRequireDefault(_notifications); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MetaDropdown = function (_Component) { _inherits(MetaDropdown, _Component); function MetaDropdown(props) { _classCallCheck(this, MetaDropdown); var _this = _possibleConstructorReturn(this, (MetaDropdown.__proto__ || Object.getPrototypeOf(MetaDropdown)).call(this, props)); var MetaData = { form: { shortcode: 'forminator_form', type: 'form', processAction: forminatorData.adminUrl + 'admin.php?page=forminator-cform', processNonce: forminatorData.formProcessNonce, exportNonce: forminatorData.formExportNonce, submissions: forminatorData.adminUrl + 'admin.php?page=forminator-entries&form_type=forminator_forms&form_id=' + _this.props.id, dropdownLabel: (0, _utils.translate)('Open form options') }, poll: { shortcode: 'forminator_poll', type: 'poll', processAction: forminatorData.adminUrl + 'admin.php?page=forminator-poll', processNonce: forminatorData.pollProcessNonce, exportNonce: forminatorData.pollExportNonce, submissions: forminatorData.adminUrl + 'admin.php?page=forminator-entries&form_type=forminator_polls&form_id=' + _this.props.id, dropdownLabel: (0, _utils.translate)('Open poll options') }, quiz: { shortcode: 'forminator_quiz', type: 'quiz', processAction: forminatorData.adminUrl + 'admin.php?page=forminator-quiz', processNonce: forminatorData.quizProcessNonce, exportNonce: forminatorData.quizExportNonce, submissions: forminatorData.adminUrl + 'admin.php?page=forminator-entries&form_type=forminator_quizzes&form_id=' + _this.props.id, dropdownLabel: (0, _utils.translate)('Open quiz options') } }; _this.copyToClipboard = _this.copyToClipboard.bind(_this); _this.resetTrackingData = _this.resetTrackingData.bind(_this); _this.data = MetaData[_this.props.type]; return _this; } _createClass(MetaDropdown, [{ key: 'copyToClipboard', value: function copyToClipboard() { this.input.select(); document.execCommand('copy'); var custom = new _notifications2.default({ type: 'success', text: (0, _utils.translate)('Shortcode has been copied successfully.'), time: 4000 }); custom.open(); } }, { key: 'resetTrackingData', value: function resetTrackingData() { var data = { action: 'forminator_reset_tracking_data', _ajax_nonce: forminatorData.resetTrackingDataNonce, id: this.props.id }; this.ajax = jQuery.post({ url: forminatorData.ajaxUrl, type: 'post', data: data }).done(function (result) { if (result) { var type = result.success ? 'success' : 'error', text = result.data || (0, _utils.translate)('Something went wrong.'); var custom = new _notifications2.default({ type: type, text: text, time: 4000 }); custom.open(); } }); } }, { key: 'render', value: function render() { var _this2 = this; var exportUrl = this.data.processAction + '&export=true&module_id=' + this.props.id + '&exportnonce=' + this.data.exportNonce + '&module_type=' + this.data.type; var deleteUrl = this.data.processAction + '&delete=true&module_id=' + this.props.id + '&nonce=' + this.data.processNonce + '&module_type=' + this.data.type; var tooltip = (0, _utils.translate)('Create New Form'); if (this.props.type === 'poll') { tooltip = (0, _utils.translate)('Create New Poll'); } if (this.props.type === 'quiz') { tooltip = (0, _utils.translate)('Create New Quiz'); } return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement('input', { type: 'text', defaultValue: '[' + this.data.shortcode + ' id="' + this.props.id + '"]', id: 'forminator-form-shortcode', style: { position: 'absolute', top: '-1500px' }, 'aria-hidden': 'true', ref: function ref(input) { return _this2.input = input; } }), _react2.default.createElement( 'div', { className: this.props.hasLead ? 'sui-dropdown fui-dropdown-soon' : 'sui-dropdown' }, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-dropdown-anchor', 'aria-label': 'Dropdown' }, _react2.default.createElement('span', { className: 'sui-icon-widget-settings-config sui-md', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, this.data.dropdownLabel ) ), _react2.default.createElement( 'ul', null, _react2.default.createElement( 'li', null, _react2.default.createElement( 'button', { className: 'forminator-field-edit', onClick: this.copyToClipboard }, _react2.default.createElement('span', { className: 'sui-icon-code', 'aria-hidden': 'true' }), (0, _utils.translate)('Copy Shortcode') ) ), _react2.default.createElement( 'li', null, _react2.default.createElement( 'a', { className: 'forminator-field-edit', href: this.data.submissions }, _react2.default.createElement('span', { className: 'sui-icon-community-people', 'aria-hidden': 'true' }), (0, _utils.translate)('View Submissions') ) ), _react2.default.createElement( 'li', null, _react2.default.createElement( 'form', { method: 'post', action: this.data.processAction }, _react2.default.createElement('input', { type: 'hidden', name: 'forminator_action', value: 'clone' }), _react2.default.createElement('input', { type: 'hidden', name: 'id', value: this.props.id }), _react2.default.createElement('input', { type: 'hidden', id: 'forminatorNonce', name: 'forminatorNonce', value: forminatorData.cloneNonce }), _react2.default.createElement('input', { type: 'hidden', name: 'forminatorRedirect', value: 'false' }), this.props.hasLead && _react2.default.createElement( 'button', { type: 'submit', disabled: 'disabled', className: 'fui-button-with-tag sui-tooltip sui-tooltip-left sui-constrained', 'data-tooltip': (0, _utils.translate)("Duplicate isn't supported at the moment " + 'for the quizzes with lead capturing enabled.') }, _react2.default.createElement('span', { className: 'sui-icon-page-multiple', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'fui-button-label' }, (0, _utils.translate)('Duplicate') ), _react2.default.createElement( 'span', { className: 'sui-tag sui-tag-blue sui-tag-sm' }, (0, _utils.translate)('Coming soon') ) ), !this.props.hasLead && _react2.default.createElement( 'button', { type: 'submit' }, _react2.default.createElement('span', { className: 'sui-icon-page-multiple', 'aria-hidden': 'true' }), (0, _utils.translate)('Duplicate') ) ) ), _react2.default.createElement( 'li', null, _react2.default.createElement( 'a', { className: 'forminator-field-edit', onClick: this.resetTrackingData }, _react2.default.createElement('span', { className: 'sui-icon-update', 'aria-hidden': 'true' }), (0, _utils.translate)('Reset Tracking Data') ) ), _react2.default.createElement( 'li', null, this.props.hasLead && _react2.default.createElement( 'a', { href: '#', className: 'fui-button-with-tag sui-tooltip sui-tooltip-left', 'data-tooltip': (0, _utils.translate)("Export isn't supported at the moment for " + 'the quizzes with lead capturing enabled.') }, _react2.default.createElement('span', { className: 'sui-icon-cloud-migration', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'fui-button-label' }, (0, _utils.translate)('Export') ), _react2.default.createElement( 'span', { className: 'sui-tag sui-tag-blue sui-tag-sm' }, (0, _utils.translate)('Coming soon') ) ), !this.props.hasLead && _react2.default.createElement( 'a', { className: 'forminator-field-edit', href: exportUrl }, _react2.default.createElement('span', { className: 'sui-icon-cloud-migration', 'aria-hidden': 'true' }), (0, _utils.translate)('Export') ) ), _react2.default.createElement( 'li', null, _react2.default.createElement( 'a', { className: 'forminator-field-edit sui-option-red', href: deleteUrl }, _react2.default.createElement('span', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), (0, _utils.translate)('Delete') ) ) ) ), _react2.default.createElement( 'a', { href: forminatorData.dashboardUrl + '&createnew=' + this.props.type, className: 'sui-button-icon sui-tooltip sui-tooltip-bottom', 'data-tooltip': tooltip }, _react2.default.createElement('span', { className: 'sui-icon-plus sui-md', 'aria-hidden': 'true' }) ) ); } }]); return MetaDropdown; }(_react.Component); exports.default = MetaDropdown; /***/ }), /* 168 */ /***/ (function(module, exports, __webpack_require__) { var baseIsNative = __webpack_require__(423), getValue = __webpack_require__(428); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /* 169 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = __unstableEscapeGreaterThan; /** * Returns a string with greater-than sign replaced. * * Note that if a resolution for Trac#45387 comes to fruition, it is no longer * necessary for `__unstableEscapeGreaterThan` to exist. * * See: https://core.trac.wordpress.org/ticket/45387 * * @param {string} value Original string. * * @return {string} Escaped string. */ function __unstableEscapeGreaterThan(value) { return value.replace(/>/g, '>'); } //# sourceMappingURL=escape-greater.js.map /***/ }), /* 170 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Border; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function Border(props) { return _react2.default.createElement("hr", { className: "fui-border" }); } /***/ }), /* 171 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(23); var _reactDom2 = _interopRequireDefault(_reactDom); var _focusTrap = __webpack_require__(172); var _focusTrap2 = _interopRequireDefault(_focusTrap); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // focus-trap-react by davidtheclark, URL: https://github.com/davidtheclark/focus-trap-react var FocusTrap = function (_React$Component) { _inherits(FocusTrap, _React$Component); function FocusTrap(props) { _classCallCheck(this, FocusTrap); var _this = _possibleConstructorReturn(this, (FocusTrap.__proto__ || Object.getPrototypeOf(FocusTrap)).call(this, props)); if (typeof document !== 'undefined') { _this.previouslyFocusedElement = document.activeElement; } return _this; } _createClass(FocusTrap, [{ key: 'componentDidMount', value: function componentDidMount() { // We need to hijack the returnFocusOnDeactivate option, // because React can move focus into the element before we arrived at // this lifecycle hook (e.g. with autoFocus inputs). So the component // captures the previouslyFocusedElement in componentWillMount, // then (optionally) returns focus to it in componentWillUnmount. var specifiedFocusTrapOptions = this.props.focusTrapOptions; var tailoredFocusTrapOptions = { returnFocusOnDeactivate: false, fallbackFocus: 'body' }; for (var optionName in specifiedFocusTrapOptions) { if (!specifiedFocusTrapOptions.hasOwnProperty(optionName)) continue; if (optionName === 'returnFocusOnDeactivate') continue; tailoredFocusTrapOptions[optionName] = specifiedFocusTrapOptions[optionName]; } var focusTrapElementDOMNode = _reactDom2.default.findDOMNode(this.focusTrapElement); this.focusTrap = this.props._createFocusTrap(focusTrapElementDOMNode, tailoredFocusTrapOptions); if (this.props.active) { this.focusTrap.activate(); } if (this.props.paused) { this.focusTrap.pause(); } } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps) { if (prevProps.active && !this.props.active) { var returnFocusOnDeactivate = this.props.focusTrapOptions.returnFocusOnDeactivate; var returnFocus = returnFocusOnDeactivate || false; var config = { returnFocus: returnFocus }; this.focusTrap.deactivate(config); } else if (!prevProps.active && this.props.active) { this.focusTrap.activate(); } if (prevProps.paused && !this.props.paused) { this.focusTrap.unpause(); } else if (!prevProps.paused && this.props.paused) { this.focusTrap.pause(); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.focusTrap.deactivate(); if (this.props.focusTrapOptions.returnFocusOnDeactivate !== false && this.previouslyFocusedElement && this.previouslyFocusedElement.focus) { this.previouslyFocusedElement.focus(); } } }, { key: 'setFocusTrapElement', value: function setFocusTrapElement(element) { this.focusTrapElement = element; } }, { key: 'render', value: function render() { var _this2 = this; var child = _react2.default.Children.only(this.props.children); var composedRefCallback = function composedRefCallback(element) { _this2.setFocusTrapElement(element); if (typeof child.ref === 'function') { child.ref(element); } }; var childWithRef = _react2.default.cloneElement(child, { ref: composedRefCallback }); return childWithRef; } }]); return FocusTrap; }(_react2.default.Component); FocusTrap.defaultProps = { active: true, paused: false, focusTrapOptions: {}, _createFocusTrap: _focusTrap2.default }; module.exports = FocusTrap; /***/ }), /* 172 */ /***/ (function(module, exports, __webpack_require__) { var tabbable = __webpack_require__(173); var xtend = __webpack_require__(174); var activeFocusDelay; var activeFocusTraps = (function() { var trapQueue = []; return { activateTrap: function(trap) { if (trapQueue.length > 0) { var activeTrap = trapQueue[trapQueue.length - 1]; if (activeTrap !== trap) { activeTrap.pause(); } } var trapIndex = trapQueue.indexOf(trap); if (trapIndex === -1) { trapQueue.push(trap); } else { // move this existing trap to the front of the queue trapQueue.splice(trapIndex, 1); trapQueue.push(trap); } }, deactivateTrap: function(trap) { var trapIndex = trapQueue.indexOf(trap); if (trapIndex !== -1) { trapQueue.splice(trapIndex, 1); } if (trapQueue.length > 0) { trapQueue[trapQueue.length - 1].unpause(); } } }; })(); function focusTrap(element, userOptions) { var doc = document; var container = typeof element === 'string' ? doc.querySelector(element) : element; var config = xtend( { returnFocusOnDeactivate: true, escapeDeactivates: true }, userOptions ); var state = { firstTabbableNode: null, lastTabbableNode: null, nodeFocusedBeforeActivation: null, mostRecentlyFocusedNode: null, active: false, paused: false }; var trap = { activate: activate, deactivate: deactivate, pause: pause, unpause: unpause }; return trap; function activate(activateOptions) { if (state.active) return; updateTabbableNodes(); state.active = true; state.paused = false; state.nodeFocusedBeforeActivation = doc.activeElement; var onActivate = activateOptions && activateOptions.onActivate ? activateOptions.onActivate : config.onActivate; if (onActivate) { onActivate(); } addListeners(); return trap; } function deactivate(deactivateOptions) { if (!state.active) return; clearTimeout(activeFocusDelay); removeListeners(); state.active = false; state.paused = false; activeFocusTraps.deactivateTrap(trap); var onDeactivate = deactivateOptions && deactivateOptions.onDeactivate !== undefined ? deactivateOptions.onDeactivate : config.onDeactivate; if (onDeactivate) { onDeactivate(); } var returnFocus = deactivateOptions && deactivateOptions.returnFocus !== undefined ? deactivateOptions.returnFocus : config.returnFocusOnDeactivate; if (returnFocus) { delay(function() { tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)); }); } return trap; } function pause() { if (state.paused || !state.active) return; state.paused = true; removeListeners(); } function unpause() { if (!state.paused || !state.active) return; state.paused = false; updateTabbableNodes(); addListeners(); } function addListeners() { if (!state.active) return; // There can be only one listening focus trap at a time activeFocusTraps.activateTrap(trap); // Delay ensures that the focused element doesn't capture the event // that caused the focus trap activation. activeFocusDelay = delay(function() { tryFocus(getInitialFocusNode()); }); doc.addEventListener('focusin', checkFocusIn, true); doc.addEventListener('mousedown', checkPointerDown, { capture: true, passive: false }); doc.addEventListener('touchstart', checkPointerDown, { capture: true, passive: false }); doc.addEventListener('click', checkClick, { capture: true, passive: false }); doc.addEventListener('keydown', checkKey, { capture: true, passive: false }); return trap; } function removeListeners() { if (!state.active) return; doc.removeEventListener('focusin', checkFocusIn, true); doc.removeEventListener('mousedown', checkPointerDown, true); doc.removeEventListener('touchstart', checkPointerDown, true); doc.removeEventListener('click', checkClick, true); doc.removeEventListener('keydown', checkKey, true); return trap; } function getNodeForOption(optionName) { var optionValue = config[optionName]; var node = optionValue; if (!optionValue) { return null; } if (typeof optionValue === 'string') { node = doc.querySelector(optionValue); if (!node) { throw new Error('`' + optionName + '` refers to no known node'); } } if (typeof optionValue === 'function') { node = optionValue(); if (!node) { throw new Error('`' + optionName + '` did not return a node'); } } return node; } function getInitialFocusNode() { var node; if (getNodeForOption('initialFocus') !== null) { node = getNodeForOption('initialFocus'); } else if (container.contains(doc.activeElement)) { node = doc.activeElement; } else { node = state.firstTabbableNode || getNodeForOption('fallbackFocus'); } if (!node) { throw new Error( 'Your focus-trap needs to have at least one focusable element' ); } return node; } function getReturnFocusNode(previousActiveElement) { var node = getNodeForOption('setReturnFocus'); return node ? node : previousActiveElement; } // This needs to be done on mousedown and touchstart instead of click // so that it precedes the focus event. function checkPointerDown(e) { if (container.contains(e.target)) return; if (config.clickOutsideDeactivates) { deactivate({ returnFocus: !tabbable.isFocusable(e.target) }); return; } // This is needed for mobile devices. // (If we'll only let `click` events through, // then on mobile they will be blocked anyways if `touchstart` is blocked.) if (config.allowOutsideClick && config.allowOutsideClick(e)) { return; } e.preventDefault(); } // In case focus escapes the trap for some strange reason, pull it back in. function checkFocusIn(e) { // In Firefox when you Tab out of an iframe the Document is briefly focused. if (container.contains(e.target) || e.target instanceof Document) { return; } e.stopImmediatePropagation(); tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode()); } function checkKey(e) { if (config.escapeDeactivates !== false && isEscapeEvent(e)) { e.preventDefault(); deactivate(); return; } if (isTabEvent(e)) { checkTab(e); return; } } // Hijack Tab events on the first and last focusable nodes of the trap, // in order to prevent focus from escaping. If it escapes for even a // moment it can end up scrolling the page and causing confusion so we // kind of need to capture the action at the keydown phase. function checkTab(e) { updateTabbableNodes(); if (e.shiftKey && e.target === state.firstTabbableNode) { e.preventDefault(); tryFocus(state.lastTabbableNode); return; } if (!e.shiftKey && e.target === state.lastTabbableNode) { e.preventDefault(); tryFocus(state.firstTabbableNode); return; } } function checkClick(e) { if (config.clickOutsideDeactivates) return; if (container.contains(e.target)) return; if (config.allowOutsideClick && config.allowOutsideClick(e)) { return; } e.preventDefault(); e.stopImmediatePropagation(); } function updateTabbableNodes() { var tabbableNodes = tabbable(container); state.firstTabbableNode = tabbableNodes[0] || getInitialFocusNode(); state.lastTabbableNode = tabbableNodes[tabbableNodes.length - 1] || getInitialFocusNode(); } function tryFocus(node) { if (node === doc.activeElement) return; if (!node || !node.focus) { tryFocus(getInitialFocusNode()); return; } node.focus(); state.mostRecentlyFocusedNode = node; if (isSelectableInput(node)) { node.select(); } } } function isSelectableInput(node) { return ( node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function' ); } function isEscapeEvent(e) { return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27; } function isTabEvent(e) { return e.key === 'Tab' || e.keyCode === 9; } function delay(fn) { return setTimeout(fn, 0); } module.exports = focusTrap; /***/ }), /* 173 */ /***/ (function(module, exports) { var candidateSelectors = [ 'input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])', ]; var candidateSelector = candidateSelectors.join(','); var matches = typeof Element === 'undefined' ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; function tabbable(el, options) { options = options || {}; var regularTabbables = []; var orderedTabbables = []; var candidates = el.querySelectorAll(candidateSelector); if (options.includeContainer) { if (matches.call(el, candidateSelector)) { candidates = Array.prototype.slice.apply(candidates); candidates.unshift(el); } } var i, candidate, candidateTabindex; for (i = 0; i < candidates.length; i++) { candidate = candidates[i]; if (!isNodeMatchingSelectorTabbable(candidate)) continue; candidateTabindex = getTabindex(candidate); if (candidateTabindex === 0) { regularTabbables.push(candidate); } else { orderedTabbables.push({ documentOrder: i, tabIndex: candidateTabindex, node: candidate, }); } } var tabbableNodes = orderedTabbables .sort(sortOrderedTabbables) .map(function(a) { return a.node }) .concat(regularTabbables); return tabbableNodes; } tabbable.isTabbable = isTabbable; tabbable.isFocusable = isFocusable; function isNodeMatchingSelectorTabbable(node) { if ( !isNodeMatchingSelectorFocusable(node) || isNonTabbableRadio(node) || getTabindex(node) < 0 ) { return false; } return true; } function isTabbable(node) { if (!node) throw new Error('No node provided'); if (matches.call(node, candidateSelector) === false) return false; return isNodeMatchingSelectorTabbable(node); } function isNodeMatchingSelectorFocusable(node) { if ( node.disabled || isHiddenInput(node) || isHidden(node) ) { return false; } return true; } var focusableCandidateSelector = candidateSelectors.concat('iframe').join(','); function isFocusable(node) { if (!node) throw new Error('No node provided'); if (matches.call(node, focusableCandidateSelector) === false) return false; return isNodeMatchingSelectorFocusable(node); } function getTabindex(node) { var tabindexAttr = parseInt(node.getAttribute('tabindex'), 10); if (!isNaN(tabindexAttr)) return tabindexAttr; // Browsers do not return `tabIndex` correctly for contentEditable nodes; // so if they don't have a tabindex attribute specifically set, assume it's 0. if (isContentEditable(node)) return 0; return node.tabIndex; } function sortOrderedTabbables(a, b) { return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex; } function isContentEditable(node) { return node.contentEditable === 'true'; } function isInput(node) { return node.tagName === 'INPUT'; } function isHiddenInput(node) { return isInput(node) && node.type === 'hidden'; } function isRadio(node) { return isInput(node) && node.type === 'radio'; } function isNonTabbableRadio(node) { return isRadio(node) && !isTabbableRadio(node); } function getCheckedRadio(nodes) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].checked) { return nodes[i]; } } } function isTabbableRadio(node) { if (!node.name) return true; // This won't account for the edge case where you have radio groups with the same // in separate forms on the same page. var radioSet = node.ownerDocument.querySelectorAll('input[type="radio"][name="' + node.name + '"]'); var checked = getCheckedRadio(radioSet); return !checked || checked === node; } function isHidden(node) { // offsetParent being null will allow detecting cases where an element is invisible or inside an invisible element, // as long as the element does not use position: fixed. For them, their visibility has to be checked directly as well. return node.offsetParent === null || getComputedStyle(node).visibility === 'hidden'; } module.exports = tabbable; /***/ }), /* 174 */ /***/ (function(module, exports) { module.exports = extend var hasOwnProperty = Object.prototype.hasOwnProperty; function extend() { var target = {} for (var i = 0; i < arguments.length; i++) { var source = arguments[i] for (var key in source) { if (hasOwnProperty.call(source, key)) { target[key] = source[key] } } } return target } /***/ }), /* 175 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _integrations = __webpack_require__(176); var _integrations2 = _interopRequireDefault(_integrations); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // noinspection JSUnusedLocalSymbols // the semi-colon before function invocation is a safety net against concatenated // scripts and/or other plugins which may not be closed properly. (function ($, window, document, undefined) { // Create the defaults once var pluginName = 'ForminatorIntegrationsModal'; var defaults = { type: 'form' }; function ForminatorIntegrationsModal(addons, options) { this.$popup = {}; this._deferred = {}; this.el = addons; this.$el = jQuery(this.el); this.options = _.extend(defaults, options); this.init(); } // Avoid Plugin.prototype conflicts jQuery.extend(ForminatorIntegrationsModal.prototype, { init: function init() { var me = this; this.$el.find('.connect-integration').on('click', function (e) { me.open(e); }); }, open: function open(e) { var self = this; // Remove popup jQuery('#forminator-integration-popup').remove(); var $target = jQuery(e.target); if (!$target.hasClass('connect-integration')) { $target = $target.closest('.connect-integration'); } var closeClick = function closeClick() { self.close(); return false; }; var nonce = $target.data('nonce'), slug = $target.data('slug'), global_id = $target.data('multi-global-id'), title = $target.data('title'), image = $target.data('image'), image2x = $target.data('imagex2'), action = $target.data('action'), form_id = $target.data('form-id'), multi_id = $target.data('multi-id'), poll_id = $target.data('poll-id'), quiz_id = $target.data('quiz-id'); var tpl = _.template('<div class="sui-modal sui-modal-lg">' + // Modal content. '<div role="dialog" id="forminator-integration-popup" class="sui-modal-content" aria-modal="true" aria-labelledby="forminator-integration-popup__title" aria-describedby="forminator-integration-popup__description">' + // Box. '<div class="sui-box" style="margin-bottom: 0;">' + // Box Header. '<div class="sui-box-header sui-flatten sui-content-center sui-spacing-top--60">' + // Button "Close". '<button class="sui-button-icon sui-button-float--right forminator-popup-close">' + '<span class="sui-icon-close sui-md" aria-hidden="true"></span>' + '<span class="sui-screen-reader-text">Close</span>' + '</button>' + // Button "Back". '<button class="sui-button-icon sui-button-float--left forminator-addon-back">' + '<span class="sui-icon-chevron-left sui-md" aria-hidden="true"></span>' + '<span class="sui-screen-reader-text">Back</span>' + '</button>' + // Logo. '<figure class="sui-box-logo" aria-hidden="true">' + '<img src="<%= image %>" srcset="<%= image %> 1x, <%= image2x %> 2x" alt="<%= title %>" />' + '</figure>' + // Header content. '<div class="forminator-integration-popup__header"></div>' + '</div>' + // Box Body. '<div class="sui-box-body"></div>' + // Box Footer. '<div class="sui-box-footer sui-flatten sui-content-center"></div>' + '</div>' + '</div>' + '</div>'); jQuery('main.sui-wrap').append(tpl({ image: image, image2x: image2x, title: title })); this.$popup = jQuery('#forminator-integration-popup'); var viewOptions = { slug: slug, nonce: nonce, action: action, multi_id: multi_id, global_id: global_id, el: this.$popup, type: self.options.type }; if (self.options.type === 'form') { viewOptions.form_id = form_id; } else if (self.options.type === 'poll') { viewOptions.poll_id = poll_id; } else if (self.options.type === 'quiz') { viewOptions.quiz_id = quiz_id; } var view = new _integrations2.default(viewOptions); view.on('modal:closed', function () { self.close(); }); this.$popup.find('.forminator-popup-action').remove(); // Add closing event this.$popup.find('.forminator-popup-close').on('click', closeClick); this.$popup.on('click', '.forminator-popup-cancel', closeClick); // open SUI.openModal('forminator-integration-popup', 'forminator-form-appearance', undefined, true, true); this._deferred = new jQuery.Deferred(); return this._deferred.promise(); }, close: function close(result) { SUI.closeModal(); this.$el.trigger('reload'); this._deferred.resolve(this.$popup, result); } }); // A really lightweight plugin wrapper around the constructor, // preventing against multiple instantiations jQuery.fn[pluginName] = function (options) { return this.each(function () { // eslint-disable-next-line no-new new ForminatorIntegrationsModal(this, options); }); }; })(jQuery, window, document); /* eslint-disable max-len */ /***/ }), /* 176 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _notifications = __webpack_require__(28); var _notifications2 = _interopRequireDefault(_notifications); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ForminatorIntegrations = function (_Backbone$View) { _inherits(ForminatorIntegrations, _Backbone$View); function ForminatorIntegrations(options) { var _ret; _classCallCheck(this, ForminatorIntegrations); var _this = _possibleConstructorReturn(this, (ForminatorIntegrations.__proto__ || Object.getPrototypeOf(ForminatorIntegrations)).call(this, { el: options.el, tagName: 'div', events: { 'click .forminator-addon-connect': 'connectAddon', 'click .forminator-addon-disconnect': 'disconnectAddon', 'click .forminator-addon-form-disconnect': 'formDisconnectAddon', 'click .forminator-addon-next': 'submitNextStep', 'click .forminator-addon-back': 'goPrevStep', 'click .forminator-addon-finish': 'finishSteps', 'click .forminator-refresh-email-lists': 'refreshLists', 'change select#group': 'showInterests', 'click .forminator-google-spreadsheet-option': 'changeFormType' } })); _this.slug = options.slug; _this.nonce = options.nonce; _this.action = options.action; _this.multi_id = options.multi_id; _this.global_id = options.global_id; _this.type = options.type; _this.step = 0; _this.next_step = false; _this.prev_step = false; _this.scrollbar_width = _this.getScrollbarWidth(); if (_this.type === 'form') { _this.module_id = options.form_id; } else if (_this.type === 'poll') { _this.module_id = options.poll_id; } else if (_this.type === 'quiz') { _this.module_id = options.quiz_id; } return _ret = _this.render(), _possibleConstructorReturn(_this, _ret); } _createClass(ForminatorIntegrations, [{ key: 'render', value: function render() { var data = {}; data.action = this.action; data._ajax_nonce = this.nonce; data.data = {}; data.data.slug = this.slug; data.data.step = this.step; data.data.current_step = this.step; data.data.global_id = this.global_id; data.data = this.getAjaxModuleData(data.data, true); this.request(data, false, true); } }, { key: 'applyLoader', value: function applyLoader($element) { $element.find('.sui-button:not(.disable-loader)').addClass('sui-button-onload'); } }, { key: 'resetLoader', value: function resetLoader($element) { $element.find('.sui-button').removeClass('sui-button-onload'); } }, { key: 'request', value: function request(data, close, loader) { var self = this, function_params = { data: data, close: close, loader: loader }; if (loader) { this.$el.find('.sui-box-body').html('<p class="fui-loading-dialog" style="text-align: center;" aria-label="Loading content">' + '<span class="sui-icon-loader sui-md sui-loading" aria-hidden="true"></span>' + '</p>'); this.$el.find('.sui-box-footer').html(''); this.$el.find('.forminator-integration-popup__header').html(''); } self.applyLoader(self.$el); this.ajax = jQuery.post({ url: forminatorData.ajaxUrl, type: 'post', data: data }).done(function (result) { if (result && result.success) { // Render popup body self.renderBody(result); // Render popup footer self.renderFooter(result); // Shorten result data var resultData = result.data.data; self.onRender(resultData); self.resetLoader(self.$el); // Handle close modal if (close || !_.isUndefined(resultData.is_close) && resultData.is_close) { self.close(self); } // Add closing event self.$el.find('.forminator-addon-close').on('click', function () { self.close(self); }); // Handle notifications if (!_.isUndefined(resultData.notification) && !_.isUndefined(resultData.notification.type) && !_.isUndefined(resultData.notification.text)) { var custom = new _notifications2.default({ type: resultData.notification.type, text: resultData.notification.text, time: 4000 }); custom.open(); } // Handle back button if (!_.isUndefined(resultData.has_back)) { if (resultData.has_back) { self.$el.find('.forminator-addon-back').show(); } else { self.$el.find('.forminator-addon-back').hide(); } } else { self.$el.find('.forminator-addon-back').hide(); } // Handle modal size if (!_.isUndefined(resultData.size)) { var $popup = jQuery('#forminator-integration-popup'); // Remove all sizes if (resultData.size === 'normal') { $popup.removeClass('sui-modal-sm sui-modal-lg'); } if (resultData.size === 'small') { $popup.addClass('sui-modal-sm'); $popup.removeClass('sui-modal-lg sui-modal-reduced'); } if (resultData.size === 'reduced') { $popup.addClass('sui-modal-sm'); $popup.removeClass('sui-modal-lg sui-modal-md'); } if (resultData.size === 'large') { $popup.addClass('sui-modal-lg'); $popup.removeClass('sui-modal-sm sui-modal-md'); } } if (resultData.is_poll) { setTimeout(self.request(function_params.data, function_params.close, function_params.loader), 5000); } setTimeout(function () { // Rebind Accordion scripts SUI.suiAccordion(jQuery('.sui-accordion')); // Rebind Tabs scripts SUI.suiTabs(jQuery('.sui-tabs')); // Rebind Select2 scripts. jQuery('select.sui-select[data-theme="icon"]').each(function () { SUI.select.initIcon(jQuery(this)); }); jQuery('select.sui-select[data-theme="color"]').each(function () { SUI.select.initColor(jQuery(this)); }); jQuery('select.sui-select[data-theme="search"]').each(function () { SUI.select.initSearch(jQuery(this)); }); jQuery('select.sui-select:not([data-theme]):not(.custom-select2):not(.fui-multi-select)').each(function () { SUI.select.init(jQuery(this)); }); // Rebind Variables scripts. jQuery('select.sui-variables').each(function () { SUI.select.initVars(jQuery(this)); }); // Rebind Circle scripts SUI.loadCircleScore(jQuery('.sui-circle-score')); // Rebind Password scripts SUI.showHidePassword(); }, 10); //check the height var $popupBox = jQuery('#forminator-integration-popup .sui-box'), $popupBoxHeight = $popupBox.height(), $windowHeight = jQuery(window).height(); // scrollbar appear if ($popupBoxHeight > $windowHeight) { // make scrollbar clickable jQuery('#forminator-integration-popup .sui-modal-overlay').css('right', self.scrollbar_width + 'px'); } else { jQuery('#forminator-integration-popup .sui-modal-overlay').css('right', 0); } } // Show Mailchimp interests is Group is already choosen. if ('mailchimp' === self.slug) { var group = self.$el.find('#group'); if (group.length) { group.trigger('change'); } } }); //remove the preloader this.ajax.always(function () { self.$el.find('.fui-loading-dialog').remove(); }); } }, { key: 'renderBody', value: function renderBody(result) { this.$el.find('.sui-box-body').html(result.data.data.html); // append header to integration-header var integrationHeader = this.$el.find('.sui-box-body .forminator-integration-popup__header').remove(); if (integrationHeader.length > 0) { this.$el.find('.forminator-integration-popup__header').html(integrationHeader.html()); } } }, { key: 'renderFooter', value: function renderFooter(result) { var self = this, buttons = result.data.data.buttons; // Clear footer from previous buttons self.$el.find('.sui-box-footer').html(''); // Append buttons _.each(buttons, function (button) { self.$el.find('.sui-box-footer').append(button.markup); }); } }, { key: 'onRender', value: function onRender(result) { // this.delegateEvents(); // Delegate SUI events (0, _utils.suiDelegateEvents)(); // multi select (Tags) (0, _utils.select2Tags)(this.$el, {}); // Update current step if (!_.isUndefined(result.forminator_addon_current_step)) { this.step = +result.forminator_addon_current_step; } // Update has next step if (!_.isUndefined(result.forminator_addon_has_next_step)) { this.next_step = result.forminator_addon_has_next_step; } // Update has prev step if (!_.isUndefined(result.forminator_addon_has_prev_step)) { this.prev_step = result.forminator_addon_has_prev_step; } } }, { key: 'close', value: function close(self) { // Kill AJAX hearbeat self.ajax.abort(); // Remove the view self.remove(); this.trigger('modal:closed'); } }, { key: 'refreshLists', value: function refreshLists(e) { e.preventDefault(); e.stopPropagation(); var self = this, $this = jQuery(e.currentTarget), slug = this.slug, global_id = this.global_id, nonce = this.nonce, params = { slug: slug, global_id: global_id }; $this.addClass('sui-button-onload'); jQuery.ajax({ url: ajaxurl, type: 'POST', data: { action: 'forminator_refresh_email_lists', data: params, _ajax_nonce: nonce // eslint-disable-line camelcase } }).done(function (result) { if (result.success) { if ('undefined' !== typeof result.data.options) { var $select = $this.siblings('.sui-select'), getParent = $select.closest('.sui-modal-content'), getParentId = getParent.attr('id'), selectParent = getParent.length ? jQuery('#' + getParentId) : jQuery('body'), hasSearch = 'true' === $select.attr('data-search') ? 0 : -1, isSmall = $select.hasClass('sui-select-sm') ? 'sui-select-dropdown-sm' : ''; $select.html(result.data.options); $select.SUIselect2({ dropdownParent: selectParent, minimumResultsForSearch: hasSearch, dropdownCssClass: isSmall }); } } }).fail(function () { // TODO: handle errors }).always(function () { $this.removeClass('sui-button-onload'); }); } // Show interests for mailchimp. }, { key: 'showInterests', value: function showInterests(e) { var self = this, $this = jQuery(e.currentTarget), nonce = $this.data('nonce'), data = {}, form = self.$el.find('form'), params = { slug: self.slug, global_id: this.global_id, module_id: this.module_id, module_type: this.type }; var formData = form.serialize(); formData = formData + '&' + jQuery.param(params); data.action = 'forminator_mailchimp_get_group_interests'; // eslint-disable-next-line camelcase data._ajax_nonce = nonce; data.data = formData; self.applyLoader(self.$el); jQuery.ajax({ url: ajaxurl, type: 'POST', data: data }).done(function (result) { if (result.success) { form.find('.sui-form-field').slice(1).remove(); form.find('.sui-form-field:first-child').after(result.data); form.find('.sui-form-field').slice(1).find('select').each(function () { SUI.select.init(jQuery(this)); }); } }).fail(function () { // TODO: handle errors }).always(function () { self.resetLoader(self.$el); }); } }, { key: 'submitNextStep', value: function submitNextStep(e) { var data = {}, form = this.$el.find('form'); var params = { slug: this.slug, step: this.getStep(), global_id: this.global_id, current_step: this.step }; var formData = form.serialize(); params = this.getAjaxModuleData(params, false); formData = formData + '&' + jQuery.param(params); data.action = this.action; data._ajax_nonce = this.nonce; data.data = formData; this.request(data, false, false); } }, { key: 'changeFormType', value: function changeFormType() { var data = {}, form = this.$el.find('form'); var params = { slug: this.slug, step: this.step, global_id: this.global_id, current_step: this.step, change_form_type: 1 }; var formData = form.serialize(); params = this.getAjaxModuleData(params, false); formData = formData + '&' + jQuery.param(params); data.action = this.action; data._ajax_nonce = this.nonce; data.data = formData; this.request(data, false, false); } }, { key: 'goPrevStep', value: function goPrevStep(e) { var data = {}; var params = { slug: this.slug, step: this.getPrevStep(), global_id: this.global_id, current_step: this.step }; params = this.getAjaxModuleData(params, true); data.action = this.action; data._ajax_nonce = this.nonce; data.data = params; this.request(data, false, false); } }, { key: 'finishSteps', value: function finishSteps(e) { var data = {}, form = this.$el.find('form'); var params = { slug: this.slug, step: this.getStep(), global_id: this.global_id, current_step: this.step }; var formData = form.serialize(); params = this.getAjaxModuleData(params, true); formData = formData + '&' + jQuery.param(params); data.action = this.action; data._ajax_nonce = this.nonce; data.data = formData; this.request(data, false, false); } }, { key: 'getStep', value: function getStep() { if (this.next_step) { return this.step + 1; } return this.step; } }, { key: 'getPrevStep', value: function getPrevStep() { if (this.prev_step) { return this.step - 1; } return this.step; } }, { key: 'connectAddon', value: function connectAddon() { var data = {}, form = this.$el.find('form'); var params = { slug: this.slug, step: this.getStep(), global_id: this.global_id, current_step: this.step }; var formData = form.serialize(); params = this.getAjaxModuleData(params, true); formData = formData + '&' + jQuery.param(params); data.action = this.action; data._ajax_nonce = this.nonce; data.data = formData; this.request(data, false, false); } }, { key: 'disconnectAddon', value: function disconnectAddon() { var data = {}; data.action = 'forminator_addon_deactivate'; data._ajax_nonce = this.nonce; data.data = {}; data.data.slug = this.slug; data.data.global_id = this.global_id; this.request(data, true, false); } }, { key: 'formDisconnectAddon', value: function formDisconnectAddon() { var data = {}; data.action = this.getAjaxModuleAction('deactivate'); data._ajax_nonce = this.nonce; data.data = {}; data.data.slug = this.slug; data.data = this.getAjaxModuleData(data.data, true); this.request(data, true, false); } }, { key: 'getScrollbarWidth', value: function getScrollbarWidth() { //https://github.com/brandonaaron/jquery-getscrollbarwidth/ var scrollbarWidth = 0; if (navigator.userAgent.match("MSIE")) { var $textarea1 = jQuery('<textarea cols="10" rows="2"></textarea>').css({ position: 'absolute', top: -1000, left: -1000 }).appendTo('body'), $textarea2 = jQuery('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({ position: 'absolute', top: -1000, left: -1000 }).appendTo('body'); scrollbarWidth = $textarea1.width() - $textarea2.width(); $textarea1.add($textarea2).remove(); } else { var $div = jQuery('<div />').css({ width: 100, height: 100, overflow: 'auto', position: 'absolute', top: -1000, left: -1000 }).prependTo('body').append('<div />').find('div').css({ width: '100%', height: 200 }); scrollbarWidth = 100 - $div.width(); $div.parent().remove(); } return scrollbarWidth; } }, { key: 'getAjaxModuleData', value: function getAjaxModuleData(data, with_multi_id) { if (this.module_id) { data.module_id = this.module_id; data.module_type = this.type; data.global_id = this.global_id; } if (with_multi_id) { if (this.multi_id) { data.multi_id = this.multi_id; } } return data; } }, { key: 'getAjaxModuleAction', value: function getAjaxModuleAction(action) { switch (action) { case 'deactivate': action = 'forminator_addon_deactivate_for_module'; break; } return action; } }]); return ForminatorIntegrations; }(Backbone.View); exports.default = ForminatorIntegrations; /***/ }), /* 177 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (immutable) */ __webpack_exports__["Headers"] = Headers; /* harmony export (immutable) */ __webpack_exports__["Request"] = Request; /* harmony export (immutable) */ __webpack_exports__["Response"] = Response; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DOMException", function() { return DOMException; }); /* harmony export (immutable) */ __webpack_exports__["fetch"] = fetch; /* eslint-disable no-prototype-builtins */ var g = (typeof globalThis !== 'undefined' && globalThis) || (typeof self !== 'undefined' && self) || // eslint-disable-next-line no-undef (typeof global !== 'undefined' && global) || {} var support = { searchParams: 'URLSearchParams' in g, iterable: 'Symbol' in g && 'iterator' in Symbol, blob: 'FileReader' in g && 'Blob' in g && (function() { try { new Blob() return true } catch (e) { return false } })(), formData: 'FormData' in g, arrayBuffer: 'ArrayBuffer' in g } function isDataView(obj) { return obj && DataView.prototype.isPrototypeOf(obj) } if (support.arrayBuffer) { var viewClasses = [ '[object Int8Array]', '[object Uint8Array]', '[object Uint8ClampedArray]', '[object Int16Array]', '[object Uint16Array]', '[object Int32Array]', '[object Uint32Array]', '[object Float32Array]', '[object Float64Array]' ] var isArrayBufferView = ArrayBuffer.isView || function(obj) { return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1 } } function normalizeName(name) { if (typeof name !== 'string') { name = String(name) } if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') { throw new TypeError('Invalid character in header field name: "' + name + '"') } return name.toLowerCase() } function normalizeValue(value) { if (typeof value !== 'string') { value = String(value) } return value } // Build a destructive iterator for the value list function iteratorFor(items) { var iterator = { next: function() { var value = items.shift() return {done: value === undefined, value: value} } } if (support.iterable) { iterator[Symbol.iterator] = function() { return iterator } } return iterator } function Headers(headers) { this.map = {} if (headers instanceof Headers) { headers.forEach(function(value, name) { this.append(name, value) }, this) } else if (Array.isArray(headers)) { headers.forEach(function(header) { if (header.length != 2) { throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length) } this.append(header[0], header[1]) }, this) } else if (headers) { Object.getOwnPropertyNames(headers).forEach(function(name) { this.append(name, headers[name]) }, this) } } Headers.prototype.append = function(name, value) { name = normalizeName(name) value = normalizeValue(value) var oldValue = this.map[name] this.map[name] = oldValue ? oldValue + ', ' + value : value } Headers.prototype['delete'] = function(name) { delete this.map[normalizeName(name)] } Headers.prototype.get = function(name) { name = normalizeName(name) return this.has(name) ? this.map[name] : null } Headers.prototype.has = function(name) { return this.map.hasOwnProperty(normalizeName(name)) } Headers.prototype.set = function(name, value) { this.map[normalizeName(name)] = normalizeValue(value) } Headers.prototype.forEach = function(callback, thisArg) { for (var name in this.map) { if (this.map.hasOwnProperty(name)) { callback.call(thisArg, this.map[name], name, this) } } } Headers.prototype.keys = function() { var items = [] this.forEach(function(value, name) { items.push(name) }) return iteratorFor(items) } Headers.prototype.values = function() { var items = [] this.forEach(function(value) { items.push(value) }) return iteratorFor(items) } Headers.prototype.entries = function() { var items = [] this.forEach(function(value, name) { items.push([name, value]) }) return iteratorFor(items) } if (support.iterable) { Headers.prototype[Symbol.iterator] = Headers.prototype.entries } function consumed(body) { if (body._noBody) return if (body.bodyUsed) { return Promise.reject(new TypeError('Already read')) } body.bodyUsed = true } function fileReaderReady(reader) { return new Promise(function(resolve, reject) { reader.onload = function() { resolve(reader.result) } reader.onerror = function() { reject(reader.error) } }) } function readBlobAsArrayBuffer(blob) { var reader = new FileReader() var promise = fileReaderReady(reader) reader.readAsArrayBuffer(blob) return promise } function readBlobAsText(blob) { var reader = new FileReader() var promise = fileReaderReady(reader) var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type) var encoding = match ? match[1] : 'utf-8' reader.readAsText(blob, encoding) return promise } function readArrayBufferAsText(buf) { var view = new Uint8Array(buf) var chars = new Array(view.length) for (var i = 0; i < view.length; i++) { chars[i] = String.fromCharCode(view[i]) } return chars.join('') } function bufferClone(buf) { if (buf.slice) { return buf.slice(0) } else { var view = new Uint8Array(buf.byteLength) view.set(new Uint8Array(buf)) return view.buffer } } function Body() { this.bodyUsed = false this._initBody = function(body) { /* fetch-mock wraps the Response object in an ES6 Proxy to provide useful test harness features such as flush. However, on ES5 browsers without fetch or Proxy support pollyfills must be used; the proxy-pollyfill is unable to proxy an attribute unless it exists on the object before the Proxy is created. This change ensures Response.bodyUsed exists on the instance, while maintaining the semantic of setting Request.bodyUsed in the constructor before _initBody is called. */ // eslint-disable-next-line no-self-assign this.bodyUsed = this.bodyUsed this._bodyInit = body if (!body) { this._noBody = true; this._bodyText = '' } else if (typeof body === 'string') { this._bodyText = body } else if (support.blob && Blob.prototype.isPrototypeOf(body)) { this._bodyBlob = body } else if (support.formData && FormData.prototype.isPrototypeOf(body)) { this._bodyFormData = body } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { this._bodyText = body.toString() } else if (support.arrayBuffer && support.blob && isDataView(body)) { this._bodyArrayBuffer = bufferClone(body.buffer) // IE 10-11 can't handle a DataView body. this._bodyInit = new Blob([this._bodyArrayBuffer]) } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { this._bodyArrayBuffer = bufferClone(body) } else { this._bodyText = body = Object.prototype.toString.call(body) } if (!this.headers.get('content-type')) { if (typeof body === 'string') { this.headers.set('content-type', 'text/plain;charset=UTF-8') } else if (this._bodyBlob && this._bodyBlob.type) { this.headers.set('content-type', this._bodyBlob.type) } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8') } } } if (support.blob) { this.blob = function() { var rejected = consumed(this) if (rejected) { return rejected } if (this._bodyBlob) { return Promise.resolve(this._bodyBlob) } else if (this._bodyArrayBuffer) { return Promise.resolve(new Blob([this._bodyArrayBuffer])) } else if (this._bodyFormData) { throw new Error('could not read FormData body as blob') } else { return Promise.resolve(new Blob([this._bodyText])) } } } this.arrayBuffer = function() { if (this._bodyArrayBuffer) { var isConsumed = consumed(this) if (isConsumed) { return isConsumed } else if (ArrayBuffer.isView(this._bodyArrayBuffer)) { return Promise.resolve( this._bodyArrayBuffer.buffer.slice( this._bodyArrayBuffer.byteOffset, this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength ) ) } else { return Promise.resolve(this._bodyArrayBuffer) } } else if (support.blob) { return this.blob().then(readBlobAsArrayBuffer) } else { throw new Error('could not read as ArrayBuffer') } } this.text = function() { var rejected = consumed(this) if (rejected) { return rejected } if (this._bodyBlob) { return readBlobAsText(this._bodyBlob) } else if (this._bodyArrayBuffer) { return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)) } else if (this._bodyFormData) { throw new Error('could not read FormData body as text') } else { return Promise.resolve(this._bodyText) } } if (support.formData) { this.formData = function() { return this.text().then(decode) } } this.json = function() { return this.text().then(JSON.parse) } return this } // HTTP methods whose capitalization should be normalized var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'] function normalizeMethod(method) { var upcased = method.toUpperCase() return methods.indexOf(upcased) > -1 ? upcased : method } function Request(input, options) { if (!(this instanceof Request)) { throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.') } options = options || {} var body = options.body if (input instanceof Request) { if (input.bodyUsed) { throw new TypeError('Already read') } this.url = input.url this.credentials = input.credentials if (!options.headers) { this.headers = new Headers(input.headers) } this.method = input.method this.mode = input.mode this.signal = input.signal if (!body && input._bodyInit != null) { body = input._bodyInit input.bodyUsed = true } } else { this.url = String(input) } this.credentials = options.credentials || this.credentials || 'same-origin' if (options.headers || !this.headers) { this.headers = new Headers(options.headers) } this.method = normalizeMethod(options.method || this.method || 'GET') this.mode = options.mode || this.mode || null this.signal = options.signal || this.signal || (function () { if ('AbortController' in g) { var ctrl = new AbortController(); return ctrl.signal; } }()); this.referrer = null if ((this.method === 'GET' || this.method === 'HEAD') && body) { throw new TypeError('Body not allowed for GET or HEAD requests') } this._initBody(body) if (this.method === 'GET' || this.method === 'HEAD') { if (options.cache === 'no-store' || options.cache === 'no-cache') { // Search for a '_' parameter in the query string var reParamSearch = /([?&])_=[^&]*/ if (reParamSearch.test(this.url)) { // If it already exists then set the value with the current time this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime()) } else { // Otherwise add a new '_' parameter to the end with the current time var reQueryString = /\?/ this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime() } } } } Request.prototype.clone = function() { return new Request(this, {body: this._bodyInit}) } function decode(body) { var form = new FormData() body .trim() .split('&') .forEach(function(bytes) { if (bytes) { var split = bytes.split('=') var name = split.shift().replace(/\+/g, ' ') var value = split.join('=').replace(/\+/g, ' ') form.append(decodeURIComponent(name), decodeURIComponent(value)) } }) return form } function parseHeaders(rawHeaders) { var headers = new Headers() // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space // https://tools.ietf.org/html/rfc7230#section-3.2 var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ') // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill // https://github.com/github/fetch/issues/748 // https://github.com/zloirock/core-js/issues/751 preProcessedHeaders .split('\r') .map(function(header) { return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header }) .forEach(function(line) { var parts = line.split(':') var key = parts.shift().trim() if (key) { var value = parts.join(':').trim() try { headers.append(key, value) } catch (error) { console.warn('Response ' + error.message) } } }) return headers } Body.call(Request.prototype) function Response(bodyInit, options) { if (!(this instanceof Response)) { throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.') } if (!options) { options = {} } this.type = 'default' this.status = options.status === undefined ? 200 : options.status if (this.status < 200 || this.status > 599) { throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].") } this.ok = this.status >= 200 && this.status < 300 this.statusText = options.statusText === undefined ? '' : '' + options.statusText this.headers = new Headers(options.headers) this.url = options.url || '' this._initBody(bodyInit) } Body.call(Response.prototype) Response.prototype.clone = function() { return new Response(this._bodyInit, { status: this.status, statusText: this.statusText, headers: new Headers(this.headers), url: this.url }) } Response.error = function() { var response = new Response(null, {status: 200, statusText: ''}) response.ok = false response.status = 0 response.type = 'error' return response } var redirectStatuses = [301, 302, 303, 307, 308] Response.redirect = function(url, status) { if (redirectStatuses.indexOf(status) === -1) { throw new RangeError('Invalid status code') } return new Response(null, {status: status, headers: {location: url}}) } var DOMException = g.DOMException try { new DOMException() } catch (err) { DOMException = function(message, name) { this.message = message this.name = name var error = Error(message) this.stack = error.stack } DOMException.prototype = Object.create(Error.prototype) DOMException.prototype.constructor = DOMException } function fetch(input, init) { return new Promise(function(resolve, reject) { var request = new Request(input, init) if (request.signal && request.signal.aborted) { return reject(new DOMException('Aborted', 'AbortError')) } var xhr = new XMLHttpRequest() function abortXhr() { xhr.abort() } xhr.onload = function() { var options = { statusText: xhr.statusText, headers: parseHeaders(xhr.getAllResponseHeaders() || '') } // This check if specifically for when a user fetches a file locally from the file system // Only if the status is out of a normal range if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) { options.status = 200; } else { options.status = xhr.status; } options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL') var body = 'response' in xhr ? xhr.response : xhr.responseText setTimeout(function() { resolve(new Response(body, options)) }, 0) } xhr.onerror = function() { setTimeout(function() { reject(new TypeError('Network request failed')) }, 0) } xhr.ontimeout = function() { setTimeout(function() { reject(new TypeError('Network request timed out')) }, 0) } xhr.onabort = function() { setTimeout(function() { reject(new DOMException('Aborted', 'AbortError')) }, 0) } function fixUrl(url) { try { return url === '' && g.location.href ? g.location.href : url } catch (e) { return url } } xhr.open(request.method, fixUrl(request.url), true) if (request.credentials === 'include') { xhr.withCredentials = true } else if (request.credentials === 'omit') { xhr.withCredentials = false } if ('responseType' in xhr) { if (support.blob) { xhr.responseType = 'blob' } else if ( support.arrayBuffer ) { xhr.responseType = 'arraybuffer' } } if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) { var names = []; Object.getOwnPropertyNames(init.headers).forEach(function(name) { names.push(normalizeName(name)) xhr.setRequestHeader(name, normalizeValue(init.headers[name])) }) request.headers.forEach(function(value, name) { if (names.indexOf(name) === -1) { xhr.setRequestHeader(name, value) } }) } else { request.headers.forEach(function(value, name) { xhr.setRequestHeader(name, value) }) } if (request.signal) { request.signal.addEventListener('abort', abortXhr) xhr.onreadystatechange = function() { // DONE (success or failure) if (xhr.readyState === 4) { request.signal.removeEventListener('abort', abortXhr) } } } xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit) }) } fetch.polyfill = true if (!g.fetch) { g.fetch = fetch g.Headers = Headers g.Request = Request g.Response = Response } /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(30))) /***/ }), /* 178 */, /* 179 */, /* 180 */, /* 181 */, /* 182 */, /* 183 */, /* 184 */, /* 185 */, /* 186 */, /* 187 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var AccordionToggle = function (_Component) { _inherits(AccordionToggle, _Component); function AccordionToggle(props) { _classCallCheck(this, AccordionToggle); var _this = _possibleConstructorReturn(this, (AccordionToggle.__proto__ || Object.getPrototypeOf(AccordionToggle)).call(this, props)); _this.state = { open: false }; _this.updateValue = _this.updateValue.bind(_this); _this.toggleState = _this.toggleState.bind(_this); return _this; } _createClass(AccordionToggle, [{ key: 'toggleState', value: function toggleState() { this.setState({ open: !this.state.open }); } }, { key: 'updateValue', value: function updateValue(value) { // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } } }, { key: 'render', value: function render() { var _this2 = this; var label = this.props.label; var divClass = ''; var open = this.state.open; var value = _.isUndefined(this.props.settings[this.props.property]) ? '' : this.props.settings[this.props.property]; if (!value) { divClass = 'sui-accordion-item--disabled'; } if (value && open) { divClass = 'sui-accordion-item--open'; } var accordionContents = _react2.default.Children.map(this.props.children, function (tab) { return tab; }); var contentWrapper = open && accordionContents; if (!this.props.noBoxBody) { contentWrapper = _react2.default.createElement( 'div', { className: 'sui-box' }, _react2.default.createElement( 'div', { className: 'sui-box-body' }, open && accordionContents ) ); } return _react2.default.createElement( 'div', { className: 'sui-accordion-item ' + divClass }, _react2.default.createElement( 'div', { className: 'sui-accordion-item-header', onClick: function onClick() { return _this2.toggleState(); } }, _react2.default.createElement( 'div', { className: 'sui-accordion-item-title' }, _react2.default.createElement( 'label', { htmlFor: 'forminator-' + this.props.property, className: 'sui-toggle' }, _react2.default.createElement('input', { type: 'checkbox', id: 'forminator-' + this.props.property, onChange: function onChange(e) { _this2.updateValue(e.target.checked); }, checked: value ? 'checked' : '' }), _react2.default.createElement('span', { className: 'sui-toggle-slider' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Enable'), ' ', label ), _react2.default.createElement( 'span', { className: 'sui-toggle-label' }, label, this.props.required && _react2.default.createElement( 'span', { className: 'sui-error' }, ' *' ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-accordion-col-auto' }, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-accordion-open-indicator', onClick: function onClick() { return _this2.toggleState(); } }, _react2.default.createElement('i', { className: 'sui-icon-chevron-down', 'aria-hidden': 'true' }) ) ) ), _react2.default.createElement( 'div', { className: 'sui-accordion-item-body' }, contentWrapper ) ); } }]); return AccordionToggle; }(_react.Component); exports.default = AccordionToggle; /***/ }), /* 188 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _options = __webpack_require__(503); var _options2 = _interopRequireDefault(_options); var _hiddenBehavior = __webpack_require__(227); var _hiddenBehavior2 = _interopRequireDefault(_hiddenBehavior); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Calculations = function (_Component) { _inherits(Calculations, _Component); function Calculations(props) { _classCallCheck(this, Calculations); return _possibleConstructorReturn(this, (Calculations.__proto__ || Object.getPrototypeOf(Calculations)).call(this, props)); } /** * Check the current element is used in any Calculation fields. */ _createClass(Calculations, [{ key: 'isElementUsedInCalculationFields', value: function isElementUsedInCalculationFields() { var isUsed = false; var $this = this; var calculationFields = (0, _utils.getCalculationFields)(this.props.wrappers); _.some(calculationFields, function (field) { isUsed = $this.elementExistsInFormula(field.formula); if (true === isUsed) { return isUsed; } }); return isUsed; } /** * Check if the element is used in formula. * @param {string} formula Formula */ }, { key: 'elementExistsInFormula', value: function elementExistsInFormula(formula) { var exists = false; if (formula) { var elementId = this.props.state.element_id; var pattern = new RegExp('\\{' + elementId + '\\}|\\{' + elementId + '\\-\\*\\}', 'g'); var matches = formula.match(pattern); if (null !== matches) { exists = true; } } return exists; } /** * Get Calculation field names. */ }, { key: 'getUsedCalculationFieldNames', value: function getUsedCalculationFieldNames() { var $this = this; var fields = (0, _utils.getCalculationFields)(this.props.wrappers); var names = ''; _.forEach(fields, function (field) { var exists = $this.elementExistsInFormula(field.formula); if (true === exists) { names += '' === names ? field.element_id : ', ' + field.element_id; } }); return names; } }, { key: 'render', value: function render() { var options = _.isUndefined(this.props.state.options) ? [] : this.props.state.options; var boxClass = options.length > 0 ? 'sui-tab-boxed' : ''; var isUsedInCalc = this.isElementUsedInCalculationFields(); var isDisabled = isUsedInCalc && (true === this.props.state.calculations || 'true' === this.props.state.calculations); var tooltipText = ''; if (isDisabled) { var calculationFieldNames = this.getUsedCalculationFieldNames(); tooltipText = '' + (0, _utils.translate)('It is impossible to disable calculation for this field because it is in use in %(names)s field(s).', { args: { names: calculationFieldNames } }); } var fieldDescription = _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose whether to allow this field to be used in calculations ' + 'or not. The value used in calculations is the same as the input ' + 'value of this field.') ); if (this.props.description) { fieldDescription = _react2.default.createElement( 'span', { className: 'sui-description' }, this.props.description ); } return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Calculations') ), fieldDescription, options.length > 0 && _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { settings: this.props.state, disabled: isDisabled, property: 'calculations', description: '', 'default': 'false', noWrapper: true, tooltip: tooltipText }), _react2.default.createElement(_options2.default, _extends({}, this.props, { value: 'true', boxClass: boxClass, label: (0, _utils.translate)('Enable') })), _react2.default.createElement(_empty2.default, { value: 'false', label: (0, _utils.translate)('Disable') }) ), options.length === 0 && _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { settings: this.props.state, disabled: isDisabled, property: 'calculations', 'default': 'false', noWrapper: true, tooltip: tooltipText }), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'true', label: (0, _utils.translate)('Enable'), settings: this.props.state, boxClass: 'sui-tab-boxed' }), _react2.default.createElement(_hiddenBehavior2.default, this.props) ), _react2.default.createElement(_empty2.default, { value: 'false', label: (0, _utils.translate)('Disable') }) ) ) ); } }]); return Calculations; }(_react.Component); exports.default = Calculations; /***/ }), /* 189 */ /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /* 190 */ /***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /* 191 */, /* 192 */, /* 193 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var updateFields = exports.updateFields = function updateFields(wrappers) { return function (dispatch) { // Update global variable with Changes window.forminatorChanges.settings = true; dispatch({ type: 'UPDATE_FIELDS', wrappers: wrappers }); }; }; var updateField = exports.updateField = function updateField(wrapper) { return function (dispatch) { // Update global variable with Changes window.forminatorChanges.settings = true; dispatch({ type: 'UPDATE_FIELD', wrapper: wrapper }); }; }; var updateFieldSettings = exports.updateFieldSettings = function updateFieldSettings(wrapper, field) { return function (dispatch) { // Update global variable with Changes window.forminatorChanges.fields.push(field); window.forminatorChanges.settings = true; dispatch({ type: 'UPDATE_FIELD', wrapper: wrapper }); }; }; /***/ }), /* 194 */ /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__(413), listCacheDelete = __webpack_require__(414), listCacheGet = __webpack_require__(415), listCacheHas = __webpack_require__(416), listCacheSet = __webpack_require__(417); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /* 195 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(358); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /* 196 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(216), getRawTag = __webpack_require__(424), objectToString = __webpack_require__(425); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /* 197 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(168); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /* 198 */ /***/ (function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__(438); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /* 199 */ /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(362), baseAssignValue = __webpack_require__(363); /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } module.exports = copyObject; /***/ }), /* 200 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Labels = function (_Component) { _inherits(Labels, _Component); function Labels(props) { _classCallCheck(this, Labels); return _possibleConstructorReturn(this, (Labels.__proto__ || Object.getPrototypeOf(Labels)).call(this, props)); } _createClass(Labels, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter Placeholder'), property: 'placeholder' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ) ); } }]); return Labels; }(_react.Component); exports.default = Labels; /***/ }), /* 201 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = configureStore; var _redux = __webpack_require__(12); var _reduxThunk = __webpack_require__(117); var _reduxThunk2 = _interopRequireDefault(_reduxThunk); var _reducers = __webpack_require__(202); var _reducers2 = _interopRequireDefault(_reducers); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var newCreateStore = (0, _redux.compose)((0, _redux.applyMiddleware)(_reduxThunk2.default))(_redux.createStore); function configureStore(initialState) { return newCreateStore(_reducers2.default, initialState); } /***/ }), /* 202 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _redux = __webpack_require__(12); var _wrappers = __webpack_require__(203); var _wrappers2 = _interopRequireDefault(_wrappers); var _settings = __webpack_require__(204); var _settings2 = _interopRequireDefault(_settings); var _modal = __webpack_require__(205); var _modal2 = _interopRequireDefault(_modal); var _integrations = __webpack_require__(206); var _integrations2 = _interopRequireDefault(_integrations); var _behaviors = __webpack_require__(207); var _behaviors2 = _interopRequireDefault(_behaviors); var _notifications = __webpack_require__(208); var _notifications2 = _interopRequireDefault(_notifications); var _pdfs = __webpack_require__(209); var _pdfs2 = _interopRequireDefault(_pdfs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var appReducers = (0, _redux.combineReducers)({ // List reducers wrappers: _wrappers2.default, settings: _settings2.default, modal: _modal2.default, integrationConditions: _integrations2.default, behaviorArray: _behaviors2.default, notifications: _notifications2.default, pdfs: _pdfs2.default }); // Import reducers exports.default = appReducers; /***/ }), /* 203 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = wrappers; var _utils = __webpack_require__(1); function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function updateField(state, action) { var wrapper = action.wrapper; var wrapperIndex = state.findIndex(function (wrap) { return wrap.wrapper_id === wrapper.wrapper_id; }); state = (0, _utils.replaceInPosition)(state, wrapperIndex, wrapper); return state; } function wrappers() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var action = arguments[1]; switch (action.type) { case 'UPDATE_FIELDS': return action.wrappers; case 'UPDATE_FIELD': return updateField([].concat(_toConsumableArray(state)), action); default: return state; } } /***/ }), /* 204 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; exports.default = settings; function updateSetting(state, action) { var setting = action.setting, value = action.value; // Update value state[setting] = value; return state; } function updateSettings(state, action) { var settings = action.settings; return _extends({}, state, settings); } function resetSettings(state, action) { var settings = action.settings; return _extends({}, settings); } function updateTitle(state, action) { var title = action.title; // Update value state.formName = title; return state; } function settings() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var action = arguments[1]; var newState = Object.assign({}, state); switch (action.type) { case 'UPDATE_SETTINGS': return updateSettings(newState, action); case 'RESET_SETTINGS': return resetSettings(newState, action); case 'UPDATE_SETTING': return updateSetting(newState, action); case 'UPDATE_TITLE': return updateTitle(newState, action); default: return state; } } /***/ }), /* 205 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var initialState = { modalType: null, modalProps: {} }; exports.default = function () { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; var action = arguments[1]; switch (action.type) { case 'SHOW_MODAL': return { modalProps: action.modalProps, modalType: action.modalType, type: action.type }; case 'HIDE_MODAL': return initialState; default: return state; } }; /***/ }), /* 206 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = integrationConditions; var _utils = __webpack_require__(1); function integrationConditions() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var action = arguments[1]; switch (action.type) { case 'UPDATE_INTEGRATION_CONDITIONS': return action.conditions; default: return state; } } /***/ }), /* 207 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = behaviors; var _utils = __webpack_require__(1); function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function updateBehaviorArray(state, action) { var behavior = action.behavior; var behaviorIndex = state.findIndex(function (notify) { return notify.slug === behavior.slug; }); state = (0, _utils.replaceInPosition)(state, behaviorIndex, behavior); return state; } function behaviors() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var action = arguments[1]; switch (action.type) { case 'UPDATE_BEHAVIORS': return action.behaviors; case 'UPDATE_BEHAVIOR': return updateBehaviorArray([].concat(_toConsumableArray(state)), action); default: return state; } } /***/ }), /* 208 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = notifications; var _utils = __webpack_require__(1); function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function updateNotification(state, action) { var notification = action.notification; var notificationIndex = state.findIndex(function (notify) { return notify.slug === notification.slug; }); state = (0, _utils.replaceInPosition)(state, notificationIndex, notification); return state; } function notifications() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var action = arguments[1]; switch (action.type) { case 'UPDATE_NOTIFICATIONS': return action.notifications; case 'UPDATE_NOTIFICATION': return updateNotification([].concat(_toConsumableArray(state)), action); default: return state; } } /***/ }), /* 209 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = pdfs; function pdfs() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var action = arguments[1]; switch (action.type) { case 'UPDATE_PDFS': return action.pdfs; default: return state; } } /***/ }), /* 210 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var updateIntegrationConditions = exports.updateIntegrationConditions = function updateIntegrationConditions(conditions) { return function (dispatch) { // Update global variable with Changes window.forminatorChanges.settings = true; dispatch({ type: 'UPDATE_INTEGRATION_CONDITIONS', conditions: conditions }); }; }; /***/ }), /* 211 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var updateBehaviorArray = exports.updateBehaviorArray = function updateBehaviorArray(behaviors) { return function (dispatch) { // Update global variable with Changes window.forminatorChanges.settings = true; dispatch({ type: 'UPDATE_BEHAVIORS', behaviors: behaviors }); }; }; var updateBehavior = exports.updateBehavior = function updateBehavior(behavior) { return function (dispatch) { // Update global variable with Changes window.forminatorChanges.settings = true; dispatch({ type: 'UPDATE_BEHAVIOR', behavior: behavior }); }; }; /***/ }), /* 212 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var updateNotifications = exports.updateNotifications = function updateNotifications(notifications) { return function (dispatch) { // Update global variable with Changes window.forminatorChanges.settings = true; dispatch({ type: 'UPDATE_NOTIFICATIONS', notifications: notifications }); }; }; var updateNotification = exports.updateNotification = function updateNotification(notification) { return function (dispatch) { // Update global variable with Changes window.forminatorChanges.settings = true; dispatch({ type: 'UPDATE_NOTIFICATION', notification: notification }); }; }; /***/ }), /* 213 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _preview = __webpack_require__(356); var _preview2 = _interopRequireDefault(_preview); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var InsertFields = function (_Component) { _inherits(InsertFields, _Component); function InsertFields(props) { _classCallCheck(this, InsertFields); var _this = _possibleConstructorReturn(this, (InsertFields.__proto__ || Object.getPrototypeOf(InsertFields)).call(this, props)); _this.closeModal = _this.closeModal.bind(_this); _this.openModal = _this.openModal.bind(_this); _this.groupId = !_.isUndefined(_this.props.group) ? _this.props.group : ''; _this.actionText = !_this.groupId ? (0, _utils.translate)('Insert Fields') : (0, _utils.translate)('Add fields to group'); return _this; } _createClass(InsertFields, [{ key: 'closeModal', value: function closeModal() { this.props.actions.modalActions.showModal({ open: false, title: this.actionText, groupId: this.groupId }, 'insert-fields'); } }, { key: 'openModal', value: function openModal() { this.props.actions.modalActions.showModal({ open: true, title: this.actionText, closeModal: this.closeModal, id: 'insert-fields', groupId: this.groupId, activeElement: jQuery(document.activeElement), focusFirst: '.modal-close-button' }, 'insert-fields'); } }, { key: 'render', value: function render() { var buttonColor = 'pdf-form' === this.props.formType ? 'blue' : 'purple'; if (this.props.header === 'true') { return _react2.default.createElement( 'div', { className: 'sui-box-header fui-builder-section--insert' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-' + buttonColor + ' forminator-open-insert-fields', onClick: this.openModal }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), this.actionText ) ); } var emptyContent = void 0; if (this.props.wrappers.length === 0 && !this.groupId && 'pdf-form' !== this.props.formType) { emptyContent = _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'p', { className: 'sui-block-content-center' }, _react2.default.createElement( 'small', null, (0, _utils.translate)('A form without fields isn’t going to be very useful…' + ' Add your first field above!') ) ) ); } return _react2.default.createElement( 'div', { className: 'fui-builder-fields--footer' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-dashed forminator-open-insert-fields', onClick: this.openModal }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), this.actionText ), emptyContent ); } }]); return InsertFields; }(_react.Component); exports.default = InsertFields; /***/ }), /* 214 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ModalImage = function (_Component) { _inherits(ModalImage, _Component); function ModalImage(props) { _classCallCheck(this, ModalImage); return _possibleConstructorReturn(this, (ModalImage.__proto__ || Object.getPrototypeOf(ModalImage)).call(this, props)); } _createClass(ModalImage, [{ key: 'render', value: function render() { var image = this.props.filename ? this.props.filename : ''; var getclass = 'sui-box-banner'; var getalt = (0, _utils.translate)('Forminator image'); if (!_.isUndefined(this.props.logo) && true === this.props.logo) { getclass = 'sui-box-logo'; } if (!_.isUndefined(this.props.alt) && '' !== this.props.alt) { getalt = this.props.alt; } return _react2.default.createElement( 'figure', { className: getclass, 'aria-hidden': 'true' }, _react2.default.createElement('img', { src: forminatorData.imagesUrl + '/' + image + '.png', srcSet: forminatorData.imagesUrl + '/' + image + '.png 1x,\n\t\t\t\t\t' + forminatorData.imagesUrl + '/' + image + '@2x.png 2x', alt: getalt }) ); } }]); return ModalImage; }(_react.Component); exports.default = ModalImage; /***/ }), /* 215 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(168), root = __webpack_require__(118); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /* 216 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(118); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /* 217 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(364), baseKeys = __webpack_require__(452), isArrayLike = __webpack_require__(368); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }), /* 218 */ /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /* 219 */ /***/ (function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /* 220 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(360); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = freeModule && freeModule.require && freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(65)(module))) /***/ }), /* 221 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /* 222 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(364), baseKeysIn = __webpack_require__(455), isArrayLike = __webpack_require__(368); /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } module.exports = keysIn; /***/ }), /* 223 */ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(460), stubArray = __webpack_require__(369); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /* 224 */ /***/ (function(module, exports, __webpack_require__) { var DataView = __webpack_require__(464), Map = __webpack_require__(215), Promise = __webpack_require__(465), Set = __webpack_require__(466), WeakMap = __webpack_require__(467), baseGetTag = __webpack_require__(196), toSource = __webpack_require__(361); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /* 225 */ /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__(470); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /* 226 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Validation = function (_Component) { _inherits(Validation, _Component); function Validation(props) { _classCallCheck(this, Validation); var _this = _possibleConstructorReturn(this, (Validation.__proto__ || Object.getPrototypeOf(Validation)).call(this, props)); var prefix = !_.isUndefined(_this.props.prefix) ? _this.props.prefix + '_' : ''; _this.validProp = prefix + 'validation'; _this.validTextProp = prefix + 'validation_message'; return _this; } _createClass(Validation, [{ key: 'toggleValue', value: function toggleValue(value) { this.props.updateProperty(this.validProp, value); } }, { key: 'render', value: function render() { var _this2 = this; var validation = _.isUndefined(this.props.state[this.validProp]) ? false : this.props.state[this.validProp]; var validationText = _.isUndefined(this.props.state[this.validTextProp]) ? '' : this.props.state[this.validTextProp]; return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Validate') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Make sure the user has filled out this field correctly ' + "and warn them when they haven't.") ), _react2.default.createElement( 'div', { className: 'sui-side-tabs', style: { marginTop: '10px' } }, _react2.default.createElement( 'div', { className: 'sui-tabs-menu' }, _react2.default.createElement( 'div', { className: 'sui-tab-item' + (!validation ? ' active' : ''), onClick: this.toggleValue.bind(this, false) }, (0, _utils.translate)('None') ), _react2.default.createElement( 'div', { className: 'sui-tab-item' + (validation ? ' active' : ''), onClick: this.toggleValue.bind(this, true) }, (0, _utils.translate)('Validate Field') ) ), _react2.default.createElement( 'div', { className: 'sui-tabs-content' }, _react2.default.createElement( 'div', { className: 'sui-tab-content sui-tab-boxed' + (validation ? ' active' : '') }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { htmlFor: 'forminator-field-name-error-msg', className: 'sui-label' }, (0, _utils.translate)('Validation message') ), _react2.default.createElement('input', { type: 'text', id: 'forminator-field-name-error-msg', className: 'sui-form-control', placeholder: (0, _utils.translate)('Enter validation message'), value: validationText, onChange: function onChange(e) { _this2.props.updateProperty(_this2.validTextProp, e.target.value); } }) ) ) ) ) ) ); } }]); return Validation; }(_react.Component); exports.default = Validation; /***/ }), /* 227 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var HiddenBehavior = function (_Component) { _inherits(HiddenBehavior, _Component); function HiddenBehavior(props) { _classCallCheck(this, HiddenBehavior); return _possibleConstructorReturn(this, (HiddenBehavior.__proto__ || Object.getPrototypeOf(HiddenBehavior)).call(this, props)); } _createClass(HiddenBehavior, [{ key: 'render', value: function render() { return _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'hidden_behavior', defaultValue: 'ignore', label: (0, _utils.translate)('When this field is hidden, should its value be null (zero), or should the field be ignored in calculations?'), noWrapper: true }), _react2.default.createElement( 'span', { value: 'zero' }, (0, _utils.translate)('Null (zero)') ), _react2.default.createElement( 'span', { value: 'ignore' }, (0, _utils.translate)('Ignore this field') ) ); } }]); return HiddenBehavior; }(_react.Component); exports.default = HiddenBehavior; /***/ }), /* 228 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _multiOption = __webpack_require__(505); var _multiOption2 = _interopRequireDefault(_multiOption); var _checkbox = __webpack_require__(41); var _checkbox2 = _interopRequireDefault(_checkbox); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); var _suiVariablesBulkEditor = __webpack_require__(506); var _suiVariablesBulkEditor2 = _interopRequireDefault(_suiVariablesBulkEditor); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MultiValue = function (_Component) { _inherits(MultiValue, _Component); function MultiValue(props) { _classCallCheck(this, MultiValue); var _this = _possibleConstructorReturn(this, (MultiValue.__proto__ || Object.getPrototypeOf(MultiValue)).call(this, props)); _this.addOption = _this.addOption.bind(_this); _this.removeOption = _this.removeOption.bind(_this); _this.updateLabel = _this.updateLabel.bind(_this); _this.updateValue = _this.updateValue.bind(_this); _this.updateLimit = _this.updateLimit.bind(_this); _this.updateDefault = _this.updateDefault.bind(_this); _this.updateImage = _this.updateImage.bind(_this); _this.updateBulkValue = _this.updateBulkValue.bind(_this); var isBulkEdit = !_.isUndefined(_this.props.state.bulk_edit) ? _this.props.state.bulk_edit : false; _this.state = { options: !_.isUndefined(_this.props.state.options) ? [].concat(_toConsumableArray(_this.props.state.options)) : [], options_bulk_editor: !_.isUndefined(_this.props.state.options_bulk_editor) ? _this.props.state.options_bulk_editor : '', options_calcs: _this.props.state.calculations ? [].concat(_toConsumableArray(_this.props.state.options)) : [], csv_file: null, is_loading: isBulkEdit ? false : true, show_standard: false }; return _this; } _createClass(MultiValue, [{ key: 'componentDidMount', value: function componentDidMount() { var self = this; var limit_status = this.props.state.limit_status; this.runEditorFunctions(); if (!this.props.state.bulk_edit && (0 === this.state.options_bulk_editor.length || 'enable' === limit_status)) { this.convertToBulk(); } else if (this.props.state.bulk_edit && 'enable' === limit_status && !this.props.state.calculations) { this.convertToStandard(); } if (this.state.is_loading) { setTimeout(function () { self.setState({ is_loading: false, show_standard: true }); self.addOptionClassToggle(); }, 400); } } }, { key: 'getSnapshotBeforeUpdate', value: function getSnapshotBeforeUpdate(prevProps, prevState) { var self = this; var options = this.state.options; var isBulkEdit = this.props.state.bulk_edit; var is_loading = this.state.is_loading; var converTimer = void 0; var loaderTimer = void 0; if (!isBulkEdit && prevProps.state.bulk_edit && !is_loading) { this.setState({ is_loading: true }); } if (!isBulkEdit && is_loading) { var delay = options.length < 50 ? 400 : 700; clearTimeout(loaderTimer); loaderTimer = setTimeout(function () { self.setState({ is_loading: false, show_standard: true }); }, delay); } clearTimeout(converTimer); if (isBulkEdit && this.props.state.options_bulk_editor !== prevProps.state.options_bulk_editor) { converTimer = setTimeout(function () { self.convertToStandard(); }, 500); } else if (!isBulkEdit && this.props.state.options !== prevProps.state.options) { converTimer = setTimeout(function () { self.convertToBulk(); }, 500); } return null; } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { if (this.props.state.bulk_edit !== prevProps.state.bulk_edit || !this.state.is_loading && !this.props.state.bulk_edit) { this.runEditorFunctions(); this.addOptionClassToggle(); } if (this.state.options_bulk_editor !== prevState.options_bulk_editor || this.props.state.options_expanded !== prevProps.state.options_expanded) { this.addOptionClassToggle(); } } }, { key: 'runEditorFunctions', value: function runEditorFunctions() { var self = this; var isBulkEdit = this.props.state.bulk_edit; var is_loading = this.state.is_loading; this.$el = jQuery(this.el); this.$importError = this.$el.find('.importer-error'); if (!isBulkEdit && !is_loading) { this.moveOption = this.moveOption.bind(this); var firstSort = true; this.$el.find('.fui-multi-options').sortable({ helper: 'clone', start: function start(e, ui) { if (firstSort) { self.$el.find('.fui-multi-options').sortable('refreshPositions'); firstSort = false; } }, stop: function stop(e, ui) { var to = ui.item.index(); self.$el.find('.fui-multi-options').sortable('cancel'); var from = ui.item.index(); self.moveOption(from, to); } }); } if (isBulkEdit) { self.setState({ show_standard: false }); if (!window.File || !window.FileReader || !window.FileList || !window.Blob) { this.showError((0, _utils.translate)('The File APIs are not fully supported in this browser. You may copy and paste your options on the text area above or switch to a modern browser to use the importer.')); } // Upload csv var uploadCsvBtn = this.$el.find('.upload-csv-btn'); var importCsvBtn = this.$el.find('.import-csv-btn'); var uploadedFile = this.$el.find('.uploaded-csv-file'); var removeFile = uploadedFile.find('.remove-file'); var inputFile = this.$el.find('#upload-csv-input'); this.$el.find('.upload-csv-btn, .uploaded-csv-file > span').on('click', function () { inputFile.trigger('click'); self.hideError(); }); // Remove file removeFile.on('click', function () { inputFile.val('').trigger('change'); }); inputFile.on('change', function () { var inputVal = inputFile.val(); if (inputVal.length > 0) { self.setState({ csv_file: inputFile.get(0).files[0] }); var inputValExt = inputVal.slice((inputVal.lastIndexOf(".") - 1 >>> 0) + 2); if ('csv' !== inputValExt) { removeFile.trigger('click'); self.showError((0, _utils.translate)('Whoops, only .csv filetype is allowed.')); } else { importCsvBtn.prop('disabled', false); uploadCsvBtn.hide(); uploadedFile.show(); // Get filename uploadedFile.find('> span').html(inputVal.replace(/^.*[\\\/]/, '')); if (0 !== self.props.state.options_bulk_editor.length) { self.showError((0, _utils.translate)('Importing this will replace your current options. Click import to continue.'), 'warning'); } } } else { importCsvBtn.prop('disabled', true); uploadCsvBtn.show(); uploadedFile.hide(); uploadedFile.find('> span').html(''); self.hideError(); } }); importCsvBtn.on('click', function () { self.importCsv(); }); } } }, { key: 'importCsv', value: function importCsv() { if (!window.File || !window.FileReader || !window.FileList || !window.Blob) { return; } var self = this; var inputFile = this.$el.find('#upload-csv-input'); var csvFile = this.state.csv_file; if (!inputFile.get(0).files) { self.showError((0, _utils.translate)("This browser doesn't seem to support the `files` property of file inputs.")); } else { var file = csvFile; var fr = new FileReader(); // Reset the state here to prevent reupload bug this.setState({ options_bulk_editor: '' }); fr.onload = function () { var result = fr.result; // Remove column headers from our sample template if (-1 !== result.indexOf('Option label; Option value')) { result = result.substring(result.indexOf("\n") + 1); } self.props.updateProperty('options_bulk_editor', result); self.setState({ options_bulk_editor: result }); self.convertToStandard(); }; fr.readAsText(file); // Reset this.setState({ csv_file: null }); inputFile.trigger('change'); } } }, { key: 'showError', value: function showError(msg) { var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'error'; if ('error' !== type) { this.$importError.removeClass('sui-notice-error').addClass('sui-notice-' + type); } else { this.$importError.removeClass().addClass('importer-error sui-notice sui-notice-error'); } this.$importError.find('p').text(msg); this.$importError.addClass('sui-active'); this.$importError.show(); } }, { key: 'hideError', value: function hideError() { this.$importError.find('p').text(''); this.$importError.removeClass('sui-active'); this.$importError.hide(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { jQuery('#forminator-modal').off('scroll'); this.$el.off().removeData(); } }, { key: 'updateState', value: function updateState(state) { this.setState({ options: state }); this.props.updateProperty('options', state); this.convertToBulk(); } }, { key: 'updateLabel', value: function updateLabel(index, value) { var newState = this.state.options; newState[index].label = value; this.updateState(newState); } }, { key: 'updateLimit', value: function updateLimit(index, value) { var newState = this.state.options; newState[index].limit = value; this.updateState(newState); } }, { key: 'updateValue', value: function updateValue(index, value) { var newState = this.state.options; newState[index].value = value; this.updateState(newState); } }, { key: 'moveOption', value: function moveOption(from, to) { var newState = this.state.options; newState.splice(to, 0, newState.splice(from, 1)[0]); this.updateState(newState); } }, { key: 'updateDefault', value: function updateDefault(index, value) { var newState = this.state.options; // Clear default for all options if radio if (this.props.isRadio && this.props.isRadio === 'true') { _.map(newState, function (option, i) { newState[i].default = false; }); } // Set default for selected option newState[index].default = value; this.updateState(newState); } }, { key: 'removeOption', value: function removeOption(index) { var newState = this.state.options; newState.splice(index, 1); this.updateState(newState); } }, { key: 'updateImage', value: function updateImage(index, value, property) { var newState = this.state.options; if (property === 'image') { newState[index].image = value; } if (property !== 'image') { newState[index].image_filename = value; } this.updateState(newState); } }, { key: 'addOption', value: function addOption() { var newState = this.state.options; var uniqId = (0, _utils.randNumber)() + '-' + (0, _utils.randNumber)(); newState.push({ label: '', value: '', limit: '', default: false, key: uniqId }); this.updateState(newState); this.scrollToNewOpt(); } }, { key: 'scrollToNewOpt', value: function scrollToNewOpt() { var standardEditor = jQuery('.standard-editor'); var timer = void 0; clearTimeout(timer); timer = setTimeout(function () { standardEditor.animate({ scrollTop: standardEditor.prop("scrollHeight") }, 300); }, 200); } }, { key: 'addOptionClassToggle', value: function addOptionClassToggle() { var timer = void 0; clearTimeout(timer); timer = setTimeout(function () { var addOptionBox = jQuery('.standard-editor').next('.fui-multi-options'); if (jQuery('.standard-editor').outerHeight() > 460) { addOptionBox.addClass('add-option-box'); } else { addOptionBox.removeClass('add-option-box'); } }, 50); } }, { key: 'generateUniqId', value: function generateUniqId() { var uniqId = (0, _utils.randNumber)() + '-' + (0, _utils.randNumber)(); return uniqId; } }, { key: 'updateBulkValue', value: function updateBulkValue() { var editorValue = this.state.options_bulk_editor; this.setState({ options_bulk_editor: editorValue }); return editorValue; } }, { key: 'convertToBulk', value: function convertToBulk() { var options = this.state.options; var fieldType = this.props.state.type; var valueType = this.props.state.value_type; var bulkEditorValue = ''; var hasDefault = false; { _.map(options, function (option, i) { if (i > 0) { bulkEditorValue += '\n'; } var optionLabel = option.label; var optionValue = option.value; bulkEditorValue += optionLabel; bulkEditorValue += ';'; if (!_.isUndefined(optionValue)) { // remove start and end spaces bulkEditorValue += optionValue; } else if (!_.isUndefined(optionLabel)) { // replace spaces with hyphen bulkEditorValue += optionLabel; } else { bulkEditorValue += ''; } // Set the option default if (_.isUndefined(option.default) || !option.default || ('radio' === fieldType || 'select' === fieldType && 'single' === valueType) && hasDefault) { bulkEditorValue += '; '; bulkEditorValue += '0'; } else if (option.default) { bulkEditorValue += '; '; bulkEditorValue += '1'; hasDefault = true; } if ('select' === fieldType) { if (!_.isUndefined(option.limit) && !_.isEmpty(option.limit)) { bulkEditorValue += '; '; bulkEditorValue += option.limit; } } else { if (!_.isUndefined(option.image) && !_.isEmpty(option.image)) { bulkEditorValue += '; '; bulkEditorValue += option.image; } } }); } this.setState({ options_bulk_editor: bulkEditorValue }); this.props.updateProperty('options_bulk_editor', bulkEditorValue); } }, { key: 'convertToStandard', value: function convertToStandard() { var _this2 = this; var fieldType = this.props.state.type; var valueType = this.props.state.value_type; var newOptions = []; var optionsBulkEditor = this.props.state.options_bulk_editor; if (!_.isUndefined(optionsBulkEditor) && optionsBulkEditor.length > 0) { var optionCounter = 0; var hasDefault = false; optionsBulkEditor = optionsBulkEditor.split(/\r\n|\r|\n/); { _.map(optionsBulkEditor, function (option, i) { if (Boolean(option)) { var optionText = option.split(';'); var optionDefault = !_.isUndefined(optionText[2]) ? true == optionText[2] : false; var optionTitle = !_.isEmpty(optionText[0]) ? optionText[0] : (0, _utils.translate)('Option ') + (optionCounter + 1); var optionValue = !_.isUndefined(optionText[1]) ? optionText[1] : ''; // Set option value hyphenated if (!_.isEmpty(optionValue)) { optionValue = optionValue; } else { optionValue = optionTitle; } newOptions[optionCounter] = { key: _this2.generateUniqId(), label: optionTitle, value: optionValue // Set default only once for radio and single select };if (('radio' === fieldType || 'select' === fieldType && 'single' === valueType) && hasDefault) { newOptions[optionCounter].default = false; } else { newOptions[optionCounter].default = optionDefault; } if (optionDefault) { hasDefault = true; } // Set image if not empty or the select field's submission limits if (!_.isEmpty(optionText[3])) { if ('select' === fieldType) { if ('enable' === _this2.props.state.limit_status) { newOptions[optionCounter].limit = optionText[3]; } } else { newOptions[optionCounter].image = optionText[3]; newOptions[optionCounter].image_filename = optionText[3].replace(/^.*[\\\/]/, ''); } } if (_this2.props.state.calculations) { var optCalc = _.find(_this2.state.options_calcs, function (opt) { return opt.label === optionTitle; }); newOptions[optionCounter].calculation = !_.isUndefined(optCalc) ? optCalc.calculation : ''; } optionCounter++; } }); } } this.setState({ options: newOptions }); this.props.updateProperty('options', newOptions); } }, { key: 'findDuplicateOptions', value: function findDuplicateOptions(options) { var msg = null; _.map(options, function (option) { var labelCount = _.filter(options, { label: option.label }).length; var valueCount = _.filter(options, { value: option.value }).length; switch (true) { case _.isEmpty(option.value): msg = "Warning! Option value is empty it won't appear in the dropdown."; option['error'] = true; break; case labelCount > 1 && valueCount > 1: msg = "Warning! You've added options with same label and value."; option['error'] = true; break; case labelCount > 1: msg = "Warning! You've added options with same label."; option['error'] = true; break; case valueCount > 1: msg = "Warning! You've added options with same value."; option['error'] = true; break; default: msg = null; option['error'] = false; break; } }); return [options, msg]; } }, { key: 'render', value: function render() { var _this3 = this; var collapseOptionsText = _.isUndefined(this.props.state.options_expanded) || !this.props.state.options_expanded ? (0, _utils.translate)('Expand All') : (0, _utils.translate)('Collapse All'); var bulkEdit = _.isUndefined(this.props.state.bulk_edit) ? false : this.props.state.bulk_edit; var fieldType = this.props.state.type; var downloadFile = 'select' !== fieldType ? 'checkbox_radio_bulk_template.csv' : 'select_bulk_template.csv'; var _findDuplicateOptions = this.findDuplicateOptions(this.state.options), _findDuplicateOptions2 = _slicedToArray(_findDuplicateOptions, 2), options = _findDuplicateOptions2[0], error_msg = _findDuplicateOptions2[1]; var bulkEditorValue = this.state.options_bulk_editor; var is_loading = this.state.is_loading; var show_standard = this.state.show_standard; var optionsWarning = options.length > 1000 ? true : false; var noOptionClass = 0 === options.length ? 'no-option' : ''; var fieldTypeTranslated = ''; switch (fieldType) { case 'select': fieldTypeTranslated = (0, _utils.translate)('Select'); break; case 'radio': fieldTypeTranslated = (0, _utils.translate)('Radio'); break; case 'checkbox': fieldTypeTranslated = (0, _utils.translate)('Checkbox'); break; } var bulkInstruction = (0, _utils.translate)('Label; value; selection (0 or 1); image-url'); if ('select' === fieldType) { if ('enable' === this.props.state.limit_status) { bulkInstruction = (0, _utils.translate)('Label; value; selection (0 or 1); submission limit'); } else { bulkInstruction = (0, _utils.translate)('Label; value; selection (0 or 1)'); } } // Need to add the file name here too to prevent html from appearing in downloaded csv file var downloadUrl = forminatorData.pluginUrl + 'assets/csv/' + downloadFile; return _react2.default.createElement( 'div', { id: 'demo-multi-options--radio', className: 'sui-form-field multi-options-bulk', ref: function ref(el) { return _this3.el = el; } }, optionsWarning && bulkEdit || error_msg && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-yellow sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, error_msg ? (0, _utils.translate)(error_msg) : (0, _utils.translate)("Warning! You've added more than 1000 options. " + 'Switching back to the standard (non-bulk) ' + 'editor could make your browser slow or ' + 'unresponsive. Proceed with caution.') ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement( 'label', { id: 'label-options', className: 'sui-label' }, (0, _utils.translate)('Options') ) ), _react2.default.createElement( _col2.default, { cols: '9' }, _react2.default.createElement( 'div', { className: 'switch-box' }, !bulkEdit && _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { settings: this.props.state, label: collapseOptionsText, property: 'options_expanded', itemClass: 'sui-checkbox sui-checkbox-sm collapse-options' })), 'select' !== fieldType && _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Enable Images'), property: 'enable_images', itemClass: 'sui-checkbox-sm ' })), _react2.default.createElement( 'span', { className: 'bulk-edit-toggle ' }, _react2.default.createElement(_toggle2.default, _extends({}, this.props, { settings: this.props.state, property: 'bulk_edit', label: (0, _utils.translate)('Bulk Edit'), unWrap: true })) ) ) ) ), is_loading && _react2.default.createElement( 'div', { className: 'multi-opts-preloader' }, _react2.default.createElement( 'span', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }, ' ', (0, _utils.translate)('Loading'), '...' ) ), !bulkEdit && show_standard && _react2.default.createElement( 'div', { className: 'sui-accordion sui-accordion-block' }, _react2.default.createElement( 'div', { className: 'fui-multi-options standard-editor ' + noOptionClass }, _.map(options, function (option, i) { return _react2.default.createElement(_multiOption2.default, _extends({ key: i, counter: i, option: option, removeOption: _this3.removeOption, updateValue: _this3.updateValue, updateLabel: _this3.updateLabel, updateLimit: _this3.updateLimit, updateDefault: _this3.updateDefault, updateImage: _this3.updateImage }, _this3.props)); }) ), _react2.default.createElement( 'div', { className: 'fui-multi-options' }, _react2.default.createElement( 'button', { className: 'fui-add-option', onClick: this.addOption }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add Option') ) ) ), bulkEdit && _react2.default.createElement( 'div', { className: 'fui-multi-options' }, _react2.default.createElement( 'div', { className: 'sui-box sui-message sui-message-lg fui-multi-options-bulk' }, _react2.default.createElement(_suiVariablesBulkEditor2.default, _extends({}, this.props, { settings: this.props.state, property: 'options_bulk_editor', defaultValue: bulkEditorValue, value: bulkEditorValue, updateValue: this.updateBulkValue, label: (0, _utils.translate)('Enter field options (one per line)'), description: (0, _utils.translate)('Type or paste options above (one per line and separated by semicolons) or click \n {{b}}"+ Predefined options"{{/b}} link to select an option. ' + 'Example: {{b}}' + bulkInstruction + '{{/b}}', { components: { b: _react2.default.createElement('b', null) } }) })), _react2.default.createElement( 'div', { className: 'sui-form-field bulk-importer' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Import options from CSV') ), _react2.default.createElement( 'div', { className: 'sui-upload' }, _react2.default.createElement('input', { id: 'upload-csv-input', type: 'file', value: '', readOnly: 'readonly', accept: '.csv' }), _react2.default.createElement( 'button', { className: 'sui-upload-button upload-csv-btn' }, _react2.default.createElement('span', { className: 'sui-icon-upload-cloud', 'aria-hidden': 'true' }), (0, _utils.translate)('Upload file') ), _react2.default.createElement( 'div', { className: 'sui-upload-file uploaded-csv-file' }, _react2.default.createElement('span', null), _react2.default.createElement( 'button', { className: 'remove-file', 'aria-label': 'Remove file' }, _react2.default.createElement('span', { className: 'sui-icon-close', 'aria-hidden': 'true' }) ) ), _react2.default.createElement( 'button', { role: 'button', className: 'sui-button sui-button-blue import-csv-btn', disabled: true }, _react2.default.createElement('span', { className: 'sui-icon-download-cloud', 'aria-hidden': 'true' }), (0, _utils.translate)('Import') ) ), _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-error', 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement('p', null) ) ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose a CSV (.csv) file to import field options and values.') + ' ', downloadUrl && _react2.default.createElement( 'a', { className: 'blue', href: downloadUrl, target: '_blank', download: downloadFile }, (0, _utils.translate)('Download csv template') ) ) ) ) ) ); } }]); return MultiValue; }(_react.Component); exports.default = MultiValue; /***/ }), /* 229 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var OptionsOrder = function (_Component) { _inherits(OptionsOrder, _Component); function OptionsOrder(props) { _classCallCheck(this, OptionsOrder); return _possibleConstructorReturn(this, (OptionsOrder.__proto__ || Object.getPrototypeOf(OptionsOrder)).call(this, props)); } _createClass(OptionsOrder, [{ key: 'toggleValue', value: function toggleValue(value) { this.props.updateProperty(this.requiredProp, value); } }, { key: 'render', value: function render() { var typeText = _.isUndefined(this.props.state.type) ? 'radio' : this.props.state.type; var typeCap = typeText.charAt(0).toUpperCase() + typeText.slice(1); return _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, typeCap + ' ' + (0, _utils.translate)('options display order') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('By default, ' + typeText + ' options are displayed orderly to users. However, you can use the below option to display them randomly upon refreshing the page.') ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'options_order', defaultValue: 'orderly', noWrapper: true }), _react2.default.createElement( 'div', { value: 'orderly' }, (0, _utils.translate)('Orderly') ), _react2.default.createElement( 'div', { value: 'random' }, (0, _utils.translate)('Random') ) ) ); } }]); return OptionsOrder; }(_react.Component); exports.default = OptionsOrder; /***/ }), /* 230 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactRouterDom = __webpack_require__(24); var _utils = __webpack_require__(1); var _default = __webpack_require__(231); var _default2 = _interopRequireDefault(_default); var _flat = __webpack_require__(232); var _flat2 = _interopRequireDefault(_flat); var _bold = __webpack_require__(233); var _bold2 = _interopRequireDefault(_bold); var _material = __webpack_require__(234); var _material2 = _interopRequireDefault(_material); var _basic = __webpack_require__(235); var _basic2 = _interopRequireDefault(_basic); var _none = __webpack_require__(236); var _none2 = _interopRequireDefault(_none); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var DesignStyle = function (_Component) { _inherits(DesignStyle, _Component); function DesignStyle() { _classCallCheck(this, DesignStyle); return _possibleConstructorReturn(this, (DesignStyle.__proto__ || Object.getPrototypeOf(DesignStyle)).apply(this, arguments)); } _createClass(DesignStyle, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Design Style') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)("Choose a pre-made style for your form and further customize it's appearance below.") ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'form-style', 'default': 'default' }), _react2.default.createElement( _default2.default, { value: 'default', boxClass: 'sui-tab-content sui-tab-boxed' }, (0, _utils.translate)('Default') ), _react2.default.createElement( _flat2.default, { value: 'flat', boxClass: 'sui-tab-content sui-tab-boxed' }, (0, _utils.translate)('Flat') ), _react2.default.createElement( _bold2.default, { value: 'bold', boxClass: 'sui-tab-content sui-tab-boxed' }, (0, _utils.translate)('Bold') ), _react2.default.createElement( _material2.default, { value: 'material', boxClass: 'sui-tab-content sui-tab-boxed' }, (0, _utils.translate)('Material') ), _react2.default.createElement( _none2.default, { value: 'none', boxClass: 'sui-tab-content' }, (0, _utils.translate)('None') ) ) ) ); } }]); return DesignStyle; }(_react.Component); exports.default = DesignStyle; /***/ }), /* 231 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var designDefault = function (_Component) { _inherits(designDefault, _Component); function designDefault(props) { _classCallCheck(this, designDefault); return _possibleConstructorReturn(this, (designDefault.__proto__ || Object.getPrototypeOf(designDefault)).call(this, props)); } _createClass(designDefault, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'fui-demo fui-demo--custom-form fui-demo--default' }, _react2.default.createElement( 'label', null, (0, _utils.translate)('Field Label') ), _react2.default.createElement('input', { type: 'text', placeholder: (0, _utils.translate)('Placeholder'), readOnly: 'readonly' }), _react2.default.createElement( 'label', null, (0, _utils.translate)('Field Label') ), _react2.default.createElement('input', { type: 'text', value: (0, _utils.translate)('Text'), readOnly: 'readonly' }), _react2.default.createElement( 'button', null, (0, _utils.translate)('Button') ) ); } }]); return designDefault; }(_react.Component); exports.default = designDefault; /***/ }), /* 232 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var designFlat = function (_Component) { _inherits(designFlat, _Component); function designFlat(props) { _classCallCheck(this, designFlat); return _possibleConstructorReturn(this, (designFlat.__proto__ || Object.getPrototypeOf(designFlat)).call(this, props)); } _createClass(designFlat, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'fui-demo fui-demo--custom-form fui-demo--flat' }, _react2.default.createElement( 'label', null, (0, _utils.translate)('Field Label') ), _react2.default.createElement('input', { type: 'text', placeholder: (0, _utils.translate)('Placeholder'), readOnly: 'readonly' }), _react2.default.createElement( 'label', null, (0, _utils.translate)('Field Label') ), _react2.default.createElement('input', { type: 'text', value: (0, _utils.translate)('Text'), readOnly: 'readonly' }), _react2.default.createElement( 'button', null, (0, _utils.translate)('Button') ) ); } }]); return designFlat; }(_react.Component); exports.default = designFlat; /***/ }), /* 233 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var designBold = function (_Component) { _inherits(designBold, _Component); function designBold(props) { _classCallCheck(this, designBold); return _possibleConstructorReturn(this, (designBold.__proto__ || Object.getPrototypeOf(designBold)).call(this, props)); } _createClass(designBold, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'fui-demo fui-demo--custom-form fui-demo--bold' }, _react2.default.createElement( 'label', null, (0, _utils.translate)('Field Label') ), _react2.default.createElement('input', { type: 'text', placeholder: (0, _utils.translate)('Placeholder'), readOnly: 'readonly' }), _react2.default.createElement( 'label', null, (0, _utils.translate)('Field Label') ), _react2.default.createElement('input', { type: 'text', value: (0, _utils.translate)('Text'), readOnly: 'readonly' }), _react2.default.createElement( 'button', null, (0, _utils.translate)('Button') ) ); } }]); return designBold; }(_react.Component); exports.default = designBold; /***/ }), /* 234 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var designMaterial = function (_Component) { _inherits(designMaterial, _Component); function designMaterial(props) { _classCallCheck(this, designMaterial); return _possibleConstructorReturn(this, (designMaterial.__proto__ || Object.getPrototypeOf(designMaterial)).call(this, props)); } _createClass(designMaterial, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'fui-demo fui-demo--custom-form fui-demo--material' }, _react2.default.createElement( 'div', { className: 'fui-is_empty' }, _react2.default.createElement( 'label', null, (0, _utils.translate)('Field Label') ), _react2.default.createElement('input', { type: 'text', readOnly: 'readonly' }) ), _react2.default.createElement( 'div', { className: 'fui-is_filled' }, _react2.default.createElement( 'label', null, (0, _utils.translate)('Field Label') ), _react2.default.createElement('input', { type: 'text', value: (0, _utils.translate)('Text'), readOnly: 'readonly' }) ), _react2.default.createElement( 'button', null, (0, _utils.translate)('Button') ) ); } }]); return designMaterial; }(_react.Component); exports.default = designMaterial; /***/ }), /* 235 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var DesignBasic = function (_Component) { _inherits(DesignBasic, _Component); function DesignBasic(props) { _classCallCheck(this, DesignBasic); return _possibleConstructorReturn(this, (DesignBasic.__proto__ || Object.getPrototypeOf(DesignBasic)).call(this, props)); } _createClass(DesignBasic, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'fui-demo fui-demo--custom-form fui-demo--basic' }, _react2.default.createElement( 'div', { className: 'fui-is_empty' }, _react2.default.createElement( 'label', null, (0, _utils.translate)('Field Label') ), _react2.default.createElement('input', { type: 'text', readOnly: 'readonly' }) ), _react2.default.createElement( 'div', { className: 'fui-is_filled' }, _react2.default.createElement( 'label', null, (0, _utils.translate)('Field Label') ), _react2.default.createElement('input', { type: 'text', value: (0, _utils.translate)('Text'), readOnly: 'readonly' }) ), _react2.default.createElement( 'button', null, (0, _utils.translate)('Button') ) ); } }]); return DesignBasic; }(_react.Component); exports.default = DesignBasic; /***/ }), /* 236 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var designNone = function (_Component) { _inherits(designNone, _Component); function designNone(props) { _classCallCheck(this, designNone); return _possibleConstructorReturn(this, (designNone.__proto__ || Object.getPrototypeOf(designNone)).call(this, props)); } _createClass(designNone, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('You have opted for no stylesheet to be enqueued. ' + "The form will inherit styles from your theme's CSS.") ) ) ) ); } }]); return designNone; }(_react.Component); exports.default = designNone; /***/ }), /* 237 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _qs = __webpack_require__(38); var _qs2 = _interopRequireDefault(_qs); var _axios = __webpack_require__(37); var _axios2 = _interopRequireDefault(_axios); var _utils = __webpack_require__(1); var _accordion = __webpack_require__(34); var _accordion2 = _interopRequireDefault(_accordion); var _formContainer = __webpack_require__(238); var _formContainer2 = _interopRequireDefault(_formContainer); var _fieldsBasics = __webpack_require__(239); var _fieldsBasics2 = _interopRequireDefault(_fieldsBasics); var _responseLoading = __webpack_require__(240); var _responseLoading2 = _interopRequireDefault(_responseLoading); var _responseError = __webpack_require__(241); var _responseError2 = _interopRequireDefault(_responseError); var _responseSuccess = __webpack_require__(242); var _responseSuccess2 = _interopRequireDefault(_responseSuccess); var _section = __webpack_require__(243); var _section2 = _interopRequireDefault(_section); var _inputs = __webpack_require__(244); var _inputs2 = _interopRequireDefault(_inputs); var _inputsExtra = __webpack_require__(245); var _inputsExtra2 = _interopRequireDefault(_inputsExtra); var _radio = __webpack_require__(246); var _radio2 = _interopRequireDefault(_radio); var _consent = __webpack_require__(247); var _consent2 = _interopRequireDefault(_consent); var _select = __webpack_require__(248); var _select2 = _interopRequireDefault(_select); var _dropdown = __webpack_require__(249); var _dropdown2 = _interopRequireDefault(_dropdown); var _dropdownSearch = __webpack_require__(250); var _dropdownSearch2 = _interopRequireDefault(_dropdownSearch); var _multiSelect = __webpack_require__(251); var _multiSelect2 = _interopRequireDefault(_multiSelect); var _calendarBasics = __webpack_require__(252); var _calendarBasics2 = _interopRequireDefault(_calendarBasics); var _signature = __webpack_require__(253); var _signature2 = _interopRequireDefault(_signature); var _group = __webpack_require__(254); var _group2 = _interopRequireDefault(_group); var _repeater = __webpack_require__(255); var _repeater2 = _interopRequireDefault(_repeater); var _calendarTable = __webpack_require__(256); var _calendarTable2 = _interopRequireDefault(_calendarTable); var _paginationSteps = __webpack_require__(257); var _paginationSteps2 = _interopRequireDefault(_paginationSteps); var _paginationProgress = __webpack_require__(258); var _paginationProgress2 = _interopRequireDefault(_paginationProgress); var _paginationBack = __webpack_require__(259); var _paginationBack2 = _interopRequireDefault(_paginationBack); var _paginationNext = __webpack_require__(260); var _paginationNext2 = _interopRequireDefault(_paginationNext); var _submit = __webpack_require__(261); var _submit2 = _interopRequireDefault(_submit); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _uploadedFiles = __webpack_require__(262); var _uploadedFiles2 = _interopRequireDefault(_uploadedFiles); var _rating = __webpack_require__(267); var _rating2 = _interopRequireDefault(_rating); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } //import PaginationColors from './colors/pagination'; var Colors = function (_Component) { _inherits(Colors, _Component); function Colors(props) { _classCallCheck(this, Colors); return _possibleConstructorReturn(this, (Colors.__proto__ || Object.getPrototypeOf(Colors)).call(this, props)); } _createClass(Colors, [{ key: 'componentDidMount', value: function componentDidMount() { this.loadFonts(); } }, { key: 'componentDidUpdate', value: function componentDidUpdate() { this.loadFonts(); } }, { key: 'loadFonts', value: function loadFonts() { if (!_.isUndefined(window.forminatorFonts)) { return; } var options = { isObject: true }; var data = { action: 'forminator_load_google_fonts', data: options, _wpnonce: forminatorData.gFontNonce }; _axios2.default.post(forminatorData.ajaxUrl, _qs2.default.stringify(data)).then(function (response) { window.forminatorFonts = response.data.data; }).catch(function (err) { console.log(err); }); } }, { key: 'hasIndicatorEnabled', value: function hasIndicatorEnabled(settings) { if (typeof settings['submission-indicator'] !== 'undefined' && settings['submission-indicator'] === 'show') { return true; } return false; } }, { key: 'render', value: function render() { var hasPagination = (0, _utils.hasFieldType)('page-break', this.props.wrappers); var hasSection = (0, _utils.hasFieldType)('section', this.props.wrappers); var hasSingleRadio = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'radio', 'value_type', 'radio'); var hasSingleDropdown = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'select', 'value_type', 'single'); var hasMultiCheckbox = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'checkbox', 'value_type', 'checkbox'); var hasMultiSelect = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'select', 'value_type', 'multiselect'); var hasMultiSelectModern = hasMultiSelect && (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'select', 'multiselect_style', 'modern'); var hasCheckboxInMultiSelect = hasMultiSelectModern && (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'select', 'checkbox_in_dropdown', 'show'); var hasDatePicker = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'date', 'field_type', 'picker'); var hasESign = (0, _utils.hasFieldType)('signature', this.props.wrappers); var hasGroup = (0, _utils.hasFieldType)('group', this.props.wrappers); var hasDateDropdown = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'date', 'field_type', 'select'); var hasTimeDropdown = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'time', 'field_type', 'select') || (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'time', 'time_type', 'twelve'); var hasAddresCountry = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'address', 'address_country', 'true'); var hasNamePrefix = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'name', 'prefix', 'true'); var hasGDPR = (0, _utils.hasFieldType)('gdprcheckbox', this.props.wrappers); var hasFileUpload = (0, _utils.hasFieldType)('upload', this.props.wrappers); var hasCurrency = (0, _utils.hasFieldType)('currency', this.props.wrappers); var hasStripe = (0, _utils.hasFieldType)('stripe', this.props.wrappers); var hasCalculation = (0, _utils.hasFieldType)('calculation', this.props.wrappers); var hasConsent = (0, _utils.hasFieldType)('consent', this.props.wrappers); var hasRating = (0, _utils.hasFieldType)('rating', this.props.wrappers); var postdata_multiple = (0, _utils.hasPostdataFieldWithMultiselect)(this.props.wrappers); var isPreset = !_.isUndefined(this.props.preset); var hasIndicator = isPreset || this.hasIndicatorEnabled(this.props.settings); var hasPaginationHeader = _.isUndefined(this.props.settings.paginationData) || _.isUndefined(this.props.settings.paginationData['pagination-header-design']) ? '' : this.props.settings.paginationData['pagination-header-design']; var paginationHeader = _.isUndefined(this.props.settings.paginationData) || _.isUndefined(this.props.settings.paginationData['pagination-header']) ? '' : this.props.settings.paginationData['pagination-header']; return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Colors') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Adjust the default color combinations to match your theme styling.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'cform-color-settings', 'default': '' }), _react2.default.createElement( _empty2.default, { value: '', boxClass: '' }, (0, _utils.translate)('Use Default Colors') ), _react2.default.createElement( _container2.default, { value: 'true', label: (0, _utils.translate)('Custom') }, _react2.default.createElement( 'div', { className: 'sui-accordion' }, _react2.default.createElement( 'div', { className: 'sui-accordion-header' }, _react2.default.createElement( 'div', null, (0, _utils.translate)('Element') ) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Form Container') }), _react2.default.createElement(_formContainer2.default, this.props) ), hasIndicator && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Submission Indicator') }), _react2.default.createElement(_responseLoading2.default, this.props) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Response Success') }), _react2.default.createElement( 'p', { className: 'sui-description' }, (0, _utils.translate)('Successful response message will be displayed after ' + 'form submission succeeds.') ), _react2.default.createElement(_responseSuccess2.default, this.props) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Response Error') }), _react2.default.createElement( 'p', { className: 'sui-description' }, (0, _utils.translate)('Error response message will be displayed after ' + 'form submission fails.') ), _react2.default.createElement(_responseError2.default, this.props) ), (isPreset || hasPagination && hasPaginationHeader === 'show' && paginationHeader === 'nav') && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Pagination Steps') }), _react2.default.createElement(_paginationSteps2.default, this.props) ), (isPreset || hasPagination && hasPaginationHeader === 'show' && paginationHeader === 'bar') && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Pagination Progress Bar') }), _react2.default.createElement(_paginationProgress2.default, this.props) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Fields Basics') }), _react2.default.createElement(_fieldsBasics2.default, this.props) ), hasSection && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Section') }), _react2.default.createElement(_section2.default, this.props) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Input and Textarea') }), _react2.default.createElement(_inputs2.default, this.props) ), (hasDatePicker || hasCurrency || hasStripe || hasCalculation) && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Input Extras') }), _react2.default.createElement(_inputsExtra2.default, this.props) ), (hasMultiCheckbox || hasSingleRadio || hasGDPR || hasCheckboxInMultiSelect) && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Radio and Checkbox') }), _react2.default.createElement(_radio2.default, this.props) ), (hasSingleDropdown || hasDateDropdown || hasTimeDropdown || hasAddresCountry || hasNamePrefix || hasMultiSelectModern) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Select') }), _react2.default.createElement(_select2.default, this.props) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Dropdown List') }), _react2.default.createElement(_dropdown2.default, this.props) ) ), hasAddresCountry && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Dropdown Search') }), _react2.default.createElement(_dropdownSearch2.default, this.props) ), (hasMultiSelect || postdata_multiple) && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Multi Select') }), _react2.default.createElement(_multiSelect2.default, this.props) ), hasRating && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Rating') }), _react2.default.createElement(_rating2.default, this.props) ), hasDatePicker && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Calendar Basics') }), _react2.default.createElement(_calendarBasics2.default, this.props) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Calendar Table') }), _react2.default.createElement(_calendarTable2.default, this.props) ) ), hasFileUpload && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('File Upload'), boxedContent: false }), _react2.default.createElement(_uploadedFiles2.default, this.props) ), hasESign && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('E-Signature') }), _react2.default.createElement(_signature2.default, this.props) ) ), hasGroup && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Field Group') }), _react2.default.createElement(_group2.default, this.props) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Repeater Button'), boxedContent: false }), _react2.default.createElement(_repeater2.default, this.props) ) ), hasPagination && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Button Back') }), _react2.default.createElement(_paginationBack2.default, this.props) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Button Next') }), _react2.default.createElement(_paginationNext2.default, this.props) ) ), hasConsent && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Consent') }), _react2.default.createElement(_consent2.default, this.props) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Submit Button') }), _react2.default.createElement(_submit2.default, this.props) ) ) ) ) ) ); } }]); return Colors; }(_react.Component); exports.default = Colors; /***/ }), /* 238 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var BasicColors = function (_Component) { _inherits(BasicColors, _Component); function BasicColors(props) { _classCallCheck(this, BasicColors); return _possibleConstructorReturn(this, (BasicColors.__proto__ || Object.getPrototypeOf(BasicColors)).call(this, props)); } _createClass(BasicColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#00000000"), property: (0, _utils.getThemePrefix)(this.props) + 'cform-form-border', label: (0, _utils.translate)('Border color'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#00000000"), property: (0, _utils.getThemePrefix)(this.props) + 'cform-form-background', label: (0, _utils.translate)('Background color'), isAlpha: true })) ); } }]); return BasicColors; }(_react.Component); exports.default = BasicColors; /***/ }), /* 239 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var GlobalColors = function (_Component) { _inherits(GlobalColors, _Component); function GlobalColors(props) { _classCallCheck(this, GlobalColors); return _possibleConstructorReturn(this, (GlobalColors.__proto__ || Object.getPrototypeOf(GlobalColors)).call(this, props)); } _createClass(GlobalColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), property: (0, _utils.getThemePrefix)(this.props) + 'cform-label-color', label: (0, _utils.translate)('Label') })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562"), property: (0, _utils.getThemePrefix)(this.props) + 'cform-asterisk-color', label: (0, _utils.translate)('Required asterisk') })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), property: (0, _utils.getThemePrefix)(this.props) + 'label-helper-color', label: (0, _utils.translate)('Description') })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#F9E4E8"), property: (0, _utils.getThemePrefix)(this.props) + 'label-validation-background', label: (0, _utils.translate)('Error message BG'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562"), property: (0, _utils.getThemePrefix)(this.props) + 'label-validation-color', label: this.props.formDesign !== 'material' ? (0, _utils.translate)('Error message color') : (0, _utils.translate)('Global error color'), description: this.props.formDesign === 'material' ? (0, _utils.translate)('This color will be used when fields throw an ' + 'error as text color, border color, etc.') : '' })) ); } }]); return GlobalColors; }(_react.Component); exports.default = GlobalColors; /***/ }), /* 240 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ResponseLoadingColors = function (_Component) { _inherits(ResponseLoadingColors, _Component); function ResponseLoadingColors(props) { _classCallCheck(this, ResponseLoadingColors); return _possibleConstructorReturn(this, (ResponseLoadingColors.__proto__ || Object.getPrototypeOf(ResponseLoadingColors)).call(this, props)); } _createClass(ResponseLoadingColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#F8F8F8"), property: (0, _utils.getThemePrefix)(this.props) + 'response-loading-background', label: (0, _utils.translate)('Background color'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#666666"), property: (0, _utils.getThemePrefix)(this.props) + 'response-loading-color', label: (0, _utils.translate)('Text color') })) ); } }]); return ResponseLoadingColors; }(_react.Component); exports.default = ResponseLoadingColors; /***/ }), /* 241 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ResponseErrorColors = function (_Component) { _inherits(ResponseErrorColors, _Component); function ResponseErrorColors(props) { _classCallCheck(this, ResponseErrorColors); return _possibleConstructorReturn(this, (ResponseErrorColors.__proto__ || Object.getPrototypeOf(ResponseErrorColors)).call(this, props)); } _createClass(ResponseErrorColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562"), property: (0, _utils.getThemePrefix)(this.props) + 'response-error-border', label: (0, _utils.translate)('Border color'), isAlpha: true })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#F9E4E8"), property: (0, _utils.getThemePrefix)(this.props) + 'response-error-background', label: (0, _utils.translate)('Background color'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#333333"), property: (0, _utils.getThemePrefix)(this.props) + 'response-error-color', label: (0, _utils.translate)('Text color') })) ); } }]); return ResponseErrorColors; }(_react.Component); exports.default = ResponseErrorColors; /***/ }), /* 242 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ResponseSuccessColors = function (_Component) { _inherits(ResponseSuccessColors, _Component); function ResponseSuccessColors(props) { _classCallCheck(this, ResponseSuccessColors); return _possibleConstructorReturn(this, (ResponseSuccessColors.__proto__ || Object.getPrototypeOf(ResponseSuccessColors)).call(this, props)); } _createClass(ResponseSuccessColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#1ABCA1"), property: (0, _utils.getThemePrefix)(this.props) + 'response-success-border', label: (0, _utils.translate)('Border color'), isAlpha: true })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#BCEEE6"), property: (0, _utils.getThemePrefix)(this.props) + 'response-success-background', label: (0, _utils.translate)('Background color'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#333333"), property: (0, _utils.getThemePrefix)(this.props) + 'response-success-color', label: (0, _utils.translate)('Text color') })) ); } }]); return ResponseSuccessColors; }(_react.Component); exports.default = ResponseSuccessColors; /***/ }), /* 243 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SectionColors = function (_Component) { _inherits(SectionColors, _Component); function SectionColors(props) { _classCallCheck(this, SectionColors); return _possibleConstructorReturn(this, (SectionColors.__proto__ || Object.getPrototypeOf(SectionColors)).call(this, props)); } _createClass(SectionColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Title color'), property: (0, _utils.getThemePrefix)(this.props) + 'cform-title-color', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#333333") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Subtitle color'), property: (0, _utils.getThemePrefix)(this.props) + 'cform-subtitle-color', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#333333") })) ); } }]); return SectionColors; }(_react.Component); exports.default = SectionColors; /***/ }), /* 244 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var InputsColors = function (_Component) { _inherits(InputsColors, _Component); function InputsColors(props) { _classCallCheck(this, InputsColors); return _possibleConstructorReturn(this, (InputsColors.__proto__ || Object.getPrototypeOf(InputsColors)).call(this, props)); } _createClass(InputsColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Default'), value: 'default' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'input-border', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), isAlpha: true })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'input-bg', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#EDEDED"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Placeholder'), property: (0, _utils.getThemePrefix)(this.props) + 'input-placeholder', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#888888") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'input-color', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Hover'), value: 'hover' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'input-border-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'input-hover-bg', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E6E6E6"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'input-hover-color', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Focus'), value: 'focus' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'input-border-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'input-active-bg', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E6E6E6"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'input-active-color', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000") })) ), this.props.formDesign !== 'material' && _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Error'), value: 'error' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562"), property: (0, _utils.getThemePrefix)(this.props) + 'input-border-error', label: (0, _utils.translate)('Border color'), isAlpha: true })) ) ); } }]); return InputsColors; }(_react.Component); exports.default = InputsColors; /***/ }), /* 245 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var InputExtraColors = function (_Component) { _inherits(InputExtraColors, _Component); function InputExtraColors(props) { _classCallCheck(this, InputExtraColors); return _possibleConstructorReturn(this, (InputExtraColors.__proto__ || Object.getPrototypeOf(InputExtraColors)).call(this, props)); } _createClass(InputExtraColors, [{ key: 'render', value: function render() { var hasDatePicker = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'date', 'field_type', 'picker'); var hasCalculation = (0, _utils.hasFieldType)('calculation', this.props.wrappers); var hasCurrency = (0, _utils.hasFieldType)('currency', this.props.wrappers); var hasStripe = (0, _utils.hasFieldType)('stripe', this.props.wrappers); var content = _react2.default.createElement( _react2.default.Fragment, null, (hasDatePicker || hasStripe) && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { property: (0, _utils.getThemePrefix)(this.props) + 'input-icon', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), label: (0, _utils.translate)('Icon color') })), hasCalculation && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { property: (0, _utils.getThemePrefix)(this.props) + 'prefix-color', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000"), label: (0, _utils.translate)('Prefix color') })), (hasCurrency || hasCalculation) && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { property: (0, _utils.getThemePrefix)(this.props) + 'suffix-color', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000"), label: (0, _utils.translate)('Suffix color') })) ); if (hasStripe) { content = _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Default'), value: 'default' }, (hasDatePicker || hasStripe) && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { property: (0, _utils.getThemePrefix)(this.props) + 'input-icon', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), label: (0, _utils.translate)('Icon color') })), hasCalculation && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { property: (0, _utils.getThemePrefix)(this.props) + 'prefix-color', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000"), label: (0, _utils.translate)('Prefix color') })), (hasCurrency || hasCalculation) && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { property: (0, _utils.getThemePrefix)(this.props) + 'suffix-color', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000"), label: (0, _utils.translate)('Suffix color') })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Hover'), value: 'hover' }, hasStripe && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { property: (0, _utils.getThemePrefix)(this.props) + 'input-icon-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), label: (0, _utils.translate)('Icon color') })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Focus'), value: 'focus' }, hasStripe && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { property: (0, _utils.getThemePrefix)(this.props) + 'input-icon-focus', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), label: (0, _utils.translate)('Icon color') })) ) ); } return content; } }]); return InputExtraColors; }(_react.Component); exports.default = InputExtraColors; /***/ }), /* 246 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var RadioColors = function (_Component) { _inherits(RadioColors, _Component); function RadioColors(props) { _classCallCheck(this, RadioColors); return _possibleConstructorReturn(this, (RadioColors.__proto__ || Object.getPrototypeOf(RadioColors)).call(this, props)); } _createClass(RadioColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Default'), value: 'default' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), property: (0, _utils.getThemePrefix)(this.props) + 'radio-border-static', label: (0, _utils.translate)('Border color'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'radio-background-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#EDEDED"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'radio-label', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000") })), this.props.formDesign !== 'flat' || this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Image border'), property: (0, _utils.getThemePrefix)(this.props) + 'radio-image-border-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), isAlpha: true })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Image background'), property: (0, _utils.getThemePrefix)(this.props) + 'radio-image-background', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#EDEDED"), isAlpha: true })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Checked'), value: 'checked' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'radio-border-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'radio-background-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#EDEDED"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'radio-icon', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3") })), this.props.formDesign !== 'flat' || this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Image border'), property: (0, _utils.getThemePrefix)(this.props) + 'radio-image-border-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Image background'), property: (0, _utils.getThemePrefix)(this.props) + 'radio-image-background-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E1F6FF"), isAlpha: true })) ), this.props.formDesign !== 'material' && _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Error'), value: 'error' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562"), property: (0, _utils.getThemePrefix)(this.props) + 'radio-border-error', label: (0, _utils.translate)('Border color'), isAlpha: true })), this.props.formDesign === 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'radio-background-error', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#F9E4E8"), isAlpha: true })) ) ); } }]); return RadioColors; }(_react.Component); exports.default = RadioColors; /***/ }), /* 247 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ConsentColors = function (_Component) { _inherits(ConsentColors, _Component); function ConsentColors(props) { _classCallCheck(this, ConsentColors); return _possibleConstructorReturn(this, (ConsentColors.__proto__ || Object.getPrototypeOf(ConsentColors)).call(this, props)); } _createClass(ConsentColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Default'), value: 'default' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), property: (0, _utils.getThemePrefix)(this.props) + 'consent-cbox-border-static', label: (0, _utils.translate)('Border color'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'consent-cbox-background-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#EDEDED"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'consent-cbox-label', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Checked'), value: 'checked' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'consent-cbox-border-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'consent-cbox-background-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#EDEDED"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'consent-cbox-icon', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3") })) ), this.props.formDesign !== 'material' && _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Error'), value: 'error' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562"), property: (0, _utils.getThemePrefix)(this.props) + 'consent-cbox-border-error', label: (0, _utils.translate)('Border color'), isAlpha: true })), this.props.formDesign === 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'consent-cbox-background-error', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#F9E4E8"), isAlpha: true })) ) ); } }]); return ConsentColors; }(_react.Component); exports.default = ConsentColors; /***/ }), /* 248 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SelectColors = function (_Component) { _inherits(SelectColors, _Component); function SelectColors(props) { _classCallCheck(this, SelectColors); return _possibleConstructorReturn(this, (SelectColors.__proto__ || Object.getPrototypeOf(SelectColors)).call(this, props)); } _createClass(SelectColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Default'), value: 'default' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'select-border-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'select-background-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#EDEDED"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'select-icon-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'select-value-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Hover'), value: 'hover' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'select-border-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'select-background-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E6E6E6"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'select-icon-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'select-value-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Focus'), value: 'focus' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'select-border-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'select-background-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E6E6E6"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'select-icon-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'select-value-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000") })) ), this.props.formDesign !== 'material' && _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Error'), value: 'error' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'select-border-error', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562"), isAlpha: true })) ) ); } }]); return SelectColors; }(_react.Component); exports.default = SelectColors; /***/ }), /* 249 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var DropdownColors = function (_Component) { _inherits(DropdownColors, _Component); function DropdownColors(props) { _classCallCheck(this, DropdownColors); return _possibleConstructorReturn(this, (DropdownColors.__proto__ || Object.getPrototypeOf(DropdownColors)).call(this, props)); } _createClass(DropdownColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Default'), value: 'default' }, this.props.formDesign !== 'flat' && this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), property: (0, _utils.getThemePrefix)(this.props) + 'dropdown-border', label: (0, _utils.translate)('Container border'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E6E6E6"), property: (0, _utils.getThemePrefix)(this.props) + 'dropdown-background', label: (0, _utils.translate)('Container BG'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), property: (0, _utils.getThemePrefix)(this.props) + 'dropdown-option-color-static', label: (0, _utils.translate)('Option color') })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Hover'), value: 'hover' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#DDDDDD"), property: (0, _utils.getThemePrefix)(this.props) + 'dropdown-option-background-hover', label: (0, _utils.translate)('Option background'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000"), property: (0, _utils.getThemePrefix)(this.props) + 'dropdown-option-color-hover', label: (0, _utils.translate)('Option color') })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Selected'), value: 'selected' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), property: (0, _utils.getThemePrefix)(this.props) + 'dropdown-option-background-active', label: (0, _utils.translate)('Option background'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF"), property: (0, _utils.getThemePrefix)(this.props) + 'dropdown-option-color-active', label: (0, _utils.translate)('Option color') })) ) ); } }]); return DropdownColors; }(_react.Component); exports.default = DropdownColors; /***/ }), /* 250 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SearchColors = function (_Component) { _inherits(SearchColors, _Component); function SearchColors(props) { _classCallCheck(this, SearchColors); return _possibleConstructorReturn(this, (SearchColors.__proto__ || Object.getPrototypeOf(SearchColors)).call(this, props)); } _createClass(SearchColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, this.props.formDesign !== 'flat' && this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), property: (0, _utils.getThemePrefix)(this.props) + 'dropdown-search-border', label: (0, _utils.translate)('Border color'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF"), property: (0, _utils.getThemePrefix)(this.props) + 'dropdown-search-background', label: (0, _utils.translate)('Background color'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000"), property: (0, _utils.getThemePrefix)(this.props) + 'dropdown-search-color', label: (0, _utils.translate)('Text color') })) ); } }]); return SearchColors; }(_react.Component); exports.default = SearchColors; /***/ }), /* 251 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MultiSelectColors = function (_Component) { _inherits(MultiSelectColors, _Component); function MultiSelectColors(props) { _classCallCheck(this, MultiSelectColors); return _possibleConstructorReturn(this, (MultiSelectColors.__proto__ || Object.getPrototypeOf(MultiSelectColors)).call(this, props)); } _createClass(MultiSelectColors, [{ key: 'render', value: function render() { var hasMultiSelectModernStyle = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'select', 'multiselect_style', 'modern'); var hasMultiSelectStandardStyle = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'select', 'multiselect_style', 'standard'); // For backward compatibility. if (false === hasMultiSelectModernStyle && false === hasMultiSelectStandardStyle) { hasMultiSelectStandardStyle = true; } return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Default'), value: 'default' }, hasMultiSelectStandardStyle && _react2.default.createElement( _settingsRow2.default, null, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), property: (0, _utils.getThemePrefix)(this.props) + 'multiselect-border', label: this.props.formDesign !== 'material' ? (0, _utils.translate)('Container border') : (0, _utils.translate)('Option border'), isAlpha: true })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E6E6E6"), property: (0, _utils.getThemePrefix)(this.props) + 'multiselect-background', label: (0, _utils.translate)('Container BG'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), property: (0, _utils.getThemePrefix)(this.props) + 'multiselect-item-color-static', label: (0, _utils.translate)('Option color') })) ), hasMultiSelectModernStyle && _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, '#888888'), property: (0, _utils.getThemePrefix)(this.props) + 'multiselect-tag-background-static', label: (0, _utils.translate)('Tag background color') })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, '#FFFFFF'), property: (0, _utils.getThemePrefix)(this.props) + 'multiselect-tag-color-static', label: (0, _utils.translate)('Tag text color') })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, '#FFFFFF'), property: (0, _utils.getThemePrefix)(this.props) + 'multiselect-tag-remove-color-static', label: (0, _utils.translate)('Remove tag color') })) ) ), hasMultiSelectStandardStyle && _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Hover'), value: 'hover' }, this.props.formDesign === 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000"), property: (0, _utils.getThemePrefix)(this.props) + 'multiselect-border-hover', label: (0, _utils.translate)('Option border'), isAlpha: true })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#DDDDDD"), property: (0, _utils.getThemePrefix)(this.props) + 'multiselect-item-bg-hover', label: (0, _utils.translate)('Option background'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000"), property: (0, _utils.getThemePrefix)(this.props) + 'multiselect-item-color-hover', label: (0, _utils.translate)('Option color') })) ), hasMultiSelectStandardStyle && _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Selected'), value: 'selected' }, this.props.formDesign === 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), property: (0, _utils.getThemePrefix)(this.props) + 'multiselect-border-active', label: (0, _utils.translate)('Option border'), isAlpha: true })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), property: (0, _utils.getThemePrefix)(this.props) + 'multiselect-item-bg-active', label: (0, _utils.translate)('Option background'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: this.props.formDesign !== 'material' ? '#FFFFFF' : '#17A8E3', property: (0, _utils.getThemePrefix)(this.props) + 'multiselect-item-color-active', label: (0, _utils.translate)('Option color') })) ), hasMultiSelectStandardStyle && this.props.formDesign !== 'material' && _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Error'), value: 'error' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562"), property: (0, _utils.getThemePrefix)(this.props) + 'multiselect-border-error', label: (0, _utils.translate)('Container border'), isAlpha: true })) ) ); } }]); return MultiSelectColors; }(_react.Component); exports.default = MultiSelectColors; /***/ }), /* 252 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var CalendarColors = function (_Component) { _inherits(CalendarColors, _Component); function CalendarColors(props) { _classCallCheck(this, CalendarColors); return _possibleConstructorReturn(this, (CalendarColors.__proto__ || Object.getPrototypeOf(CalendarColors)).call(this, props)); } _createClass(CalendarColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'container', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Container'), value: 'container' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: this.props.formDesign !== '' ? (0, _utils.translate)('Border') : (0, _utils.translate)('Header background'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-border', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: this.props.formDesign !== '' ? (0, _utils.translate)('Background') : (0, _utils.translate)('Main background'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-background', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E6E6E6"), isAlpha: true })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Navigation'), value: 'navigation' }, this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Arrows background'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-arrows-bg', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Arrows color'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-arrows-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF"), isAlpha: true })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Select'), value: 'select' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-select-border', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#BBBBBB"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-select-bg', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Color'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-select-color', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), isAlpha: true })) ) ); } }]); return CalendarColors; }(_react.Component); exports.default = CalendarColors; /***/ }), /* 253 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Signature = function (_Component) { _inherits(Signature, _Component); function Signature(props) { _classCallCheck(this, Signature); return _possibleConstructorReturn(this, (Signature.__proto__ || Object.getPrototypeOf(Signature)).call(this, props)); } _createClass(Signature, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { value: 'default', label: (0, _utils.translate)('Default') }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'signature-border-default', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771") })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'signature-background-default', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#EDEDED") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Placeholder'), property: (0, _utils.getThemePrefix)(this.props) + 'signature-placeholder', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#888888") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Signature Color'), property: (0, _utils.getThemePrefix)(this.props) + 'signature-color', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#000000") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Reset icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'signature-reset-icon-default', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#888888") })) ), _react2.default.createElement( _container2.default, { value: 'hover', label: (0, _utils.translate)('Hover') }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'signature-border-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3") })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'signature-background-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E6E6E6") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Reset icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'signature-reset-icon-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3") })) ), _react2.default.createElement( _container2.default, { value: 'error', label: (0, _utils.translate)('Error') }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'signature-border-error', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562") })) ) ); } }]); return Signature; }(_react.Component); exports.default = Signature; /***/ }), /* 254 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var GroupColors = function (_Component) { _inherits(GroupColors, _Component); function GroupColors(props) { _classCallCheck(this, GroupColors); return _possibleConstructorReturn(this, (GroupColors.__proto__ || Object.getPrototypeOf(GroupColors)).call(this, props)); } _createClass(GroupColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "rgba(248,248,248,.5)"), property: (0, _utils.getThemePrefix)(this.props) + 'group-background', label: (0, _utils.translate)('Background color'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "rgba(221,221,221,.5)"), property: (0, _utils.getThemePrefix)(this.props) + 'group-border', label: (0, _utils.translate)('Border color'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "rgba(170,170,170,.5)"), property: (0, _utils.getThemePrefix)(this.props) + 'group-divider', label: (0, _utils.translate)('Divider color'), isAlpha: true })) ); } }]); return GroupColors; }(_react.Component); exports.default = GroupColors; /***/ }), /* 255 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _accordion = __webpack_require__(34); var _accordion2 = _interopRequireDefault(_accordion); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var RepeaterColors = function (_Component) { _inherits(RepeaterColors, _Component); function RepeaterColors(props) { _classCallCheck(this, RepeaterColors); return _possibleConstructorReturn(this, (RepeaterColors.__proto__ || Object.getPrototypeOf(RepeaterColors)).call(this, props)); } _createClass(RepeaterColors, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'sui-box' }, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Button') }), _react2.default.createElement( _tabs2.default, { 'default': 'default', extraClass: 'sui-tabs-flushed', type: 'tabs' }, _react2.default.createElement( _container2.default, { value: 'default', label: (0, _utils.translate)('Default') }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-button-background', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#F8F8F8") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-button', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#666666") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-border', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#AAAAAA") })) ), _react2.default.createElement( _container2.default, { value: 'hover', label: (0, _utils.translate)('Hover') }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-button-background-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#F1F1F1") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-button-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#666666") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-border-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#AAAAAA") })) ), _react2.default.createElement( _container2.default, { value: 'focus', label: (0, _utils.translate)('Focus') }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-button-background-focus', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#F1F1F1") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-button-focus', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#666666") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-border-focus', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#AAAAAA") })) ) ) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Icon') }), _react2.default.createElement( _tabs2.default, { 'default': 'default', extraClass: 'sui-tabs-flushed', type: 'tabs' }, _react2.default.createElement( _container2.default, { value: 'default', label: (0, _utils.translate)('Default') }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-icon', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#888888") })) ), _react2.default.createElement( _container2.default, { value: 'hover', label: (0, _utils.translate)('Hover') }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-icon-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#888888") })) ), _react2.default.createElement( _container2.default, { value: 'focus', label: (0, _utils.translate)('Focus') }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-icon-focus', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#888888") })) ) ) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Link') }), _react2.default.createElement( _tabs2.default, { 'default': 'default', extraClass: 'sui-tabs-flushed', type: 'tabs' }, _react2.default.createElement( _container2.default, { value: 'default', label: (0, _utils.translate)('Default') }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-link', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3") })) ), _react2.default.createElement( _container2.default, { value: 'hover', label: (0, _utils.translate)('Hover') }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-link-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3") })) ), _react2.default.createElement( _container2.default, { value: 'focus', label: (0, _utils.translate)('Focus') }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'repeater-link-focus', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3") })) ) ) ) ); } }]); return RepeaterColors; }(_react.Component); exports.default = RepeaterColors; /***/ }), /* 256 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var CalendarColors = function (_Component) { _inherits(CalendarColors, _Component); function CalendarColors(props) { _classCallCheck(this, CalendarColors); return _possibleConstructorReturn(this, (CalendarColors.__proto__ || Object.getPrototypeOf(CalendarColors)).call(this, props)); } _createClass(CalendarColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Default'), value: 'default' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Table head color'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-dweek', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#333333"), isAlpha: true })), this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Table cell border'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-days-border-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E6E6E6"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Table cell BG'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-days-background-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E6E6E6"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Table cell color'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-days-color-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), isAlpha: true })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Hover'), value: 'hover' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Table cell border'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-days-border-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#DDDDDD"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Table cell BG'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-days-background-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#DDDDDD"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Table cell color'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-days-color-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Active'), value: 'active' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Table cell border'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-days-border-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Table cell BG'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-days-background-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Table cell color'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-days-color-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Current'), value: 'current' }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Table cell border'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-days-border-current', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Table cell BG'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-days-background-current', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#C8DEE7"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Table cell color'), property: (0, _utils.getThemePrefix)(this.props) + 'calendar-days-color-current', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3") })) ) ); } }]); return CalendarColors; }(_react.Component); exports.default = CalendarColors; /***/ }), /* 257 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var StepsColors = function (_Component) { _inherits(StepsColors, _Component); function StepsColors(props) { _classCallCheck(this, StepsColors); return _possibleConstructorReturn(this, (StepsColors.__proto__ || Object.getPrototypeOf(StepsColors)).call(this, props)); } _createClass(StepsColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'border', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Border'), value: 'border' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Default'), property: (0, _utils.getThemePrefix)(this.props) + 'timeline-border', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), isAlpha: true })), this.props.formDesign !== 'bold' && this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Current'), property: (0, _utils.getThemePrefix)(this.props) + 'timeline-border-current', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Label'), value: 'label' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Default'), property: (0, _utils.getThemePrefix)(this.props) + 'timeline-text', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Current'), property: (0, _utils.getThemePrefix)(this.props) + 'timeline-text-current', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Dot'), value: 'dot' }, _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Default state colors') ) ), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border'), property: (0, _utils.getThemePrefix)(this.props) + 'timeline-dot-border', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background'), property: (0, _utils.getThemePrefix)(this.props) + 'timeline-dot-background', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), isAlpha: true })), this.props.formDesign === 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Page number color'), property: (0, _utils.getThemePrefix)(this.props) + 'timeline-dot-color', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Current state colors') ) ), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border'), property: (0, _utils.getThemePrefix)(this.props) + 'timeline-dot-border-current', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background'), property: (0, _utils.getThemePrefix)(this.props) + 'timeline-dot-background-current', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), this.props.formDesign === 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Page number color'), property: (0, _utils.getThemePrefix)(this.props) + 'timeline-dot-color-current', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ) ) ); } }]); return StepsColors; }(_react.Component); exports.default = StepsColors; /***/ }), /* 258 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ProgressColors = function (_Component) { _inherits(ProgressColors, _Component); function ProgressColors(props) { _classCallCheck(this, ProgressColors); return _possibleConstructorReturn(this, (ProgressColors.__proto__ || Object.getPrototypeOf(ProgressColors)).call(this, props)); } _createClass(ProgressColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Label'), property: (0, _utils.getThemePrefix)(this.props) + 'progress-label', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Progress bar BG'), property: (0, _utils.getThemePrefix)(this.props) + 'progress-background', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E6E6E6"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Progress status BG'), property: (0, _utils.getThemePrefix)(this.props) + 'progress-background-status', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })) ); } }]); return ProgressColors; }(_react.Component); exports.default = ProgressColors; /***/ }), /* 259 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var BackColors = function (_Component) { _inherits(BackColors, _Component); function BackColors(props) { _classCallCheck(this, BackColors); return _possibleConstructorReturn(this, (BackColors.__proto__ || Object.getPrototypeOf(BackColors)).call(this, props)); } _createClass(BackColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Default'), value: 'default' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'prev-background-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#1ABCA1"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Label color'), property: (0, _utils.getThemePrefix)(this.props) + 'prev-color-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Hover'), value: 'hover' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'prev-background-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#159C85"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Label color'), property: (0, _utils.getThemePrefix)(this.props) + 'prev-color-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Focus'), value: 'focus' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'prev-background-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#159C85"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Label color'), property: (0, _utils.getThemePrefix)(this.props) + 'prev-color-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ) ); } }]); return BackColors; }(_react.Component); exports.default = BackColors; /***/ }), /* 260 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var NextColors = function (_Component) { _inherits(NextColors, _Component); function NextColors(props) { _classCallCheck(this, NextColors); return _possibleConstructorReturn(this, (NextColors.__proto__ || Object.getPrototypeOf(NextColors)).call(this, props)); } _createClass(NextColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Default'), value: 'default' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'next-background-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#1ABCA1"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Label color'), property: (0, _utils.getThemePrefix)(this.props) + 'next-color-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Hover'), value: 'hover' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'next-background-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#159C85"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Label color'), property: (0, _utils.getThemePrefix)(this.props) + 'next-color-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Focus'), value: 'focus' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'next-background-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#159C85"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Label color'), property: (0, _utils.getThemePrefix)(this.props) + 'next-color-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ) ); } }]); return NextColors; }(_react.Component); exports.default = NextColors; /***/ }), /* 261 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SubmitColors = function (_Component) { _inherits(SubmitColors, _Component); function SubmitColors(props) { _classCallCheck(this, SubmitColors); return _possibleConstructorReturn(this, (SubmitColors.__proto__ || Object.getPrototypeOf(SubmitColors)).call(this, props)); } _createClass(SubmitColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Default'), value: 'default' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'button-submit-background-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'button-submit-color-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Hover'), value: 'hover' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'button-submit-background-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#008FCA"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'button-submit-color-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Focus'), value: 'focus' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'button-submit-background-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#008FCA"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'button-submit-color-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ) ); } }]); return SubmitColors; }(_react.Component); exports.default = SubmitColors; /***/ }), /* 262 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _accordion = __webpack_require__(34); var _accordion2 = _interopRequireDefault(_accordion); var _uploadPanelSingle = __webpack_require__(263); var _uploadPanelSingle2 = _interopRequireDefault(_uploadPanelSingle); var _uploadPanelMultiple = __webpack_require__(264); var _uploadPanelMultiple2 = _interopRequireDefault(_uploadPanelMultiple); var _uploadFileMultiple = __webpack_require__(265); var _uploadFileMultiple2 = _interopRequireDefault(_uploadFileMultiple); var _uploadFileDelete = __webpack_require__(266); var _uploadFileDelete2 = _interopRequireDefault(_uploadFileDelete); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var UploadedFilesColors = function (_Component) { _inherits(UploadedFilesColors, _Component); function UploadedFilesColors(props) { _classCallCheck(this, UploadedFilesColors); return _possibleConstructorReturn(this, (UploadedFilesColors.__proto__ || Object.getPrototypeOf(UploadedFilesColors)).call(this, props)); } _createClass(UploadedFilesColors, [{ key: 'render', value: function render() { var hasSingleUpload = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'upload', 'file-type', 'single') || (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'postdata', 'post_image', 'false'); var hasMultiUpload = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'upload', 'file-type', 'multiple'); return _react2.default.createElement( 'div', { className: 'sui-box' }, hasSingleUpload && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Single File Uploader') }), _react2.default.createElement(_uploadPanelSingle2.default, this.props) ) ), hasMultiUpload && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Multiple Files Uploader') }), _react2.default.createElement(_uploadPanelMultiple2.default, this.props) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Uploaded File') }), _react2.default.createElement(_uploadFileMultiple2.default, this.props) ) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Uploaded File Delete Button') }), _react2.default.createElement(_uploadFileDelete2.default, this.props) ) ); } }]); return UploadedFilesColors; }(_react.Component); exports.default = UploadedFilesColors; /***/ }), /* 263 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SingleUploadPanelColors = function (_Component) { _inherits(SingleUploadPanelColors, _Component); function SingleUploadPanelColors(props) { _classCallCheck(this, SingleUploadPanelColors); return _possibleConstructorReturn(this, (SingleUploadPanelColors.__proto__ || Object.getPrototypeOf(SingleUploadPanelColors)).call(this, props)); } _createClass(SingleUploadPanelColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Default'), value: 'default' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'button-upload-background-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#1ABC9C"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'button-upload-color-static', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Hover'), value: 'hover' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'button-upload-background-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#01A383"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'button-upload-color-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Focus'), value: 'focus' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'button-upload-background-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#01A383"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text color'), property: (0, _utils.getThemePrefix)(this.props) + 'button-upload-color-active', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FFFFFF") })) ) ); } }]); return SingleUploadPanelColors; }(_react.Component); exports.default = SingleUploadPanelColors; /***/ }), /* 264 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MultiUploadPanelColors = function (_Component) { _inherits(MultiUploadPanelColors, _Component); function MultiUploadPanelColors(props) { _classCallCheck(this, MultiUploadPanelColors); return _possibleConstructorReturn(this, (MultiUploadPanelColors.__proto__ || Object.getPrototypeOf(MultiUploadPanelColors)).call(this, props)); } _createClass(MultiUploadPanelColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { value: 'default', label: (0, _utils.translate)('Default') }, this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-panel-background-default', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#EDEDED"), isAlpha: true })), this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-panel-border-default', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Cloud icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-panel-icon-default', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Message text color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-panel-text-default', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#666666") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Message link color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-panel-link-default', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3") })) ), _react2.default.createElement( _container2.default, { value: 'hover', label: (0, _utils.translate)('Hover') }, this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-panel-background-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E6E6E6"), isAlpha: true })), this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-panel-border-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Cloud icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-panel-icon-hover', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), isAlpha: true })) ), _react2.default.createElement( _container2.default, { value: 'drop', label: (0, _utils.translate)('Drop') }, this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-panel-background-drop', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E1F6FF"), isAlpha: true })), this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-panel-border-drop', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Cloud icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-panel-icon-drop', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#17A8E3"), isAlpha: true })) ), _react2.default.createElement( _container2.default, { value: 'error', label: (0, _utils.translate)('Error') }, this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Background color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-panel-background-error', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#EDEDED"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: this.props.formDesign === 'flat' ? (0, _utils.translate)('Left border color') : (0, _utils.translate)('Border color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-panel-border-error', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562"), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Cloud icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-panel-icon-error', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771"), isAlpha: true })) ) ); } }]); return MultiUploadPanelColors; }(_react.Component); exports.default = MultiUploadPanelColors; /***/ }), /* 265 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MultiUploadFileColors = function (_Component) { _inherits(MultiUploadFileColors, _Component); function MultiUploadFileColors(props) { _classCallCheck(this, MultiUploadFileColors); return _possibleConstructorReturn(this, (MultiUploadFileColors.__proto__ || Object.getPrototypeOf(MultiUploadFileColors)).call(this, props)); } _createClass(MultiUploadFileColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { value: 'default', label: (0, _utils.translate)('Default') }, this.props.formDesign !== 'flat' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('File preview border color'), description: (0, _utils.translate)('Default state border will not appear when file ' + 'uploaded is an image.'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-file-preview-border-default', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771") })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('File preview background color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-file-preview-background-default', defaultValue: this.props.formDesign === 'flat' ? '#EDEDED' : '#FFFFFF' })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('File preview icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-file-preview-icon-default', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('File name color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-file-name-default', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#333333") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('File size color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-file-size-default', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#888888") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Loading icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-file-loader-color', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#888888") })) ), _react2.default.createElement( _container2.default, { value: 'error', label: (0, _utils.translate)('Error') }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('File preview border color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-file-preview-border-error', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562") })), this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('File preview background color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-file-preview-background-error', defaultValue: this.props.formDesign === 'flat' ? '#EDEDED' : '#FFFFFF' })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('File preview icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-file-preview-icon-error', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#777771") })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('File size icon color'), property: (0, _utils.getThemePrefix)(this.props) + 'multiupload-file-error-color', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562") })) ) ); } }]); return MultiUploadFileColors; }(_react.Component); exports.default = MultiUploadFileColors; /***/ }), /* 266 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var FileDeleteButtonColors = function (_Component) { _inherits(FileDeleteButtonColors, _Component); function FileDeleteButtonColors(props) { _classCallCheck(this, FileDeleteButtonColors); return _possibleConstructorReturn(this, (FileDeleteButtonColors.__proto__ || Object.getPrototypeOf(FileDeleteButtonColors)).call(this, props)); } _createClass(FileDeleteButtonColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Default'), value: 'default' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#00000000"), property: (0, _utils.getThemePrefix)(this.props) + 'button-upload-delete-background-static', label: (0, _utils.translate)('Background color'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562"), property: (0, _utils.getThemePrefix)(this.props) + 'button-upload-delete-color-static', label: (0, _utils.translate)('Icon color') })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Hover'), value: 'hover' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#F9E4E8"), property: (0, _utils.getThemePrefix)(this.props) + 'button-upload-delete-background-hover', label: (0, _utils.translate)('Background color'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562"), property: (0, _utils.getThemePrefix)(this.props) + 'button-upload-delete-color-hover', label: (0, _utils.translate)('Icon color') })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Focus'), value: 'focus' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#F9E4E8"), property: (0, _utils.getThemePrefix)(this.props) + 'button-upload-delete-background-active', label: (0, _utils.translate)('Background color'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#E04562"), property: (0, _utils.getThemePrefix)(this.props) + 'button-upload-delete-color-active', label: (0, _utils.translate)('Icon color') })) ) ); } }]); return FileDeleteButtonColors; }(_react.Component); exports.default = FileDeleteButtonColors; /***/ }), /* 267 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var RatingColors = function (_Component) { _inherits(RatingColors, _Component); function RatingColors(props) { _classCallCheck(this, RatingColors); return _possibleConstructorReturn(this, (RatingColors.__proto__ || Object.getPrototypeOf(RatingColors)).call(this, props)); } _createClass(RatingColors, [{ key: 'render', value: function render() { return _react2.default.createElement( _tabs2.default, { 'default': 'default', type: 'tabs', extraClass: 'sui-tabs-flushed' }, _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Default'), value: 'default' }, this.props.formDesign !== 'flat' && this.props.formDesign !== 'material' && _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#AAAAAA"), property: (0, _utils.getThemePrefix)(this.props) + 'rating-icon', label: (0, _utils.translate)('Rating icon color'), isAlpha: true })), _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#888888"), property: (0, _utils.getThemePrefix)(this.props) + 'rating-suffix', label: (0, _utils.translate)('Suffix text color'), isAlpha: true })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Hover'), value: 'hover' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FF7E41"), property: (0, _utils.getThemePrefix)(this.props) + 'rating-icon-hover', label: (0, _utils.translate)('Rating icon color'), isAlpha: true })) ), _react2.default.createElement( _container2.default, { label: (0, _utils.translate)('Selected'), value: 'selected' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { defaultValue: '' + (0, _utils.getDefaultValue)(this.props, "#FF7E41"), property: (0, _utils.getThemePrefix)(this.props) + 'rating-icon-active', label: (0, _utils.translate)('Rating icon color'), isAlpha: true })) ) ); } }]); return RatingColors; }(_react.Component); exports.default = RatingColors; /***/ }), /* 268 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _accordion = __webpack_require__(34); var _accordion2 = _interopRequireDefault(_accordion); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _fonts = __webpack_require__(269); var _fonts2 = _interopRequireDefault(_fonts); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Fonts = function (_Component) { _inherits(Fonts, _Component); function Fonts(props) { _classCallCheck(this, Fonts); return _possibleConstructorReturn(this, (Fonts.__proto__ || Object.getPrototypeOf(Fonts)).call(this, props)); } _createClass(Fonts, [{ key: 'render', value: function render() { var hasPagination = (0, _utils.hasFieldType)('page-break', this.props.wrappers); var hasSection = (0, _utils.hasFieldType)('section', this.props.wrappers); var hasSingleRadio = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'radio', 'value_type', 'radio'); var hasSingleDropdown = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'select', 'value_type', 'single'); var hasMultiCheckbox = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'checkbox', 'value_type', 'checkbox'); var hasMultiSelect = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'select', 'value_type', 'multiselect'); var hasMultiSelectModernStyle = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'select', 'multiselect_style', 'modern'); var hasDatePicker = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'date', 'field_type', 'picker'); var hasDateDropdown = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'date', 'field_type', 'select'); var hasTimeDropdown = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'time', 'field_type', 'select') || (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'time', 'time_type', 'twelve'); var hasAddresCountry = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'address', 'address_country', 'true'); var hasNamePrefix = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'name', 'prefix', 'true'); var hasGDPR = (0, _utils.hasFieldType)('gdprcheckbox', this.props.wrappers); var hasCurrency = (0, _utils.hasFieldType)('currency', this.props.wrappers); var hasSingleUpload = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'upload', 'file-type', 'single') || (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'postdata', 'post_image', 'false'); var hasMultiUpload = (0, _utils.hasFieldWithAttribute)(this.props.wrappers, 'upload', 'file-type', 'multiple'); var hasESign = (0, _utils.hasFieldType)('signature', this.props.wrappers); var hasCalculation = (0, _utils.hasFieldType)('calculation', this.props.wrappers); var hasGroup = (0, _utils.hasFieldType)('group', this.props.wrappers); var isPreset = !_.isUndefined(this.props.preset); var hasPaginationHeader = _.isUndefined(this.props.settings.paginationData) || _.isUndefined(this.props.settings.paginationData['pagination-header-design']) ? '' : this.props.settings.paginationData['pagination-header-design']; var paginationHeader = _.isUndefined(this.props.settings.paginationData) || _.isUndefined(this.props.settings.paginationData['pagination-header']) ? '' : this.props.settings.paginationData['pagination-header']; return _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Fonts'), description: (0, _utils.translate)('By default this form will inherit the fonts your theme uses. ' + 'You can overwrite these fonts with custom ones from ' + '{{link}}Bunny Fonts{{/link}}.', { components: { link: _react2.default.createElement('a', { href: 'https://fonts.bunny.net/about', target: '_blank' }) } }) }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'form-font-family', 'default': '' }), _react2.default.createElement( _empty2.default, { value: '' }, (0, _utils.translate)('Use Theme Fonts') ), _react2.default.createElement( _container2.default, { value: 'custom', label: (0, _utils.translate)('Custom') }, _react2.default.createElement( 'div', { className: 'sui-accordion' }, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Response Message') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-response', defaultSize: '15', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '400' })) ), (isPreset || hasPagination && hasPaginationHeader === 'show' && paginationHeader === 'nav') && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Pagination Steps') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-timeline', defaultSize: '12', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '500' })) ), (isPreset || hasPagination && hasPaginationHeader === 'show' && paginationHeader === 'bar') && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Pagination Progress Bar') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-progress', defaultSize: '12', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '500' })) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Fields Label') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-label', defaultSize: '13', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '700' })) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Fields Description') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-description', defaultSize: '12', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '400' })) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Fields Error Message') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-validation', defaultSize: '12', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '500' })) ), hasSection && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Section Title') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-title', defaultSize: '45', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '400' })) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Section Subtitle') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-subtitle', defaultSize: '18', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '400' })) ) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Input and Textarea') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-input', defaultSize: '16', defaultFont: 'Roboto', defaultWeight: '400' })) ), hasCalculation && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Input Prefix') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-input-prefix', defaultSize: '16', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '500' })) ), (hasCurrency || hasCalculation) && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Input Suffix') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-input-suffix', defaultSize: '16', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '500' })) ), (hasMultiCheckbox || hasSingleRadio || hasGDPR) && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Radio and Checkbox') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-radio', defaultSize: '14', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '400' })) ), (hasSingleDropdown || hasDateDropdown || hasTimeDropdown || hasAddresCountry || hasNamePrefix) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Select') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-select', defaultSize: '16', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '400' })) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Dropdown') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-dropdown', defaultSize: '16', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '400' })) ) ), hasDatePicker && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Calendar') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-calendar', defaultFont: 'custom', defaultCustom: 'inherit', familyOnly: true })) ), hasMultiSelect && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Multi Select') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-multiselect', defaultSize: '16', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '400' })) ), hasMultiSelectModernStyle && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: this.props.formDesign !== 'material' ? (0, _utils.translate)('Multi Select Tag') : (0, _utils.translate)('Multi Select Chip') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-multiselect-tag', defaultSize: '12', defaultFont: 'inherit', defaultCustom: 'inherit', defaultWeight: 'medium' })) ) ), hasSingleUpload && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Single File Upload') }), _react2.default.createElement( _tabs2.default, _extends({}, this.props, { type: 'tabs', 'default': 'upload-single-button', extraClass: 'sui-tabs-flushed' }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { value: 'upload-single-button', label: (0, _utils.translate)('Upload Button'), prefix: 'upload-single-button', defaultSize: '14', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '700' })), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { value: 'upload-single-text', label: (0, _utils.translate)('File Name'), prefix: 'upload-single-text', defaultSize: '12', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '700' })) ) ), hasMultiUpload && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Multiple Files Upload') }), _react2.default.createElement( _tabs2.default, _extends({}, this.props, { type: 'tabs', 'default': 'upload-multiple-panel', extraClass: 'sui-tabs-flushed' }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { value: 'upload-multiple-panel', label: (0, _utils.translate)('Upload Panel'), prefix: 'upload-multiple-panel', defaultSize: '13', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '400' })), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { value: 'upload-multiple-file-name', label: (0, _utils.translate)('File Name'), prefix: 'upload-multiple-file-name', defaultSize: '13', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '500' })), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { value: 'upload-multiple-file-size', label: (0, _utils.translate)('File Size'), prefix: 'upload-multiple-file-size', defaultSize: '12', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '500' })) ) ), hasESign && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('E-Signature Placeholder') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-esign-placeholder', defaultSize: '16', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '400' })) ), hasGroup && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Repeater Button') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-repeater-button', defaultSize: '12', defaultFont: 'Roboto', defaultWeight: '500' })) ), hasPagination && _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Pagination Buttons') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-pagination-buttons', defaultSize: '14', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '500' })) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Submit Button') }), _react2.default.createElement(_fonts2.default, _extends({}, this.props, { prefix: 'cform-button', defaultSize: '14', defaultFont: 'custom', defaultCustom: 'inherit', defaultWeight: '500' })) ) ) ) ) ); } }]); return Fonts; }(_react.Component); exports.default = Fonts; /***/ }), /* 269 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SuFontSettingsiSelect = function (_Component) { _inherits(SuFontSettingsiSelect, _Component); function SuFontSettingsiSelect(props) { _classCallCheck(this, SuFontSettingsiSelect); return _possibleConstructorReturn(this, (SuFontSettingsiSelect.__proto__ || Object.getPrototypeOf(SuFontSettingsiSelect)).call(this, props)); } _createClass(SuFontSettingsiSelect, [{ key: 'backwardsCompat', value: function backwardsCompat(variant, variants) { if (!_.contains(variants, variant)) { variants.push(variant); } return variants; } }, { key: 'render', value: function render() { var prefixTheme = (0, _utils.getThemePrefix)(this.props); var prefix = prefixTheme + this.props.prefix; var defaultFont = 'basic-' === prefixTheme ? '' : this.props.defaultFont; var font = !_.isUndefined(this.props.settings[prefix + '-font-family']) ? this.props.settings[prefix + '-font-family'] : defaultFont; var fcus = !_.isUndefined(this.props.settings[prefix + '-custom-family']) ? this.props.settings[prefix + '-custom-family'] : this.props.defaultCustom; var defaultWeight = 'basic-' === prefixTheme ? '' : this.props.defaultWeight; var variant = !_.isUndefined(this.props.settings[prefix + '-font-weight']) ? this.props.settings[prefix + '-font-weight'] : defaultWeight; var defaultSize = 'basic-' === prefixTheme ? '' : this.props.defaultSize; var size = !_.isUndefined(this.props.settings[prefix + '-font-size']) ? this.props.settings[prefix + '-font-size'] : defaultSize; var fontVariants = (0, _utils.getFontVariants)(font, window.forminatorFonts); var variants = this.backwardsCompat(variant, fontVariants); return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { label: (0, _utils.translate)('Font Family'), placeholder: (0, _utils.translate)('Roboto'), property: prefix + '-font-family', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, font) }), _.map(window.forminatorFonts, function (fontData) { return _react2.default.createElement( 'option', { value: fontData.family, key: fontData.family }, fontData.family ); }), _react2.default.createElement( 'option', { value: '', key: 'inherit' }, (0, _utils.translate)('inherit') ), _react2.default.createElement( 'option', { value: 'custom', key: 'custom' }, (0, _utils.translate)('Custom user font') ) ), font === 'custom' && _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'text', property: prefix + '-custom-family', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, fcus), placeholder: (0, _utils.translate)('E.g., Arial, sans-serif'), label: (0, _utils.translate)('Custom font family'), prefix: '' })) ) ), !this.props.familyOnly && _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'number', property: prefix + '-font-size', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, size), placeholder: (0, _utils.translate)('E.g., 16'), label: (0, _utils.translate)('Font Size'), note: 'in px', prefix: '' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { label: (0, _utils.translate)('Font Weight'), placeholder: (0, _utils.translate)('Select font weight'), property: prefix + '-font-weight', defaultValue: '' + (0, _utils.getDefaultValue)(this.props, variant) }), _react2.default.createElement( 'option', { value: '', key: 'inherit' }, (0, _utils.translate)('inherit') ), _.map(variants, function (fontVariant) { return _react2.default.createElement( 'option', { value: fontVariant, key: fontVariant }, fontVariant ); }) ) ) ) ); } }]); return SuFontSettingsiSelect; }(_react.Component); exports.default = SuFontSettingsiSelect; /***/ }), /* 270 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _paddingCustom = __webpack_require__(271); var _paddingCustom2 = _interopRequireDefault(_paddingCustom); var _borderCustom = __webpack_require__(272); var _borderCustom2 = _interopRequireDefault(_borderCustom); var _spacingCustom = __webpack_require__(273); var _spacingCustom2 = _interopRequireDefault(_spacingCustom); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var FormContainer = function (_Component) { _inherits(FormContainer, _Component); function FormContainer() { _classCallCheck(this, FormContainer); return _possibleConstructorReturn(this, (FormContainer.__proto__ || Object.getPrototypeOf(FormContainer)).apply(this, arguments)); } _createClass(FormContainer, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Form Container') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)("Customize the form container's padding and border.") ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'form-padding', settingsLabel: (0, _utils.translate)('Padding'), description: (0, _utils.translate)('By default the form will fill the available ' + 'space where you insert it. You can add some ' + 'padding here to better suit your theme.') }), _react2.default.createElement( _empty2.default, { value: '' }, (0, _utils.translate)('None') ), _react2.default.createElement( _paddingCustom2.default, _extends({}, this.props, { value: 'custom', boxClass: 'sui-tab-boxed' }), (0, _utils.translate)('Custom') ) ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'form-border', settingsLabel: (0, _utils.translate)('Border'), description: (0, _utils.translate)('Add an optional border around the form.') }), _react2.default.createElement( _empty2.default, { value: '' }, (0, _utils.translate)('None') ), _react2.default.createElement( _borderCustom2.default, _extends({}, this.props, { value: 'custom', boxClass: 'sui-tab-boxed' }), (0, _utils.translate)('Custom') ) ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'fields-style', settingsLabel: (0, _utils.translate)('Spacing'), 'default': 'open', description: (0, _utils.translate)('Choose how much spacing you want between each form field.') }), _react2.default.createElement( _empty2.default, { value: 'open' }, (0, _utils.translate)('Comfortable') ), _react2.default.createElement( _empty2.default, { value: 'enclosed' }, (0, _utils.translate)('Compact') ), _react2.default.createElement( _spacingCustom2.default, _extends({}, this.props, { value: 'custom', boxClass: 'sui-tab-boxed' }), (0, _utils.translate)('Custom') ) ) ) ); } }]); return FormContainer; }(_react.Component); exports.default = FormContainer; /***/ }), /* 271 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var paddingCustom = function (_Component) { _inherits(paddingCustom, _Component); function paddingCustom(props) { _classCallCheck(this, paddingCustom); return _possibleConstructorReturn(this, (paddingCustom.__proto__ || Object.getPrototypeOf(paddingCustom)).call(this, props)); } _createClass(paddingCustom, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { className: 'sui-row', style: { marginBottom: '10px' } }, _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Top'), type: 'number', placeholder: '0', property: 'form-padding-top' })) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Bottom'), type: 'number', placeholder: '0', property: 'form-padding-bottom' })) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Left'), type: 'number', placeholder: '0', property: 'form-padding-left' })) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Right'), type: 'number', placeholder: '0', property: 'form-padding-right' })) ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Set your custom padding in pixels.') ) ); } }]); return paddingCustom; }(_react.Component); exports.default = paddingCustom; /***/ }), /* 272 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var borderCustom = function (_Component) { _inherits(borderCustom, _Component); function borderCustom(props) { _classCallCheck(this, borderCustom); return _possibleConstructorReturn(this, (borderCustom.__proto__ || Object.getPrototypeOf(borderCustom)).call(this, props)); } _createClass(borderCustom, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { className: 'sui-row', style: { marginBottom: '10px' } }, _react2.default.createElement( _col2.default, { cols: '4' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Radius'), note: (0, _utils.translate)('in px'), type: 'number', placeholder: '0', property: 'form-border-radius' })) ), _react2.default.createElement( _col2.default, { cols: '4' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Thickness'), note: (0, _utils.translate)('in px'), type: 'number', placeholder: '0', property: 'form-border-width' })) ), _react2.default.createElement( _col2.default, { cols: '4' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'form-border-style', label: (0, _utils.translate)('Style') }), _react2.default.createElement( 'option', { value: 'solid' }, (0, _utils.translate)('Solid') ), _react2.default.createElement( 'option', { value: 'dashed' }, (0, _utils.translate)('Dashed') ), _react2.default.createElement( 'option', { value: 'dotted' }, (0, _utils.translate)('Dotted') ), _react2.default.createElement( 'option', { value: 'none' }, (0, _utils.translate)('None') ) ) ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Note: Set the color of the border in the Colors settings area above.') ) ); } }]); return borderCustom; }(_react.Component); exports.default = borderCustom; /***/ }), /* 273 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var spacingCustom = function (_Component) { _inherits(spacingCustom, _Component); function spacingCustom(props) { _classCallCheck(this, spacingCustom); return _possibleConstructorReturn(this, (spacingCustom.__proto__ || Object.getPrototypeOf(spacingCustom)).call(this, props)); } _createClass(spacingCustom, [{ key: 'render', value: function render() { return _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Spacing'), note: (0, _utils.translate)('in pixels'), type: 'number', placeholder: (0, _utils.translate)('0'), property: (0, _utils.getThemePrefix)(this.props) + 'spacing' })); } }]); return spacingCustom; }(_react.Component); exports.default = spacingCustom; /***/ }), /* 274 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); var _aceEditor = __webpack_require__(163); var _aceEditor2 = _interopRequireDefault(_aceEditor); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var CustomCss = function (_Component) { _inherits(CustomCss, _Component); function CustomCss(props) { _classCallCheck(this, CustomCss); return _possibleConstructorReturn(this, (CustomCss.__proto__ || Object.getPrototypeOf(CustomCss)).call(this, props)); } _createClass(CustomCss, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Custom CSS') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('For more advanced customization options use custom CSS.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'div', { style: { marginBottom: '10px' } }, _react2.default.createElement(_toggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Enable custom CSS'), property: 'use-custom-css', unWrap: true })) ), !_.isUndefined(this.props.settings['use-custom-css']) && this.props.settings['use-custom-css'] && _react2.default.createElement(_aceEditor2.default, _extends({}, this.props, { property: 'custom_css', type: 'form' })) ) ) ); } }]); return CustomCss; }(_react.Component); exports.default = CustomCss; /***/ }), /* 275 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _pageMargin = __webpack_require__(276); var _pageMargin2 = _interopRequireDefault(_pageMargin); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var PageSettings = function (_Component) { _inherits(PageSettings, _Component); function PageSettings(props) { _classCallCheck(this, PageSettings); return _possibleConstructorReturn(this, (PageSettings.__proto__ || Object.getPrototypeOf(PageSettings)).call(this, props)); } _createClass(PageSettings, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-blue sui-active', 'aria-live': 'assertive', style: { display: 'block' } }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Our PDF builder is constantly improving and we’ll be adding more features over time. ' + 'While the current release has limited customization options, ' + 'we appreciate your patience as we work to bring you the best experience possible. ' + 'Keep an eye out for updates. To manually adjust the appearance of the fields, ' + 'you can enable the Custom CSS option below.') ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Page settings') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Configure the PDF file settings') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Page size') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('Choose the standard paper size for your PDF document. ' + 'The default resolution for each page is set at 96dpi.') ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'paper_size', defaultValue: 'A4' }), _.map(forminatorData.pdf_page_sizes, function (size, key) { return _react2.default.createElement( 'option', { key: key, value: key }, size ); }) ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement(_toggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Enable RTL (right-to-left)'), property: 'enable_rtl', unWrap: true })) ), _react2.default.createElement('hr', null), _react2.default.createElement(_pageMargin2.default, this.props) ) ) ); } }]); return PageSettings; }(_react.Component); exports.default = PageSettings; /***/ }), /* 276 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var pageMargin = function (_Component) { _inherits(pageMargin, _Component); function pageMargin(props) { _classCallCheck(this, pageMargin); return _possibleConstructorReturn(this, (pageMargin.__proto__ || Object.getPrototypeOf(pageMargin)).call(this, props)); } _createClass(pageMargin, [{ key: 'render', value: function render() { return _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'pdf_margin', divClass: 'pdf-page-margin', settingsLabel: (0, _utils.translate)('Page Margin'), 'default': 'default', description: (0, _utils.translate)('Default margin for all paper sizes is 30px. ' + 'Use the custom tab to set a different value.') }), _react2.default.createElement(_container2.default, { value: 'default', label: (0, _utils.translate)('Default') }), _react2.default.createElement( _container2.default, { value: 'custom', label: (0, _utils.translate)('Custom') }, _react2.default.createElement( 'div', { className: 'sui-border-frame' }, _react2.default.createElement( 'div', { className: 'sui-row', style: { marginBottom: '10px' } }, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { label: (0, _utils.translate)('Margin'), property: 'pdf_margin_unit', fieldClass: 'fui-select-inline', fieldsize: '100' }), _react2.default.createElement( 'option', { value: 'pt' }, 'pt' ), _react2.default.createElement( 'option', { value: 'px' }, 'px' ), _react2.default.createElement( 'option', { value: 'mm' }, 'mm' ), _react2.default.createElement( 'option', { value: 'in' }, 'in' ) ) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Top'), type: 'number', placeholder: '0', property: 'pdf_margin_top' })) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Bottom'), type: 'number', placeholder: '0', property: 'pdf_margin_bottom' })) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Left'), type: 'number', placeholder: '0', property: 'pdf_margin_left' })) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Right'), type: 'number', placeholder: '0', property: 'pdf_margin_right' })) ) ) ) ) ); } }]); return pageMargin; }(_react.Component); exports.default = pageMargin; /***/ }), /* 277 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SuiSelect2Custom = function (_SuiSelect) { _inherits(SuiSelect2Custom, _SuiSelect); function SuiSelect2Custom(props) { _classCallCheck(this, SuiSelect2Custom); var _this = _possibleConstructorReturn(this, (SuiSelect2Custom.__proto__ || Object.getPrototypeOf(SuiSelect2Custom)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); _this.afterSave = _this.afterSave.bind(_this); return _this; } _createClass(SuiSelect2Custom, [{ key: 'replaceInPosition', value: function replaceInPosition(array, position, replacement) { return [].concat(_toConsumableArray(array.slice(0, position)), [replacement], _toConsumableArray(array.slice(position + 1))); } }, { key: 'updateState', value: function updateState(wrappers) { this.props.actions.builderActions.updateFields(wrappers); } }, { key: 'afterSave', value: function afterSave(value) { var wrappers = Object.assign({}, this.props.wrappers); var reqElements = []; if (jQuery('.field-required select').length > 0) { var elValue = ''; jQuery('.field-required select option:selected').map(function () { elValue = jQuery(this).val(); //If it isn't "Auto generated password" if ('auto' !== elValue) { reqElements.push(elValue); } }); reqElements = [].concat(_toConsumableArray(new Set(reqElements))); } var wraps = _.map(this.props.wrappers, function (wrapper, i) { wrapper.fields.map(function (field) { field.required = -1 !== reqElements.indexOf(field.element_id) ? true : false; return field; }); return wrapper; }); // Update state this.updateState(wraps); } }]); return SuiSelect2Custom; }(_suiSelect2.default); exports.default = SuiSelect2Custom; /***/ }), /* 278 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SecurityBehaviour = function (_Component) { _inherits(SecurityBehaviour, _Component); function SecurityBehaviour() { _classCallCheck(this, SecurityBehaviour); return _possibleConstructorReturn(this, (SecurityBehaviour.__proto__ || Object.getPrototypeOf(SecurityBehaviour)).apply(this, arguments)); } _createClass(SecurityBehaviour, [{ key: 'render', value: function render() { var formType = forminatorData.currentForm.settings['form-type'] || 'default'; var specialFormTypes = ['login', 'registration', 'leads']; var isDisableForm = specialFormTypes.includes(formType); if (_.isUndefined(this.props.settings['akismet-protection'])) { this.props.settings['akismet-protection'] = 1; } if (!forminatorData.akismetEnabled) { this.props.settings['akismet-protection'] = 0; } return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Security') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Added layers of security to prevent spam submissions.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, 'form' === this.props.moduleSlug && _react2.default.createElement(_toggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Enable Honeypot protection'), property: 'honeypot', description: (0, _utils.translate)('Enabling this feature tricks spam bots by giving them a hidden ' + 'challenge only bots will see. If the bot tries the challenge we ' + "know it's not a human and prevent the form being submitted.") })), _react2.default.createElement( _toggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Enable Akismet spam protection'), property: 'akismet-protection', disabled: !forminatorData.akismetEnabled, description: (0, _utils.translate)('If you have installed the {{link}}Akismet anti-spam plugin{{/link}}, ' + 'you can enable this option to tell Forminator how to handle submissions ' + 'that Akismet flags as spam.', { components: { link: _react2.default.createElement('a', { target: '_blank', href: 'https://wordpress.org/plugins/akismet/' }) } }) }), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'akismet-protection-behavior', 'default': 'fail', label: (0, _utils.translate)('How should Forminator handle spam submissions?') }), _react2.default.createElement( _container2.default, { value: 'fail', boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Fail Submission') }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Custom error message'), placeholder: (0, _utils.translate)('Something went wrong.'), property: 'spam-fail-message', description: (0, _utils.translate)('Enter a custom error message to let your visitors know why the submission failed.') })) ), _react2.default.createElement( _container2.default, { value: 'mark_spam', label: (0, _utils.translate)('Mark as Spam') }, _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Entries marked as spam will be captured in the ' + 'database, but not shown in Submissions. ' + 'Additionally, Payments, Notification emails, ' + 'and other automatic processes will be blocked.') ) ) ) ) ) ) ), 'form' === this.props.moduleSlug && !isDisableForm && _react2.default.createElement( _toggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Enable logged in submission only'), property: 'logged-users', description: (0, _utils.translate)('Lock down your form submissions to registered users only.') }), _react2.default.createElement( 'div', null, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Submissions limit per logged in user'), description: (0, _utils.translate)('Enter the number of times a logged in user can submit this form. Leave blank or enter “0” for no limit.'), type: 'number', placeholder: '0', property: 'limit-per-user' })) ), _react2.default.createElement( 'div', { style: { marginTop: '20px' } }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Message when user has already reached submissions limit'), placeholder: (0, _utils.translate)('You’ve already reached submissions limit.'), property: 'limit-per-user-error' })) ) ) ) ); } }]); return SecurityBehaviour; }(_react.Component); exports.default = SecurityBehaviour; /***/ }), /* 279 */, /* 280 */, /* 281 */, /* 282 */, /* 283 */, /* 284 */, /* 285 */, /* 286 */, /* 287 */, /* 288 */, /* 289 */, /* 290 */, /* 291 */, /* 292 */, /* 293 */, /* 294 */, /* 295 */, /* 296 */, /* 297 */, /* 298 */, /* 299 */, /* 300 */, /* 301 */, /* 302 */, /* 303 */, /* 304 */, /* 305 */, /* 306 */, /* 307 */, /* 308 */, /* 309 */, /* 310 */, /* 311 */, /* 312 */, /* 313 */, /* 314 */, /* 315 */, /* 316 */, /* 317 */, /* 318 */, /* 319 */, /* 320 */, /* 321 */, /* 322 */, /* 323 */, /* 324 */, /* 325 */, /* 326 */, /* 327 */, /* 328 */, /* 329 */, /* 330 */, /* 331 */, /* 332 */, /* 333 */, /* 334 */, /* 335 */, /* 336 */, /* 337 */, /* 338 */, /* 339 */, /* 340 */, /* 341 */, /* 342 */, /* 343 */, /* 344 */, /* 345 */, /* 346 */, /* 347 */, /* 348 */, /* 349 */, /* 350 */, /* 351 */, /* 352 */, /* 353 */, /* 354 */, /* 355 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.updateTitle = updateTitle; var UPDATE_TITLE = exports.UPDATE_TITLE = 'UPDATE_TITLE'; function updateTitle(title) { // Update global variable with Changes window.forminatorChanges.settings = true; return { type: UPDATE_TITLE, title: title }; } /***/ }), /* 356 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Preview = function (_Component) { _inherits(Preview, _Component); function Preview(props) { _classCallCheck(this, Preview); var _this = _possibleConstructorReturn(this, (Preview.__proto__ || Object.getPrototypeOf(Preview)).call(this, props)); _this.closeModal = _this.closeModal.bind(_this); _this.openModal = _this.openModal.bind(_this); return _this; } _createClass(Preview, [{ key: 'closeModal', value: function closeModal(event) { this.props.actions.modalActions.showModal({ open: false, title: (0, _utils.translate)('Preview') }, 'preview'); // Remove preview custom styles jQuery('#forminator-module-styles-' + this.props.id).remove(); } }, { key: 'openModal', value: function openModal(event) { if ('pdf-form' === this.props.formType) { (0, _utils.goToLink)(window.location.href + '&form_type=pdf-form' + '&forminator_action=pdf-preview' + '&preview_nonce=' + forminatorData.previewNonce); } else { this.props.actions.modalActions.showModal({ open: true, title: 'Preview', closeModal: this.closeModal }, 'preview'); } } }, { key: 'render', value: function render() { var buttonTheme = 'pdf-form' === this.props.formType ? 'sui-button-ghost ' : ''; return _react2.default.createElement( 'button', { id: 'forminator-preview-button', className: 'sui-button ' + buttonTheme + 'sui-sidenav-hide-md', accessKey: 'p', onClick: this.openModal, disabled: this.props.disabled }, _react2.default.createElement('i', { className: 'sui-icon-eye', 'aria-hidden': 'true' }), ' ', (0, _utils.translate)('Preview') ); } }]); return Preview; }(_react.Component); exports.default = Preview; /***/ }), /* 357 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _field = __webpack_require__(400); var _field2 = _interopRequireDefault(_field); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Wrapper = function (_Component) { _inherits(Wrapper, _Component); function Wrapper(props) { _classCallCheck(this, Wrapper); return _possibleConstructorReturn(this, (Wrapper.__proto__ || Object.getPrototypeOf(Wrapper)).call(this, props)); } _createClass(Wrapper, [{ key: 'isPayPalWrapper', value: function isPayPalWrapper() { // Check how many fields in the wrapper if (this.props.wrapper.fields.length > 1) { // We have more than one field its not PayPal wrapper return false; } if (this.props.wrapper.fields.length === 1) { // We have only one field in the wrapper, could be PayPal wrapper var field = this.props.wrapper.fields[0]; // Check if PayPal field if (field.type === 'paypal') { return true; } } return false; } }, { key: 'render', value: function render() { var _this2 = this; // const isPayPalWrapper = this.isPayPalWrapper(); // // if ( isPayPalWrapper ) { // return ( // <React.Fragment /> // ) // } return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement('div', { className: 'fui-drop fui-drop-full' }), _react2.default.createElement( 'div', { id: '' + this.props.wrapper.wrapper_id, className: 'fui-row' }, this.props.wrapper.fields.map(function (field) { return _react2.default.createElement(_field2.default, _extends({ key: field.element_id }, _this2.props, { field: field })); }) ) ); } }]); return Wrapper; }(_react.Component); exports.default = Wrapper; /***/ }), /* 358 */ /***/ (function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /* 359 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(196), isObject = __webpack_require__(189); /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }), /* 360 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; module.exports = freeGlobal; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(30))) /***/ }), /* 361 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } module.exports = toSource; /***/ }), /* 362 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(363), eq = __webpack_require__(358); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignValue; /***/ }), /* 363 */ /***/ (function(module, exports, __webpack_require__) { var defineProperty = __webpack_require__(443); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /* 364 */ /***/ (function(module, exports, __webpack_require__) { var baseTimes = __webpack_require__(445), isArguments = __webpack_require__(446), isArray = __webpack_require__(218), isBuffer = __webpack_require__(365), isIndex = __webpack_require__(449), isTypedArray = __webpack_require__(450); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } module.exports = arrayLikeKeys; /***/ }), /* 365 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(118), stubFalse = __webpack_require__(448); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(65)(module))) /***/ }), /* 366 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /* 367 */ /***/ (function(module, exports) { /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overArg; /***/ }), /* 368 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(359), isLength = __webpack_require__(366); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /* 369 */ /***/ (function(module, exports) { /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } module.exports = stubArray; /***/ }), /* 370 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(371), getPrototype = __webpack_require__(372), getSymbols = __webpack_require__(223), stubArray = __webpack_require__(369); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own and inherited enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { var result = []; while (object) { arrayPush(result, getSymbols(object)); object = getPrototype(object); } return result; }; module.exports = getSymbolsIn; /***/ }), /* 371 */ /***/ (function(module, exports) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /* 372 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(367); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /* 373 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(371), isArray = __webpack_require__(218); /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; /***/ }), /* 374 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var AddonRequired = function (_Component) { _inherits(AddonRequired, _Component); function AddonRequired(props) { _classCallCheck(this, AddonRequired); return _possibleConstructorReturn(this, (AddonRequired.__proto__ || Object.getPrototypeOf(AddonRequired)).call(this, props)); } _createClass(AddonRequired, [{ key: 'render', value: function render() { var imgSrc = forminatorData.isPro ? forminatorData.pluginUrl + '/assets/images/forminator-disabled.png' : this.props.addonImg; var imgSrc2 = forminatorData.isPro ? forminatorData.pluginUrl + '/assets/images/forminator-disabled@2x.png' : this.props.addonImg; return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, forminatorData.showBranding && _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( 'p', { className: 'sui-block-content-center' }, _react2.default.createElement('img', { src: imgSrc, srcSet: imgSrc + ' 1x, ' + imgSrc2 + ' 2x', className: 'sui-image sui-image-center', style: { borderRadius: '50%', width: !forminatorData.isPro ? '60px' : 'auto' } }) ) ), _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( 'p', { className: 'sui-block-content-center', style: { maxWidth: '600px', margin: '15px auto' } }, _react2.default.createElement( 'small', null, this.props.text ) ) ), _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( 'p', { className: 'sui-block-content-center' }, forminatorData.isPro && _react2.default.createElement( 'a', { href: forminatorData.adminUrl + 'admin.php?page=forminator-addons', target: '_blank', className: 'sui-button sui-button-blue' }, (0, _utils.translate)('Get the Add-on') ), !forminatorData.isPro && _react2.default.createElement( 'a', { href: this.props.addonUrl, target: '_blank', className: 'sui-button sui-button-purple' }, (0, _utils.translate)('Upgrade to PRO{{icon/}}', { components: { icon: _react2.default.createElement('span', { className: 'sui-icon-open-new-window sui-sm', 'aria-hidden': 'true', style: { margin: 0 } }) } }) ) ) ) ) ); } }]); return AddonRequired; }(_react.Component); exports.default = AddonRequired; /***/ }), /* 375 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Required = function (_Component) { _inherits(Required, _Component); function Required(props) { _classCallCheck(this, Required); return _possibleConstructorReturn(this, (Required.__proto__ || Object.getPrototypeOf(Required)).call(this, props)); } _createClass(Required, [{ key: 'toggleValue', value: function toggleValue(value) { this.props.updateProperty(this.requiredProp, value); } }, { key: 'render', value: function render() { var type = _.isUndefined(this.props.state.type) ? 'radio' : this.props.state.type; var typeText = 'radio' === type ? (0, _utils.translate)('radio button') : (0, _utils.translate)('checkbox'); var typeCap = typeText.charAt(0).toUpperCase() + typeText.slice(1); /*const visibilityNotice = _.isUndefined( this.props.state.input_visibility ) || 'true' === this.props.state.input_visibility ? true : false;*/ return _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, typeCap + ' ' + (0, _utils.translate)('visibility') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('When using image options, you can hide or show the ' + typeText + ' element and its label in frontend. If no image is uploaded, the ' + typeText + ' and label will remain visible.') ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'input_visibility', defaultValue: 'true', noWrapper: true }), _react2.default.createElement( 'div', { value: 'true' }, (0, _utils.translate)('Show') ), _react2.default.createElement( 'div', { value: 'false' }, (0, _utils.translate)('Hide') ) ) ); } }]); return Required; }(_react.Component); exports.default = Required; /***/ }), /* 376 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _multiCustomFieldOption = __webpack_require__(513); var _multiCustomFieldOption2 = _interopRequireDefault(_multiCustomFieldOption); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MultiCustomFields = function (_Component) { _inherits(MultiCustomFields, _Component); function MultiCustomFields(props) { _classCallCheck(this, MultiCustomFields); var _this = _possibleConstructorReturn(this, (MultiCustomFields.__proto__ || Object.getPrototypeOf(MultiCustomFields)).call(this, props)); _this.addOption = _this.addOption.bind(_this); _this.removeOption = _this.removeOption.bind(_this); _this.updateLabel = _this.updateLabel.bind(_this); _this.updateValue = _this.updateValue.bind(_this); return _this; } _createClass(MultiCustomFields, [{ key: 'componentDidMount', value: function componentDidMount() { var self = this; this.$el = jQuery(this.el); this.moveOption = this.moveOption.bind(this); var firstSort = true; this.$el.find('.sui-builder-fields').sortable({ start: function start(e, ui) { if (firstSort) { self.$el.find('.sui-builder-fields').sortable('refreshPositions'); firstSort = false; } }, stop: function stop(e, ui) { var to = ui.item.index(); self.$el.find('.sui-builder-fields').sortable('cancel'); var from = ui.item.index(); self.moveOption(from, to); } }); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.$el.unbind().removeData(); } }, { key: 'updateState', value: function updateState(state) { this.setState({ options: state }); this.props.updateProperty('options', state); if (!_.isUndefined(this.props.actions)) { this.props.actions.settingsActions.updateSetting('options', state); } } }, { key: 'getPropState', value: function getPropState() { var props = []; _.each(this.props.state.options, function (element) { var newElement = Object.assign({}, element); props.push(newElement); }); return props; } }, { key: 'updateLabel', value: function updateLabel(index, value) { var newState = this.getPropState(); newState[index].label = value; this.updateState(newState); } }, { key: 'updateValue', value: function updateValue(index, value) { var newState = this.getPropState(); newState[index].value = value; this.updateState(newState); } }, { key: 'moveOption', value: function moveOption(from, to) { var newState = this.getPropState(); newState.splice(to, 0, newState.splice(from, 1)[0]); this.updateState(newState); } }, { key: 'removeOption', value: function removeOption(index) { var newState = this.getPropState(); newState.splice(index, 1); this.updateState(newState); } }, { key: 'addOption', value: function addOption() { var newState = this.getPropState(); newState.push({ label: '', value: '' }); this.updateState(newState); } }, { key: 'render', value: function render() { var _this2 = this; var options = this.props.state.options; return _react2.default.createElement( 'div', { className: 'sui-box-builder' }, _react2.default.createElement( 'div', { className: 'sui-box-builder-body', ref: function ref(el) { return _this2.el = el; } }, _react2.default.createElement( 'div', { className: 'sui-builder-fields' }, _.map(options, function (option, i) { return _react2.default.createElement(_multiCustomFieldOption2.default, _extends({ key: i, counter: i, option: option, removeOption: _this2.removeOption, updateValue: _this2.updateValue, updateLabel: _this2.updateLabel }, _this2.props)); }) ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-dashed', onClick: this.addOption }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add Custom User Meta') ), this.props.metaDescription && options.length <= 0 && _react2.default.createElement( 'span', { className: 'sui-description', style: { marginTop: '30px' } }, this.props.metaDescription ) ) ); } }]); return MultiCustomFields; }(_react.Component); exports.default = MultiCustomFields; /***/ }), /* 377 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Textarea = function (_Component) { _inherits(Textarea, _Component); function Textarea(props) { _classCallCheck(this, Textarea); var _this = _possibleConstructorReturn(this, (Textarea.__proto__ || Object.getPrototypeOf(Textarea)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); return _this; } _createClass(Textarea, [{ key: 'updateValue', value: function updateValue(value) { // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } } }, { key: 'render', value: function render() { var _this2 = this; var value = _.isUndefined(this.props.settings[this.props.property]) ? '' : this.props.settings[this.props.property]; var customStyles = { minHeight: this.props.height ? this.props.height : 'auto' }; var fieldLabel = ''; if (this.props.label) { fieldLabel = _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property, className: 'sui-label' }, this.props.label, this.props.note && _react2.default.createElement( 'span', { className: 'sui-label-note' }, this.props.note ) ); } return _react2.default.createElement( 'div', { className: 'sui-form-field' }, fieldLabel, _react2.default.createElement('textarea', { id: 'forminator-field-' + this.props.property, className: 'sui-form-control', style: customStyles, placeholder: this.props.placeholder, defaultValue: value, onChange: function onChange(e) { _this2.updateValue(e.target.value); } }), this.props.description && _react2.default.createElement( 'span', { className: 'sui-description' }, this.props.description ) ); } }]); return Textarea; }(_react.Component); exports.default = Textarea; /***/ }), /* 378 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var updatePdfs = exports.updatePdfs = function updatePdfs(pdfs) { return function (dispatch) { dispatch({ type: 'UPDATE_PDFS', pdfs: pdfs }); }; }; /***/ }), /* 379 */, /* 380 */, /* 381 */, /* 382 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _renderBlock = __webpack_require__(77); var _reactRedux = __webpack_require__(11); var _reactRouterDom = __webpack_require__(24); var _configureStore = __webpack_require__(201); var _configureStore2 = _interopRequireDefault(_configureStore); var _i18nWpPlugin = __webpack_require__(47); var _i18nWpPlugin2 = _interopRequireDefault(_i18nWpPlugin); var _main = __webpack_require__(383); var _main2 = _interopRequireDefault(_main); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var store = (0, _configureStore2.default)(forminatorData.currentForm); /* jshint esversion: 6 */ _i18nWpPlugin2.default.setLocale(forminatorl10n.locale); window.forminatorChanges = { fields: [], settings: false }; // We need our own version of jQuery in case user click Preview with WPEditor enabled // WPEditor instance breaks window.jQuery object and we should restore on modal close window.jQueryFormi = jQuery.noConflict(); (0, _renderBlock.renderBlock)('forminator-form-builder', _react2.default.createElement( _reactRedux.Provider, { store: store }, _react2.default.createElement( _reactRouterDom.MemoryRouter, null, _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '*', element: _react2.default.createElement(_main2.default, null) }) ) ) )); /***/ }), /* 383 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(23); var _reactDom2 = _interopRequireDefault(_reactDom); var _reactRouterDom = __webpack_require__(24); var _reactRedux = __webpack_require__(11); var _header = __webpack_require__(384); var _header2 = _interopRequireDefault(_header); var _navigation = __webpack_require__(389); var _navigation2 = _interopRequireDefault(_navigation); var _meta = __webpack_require__(393); var _meta2 = _interopRequireDefault(_meta); var _builder = __webpack_require__(397); var _builder2 = _interopRequireDefault(_builder); var _modal = __webpack_require__(405); var _modal2 = _interopRequireDefault(_modal); var _appearance = __webpack_require__(573); var _appearance2 = _interopRequireDefault(_appearance); var _registration = __webpack_require__(579); var _registration2 = _interopRequireDefault(_registration); var _login = __webpack_require__(587); var _login2 = _interopRequireDefault(_login); var _behaviour = __webpack_require__(591); var _behaviour2 = _interopRequireDefault(_behaviour); var _pdf = __webpack_require__(601); var _pdf2 = _interopRequireDefault(_pdf); var _notifications = __webpack_require__(617); var _notifications2 = _interopRequireDefault(_notifications); var _integrations = __webpack_require__(621); var _integrations2 = _interopRequireDefault(_integrations); var _settings = __webpack_require__(623); var _settings2 = _interopRequireDefault(_settings); var _utils = __webpack_require__(1); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Main = function (_Component) { _inherits(Main, _Component); function Main(props) { _classCallCheck(this, Main); var _this = _possibleConstructorReturn(this, (Main.__proto__ || Object.getPrototypeOf(Main)).call(this, props)); _this.stickyHeaderRef = _react2.default.createRef(); return _this; } _createClass(Main, [{ key: 'componentDidMount', value: function componentDidMount() { this.goToSectionFromUrl(); window.addEventListener('beforeunload', this.handleBeforeunload); window.addEventListener('scroll', this.applySticky.bind(this)); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { window.removeEventListener('beforeunload', this.handleBeforeunload); } /* * If URL has param gotosection, upon page load, * the page will go to the specified tab on the gotosection param. * Useful when redirecting from another page that is not part of form editor. */ }, { key: 'goToSectionFromUrl', value: function goToSectionFromUrl() { var goToSection = (0, _utils.parseQueryString)().gotosection; if (!_.isUndefined(goToSection)) { var theUrl = window.location.href; this.props.router.navigate('/' + (0, _utils.parseQueryString)().gotosection); window.history.replaceState({}, document.title, theUrl.slice(0, theUrl.indexOf('&gotosection'))); } } }, { key: 'applySticky', value: function applySticky() { var node = this.stickyHeaderRef.current; var currentOffset = node.getBoundingClientRect().top; var stickyOffset = parseInt(window.getComputedStyle(node).top.replace('px', '')); var isStuck = currentOffset <= stickyOffset; if (isStuck) { node.classList.add('sui-is-sticky'); } else { node.classList.remove('sui-is-sticky'); } } }, { key: 'handleBeforeunload', value: function handleBeforeunload(e) { if (window.forminatorChanges.length > 0 || window.forminatorChanges.settings === true) { e.preventDefault(); e.returnValue = (0, _utils.translate)('You have unsaved changes, are you sure want to leave this page'); return (0, _utils.translate)('You have unsaved changes, are you sure want to leave this page'); } } }, { key: 'render', value: function render() { var formType = forminatorData.currentForm.settings['form-type'] || 'default'; return _react2.default.createElement( 'div', null, _react2.default.createElement(_header2.default, null), _react2.default.createElement( 'div', { className: 'sui-row-with-sidenav' }, _react2.default.createElement(_navigation2.default, this.props), _react2.default.createElement( 'div', { className: 'forminator-' + formType + '-builder' }, _react2.default.createElement( 'div', { id: 'forminator-builder-status', className: 'sui-box sui-box-sticky', ref: this.stickyHeaderRef }, _react2.default.createElement(_meta2.default, null) ), _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/', element: _react2.default.createElement(_reactRouterDom.Navigate, { to: '/builder', replace: true }) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder', element: _react2.default.createElement(_builder2.default, null) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/:tab', element: _react2.default.createElement(_builder2.default, null) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/appearance', element: _react2.default.createElement(_appearance2.default, null) }), formType === 'registration' && _react2.default.createElement(_reactRouterDom.Route, { path: '/registration', element: _react2.default.createElement(_registration2.default, null) }), formType === 'login' && _react2.default.createElement(_reactRouterDom.Route, { path: '/login', element: _react2.default.createElement(_login2.default, null) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/behaviour', element: _react2.default.createElement(_behaviour2.default, null) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/behaviour/:tab', element: _react2.default.createElement(_behaviour2.default, null) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/pdf', element: _react2.default.createElement(_pdf2.default, null) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/notifications', element: _react2.default.createElement(_notifications2.default, null) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/notifications/:tab', element: _react2.default.createElement(_notifications2.default, null) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/integrations', element: _react2.default.createElement(_integrations2.default, null) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/settings', element: _react2.default.createElement(_settings2.default, null) }) ) ) ), _react2.default.createElement(_modal2.default, this.props) ); } }]); return Main; }(_react.Component); exports.default = (0, _withRouter.withRouter)(Main); /***/ }), /* 384 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _reactRedux = __webpack_require__(11); var _redux = __webpack_require__(12); var _settings = __webpack_require__(113); var settingsActions = _interopRequireWildcard(_settings); var _modal = __webpack_require__(62); var modalActions = _interopRequireWildcard(_modal); var _navigation = __webpack_require__(355); var navigationActions = _interopRequireWildcard(_navigation); var _header = __webpack_require__(385); var _header2 = _interopRequireDefault(_header); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function mapStateToProps(state) { return { id: state.settings.form_id, title: state.settings.formName || '', formType: state.settings['form-type'] || '' }; } function mapDispatchToProps(dispatch) { return { actions: { navigationActions: (0, _redux.bindActionCreators)(navigationActions, dispatch), modalActions: (0, _redux.bindActionCreators)(modalActions, dispatch), settingsActions: (0, _redux.bindActionCreators)(settingsActions, dispatch) } }; } exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_header2.default); /***/ }), /* 385 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Header; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _title = __webpack_require__(386); var _title2 = _interopRequireDefault(_title); var _documentation = __webpack_require__(387); var _documentation2 = _interopRequireDefault(_documentation); var _saveTemplate = __webpack_require__(388); var _saveTemplate2 = _interopRequireDefault(_saveTemplate); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function Header(props) { var isPDF = 'pdf-form' === props.formType; var moduleTitle = 'pdf-form' === props.formType ? (0, _utils.translate)('Edit PDF') : (0, _utils.translate)('Edit Form'); return _react2.default.createElement( 'div', { className: 'sui-header fui-header-with-settings' }, _react2.default.createElement( 'div', { className: 'fui-header-title' }, _react2.default.createElement( 'h1', { className: 'sui-header-title' }, moduleTitle ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, !isPDF && (forminatorData.isWPMUDEVAdmin || !forminatorData.canWhitelabel) && _react2.default.createElement(_saveTemplate2.default, props), _react2.default.createElement(_documentation2.default, props) ) ), _react2.default.createElement( 'div', { className: 'fui-header-settings' }, _react2.default.createElement( 'div', { className: 'sui-actions-left' }, _react2.default.createElement(_title2.default, props) ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, !isPDF && (forminatorData.isWPMUDEVAdmin || !forminatorData.canWhitelabel) && _react2.default.createElement(_saveTemplate2.default, props), _react2.default.createElement(_documentation2.default, props) ) ) ); } /***/ }), /* 386 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _metaDropdown = __webpack_require__(167); var _metaDropdown2 = _interopRequireDefault(_metaDropdown); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Title = function (_Component) { _inherits(Title, _Component); function Title(props) { _classCallCheck(this, Title); return _possibleConstructorReturn(this, (Title.__proto__ || Object.getPrototypeOf(Title)).call(this, props)); } _createClass(Title, [{ key: 'render', value: function render() { var _this2 = this; var title = this.props.title; var emptyTitle = _.isEmpty(title.trim()); var customClass = emptyTitle ? 'sui-form-field-error' : ''; var isPdf = 'pdf-form' === this.props.formType; var hasSuffix = isPdf ? 'sui-field-has-suffix' : ''; var styles = {}; if ('leads' === this.props.formType) { styles = { borderColor: '#ddd', backgroundColor: '#fafafa', color: '#666' }; } return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { className: 'sui-form-field ' + customClass }, isPdf && _react2.default.createElement( 'strong', { className: 'sui-field-prefix' }, forminatorData.parent_form_name, ' -' ), _react2.default.createElement( 'label', { htmlFor: 'forminator-set-title', id: 'forminator-set-title-label', className: 'sui-screen-reader-text' }, (0, _utils.translate)('Name your form') ), _react2.default.createElement('input', { type: 'text', value: title, placeholder: (0, _utils.translate)('Give your form a name'), id: 'forminator-set-title', className: 'sui-form-control ' + hasSuffix, style: styles, 'aria-labelledby': 'forminator-set-title-label', 'aria-describedby': 'forminator-set-title-message', 'aria-required': 'true', accessKey: 't', onChange: function onChange(e) { return _this2.props.actions.navigationActions.updateTitle(e.target.value); }, disabled: this.props.formType === 'leads' }), isPdf && _react2.default.createElement( 'strong', { className: 'sui-field-suffix' }, '.pdf' ), _react2.default.createElement( 'p', { role: 'alert', id: 'forminator-set-title-message', className: 'sui-error-message', style: { display: emptyTitle ? 'block' : 'none', marginBottom: 0 } }, emptyTitle && (0, _utils.translate)('Please, enter a valid name.') ) ), 'leads' !== this.props.formType && 'pdf-form' !== this.props.formType && _react2.default.createElement(_metaDropdown2.default, _extends({}, this.props, { type: 'form' })) ); } }]); return Title; }(_react.Component); exports.default = Title; /***/ }), /* 387 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Documentation; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function Documentation(props) { if (!forminatorData.showDocLink) { return ''; } return _react2.default.createElement( 'a', { href: 'https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#forms', target: '_blank', className: 'sui-button sui-button-ghost' }, _react2.default.createElement('span', { className: 'sui-icon-academy' }), ' ', (0, _utils.translate)('View Documentation') ); } /***/ }), /* 388 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SaveTemplate = function (_Component) { _inherits(SaveTemplate, _Component); function SaveTemplate(props) { _classCallCheck(this, SaveTemplate); var _this = _possibleConstructorReturn(this, (SaveTemplate.__proto__ || Object.getPrototypeOf(SaveTemplate)).call(this, props)); _this.closeModal = _this.closeModal.bind(_this); _this.openModal = _this.openModal.bind(_this); _this.groupId = !_.isUndefined(_this.props.group) ? _this.props.group : ''; _this.APIconnected = forminatorData.isPro && forminatorData.isWPMUDEVloggedIn && !forminatorData.expiredMembership; return _this; } _createClass(SaveTemplate, [{ key: 'closeModal', value: function closeModal() { this.props.actions.modalActions.showModal({ open: false }, this.APIconnected ? 'savedTemplateModal' : 'savedTemplateProModal'); } }, { key: 'openModal', value: function openModal() { this.props.actions.modalActions.showModal({ open: true, title: this.actionText, closeModal: this.closeModal, id: 'save-template', activeElement: jQuery(document.activeElement), focusFirst: '.modal-close-button' }, this.APIconnected ? 'savedTemplateModal' : 'savedTemplateProModal'); } }, { key: 'render', value: function render() { var buttonClasses = 'sui-button sui-button-ghost ' + (forminatorData.isPro ? 'sui-button-blue' : 'sui-button-purple'); return _react2.default.createElement( 'button', { className: buttonClasses, onClick: this.openModal }, _react2.default.createElement('span', { className: 'sui-icon-upload-cloud' }), ' ', (0, _utils.translate)('Save to Cloud') ); } }]); return SaveTemplate; }(_react.Component); exports.default = SaveTemplate; /***/ }), /* 389 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _reactRedux = __webpack_require__(11); var _redux = __webpack_require__(12); var _modal = __webpack_require__(62); var modalActions = _interopRequireWildcard(_modal); var _navigation = __webpack_require__(355); var navigationActions = _interopRequireWildcard(_navigation); var _navigation2 = __webpack_require__(390); var _navigation3 = _interopRequireDefault(_navigation2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function mapStateToProps(state) { return { id: state.settings.form_id, title: state.settings.formName || '', formType: state.settings['form-type'] || 'default' }; } function mapDispatchToProps(dispatch) { return { actions: { navigationActions: (0, _redux.bindActionCreators)(navigationActions, dispatch), modalActions: (0, _redux.bindActionCreators)(modalActions, dispatch) } }; } exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_navigation3.default); /***/ }), /* 390 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Navigation; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _menu = __webpack_require__(391); var _menu2 = _interopRequireDefault(_menu); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function Navigation(props) { return _react2.default.createElement( 'div', { className: 'sui-sidenav fui-sidenav' }, _react2.default.createElement(_menu2.default, props) ); } /***/ }), /* 391 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactRouterDom = __webpack_require__(24); var _utils = __webpack_require__(1); var _mobileSelect = __webpack_require__(392); var _mobileSelect2 = _interopRequireDefault(_mobileSelect); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Menu = function (_Component) { _inherits(Menu, _Component); function Menu(props) { _classCallCheck(this, Menu); return _possibleConstructorReturn(this, (Menu.__proto__ || Object.getPrototypeOf(Menu)).call(this, props)); } _createClass(Menu, [{ key: 'render', value: function render() { var _this2 = this; var goToSection = function goToSection(module) { _this2.props.router.navigate('/' + module); }; return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'ul', { className: 'sui-vertical-tabs ' + 'sui-sidenav-sticky ' + 'sui-sidenav-hide-md ' + 'fui-sidenav' }, _react2.default.createElement( 'li', { className: 'sui-vertical-tab' }, _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder', className: function className(_ref) { var isActive = _ref.isActive; return isActive ? 'current' : ''; } }, (0, _utils.translate)('Fields') ) ), _react2.default.createElement( 'li', { className: 'sui-vertical-tab' }, _react2.default.createElement( _reactRouterDom.NavLink, { to: '/appearance', className: function className(_ref2) { var isActive = _ref2.isActive; return isActive ? 'current' : ''; } }, (0, _utils.translate)('Appearance') ) ), this.props.formType === 'registration' && _react2.default.createElement( 'li', { className: 'sui-vertical-tab' }, _react2.default.createElement( _reactRouterDom.NavLink, { to: '/registration', className: function className(_ref3) { var isActive = _ref3.isActive; return isActive ? 'current' : ''; } }, (0, _utils.translate)('User Registration') ) ), this.props.formType === 'login' && _react2.default.createElement( 'li', { className: 'sui-vertical-tab' }, _react2.default.createElement( _reactRouterDom.NavLink, { to: '/login', className: function className(_ref4) { var isActive = _ref4.isActive; return isActive ? 'current' : ''; } }, (0, _utils.translate)('User Login') ) ), this.props.formType !== 'pdf-form' && _react2.default.createElement( 'li', { className: 'sui-vertical-tab' }, _react2.default.createElement( _reactRouterDom.NavLink, { to: '/behaviour', className: function className(_ref5) { var isActive = _ref5.isActive; return isActive ? 'current' : ''; } }, (0, _utils.translate)('Behavior') ) ), this.props.formType !== 'leads' && this.props.formType !== 'pdf-form' && _react2.default.createElement( 'li', { className: 'sui-vertical-tab' }, _react2.default.createElement( _reactRouterDom.NavLink, { to: '/pdf', className: function className(_ref6) { var isActive = _ref6.isActive; return isActive ? 'current' : ''; } }, (0, _utils.translate)('PDF') ) ), _react2.default.createElement( 'li', { className: 'sui-vertical-tab' }, this.props.formType !== 'leads' && this.props.formType !== 'pdf-form' && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/notifications', className: function className(_ref7) { var isActive = _ref7.isActive; return isActive ? 'current' : ''; } }, (0, _utils.translate)('Email Notifications') ), this.props.formType === 'leads' && _react2.default.createElement( _reactRouterDom.NavLink, { to: '#', className: function className(_ref8) { var isActive = _ref8.isActive; return (isActive ? 'current ' : '') + 'sui-tooltip sui-tooltip-right sui-tooltip-constrained'; }, style: { '--tooltip-width': '235px' }, 'data-tooltip': (0, _utils.translate)('You can configure email notifications on the parent quiz as it is shared between this form and the parent quiz.') }, _react2.default.createElement( 'span', { style: { opacity: '0.4' } }, (0, _utils.translate)('Email Notifications'), _react2.default.createElement('i', { className: 'sui-icon-lock', 'aria-hidden': 'true' }) ) ) ), _react2.default.createElement( 'li', { className: 'sui-vertical-tab' }, this.props.formType !== 'leads' && this.props.formType !== 'pdf-form' && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/integrations', className: function className(_ref9) { var isActive = _ref9.isActive; return isActive ? 'current' : ''; } }, (0, _utils.translate)('Integrations') ), this.props.formType === 'leads' && _react2.default.createElement( _reactRouterDom.NavLink, { to: '#', className: function className(_ref10) { var isActive = _ref10.isActive; return (isActive ? 'current ' : '') + 'sui-tooltip sui-tooltip-right sui-tooltip-constrained'; }, style: { '--tooltip-width': '235px' }, 'data-tooltip': (0, _utils.translate)('You can configure integrations on the parent quiz as it is shared between this form and the parent quiz.') }, _react2.default.createElement( 'span', { style: { opacity: '0.4' } }, (0, _utils.translate)('Integrations'), _react2.default.createElement('i', { className: 'sui-icon-lock', 'aria-hidden': 'true' }) ) ) ), _react2.default.createElement( 'li', { className: 'sui-vertical-tab' }, this.props.formType === 'pdf-form' && _react2.default.createElement( _reactRouterDom.NavLink, { to: '#', className: function className(_ref11) { var isActive = _ref11.isActive; return (isActive ? 'current ' : '') + 'sui-tooltip sui-tooltip-top sui-tooltip-constrained'; }, style: { '--tooltip-width': '169px' }, 'data-tooltip': (0, _utils.translate)('More settings options are coming soon') }, _react2.default.createElement( 'span', { style: { opacity: '0.4' } }, (0, _utils.translate)('Settings'), _react2.default.createElement('i', { className: 'sui-icon-lock sui-sm', 'aria-hidden': 'true' }) ) ), this.props.formType !== 'pdf-form' && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/settings', className: function className(_ref12) { var isActive = _ref12.isActive; return isActive ? 'current' : ''; } }, (0, _utils.translate)('Settings') ) ) ), _react2.default.createElement( _mobileSelect2.default, this.props, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Fields') ), _react2.default.createElement( 'option', { value: 'appearance' }, (0, _utils.translate)('Appearance') ), this.props.formType === 'registration' && _react2.default.createElement( 'option', { value: 'registration' }, (0, _utils.translate)('User Registration') ), this.props.formType === 'login' && _react2.default.createElement( 'option', { value: 'login' }, (0, _utils.translate)('User Login') ), this.props.formType !== 'pdf-form' && _react2.default.createElement( 'option', { value: 'behaviour' }, (0, _utils.translate)('Behavior') ), this.props.formType !== 'leads' && this.props.formType !== 'pdf-form' && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'pdf' }, (0, _utils.translate)('PDF') ), _react2.default.createElement( 'option', { value: 'notifications' }, (0, _utils.translate)('Email Notifications') ), _react2.default.createElement( 'option', { value: 'integrations' }, (0, _utils.translate)('Integrations') ) ), this.props.formType !== 'pdf-form' && _react2.default.createElement( 'option', { value: 'settings' }, (0, _utils.translate)('Settings') ) ) ); } }]); return Menu; }(_react.Component); exports.default = (0, _withRouter.withRouter)(Menu); /***/ }), /* 392 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MobileSelect = function (_Component) { _inherits(MobileSelect, _Component); function MobileSelect(props) { _classCallCheck(this, MobileSelect); var _this = _possibleConstructorReturn(this, (MobileSelect.__proto__ || Object.getPrototypeOf(MobileSelect)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); return _this; } _createClass(MobileSelect, [{ key: 'componentDidMount', value: function componentDidMount() { this.$el = jQuery(this.el); SUI.select.init(this.$el); this.updateValue = this.updateValue.bind(this); this.$el.on('change', this.updateValue); } }, { key: 'updateValue', value: function updateValue(e) { var value = e.target.value; this.props.router.navigate('/' + value); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.$el.off('change', this.updateValue); this.$el.unbind().removeData(); } }, { key: 'render', value: function render() { var _this2 = this; return _react2.default.createElement( 'div', { className: 'sui-form-field sui-sidenav-hide-lg' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Navigate') ), _react2.default.createElement( 'select', { className: 'sui-select sui-mobile-nav', ref: function ref(el) { return _this2.el = el; } }, this.props.children ) ); } }]); return MobileSelect; }(_react.Component); exports.default = (0, _withRouter.withRouter)(MobileSelect); /***/ }), /* 393 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _reactRedux = __webpack_require__(11); var _redux = __webpack_require__(12); var _settings = __webpack_require__(113); var settingsActions = _interopRequireWildcard(_settings); var _modal = __webpack_require__(62); var modalActions = _interopRequireWildcard(_modal); var _meta = __webpack_require__(394); var _meta2 = _interopRequireDefault(_meta); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function mapStateToProps(state) { return { id: state.settings.form_id, status: state.settings.form_status, state: state, title: state.settings.formName || '', changed: window.forminatorChanges }; } function mapDispatchToProps(dispatch) { return { actions: { settingsActions: (0, _redux.bindActionCreators)(settingsActions, dispatch), modalActions: (0, _redux.bindActionCreators)(modalActions, dispatch) } }; } exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_meta2.default); /***/ }), /* 394 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _axios = __webpack_require__(37); var _axios2 = _interopRequireDefault(_axios); var _qs = __webpack_require__(38); var _qs2 = _interopRequireDefault(_qs); var _status = __webpack_require__(395); var _status2 = _interopRequireDefault(_status); var _buttons = __webpack_require__(396); var _buttons2 = _interopRequireDefault(_buttons); var _notifications = __webpack_require__(28); var _notifications2 = _interopRequireDefault(_notifications); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Meta = function (_Component) { _inherits(Meta, _Component); function Meta(props) { _classCallCheck(this, Meta); var _this = _possibleConstructorReturn(this, (Meta.__proto__ || Object.getPrototypeOf(Meta)).call(this, props)); _this.state = { publishLoading: false, draftLoading: false }; _this.publish = _this.publish.bind(_this); _this.draft = _this.draft.bind(_this); return _this; } _createClass(Meta, [{ key: 'publish', value: function publish() { var _this2 = this; var state = this.props.state; var _state$settings = state.settings, form_id = _state$settings.form_id, formName = _state$settings.formName; var formNameValue = !_.isUndefined(formName) ? formName : ''; var formId = !_.isUndefined(form_id) ? form_id : -1; this.setState({ publishLoading: true }); var data = { action: 'forminator_save_builder', _wpnonce: forminatorData.formNonce, formName: formNameValue, form_id: formId, status: 'publish', version: forminatorData.version, data: JSON.stringify(state) }; // Delay ajax a bit to imitate saving setTimeout(function () { _this2.save(data, 'publish'); }, 1500); } }, { key: 'draft', value: function draft() { var _this3 = this; var state = this.props.state; var _state$settings2 = state.settings, form_id = _state$settings2.form_id, formName = _state$settings2.formName; var formNameValue = !_.isUndefined(formName) ? formName : ''; var formId = !_.isUndefined(form_id) ? form_id : -1; this.setState({ draftLoading: true }); var data = { action: 'forminator_save_builder', _wpnonce: forminatorData.formNonce, formName: formNameValue, form_id: formId, status: 'draft', version: forminatorData.version, data: JSON.stringify(state) }; // Delay ajax a bit to imitate saving setTimeout(function () { _this3.save(data, 'draft'); }, 1500); } }, { key: 'save', value: function save(object, newStatus) { var _this4 = this; var self = this; var _props = this.props, status = _props.status, state = _props.state; _axios2.default.post(forminatorData.ajaxUrl, _qs2.default.stringify(object)).then(function (data) { // Retrieve all stripe fields from the model var stripeFields = (0, _utils.getFieldsByType)('stripe', state.wrappers); var isPublish = status === 'draft' && newStatus === 'publish' || _.isUndefined(status) && newStatus === 'publish'; if (data.data.success) { // Check if there is any Payment plan with empty Plan ID _this4.reloadPageForSubscriptionPlans(stripeFields); // Update form ID if (object.form_id === -1) { _this4.props.actions.settingsActions.updateSetting('form_id', data.data.data); // update form_id on window forminatorData, for future reference forminatorData.currentForm.settings.form_id = data.data.data; window.history.pushState({}, "Edit Form", forminatorData.formEditUrl + '&id=' + data.data.data); } // Update form status _this4.props.actions.settingsActions.saveBuilder('form_status', newStatus); if (isPublish) { // Close method var close = function close(open) { self.props.actions.modalActions.showModal({ open: false }, 'shortcode'); }; self.props.actions.modalActions.showModal({ open: true, closeModal: close }, 'shortcode'); } } else { if (isPublish) { self.props.actions.modalActions.showModal({ open: false, closeModal: _this4.closeModal }, 'publish'); } var errorText = data.data.data && 'string' === typeof data.data.data ? data.data.data : (0, _utils.translate)('Something went wrong while saving your form. Please try again.'); var custom = new _notifications2.default({ type: 'error', text: errorText }); custom.open(); } _this4.setState({ publishLoading: false, draftLoading: false }); }).catch(function (err) { var custom = new _notifications2.default({ type: 'error', text: (0, _utils.translate)('Something went wrong while saving your form. Please try again.') }); custom.open(); console.log(err); _this4.setState({ publishLoading: false, draftLoading: false }); }); } }, { key: 'reloadPageForSubscriptionPlans', value: function reloadPageForSubscriptionPlans(stripeFields) { var needsReload = false; stripeFields.map(function (field) { if (!_.isUndefined(field.payments)) { field.payments.map(function (plan) { // Check if the payment method is subscription if (!_.isUndefined(plan.payment_method) && plan.payment_method === 'subscription') { // Check if the plan ID exist if (_.isUndefined(plan.plan_id) || _.isEmpty(plan.plan_id)) { // We have to reload the page to fill the plan id to prevent multiple plans created needsReload = true; } } }); } }); // Reload the page if it needs reload if (needsReload) { window.forminatorChanges = { fields: [], settings: false, saved: true }; location.reload(); } } }, { key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'sui-box-status' }, _react2.default.createElement(_status2.default, _extends({}, this.props, { state: this.state, formType: this.props.state.settings['form-type'] })), _react2.default.createElement(_buttons2.default, _extends({}, this.props, { publish: this.publish, draft: this.draft, state: this.state })) ); } }]); return Meta; }(_react.Component); exports.default = Meta; /***/ }), /* 395 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Status; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function Status(props) { var status = props.status, formType = props.formType; var classType = ''; switch (status) { case 'publish': classType = 'sui-tag-published'; break; case 'pdf_form': classType = 'sui-tag-pdf-form'; break; default: classType = 'sui-tag-draft'; break; } var isLoading = props.state.draftLoading || props.state.publishLoading ? true : false; return _react2.default.createElement( 'div', { className: 'sui-status' }, 'pdf-form' === formType && _react2.default.createElement( 'a', { href: forminatorData.adminUrl + 'admin.php?page=forminator-cform-wizard&id=' + forminatorData.parent_form_id + '&gotosection=pdf', className: 'sui-button sui-button-ghost', style: { marginRight: '20px' } }, _react2.default.createElement( _react.Fragment, null, _react2.default.createElement('span', { className: 'sui-icon-arrow-left', 'aria-hidden': 'true' }), (0, _utils.translate)('Back to form') ) ), _react2.default.createElement( 'div', { className: 'sui-status-module' }, (0, _utils.translate)('Status'), 'pdf-form' !== props.formType && _react2.default.createElement( 'span', { className: 'sui-tag ' + classType }, function () { switch (status) { case 'publish': return (0, _utils.translate)('Published'); default: return (0, _utils.translate)('Draft'); } }() ) ), isLoading && _react2.default.createElement( 'div', { className: 'sui-status-changes' }, _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }), (0, _utils.translate)('Saving...') ), !isLoading && props.changed.settings && _react2.default.createElement( 'div', { className: 'sui-status-changes' }, _react2.default.createElement('i', { className: 'sui-icon-update', 'aria-hidden': 'true' }), (0, _utils.translate)('Unsaved changes') ), !isLoading && !props.changed.settings && props.changed.saved && _react2.default.createElement( 'div', { className: 'sui-status-changes' }, _react2.default.createElement('i', { className: 'sui-icon-check-tick', 'aria-hidden': 'true' }), (0, _utils.translate)('Saved') ) ); } /***/ }), /* 396 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _preview = __webpack_require__(356); var _preview2 = _interopRequireDefault(_preview); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Buttons = function (_Component) { _inherits(Buttons, _Component); function Buttons(props) { _classCallCheck(this, Buttons); var _this = _possibleConstructorReturn(this, (Buttons.__proto__ || Object.getPrototypeOf(Buttons)).call(this, props)); _this.publish = _this.publish.bind(_this); _this.draft = _this.draft.bind(_this); return _this; } _createClass(Buttons, [{ key: 'closeModal', value: function closeModal() { this.props.actions.modalActions.showModal({ open: false }, 'publish'); } }, { key: 'publish', value: function publish() { var self = this; var _props = this.props, status = _props.status, title = _props.title; if (_.isEmpty(title.trim())) { return; } // Call parent method for publish this.props.publish(); if (status === 'draft' || _.isEmpty(status)) { this.props.actions.modalActions.showModal({ open: true, closeModal: this.closeModal }, 'publish'); } } }, { key: 'draft', value: function draft() { var title = this.props.title; if (_.isEmpty(title.trim())) { return; } // Call parent method for draft this.props.draft(); } }, { key: 'render', value: function render() { var _props$state = this.props.state, draftLoading = _props$state.draftLoading, publishLoading = _props$state.publishLoading; var formType = forminatorData.currentForm.settings['form-type'] || 'default'; var status = this.props.status; if ('pdf-form' === formType) { status = 'pdf_form'; } return _react2.default.createElement( 'div', { className: 'sui-actions' }, 'leads' !== formType && 'pdf-form' !== formType && _react2.default.createElement( 'button', { id: 'forminator-module-save', className: 'sui-button sui-button-ghost', style: { borderColor: 'transparent' }, disabled: !!draftLoading || publishLoading, onClick: this.draft }, 'publish' === status && _react2.default.createElement( _react.Fragment, null, _react2.default.createElement('span', { className: 'sui-icon-unpublish', 'aria-hidden': 'true' }), (0, _utils.translate)('Unpublish') ), 'publish' !== status && _react2.default.createElement( _react.Fragment, null, _react2.default.createElement('span', { className: 'sui-icon-save', 'aria-hidden': 'true' }), (0, _utils.translate)('Save Draft') ) ), _react2.default.createElement(_preview2.default, _extends({}, this.props, { disabled: !!(draftLoading || publishLoading), formType: formType })), _react2.default.createElement( 'button', { id: 'forminator-module-publish', className: 'sui-button sui-button-blue', disabled: !!(draftLoading || publishLoading), onClick: this.publish }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('span', { className: 'sui-icon-web-globe-world', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'button-text' }, function () { switch (status) { case 'publish': return (0, _utils.translate)('Update'); case 'pdf_form': return (0, _utils.translate)('Save changes'); default: return (0, _utils.translate)('Publish'); } }() ) ), _react2.default.createElement('span', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ); } }]); return Buttons; }(_react.Component); exports.default = Buttons; /***/ }), /* 397 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _reactRedux = __webpack_require__(11); var _redux = __webpack_require__(12); var _builder = __webpack_require__(193); var builderActions = _interopRequireWildcard(_builder); var _modal = __webpack_require__(62); var modalActions = _interopRequireWildcard(_modal); var _integration = __webpack_require__(210); var integrationActions = _interopRequireWildcard(_integration); var _behavior = __webpack_require__(211); var behaviorsActions = _interopRequireWildcard(_behavior); var _notification = __webpack_require__(212); var notificationsActions = _interopRequireWildcard(_notification); var _builder2 = __webpack_require__(398); var _builder3 = _interopRequireDefault(_builder2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function mapStateToProps(state) { return { wrappers: state.wrappers, notifications: state.notifications, submitData: state.settings.submitData || {}, changed: window.forminatorChanges, formType: state.settings['form-type'] || '', footerData: state.settings.footerData || {} }; } function mapDispatchToProps(dispatch) { return { actions: { builderActions: (0, _redux.bindActionCreators)(builderActions, dispatch), modalActions: (0, _redux.bindActionCreators)(modalActions, dispatch), integrationActions: (0, _redux.bindActionCreators)(integrationActions, dispatch), behaviorsActions: (0, _redux.bindActionCreators)(behaviorsActions, dispatch), notificationsActions: (0, _redux.bindActionCreators)(notificationsActions, dispatch) } }; } exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_builder3.default); /***/ }), /* 398 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _insertFields = __webpack_require__(213); var _insertFields2 = _interopRequireDefault(_insertFields); var _wrapperList = __webpack_require__(399); var _wrapperList2 = _interopRequireDefault(_wrapperList); var _pagination = __webpack_require__(401); var _pagination2 = _interopRequireDefault(_pagination); var _submit = __webpack_require__(402); var _submit2 = _interopRequireDefault(_submit); var _pageHeader = __webpack_require__(403); var _pageHeader2 = _interopRequireDefault(_pageHeader); var _pageFooter = __webpack_require__(404); var _pageFooter2 = _interopRequireDefault(_pageFooter); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Builder = function (_Component) { _inherits(Builder, _Component); function Builder(props) { _classCallCheck(this, Builder); var _this = _possibleConstructorReturn(this, (Builder.__proto__ || Object.getPrototypeOf(Builder)).call(this, props)); _this.props.wrappers.map(function (wrapper) { if ('' !== wrapper.parent_group && !_.isEmpty(_.intersection((0, _utils.restrictedGroupFields)(), _.pluck(wrapper.fields, 'type')))) { wrapper.parent_group = ''; } }); return _this; } _createClass(Builder, [{ key: 'componentDidMount', value: function componentDidMount() { jQuery('html, body').animate({ scrollTop: 0 }, 'fast'); } }, { key: 'render', value: function render() { var _this2 = this; var goToSection = function goToSection(module) { _this2.props.router.navigate('/' + module); }; var hasPagination = (0, _utils.hasFieldType)('page-break', this.props.wrappers); // const hasPayPal = hasFieldType( 'paypal', this.props.wrappers ); // // const paypalModel = getFieldsByType( 'paypal', this.props.wrappers ); return _react2.default.createElement( 'div', { id: 'forminator-form-fields', className: 'sui-box' }, _react2.default.createElement(_insertFields2.default, _extends({}, this.props, { header: 'true' })), hasPagination && _react2.default.createElement(_pagination2.default, this.props), this.props.formType === 'pdf-form' && _react2.default.createElement(_pageHeader2.default, this.props), _react2.default.createElement(_wrapperList2.default, this.props), this.props.formType === 'pdf-form' && _react2.default.createElement(_pageFooter2.default, this.props), this.props.formType !== 'pdf-form' && _react2.default.createElement(_submit2.default, this.props), _react2.default.createElement( 'div', { className: 'sui-box-footer' }, _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-icon-right', onClick: function onClick() { return goToSection('appearance'); } }, (0, _utils.translate)('Appearance'), _react2.default.createElement('i', { className: 'sui-icon-arrow-right', 'aria-hidden': 'true' }) ) ) ) ); } }]); return Builder; }(_react.Component); exports.default = (0, _withRouter.withRouter)(Builder); /***/ }), /* 399 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _insertFields = __webpack_require__(213); var _insertFields2 = _interopRequireDefault(_insertFields); var _wrapper = __webpack_require__(357); var _wrapper2 = _interopRequireDefault(_wrapper); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var WrapperList = function (_Component) { _inherits(WrapperList, _Component); function WrapperList(props) { _classCallCheck(this, WrapperList); return _possibleConstructorReturn(this, (WrapperList.__proto__ || Object.getPrototypeOf(WrapperList)).call(this, props)); } _createClass(WrapperList, [{ key: 'render', value: function render() { var _this2 = this; var wrappers = _.filter(this.props.wrappers, function (wrapper) { return !wrapper.parent_group; }); return _react2.default.createElement( 'div', { id: 'forminator-builder-fields', className: 'fui-builder-fields' }, _react2.default.createElement( 'div', { className: 'fui-builder-form--wrap' }, _react2.default.createElement( 'span', { className: 'fui-swipe' }, (0, _utils.translate)('Swipe'), _react2.default.createElement('i', { className: 'sui-icon-finger-point', 'aria-hidden': 'true' }) ), _react2.default.createElement( 'div', { className: 'fui-builder-form' }, wrappers.map(function (wrapper) { return _react2.default.createElement(_wrapper2.default, _extends({}, _this2.props, { key: wrapper.wrapper_id, wrapper: wrapper })); }) ) ), _react2.default.createElement(_insertFields2.default, _extends({}, this.props, { header: 'false' })) ); } }]); return WrapperList; }(_react.Component); exports.default = WrapperList; /***/ }), /* 400 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _insertFields = __webpack_require__(213); var _insertFields2 = _interopRequireDefault(_insertFields); var _wrapper = __webpack_require__(357); var _wrapper2 = _interopRequireDefault(_wrapper); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Wrapper = function (_Component) { _inherits(Wrapper, _Component); function Wrapper(props) { _classCallCheck(this, Wrapper); var _this = _possibleConstructorReturn(this, (Wrapper.__proto__ || Object.getPrototypeOf(Wrapper)).call(this, props)); _this.el = _react2.default.createRef(); _this.cloneField = _this.cloneField.bind(_this); _this.trashField = _this.trashField.bind(_this); _this.deleteField = _this.deleteField.bind(_this); _this.closeModal = _this.closeModal.bind(_this); _this.closeDeleteField = _this.closeDeleteField.bind(_this); _this.editSettings = _this.editSettings.bind(_this); return _this; } _createClass(Wrapper, [{ key: 'componentDidMount', value: function componentDidMount() { this.drops = []; this.drop = false; this.lonerFields = (0, _utils.lonerFields)(); this.$el = jQuery(this.el.current); this.$main = this.$el.closest('#forminator-builder-fields'); this.startDragDrop(); } }, { key: 'closeMenu', value: function closeMenu() { jQuery('.sui-dropdown').removeClass('open'); } }, { key: 'deleteField', value: function deleteField() { // Hide field settings menu this.closeMenu(); if (this.props.field.type === 'page-break') { this.trashField(); return false; } this.props.actions.modalActions.showModal({ open: true, field: this.props.field, wrapper: this.props.wrapper, closeModal: this.closeDeleteField, trashField: this.trashField, id: 'field-delete', activeElement: jQuery(document.activeElement).closest('ul').siblings('.sui-dropdown-anchor'), focusFirst: '.modal-close-button' }, 'delete'); } }, { key: 'closeDeleteField', value: function closeDeleteField() { this.props.actions.modalActions.showModal({ open: false, field: this.props.field, wrapper: this.props.wrapper, closeModal: this.closeDeleteField, trashField: this.trashField }, 'delete'); } }, { key: 'trashFieldRecursively', value: function trashFieldRecursively(field, wrappers) { var _this2 = this; var wraps = this.getWrappersWithoutCurrentField(wrappers, field.element_id); // Remove group's fields. if ('group' === field.type) { wraps.filter(function (wrap) { // get group's wrappers return wrap.parent_group === field.element_id; }).map(function (wrapper) { wrapper.fields.map(function (field) { wraps = _this2.trashFieldRecursively(field, wraps); }); }); } return wraps; } }, { key: 'trashField', value: function trashField() { var wrappers = [].concat(_toConsumableArray(this.props.wrappers)); // Remove field var wraps = this.trashFieldRecursively(this.props.field, wrappers).filter(function (wrap) { return !_.isEmpty(wrap.fields); }); // Remove other fields conditions with this field ID wraps = this.getWrappersFilterCondition(wraps); // Remove field payment plan conditions wraps = this.getPaymentFilterCondition(wraps); // Update cols wraps = this.updateCols(wraps); // Hide field settings menu this.closeMenu(); // Update state this.updateState(wraps); if (!_.isUndefined(this.props.notifications) && !_.isEmpty(this.props.notifications)) { // Remove other fields conditions with this field ID var notifications = this.getNotificationFilterCondition(this.props.notifications); // Update notification state this.updateNotificationState(notifications); } } }, { key: 'duplicateFieldRecursively', value: function duplicateFieldRecursively(fields, wrappers, parent) { var _this3 = this; var wraperID = (0, _utils.generateWrapperId)(); if (_.isUndefined(parent)) { parent = ''; } var fieldObjects = []; var wraps = [].concat(_toConsumableArray(wrappers)); fields.map(function (field) { field = JSON.parse(JSON.stringify(field)); var currentField = field.element_id; var cols = 1 === fields.length ? 12 : field.cols; var fieldObject = (0, _utils.buildFieldObject)(field, wraperID, cols, wraps, fieldObjects); var newParentGroup = fieldObject.element_id; // Update the parent group if a parent exists. if (parent) { fieldObject.parent_group = parent; } fieldObjects = [].concat(_toConsumableArray(fieldObjects), [fieldObject]); // Duplicate fields inside group field if ('group' === field.type) { _this3.props.wrappers.filter(function (wrapper) { // get group's wrappers return wrapper.parent_group === currentField; }).reverse().map(function (wrapper) { wraps = _this3.duplicateFieldRecursively(wrapper.fields, wraps, newParentGroup); }); } }); // Create new wrapper var newWrapper = { wrapper_id: wraperID, parent_group: parent, fields: fieldObjects }; // Find the field wrapper index var dropIndex = wrappers.findIndex(function (wrapper) { return wrapper.wrapper_id === _this3.props.wrapper.wrapper_id; }); // Add new wrapper in correct position wraps = this.insertInPosition(wraps, dropIndex + 1, newWrapper); return wraps; } }, { key: 'cloneField', value: function cloneField(e) { var parent = jQuery(e.target).closest('.fui-builder-fields').closest('.ui-draggable').data('id'); var wraps = this.duplicateFieldRecursively([this.props.field], [].concat(_toConsumableArray(this.props.wrappers)), parent); // Hide field settings menu this.closeMenu(); // Update state this.updateState(wraps); } }, { key: 'closeModal', value: function closeModal(event) { this.props.actions.modalActions.showModal({ open: false, field: this.props.field, wrapper: this.props.wrapper }, 'field-settings'); } }, { key: 'editSettings', value: function editSettings() { // Hide field settings menu this.closeMenu(); if (this.props.field.type === 'page-break' || this.props.field.type === 'pdf-page-break') { return false; } this.props.actions.modalActions.showModal({ labelledBy: 'modal-title-field-settings', describedBy: 'modal-desc-field-settings', open: true, field: this.props.field, wrapper: this.props.wrapper, closeModal: this.closeModal, isValid: true, id: 'field-settings', activeElement: jQuery(document.activeElement).closest('ul').siblings('.sui-dropdown-anchor'), focusFirst: '.modal-close-button' }, 'field-settings'); } }, { key: 'startDragDrop', value: function startDragDrop() { this.$el.draggable({ revert: true, revertDuration: 0, zIndex: 100, helper: 'clone', cancel: '', distance: 10, appendTo: this.$main, start: jQuery.proxy(this.onDragStart, this), drag: jQuery.proxy(this.onDrag, this), stop: jQuery.proxy(this.onDragStop, this) }); } }, { key: 'onDragStart', value: function onDragStart(e) { this.setClasses(); this.createDropPoints(e.target.id); // this.showDropsDebug(); } }, { key: 'onDrag', value: function onDrag(e) { var _this4 = this; // Check if we are dragging over a drop zone var zones = [].concat(_toConsumableArray(this.drops)), closest = zones.reduce(function (prev, current) { return _this4.distToCenter(prev, e) < _this4.distToCenter(current, e) ? prev : current; }); if (closest) { this.selectDropZone(closest); } else { this.drop = false; // Remove all selected drop zones jQuery('.fui-drop-use').removeClass('fui-drop-use'); } } }, { key: 'distToCenter', value: function distToCenter(zone, e) { return Math.abs(zone.center.x - e.pageX) + Math.abs(zone.center.y - e.pageY); } }, { key: 'onDragStop', value: function onDragStop() { this.updateOnDrop(); this.resetZones(); this.resetClasses(); } }, { key: 'setClasses', value: function setClasses() { this.$helper = jQuery('.ui-draggable-dragging'); this.$el.addClass('fui-drop-shadow'); this.$main.addClass('fui-form-builder--dragging'); this.$helper.css('width', this.$el.width()); jQuery('.fui-builder-form').each(function () { var $el = jQuery(this); if (!$el.children().length) { $el.append(jQuery('<div class="fui-end-group fui-row"></div>')); } }); } }, { key: 'resetClasses', value: function resetClasses() { this.$el.removeClass('fui-drop-shadow'); this.$main.removeClass('fui-form-builder--dragging'); } }, { key: 'resetZones', value: function resetZones() { // Clear drops this.drops = []; this.drop = false; // Remove drop elemnts jQuery('.fui-drop-view').remove(); jQuery('.fui-form-builder--drop-zone').remove(); jQuery('.fui-end-group').remove(); } }, { key: 'isPayPalWrapper', value: function isPayPalWrapper(wrapper) { // Check how many fields in the wrapper if (wrapper.fields.length > 1) { // We have more than one field its not PayPal wrapper return false; } if (wrapper.fields.length === 1) { // We have only one field in the wrapper, could be PayPal wrapper var field = wrapper.fields[0]; // Check if PayPal field if (field.type === 'paypal') { return true; } } return false; } /** * Generate ID based on type and wrapper ID * @param {Object} wrapper Current element. * @param {string} id Wrapper Id. * @param {string} type Type. * @param {string} insert Insert before/after. */ }, { key: 'generateRandomID', value: function generateRandomID(wrapper, id, type, insert) { var divId = type + '-' + insert + '-' + id; var hasOne = false; var dropDiv = null; if ('before' === insert) { hasOne = wrapper.prev().hasClass('fui-drop'); dropDiv = wrapper.prev(); // Remove duplicate element if exists. if (wrapper.prev().prev().hasClass('fui-drop')) { wrapper.prev().prev().remove(); } } else { hasOne = wrapper.next().hasClass('fui-drop'); dropDiv = wrapper.next(); // Remove duplicate element if exists. if (wrapper.next().next().hasClass('fui-drop')) { wrapper.next().next().remove(); } } if (hasOne) { dropDiv.attr('id', 'forminator-drop-' + divId); } return divId; } }, { key: 'createDropPoints', value: function createDropPoints(dragItem) { var _this5 = this; var latestWrapper = void 0, latestField = void 0; var isLonerField = false; this.lonerFields.forEach(function (fieldType) { if (dragItem.includes(fieldType)) { isLonerField = true; return; } }); this.props.wrappers.forEach(function (wrapper) { // Skip PayPal wrapper as it is removed from the list // if ( this.isPayPalWrapper( wrapper ) ) { // return false; // } var restrictedGroupField = false; (0, _utils.restrictedGroupFields)().forEach(function (fieldType) { if (dragItem.includes(fieldType)) { restrictedGroupField = true; } }); if (wrapper.parent_group && restrictedGroupField) { return; } var $topWrapper = _this5.getEl(wrapper.wrapper_id); if (!$topWrapper.length) { return; } var topWrapperData = _this5.getPosition($topWrapper); _this5.drops.push({ id: _this5.generateRandomID($topWrapper, wrapper.wrapper_id, 'full', 'before'), top: topWrapperData.top - 50, bottom: topWrapperData.center.y, left: topWrapperData.left, right: topWrapperData.right, type: 'full', parent: wrapper.parent_group, insert: ['before', $topWrapper], wrapper: wrapper, is_me: false }); // Create left and right drop zones if (_.size(wrapper.fields) < 4) { if (isLonerField) { return; } wrapper.fields.map(function (field) { var $leftField = _this5.getEl('field-' + field.element_id); if (!$leftField.length) { return; } var leftFieldData = _this5.getPosition($leftField), isMe = $leftField.attr('id') === _this5.$el.attr('id'); // Field Left drop zone _this5.drops.push({ id: _this5.generateRandomID($leftField, 'field-' + field.element_id, 'side-before', 'before'), top: leftFieldData.top, bottom: leftFieldData.bottom, left: leftFieldData.left, right: leftFieldData.left + leftFieldData.width, type: 'side-before', insert: ['before', $leftField], wrapper: wrapper, field: field, is_me: isMe }); latestField = field; if ('group' === field.type && !restrictedGroupField) { // Create drop point at the end of Grop Area var $groupArea = jQuery('#field-' + field.element_id + ' > div > div > div > .fui-builder-form'), groupLatestWrapper = $groupArea.children().last(), groupAreaData = _this5.getPosition(groupLatestWrapper); _this5.drops.push({ id: _this5.generateRandomID(groupLatestWrapper, 'field-' + field.element_id, 'full', 'after'), top: groupAreaData.center.y, bottom: groupAreaData.bottom + 65, left: groupAreaData.left, right: groupAreaData.right, type: 'full', parent: field.element_id, insert: ['after', groupLatestWrapper], wrapper: wrapper, is_me: false }); } }); // Field Right drop zone var $rightField = _this5.getEl('field-' + latestField.element_id), rightFieldData = _this5.getPosition($rightField), isMe = $rightField.attr('id') === _this5.$el.attr('id'); _this5.drops.push({ id: _this5.generateRandomID($rightField, 'field-' + latestField.element_id, 'side-after', 'after'), top: rightFieldData.top, bottom: rightFieldData.bottom, left: rightFieldData.center.x, right: rightFieldData.right + 20, type: 'side-after', insert: ['after', $rightField], wrapper: wrapper, field: latestField, is_me: isMe }); } }); // don't move group inside itself this.drops = this.drops.filter(function (drop) { return _.isUndefined(drop.wrapper.wrapper_id) || !_this5.getEl(drop.wrapper.wrapper_id).closest('#' + dragItem).length; }); latestWrapper = this.props.wrappers.filter(function (wrapper) { return !wrapper.parent_group; }).pop(); // Create bottom drop point var $latestWrapper = this.getEl(latestWrapper.wrapper_id), latestWrapperData = this.getPosition($latestWrapper); this.drops.push({ id: this.generateRandomID($latestWrapper, latestWrapper.wrapper_id, 'full', 'after'), top: latestWrapperData.center.y, bottom: latestWrapperData.bottom + 65, left: latestWrapperData.left, right: latestWrapperData.right, type: 'full', insert: ['after', $latestWrapper], wrapper: latestWrapper, is_me: false }); // Render drop zones this.renderDropPoints(); } }, { key: 'getCenterXY', value: function getCenterXY(offset, width, height) { var y = Math.round(offset.top + height / 2), x = Math.round(offset.left + width / 2); return { x: x, y: y }; } }, { key: 'renderDropPoints', value: function renderDropPoints() { var _this6 = this; var $drop = void 0; // Render drop markers this.drops.forEach(function (drop) { if (jQuery('#forminator-drop-' + drop.id).length) { $drop = jQuery('#forminator-drop-' + drop.id); } else { $drop = jQuery('<div id="forminator-drop-' + drop.id + '" class="fui-drop fui-drop-' + drop.type + '"></div>'); switch (drop.insert[0]) { case 'before': $drop.insertBefore(drop.insert[1]); break; case 'after': $drop.insertAfter(drop.insert[1]); break; } } if (drop.type === 'full' || drop.type === 'inside') { $drop.css('width', drop.right - drop.left - 20); } else if (drop.type === 'side-before' || drop.type === 'side-after') { $drop.css('height', drop.bottom - drop.top - 10); } drop.center = _this6.getCenterXY($drop.offset(), parseFloat($drop.css('width')), parseFloat($drop.css('height'))); }); } }, { key: 'getPosition', value: function getPosition(el) { var $el = el, offset = $el.offset(); var width = parseFloat($el.css('width')), height = parseFloat($el.css('height')) - 10, top = offset.top, left = offset.left - 10, $prevElementData = void 0, $prevElement = $el.prev(); var bottom = top + height, right = left + width, centerY = Math.round(top + height / 2), centerX = Math.round(left + width / 2); // Is row, refactor the properties with something better if (this.isRow($el)) { // what is prev? Prev is the previous sibbling element if ($prevElement.length > 0) { $prevElementData = this.getPosition($prevElement); top = $prevElementData.center.y + 20; height = centerY - top; } } else { if ($prevElement.length > 0) { $prevElementData = this.getPosition($prevElement); left = $prevElementData.center.x; } else { width = width / 2; } } return { width: width, height: height, top: top, bottom: bottom, left: left, right: right, center: { y: centerY, x: centerX } }; } }, { key: 'isRow', value: function isRow(el) { return el.hasClass('fui-row') ? true : false; } }, { key: 'getEl', value: function getEl(el) { return jQuery('#' + el); } // Used to debug drop zones }, { key: 'showDropsDebug', value: function showDropsDebug() { { var num = Math.floor(Math.random() * (this.drops.length - 1)); var each = this.drops[num]; var border = '2px solid #' + Math.floor(Math.random() * 0xFFFFFF).toString(16); // this.drops.map( each => { var $view = jQuery('<div class="fui-drop-view"><span className="fui-drop-view-pos"></span></div>'); $view.css({ top: each.top, left: each.left, width: each.right - each.left, height: each.bottom - each.top, border: border }); this.$main.append($view); var $view2 = jQuery('<div class="fui-drop-view"><span className="fui-drop-view-pos"></span></div>'); $view2.css({ top: each.center.y, left: each.center.x, width: 15, height: 15, border: border, 'background-color': 'red' }); this.$main.append($view2); // } ); } } // Executed when dragging a field over a drop zone }, { key: 'selectDropZone', value: function selectDropZone(drop) { if (!_.isUndefined(drop.field)) { if (_.includes(this.lonerFields, drop.field.type)) { return; } } this.drop = drop; var $drop = jQuery('#forminator-drop-' + drop.id); // Remove all selected drop zones jQuery('.fui-drop-use').removeClass('fui-drop-use'); $drop.addClass('fui-drop-use'); } // Update store on field drop }, { key: 'updateOnDrop', value: function updateOnDrop() { var _this7 = this; // Check if we have a drop if (_.isUndefined(this.drop.insert)) { return; } // Restrict moving some fields into Group field. if (_.contains((0, _utils.restrictedGroupFields)(), this.props.field.type) && (this.isWrapperDrop() && !_.isUndefined(this.drop.parent) && this.drop.parent.startsWith('group-') || !this.isWrapperDrop() && this.drop.wrapper.parent_group)) { return; } var insertType = this.drop.insert[0]; var insertWrap = this.drop.insert[1]; // New array of wrappers var wrappers = [].concat(_toConsumableArray(this.props.wrappers)); var field = Object.assign({}, this.props.field); if (this.isWrapperDrop()) { // Update the parent group for the field. field.parent_group = _.isUndefined(this.drop.parent) ? '' : this.drop.parent; // We have to create new wrapper var newWrapper = { wrapper_id: (0, _utils.generateWrapperId)(), parent_group: this.drop.parent, fields: [field] }; // Drop zone index var dropIndex = wrappers.findIndex(function (wrapper) { return wrapper.wrapper_id === insertWrap.attr('id'); }); // If drop zone after increase the index if (insertType === 'after') { dropIndex++; } // Remove field from old wrapper var wraps = this.getWrappersWithoutCurrentField(wrappers); // Add new wrapper in correct position and filter wrappers with no fields wraps = this.insertInPosition(wraps, dropIndex, newWrapper).filter(function (wrap) { return !_.isEmpty(wrap.fields); }); // Update cols wraps = this.updateCols(wraps); // Update state this.updateState(wraps); } else { // Drop zone wrapper index var dropWrapperIndex = wrappers.findIndex(function (wrapper) { return wrapper.wrapper_id === _this7.drop.wrapper.wrapper_id; }); // Remove field from old wrapper var _wraps = this.getWrappersWithoutCurrentField(wrappers); // Drop zone field index var _dropIndex = this.drop.wrapper.fields.findIndex(function (dropField) { return dropField.element_id === insertWrap.data('id'); }); // If drop zone after increase the index if (insertType === 'after') { _dropIndex++; } var wrap = this.drop.wrapper; // Generate new fields var fields = this.insertInPosition(wrap.fields, _dropIndex, field); // Update fields wrap.fields = fields; // Add new wrapper in correct position and filter wrappers with no fields _wraps = this.replaceInPosition(_wraps, dropWrapperIndex, wrap).filter(function (fieldWrapper) { return !_.isEmpty(fieldWrapper.fields); }); // Update cols _wraps = this.updateCols(_wraps); // Update state this.updateState(_wraps); } } }, { key: 'updateState', value: function updateState(wrappers) { this.props.actions.builderActions.updateFields(wrappers); } }, { key: 'updateNotificationState', value: function updateNotificationState(notification) { this.props.actions.notificationsActions.updateNotifications(notification); } }, { key: 'updateCols', value: function updateCols(wrappers) { wrappers.map(function (wrapper) { var remainingItemsCols = 12 / wrapper.fields.length; wrapper.fields.map(function (field) { field.cols = remainingItemsCols; }); }); return wrappers; } }, { key: 'getWrappersWithoutCurrentField', value: function getWrappersWithoutCurrentField(wrappers, fieldId) { if (_.isUndefined(fieldId)) { fieldId = this.props.field.element_id; } return wrappers.map(function (wrapper) { wrapper.fields = wrapper.fields.filter(function (field) { return field.element_id !== fieldId; }); return wrapper; }); } }, { key: 'getWrappersFilterCondition', value: function getWrappersFilterCondition(wrappers) { var _this8 = this; var wraps = wrappers.map(function (wrapper) { wrapper.fields.map(function (field) { field.conditions = _.filter(field.conditions, function (condition) { return condition.element_id !== _this8.props.field.element_id; }); return field; }); return wrapper; }); return wraps; } }, { key: 'getNotificationFilterCondition', value: function getNotificationFilterCondition(notifications) { var _this9 = this; var notify = notifications.map(function (notification) { notification.conditions = _.filter(notification.conditions, function (condition) { return condition.element_id !== _this9.props.field.element_id; }); return notification; }); return notify; } }, { key: 'getPaymentFilterCondition', value: function getPaymentFilterCondition(wrappers) { var _this10 = this; var wraps = wrappers.map(function (wrapper) { wrapper.fields.map(function (field) { if (!_.isEmpty(field.payments)) { field.payments.map(function (payment) { payment.conditions = _.filter(payment.conditions, function (condition) { return condition.element_id !== _this10.props.field.element_id; }); return payment; }); } return field; }); return wrapper; }); return wraps; } }, { key: 'insertInPosition', value: function insertInPosition(array, position, replacement) { return [].concat(_toConsumableArray(array.slice(0, position)), [replacement], _toConsumableArray(array.slice(position))); } }, { key: 'replaceInPosition', value: function replaceInPosition(array, position, replacement) { return [].concat(_toConsumableArray(array.slice(0, position)), [replacement], _toConsumableArray(array.slice(position + 1))); } // Return true if we dropped the field in Wrapper zone, else false }, { key: 'isWrapperDrop', value: function isWrapperDrop() { if (_.isUndefined(this.drop.field)) { return true; } return false; } }, { key: 'conditionMarkup', value: function conditionMarkup() { var mappedFields = (0, _utils.getFields)(this.props.wrappers, null, { main_date_field: true }); var actionLabel = this.props.field.condition_action === 'hide' ? (0, _utils.translate)('Hide') : (0, _utils.translate)('Show'); // Condition does not exist, return if (_.isUndefined(this.props.field.conditions)) { return; } // Get first condition var firstCondition = this.props.field.conditions[0]; // Condition does not exist, return if (_.isUndefined(firstCondition)) { return; } // Get condition field data var conditionData = _.filter(mappedFields, function (field) { return field.element_id === firstCondition.element_id; }); // Condition field not exist ( could be deleted ), return if (_.isUndefined(conditionData)) { return; } // Bail if no label for condition data is found // Prevent error when time/date fields format changes. if (_.isUndefined(conditionData[0])) { return; } var fieldLabel = conditionData[0].label; var ruleLabel = (0, _utils.getRuleLabel)(firstCondition.rule, conditionData.field_type); var valueLabel = (0, _utils.getConditionLabel)(conditionData[0], firstCondition); var total = this.props.field.conditions.length; var more = ''; if (total - 1 > 0) { more = '+ ' + (total - 1) + ' ' + (0, _utils.translate)('more condition(s)'); } return _react2.default.createElement( 'span', { className: 'fui-builder-field-block-conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile', 'data-tooltip': actionLabel + ' ' + (0, _utils.translate)('if') + ' ' + fieldLabel + ' ' + ruleLabel + ' ' + valueLabel + ' ' + more }, _react2.default.createElement('i', { className: 'sui-icon-link', 'aria-hidden': 'true' }) ); } }, { key: 'draggableArea', value: function draggableArea(group_id) { var _this11 = this; var wrappers = _.filter(this.props.wrappers, function (wrapper) { return wrapper.parent_group === group_id; }); return _react2.default.createElement( 'div', { className: 'fui-builder-fields' }, _react2.default.createElement( 'div', { className: 'fui-builder-form--wrap' }, _react2.default.createElement( 'span', { className: 'fui-swipe' }, (0, _utils.translate)('Swipe'), _react2.default.createElement('i', { className: 'sui-icon-finger-point', 'aria-hidden': 'true' }) ), _react2.default.createElement( 'div', { className: 'fui-builder-form' }, wrappers.map(function (wrapper) { return _react2.default.createElement(_wrapper2.default, _extends({}, _this11.props, { key: wrapper.wrapper_id, wrapper: wrapper })); }) ) ), _react2.default.createElement(_insertFields2.default, _extends({}, this.props, { header: 'false', group: group_id })) ); } }, { key: 'isDeleteEnabled', value: function isDeleteEnabled() { // Check if login form if (this.props.formType === 'login') { // Check if current field is password field if (this.props.field.type === 'password') { // Check total fields count if ((0, _utils.countFieldsByType)('password', this.props.wrappers) < 2) { return false; } } } // Check if registration form if (this.props.formType === 'registration' || this.props.formType === 'leads') { // Check if current field is email field if (this.props.field.type === 'email') { // Check total fields count if ((0, _utils.countFieldsByType)('email', this.props.wrappers) < 2) { return false; } } } return true; } }, { key: 'render', value: function render() { var _this12 = this; var forminatorField = forminatorData.fields.find(function (field) { return field.type === _this12.props.field.type; }); var isChanged = _.contains(this.props.changed.fields, this.props.field.element_id); var blockClass = isChanged ? 'fui-unsaved' : ''; var conditionData = this.conditionMarkup(); var draggableArea = void 0; if ('group' === this.props.field.type) { draggableArea = this.draggableArea(this.props.field.element_id); } if (_.isUndefined(forminatorField)) { return _react2.default.createElement('div', null); } // Hide PayPal from the list and display it instead of submit button // if ( this.props.field.type === 'paypal' ) { // return ( // <React.Fragment /> // ); // } return _react2.default.createElement( 'div', { id: 'field-' + this.props.field.element_id, className: 'fui-col-' + this.props.field.cols, ref: this.el, 'data-id': this.props.field.element_id }, _react2.default.createElement( 'div', { className: 'fui-builder-field-block ' + blockClass, 'data-field': this.props.field.type }, _react2.default.createElement( 'div', { className: 'fui-field--info', onClick: this.editSettings }, _react2.default.createElement( 'span', { className: 'fui-field--move' }, _react2.default.createElement('i', { className: 'sui-icon-drag', 'aria-hidden': 'true' }) ), _react2.default.createElement( 'span', { className: 'fui-field--icon' }, _react2.default.createElement('i', { className: forminatorField.icon, 'aria-hidden': 'true' }) ), _react2.default.createElement( 'span', { className: 'fui-field--name' }, /** * CONDITION: * Show field label and field id, if both are available */ this.props.field.field_label && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'span', { className: 'fui-field--label' }, this.props.field.field_label, /* Show required (asterisk) if applies */ ((0, _utils.isFieldRequired)(this.props.field) || this.props.field.type === 'stripe') && _react2.default.createElement( 'span', { className: 'sui-error' }, '*' ) ), this.props.formType !== 'pdf-form' && _react2.default.createElement( 'span', { className: 'fui-field--id' }, '{', this.props.field.element_id, '}' ) ), /** * CONDITION: * Show field name and field id, if field label is empty */ !this.props.field.field_label && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'span', { className: 'fui-field--label' }, this.props.field.section_title || forminatorField.name, /* Show required (asterisk) if applies */ (0, _utils.isFieldRequired)(this.props.field) && _react2.default.createElement( 'span', { className: 'sui-error' }, '*' ) ), this.props.formType !== 'pdf-form' && _react2.default.createElement( 'span', { className: 'fui-field--id' }, '{', this.props.field.element_id, '}' ) ) ) ), _react2.default.createElement( 'div', { className: 'fui-field--actions' }, _react2.default.createElement( 'div', { className: 'sui-dropdown' }, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-dropdown-anchor' }, _react2.default.createElement('i', { className: 'sui-icon-widget-settings-config', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Field options') ) ), _react2.default.createElement( 'ul', null, this.props.field.type !== 'page-break' && this.props.field.type !== 'pdf-page-break' && _react2.default.createElement( 'li', null, _react2.default.createElement( 'button', { className: 'forminator-field-edit', onClick: this.editSettings }, _react2.default.createElement('i', { className: 'sui-icon-widget-settings-config', 'aria-hidden': 'true' }), (0, _utils.translate)('Edit Field') ) ), this.props.field.type !== 'stripe' && this.props.field.type !== 'paypal' && this.props.field.type !== 'password' && this.props.field.type !== 'captcha' && _react2.default.createElement( 'li', null, _react2.default.createElement( 'button', { className: 'forminator-field-clone', onClick: this.cloneField }, _react2.default.createElement('i', { className: 'sui-icon-copy', 'aria-hidden': 'true' }), (0, _utils.translate)('Duplicate') ) ), this.isDeleteEnabled() && _react2.default.createElement( 'li', null, _react2.default.createElement( 'button', { className: 'forminator-field-remove sui-option-red', onClick: this.deleteField }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), (0, _utils.translate)('Delete') ) ) ) ) ), !_.isUndefined(this.props.field.conditions) && this.props.field.conditions.length > 0 && _react2.default.createElement( _react2.default.Fragment, null, conditionData ), !_.isUndefined(draggableArea) && _react2.default.createElement( _react2.default.Fragment, null, draggableArea ) ) ); } }]); return Wrapper; }(_react.Component); exports.default = Wrapper; /***/ }), /* 401 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Pagination = function (_Component) { _inherits(Pagination, _Component); function Pagination(props) { _classCallCheck(this, Pagination); var _this = _possibleConstructorReturn(this, (Pagination.__proto__ || Object.getPrototypeOf(Pagination)).call(this, props)); _this.closeModal = _this.closeModal.bind(_this); _this.editSettings = _this.editSettings.bind(_this); return _this; } _createClass(Pagination, [{ key: 'closeModal', value: function closeModal() { this.props.actions.modalActions.showModal({ open: false }, 'pagination'); } }, { key: 'editSettings', value: function editSettings() { this.props.actions.modalActions.showModal({ open: true, closeModal: this.closeModal, id: 'pagination-settings', activeElement: jQuery(document.activeElement), focusFirst: '.modal-close-button' }, 'pagination'); } }, { key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'sui-box-body fui-builder-section--pagination' }, _react2.default.createElement( 'div', { className: 'fui-builder-field-block fui-has-info', 'data-field': 'pagination' }, _react2.default.createElement( 'span', { className: 'fui-info sui-tooltip sui-tooltip-top-left sui-tooltip-constrained', style: { '--tooltip-width': '275px' }, 'data-tooltip': (0, _utils.translate)('Since you are using Page Break field(s) to divide ' + 'your form into multiple pages, use the pagination ' + 'settings to customize the page label, progress indicator, ' + 'and the buttons on each page.') }, _react2.default.createElement('i', { className: 'sui-icon-info', 'aria-hidden': 'true' }) ), _react2.default.createElement( 'div', { className: 'fui-field--info', onClick: this.editSettings }, _react2.default.createElement( 'span', { className: 'fui-field--icon' }, _react2.default.createElement('i', { className: 'sui-icon forminator-icon-pagination', 'aria-hidden': 'true' }) ), _react2.default.createElement( 'span', { className: 'fui-field--name' }, _react2.default.createElement( 'span', { className: 'fui-field--label' }, (0, _utils.translate)('Pagination') ) ) ), _react2.default.createElement( 'div', { className: 'fui-field--actions' }, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-tooltip', 'data-tooltip': (0, _utils.translate)('Edit field'), onClick: this.editSettings }, _react2.default.createElement('i', { className: 'sui-icon-widget-settings-config', 'aria-hidden': 'true' }) ) ) ) ); } }]); return Pagination; }(_react.Component); exports.default = Pagination; /***/ }), /* 402 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Submit = function (_Component) { _inherits(Submit, _Component); function Submit(props) { _classCallCheck(this, Submit); var _this = _possibleConstructorReturn(this, (Submit.__proto__ || Object.getPrototypeOf(Submit)).call(this, props)); _this.closeModal = _this.closeModal.bind(_this); _this.editSettings = _this.editSettings.bind(_this); return _this; } _createClass(Submit, [{ key: 'closeModal', value: function closeModal() { this.props.actions.modalActions.showModal({ open: false }, 'submit'); } }, { key: 'editSettings', value: function editSettings() { this.props.actions.modalActions.showModal({ open: true, closeModal: this.closeModal }, 'submit'); } }, { key: 'conditionMarkup', value: function conditionMarkup() { var fields = (0, _utils.getFields)(this.props.wrappers); var actionLabel = this.props.submitData.condition_action === 'hide' ? (0, _utils.translate)('Hide') : (0, _utils.translate)('Show'); // Condition does not exist, return if (_.isUndefined(this.props.submitData.conditions)) { return; } // Get first condition var firstCondition = this.props.submitData.conditions[0]; // Condition does not exist, return if (_.isUndefined(firstCondition)) { return; } // Get condition field data var conditionData = _.filter(fields, function (field) { return field.element_id === firstCondition.element_id; }); // Condition field not exist ( could be deleted ), return if (_.isUndefined(conditionData) || _.isEmpty(conditionData)) { return; } var fieldLabel = conditionData[0].label; var ruleLabel = (0, _utils.getRuleLabel)(firstCondition.rule, conditionData.field_type); var valueLabel = (0, _utils.getConditionLabel)(conditionData[0], firstCondition); var total = this.props.submitData.conditions.length; var more = ''; if (total - 1 > 0) { more = '+ ' + (total - 1) + ' ' + (0, _utils.translate)('more condition(s)'); } return _react2.default.createElement( 'span', { className: 'fui-builder-field-block-conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile', 'data-tooltip': actionLabel + ' ' + (0, _utils.translate)('if') + ' ' + fieldLabel + ' ' + ruleLabel + ' ' + valueLabel + ' ' + more }, _react2.default.createElement('i', { className: 'sui-icon-link', 'aria-hidden': 'true' }) ); } }, { key: 'render', value: function render() { var label = !_.isUndefined(this.props.submitData['custom-submit-text']) ? this.props.submitData['custom-submit-text'] : (0, _utils.translate)('Submit'); return _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'div', { className: 'fui-builder-field-block', 'data-field': 'submit' }, _react2.default.createElement( 'div', { className: 'fui-field--info', onClick: this.editSettings }, _react2.default.createElement( 'span', { className: 'fui-field--icon' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }) ), _react2.default.createElement( 'span', { className: 'fui-field--name' }, _react2.default.createElement( 'span', { className: 'fui-field--label' }, label ) ) ), _react2.default.createElement( 'div', { className: 'fui-field--actions' }, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-tooltip', 'data-tooltip': (0, _utils.translate)('Edit field'), onClick: this.editSettings }, _react2.default.createElement('i', { className: 'sui-icon-widget-settings-config', 'aria-hidden': 'true' }) ) ), !_.isUndefined(this.props.submitData) && !_.isUndefined(this.props.submitData.conditions) && this.props.submitData.conditions.length > 0 && _react2.default.createElement( _react2.default.Fragment, null, this.conditionMarkup() ) ) ); } }]); return Submit; }(_react.Component); exports.default = Submit; /***/ }), /* 403 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var pageHeader = function (_Component) { _inherits(pageHeader, _Component); function pageHeader(props) { _classCallCheck(this, pageHeader); var _this = _possibleConstructorReturn(this, (pageHeader.__proto__ || Object.getPrototypeOf(pageHeader)).call(this, props)); _this.closeModal = _this.closeModal.bind(_this); _this.editSettings = _this.editSettings.bind(_this); return _this; } _createClass(pageHeader, [{ key: 'closeModal', value: function closeModal() { this.props.actions.modalActions.showModal({ open: false }, 'pageHeader'); } }, { key: 'editSettings', value: function editSettings() { this.props.actions.modalActions.showModal({ open: true, closeModal: this.closeModal }, 'pageHeader'); } }, { key: 'render', value: function render() { var label = (0, _utils.translate)('Page Header'); return _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'div', { className: 'fui-builder-field-block', 'data-field': 'submit' }, _react2.default.createElement( 'div', { className: 'fui-field--info', onClick: this.editSettings }, _react2.default.createElement( 'span', { className: 'fui-field--icon' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }) ), _react2.default.createElement( 'span', { className: 'fui-field--name' }, _react2.default.createElement( 'span', { className: 'fui-field--label' }, label ) ) ), _react2.default.createElement( 'div', { className: 'fui-field--actions' }, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-tooltip', 'data-tooltip': (0, _utils.translate)('Edit field'), onClick: this.editSettings }, _react2.default.createElement('i', { className: 'sui-icon-widget-settings-config', 'aria-hidden': 'true' }) ) ) ) ); } }]); return pageHeader; }(_react.Component); exports.default = pageHeader; /***/ }), /* 404 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var pageFooter = function (_Component) { _inherits(pageFooter, _Component); function pageFooter(props) { _classCallCheck(this, pageFooter); var _this = _possibleConstructorReturn(this, (pageFooter.__proto__ || Object.getPrototypeOf(pageFooter)).call(this, props)); _this.closeModal = _this.closeModal.bind(_this); _this.editSettings = _this.editSettings.bind(_this); return _this; } _createClass(pageFooter, [{ key: 'closeModal', value: function closeModal() { this.props.actions.modalActions.showModal({ open: false }, 'pageFooter'); } }, { key: 'editSettings', value: function editSettings() { this.props.actions.modalActions.showModal({ open: true, closeModal: this.closeModal }, 'pageFooter'); } }, { key: 'render', value: function render() { var label = (0, _utils.translate)('Page Footer'); return _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'div', { className: 'fui-builder-field-block', 'data-field': 'submit' }, _react2.default.createElement( 'div', { className: 'fui-field--info', onClick: this.editSettings }, _react2.default.createElement( 'span', { className: 'fui-field--icon' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }) ), _react2.default.createElement( 'span', { className: 'fui-field--name' }, _react2.default.createElement( 'span', { className: 'fui-field--label' }, label ) ) ), _react2.default.createElement( 'div', { className: 'fui-field--actions' }, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-tooltip', 'data-tooltip': (0, _utils.translate)('Edit field'), onClick: this.editSettings }, _react2.default.createElement('i', { className: 'sui-icon-widget-settings-config', 'aria-hidden': 'true' }) ) ) ) ); } }]); return pageFooter; }(_react.Component); exports.default = pageFooter; /***/ }), /* 405 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _reactRedux = __webpack_require__(11); var _redux = __webpack_require__(12); var _modal = __webpack_require__(406); var _modal2 = _interopRequireDefault(_modal); var _modal3 = __webpack_require__(62); var modalActions = _interopRequireWildcard(_modal3); var _builder = __webpack_require__(193); var builderActions = _interopRequireWildcard(_builder); var _settings = __webpack_require__(113); var settingsActions = _interopRequireWildcard(_settings); var _notification = __webpack_require__(212); var notificationsActions = _interopRequireWildcard(_notification); var _integration = __webpack_require__(210); var integrationActions = _interopRequireWildcard(_integration); var _behavior = __webpack_require__(211); var behaviorsActions = _interopRequireWildcard(_behavior); var _pdfs = __webpack_require__(378); var pdfsActions = _interopRequireWildcard(_pdfs); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function mapStateToProps(state) { return { modal: state.modal, wrappers: state.wrappers, settings: state.settings, notifications: state.notifications, id: state.settings.form_id || -1, formType: state.settings['form-type'] || 'default', skipProNotice: state.settings.skipProNotice || forminatorData.skip_pro_notice || false, pdfs: state.pdfs || {} }; } function mapDispatchToProps(dispatch) { return { actions: { modalActions: (0, _redux.bindActionCreators)(modalActions, dispatch), builderActions: (0, _redux.bindActionCreators)(builderActions, dispatch), settingsActions: (0, _redux.bindActionCreators)(settingsActions, dispatch), integrationActions: (0, _redux.bindActionCreators)(integrationActions, dispatch), behaviorsActions: (0, _redux.bindActionCreators)(behaviorsActions, dispatch), notificationsActions: (0, _redux.bindActionCreators)(notificationsActions, dispatch), pdfsActions: (0, _redux.bindActionCreators)(pdfsActions, dispatch) } }; } exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_modal2.default); /***/ }), /* 406 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(23); var _reactDom2 = _interopRequireDefault(_reactDom); var _modals = __webpack_require__(407); var _modals2 = _interopRequireDefault(_modals); var _focusTrap = __webpack_require__(171); var _focusTrap2 = _interopRequireDefault(_focusTrap); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MODAL_TYPES = { 'insert-fields': _modals2.default.fieldsModal, 'field-settings': _modals2.default.settingsModal, preview: _modals2.default.previewModal, submit: _modals2.default.submitModal, publish: _modals2.default.publishModal, delete: _modals2.default.deleteModal, shortcode: _modals2.default.shortcodeModal, applyPreset: _modals2.default.applyPresetModal, pagination: _modals2.default.paginationModal, notification: _modals2.default.notificationModal, behavior: _modals2.default.behaviorModal, integration: _modals2.default.integrationConditionsModal, deleteNotification: _modals2.default.deleteNotificationModal, deletePdf: _modals2.default.deletePdfModal, accessPdfAddon: _modals2.default.accessPdfAddonModal, pageHeader: _modals2.default.pageHeaderModal, pageFooter: _modals2.default.pageFooterModal, savedTemplateProModal: _modals2.default.savedTemplateProModal, savedTemplateModal: _modals2.default.savedTemplateModal, savedTemplateSuccessModal: _modals2.default.savedTemplateSuccessModal }; /* global setTimeout,clearTimeout */ var Modal = function (_Component) { _inherits(Modal, _Component); function Modal(props) { _classCallCheck(this, Modal); var _this = _possibleConstructorReturn(this, (Modal.__proto__ || Object.getPrototypeOf(Modal)).call(this, props)); _this.modelRef = _react2.default.createRef(); return _this; } _createClass(Modal, [{ key: 'componentDidUpdate', value: function componentDidUpdate(prevProps) { var _this2 = this; this.$el = jQuery(this.el); var self = this; if (prevProps.modal.modalProps.open !== this.props.modal.modalProps.open) { var modalElement = this.modelRef.current; if (this.props.modal.modalProps.open) { this.focusAfterClosed = this.props.modal.modalProps.activeElement; var focusFirst = this.props.modal.modalProps.focusFirst; setTimeout(function () { if ('string' === typeof focusFirst) { self.focusFirst = self.$el.find(focusFirst); } else if ('object' === (typeof focusFirst === 'undefined' ? 'undefined' : _typeof(focusFirst))) { self.focusFirst = focusFirst; } else { self.focusFirst = null; } if (self.focusFirst && self.focusFirst.length) { self.setFocus(self.focusFirst.first()); } }, 320); jQuery('#wpwrap').attr('aria-hidden', 'true'); } if (!this.props.modal.modalProps.open) { jQuery('#wpwrap').attr('aria-hidden', 'false'); setTimeout(function () { self.setFocus(self.focusAfterClosed); }, 320); this.hideModalTimeout = setTimeout(function () { modalElement.setAttribute('aria-hidden', 'true'); // cleanup _this2.props.modal.modalType = null; _this2.forceUpdate(); }, 300); } else { modalElement.removeAttribute('aria-hidden'); } } } }, { key: 'setFocus', value: function setFocus(element) { var focusInterval = 10; // ms, time between function calls var focusTotalRepetitions = 10; // number of repetitions if (typeof element === 'undefined') { return; } element.attr('tabindex', '0'); element.blur(); var focusRepetitions = 0; var interval = window.setInterval(function () { element.focus(); focusRepetitions++; if (focusRepetitions >= focusTotalRepetitions) { window.clearInterval(interval); } }, focusInterval); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { clearTimeout(this.hideModalTimeout); } }, { key: 'render', value: function render() { if (!this.props.modal.modalType) { return null; } var modalClass = 'sui-modal-lg'; var overlayClass = ['sui-modal-content', 'sui-content-fade-in']; if (!this.props.modal.modalProps.open) { overlayClass = ['sui-modal-content', 'sui-content-fade-out']; } var modalType = this.props.modal.modalType; var SpecifiedModal = MODAL_TYPES[modalType]; if ('publish' === modalType) { modalClass = 'sui-modal-sm fui-dialog-publish'; } if ('shortcode' === modalType) { modalClass = 'sui-modal-sm fui-dialog-publish'; } var smModalType = ['delete', 'deleteNotification', 'applyPreset', 'deletePdf', 'savedTemplateModal', 'savedTemplateSuccessModal']; if (smModalType.includes(modalType)) { modalClass = 'sui-modal-sm'; } if (!_.isUndefined(this.props.modal.modalProps) && !_.isUndefined(this.props.modal.modalProps.field) && !_.isUndefined(this.props.modal.modalProps.field.type)) { var fieldType = this.props.modal.modalProps.field.type; if (fieldType === 'radio' || fieldType === 'checkbox' || fieldType === 'select') { modalClass += ' multivalue-modal'; } else { modalClass += ' ' + this.props.modal.modalProps.field.type + '-modal'; } } var classes = jQuery('.sui-color-accessible').length ? 'sui-wrap sui-color-accessible' : 'sui-wrap'; return _react2.default.createElement( 'div', { className: classes }, _react2.default.createElement( 'div', { id: 'forminator-modal', className: 'sui-modal sui-active ' + modalClass + ' ' + modalType }, _react2.default.createElement( 'div', _extends({ role: 'dialog', id: 'modal-' + this.props.modal.modalProps.id, className: '' + overlayClass.join(' '), 'aria-modal': 'true', 'aria-live': 'polite' }, this.props.modal.modalProps.labelledBy && { 'aria-labelledby': this.props.modal.modalProps.labelledBy }, this.props.modal.modalProps.describedBy && { 'aria-describedby': this.props.modal.modalProps.describedBy }, { ref: this.modelRef }), _react2.default.createElement( 'div', { className: 'sui-box', style: { marginBottom: 0 } }, _react2.default.createElement(SpecifiedModal, this.props) ) ) ) ); } }]); return Modal; }(_react.Component); // Create a DisplacedModal component var DisplacedModal = function DisplacedModal(_ref) { var _ref$renderTo = _ref.renderTo, renderTo = _ref$renderTo === undefined ? document.body : _ref$renderTo, props = _objectWithoutProperties(_ref, ['renderTo']); return _reactDom2.default.createPortal(_react2.default.createElement(Modal, props), renderTo); }; // Method to render to a specific DOM element DisplacedModal.renderTo = function (input) { return function (props) { return _react2.default.createElement(DisplacedModal, _extends({}, props, { renderTo: input })); }; }; module.exports = DisplacedModal; /***/ }), /* 407 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _fields = __webpack_require__(408); var _fields2 = _interopRequireDefault(_fields); var _settings = __webpack_require__(409); var _settings2 = _interopRequireDefault(_settings); var _preview = __webpack_require__(542); var _preview2 = _interopRequireDefault(_preview); var _submit = __webpack_require__(543); var _submit2 = _interopRequireDefault(_submit); var _publish = __webpack_require__(544); var _publish2 = _interopRequireDefault(_publish); var _delete = __webpack_require__(545); var _delete2 = _interopRequireDefault(_delete); var _shortcode = __webpack_require__(546); var _shortcode2 = _interopRequireDefault(_shortcode); var _applyPreset = __webpack_require__(547); var _applyPreset2 = _interopRequireDefault(_applyPreset); var _pagination = __webpack_require__(548); var _pagination2 = _interopRequireDefault(_pagination); var _notification = __webpack_require__(550); var _notification2 = _interopRequireDefault(_notification); var _behavior = __webpack_require__(559); var _behavior2 = _interopRequireDefault(_behavior); var _integrationConditions = __webpack_require__(562); var _integrationConditions2 = _interopRequireDefault(_integrationConditions); var _deleteNotification = __webpack_require__(565); var _deleteNotification2 = _interopRequireDefault(_deleteNotification); var _deletePdf = __webpack_require__(566); var _deletePdf2 = _interopRequireDefault(_deletePdf); var _accessPdfAddon = __webpack_require__(567); var _accessPdfAddon2 = _interopRequireDefault(_accessPdfAddon); var _pageHeader = __webpack_require__(568); var _pageHeader2 = _interopRequireDefault(_pageHeader); var _pageFooter = __webpack_require__(569); var _pageFooter2 = _interopRequireDefault(_pageFooter); var _saveTemplate = __webpack_require__(570); var _saveTemplate2 = _interopRequireDefault(_saveTemplate); var _saveTemplateSuccess = __webpack_require__(571); var _saveTemplateSuccess2 = _interopRequireDefault(_saveTemplateSuccess); var _saveTemplatePro = __webpack_require__(572); var _saveTemplatePro2 = _interopRequireDefault(_saveTemplatePro); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var modalTypes = { fieldsModal: _fields2.default, settingsModal: _settings2.default, previewModal: _preview2.default, submitModal: _submit2.default, publishModal: _publish2.default, deleteModal: _delete2.default, shortcodeModal: _shortcode2.default, applyPresetModal: _applyPreset2.default, paginationModal: _pagination2.default, notificationModal: _notification2.default, behaviorModal: _behavior2.default, integrationConditionsModal: _integrationConditions2.default, deleteNotificationModal: _deleteNotification2.default, deletePdfModal: _deletePdf2.default, accessPdfAddonModal: _accessPdfAddon2.default, pageHeaderModal: _pageHeader2.default, pageFooterModal: _pageFooter2.default, savedTemplateModal: _saveTemplate2.default, savedTemplateProModal: _saveTemplatePro2.default, savedTemplateSuccessModal: _saveTemplateSuccess2.default }; exports.default = modalTypes; /***/ }), /* 408 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _notifications = __webpack_require__(28); var _notifications2 = _interopRequireDefault(_notifications); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _footer = __webpack_require__(59); var _footer2 = _interopRequireDefault(_footer); var _close = __webpack_require__(63); var _close2 = _interopRequireDefault(_close); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); var _reactButtonIcon = __webpack_require__(21); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* global forminatorData */ var fieldsModal = function (_Component) { _inherits(fieldsModal, _Component); function fieldsModal(props) { _classCallCheck(this, fieldsModal); var _this = _possibleConstructorReturn(this, (fieldsModal.__proto__ || Object.getPrototypeOf(fieldsModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.closeSettingsModal = _this.closeSettingsModal.bind(_this); _this.insertFields = _this.insertFields.bind(_this); _this.skipProNotice = _this.skipProNotice.bind(_this); _this.state = { fields: [] }; _this.hasCaptcha = false; _this.hasStripe = false; _this.hasPayPal = false; _this.hasStripePayPal = false; _this.missingPaymentField = false; return _this; } _createClass(fieldsModal, [{ key: 'closeSettingsModal', value: function closeSettingsModal(event) { this.props.actions.modalActions.showModal({ open: false, field: [], wrapper: [] }, 'field-settings'); var hasStripe = (0, _utils.hasFieldType)('stripe', this.props.wrappers); var hasPayPal = (0, _utils.hasFieldType)('paypal', this.props.wrappers); if (_.contains(this.state.fields, 'stripe') && hasPayPal || _.contains(this.state.fields, 'paypal') && hasStripe) { this.showPaymentNotice(); } } }, { key: 'insertFields', value: function insertFields() { if (!this.state.fields.length) { return; } if (this.hasStripe || this.hasCaptcha || this.hasPayPal) { return false; } var parent_group = this.props.modal.modalProps.groupId; var wrappers = [].concat(_toConsumableArray(this.props.wrappers)); var newFields = this.state.fields.map(function (field) { var wrapperID = (0, _utils.generateWrapperId)(); return { wrapper_id: wrapperID, parent_group: parent_group, fields: [(0, _utils.buildFieldObjectFromSlug)(field, wrappers, wrapperID)] }; }); if (forminatorData.showFieldSettings) { // If we have only one field added, open its settings if (this.state.fields.length === 1) { var self = this; var wrapper = typeof newFields[0] !== 'undefined' ? newFields[0] : false; var field = typeof newFields[0].fields[0] !== 'undefined' ? newFields[0].fields[0] : false; if (wrapper && field) { if (field.type !== 'page-break' && field.type !== 'pdf-page-break') { setTimeout(function () { self.props.actions.modalActions.showModal({ open: true, field: field, wrapper: wrapper, closeModal: self.closeSettingsModal, isValid: true }, 'field-settings'); }, 500); } if (field.type === 'stripe') { this.props.settings['enable-ajax'] = 'true'; } } } } this.props.actions.builderActions.updateFields([].concat(_toConsumableArray(wrappers), _toConsumableArray(newFields))); this.closeFields(); } }, { key: 'closeFields', value: function closeFields() { this.closeModal(); if (_.contains(this.state.fields, 'stripe') && _.contains(this.state.fields, 'paypal')) { this.showPaymentNotice(); } } }, { key: 'skipProNotice', value: function skipProNotice(e) { var self = this; jQuery.post(forminatorData.ajaxUrl, { action: 'forminator_dismiss_notification', prop: 'forminator_skip_pro_notice', _ajax_nonce: forminatorData.dismissNonce }).always(function () { self.props.actions.settingsActions.updateSetting('skipProNotice', true); }); } }, { key: 'toggleField', value: function toggleField(slug, e) { var state = void 0; var hasStripe = (0, _utils.hasFieldType)('stripe', this.props.wrappers); var hasCaptcha = (0, _utils.hasFieldType)('captcha', this.props.wrappers); var hasPayPal = (0, _utils.hasFieldType)('paypal', this.props.wrappers); if (e.target.checked !== true) { var fields = this.state.fields; fields.splice(fields.indexOf(slug), 1); state = { fields: fields }; } else { state = { fields: [].concat(_toConsumableArray(this.state.fields), [slug]) }; } this.setState(state); this.hasStripePayPal = false; if (_.contains(state.fields, 'stripe') && hasStripe) { this.hasStripe = true; } else { this.hasStripe = false; } if (_.contains(state.fields, 'paypal') && hasPayPal) { this.hasPayPal = true; } else { this.hasPayPal = false; } if (_.contains(state.fields, 'captcha') && hasCaptcha) { this.hasCaptcha = true; } else { this.hasCaptcha = false; } if ('pdf-form' === this.props.formType) { var parentField = !_.isUndefined(forminatorData.parentFormFields) ? forminatorData.parentFormFields : []; var hasParentStripe = (0, _utils.hasFieldType)('stripe', parentField); var hasParentPayPal = (0, _utils.hasFieldType)('paypal', parentField); this.missingPaymentField = _.contains(state.fields, 'payment') && !hasParentStripe && !hasParentPayPal; } } }, { key: 'showPaymentNotice', value: function showPaymentNotice() { var custom = new _notifications2.default({ type: 'info', text: '<strong>' + (0, _utils.translate)('Collect payments like a pro') + '</strong></p>\n\t<p style="margin-top: -10px; margin-bottom: 5px;">' + (0, _utils.translate)('You have added both Stripe and PayPal fields to your form. ' + 'We recommend that you use the visibility conditions, so only ' + 'one of them is visible at a time. For example:') + '</p>\n\t<p style="margin-top: 0; margin-bottom: 5px;">1. ' + (0, _utils.translate)('Add an option to your form using a Radio (or Select) ' + 'field that allows visitors to choose the payment method.') + '</p>\n\t<p style="margin-top: 0;">2. ' + (0, _utils.translate)('Apply visibility conditions to both Stripe and PayPal ' + "fields so only one is visible based on the visitor's " + 'selection in the Radio (or Select) field.'), dismiss: true }); custom.open(); } }, { key: 'render', value: function render() { var _this2 = this; var fields = forminatorData.fields.filter(function (field) { return field.category; }), styles = {}, tagStyles = { position: 'absolute', top: '5px', right: '5px' }, divStyles = {}; var fieldsPro = forminatorData.fieldsPro || []; var hasPassword = (0, _utils.hasFieldType)('password', this.props.wrappers); var parent_group = this.props.modal.modalProps.groupId; /* * Remove GDPR from fields list * @since 1.15.3 */ fields = _.filter(fields, function (field) { return field.slug !== 'gdprcheckbox'; }); if (this.props.formType !== 'registration' && this.props.formType !== 'login' || hasPassword && this.props.formType === 'registration') { fields = _.filter(fields, function (field) { return field.slug !== 'password'; }); } // Restrict some fields into Group field if (parent_group) { fields = _.filter(fields, function (field) { return !_.contains((0, _utils.restrictedGroupFields)(), field.slug); }); } var fieldsOrdered = _.sortBy(fields, 'position'); if (this.hasStripe || this.hasCaptcha || this.hasPayPal || this.hasStripePayPal) { styles = { display: 'block' }; } if (!forminatorData.isPro && !this.props.skipProNotice) { divStyles = { display: 'block' }; } var formType = this.props.formType; var formTypeText = void 0, noticeType = void 0; if ('pdf-form' === formType) { formTypeText = (0, _utils.translate)('PDF file'); noticeType = 'blue'; } else { formTypeText = (0, _utils.translate)('form'); noticeType = 'red'; } return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { closeType: 'icon', closeModal: this.closeModal }, _react2.default.createElement(_title2.default, { id: this.props.modal.modalProps.id, label: (0, _utils.translate)('Insert Fields') }) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'p', null, (0, _utils.translate)('Choose which fields you want to insert ' + ('into your ' + formTypeText + '.')) ), (this.hasStripe || this.hasCaptcha || this.hasPayPal || this.hasStripePayPal || 'pdf-form' === formType) && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-' + noticeType + ' sui-active', 'aria-live': 'assertive', style: { display: 'block' } }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), this.hasStripe && !this.hasStripePayPal && _react2.default.createElement( 'p', null, (0, _utils.translate)('You can have only one Stripe field in your ' + 'form for Stripe to work accurately. Please ' + 'delete the existing Stripe field to add a ' + 'new one.') ), this.hasPayPal && !this.hasStripePayPal && _react2.default.createElement( 'p', null, (0, _utils.translate)('You can have only one PayPal field in your ' + 'form for PayPal to work accurately. Please ' + 'delete the existing PayPal field to add a ' + 'new one.') ), this.hasStripePayPal && _react2.default.createElement( 'p', null, (0, _utils.translate)('You can have only one payment field in your ' + 'form. Please delete the existing payment ' + 'field to add another one.') ), this.hasCaptcha && _react2.default.createElement( 'p', null, (0, _utils.translate)('You can have only one captcha field in your ' + 'form for captcha to work accurately. ' + 'Please delete the existing captcha field to ' + 'add a new one.') ), 'pdf-form' === formType && _react2.default.createElement( 'p', null, (0, _utils.translate)('{{b}}Note{{/b}}: You can use the {{b}}Rich Text{{/b}} field to add form fields and custom text to your PDF.', { components: { b: _react2.default.createElement('b', null) } }) ) ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-selectors sui-box-selectors-col-5', style: { margin: 0 } }, _react2.default.createElement( 'ul', { id: 'forminator-form-fields-to-insert', className: 'sui-spacing-slim ' + formType + '-field-selectors' }, fieldsOrdered.map(function (field) { return _react2.default.createElement( 'li', { key: field.slug }, _react2.default.createElement( 'label', { htmlFor: 'forminator-form-field-' + field.slug, className: 'sui-box-selector sui-box-selector-vertical' }, _react2.default.createElement('input', { type: 'checkbox', id: 'forminator-form-field-' + field.slug, 'data-field': field.slug, onChange: function onChange(e) { return _this2.toggleField(field.slug, e); } }), _react2.default.createElement( 'span', null, _react2.default.createElement('i', { className: field.icon, 'aria-hidden': 'true' }), field.name, 'rating' === field.slug && _react2.default.createElement( 'span', { className: 'sui-tag sui-tag-beta forminator-small-blue-tag', style: tagStyles }, 'New' ) ) ) ); }), !forminatorData.isPro && fieldsPro.map(function (field) { if ('signature' !== field.field_type || 'signature' === field.field_type && _.isEmpty(parent_group)) { return _react2.default.createElement( 'li', { key: field.slug }, _react2.default.createElement( 'label', { className: 'sui-box-selector sui-box-selector-vertical sui-disabled' }, _react2.default.createElement('input', { type: 'radio', disabled: true }), _react2.default.createElement( 'span', null, _react2.default.createElement('span', { className: field.icon, 'aria-hidden': 'true' }), field.name, _react2.default.createElement( 'span', { className: 'sui-tag sui-tag-pro' }, 'Pro' ) ) ) ); } }), _.isEmpty(parent_group) && !forminatorData.isPro && _.isEmpty(fieldsPro) && 'pdf-form' !== formType && _react2.default.createElement( 'li', null, _react2.default.createElement( 'label', { className: 'sui-box-selector sui-box-selector-vertical sui-disabled' }, _react2.default.createElement('input', { type: 'radio', disabled: true }), _react2.default.createElement( 'span', null, _react2.default.createElement('span', { className: 'sui-icon-pencil', 'aria-hidden': 'true' }), (0, _utils.translate)('E-Signature'), _react2.default.createElement( 'span', { className: 'sui-tag sui-tag-pro' }, 'Pro' ) ) ) ), 'pdf-form' === formType && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'li', { className: 'pdf-field-coming-soon sui-tooltip', 'data-tooltip': (0, _utils.translate)('Coming soon') }, _react2.default.createElement( 'label', { className: 'sui-box-selector sui-box-selector-vertical sui-disabled' }, _react2.default.createElement('input', { type: 'radio', disabled: true }), _react2.default.createElement( 'span', null, _react2.default.createElement('span', { className: 'sui-icon-code', 'aria-hidden': 'true' }), (0, _utils.translate)('Quotation') ) ) ) ) ), 'pdf-form' !== formType && _react2.default.createElement( 'div', { role: 'alert', id: 'fui-notice-pro-fields', className: 'sui-notice ' + 'sui-notice-purple ' + ('' + (!forminatorData.isPro && !this.props.skipProNotice && ' sui-active')), style: divStyles, 'aria-live': 'assertive' }, _.isEmpty(parent_group) && !forminatorData.isPro && !this.props.skipProNotice && _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Need access to pro form fields? ' + '{{link}}Upgrade to Pro{{/link}}', { components: { link: _react2.default.createElement('a', { // eslint-disable-next-line max-len href: 'https://wpmudev.com/project/forminator-pro/?utm_source=forminator&utm_medium=plugin&utm_campaign=forminator_forms_insertfields_upsell_notice', target: '_blank', style: { color: '#8d00b1' } }) } }) ) ), _react2.default.createElement( 'div', { className: 'sui-notice-actions' }, _react2.default.createElement(_reactButtonIcon.ButtonIcon, { icon: 'check', iconSize: 'sm', label: (0, _utils.translate)('Dismiss'), onClick: this.skipProNotice }) ) ) ), 'pdf-form' === formType && this.missingPaymentField && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red sui-active', style: { display: 'block', marginTop: '15px' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('This PDF is linked to a form without a payment ' + 'field. To include payment information in your ' + 'PDF, please add either a PayPal or Stripe ' + 'field to your form.') ) ) ) ) ), _react2.default.createElement( _footer2.default, { alignment: 'separated' }, _react2.default.createElement(_close2.default, { label: (0, _utils.translate)('Cancel'), customClass: 'sui-button-ghost forminator-builder-fields-close', closeModal: this.closeModal }), _react2.default.createElement( 'button', { id: 'forminator-builder-insert-fields', className: 'sui-button sui-button-blue', disabled: !this.state.fields.length || this.hasStripe || this.hasCaptcha || this.hasPayPal || this.hasStripePayPal || this.missingPaymentField, onClick: this.insertFields }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, (0, _utils.translate)('Insert Fields') ), _react2.default.createElement('span', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ); } }]); return fieldsModal; }(_react.Component); exports.default = fieldsModal; /***/ }), /* 409 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactRouterDom = __webpack_require__(24); var _utils = __webpack_require__(1); var _cloneDeep = __webpack_require__(410); var _cloneDeep2 = _interopRequireDefault(_cloneDeep); var _fields = __webpack_require__(481); var _fields2 = _interopRequireDefault(_fields); var _advanced = __webpack_require__(541); var _advanced2 = _interopRequireDefault(_advanced); var _close = __webpack_require__(63); var _close2 = _interopRequireDefault(_close); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _footer = __webpack_require__(59); var _footer2 = _interopRequireDefault(_footer); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable dot-notation */ var FIELD_TYPE = { email: _fields2.default.emailSettings, address: _fields2.default.addressSettings, captcha: _fields2.default.captchaSettings, date: _fields2.default.dateSettings, signature: _fields2.default.signatureSettings, consent: _fields2.default.consentSettings, gdprcheckbox: _fields2.default.gdprcheckboxSettings, hidden: _fields2.default.hiddenSettings, html: _fields2.default.htmlSettings, group: _fields2.default.groupSettings, slider: _fields2.default.sliderSettings, checkbox: _fields2.default.multivalueSettings, radio: _fields2.default.radioSettings, name: _fields2.default.nameSettings, number: _fields2.default.numberSettings, pagination: _fields2.default.paginationSettings, phone: _fields2.default.phoneSettings, postdata: _fields2.default.postdataSettings, section: _fields2.default.sectionSettings, select: _fields2.default.singlevaluesettings, text: _fields2.default.textSettings, textarea: _fields2.default.textareaSettings, time: _fields2.default.timeSettings, upload: _fields2.default.uploadSettings, url: _fields2.default.websiteSettings, calculation: _fields2.default.calculationSettings, stripe: _fields2.default.stripeSettings, currency: _fields2.default.currencySettings, password: _fields2.default.passwordSettings, paypal: _fields2.default.paypalSettings, 'rich-text': _fields2.default.richTextSettings, 'all-form-data': _fields2.default.allFormDataSettings, payment: _fields2.default.paymentSettings, rating: _fields2.default.ratingSettings }; var settingsModal = function (_Component) { _inherits(settingsModal, _Component); function settingsModal(props) { _classCallCheck(this, settingsModal); var _this = _possibleConstructorReturn(this, (settingsModal.__proto__ || Object.getPrototypeOf(settingsModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.updateProperty = _this.updateProperty.bind(_this); _this.applyChanges = _this.applyChanges.bind(_this); _this.cancelModal = _this.cancelModal.bind(_this); // Set state by field object _this.state = (0, _cloneDeep2.default)(_this.props.modal.modalProps.field); return _this; } // Make it possible to update state from child components _createClass(settingsModal, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.setState(_defineProperty({}, slug, value)); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.props.router.navigate('/builder/'); } }, { key: 'applyChanges', value: function applyChanges() { var _this2 = this; var wrapper = Object.assign({}, this.props.modal.modalProps.wrapper); // Find item index var itemIndex = wrapper.fields.findIndex(function (field) { return field.element_id === _this2.state.element_id; }); wrapper.fields = (0, _utils.replaceInPosition)(wrapper.fields, itemIndex, this.state); this.props.actions.builderActions.updateFieldSettings(wrapper, this.state.element_id); // Close modal this.closeModal(); } }, { key: 'getDateDuration', value: function getDateDuration(startOffsetOperator, startOffsetValue, startOffsetDuration, dateFormat) { if ('-' === startOffsetOperator) { // eslint-disable-next-line no-undef return moment().subtract(startOffsetValue, startOffsetDuration).format(dateFormat); } // eslint-disable-next-line no-undef return moment().add(startOffsetValue, startOffsetDuration).format(dateFormat); } }, { key: 'isValid', value: function isValid() { var _this3 = this; var validationResult = { isValid: true, error: false }; // Validate Name and Address settings if (this.state.type === 'name' || this.state.type === 'address') { var subFields = []; if (this.state.type === 'name') { // Multiple name is single, no validation if (this.state.multiple_name !== 'true') { validationResult.isValid = true; return validationResult; } subFields = ['prefix', 'fname', 'mname', 'lname']; } if (this.state.type === 'address') { subFields = ['street_address', 'address_line', 'address_city', 'address_state', 'address_zip', 'address_country']; } var result = _.filter(subFields, function (subField) { if (_this3.state[subField]) { return true; } return false; }); if (!_.isEmpty(result)) { validationResult.isValid = true; return validationResult; } validationResult.error = (0, _utils.translate)('At least one field must be enabled'); validationResult.isValid = false; } // Validate child component isvalid if (!this.props.modal.modalProps.isValid) { validationResult.error = (0, _utils.translate)('Please fill required fields'); if (!_.isUndefined(this.props.modal.modalProps.validationError) && !_.isEmpty(this.props.modal.modalProps.validationError)) { validationResult.error = this.props.modal.modalProps.validationError; } validationResult.isValid = false; } // Validate Radio, Checkbox and Select calculation values & option label if (this.state.type === 'radio' || this.state.type === 'checkbox' || this.state.type === 'select' || this.state.type === 'postdata' && !_.isUndefined(this.state.post_custom_fields) && true === this.state.post_custom_fields) { var hasEmpty = _.some(this.state.options, function (option) { return _.isEmpty(option.calculation); }); if (hasEmpty && this.state.calculations === 'true') { validationResult.error = (0, _utils.translate)('Calculation values are required!'); validationResult.isValid = false; } var hasEmptyLabel = _.some(this.state.options, function (option) { return _.isEmpty(option.label); }); if (hasEmptyLabel) { validationResult.error = (0, _utils.translate)('Option labels are required!'); validationResult.isValid = false; } } // Validate select field if required if (this.state.type === 'select') { var hasOptionSelected = _.some(this.state.options, function (option) { return !_.isUndefined(option.default) && option.default; }); if (this.state.required && !hasOptionSelected) { if ('single' === this.state.value_type && _.isEmpty(this.state.placeholder)) { validationResult.error = (0, _utils.translate)('Please add a placeholder or select a default option.'); validationResult.isValid = false; } } } // Validate Postdata field if required if (this.state.type === 'postdata') { if (!(0, _utils.isTrue)(this.state.post_title) && !(0, _utils.isTrue)(this.state.post_content) && !(0, _utils.isTrue)(this.state.post_excerpt)) { validationResult.error = (0, _utils.translate)('At least one of Title, Content, or Excerpt must be enabled for post data to be submitted.'); validationResult.isValid = false; } } // Validate stripe field if (this.state.type === 'stripe') { if (!forminatorData.hasStripe) { validationResult.error = (0, _utils.translate)('Please, connect your Stripe account first!'); validationResult.isValid = false; } if (_.isEmpty(this.state.payments)) { validationResult.error = (0, _utils.translate)('You need at least one payment!'); validationResult.isValid = false; } if (this.state.receipt === 'true' && !this.state.customer_email) { validationResult.error = (0, _utils.translate)('Please select an email address for payment receipt.'); validationResult.isValid = false; } var _hasEmpty = _.some(this.state.options, function (option) { return _.isEmpty(option.label); }); if (_hasEmpty) { validationResult.error = (0, _utils.translate)('Empty labels are not allowed for meta values!'); validationResult.isValid = false; } } // payment plan validation validationResult = (0, _utils.getPlanValidation)(validationResult, this.state.payments); // Validate paypal field if (this.state.type === 'paypal') { if (!forminatorData.hasPayPal) { validationResult.error = (0, _utils.translate)('Please connect your PayPal account first!'); validationResult.isValid = false; } if (this.state.amount_type === 'fixed' && !this.state.amount) { validationResult.error = (0, _utils.translate)('Please enter PayPal payment amount!'); validationResult.isValid = false; } if (this.state.amount_type === 'variable' && !this.state.variable) { validationResult.error = (0, _utils.translate)('Please select PayPal payment variable field!'); validationResult.isValid = false; } } // Validate calculation field if (this.state.type === 'calculation') { if (_.isUndefined(this.state.formula) || _.isEmpty(this.state.formula)) { validationResult.error = (0, _utils.translate)('Calculation formula is required!'); validationResult.isValid = false; } } // Validate currency field if (this.state.type === 'currency') { if (parseInt(this.state.limit_min) >= parseInt(this.state.limit_max)) { validationResult.error = (0, _utils.translate)('Limit Min value should be less than Max value.'); validationResult.isValid = false; } } // Validate number field if (this.state.type === 'number') { if (parseInt(this.state.limit_min) >= parseInt(this.state.limit_max)) { validationResult.error = (0, _utils.translate)('Limit Min value should be less than Max value.'); validationResult.isValid = false; } } // Validate Captcha field var captchaProvider = _.isUndefined(this.state.captcha_provider) ? 'recaptcha' : this.state.captcha_provider; if (this.state.type === 'captcha') { if ('recaptcha' === captchaProvider) { if (this.state.captcha_type === 'v2_checkbox' && !forminatorData.hasV2Captcha) { validationResult.error = (0, _utils.translate)('Please enter API keys.'); validationResult.isValid = false; } else if (this.state.captcha_type === 'v2_invisible' && !forminatorData.hasV2InvisibleCaptcha) { validationResult.error = (0, _utils.translate)('Please enter API keys.'); validationResult.isValid = false; } else if (this.state.captcha_type === 'v3_recaptcha' && !forminatorData.hasV3Captcha) { validationResult.error = (0, _utils.translate)('Please enter API keys.'); validationResult.isValid = false; } } if ('hcaptcha' === captchaProvider) { if (!forminatorData.hasHCaptcha) { validationResult.error = (0, _utils.translate)('Please enter API keys.'); validationResult.isValid = false; } } } if (this.state.type === 'time' && !_.isUndefined(this.state['restrict_time']) && 'specific' === this.state['restrict_time']) { var timeType = !_.isUndefined(this.state['time_type']) ? this.state['time_type'] : ''; var timeFormat = 'twelve' === timeType ? 'h:mma' : 'H:mm'; var restrictStartHour = !_.isUndefined(this.state['restrict_start_hour']) ? this.state['restrict_start_hour'] : 0; var restrictStartMinute = !_.isUndefined(this.state['restrict_start_minute']) ? this.state['restrict_start_minute'] : 0; var restrictStartMeridian = !_.isUndefined(this.state['restrict_start_ampm']) ? this.state['restrict_start_ampm'] : 'AM'; var restrictEndHour = !_.isUndefined(this.state['restrict_end_hour']) ? this.state['restrict_end_hour'] : 0; var restrictEndMinute = !_.isUndefined(this.state['restrict_end_minute']) ? this.state['restrict_end_minute'] : 0; var restrictEndMeridian = !_.isUndefined(this.state['restrict_end_ampm']) ? this.state['restrict_end_ampm'] : 'AM'; var defaultTime = !_.isUndefined(this.state['default_time']) ? this.state['default_time'] : 'none'; var defaultTimeHour = !_.isUndefined(this.state['default_time_hour']) ? this.state['default_time_hour'] : 0; var defaultTimeMinute = !_.isUndefined(this.state['default_time_minute']) ? this.state['default_time_minute'] : 0; var defaultTimeMeridian = !_.isUndefined(this.state['default_time_ampm']) ? this.state['default_time_ampm'] : 'AM'; var startTimeMeridian = 'twelve' === timeType ? restrictStartMeridian : ''; var endTimeMeridian = 'twelve' === timeType ? restrictEndMeridian : ''; var defaultMeridian = 'twelve' === timeType ? defaultTimeMeridian : ''; var startDateString = restrictStartHour + ':' + restrictStartMinute + startTimeMeridian.toLowerCase(); // eslint-disable-next-line no-undef var startDate = moment(startDateString, timeFormat); var endDateString = restrictEndHour + ':' + restrictEndMinute + endTimeMeridian.toLowerCase(); // eslint-disable-next-line no-undef var endDate = moment(endDateString, timeFormat); // eslint-disable-next-line no-undef var defaultDate = moment(defaultTimeHour + ':' + defaultTimeMinute + defaultMeridian, timeFormat); if (endDate.isBefore(startDate)) { validationResult.error = (0, _utils.translate)('Please select a valid end time limit.'); validationResult.isValid = false; } else if ('default' === defaultTime && (defaultDate.isBefore(startDate) || endDate.isBefore(defaultDate))) { validationResult.error = (0, _utils.translate)('Please fix the Default time error.'); validationResult.isValid = false; } else if ( // For case Start time set to '0:0am' and End time set to '0:0pm' or vice versa '0:0am' === startDateString && '0:0pm' === endDateString || '0:0pm' === startDateString && '0:0am' === endDateString || // For case both Start and End times set to '0:0am' or '0:0pm' startDateString === endDateString && ('0:0am' === startDateString || '0:0pm' === startDateString)) { validationResult.error = (0, _utils.translate)('Please fix the Start or End time.'); validationResult.isValid = false; } } if (!_.isUndefined(this.state.conditions) && !_.isEmpty(this.state.conditions) && !_.isUndefined(this.state.hidden) && !(0, _utils.isTrue)(this.state.hidden)) { _.each(this.state.conditions, function (element) { if (_.isEmpty(element.rule)) { validationResult.error = (0, _utils.translate)('Please select rule'); validationResult.isValid = false; } }); } // If the limit End date is before Start date if (this.state.type === 'date' && !_.isUndefined(this.state['start-date']) && !_.isUndefined(this.state['end-date'])) { var typeStartDate = this.state['start-date']; var typeEndDate = this.state['end-date']; var dateFormat = 'MM/DD/YYYY'; var isDateValid = true; // If both Start and End date are 'specific' if ('specific' === typeStartDate && 'specific' === typeEndDate && !_.isUndefined(this.state['start-specific-date']) && !_.isUndefined(this.state['end-specific-date']) && // eslint-disable-next-line no-undef moment(this.state['end-specific-date'], dateFormat).isBefore( // eslint-disable-next-line no-undef moment(this.state['start-specific-date'], dateFormat))) { isDateValid = false; // If both Start and End date are 'today' } else if ('today' === typeStartDate && 'today' === typeEndDate) { var startOffsetOperator = !_.isUndefined(this.state['start-offset-operator']) ? this.state['start-offset-operator'] : '+'; var startOffsetValue = !_.isUndefined(this.state['start-offset-value']) ? parseInt(this.state['start-offset-value'], 10) : 0; var startOffsetDuration = !_.isUndefined(this.state['start-offset-duration']) ? this.state['start-offset-duration'] : 'days'; var startOffsetDate = this.getDateDuration(startOffsetOperator, startOffsetValue, startOffsetDuration, dateFormat); var endOffsetOperator = !_.isUndefined(this.state['end-offset-operator']) ? this.state['end-offset-operator'] : '+'; var endOffsetValue = !_.isUndefined(this.state['end-offset-value']) ? parseInt(this.state['end-offset-value'], 10) : 0; var endOffsetDuration = !_.isUndefined(this.state['end-offset-duration']) ? this.state['end-offset-duration'] : 'days'; var endOffsetDate = this.getDateDuration(endOffsetOperator, endOffsetValue, endOffsetDuration, dateFormat); // eslint-disable-next-line no-undef if (moment(endOffsetDate, dateFormat).isBefore( // eslint-disable-next-line no-undef moment(startOffsetDate, dateFormat))) { isDateValid = false; } // If Start date is 'specific' but End date is 'today' } else if ('specific' === typeStartDate && 'today' === typeEndDate && !_.isUndefined(this.state['start-specific-date'])) { var _endOffsetOperator = !_.isUndefined(this.state['end-offset-operator']) ? this.state['end-offset-operator'] : '+'; var _endOffsetValue = !_.isUndefined(this.state['end-offset-value']) ? parseInt(this.state['end-offset-value'], 10) : 0; var _endOffsetDuration = !_.isUndefined(this.state['end-offset-duration']) ? this.state['end-offset-duration'] : 'days'; var _endOffsetDate = this.getDateDuration(_endOffsetOperator, _endOffsetValue, _endOffsetDuration, dateFormat); // eslint-disable-next-line no-undef if (moment(_endOffsetDate, dateFormat).isBefore( // eslint-disable-next-line no-undef moment(this.state['start-specific-date'], dateFormat))) { isDateValid = false; } // If End date is 'specific' but Start date is 'today' } else if ('today' === typeStartDate && 'specific' === typeEndDate && !_.isUndefined(this.state['end-specific-date'])) { var _startOffsetOperator = !_.isUndefined(this.state['start-offset-operator']) ? this.state['start-offset-operator'] : '+'; var _startOffsetValue = !_.isUndefined(this.state['start-offset-value']) ? parseInt(this.state['start-offset-value'], 10) : 0; var _startOffsetDuration = !_.isUndefined(this.state['start-offset-duration']) ? this.state['start-offset-duration'] : 'days'; var _startOffsetDate = this.getDateDuration(_startOffsetOperator, _startOffsetValue, _startOffsetDuration, dateFormat); // eslint-disable-next-line no-undef if (moment(this.state['end-specific-date'], dateFormat).isBefore( // eslint-disable-next-line no-undef moment(_startOffsetDate, dateFormat))) { isDateValid = false; } } if (!isDateValid) { validationResult.error = (0, _utils.translate)('Please fix the limit Start or End date.'); validationResult.isValid = false; } } // Validate rating field if ('rating' === this.state.type) { if (parseInt(this.state.max_rating) < 0) { validationResult.error = (0, _utils.translate)('Please enter valid number.'); validationResult.isValid = false; } else if (parseInt(this.state.max_rating) > 50) { validationResult.error = (0, _utils.translate)('Maximum Rating value should be less than 50.'); validationResult.isValid = false; } } return validationResult; } }, { key: 'cancelModal', value: function cancelModal() { this.closeModal(); } }, { key: 'render', value: function render() { var _this4 = this; var forminatorField = (0, _utils.getForminatorField)(this.state); var FieldSettings = FIELD_TYPE[forminatorField.type]; var hasLabels = !_.contains(['captcha', 'paypal', 'rich-text', 'all-form-data', 'payment'], forminatorField.type); var hasGeolocation = 'address' === forminatorField.type; var hasSettings = !_.contains(['submit', 'hidden', 'html', 'page-break'], forminatorField.type); var hasVisibility = !_.contains(['captcha', 'page-break', 'hidden', 'rich-text', 'all-form-data', 'payment'], forminatorField.type); var hasStyling = !_.contains(['page-break', 'paypal'], forminatorField.type); var hasCalculations = _.contains(['calculation', 'number', 'slider', 'radio', 'checkbox', 'select', 'currency'], forminatorField.type); var hasAdvanced = _.contains(['stripe', 'paypal'], forminatorField.type); var hasCustomize = _.contains(['paypal'], forminatorField.type); var hasLimit = _.contains(['date'], forminatorField.type); var isDateType = !_.isUndefined(this.state.field_type) ? this.state.field_type : 'picker'; var result = this.isValid(); var isValid = result.isValid; var validationError = result.error || ''; var redirectPath = '/builder/labels'; // If no labels tab, redirect to settings if (!hasLabels) { redirectPath = '/builder/settings'; } return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { closeType: 'icon', closeModal: this.closeModal }, _react2.default.createElement(_title2.default, { id: this.props.modal.modalProps.id, label: (0, _utils.translate)('Edit Field'), tag: forminatorField.name }) ), _react2.default.createElement( 'div', { id: 'forminator-modal-body--' + forminatorField.type, className: 'sui-box-body' }, _react2.default.createElement( 'div', { className: 'sui-tabs sui-tabs-flushed' }, _react2.default.createElement( 'div', { role: 'tablist', className: 'sui-tabs-menu' }, hasLabels > 0 && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/labels', className: function className(_ref) { var isActive = _ref.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; }, role: 'tab' }, (0, _utils.translate)('Labels') ), hasGeolocation && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/geolocation/', className: function className(_ref2) { var isActive = _ref2.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; }, role: 'tab' }, forminatorData.isPro ? (0, _utils.translate)('Geolocation') : (0, _utils.translate)('Geolocation {{span}}Pro{{/span}}', { components: { span: _react2.default.createElement('span', { className: 'sui-tag sui-tag-pro' }) } }) ), hasSettings > 0 && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/settings/', className: function className(_ref3) { var isActive = _ref3.isActive; return (isActive ? 'active ' : '') + ('sui-tab-item ' + (_this4.props.router.location.pathname.startsWith('/builder/settings/stripe') ? 'active' : '')); }, role: 'tab' }, 'group' === forminatorField.type ? (0, _utils.translate)('Repeater') : (0, _utils.translate)('Settings') ), hasLimit > 0 && 'picker' === isDateType && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/limits/', className: function className(_ref4) { var isActive = _ref4.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; }, role: 'tab' }, (0, _utils.translate)('Limits') ), hasCalculations > 0 && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/calculations/', className: function className(_ref5) { var isActive = _ref5.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; }, role: 'tab' }, (0, _utils.translate)('Calculations') ), hasAdvanced && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/advanced-settings/', className: function className(_ref6) { var isActive = _ref6.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; }, role: 'tab' }, (0, _utils.translate)('Advanced') ), hasStyling > 0 && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/styling/', className: function className(_ref7) { var isActive = _ref7.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; }, role: 'tab' }, (0, _utils.translate)('Styling') ), hasCustomize > 0 && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/customize/', className: function className(_ref8) { var isActive = _ref8.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; }, role: 'tab' }, (0, _utils.translate)('Customize') ), hasVisibility > 0 && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/visibility/', className: function className(_ref9) { var isActive = _ref9.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; }, role: 'tab' }, (0, _utils.translate)('Visibility') ), !_.isEmpty(forminatorField.settings) && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/advanced/', className: function className(_ref10) { var isActive = _ref10.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; }, role: 'tab' }, (0, _utils.translate)('Advanced') ) ), _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/', element: _react2.default.createElement(_reactRouterDom.Navigate, { to: redirectPath, replace: true }) }) ), _react2.default.createElement( 'div', { className: 'sui-tabs-content' }, _react2.default.createElement( 'div', { className: 'sui-tab-content active', role: 'tabpanel' }, _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/labels', element: _react2.default.createElement(FieldSettings, { type: 'labels', updateProperty: this.updateProperty, state: this.state, wrappers: this.props.wrappers, formType: this.props.formType || '' }) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/settings/*', element: _react2.default.createElement(FieldSettings, { type: 'settings', updateProperty: this.updateProperty, state: this.state, wrappers: this.props.wrappers, formType: this.props.formType || '' }) }), 'picker' === isDateType && _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/limits', element: _react2.default.createElement(FieldSettings, { type: 'limits', updateProperty: this.updateProperty, state: this.state, wrappers: this.props.wrappers }) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/advanced-settings', element: _react2.default.createElement(FieldSettings, { type: 'advanced-settings', updateProperty: this.updateProperty, state: this.state, wrappers: this.props.wrappers }) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/calculations', element: _react2.default.createElement(FieldSettings, { type: 'calculations', updateProperty: this.updateProperty, modal: this.props.modal.modalProps, state: this.state, wrappers: this.props.wrappers }) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/geolocation', element: _react2.default.createElement(FieldSettings, { type: 'geolocation', updateProperty: this.updateProperty, state: this.state, wrappers: this.props.wrappers }) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/visibility', element: _react2.default.createElement(FieldSettings, { type: 'visibility', updateProperty: this.updateProperty, state: this.state, wrappers: this.props.wrappers }) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/styling', element: _react2.default.createElement(FieldSettings, { type: 'styling', updateProperty: this.updateProperty, state: this.state, wrappers: this.props.wrappers }) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/advanced', element: _react2.default.createElement(_advanced2.default, _extends({}, this.props, { updateProperty: this.updateProperty, state: this.state })) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/customize', element: _react2.default.createElement(FieldSettings, { type: 'customize', updateProperty: this.updateProperty, state: this.state, wrappers: this.props.wrappers }) }) ) ) ) ) ), _react2.default.createElement( _footer2.default, { customClass: 'sui-content-separated' }, _react2.default.createElement(_close2.default, { icon: 'undo', label: (0, _utils.translate)('Discard Changes'), customClass: 'sui-button-ghost forminator-discard-field-settings', closeModal: this.closeModal }), isValid && _react2.default.createElement( 'button', { className: 'sui-button forminator-save-field-settings', onClick: this.applyChanges }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }), (0, _utils.translate)('Apply') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ), !isValid && _react2.default.createElement( 'div', { className: 'sui-tooltip', 'data-tooltip': validationError }, _react2.default.createElement( 'button', { className: 'sui-button forminator-save-field-settings sui-tooltip', disabled: 'disabled', 'data-tooltip': validationError }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }), (0, _utils.translate)('Apply') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ) ); } }]); return settingsModal; }(_react.Component); exports.default = (0, _withRouter.withRouter)(settingsModal); /***/ }), /* 410 */ /***/ (function(module, exports, __webpack_require__) { var baseClone = __webpack_require__(411); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4; /** * This method is like `_.clone` except that it recursively clones `value`. * * @static * @memberOf _ * @since 1.0.0 * @category Lang * @param {*} value The value to recursively clone. * @returns {*} Returns the deep cloned value. * @see _.clone * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; * * var deep = _.cloneDeep(objects); * console.log(deep[0] === objects[0]); * // => false */ function cloneDeep(value) { return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); } module.exports = cloneDeep; /***/ }), /* 411 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(412), arrayEach = __webpack_require__(442), assignValue = __webpack_require__(362), baseAssign = __webpack_require__(444), baseAssignIn = __webpack_require__(454), cloneBuffer = __webpack_require__(457), copyArray = __webpack_require__(458), copySymbols = __webpack_require__(459), copySymbolsIn = __webpack_require__(461), getAllKeys = __webpack_require__(462), getAllKeysIn = __webpack_require__(463), getTag = __webpack_require__(224), initCloneArray = __webpack_require__(468), initCloneByTag = __webpack_require__(469), initCloneObject = __webpack_require__(475), isArray = __webpack_require__(218), isBuffer = __webpack_require__(365), isMap = __webpack_require__(477), isObject = __webpack_require__(189), isSet = __webpack_require__(479), keys = __webpack_require__(217), keysIn = __webpack_require__(222); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values supported by `_.clone`. */ var cloneableTags = {}; cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; /** * The base implementation of `_.clone` and `_.cloneDeep` which tracks * traversed objects. * * @private * @param {*} value The value to clone. * @param {boolean} bitmask The bitmask flags. * 1 - Deep clone * 2 - Flatten inherited properties * 4 - Clone symbols * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ function baseClone(value, bitmask, customizer, key, object, stack) { var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } if (result !== undefined) { return result; } if (!isObject(value)) { return value; } var isArr = isArray(value); if (isArr) { result = initCloneArray(value); if (!isDeep) { return copyArray(value, result); } } else { var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; if (isBuffer(value)) { return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { result = (isFlat || isFunc) ? {} : initCloneObject(value); if (!isDeep) { return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); } } else { if (!cloneableTags[tag]) { return object ? value : {}; } result = initCloneByTag(value, tag, isDeep); } } // Check for circular references and return its corresponding clone. stack || (stack = new Stack); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result); if (isSet(value)) { value.forEach(function(subValue) { result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); } else if (isMap(value)) { value.forEach(function(subValue, key) { result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); } var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : (isFlat ? keysIn : keys); var props = isArr ? undefined : keysFunc(value); arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); return result; } module.exports = baseClone; /***/ }), /* 412 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(194), stackClear = __webpack_require__(418), stackDelete = __webpack_require__(419), stackGet = __webpack_require__(420), stackHas = __webpack_require__(421), stackSet = __webpack_require__(422); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /* 413 */ /***/ (function(module, exports) { /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } module.exports = listCacheClear; /***/ }), /* 414 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(195); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } module.exports = listCacheDelete; /***/ }), /* 415 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(195); /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } module.exports = listCacheGet; /***/ }), /* 416 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(195); /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } module.exports = listCacheHas; /***/ }), /* 417 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(195); /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } module.exports = listCacheSet; /***/ }), /* 418 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(194); /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } module.exports = stackClear; /***/ }), /* 419 */ /***/ (function(module, exports) { /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } module.exports = stackDelete; /***/ }), /* 420 */ /***/ (function(module, exports) { /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } module.exports = stackGet; /***/ }), /* 421 */ /***/ (function(module, exports) { /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } module.exports = stackHas; /***/ }), /* 422 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(194), Map = __webpack_require__(215), MapCache = __webpack_require__(429); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } module.exports = stackSet; /***/ }), /* 423 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(359), isMasked = __webpack_require__(426), isObject = __webpack_require__(189), toSource = __webpack_require__(361); /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } module.exports = baseIsNative; /***/ }), /* 424 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(216); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; /***/ }), /* 425 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /* 426 */ /***/ (function(module, exports, __webpack_require__) { var coreJsData = __webpack_require__(427); /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } module.exports = isMasked; /***/ }), /* 427 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(118); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; module.exports = coreJsData; /***/ }), /* 428 */ /***/ (function(module, exports) { /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } module.exports = getValue; /***/ }), /* 429 */ /***/ (function(module, exports, __webpack_require__) { var mapCacheClear = __webpack_require__(430), mapCacheDelete = __webpack_require__(437), mapCacheGet = __webpack_require__(439), mapCacheHas = __webpack_require__(440), mapCacheSet = __webpack_require__(441); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /* 430 */ /***/ (function(module, exports, __webpack_require__) { var Hash = __webpack_require__(431), ListCache = __webpack_require__(194), Map = __webpack_require__(215); /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } module.exports = mapCacheClear; /***/ }), /* 431 */ /***/ (function(module, exports, __webpack_require__) { var hashClear = __webpack_require__(432), hashDelete = __webpack_require__(433), hashGet = __webpack_require__(434), hashHas = __webpack_require__(435), hashSet = __webpack_require__(436); /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `Hash`. Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; module.exports = Hash; /***/ }), /* 432 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(197); /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } module.exports = hashClear; /***/ }), /* 433 */ /***/ (function(module, exports) { /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } module.exports = hashDelete; /***/ }), /* 434 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(197); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty.call(data, key) ? data[key] : undefined; } module.exports = hashGet; /***/ }), /* 435 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(197); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } module.exports = hashHas; /***/ }), /* 436 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(197); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } module.exports = hashSet; /***/ }), /* 437 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(198); /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } module.exports = mapCacheDelete; /***/ }), /* 438 */ /***/ (function(module, exports) { /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } module.exports = isKeyable; /***/ }), /* 439 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(198); /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } module.exports = mapCacheGet; /***/ }), /* 440 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(198); /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return getMapData(this, key).has(key); } module.exports = mapCacheHas; /***/ }), /* 441 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(198); /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } module.exports = mapCacheSet; /***/ }), /* 442 */ /***/ (function(module, exports) { /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } module.exports = arrayEach; /***/ }), /* 443 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(168); var defineProperty = (function() { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); module.exports = defineProperty; /***/ }), /* 444 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(199), keys = __webpack_require__(217); /** * The base implementation of `_.assign` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssign(object, source) { return object && copyObject(source, keys(source), object); } module.exports = baseAssign; /***/ }), /* 445 */ /***/ (function(module, exports) { /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } module.exports = baseTimes; /***/ }), /* 446 */ /***/ (function(module, exports, __webpack_require__) { var baseIsArguments = __webpack_require__(447), isObjectLike = __webpack_require__(190); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /* 447 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(196), isObjectLike = __webpack_require__(190); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } module.exports = baseIsArguments; /***/ }), /* 448 */ /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /* 449 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; /***/ }), /* 450 */ /***/ (function(module, exports, __webpack_require__) { var baseIsTypedArray = __webpack_require__(451), baseUnary = __webpack_require__(219), nodeUtil = __webpack_require__(220); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }), /* 451 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(196), isLength = __webpack_require__(366), isObjectLike = __webpack_require__(190); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } module.exports = baseIsTypedArray; /***/ }), /* 452 */ /***/ (function(module, exports, __webpack_require__) { var isPrototype = __webpack_require__(221), nativeKeys = __webpack_require__(453); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } module.exports = baseKeys; /***/ }), /* 453 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(367); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }), /* 454 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(199), keysIn = __webpack_require__(222); /** * The base implementation of `_.assignIn` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssignIn(object, source) { return object && copyObject(source, keysIn(source), object); } module.exports = baseAssignIn; /***/ }), /* 455 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(189), isPrototype = __webpack_require__(221), nativeKeysIn = __webpack_require__(456); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeysIn(object) { if (!isObject(object)) { return nativeKeysIn(object); } var isProto = isPrototype(object), result = []; for (var key in object) { if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } return result; } module.exports = baseKeysIn; /***/ }), /* 456 */ /***/ (function(module, exports) { /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } module.exports = nativeKeysIn; /***/ }), /* 457 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(118); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; /** * Creates a clone of `buffer`. * * @private * @param {Buffer} buffer The buffer to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Buffer} Returns the cloned buffer. */ function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result); return result; } module.exports = cloneBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(65)(module))) /***/ }), /* 458 */ /***/ (function(module, exports) { /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } module.exports = copyArray; /***/ }), /* 459 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(199), getSymbols = __webpack_require__(223); /** * Copies own symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbols(source, object) { return copyObject(source, getSymbols(source), object); } module.exports = copySymbols; /***/ }), /* 460 */ /***/ (function(module, exports) { /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } module.exports = arrayFilter; /***/ }), /* 461 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(199), getSymbolsIn = __webpack_require__(370); /** * Copies own and inherited symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbolsIn(source, object) { return copyObject(source, getSymbolsIn(source), object); } module.exports = copySymbolsIn; /***/ }), /* 462 */ /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(373), getSymbols = __webpack_require__(223), keys = __webpack_require__(217); /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } module.exports = getAllKeys; /***/ }), /* 463 */ /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(373), getSymbolsIn = __webpack_require__(370), keysIn = __webpack_require__(222); /** * Creates an array of own and inherited enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeysIn(object) { return baseGetAllKeys(object, keysIn, getSymbolsIn); } module.exports = getAllKeysIn; /***/ }), /* 464 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(168), root = __webpack_require__(118); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'); module.exports = DataView; /***/ }), /* 465 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(168), root = __webpack_require__(118); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); module.exports = Promise; /***/ }), /* 466 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(168), root = __webpack_require__(118); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); module.exports = Set; /***/ }), /* 467 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(168), root = __webpack_require__(118); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; /***/ }), /* 468 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Initializes an array clone. * * @private * @param {Array} array The array to clone. * @returns {Array} Returns the initialized clone. */ function initCloneArray(array) { var length = array.length, result = new array.constructor(length); // Add properties assigned by `RegExp#exec`. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { result.index = array.index; result.input = array.input; } return result; } module.exports = initCloneArray; /***/ }), /* 469 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(225), cloneDataView = __webpack_require__(471), cloneRegExp = __webpack_require__(472), cloneSymbol = __webpack_require__(473), cloneTypedArray = __webpack_require__(474); /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** * Initializes an object clone based on its `toStringTag`. * * **Note:** This function only supports cloning values with tags of * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. * * @private * @param {Object} object The object to clone. * @param {string} tag The `toStringTag` of the object to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the initialized clone. */ function initCloneByTag(object, tag, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag: return cloneArrayBuffer(object); case boolTag: case dateTag: return new Ctor(+object); case dataViewTag: return cloneDataView(object, isDeep); case float32Tag: case float64Tag: case int8Tag: case int16Tag: case int32Tag: case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: return cloneTypedArray(object, isDeep); case mapTag: return new Ctor; case numberTag: case stringTag: return new Ctor(object); case regexpTag: return cloneRegExp(object); case setTag: return new Ctor; case symbolTag: return cloneSymbol(object); } } module.exports = initCloneByTag; /***/ }), /* 470 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(118); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /* 471 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(225); /** * Creates a clone of `dataView`. * * @private * @param {Object} dataView The data view to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned data view. */ function cloneDataView(dataView, isDeep) { var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } module.exports = cloneDataView; /***/ }), /* 472 */ /***/ (function(module, exports) { /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; /** * Creates a clone of `regexp`. * * @private * @param {Object} regexp The regexp to clone. * @returns {Object} Returns the cloned regexp. */ function cloneRegExp(regexp) { var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } module.exports = cloneRegExp; /***/ }), /* 473 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(216); /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a clone of the `symbol` object. * * @private * @param {Object} symbol The symbol object to clone. * @returns {Object} Returns the cloned symbol object. */ function cloneSymbol(symbol) { return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } module.exports = cloneSymbol; /***/ }), /* 474 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(225); /** * Creates a clone of `typedArray`. * * @private * @param {Object} typedArray The typed array to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } module.exports = cloneTypedArray; /***/ }), /* 475 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(476), getPrototype = __webpack_require__(372), isPrototype = __webpack_require__(221); /** * Initializes an object clone. * * @private * @param {Object} object The object to clone. * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { return (typeof object.constructor == 'function' && !isPrototype(object)) ? baseCreate(getPrototype(object)) : {}; } module.exports = initCloneObject; /***/ }), /* 476 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(189); /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!isObject(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); module.exports = baseCreate; /***/ }), /* 477 */ /***/ (function(module, exports, __webpack_require__) { var baseIsMap = __webpack_require__(478), baseUnary = __webpack_require__(219), nodeUtil = __webpack_require__(220); /* Node.js helper references. */ var nodeIsMap = nodeUtil && nodeUtil.isMap; /** * Checks if `value` is classified as a `Map` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. * @example * * _.isMap(new Map); * // => true * * _.isMap(new WeakMap); * // => false */ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; module.exports = isMap; /***/ }), /* 478 */ /***/ (function(module, exports, __webpack_require__) { var getTag = __webpack_require__(224), isObjectLike = __webpack_require__(190); /** `Object#toString` result references. */ var mapTag = '[object Map]'; /** * The base implementation of `_.isMap` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. */ function baseIsMap(value) { return isObjectLike(value) && getTag(value) == mapTag; } module.exports = baseIsMap; /***/ }), /* 479 */ /***/ (function(module, exports, __webpack_require__) { var baseIsSet = __webpack_require__(480), baseUnary = __webpack_require__(219), nodeUtil = __webpack_require__(220); /* Node.js helper references. */ var nodeIsSet = nodeUtil && nodeUtil.isSet; /** * Checks if `value` is classified as a `Set` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a set, else `false`. * @example * * _.isSet(new Set); * // => true * * _.isSet(new WeakSet); * // => false */ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; module.exports = isSet; /***/ }), /* 480 */ /***/ (function(module, exports, __webpack_require__) { var getTag = __webpack_require__(224), isObjectLike = __webpack_require__(190); /** `Object#toString` result references. */ var setTag = '[object Set]'; /** * The base implementation of `_.isSet` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a set, else `false`. */ function baseIsSet(value) { return isObjectLike(value) && getTag(value) == setTag; } module.exports = baseIsSet; /***/ }), /* 481 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _email = __webpack_require__(482); var _email2 = _interopRequireDefault(_email); var _address = __webpack_require__(484); var _address2 = _interopRequireDefault(_address); var _captcha = __webpack_require__(486); var _captcha2 = _interopRequireDefault(_captcha); var _date = __webpack_require__(487); var _date2 = _interopRequireDefault(_date); var _signature = __webpack_require__(491); var _signature2 = _interopRequireDefault(_signature); var _consent = __webpack_require__(492); var _consent2 = _interopRequireDefault(_consent); var _gdprcheckbox = __webpack_require__(493); var _gdprcheckbox2 = _interopRequireDefault(_gdprcheckbox); var _hidden = __webpack_require__(494); var _hidden2 = _interopRequireDefault(_hidden); var _html = __webpack_require__(495); var _html2 = _interopRequireDefault(_html); var _group = __webpack_require__(496); var _group2 = _interopRequireDefault(_group); var _slider = __webpack_require__(500); var _slider2 = _interopRequireDefault(_slider); var _multivalue = __webpack_require__(504); var _multivalue2 = _interopRequireDefault(_multivalue); var _name = __webpack_require__(507); var _name2 = _interopRequireDefault(_name); var _number = __webpack_require__(509); var _number2 = _interopRequireDefault(_number); var _pagination = __webpack_require__(510); var _pagination2 = _interopRequireDefault(_pagination); var _phone = __webpack_require__(511); var _phone2 = _interopRequireDefault(_phone); var _postdata = __webpack_require__(512); var _postdata2 = _interopRequireDefault(_postdata); var _section = __webpack_require__(514); var _section2 = _interopRequireDefault(_section); var _singlevalue = __webpack_require__(515); var _singlevalue2 = _interopRequireDefault(_singlevalue); var _text = __webpack_require__(516); var _text2 = _interopRequireDefault(_text); var _textarea = __webpack_require__(517); var _textarea2 = _interopRequireDefault(_textarea); var _time = __webpack_require__(518); var _time2 = _interopRequireDefault(_time); var _upload = __webpack_require__(519); var _upload2 = _interopRequireDefault(_upload); var _website = __webpack_require__(522); var _website2 = _interopRequireDefault(_website); var _radio = __webpack_require__(523); var _radio2 = _interopRequireDefault(_radio); var _calculation = __webpack_require__(524); var _calculation2 = _interopRequireDefault(_calculation); var _stripe = __webpack_require__(526); var _stripe2 = _interopRequireDefault(_stripe); var _currency = __webpack_require__(534); var _currency2 = _interopRequireDefault(_currency); var _password = __webpack_require__(535); var _password2 = _interopRequireDefault(_password); var _paypal = __webpack_require__(536); var _paypal2 = _interopRequireDefault(_paypal); var _richText = __webpack_require__(537); var _richText2 = _interopRequireDefault(_richText); var _allFormData = __webpack_require__(538); var _allFormData2 = _interopRequireDefault(_allFormData); var _payment = __webpack_require__(539); var _payment2 = _interopRequireDefault(_payment); var _rating = __webpack_require__(540); var _rating2 = _interopRequireDefault(_rating); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var fieldSettings = { emailSettings: _email2.default, addressSettings: _address2.default, captchaSettings: _captcha2.default, dateSettings: _date2.default, signatureSettings: _signature2.default, consentSettings: _consent2.default, gdprcheckboxSettings: _gdprcheckbox2.default, hiddenSettings: _hidden2.default, htmlSettings: _html2.default, groupSettings: _group2.default, sliderSettings: _slider2.default, multivalueSettings: _multivalue2.default, nameSettings: _name2.default, numberSettings: _number2.default, paginationSettings: _pagination2.default, phoneSettings: _phone2.default, postdataSettings: _postdata2.default, sectionSettings: _section2.default, singlevaluesettings: _singlevalue2.default, textSettings: _text2.default, textareaSettings: _textarea2.default, timeSettings: _time2.default, uploadSettings: _upload2.default, websiteSettings: _website2.default, radioSettings: _radio2.default, calculationSettings: _calculation2.default, stripeSettings: _stripe2.default, currencySettings: _currency2.default, passwordSettings: _password2.default, paypalSettings: _paypal2.default, richTextSettings: _richText2.default, allFormDataSettings: _allFormData2.default, paymentSettings: _payment2.default, ratingSettings: _rating2.default }; exports.default = fieldSettings; /***/ }), /* 482 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _labels = __webpack_require__(200); var _labels2 = _interopRequireDefault(_labels); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _validation = __webpack_require__(226); var _validation2 = _interopRequireDefault(_validation); var _border = __webpack_require__(170); var _border2 = _interopRequireDefault(_border); var _prefill = __webpack_require__(76); var _prefill2 = _interopRequireDefault(_prefill); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Email = function (_Component) { _inherits(Email, _Component); function Email(props) { _classCallCheck(this, Email); return _possibleConstructorReturn(this, (Email.__proto__ || Object.getPrototypeOf(Email)).call(this, props)); } _createClass(Email, [{ key: 'render', value: function render() { var type = this.props.type; switch (type) { case 'labels': return _react2.default.createElement(_labels2.default, this.props); case 'settings': return _react2.default.createElement( 'div', null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement(_validation2.default, this.props), _react2.default.createElement(_prefill2.default, this.props) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement( 'div', null, (0, _utils.translate)('Wrong field type!') ); } } }]); return Email; }(_react.Component); exports.default = Email; /***/ }), /* 483 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _datePicker = __webpack_require__(114); var _datePicker2 = _interopRequireDefault(_datePicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Rule = function (_Component) { _inherits(Rule, _Component); function Rule(props) { _classCallCheck(this, Rule); // Bind events var _this = _possibleConstructorReturn(this, (Rule.__proto__ || Object.getPrototypeOf(Rule)).call(this, props)); _this.toggleState = _this.toggleState.bind(_this); _this.updateField = _this.updateField.bind(_this); _this.updateRule = _this.updateRule.bind(_this); _this.updateValue = _this.updateValue.bind(_this); _this.updateInputValue = _this.updateInputValue.bind(_this); _this.state = { open: false }; _this.fields = _this.props.fields; return _this; } _createClass(Rule, [{ key: 'removeRule', value: function removeRule() { this.props.removeRule(this.props.counter); } }, { key: 'updateField', value: function updateField(prop, value) { this.props.updateField(this.props.counter, value); } }, { key: 'updateRule', value: function updateRule(prop, value) { this.props.updateRule(this.props.counter, value); } }, { key: 'updateValue', value: function updateValue(e) { this.props.updateValue(this.props.counter, e.target.value); } }, { key: 'updateInputValue', value: function updateInputValue(prop, value) { this.props.updateInputValue(this.props.counter, value); } }, { key: 'toggleState', value: function toggleState() { this.setState({ open: !this.state.open }); } }, { key: 'disableSearch', value: function disableSearch() { return { minimumResultsForSearch: -1 }; } }, { key: 'getRuleValue', value: function getRuleValue() { if (_.isEmpty(this.props.rule.value)) { return (0, _utils.translate)('null'); } var value = this.props.rule.value; if (['is_before', 'is_after'].includes(this.props.rule.rule)) { value = (0, _utils.convertTimestamp)(value); } return value; } }, { key: 'render', value: function render() { var _this2 = this; var conditionId = 'condition-' + this.props.counter; var fieldData = _.where(this.fields, { element_id: this.props.rule.element_id })[0] || {}; var isConsent = 'consent' === fieldData.field_type; if (isConsent) { this.props.rule.value = (0, _utils.translate)('checked'); } var valueLabel = this.getRuleValue(); var month = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; var dateRules = ['day_is', 'day_is_not', 'month_is', 'month_is_not', 'is_before', 'is_after', 'is_before_n_or_more_days', 'is_before_less_than_n_days', 'is_after_n_or_more_days', 'is_after_less_than_n_days']; var days = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']; return _react2.default.createElement( 'div', { className: 'sui-box fui-visibility-rule' + (true === this.state.open ? ' fui-open' : '') }, _react2.default.createElement( 'h4', { className: 'fui-visibility-rule-header' }, _react2.default.createElement( 'button', { id: 'forminator-field-' + conditionId, className: 'sui-box-header', 'aria-controls': 'forminator-field-' + conditionId + '-content', 'aria-expanded': this.state.open, onClick: function onClick() { return _this2.toggleState(); } }, _react2.default.createElement('i', { className: 'sui-icon-link fui-visibility-rule-icon', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'fui-visibility-rule-text' }, _react2.default.createElement( 'strong', null, (0, _escapeHtml.escapeHTML)(fieldData.label) ), '\xA0', (this.props.rule.rule === 'is_before_n_or_more_days' || this.props.rule.rule === 'is_before_less_than_n_days' || this.props.rule.rule === 'is_after_n_or_more_days' || this.props.rule.rule === 'is_after_less_than_n_days') && _react2.default.createElement( _react2.default.Fragment, null, (0, _utils.getRuleLabel)(this.props.rule.rule, fieldData.field_type, valueLabel) ), !(this.props.rule.rule === 'is_before_n_or_more_days' || this.props.rule.rule === 'is_before_less_than_n_days' || this.props.rule.rule === 'is_after_n_or_more_days' || this.props.rule.rule === 'is_after_less_than_n_days') && _react2.default.createElement( _react2.default.Fragment, null, (0, _utils.getRuleLabel)(this.props.rule.rule, fieldData.field_type), '\xA0', _react2.default.createElement( 'strong', null, valueLabel ) ) ), _react2.default.createElement('i', { className: 'sui-icon-chevron-down fui-visibility-rule-arrow', 'aria-hidden': 'true' }) ) ), _react2.default.createElement( 'div', { role: 'region', id: 'forminator-field-' + conditionId + '-content', className: 'sui-box-body fui-visibility-rule-body', 'aria-labelledby': 'forminator-field-' + conditionId, 'aria-hidden': true === this.state.open ? false : true }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { elementId: conditionId + '-field', property: 'element_id', updateProperty: this.updateField, settings: this.props.rule, label: (0, _utils.translate)('Field') }), _.map(this.fields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { elementId: conditionId + '-condrule', settings: this.props.rule, property: 'rule', updateProperty: this.updateRule, label: (0, _utils.translate)('Condition (required)'), options: this.disableSearch() }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select rule') ), 'signature' === fieldData.field_type && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is' }, (0, _utils.translate)('Is null') ), _react2.default.createElement( 'option', { value: 'is_not' }, (0, _utils.translate)('Is not null') ) ), 'signature' !== fieldData.field_type && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is' }, (0, _utils.translate)('Is') ), _react2.default.createElement( 'option', { value: 'is_not' }, (0, _utils.translate)('Is not') ) ), (fieldData.isNumber || 'rating' === fieldData.field_type) && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is_great' }, (0, _utils.translate)('Is greater than') ), _react2.default.createElement( 'option', { value: 'is_less' }, (0, _utils.translate)('Is less than') ) ), !fieldData.isNumber && !fieldData.hasOptions && !isConsent && 'signature' !== fieldData.field_type && 'rating' !== fieldData.field_type && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'contains' }, (0, _utils.translate)('Contains') ), _react2.default.createElement( 'option', { value: 'does_not_contain' }, (0, _utils.translate)('Does not contain') ), _react2.default.createElement( 'option', { value: 'starts' }, (0, _utils.translate)('Starts with') ), _react2.default.createElement( 'option', { value: 'ends' }, (0, _utils.translate)('Ends with') ) ), 'date' === fieldData.field_type && ('date-day' === fieldData.field_slug || 'date' === fieldData.field_slug) && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'day_is' }, (0, _utils.translate)('Day is') ), _react2.default.createElement( 'option', { value: 'day_is_not' }, (0, _utils.translate)('Day is not') ) ), 'date' === fieldData.field_type && ('date-month' === fieldData.field_slug || 'date' === fieldData.field_slug) && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'month_is' }, (0, _utils.translate)('Month is') ), _react2.default.createElement( 'option', { value: 'month_is_not' }, (0, _utils.translate)('Month is not') ) ), 'date' === fieldData.field_type && 'date' === fieldData.field_slug && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is_before' }, (0, _utils.translate)('Is before') ), _react2.default.createElement( 'option', { value: 'is_after' }, (0, _utils.translate)('Is after') ), _react2.default.createElement( 'option', { value: 'is_before_n_or_more_days' }, (0, _utils.translate)('Is before n or more days') ), _react2.default.createElement( 'option', { value: 'is_before_less_than_n_days' }, (0, _utils.translate)('Is before less than n days') ), _react2.default.createElement( 'option', { value: 'is_after_n_or_more_days' }, (0, _utils.translate)('Is after n or more days') ), _react2.default.createElement( 'option', { value: 'is_after_less_than_n_days' }, (0, _utils.translate)('Is after less than n days') ) ) ) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _react2.default.Fragment, null, fieldData.hasOptions && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select option') ), _.map(fieldData.values, function (option, x) { return _react2.default.createElement( 'option', { value: option.value, key: x }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ) ), !fieldData.hasOptions && isConsent && _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.rule, inputId: conditionId + '-value', property: 'value', updateProperty: this.updateInputValue, label: (0, _utils.translate)('Status'), disabled: true })), !fieldData.hasOptions && 'signature' !== fieldData.field_type && !isConsent && (!dateRules.includes(this.props.rule.rule) || 'date' !== fieldData.field_type) && _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.rule, inputId: conditionId + '-value', property: 'value', updateProperty: this.updateInputValue, label: (0, _utils.translate)('Value') })), !fieldData.hasOptions && 'date' === fieldData.field_type && ('month_is' === this.props.rule.rule || 'month_is_not' === this.props.rule.rule) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select month') ), _.map(month, function (value) { return _react2.default.createElement( 'option', { value: value, key: value }, value ); }) ) ), !fieldData.hasOptions && 'date' === fieldData.field_type && ('day_is' === this.props.rule.rule || 'day_is_not' === this.props.rule.rule) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select day') ), _.map(days, function (value) { return _react2.default.createElement( 'option', { value: value, key: value }, value ); }) ) ), !fieldData.hasOptions && 'date' === fieldData.field_type && ('is_before' === this.props.rule.rule || 'is_after' === this.props.rule.rule) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Select date') ), _react2.default.createElement(_datePicker2.default, _extends({}, this.props, { settings: this.props.rule, property: 'value', hasWordFormat: true, id: conditionId + '-value', placeholder: (0, _utils.translate)('20 April 2018'), updateProperty: this.updateInputValue })) ), !fieldData.hasOptions && 'date' === fieldData.field_type && ('is_before_n_or_more_days' === this.props.rule.rule || 'is_before_less_than_n_days' === this.props.rule.rule || 'is_after_n_or_more_days' === this.props.rule.rule || 'is_after_less_than_n_days' === this.props.rule.rule) && _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.rule, inputId: conditionId + '-value', property: 'value', updateProperty: this.updateInputValue, label: (0, _utils.translate)('Number of days'), placeholder: (0, _utils.translate)('E.g. 10'), type: 'number', minValue: '0' })) ) ) ), _react2.default.createElement( 'div', { className: 'fui-visibility-rule-footer' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-red sui-button-ghost', onClick: this.removeRule.bind(this) }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), (0, _utils.translate)('Delete') ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost', onClick: function onClick() { return _this2.toggleState(); } }, (0, _utils.translate)('Done') ) ) ) ); } }]); return Rule; }(_react.Component); exports.default = Rule; /***/ }), /* 484 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _geolocation = __webpack_require__(485); var _geolocation2 = _interopRequireDefault(_geolocation); var _addonRequired = __webpack_require__(374); var _addonRequired2 = _interopRequireDefault(_addonRequired); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _accordionToggle = __webpack_require__(187); var _accordionToggle2 = _interopRequireDefault(_accordionToggle); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _prefill = __webpack_require__(76); var _prefill2 = _interopRequireDefault(_prefill); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Address = function (_Component) { _inherits(Address, _Component); function Address(props) { _classCallCheck(this, Address); var _this = _possibleConstructorReturn(this, (Address.__proto__ || Object.getPrototypeOf(Address)).call(this, props)); _this.multiFields = [{ slug: 'street_address', label: (0, _utils.translate)('Address') }, { slug: 'address_line', label: (0, _utils.translate)('Apartment, suite, etc.') }, { slug: 'address_city', label: (0, _utils.translate)('City') }, { slug: 'address_state', label: (0, _utils.translate)('State / Province') }, { slug: 'address_zip', label: (0, _utils.translate)('ZIP / Postal code') }, { slug: 'address_country', label: (0, _utils.translate)('Country') }]; return _this; } _createClass(Address, [{ key: 'hasChildrens', value: function hasChildrens(childrens) { var result = _.filter(childrens, function (child) { if (_.isUndefined(child)) { return false; } return true; }); if (_.isEmpty(result)) { return false; } return true; } }, { key: 'render', value: function render() { var _this2 = this; var type = this.props.type; var countryPrefillNotice = (0, _utils.translate)('Note: The query parameter\'s value passed in URL should match with the ' + '{{link}}alpha-2 country code{{/link}} of the country you want to ' + 'pre-populate dynamically.', { components: { link: _react2.default.createElement('a', { href: 'https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes', target: '_blank' }) } }); switch (type) { case 'labels': return _react2.default.createElement( 'div', { className: 'sui-accordion sui-accordion-flushed', value: 'multiple' }, this.multiFields.map(function (field, i) { if (field.slug === 'address_country') { return _react2.default.createElement( _accordionToggle2.default, _extends({}, _this2.props, { label: field.label, property: field.slug, settings: _this2.props.state, required: _this2.props.state[field.slug + '_required'], key: i }), _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: field.slug + '_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Placeholder (optional)'), 'data-placeholder': (0, _utils.translate)('Enter Placeholder'), property: field.slug + '_placeholder' }), _react2.default.createElement('option', null), _.map(forminatorData.countries, function (country, x) { return _react2.default.createElement( 'option', { value: country, key: x }, country ); }) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: field.slug + '_description' })) ) ) ) ); } if (field.slug !== 'address_country') { return _react2.default.createElement( _accordionToggle2.default, _extends({}, _this2.props, { label: field.label, property: field.slug, settings: _this2.props.state, required: _this2.props.state[field.slug + '_required'], key: i }), _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: field.slug + '_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter Placeholder'), property: field.slug + '_placeholder' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: field.slug + '_description' })) ) ) ) ); } }) ); case 'settings': // Used to get first tab to be activated by default var firstTab = void 0; var childrens = this.multiFields.map(function (field, i) { if (!_.isUndefined(_this2.props.state[field.slug]) && _this2.props.state[field.slug]) { if (_.isEmpty(firstTab)) { firstTab = field.slug; } return _react2.default.createElement( _col2.default, { cols: '12', label: (0, _escapeHtml.escapeHTML)(field.label), settings: _this2.props.state, value: field.slug, required: _this2.props.state[field.slug + '_required'], boxClass: 'sui-tab-boxed', key: i }, _react2.default.createElement(_required2.default, _extends({}, _this2.props, { prefix: field.slug })), _react2.default.createElement(_prefill2.default, _extends({}, _this2.props, { prefix: field.slug })) ); } }); if (!this.hasChildrens(childrens)) { return _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red sui-active', style: { display: 'none' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('At least one field must be enabled') ) ) ) ); } return _react2.default.createElement( _tabs2.default, { 'default': firstTab }, childrens ); case 'geolocation': if (forminatorData.geolocation) { return _react2.default.createElement(_geolocation2.default, this.props); } else { return _react2.default.createElement(_addonRequired2.default, _extends({}, this.props, { text: forminatorData.isPro ? (0, _utils.translate)('The Autocomplete feature simplifies entering addresses ' + 'by offering real-time suggestions as you type. ' + 'This feature requires the Forminator Geolocation Add-on.') : (0, _utils.translate)('Collect your form submitters\' location information, ' + 'and provide address auto-completion using Google Maps API.'), addonUrl: 'https://wpmudev.com/project/forminator-pro/?utm_source=forminator&utm_medium=plugin&utm_campaign=forminator_form-builder_geolocation-addon', addonImg: 'https://wpmudev.com/wp-content/uploads/2023/08/Geolocation-logo.png' })); } case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Address; }(_react.Component); exports.default = Address; /***/ }), /* 485 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _axios = __webpack_require__(37); var _axios2 = _interopRequireDefault(_axios); var _qs = __webpack_require__(38); var _qs2 = _interopRequireDefault(_qs); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Geolocation = function (_Component) { _inherits(Geolocation, _Component); function Geolocation(props) { _classCallCheck(this, Geolocation); return _possibleConstructorReturn(this, (Geolocation.__proto__ || Object.getPrototypeOf(Geolocation)).call(this, props)); } _createClass(Geolocation, [{ key: 'render', value: function render() { var object = { action: 'forminator_geolocation_check_api', _ajax_nonce: forminatorData.geolocation.nonce }; _axios2.default.post(forminatorData.ajaxUrl, _qs2.default.stringify(object)).then(function (data) { if (!data.data.success) { jQuery('#forminator-geolocation-api-invalid').show(); } }); var fields = (0, _utils.getFields)(this.props.wrappers); var canManageSettings = (0, _utils.isTrue)(forminatorData.userPermissions['manage_forminator_settings']) || (0, _utils.isTrue)(forminatorData.userPermissions['manage_options']); return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red sui-active', id: 'forminator-geolocation-api-invalid', 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Failed to connect to the Google Maps API. ' + 'Please ensure you have entered a valid API key in the ' + '{{link}}Settings page{{/link}}.', { components: { link: canManageSettings ? _react2.default.createElement('a', { href: forminatorData.settingsUrl + '§ion=geolocation', target: '_blank' }) : _react2.default.createElement('b', null) } }) ) ) ) ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Autocomplete'), labelDark: true, description: (0, _utils.translate)('Enable this option to integrate Google Maps\' address auto-completion service into your addresses field. This powerful feature will simplify the address entry process for users by providing real-time suggestions as they type.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'auto_suggest', settings: this.props.state, 'default': 'disable', simple: true }), _react2.default.createElement( _empty2.default, { value: 'enable' }, (0, _utils.translate)('Enable') ), _react2.default.createElement( _empty2.default, { value: 'disable' }, (0, _utils.translate)('Disable') ) ) ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Display address on Map'), labelDark: true, description: (0, _utils.translate)('Use this option to display a Google Map next to your address field(s), showing the entered address. Users will be able to see their selected address on the map.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'show_map', settings: this.props.state, 'default': 'hide', simple: true }), _react2.default.createElement( _container2.default, _extends({}, this.props, { label: (0, _utils.translate)('Show'), settings: this.props.state, value: 'show', boxClass: 'sui-tab-boxed' }), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Map position'), labelDark: true, description: (0, _utils.translate)('The map is displayed at the bottom of the address field by default. You can also set it to be displayed above the address field below.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'map_placement', defaultValue: 'after' }), _react2.default.createElement( 'option', { value: 'before' }, (0, _utils.translate)('Above Address field(s)') ), _react2.default.createElement( 'option', { value: 'after' }, (0, _utils.translate)('Below Address field(s)') ) ) ) ) ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Map Size'), labelDark: true, description: (0, _utils.translate)('Set the size of your map.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'map_size', settings: this.props.state, 'default': 'responsive', simple: true }), _react2.default.createElement( _empty2.default, { value: 'responsive' }, (0, _utils.translate)('Responsive') ), _react2.default.createElement( _container2.default, _extends({}, this.props, { label: (0, _utils.translate)('Custom Size'), settings: this.props.state, value: 'custom', boxClass: 'sui-tab-boxed' }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Height'), note: 'px', type: 'number', isPositive: 'true', placeholder: (0, _utils.translate)('Enter Height'), property: 'map_height', defaultValue: '300' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Width'), note: 'px', type: 'number', isPositive: 'true', placeholder: (0, _utils.translate)('Enter Width'), property: 'map_width', defaultValue: '300' })) ) ) ) ) ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Default map location'), labelDark: true, description: (0, _utils.translate)('By default we show a 0.0 latitude and longitude on the map, you can use the option below to specify a default geolocation to display on the Map.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'map_location', settings: this.props.state, 'default': 'default', simple: true }), _react2.default.createElement( _empty2.default, { value: 'default' }, (0, _utils.translate)('Default location') ), _react2.default.createElement( _container2.default, _extends({}, this.props, { label: (0, _utils.translate)('Custom location'), settings: this.props.state, value: 'custom', boxClass: 'sui-tab-boxed' }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, property: 'default_coordinates', label: (0, _utils.translate)('Enter coordinates'), placeholder: (0, _utils.translate)('E.g., 1.234567, 9.876543'), description: (0, _utils.translate)('To get coordinates, visit {{link}}https://map.google.com{{/link}} ' + 'navigate to your preferred location, ' + 'and right-click on any point ' + 'and click on the first option with digits.', { components: { link: _react2.default.createElement('a', { href: 'https://map.google.com', target: '_blank' }) } }) })) ) ) ) ) ) ), _react2.default.createElement( _empty2.default, { value: 'hide' }, (0, _utils.translate)('Hide') ) ) ) ); } }]); return Geolocation; }(_react.Component); exports.default = Geolocation; /***/ }), /* 486 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _radioOptions = __webpack_require__(115); var _radioOptions2 = _interopRequireDefault(_radioOptions); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _wpEditor = __webpack_require__(31); var _wpEditor2 = _interopRequireDefault(_wpEditor); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Captcha = function (_Component) { _inherits(Captcha, _Component); function Captcha(props) { _classCallCheck(this, Captcha); return _possibleConstructorReturn(this, (Captcha.__proto__ || Object.getPrototypeOf(Captcha)).call(this, props)); } _createClass(Captcha, [{ key: 'render', value: function render() { var type = this.props.type; var captchaProvider = _.isUndefined(this.props.state.captcha_provider) ? 'recaptcha' : this.props.state.captcha_provider; var hcaptchaErrorMessage = _.isUndefined(this.props.state.hcaptcha_error_message) ? (0, _utils.translate)('hCaptcha verification failed. Please try again.') : this.props.state.hcaptcha_error_message; var canManageSettings = (0, _utils.isTrue)(forminatorData.userPermissions['manage_forminator_settings']) || (0, _utils.isTrue)(forminatorData.userPermissions['manage_options']); var addkeys = canManageSettings ? (0, _utils.translate)('Add your API keys ' + '{{link}}here{{/link}} ' + 'and then come back to configure this field.', { components: { link: _react2.default.createElement('a', { href: forminatorData.settingsUrl + '§ion=captcha', target: '_blank' }) } }) : ''; var hCaptchaNoKeys = (0, _utils.translate)('You haven\'t added hCaptcha API keys in your global settings.'); var reCaptchaNoKeys = (0, _utils.translate)('You haven\'t added API keys for this reCAPTCHA type in your global settings.'); switch (type) { case 'labels': return _react2.default.createElement('div', null); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Captcha Provider'), labelDark: true, description: (0, _utils.translate)('Select your preferred CAPTCHA provider below.'), sidebar: false }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { settings: this.props.state, property: 'captcha_provider', 'default': 'recaptcha' }), _react2.default.createElement(_container2.default, { value: 'recaptcha', label: (0, _utils.translate)('reCAPTCHA') }), _react2.default.createElement( _container2.default, _extends({ settings: this.props.state, value: 'hcaptcha', label: (0, _utils.translate)('hCaptcha') }, this.props), !forminatorData.hasHCaptcha && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red ' + (!forminatorData.hasHCaptcha && 'sui-active'), style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, hCaptchaNoKeys, ' ', addkeys ) ) ) ) ) ) ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Alignment'), labelDark: true, description: (0, _utils.translate)('Select the alignment of CAPTCHA.'), sidebar: false }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'captcha_alignment', defaultValue: 'left' }), _react2.default.createElement( 'span', { value: 'left' }, (0, _utils.translate)('Left') ), _react2.default.createElement( 'span', { value: 'center' }, (0, _utils.translate)('Center') ), _react2.default.createElement( 'span', { value: 'right' }, (0, _utils.translate)('Right') ) ) ), 'recaptcha' === captchaProvider && _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('reCAPTCHA type'), labelDark: true, description: (0, _utils.translate)('Choose the reCAPTCHA type you want to use on your form. ' + 'You can read more about the different reCAPTCHA types ' + '{{link}}here{{/link}} and then choose the one which ' + 'suits you the best.', { components: { link: _react2.default.createElement('a', { href: 'https://developers.google.com/recaptcha/docs/versions', target: '_blank' }) } }), sidebar: false }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'captcha_type', settings: this.props.state, 'default': 'v2_checkbox', label: '' }), _react2.default.createElement( _container2.default, _extends({ settings: this.props.state }, this.props, { value: 'v2_checkbox', label: (0, _utils.translate)('V2 Checkbox'), boxClass: forminatorData.hasV2Captcha ? 'sui-tab-boxed' : '' }), !forminatorData.hasV2Captcha && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red ' + (!forminatorData.hasV2Captcha && ' sui-active'), style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, reCaptchaNoKeys, ' ', addkeys ) ) ) ), forminatorData.hasV2Captcha && _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Size'), property: 'captcha_size', fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: 'normal' }, (0, _utils.translate)('Normal') ), _react2.default.createElement( 'option', { value: 'compact' }, (0, _utils.translate)('Compact') ) ) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Theme'), property: 'captcha_theme', fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: 'light' }, (0, _utils.translate)('Light') ), _react2.default.createElement( 'option', { value: 'dark' }, (0, _utils.translate)('Dark') ) ) ) ) ), _react2.default.createElement( _container2.default, _extends({ settings: this.props.state }, this.props, { value: 'v2_invisible', label: (0, _utils.translate)('V2 Invisible'), boxClass: forminatorData.hasV2InvisibleCaptcha ? 'sui-tab-boxed' : '' }), !forminatorData.hasV2InvisibleCaptcha && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red' + (!forminatorData.hasV2InvisibleCaptcha && ' sui-acitve'), style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, reCaptchaNoKeys, ' ', addkeys ) ) ) ), forminatorData.hasV2InvisibleCaptcha && _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Theme'), property: 'captcha_theme', fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: 'light' }, (0, _utils.translate)('Light') ), _react2.default.createElement( 'option', { value: 'dark' }, (0, _utils.translate)('Dark') ) ) ), _react2.default.createElement( _container2.default, _extends({ settings: this.props.state }, this.props, { value: 'v3_recaptcha', label: (0, _utils.translate)('reCAPTCHA V3'), boxClass: forminatorData.hasV3Captcha ? 'sui-tab-boxed' : '' }), !forminatorData.hasV3Captcha && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, reCaptchaNoKeys, ' ', addkeys ) ) ) ), forminatorData.hasV3Captcha && _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('reCAPTCHA V3 returns a score (1 is very likely a ' + 'good interaction, 0 is very likely a bot) based on ' + 'user interaction. Choose the score below which the ' + 'verification should fail.') ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Score Threshold'), property: 'score_threshold', fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: '0.0' }, (0, _utils.translate)('0.0') ), _react2.default.createElement( 'option', { value: '0.1' }, (0, _utils.translate)('0.1') ), _react2.default.createElement( 'option', { value: '0.2' }, (0, _utils.translate)('0.2') ), _react2.default.createElement( 'option', { value: '0.3' }, (0, _utils.translate)('0.3') ), _react2.default.createElement( 'option', { value: '0.4' }, (0, _utils.translate)('0.4') ), _react2.default.createElement( 'option', { value: '0.5' }, (0, _utils.translate)('0.5') ), _react2.default.createElement( 'option', { value: '0.6' }, (0, _utils.translate)('0.6') ), _react2.default.createElement( 'option', { value: '0.7' }, (0, _utils.translate)('0.7') ), _react2.default.createElement( 'option', { value: '0.8' }, (0, _utils.translate)('0.8') ), _react2.default.createElement( 'option', { value: '0.9' }, (0, _utils.translate)('0.9') ), _react2.default.createElement( 'option', { value: '1.0' }, (0, _utils.translate)('1.0') ) ) ) ) ) ) ), 'hcaptcha' === captchaProvider && forminatorData.hasHCaptcha && _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('hCaptcha type'), labelDark: true, description: (0, _utils.translate)('hCaptcha offers two different types of CAPTCHA challenges, a Checkbox and an Invisible type. Choose the hCaptcha type you want to use in your form.'), sidebar: false }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'hcaptcha_type', settings: this.props.state, 'default': 'hc_checkbox', label: '' }), _react2.default.createElement( _container2.default, _extends({ settings: this.props.state }, this.props, { value: 'hc_checkbox', label: (0, _utils.translate)('Checkbox'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Size'), property: 'hcaptcha_size', fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: 'normal' }, (0, _utils.translate)('Normal') ), _react2.default.createElement( 'option', { value: 'compact' }, (0, _utils.translate)('Compact') ) ) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Theme'), property: 'hcaptcha_theme', fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: 'light' }, (0, _utils.translate)('Light') ), _react2.default.createElement( 'option', { value: 'dark' }, (0, _utils.translate)('Dark') ) ) ) ) ), _react2.default.createElement( _container2.default, _extends({ settings: this.props.state }, this.props, { value: 'hc_invisible', label: (0, _utils.translate)('Invisible'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { settings: this.props.state, property: 'hc_invisible_notice', hideEditorOptions: 'true', descriptionTop: (0, _utils.translate)('To comply with online privacy laws, users should be informed that this form includes an invisible CAPTCHA field.') })) ) ) ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Language'), labelDark: true, description: (0, _utils.translate)('By default, the global CAPTCHA language setting will be used. ' + 'However, you can manually select a different language here.'), sidebar: false }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'language', fieldClass: 'sui-input-md', 'data-placeholder': (0, _utils.translate)('Automatic'), hasSearch: true }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Automatic') ), _.map(forminatorData.captchaLangs, function (label, value) { return _react2.default.createElement( 'option', { value: value, key: value }, label ); }) ) ), 'recaptcha' === captchaProvider && 'v3_recaptcha' === this.props.state.captcha_type && forminatorData.hasV3Captcha && _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Theme'), labelDark: true, description: (0, _utils.translate)('Select the theme for the captcha.'), sidebar: false }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Theme'), property: 'captcha_theme', fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: 'light' }, (0, _utils.translate)('Light') ), _react2.default.createElement( 'option', { value: 'dark' }, (0, _utils.translate)('Dark') ) ) ), 'recaptcha' === captchaProvider && ('v2_invisible' === this.props.state.captcha_type && forminatorData.hasV2InvisibleCaptcha || 'v3_recaptcha' === this.props.state.captcha_type && forminatorData.hasV3Captcha) && _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Badge Position'), labelDark: true, description: (0, _utils.translate)('Select where the reCAPTCHA badge will be displayed on your page.'), sidebar: false }, _react2.default.createElement( _radioOptions2.default, _extends({}, this.props, { settings: this.props.state, property: 'captcha_badge', defaultValue: 'inline', radioClass: 'sui-radio-sm' }), _react2.default.createElement(_empty2.default, { value: 'bottomright', hasImage: true, image1x: 'recaptcha-bottomright.png', image2x: 'recaptcha-bottomright@2x.png', label: (0, _utils.translate)('Bottom Right') }), _react2.default.createElement(_empty2.default, { value: 'bottomleft', hasImage: true, image1x: 'recaptcha-bottomleft.png', image2x: 'recaptcha-bottomleft@2x.png', label: (0, _utils.translate)('Bottom Left') }), _react2.default.createElement(_empty2.default, { value: 'inline', hasImage: true, image1x: 'recaptcha-inline.png', image2x: 'recaptcha-inline@2x.png', label: (0, _utils.translate)('Inline in Form') }) ) ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Error Message'), labelDark: true, sidebar: false }, 'recaptcha' === captchaProvider && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('Choose the error message you want to display ' + 'on your form when reCAPTCHA verification fails.') ), _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'text', property: 'recaptcha_error_message', settings: this.props.state })) ), 'hcaptcha' === captchaProvider && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('Choose the error message you want to display ' + 'on your form when hCaptcha verification fails.') ), _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'text', property: 'hcaptcha_error_message', settings: this.props.state, defaultValue: hcaptchaErrorMessage })) ) ) ); case 'visibility': return _react2.default.createElement('div', null); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Captcha; }(_react.Component); exports.default = Captcha; /***/ }), /* 487 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _datePicker = __webpack_require__(114); var _datePicker2 = _interopRequireDefault(_datePicker); var _accordion = __webpack_require__(34); var _accordion2 = _interopRequireDefault(_accordion); var _prefill = __webpack_require__(76); var _prefill2 = _interopRequireDefault(_prefill); var _limits = __webpack_require__(488); var _limits2 = _interopRequireDefault(_limits); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable camelcase */ var Date = function (_Component) { _inherits(Date, _Component); function Date(props) { _classCallCheck(this, Date); return _possibleConstructorReturn(this, (Date.__proto__ || Object.getPrototypeOf(Date)).call(this, props)); } _createClass(Date, [{ key: 'render', value: function render() { var type = this.props.type; var field_type = this.props.state.field_type; var prefillMessage = (0, _utils.translate)('Note: The query parameter\'s value passed in URL should match with the ' + 'selected date format.'); switch (type) { case 'labels': return _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'field_type', settings: this.props.state, 'default': 'picker', label: (0, _utils.translate)('Type'), divClass: 'sui-tabs-content-lg' }), _react2.default.createElement( _container2.default, _extends({ settings: this.props.state }, this.props, { value: 'picker', label: (0, _utils.translate)('Calendar') }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter Placeholder'), property: 'placeholder' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Date Format'), placeholder: (0, _utils.translate)('Date Format'), property: 'date_format' }), _react2.default.createElement( 'option', { value: 'yy-mm-dd' }, (0, _utils.translate)('Y-m-d') ), _react2.default.createElement( 'option', { value: 'mm-dd-yy' }, (0, _utils.translate)('m-d-Y') ), _react2.default.createElement( 'option', { value: 'dd-mm-yy' }, (0, _utils.translate)('d-m-Y') ), _react2.default.createElement( 'option', { value: 'yy/mm/dd' }, (0, _utils.translate)('Y/m/d') ), _react2.default.createElement( 'option', { value: 'mm/dd/yy' }, (0, _utils.translate)('m/d/Y') ), _react2.default.createElement( 'option', { value: 'dd/mm/yy' }, (0, _utils.translate)('d/m/Y') ), _react2.default.createElement( 'option', { value: 'yy.mm.dd' }, (0, _utils.translate)('Y.m.d') ), _react2.default.createElement( 'option', { value: 'mm.dd.yy' }, (0, _utils.translate)('m.d.Y') ), _react2.default.createElement( 'option', { value: 'dd.mm.yy' }, (0, _utils.translate)('d.m.Y') ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _radio2.default, _extends({ property: 'icon', settings: this.props.state }, this.props, { label: (0, _utils.translate)('Calendar Icon') }), _react2.default.createElement( 'span', { value: 'true' }, (0, _utils.translate)('Show') ), _react2.default.createElement( 'span', { value: 'false' }, (0, _utils.translate)('Hide') ) ) ) ) ), _react2.default.createElement( _container2.default, _extends({ settings: this.props.state }, this.props, { value: 'select', label: (0, _utils.translate)('Dropdowns') }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Date Format'), placeholder: (0, _utils.translate)('Date Format'), property: 'date_format' }), _react2.default.createElement( 'option', { value: 'yy-mm-dd' }, (0, _utils.translate)('Y-m-d') ), _react2.default.createElement( 'option', { value: 'mm-dd-yy' }, (0, _utils.translate)('m-d-Y') ), _react2.default.createElement( 'option', { value: 'dd-mm-yy' }, (0, _utils.translate)('d-m-Y') ), _react2.default.createElement( 'option', { value: 'yy/mm/dd' }, (0, _utils.translate)('Y/m/d') ), _react2.default.createElement( 'option', { value: 'mm/dd/yy' }, (0, _utils.translate)('m/d/Y') ), _react2.default.createElement( 'option', { value: 'dd/mm/yy' }, (0, _utils.translate)('d/m/Y') ), _react2.default.createElement( 'option', { value: 'yy.mm.dd' }, (0, _utils.translate)('Y.m.d') ), _react2.default.createElement( 'option', { value: 'mm.dd.yy' }, (0, _utils.translate)('m.d.Y') ), _react2.default.createElement( 'option', { value: 'dd.mm.yy' }, (0, _utils.translate)('d.m.Y') ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ), _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Fields') ), _react2.default.createElement( 'div', { className: 'sui-accordion sui-accordion-flushed', style: { marginTop: '10px' } }, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Month') }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label (optional)'), placeholder: (0, _utils.translate)('Enter label'), property: 'month_label' })) ) ) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Day') }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label (optional)'), placeholder: (0, _utils.translate)('Enter label'), property: 'day_label' })) ) ) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Year') }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label (optional)'), placeholder: (0, _utils.translate)('Enter label'), property: 'year_label' })) ) ) ) ) ), _react2.default.createElement( _container2.default, _extends({ settings: this.props.state }, this.props, { value: 'input', label: (0, _utils.translate)('Text inputs') }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Date Format'), placeholder: (0, _utils.translate)('Date Format'), property: 'date_format' }), _react2.default.createElement( 'option', { value: 'yy-mm-dd' }, (0, _utils.translate)('Y-m-d') ), _react2.default.createElement( 'option', { value: 'mm-dd-yy' }, (0, _utils.translate)('m-d-Y') ), _react2.default.createElement( 'option', { value: 'dd-mm-yy' }, (0, _utils.translate)('d-m-Y') ), _react2.default.createElement( 'option', { value: 'yy/mm/dd' }, (0, _utils.translate)('Y/m/d') ), _react2.default.createElement( 'option', { value: 'mm/dd/yy' }, (0, _utils.translate)('m/d/Y') ), _react2.default.createElement( 'option', { value: 'dd/mm/yy' }, (0, _utils.translate)('d/m/Y') ), _react2.default.createElement( 'option', { value: 'yy.mm.dd' }, (0, _utils.translate)('Y.m.d') ), _react2.default.createElement( 'option', { value: 'mm.dd.yy' }, (0, _utils.translate)('m.d.Y') ), _react2.default.createElement( 'option', { value: 'dd.mm.yy' }, (0, _utils.translate)('d.m.Y') ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ), _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Fields') ), _react2.default.createElement( 'div', { className: 'sui-accordion sui-accordion-flushed', style: { marginTop: '10px' } }, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Month') }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label (optional)'), placeholder: (0, _utils.translate)('Enter label'), property: 'month_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter placeholder'), property: 'month_placeholder' })) ) ) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Day') }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label (optional)'), placeholder: (0, _utils.translate)('Enter label'), property: 'day_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter placeholder'), property: 'day_placeholder' })) ) ) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Year') }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label (optional)'), placeholder: (0, _utils.translate)('Enter label'), property: 'year_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter placeholder'), property: 'year_placeholder' })) ) ) ) ) ) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props), field_type !== 'input' && _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Default Date'), labelDark: true, description: (0, _utils.translate)('Use this feature to specify a default selected date.'), sidebar: false }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'default_date', settings: this.props.state, 'default': 'none', label: '' }), _react2.default.createElement( _empty2.default, { value: 'none' }, (0, _utils.translate)('None') ), _react2.default.createElement( _empty2.default, { value: 'today' }, (0, _utils.translate)('Today') ), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'custom', label: (0, _utils.translate)('Future Date'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement(_datePicker2.default, _extends({}, this.props, { settings: this.props.state, property: 'date', dateFormat: this.props.state.date_format || '', placeholder: (0, _utils.translate)('20 April 2018') })) ) ) ), field_type === 'select' && _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Year Range'), labelDark: true, description: (0, _utils.translate)('By default, we select 100 years in the past, and 100 years ' + 'in the future for the year dropdown field. You can set a ' + 'custom year range to display in the year dropdown below.'), sidebar: false }, _react2.default.createElement( 'div', { className: 'fui-form-field--row' }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '4' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('From'), placeholder: (0, _utils.translate)('1920'), property: 'min_year', type: 'number' })) ), _react2.default.createElement( _col2.default, { cols: '4' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('To'), placeholder: (0, _utils.translate)('2030'), property: 'max_year', type: 'number' })) ) ) ) ), _react2.default.createElement(_prefill2.default, _extends({}, this.props, { notice: prefillMessage })) ); case 'limits': return _react2.default.createElement(_limits2.default, this.props); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Date; }(_react.Component); exports.default = Date; /***/ }), /* 488 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _datePicker = __webpack_require__(114); var _datePicker2 = _interopRequireDefault(_datePicker); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _checkbox = __webpack_require__(41); var _checkbox2 = _interopRequireDefault(_checkbox); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _suiTagsDatepicker = __webpack_require__(489); var _suiTagsDatepicker2 = _interopRequireDefault(_suiTagsDatepicker); var _suiTagsDateRange = __webpack_require__(490); var _suiTagsDateRange2 = _interopRequireDefault(_suiTagsDateRange); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Limit = function (_Component) { _inherits(Limit, _Component); function Limit(props) { _classCallCheck(this, Limit); return _possibleConstructorReturn(this, (Limit.__proto__ || Object.getPrototypeOf(Limit)).call(this, props)); } _createClass(Limit, [{ key: 'getDateFields', value: function getDateFields() { var _this2 = this; var dates = []; var dateFields = (0, _utils.getFieldsByType)('date', this.props.wrappers); dateFields.map(function (field) { if (_this2.props.state.element_id !== field.element_id) { dates.push({ value: field.element_id, label: field.field_label }); } }); return dates; } }, { key: 'disableSearch', value: function disableSearch() { return { minimumResultsForSearch: -1 }; } }, { key: 'render', value: function render() { var startDate = _.isUndefined(this.props.state['start-date']) ? '' : this.props.state['start-date']; var endDate = _.isUndefined(this.props.state['end-date']) ? '' : this.props.state['end-date']; // Convert select-type's Year Range setting to datepicker's Limits if (!_.isEmpty(this.props.state.min_year) && _.isUndefined(this.props.state['start-date'])) { startDate = 'specific'; this.props.state['start-date'] = startDate; this.props.state['start-specific-date'] = 'Jan 1 ' + this.props.state.min_year; } if (!_.isEmpty(this.props.state.max_year) && _.isUndefined(this.props.state['end-date'])) { endDate = 'specific'; this.props.state['end-date'] = endDate; this.props.state['end-specific-date'] = 'Dec 31 ' + this.props.state.max_year; } return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Start & End date') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose a start and end date limit for the calendar ' + 'to restrict the date selection between a specific date ' + 'range. Note that we will use the timezone set in your ' + '{{a}}WordPress Settings{{/a}}.', { components: { a: _react2.default.createElement('a', { href: forminatorData.adminUrl + 'options-general.php', target: '_blank' }) } }) ), _react2.default.createElement( 'div', { className: 'fui-form-field--row' }, _react2.default.createElement( 'div', { className: 'fui-form-field--col', style: { maxWidth: 240 } }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { label: (0, _utils.translate)('Start Date'), settings: this.props.state, property: 'start-date', options: this.disableSearch() }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('No limit') ), _react2.default.createElement( 'option', { value: 'specific' }, (0, _utils.translate)('Specific date') ), _react2.default.createElement( 'option', { value: 'today' }, (0, _utils.translate)('Today') ), this.getDateFields().length > 0 && _react2.default.createElement( 'optgroup', { label: (0, _utils.translate)('Date fields') }, _.map(this.getDateFields(), function (field, key) { return _react2.default.createElement( 'option', { value: field.value, key: key }, (0, _escapeHtml.escapeHTML)(field.label) ); }) ) ) ), 'specific' === startDate && _react2.default.createElement( 'div', { className: 'fui-form-field--col' }, _react2.default.createElement(_datePicker2.default, _extends({}, this.props, { label: '\xA0', settings: this.props.state, property: 'start-specific-date', dateFormat: 'mm/dd/yy', placeholder: (0, _utils.translate)('Pick a date'), calendarIcon: 'left' })) ), '' !== startDate && 'specific' !== startDate && _react2.default.createElement( 'div', { className: 'fui-form-field--col' }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Offset (optional)') ), _react2.default.createElement( 'div', { className: 'sui-form-field-inline' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'start-offset-operator', fieldClass: 'sui-input-sm', defaultValue: '+', options: this.disableSearch() }), _react2.default.createElement( 'option', { value: '+' }, (0, _utils.translate)('+') ), _react2.default.createElement( 'option', { value: '-' }, (0, _utils.translate)('-') ) ), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, placeholder: (0, _utils.translate)('0'), property: 'start-offset-value', fieldClass: 'sui-input-sm', defaultValue: '0' })), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'start-offset-duration', fieldClass: 'fui-field-full', defaultValue: 'days', options: this.disableSearch() }), _react2.default.createElement( 'option', { value: 'days' }, (0, _utils.translate)('days') ), _react2.default.createElement( 'option', { value: 'weeks' }, (0, _utils.translate)('weeks') ), _react2.default.createElement( 'option', { value: 'months' }, (0, _utils.translate)('months') ), _react2.default.createElement( 'option', { value: 'years' }, (0, _utils.translate)('years') ) ) ) ) ) ), _react2.default.createElement( 'div', { className: 'fui-form-field--row' }, _react2.default.createElement( 'div', { className: 'fui-form-field--col', style: { maxWidth: 240 } }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { label: (0, _utils.translate)('End Date'), settings: this.props.state, property: 'end-date', options: this.disableSearch() }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('No limit') ), _react2.default.createElement( 'option', { value: 'specific' }, (0, _utils.translate)('Specific date') ), _react2.default.createElement( 'option', { value: 'today' }, (0, _utils.translate)('Today') ), this.getDateFields().length > 0 && _react2.default.createElement( 'optgroup', { label: (0, _utils.translate)('Date fields') }, _.map(this.getDateFields(), function (field, key) { return _react2.default.createElement( 'option', { value: field.value, key: key }, (0, _escapeHtml.escapeHTML)(field.label) ); }) ) ) ), 'specific' === endDate && _react2.default.createElement( 'div', { className: 'fui-form-field--col' }, _react2.default.createElement(_datePicker2.default, _extends({}, this.props, { settings: this.props.state, property: 'end-specific-date', dateFormat: 'mm/dd/yy', placeholder: (0, _utils.translate)('Pick a date'), calendarIcon: 'left' })) ), '' !== endDate && 'specific' !== endDate && _react2.default.createElement( 'div', { className: 'fui-form-field--col' }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Offset (optional)') ), _react2.default.createElement( 'div', { className: 'sui-form-field-inline' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'end-offset-operator', fieldClass: 'sui-input-sm', defaultValue: '+', options: this.disableSearch() }), _react2.default.createElement( 'option', { value: '+' }, (0, _utils.translate)('+') ), _react2.default.createElement( 'option', { value: '-' }, (0, _utils.translate)('-') ) ), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, placeholder: (0, _utils.translate)('0'), property: 'end-offset-value', fieldClass: 'sui-input-sm', defaultValue: '0' })), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'end-offset-duration', fieldClass: 'fui-field-full', defaultValue: 'days', options: this.disableSearch() }), _react2.default.createElement( 'option', { value: 'days' }, (0, _utils.translate)('days') ), _react2.default.createElement( 'option', { value: 'weeks' }, (0, _utils.translate)('weeks') ), _react2.default.createElement( 'option', { value: 'months' }, (0, _utils.translate)('months') ), _react2.default.createElement( 'option', { value: 'years' }, (0, _utils.translate)('years') ) ) ) ) ) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Days of the week') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose which days of the week should be available on the calendar.') ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'howto-restrict', settings: this.props.state, 'default': 'all' }), _react2.default.createElement( _empty2.default, { value: 'all' }, (0, _utils.translate)('All days') ), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'week', label: (0, _utils.translate)('Selected days'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '4' }, _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { settings: this.props.state, property: 'sunday', label: (0, _utils.translate)('Sunday'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { settings: this.props.state, property: 'wednesday', label: (0, _utils.translate)('Wednesday'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { settings: this.props.state, property: 'saturday', label: (0, _utils.translate)('Saturday'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })) ), _react2.default.createElement( _col2.default, { cols: '4' }, _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { settings: this.props.state, property: 'monday', label: (0, _utils.translate)('Monday'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { settings: this.props.state, property: 'thursday', label: (0, _utils.translate)('Thursday'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })) ), _react2.default.createElement( _col2.default, { cols: '4' }, _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { settings: this.props.state, property: 'tuesday', label: (0, _utils.translate)('Tuesday'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { settings: this.props.state, property: 'friday', label: (0, _utils.translate)('Friday'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })) ) ) ) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement(_suiTagsDatepicker2.default, _extends({}, this.props, { label: (0, _utils.translate)('Disable dates'), hasSettingsLabel: 'dark', description: (0, _utils.translate)('Use this setting to disable specific dates on the calendar.'), settings: this.props.state, property: 'disabled-dates', dateFormat: 'mm/dd/yy', placeholder: (0, _utils.translate)('Pick a date') })) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement(_suiTagsDateRange2.default, _extends({}, this.props, { label: (0, _utils.translate)('Disable date ranges'), hasSettingsLabel: 'dark', description: (0, _utils.translate)('Use this setting to disable specific dates ranges on the calendar.'), settings: this.props.state, property: 'disable-date-range', dateFormat: 'MM/DD/YYYY', placeholder: (0, _utils.translate)('Pick a date') })) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Error Message') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose an error message to be used when visitor ' + 'enters a date that is disabled.') ), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, property: 'restrict_message' })) ) ); } }]); return Limit; }(_react.Component); exports.default = Limit; /***/ }), /* 489 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SuiTagsDatepicker = function (_Component) { _inherits(SuiTagsDatepicker, _Component); function SuiTagsDatepicker(props) { _classCallCheck(this, SuiTagsDatepicker); var _this = _possibleConstructorReturn(this, (SuiTagsDatepicker.__proto__ || Object.getPrototypeOf(SuiTagsDatepicker)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); return _this; } _createClass(SuiTagsDatepicker, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; var self = this; var dateFormat = this.props.dateFormat ? this.props.dateFormat : 'mm-dd-yy'; var value = _.isUndefined(this.props.settings[this.props.property]) ? [] : this.props.settings[this.props.property]; this.$el = jQuery(this.el); this.$elDate = jQuery(this.elDate); var options = Object.assign({ allowClear: true, dropdownCssClass: 'sui-select-dropdown', placeholder: (0, _utils.translate)('Click here to add a date…') }, this.props.options); if (typeof this.$el.SUIselect2 === 'function') { this.$el.SUIselect2(options); } else if (typeof this.$el.FUIselect2 === 'function') { this.$el.FUIselect2(options); } else { console.log('select2 not intiated'); } this.$elDate.datepicker({ beforeShow: function beforeShow(input, inst) { jQuery('body').append(jQuery('#ui-datepicker-div')); jQuery('#ui-datepicker-div').addClass('sui-calendar'); if ('forminator-field-date' === _this2.$el.attr('id')) { if ('disable' === _this2.props.state.past_dates) { _this2.$el.datepicker('option', 'minDate', _this2.$el.datepicker('getDate')); } else if ('enable' === _this2.props.state.past_dates) { _this2.$el.datepicker('option', 'minDate', null); } } }, dateFormat: dateFormat, autoclose: true, dayNamesMin: forminatorl10n.calendar.day_names_min, monthNames: forminatorl10n.calendar.month_names, onSelect: function onSelect(date) { var value = _.isUndefined(_this2.props.settings[_this2.props.property]) ? [] : _this2.props.settings[_this2.props.property]; // Add new date to value value.push(date); // Update property value self.updateValue(value); // Clear select2 tags self.$el.html(''); // Append values to select2 _.each(value, function (option) { self.$el.append(jQuery('<option value="' + option + '">' + option + '</option>')); }); // Update element value and trigger change self.$el.val(value).trigger('change'); } }); // Show Datepicker on tags opening this.$el.on('select2:opening', function (e) { e.preventDefault(); // Get value var value = _.isUndefined(self.props.settings[self.props.property]) ? [] : self.props.settings[self.props.property]; // HACK: We compare the selected options length with stored values to determinate if we remove element and prevent showing datepicker if (value.length === e.currentTarget.selectedOptions.length) { self.$elDate.datepicker("show"); } }); // Handle date removal this.$el.on('select2:unselect', function (e) { e.preventDefault(); // Get value var value = _.isUndefined(self.props.settings[self.props.property]) ? [] : self.props.settings[self.props.property]; // Remove the deleted item value = value.filter(function (item) { return item !== e.params.data.id; }); // Update property value self.updateValue(value); }); // initial values append _.each(value, function (option) { self.$el.append(jQuery('<option value="' + option + '">' + option + '</option>')); }); // initial values on mount this.$el.val(value).trigger('change.select2'); } }, { key: 'updateValue', value: function updateValue(value) { // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.$el.unbind().removeData(); this.$elDate.unbind().removeData(); } }, { key: 'render', value: function render() { var _this3 = this; var value = _.isUndefined(this.props.settings[this.props.property]) ? [] : this.props.settings[this.props.property]; var fieldLabel = ''; var fieldDescription = ''; if (this.props.label && '' !== this.props.label) { if (this.props.hasSettingsLabel) { fieldLabel = _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property, className: 'sui-settings-label' + ('dark' === this.props.hasSettingsLabel ? ' sui-dark' : '') }, this.props.label ); } else { fieldLabel = _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property, className: 'sui-label' }, this.props.label, this.props.note && _react2.default.createElement( 'span', { className: 'sui-label-note' }, this.props.note ) ); } } if (this.props.description && '' !== this.props.description) { fieldDescription = _react2.default.createElement( 'p', { className: 'sui-description', style: { marginBottom: 10 } }, this.props.description ); } return _react2.default.createElement( 'div', { className: 'sui-form-field' }, fieldLabel, fieldDescription, _react2.default.createElement( 'div', { className: 'fui-datepicker-tags' }, _react2.default.createElement( 'select', { ref: function ref(el) { return _this3.el = el; }, className: 'sui-select sui-select-lg', defaultValue: value, multiple: 'multiple' }, this.props.children ), _react2.default.createElement('input', { ref: function ref(elDate) { return _this3.elDate = elDate; }, className: 'sui-input' }) ) ); } }]); return SuiTagsDatepicker; }(_react.Component); exports.default = SuiTagsDatepicker; /***/ }), /* 490 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SuiTagsDataRange = function (_Component) { _inherits(SuiTagsDataRange, _Component); function SuiTagsDataRange(props) { _classCallCheck(this, SuiTagsDataRange); var _this = _possibleConstructorReturn(this, (SuiTagsDataRange.__proto__ || Object.getPrototypeOf(SuiTagsDataRange)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); return _this; } _createClass(SuiTagsDataRange, [{ key: 'componentDidMount', value: function componentDidMount() { var self = this; var dateFormat = this.props.dateFormat ? this.props.dateFormat : 'MM/DD/YYYY'; var value = _.isUndefined(this.props.settings[this.props.property]) ? [] : this.props.settings[this.props.property]; this.$el = jQuery(this.el); this.$elDate = jQuery(this.elDate); var options = Object.assign({ allowClear: true, dropdownCssClass: 'sui-select-dropdown', placeholder: (0, _utils.translate)("Click here to add a date range...") }, this.props.options); if (typeof this.$el.SUIselect2 === 'function') { this.$el.SUIselect2(options); } else if (typeof this.$el.FUIselect2 === 'function') { this.$el.FUIselect2(options); } else { console.log('select2 not intiated'); } this.$elDate.daterangepicker({ //autoUpdateInput: false, autoApply: true, locale: { format: 'MMMM DD, YYYY', separator: ' - ', customRangeLabel: 'Custom', daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] }, alwaysShowCalendars: true, parentEl: '.fui-daterange-calendar' }); this.$elDate.on('apply.daterangepicker', function (ev, picker) { var value = _.isUndefined(self.props.settings[self.props.property]) ? [] : self.props.settings[self.props.property]; // Add new date to value value.push(picker.startDate.format(dateFormat) + ' - ' + picker.endDate.format(dateFormat)); // Update property value self.updateValue(value); // Clear select2 tags self.$el.html(''); // Append values to select2 _.each(value, function (option) { self.$el.append(jQuery('<option value="' + option + '">' + option + '</option>')); }); // Update element value and trigger change self.$el.val(value).trigger('change'); }); // Show Datepicker on tags opening this.$el.on('select2:opening', function (e) { e.preventDefault(); // Get value var value = _.isUndefined(self.props.settings[self.props.property]) ? [] : self.props.settings[self.props.property]; // HACK: We compare the selected options length with stored values to determinate if we remove element and prevent showing datepicker if (value.length === e.currentTarget.selectedOptions.length) { self.$elDate.trigger("click"); } // Display calendar jQuery('.daterangepicker').css('zIndex', '3001'); }); // Handle date removal this.$el.on('select2:unselect', function (e) { e.preventDefault(); // Get value var value = _.isUndefined(self.props.settings[self.props.property]) ? [] : self.props.settings[self.props.property]; // Remove the deleted item value = value.filter(function (item) { return item !== e.params.data.id; }); setTimeout(function () { // Update property value self.updateValue(value); }, 20); }); // initial values append _.each(value, function (option) { self.$el.append(jQuery('<option value="' + option + '">' + option + '</option>')); }); // initial values on mount this.$el.val(value).trigger('change.select2'); } }, { key: 'updateValue', value: function updateValue(value) { // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.$el.unbind().removeData(); this.$elDate.unbind().removeData(); } }, { key: 'render', value: function render() { var _this2 = this; var value = _.isUndefined(this.props.settings[this.props.property]) ? [] : this.props.settings[this.props.property]; var fieldLabel = ''; var fieldDescription = ''; if (this.props.label && '' !== this.props.label) { if (this.props.hasSettingsLabel) { fieldLabel = _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property, className: 'sui-settings-label' + ('dark' === this.props.hasSettingsLabel ? ' sui-dark' : '') }, this.props.label ); } else { fieldLabel = _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property, className: 'sui-label' }, this.props.label, this.props.note && _react2.default.createElement( 'span', { className: 'sui-label-note' }, this.props.note ) ); } } if (this.props.description && '' !== this.props.description) { fieldDescription = _react2.default.createElement( 'p', { className: 'sui-description', style: { marginBottom: 10 } }, this.props.description ); } return _react2.default.createElement( 'div', { className: 'sui-form-field' }, fieldLabel, fieldDescription, _react2.default.createElement( 'div', { className: 'fui-datepicker-tags' }, _react2.default.createElement( 'select', { ref: function ref(el) { return _this2.el = el; }, className: 'sui-select sui-select-lg', defaultValue: value, multiple: 'multiple' }, this.props.children ), _react2.default.createElement('div', { className: 'fui-daterange-calendar' }), _react2.default.createElement('input', { id: 'forminator-field-' + this.props.property, style: { visibility: 'hidden' }, ref: function ref(elDate) { return _this2.elDate = elDate; }, className: 'sui-input', autoComplete: 'off' }) ) ); } }]); return SuiTagsDataRange; }(_react.Component); exports.default = SuiTagsDataRange; /***/ }), /* 491 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _labels = __webpack_require__(200); var _labels2 = _interopRequireDefault(_labels); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Signature = function (_Component) { _inherits(Signature, _Component); function Signature(props) { _classCallCheck(this, Signature); return _possibleConstructorReturn(this, (Signature.__proto__ || Object.getPrototypeOf(Signature)).call(this, props)); } _createClass(Signature, [{ key: 'render', value: function render() { var type = this.props.type; switch (type) { case 'labels': return _react2.default.createElement(_labels2.default, this.props); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Signature Filetype'), labelDark: true, description: (0, _utils.translate)('Choose the filetype to save your users\' signature in.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( 'div', { className: 'sui-form-field-inline' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'filetype', settings: this.props.state, 'data-width': '100', fieldsize: '100' }), _react2.default.createElement( 'option', { value: 'png' }, (0, _utils.translate)('PNG') ), _react2.default.createElement( 'option', { value: 'jpg' }, (0, _utils.translate)('JPG') ) ) ) ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Height'), labelDark: true, description: (0, _utils.translate)('Choose the height of your signature field. ' + 'The default value is 180px.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'number', settings: this.props.state, placeholder: '180', property: 'height', suffix: 'px' })) ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Stroke Thickness'), labelDark: true, description: (0, _utils.translate)('Choose the thickness in pixels for signature strokes. ' + 'The default value is 2px.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'number', settings: this.props.state, placeholder: '2', property: 'thickness', suffix: 'px' })) ) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Signature; }(_react.Component); exports.default = Signature; /***/ }), /* 492 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _wpEditor = __webpack_require__(31); var _wpEditor2 = _interopRequireDefault(_wpEditor); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Consent = function (_Component) { _inherits(Consent, _Component); function Consent(props) { _classCallCheck(this, Consent); return _possibleConstructorReturn(this, (Consent.__proto__ || Object.getPrototypeOf(Consent)).call(this, props)); } _createClass(Consent, [{ key: 'render', value: function render() { var type = this.props.type; var modifiedVars = {}; _.assign(modifiedVars, forminatorData.variables); delete modifiedVars.submission_id; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('E.g. Consent'), property: 'field_label' })), _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { settings: this.props.state, boxClass: 'sui-tab-boxed', property: 'consent_description', editorOptions: modifiedVars, description: (0, _utils.translate)('Describe what your users should consent to.') })) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Consent; }(_react.Component); exports.default = Consent; /***/ }), /* 493 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _wpEditor = __webpack_require__(31); var _wpEditor2 = _interopRequireDefault(_wpEditor); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Gdprcheckbox = function (_Component) { _inherits(Gdprcheckbox, _Component); function Gdprcheckbox(props) { _classCallCheck(this, Gdprcheckbox); return _possibleConstructorReturn(this, (Gdprcheckbox.__proto__ || Object.getPrototypeOf(Gdprcheckbox)).call(this, props)); } _createClass(Gdprcheckbox, [{ key: 'render', value: function render() { var type = this.props.type; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('The {{strong}}GDPR Field{{/strong}} has been deprecated and replaced by the new {{strong}}Consent Field{{/strong}}.' + ' ' + 'Your existing fields should continue to work as expected, but please consider using the {{strong}}Consent Field{{/strong}} in the future.', { components: { strong: _react2.default.createElement('strong', null) } }) ) ) ) ), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })), _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { settings: this.props.state, boxClass: 'sui-tab-boxed', property: 'gdpr_description', editorOptions: forminatorData.variables, description: (0, _utils.translate)('Note, the form will not submit until the user ' + 'has accepted the terms.') })) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Error message'), placeholder: (0, _utils.translate)('Enter required message'), property: 'required_message', id: 'forminator-field-name-error-msg' })) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Gdprcheckbox; }(_react.Component); exports.default = Gdprcheckbox; /***/ }), /* 494 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Hidden = function (_Component) { _inherits(Hidden, _Component); function Hidden(props) { _classCallCheck(this, Hidden); return _possibleConstructorReturn(this, (Hidden.__proto__ || Object.getPrototypeOf(Hidden)).call(this, props)); } _createClass(Hidden, [{ key: 'render', value: function render() { var type = this.props.type; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Default Value (optional)'), placeholder: (0, _utils.translate)('Enter default value'), property: 'default_value' }), _.map(forminatorData.variablesForHiddenField, function (label, value) { return _react2.default.createElement( 'option', { value: value, key: value }, label ); }) ) ) ), this.props.state.default_value === 'custom_value' && _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Custom Value'), placeholder: (0, _utils.translate)('Enter custom value'), property: 'custom_value' })) ) ), this.props.state.default_value === 'query' && _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Query parameter'), placeholder: (0, _utils.translate)('E.g. query_parameter_key'), property: 'prefill' })) ) ) ); case 'settings': return _react2.default.createElement('div', null); case 'visibility': return _react2.default.createElement('div', null); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Hidden; }(_react.Component); exports.default = Hidden; /***/ }), /* 495 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _wpEditor = __webpack_require__(31); var _wpEditor2 = _interopRequireDefault(_wpEditor); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Html = function (_Component) { _inherits(Html, _Component); function Html(props) { _classCallCheck(this, Html); return _possibleConstructorReturn(this, (Html.__proto__ || Object.getPrototypeOf(Html)).call(this, props)); } _createClass(Html, [{ key: 'render', value: function render() { var type = this.props.type; var modifiedVars = {}; _.assign(modifiedVars, forminatorData.variables); delete modifiedVars.submission_id; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })), _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { extraId: 'html-type', settings: this.props.state, boxClass: 'sui-tab-boxed', property: 'variations', editorOptions: modifiedVars, enableFormData: 'true', enablePostData: 'false', enableUpload: 'true', allowButtonOnclick: 'true', mainOptions: [] })) ); case 'settings': return _react2.default.createElement('div', null); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Html; }(_react.Component); exports.default = Html; /***/ }), /* 496 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _labels = __webpack_require__(497); var _labels2 = _interopRequireDefault(_labels); var _settings = __webpack_require__(498); var _settings2 = _interopRequireDefault(_settings); var _styling = __webpack_require__(499); var _styling2 = _interopRequireDefault(_styling); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Group = function (_Component) { _inherits(Group, _Component); function Group(props) { _classCallCheck(this, Group); return _possibleConstructorReturn(this, (Group.__proto__ || Object.getPrototypeOf(Group)).call(this, props)); } _createClass(Group, [{ key: 'render', value: function render() { var type = this.props.type; switch (type) { case 'labels': return _react2.default.createElement(_labels2.default, this.props); case 'settings': return _react2.default.createElement(_settings2.default, this.props); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Group; }(_react.Component); exports.default = Group; /***/ }), /* 497 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Labels = function (_Component) { _inherits(Labels, _Component); function Labels(props) { _classCallCheck(this, Labels); return _possibleConstructorReturn(this, (Labels.__proto__ || Object.getPrototypeOf(Labels)).call(this, props)); } _createClass(Labels, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Use this field to group Forminator fields together ' + 'and collect repeating data in your form. ' + 'Learn more about grouping and repeating use cases in {{link}}this tutorial. {{icon/}}{{/link}}', { components: { strong: _react2.default.createElement('strong', null), link: _react2.default.createElement('a', { href: 'https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#field-group', target: '_blank' }), icon: _react2.default.createElement('span', { className: 'sui-icon-open-new-window sui-sm', 'aria-hidden': 'true' }) } }) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ) ); } }]); return Labels; }(_react.Component); exports.default = Labels; /***/ }), /* 498 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var GroupSettings = function (_Component) { _inherits(GroupSettings, _Component); function GroupSettings(props) { _classCallCheck(this, GroupSettings); return _possibleConstructorReturn(this, (GroupSettings.__proto__ || Object.getPrototypeOf(GroupSettings)).call(this, props)); } _createClass(GroupSettings, [{ key: 'getVariables', value: function getVariables() { return (0, _utils.getFields)(this.props.wrappers, [], {}, ['calculation', 'currency', 'number', 'slider']); } }, { key: 'render', value: function render() { var variables = this.getVariables(); return _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'is_repeater', settings: this.props.state, 'default': 'true', label: (0, _utils.translate)('Field Repeater'), description: (0, _utils.translate)('Allow fields in this group to be repeated.') }), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'true', label: (0, _utils.translate)('Enable'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'min_limit_type', settings: this.props.state, 'default': 'custom', label: (0, _utils.translate)('Minimum repeater limit'), wrapperClass: 'forminator-float', description: (0, _utils.translate)('Enter the minimum number of times this group field ' + 'will be repeated by default, ' + 'or select a variable from your form fields. ' + 'If left empty, the minimum will default to 1.') }), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'custom', label: (0, _utils.translate)('Custom'), boxClass: '' }), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, defaultValue: '', minValue: '1', property: 'min_limit', placeholder: (0, _utils.translate)('Enter minimum limit'), type: 'number' })) ), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'variable', label: (0, _utils.translate)('Variable'), boxClass: '' }), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'min_limit_field', noWrapper: true }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Choose form field') ), _.map(variables, function (field, key) { return _react2.default.createElement( 'option', { value: field.element_id, key: key }, (0, _escapeHtml.escapeHTML)(field.label + ' {' + field.element_id + '}') ); }) ) ) ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'max_limit_type', settings: this.props.state, 'default': 'custom', label: (0, _utils.translate)('Maximum repeater limit'), wrapperClass: 'forminator-float', description: (0, _utils.translate)('Enter the maximum number of times this group field can be repeated, ' + 'or select a variable from your form fields. If left empty, the maximum will be unlimited.') }), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'custom', label: (0, _utils.translate)('Custom'), boxClass: '' }), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, defaultValue: '', minValue: '1', property: 'max_limit', placeholder: (0, _utils.translate)('Enter maximum limit'), type: 'number' })) ), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'variable', label: (0, _utils.translate)('Variable'), boxClass: '' }), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'max_limit_field', noWrapper: true }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Choose form field') ), _.map(variables, function (field, key) { return _react2.default.createElement( 'option', { value: field.element_id, key: key }, (0, _escapeHtml.escapeHTML)(field.label + ' {' + field.element_id + '}') ); }) ) ) ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'action_element_type', settings: this.props.state, 'default': 'button', label: (0, _utils.translate)('Repeater Element Type'), description: (0, _utils.translate)('Choose the element type and label text for your repeater actions.') }), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'button', label: (0, _utils.translate)('Buttons'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Add Button Text (optional)'), placeholder: (0, _utils.translate)('Add item'), defaultValue: (0, _utils.translate)('Add item'), property: 'add_action_text' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Remove Button Text (optional)'), placeholder: (0, _utils.translate)('Remove item'), defaultValue: (0, _utils.translate)('Remove item'), property: 'remove_action_text' })) ) ) ), _react2.default.createElement(_empty2.default, _extends({}, this.props, { settings: this.props.state, value: 'icon', label: (0, _utils.translate)('Icons') })), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'link', label: (0, _utils.translate)('Text links'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Add Link Text (optional)'), placeholder: (0, _utils.translate)('Add item'), defaultValue: (0, _utils.translate)('Add item'), property: 'add_action_text' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Add Link Text (optional)'), placeholder: (0, _utils.translate)('Remove item'), defaultValue: (0, _utils.translate)('Remove item'), property: 'remove_action_text' })) ) ) ) ) ), _react2.default.createElement(_empty2.default, _extends({}, this.props, { settings: this.props.state, value: 'false', label: (0, _utils.translate)('Disable') })) ); } }]); return GroupSettings; }(_react.Component); exports.default = GroupSettings; /***/ }), /* 499 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Styling = function (_Component) { _inherits(Styling, _Component); function Styling(props) { _classCallCheck(this, Styling); return _possibleConstructorReturn(this, (Styling.__proto__ || Object.getPrototypeOf(Styling)).call(this, props)); } _createClass(Styling, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_styling2.default, this.props), _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Group Field Styling') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('By default, ' + 'the Group Field will apply the styles you have set in the Appearance settings, ' + 'but you can remove those styles with this option.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'group_styles', settings: this.props.state, 'default': 'default' }), _react2.default.createElement(_empty2.default, _extends({}, this.props, { settings: this.props.state, value: 'default', label: (0, _utils.translate)('Apply') })), _react2.default.createElement(_empty2.default, _extends({}, this.props, { settings: this.props.state, value: 'custom', label: (0, _utils.translate)('Remove') })) ) ) ) ); } }]); return Styling; }(_react.Component); exports.default = Styling; /***/ }), /* 500 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _labels = __webpack_require__(501); var _labels2 = _interopRequireDefault(_labels); var _settings = __webpack_require__(502); var _settings2 = _interopRequireDefault(_settings); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _toggle = __webpack_require__(188); var _toggle2 = _interopRequireDefault(_toggle); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Slider = function (_Component) { _inherits(Slider, _Component); function Slider(props) { _classCallCheck(this, Slider); return _possibleConstructorReturn(this, (Slider.__proto__ || Object.getPrototypeOf(Slider)).call(this, props)); } _createClass(Slider, [{ key: 'render', value: function render() { var type = this.props.type; switch (type) { case 'labels': return _react2.default.createElement(_labels2.default, this.props); case 'settings': return _react2.default.createElement(_settings2.default, this.props); case 'calculations': return _react2.default.createElement(_toggle2.default, this.props); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Slider; }(_react.Component); exports.default = Slider; /***/ }), /* 501 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _radioOptions = __webpack_require__(115); var _radioOptions2 = _interopRequireDefault(_radioOptions); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Labels = function (_Component) { _inherits(Labels, _Component); function Labels(props) { _classCallCheck(this, Labels); return _possibleConstructorReturn(this, (Labels.__proto__ || Object.getPrototypeOf(Labels)).call(this, props)); } _createClass(Labels, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _radioOptions2.default, _extends({}, this.props, { settings: this.props.state, property: 'slider_type', label: (0, _utils.translate)('Type'), defaultValue: 'single', radioClass: 'sui-radio-sm' }), _react2.default.createElement(_empty2.default, { value: 'single', hasImage: true, image1x: 'slider-single.png', image2x: 'slider-single@2x.png', label: (0, _utils.translate)('Single Slider') }), _react2.default.createElement(_empty2.default, { value: 'range', hasImage: true, image1x: 'slider-range.png', image2x: 'slider-range@2x.png', label: (0, _utils.translate)('Range Slider') }) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ) ); } }]); return Labels; }(_react.Component); exports.default = Labels; /***/ }), /* 502 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _accordion = __webpack_require__(34); var _accordion2 = _interopRequireDefault(_accordion); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var GroupSettings = function (_Component) { _inherits(GroupSettings, _Component); function GroupSettings(props) { _classCallCheck(this, GroupSettings); return _possibleConstructorReturn(this, (GroupSettings.__proto__ || Object.getPrototypeOf(GroupSettings)).call(this, props)); } _createClass(GroupSettings, [{ key: 'render', value: function render() { var sliderMin = parseFloat(this.props.state.slider_min || 1), sliderMax = parseFloat(this.props.state.slider_max || 10), step = parseFloat(this.props.state.slider_step || 1), isRange = this.props.state.slider_type === 'range'; if (sliderMax < sliderMin) { sliderMax = sliderMin; } if (sliderMax !== this.props.state.slider_max) { this.props.updateProperty('slider_max', sliderMax); } var advancedSettings = _react2.default.createElement( 'div', { className: 'sui-accordion sui-accordion-flushed', style: { marginBottom: '-30px' } }, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Advanced settings') }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, isRange && { cols: "6" }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, type: 'number', minValue: sliderMin, maxValue: sliderMax, step: step, label: isRange ? (0, _utils.translate)('Start value') : (0, _utils.translate)('Default value'), placeholder: (0, _utils.translate)('Enter value'), property: 'slider_default', defaultValue: sliderMin })) ), isRange && _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, type: 'number', minValue: sliderMin, maxValue: sliderMax, step: step, label: (0, _utils.translate)('End value'), placeholder: (0, _utils.translate)('Enter value'), property: 'slider_default_2', defaultValue: sliderMax })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, null, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Display value position'), property: 'value_position' }), _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'bottom' }, (0, _utils.translate)('Bottom') ), _react2.default.createElement( 'option', { value: 'top' }, (0, _utils.translate)('Top') ) ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Prefix text'), placeholder: (0, _utils.translate)('Enter prefix text'), property: 'prefix' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Suffix text'), placeholder: (0, _utils.translate)('Enter suffix text'), property: 'suffix' })) ), _react2.default.createElement( _col2.default, null, _react2.default.createElement( 'span', { className: 'sui-description sui-description-alt' }, (0, _utils.translate)('Use these fields to display texts (e.g. currency symbols or units of measure) before and after the slider values.') ) ) ) ) ); var sliderWidth = _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Slider width'), labelDark: true, description: (0, _utils.translate)('The Slider takes the full-width of its container by default, ' + 'but you can select a different size below.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'slider_width', settings: this.props.state, 'default': 'full', simple: true }), _react2.default.createElement( _empty2.default, { value: 'small' }, (0, _utils.translate)('Small') ), _react2.default.createElement( _empty2.default, { value: 'medium' }, (0, _utils.translate)('Medium') ), _react2.default.createElement( _empty2.default, { value: 'large' }, (0, _utils.translate)('Large') ), _react2.default.createElement( _empty2.default, { value: 'full' }, (0, _utils.translate)('Full width') ) ) ); var sliderValues = _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Values'), labelDark: true, sidebar: false, lastChild: true }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, type: 'number', maxValue: sliderMax, step: step, label: (0, _utils.translate)('Minimum value'), placeholder: (0, _utils.translate)('Enter value'), property: 'slider_min', defaultValue: sliderMin })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, type: 'number', minValue: sliderMin, value: sliderMax, step: step, label: (0, _utils.translate)('Maximum Value'), placeholder: (0, _utils.translate)('Enter value'), property: 'slider_max' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, type: 'number', label: (0, _utils.translate)('Step'), minValue: '0', placeholder: (0, _utils.translate)('Enter value'), property: 'slider_step', defaultValue: step })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'slider_limits', settings: this.props.state, 'default': 'show', label: (0, _utils.translate)('Show / Hide slider limits') }), _react2.default.createElement( _empty2.default, { value: 'show' }, (0, _utils.translate)('Show') ), _react2.default.createElement( _empty2.default, { value: 'hide' }, (0, _utils.translate)('Hide') ) ) ) ) ); return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props), sliderWidth, sliderValues, advancedSettings ); } }]); return GroupSettings; }(_react.Component); exports.default = GroupSettings; /***/ }), /* 503 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _hiddenBehavior = __webpack_require__(227); var _hiddenBehavior2 = _interopRequireDefault(_hiddenBehavior); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var CalcOptions = function (_Component) { _inherits(CalcOptions, _Component); function CalcOptions(props) { _classCallCheck(this, CalcOptions); var _this = _possibleConstructorReturn(this, (CalcOptions.__proto__ || Object.getPrototypeOf(CalcOptions)).call(this, props)); _this.updateField = _this.updateField.bind(_this); _this.updateState = _this.updateState.bind(_this); return _this; } _createClass(CalcOptions, [{ key: 'updateField', value: function updateField(e, i) { this.updateState(i, e.target.value); } }, { key: 'updateState', value: function updateState(index, value) { var newState = this.props.state.options; newState[index].calculation = value; this.props.updateProperty('options', newState); } }, { key: 'render', value: function render() { var _this2 = this; if (this.props.state.options.length === 0) { return _react2.default.createElement('div', null); } return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Assign a calculation value to each option. ' + 'These values will not be shown on the form. ' + 'You can assign only a numeric value.') ) ), _.map(this.props.state.options, function (option, i) { var errorClass = _.isEmpty(option.calculation) ? 'sui-form-field-error' : ''; return _react2.default.createElement( 'div', { key: i, className: 'sui-form-field ' + errorClass }, _react2.default.createElement( 'label', { htmlFor: 'calculation-option-' + i, className: 'sui-label' }, (0, _escapeHtml.escapeHTML)(option.label) ), _react2.default.createElement('input', { type: 'number', placeholder: (0, _utils.translate)('Calculation value'), id: 'calculation-option-' + i, className: 'sui-form-control sui-input-md', onChange: function onChange(e) { return _this2.updateField(e, i); }, defaultValue: option.calculation }), _.isEmpty(option.calculation) && _react2.default.createElement( 'span', { className: 'sui-error-message' }, (0, _utils.translate)('Calculation value is required!') ) ); }), _react2.default.createElement(_hiddenBehavior2.default, this.props) ); } }]); return CalcOptions; }(_react.Component); exports.default = CalcOptions; /***/ }), /* 504 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _multiValue = __webpack_require__(228); var _multiValue2 = _interopRequireDefault(_multiValue); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _toggle = __webpack_require__(188); var _toggle2 = _interopRequireDefault(_toggle); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _radioCheckboxVisibility = __webpack_require__(375); var _radioCheckboxVisibility2 = _interopRequireDefault(_radioCheckboxVisibility); var _optionsOrder = __webpack_require__(229); var _optionsOrder2 = _interopRequireDefault(_optionsOrder); var _prefill = __webpack_require__(76); var _prefill2 = _interopRequireDefault(_prefill); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MultiValue = function (_Component) { _inherits(MultiValue, _Component); function MultiValue(props) { _classCallCheck(this, MultiValue); return _possibleConstructorReturn(this, (MultiValue.__proto__ || Object.getPrototypeOf(MultiValue)).call(this, props)); } _createClass(MultiValue, [{ key: 'render', value: function render() { var type = this.props.type; var imageEnabled = _.isUndefined(this.props.state.enable_images) ? false : this.props.state.enable_images; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ), _react2.default.createElement(_multiValue2.default, this.props) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Layout') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('By default, we stack the options vertically. However, ' + 'you can change the options layout below.') ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'layout', defaultValue: 'vertical', noWrapper: true }), _react2.default.createElement( 'div', { value: 'vertical' }, (0, _utils.translate)('Vertical') ), _react2.default.createElement( 'div', { value: 'horizontal' }, (0, _utils.translate)('Horizontal') ) ) ), imageEnabled && _react2.default.createElement(_radioCheckboxVisibility2.default, this.props), _react2.default.createElement(_optionsOrder2.default, this.props), _react2.default.createElement(_prefill2.default, this.props) ); case 'calculations': return _react2.default.createElement(_toggle2.default, _extends({}, this.props, { description: (0, _utils.translate)('Choose whether to allow this field to be used in calculations or not.') })); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return MultiValue; }(_react.Component); exports.default = MultiValue; /***/ }), /* 505 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _accordion = __webpack_require__(34); var _accordion2 = _interopRequireDefault(_accordion); var _uploads = __webpack_require__(64); var _uploads2 = _interopRequireDefault(_uploads); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MultiOption = function (_Component) { _inherits(MultiOption, _Component); function MultiOption(props) { _classCallCheck(this, MultiOption); var _this = _possibleConstructorReturn(this, (MultiOption.__proto__ || Object.getPrototypeOf(MultiOption)).call(this, props)); _this.labelInput = _react2.default.createRef(); _this.valueInput = _react2.default.createRef(); _this.focusLabel = _this.focusLabel.bind(_this); _this.focusValue = _this.focusValue.bind(_this); _this.toggleState = _this.toggleState.bind(_this); _this.updateImage = _this.updateImage.bind(_this); _this.state = { focus: false, open: _this.props.state.options_expanded }; return _this; } _createClass(MultiOption, [{ key: 'removeOption', value: function removeOption() { this.props.removeOption(this.props.counter); } }, { key: 'updateLabel', value: function updateLabel(e) { this.props.updateLabel(this.props.counter, e.target.value); } }, { key: 'updateLimit', value: function updateLimit(e) { this.props.updateLimit(this.props.counter, e.target.value); } }, { key: 'updateValue', value: function updateValue(e) { this.props.updateValue(this.props.counter, e.target.value); } }, { key: 'updateDefault', value: function updateDefault(e) { this.props.updateDefault(this.props.counter, e.target.checked); } }, { key: 'updateImage', value: function updateImage(property, value) { this.props.updateImage(this.props.counter, value, property); } }, { key: 'onFocus', value: function onFocus() { this.setState({ focus: true }); } }, { key: 'onBlurValue', value: function onBlurValue() { this.onBlur(); } }, { key: 'onBlurLabel', value: function onBlurLabel(e) { this.onBlur(); var value = (0, _utils.generateValue)(e.target.value); // Update value if (_.isEmpty(this.props.option.value)) { this.props.updateValue(this.props.counter, value); } } }, { key: 'onBlur', value: function onBlur() { if (this.state.focus) { this.setState({ focus: false }); } } }, { key: 'focusLabel', value: function focusLabel() { this.labelInput.current.focus(); } }, { key: 'focusValue', value: function focusValue() { this.valueInput.current.focus(); } }, { key: 'toggleState', value: function toggleState() { this.setState({ open: !this.state.open }); var self = this; var opts = jQuery('.fui-option'); var optsTotalOpen = 0; var optsTotalClosed = 0; var timerr1 = void 0; var timerr2 = void 0; clearTimeout(timerr1); timerr1 = setTimeout(function () { opts.each(function () { var opt = jQuery(this).find('.sui-accordion-item'); if (opt.hasClass('sui-accordion-item--open')) { optsTotalOpen++; } else { optsTotalClosed++; } }); clearTimeout(timerr2); timerr2 = setTimeout(function () { if (0 === optsTotalOpen) { self.props.updateProperty('options_expanded', false); } else if (0 === optsTotalClosed) { self.props.updateProperty('options_expanded', true); } }, 50); }, 50); } }, { key: 'componentDidMount', value: function componentDidMount() { this.$opt = jQuery(this.opt); var fmodal = jQuery('#forminator-modal'); var fmodalScrollHt = fmodal.scrollTop(); fmodal.on('scroll', function () { fmodalScrollHt = jQuery(this).scrollTop(); }); this.$opt.on('change', '.sui-checkbox > input', function (e) { e.preventDefault(); e.stopPropagation(); fmodal.scrollTop(fmodalScrollHt); }); } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps) { if (this.props.state.options_expanded !== prevProps.state.options_expanded) { this.setState({ open: this.props.state.options_expanded }); } } }, { key: 'render', value: function render() { var _this2 = this; var focusClass = this.state.focus ? 'fui-on_focus' : ''; var hasErrorClass = _.isEmpty(this.props.option.label) || this.props.option.error ? 'sui-form-field-error' : ''; var open = this.state.open; var imageEnabled = this.props.state.enable_images; var divClass = ''; var bgImage = undefined !== this.props.option.image ? 'url(' + this.props.option.image + ')' : ''; if (open) { divClass = 'sui-accordion-item--open'; } else { divClass = ''; } return _react2.default.createElement( 'div', { className: 'fui-option ' + focusClass, ref: function ref(opt) { return _this2.opt = opt; } }, _react2.default.createElement( 'div', { className: 'fui-option-settings' }, _react2.default.createElement( 'div', { className: 'sui-accordion-item ' + divClass, style: { boxShadow: 'none' } }, _react2.default.createElement( 'div', { className: 'sui-accordion-item-header', style: { minHeight: '0', padding: '0' } }, _react2.default.createElement( 'div', { className: 'fui-option-settings--main', style: { padding: '0' } }, !open && imageEnabled && _react2.default.createElement( 'div', { className: 'sui-upload' }, _react2.default.createElement( 'div', { className: 'sui-upload-image', 'aria-hidden': 'true' }, _react2.default.createElement('div', { className: 'sui-image-mask' }), _react2.default.createElement('div', { role: 'button', className: 'sui-image-preview', style: { display: 'block', backgroundImage: bgImage } }) ) ), _react2.default.createElement( 'div', { className: 'sui-form-field ' + hasErrorClass }, _react2.default.createElement('input', { type: 'text', size: '1', placeholder: (0, _utils.translate)('Label'), value: this.props.option.label, className: 'sui-form-control', onChange: this.updateLabel.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlurLabel.bind(this), ref: this.labelInput, onClick: this.focusLabel, title: (0, _utils.translate)('Label') }) ), !open && _react2.default.createElement( 'label', { htmlFor: 'option-selected-' + this.props.counter, className: 'sui-checkbox', title: (0, _utils.translate)('Selected'), style: { marginLeft: '15px' } }, _react2.default.createElement('input', { type: 'checkbox', checked: this.props.option.default ? 'checked' : '', name: 'demo-field-radio--option-selected', id: 'option-selected-' + this.props.counter, onChange: this.updateDefault.bind(this) }), _react2.default.createElement('span', { 'aria-hidden': 'true' }) ), _react2.default.createElement( 'button', { className: 'sui-button-icon sui-button-red fui-option-remove', title: (0, _utils.translate)('Delete option'), 'aria-label': (0, _utils.translate)('Delete option'), onClick: this.removeOption.bind(this) }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }) ), _react2.default.createElement('div', { style: { borderLeft: '1px solid #E6E6E6', width: '1px', height: '30px' } }), _react2.default.createElement( 'button', { className: 'sui-button-icon sui-accordion-open-indicator', title: (0, _utils.translate)('Toggle'), 'aria-label': 'Open item', onClick: function onClick() { return _this2.toggleState(); } }, _react2.default.createElement('i', { className: 'sui-icon-chevron-down', 'aria-hidden': 'true' }) ) ) ), _react2.default.createElement( 'div', { className: 'sui-accordion-item-body', style: { padding: '10px 10px 0 0' } }, _react2.default.createElement( 'div', { className: 'fui-option-settings--extra' }, _react2.default.createElement('input', { type: 'text', value: this.props.option.value, placeholder: (0, _utils.translate)('Value'), className: 'sui-form-control', onChange: this.updateValue.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlurValue.bind(this), ref: this.valueInput, onClick: this.focusValue }), this.props.state.type && this.props.state.type === 'select' && this.props.isLimit && this.props.isLimit === 'true' && _react2.default.createElement('input', { type: 'text', value: this.props.option.limit, placeholder: (0, _utils.translate)('Submission limit'), className: 'sui-form-control', onChange: this.updateLimit.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }), open && _react2.default.createElement( 'label', { htmlFor: 'option-selected-' + this.props.counter, className: 'sui-checkbox' }, _react2.default.createElement('input', { type: 'checkbox', checked: this.props.option.default ? 'checked' : '', name: 'demo-field-radio--option-selected', id: 'option-selected-' + this.props.counter, onChange: this.updateDefault.bind(this) }), _react2.default.createElement('span', { 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-description sui-description-sm' }, (0, _utils.translate)('Selected') ) ) ), imageEnabled && _react2.default.createElement( 'div', { className: 'fui-option-settings--extra' }, _react2.default.createElement(_uploads2.default, _extends({}, this.props, { settings: this.props.option, type: 'image', fieldClass: 'sui-auto', property: 'image', updateProperty: this.updateImage })) ) ) ) ) ); } }]); return MultiOption; }(_react.Component); exports.default = MultiOption; /***/ }), /* 506 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable wpcalypso/i18n-no-collapsible-whitespace */ var SuiTags = function (_Component) { _inherits(SuiTags, _Component); function SuiTags(props) { _classCallCheck(this, SuiTags); var _this = _possibleConstructorReturn(this, (SuiTags.__proto__ || Object.getPrototypeOf(SuiTags)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); var defaultValue = _.isUndefined(_this.props.defaultValue) ? '' : _this.props.defaultValue; var value = _.isUndefined(_this.props.settings[_this.props.property]) ? defaultValue : _this.props.settings[_this.props.property]; _this.state = { value: value }; return _this; } _createClass(SuiTags, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; var self = this; this.$el = jQuery(this.el); this.$addPredefined = jQuery(this.addPredefined); SUI.select.initVars(this.$el); this.updateValue = this.updateValue.bind(this); this.$el.on('change', function (e) { var stateValue = self.state.value; var value = e.target.value; if (0 !== stateValue.length) { value = stateValue + '\n' + value; } _this2.updateValue(value); _this2.predefinedSelector(); _this2.scrollToNewOpt(); }); this.predefinedSelector(); } }, { key: 'updateValue', value: function updateValue(value) { // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } if (typeof this.props.updateValue === 'function') { this.props.updateValue(this.props.counter, value); } this.setState({ value: value }); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.$el.off('change', this.updateValue); this.$el.unbind().removeData(); } }, { key: 'getSnapshotBeforeUpdate', value: function getSnapshotBeforeUpdate(prevProps, prevState) { if (this.props.value !== prevProps.value) { this.updateValue(this.props.value); } return null; } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { if (this.props.state.enable_images !== prevProps.state.enable_images) { SUI.select.initVars(this.$el); this.predefinedSelector(); } } }, { key: 'isValid', value: function isValid(value) { if (this.props.isRequired) { return this.props.isRequired && !_.isEmpty(value); } else if (!_.isUndefined(this.props.isPositive)) { return _.isEmpty(value) || value >= 0; } return true; } }, { key: 'scrollToNewOpt', value: function scrollToNewOpt() { var bulkEditor = jQuery('#bulk-edit-textarea'); var timer = void 0; // eslint-disable-next-line no-undef clearTimeout(timer); timer = setTimeout(function () { bulkEditor.animate({ scrollTop: bulkEditor.prop('scrollHeight') }, 300); }, 20); } }, { key: 'predefinedSelector', value: function predefinedSelector() { this.$el.next('.select2-container').find('.select2-selection').html((0, _utils.translate)('+ Predefined options')); } }, { key: 'render', value: function render() { var _this3 = this; var defaultValue = _.isUndefined(this.props.defaultValue) ? '' : this.props.defaultValue; var value = _.isUndefined(this.props.settings[this.props.property]) ? defaultValue : this.props.settings[this.props.property]; var requiredError = !_.isUndefined(this.props.requiredError) ? this.props.requiredError : (0, _utils.translate)('This field is required!'); var hasErrorClass = !this.isValid(value) ? 'sui-form-field-error' : ''; var imagesEnabled = _.isUndefined(this.props.state.enable_images) ? false : this.props.state.enable_images; var defaultWithImage = (0, _utils.translate)('My Label; my-value; 0; https://mysite.com/my-image-url.jpg'); var defaultNoImage = (0, _utils.translate)('My Label; my-value; 0'); return _react2.default.createElement( 'div', { className: 'sui-form-field ' + hasErrorClass }, _react2.default.createElement( 'div', { className: 'sui-row' }, _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property, className: 'sui-col-sm-6 sui-label' }, this.props.label, '\xA0', (this.props.isRequired || this.props.required) && _react2.default.createElement( 'span', { className: 'sui-error' }, ' *' ) ), _react2.default.createElement( 'div', { id: 'add-predefined', className: 'sui-col-sm-6 sui-insert-variables', ref: function ref(addPredefined) { return _this3.addPredefined = addPredefined; } }, _react2.default.createElement( 'select', { className: 'predefined-options sui-variables', ref: function ref(el) { return _this3.el = el; } }, _react2.default.createElement( 'option', { value: defaultNoImage }, (0, _utils.translate)('New option') ), imagesEnabled && _react2.default.createElement( 'option', { value: defaultWithImage }, (0, _utils.translate)('New option with image') ), _react2.default.createElement( 'option', { value: (0, _utils.translate)('Under 1 ' + 'year\n1-17\n18-24\n25-34\n35-44\n45-54\n55-64\n65 ' + 'and Above') }, (0, _utils.translate)('Age') ), _react2.default.createElement( 'option', { value: (0, _utils.translate)('Male\nFemale\nNon-binary\nOther') }, (0, _utils.translate)('Gender') ), _react2.default.createElement( 'option', { value: (0, _utils.translate)("Primary School\nHigh School\nSome College\nAssociate's " + "Degree\nBachelor's Degree\nMaster's degree\nProfessional " + 'degree\nDoctoral degree\nOther') }, (0, _utils.translate)('Educational Attainment') ), _react2.default.createElement( 'option', { value: (0, _utils.translate)('Full-time employed\nPart-time ' + 'employed\nSelf-employed\nContract ' + 'Worker\nHomemaker\nRetired\nStudent\nUnemployed') }, (0, _utils.translate)('Employment Status') ), _react2.default.createElement( 'option', { value: (0, _utils.translate)('Architecture and Engineering\nArts, Design, Entertainment, ' + 'Sports, and Media\nBuilding and Grounds Cleaning and ' + 'Maintenance\nBusiness and Financial Operations\nCommunity ' + 'and Social Services\nComputer and ' + 'Mathematical\nConstruction and Extraction\nEducational ' + 'Instruction and Library\nFarming, Fishing, and ' + 'Forestry\nFood Preparation and Serving ' + 'Related\nHealthcare Practitioners and Technical\nHealthcare ' + 'Support\nInstallation, Maintenance, and ' + 'Repair\nLegal\nLife, Physical, and Social ' + 'Science\nManagement\nOffice and Administrative ' + 'Support\nPersonal Care and ' + 'Services\nProduction/Manufacturing\nProtective ' + 'Service\nSales and Related\nTransportation and Material Moving') }, (0, _utils.translate)('Occupation') ), _react2.default.createElement( 'option', { value: (0, _utils.translate)('Single\nMarried\nDivorced\nSeparated\nWidowed') }, (0, _utils.translate)('Marital Status') ), _react2.default.createElement( 'option', { value: (0, _utils.translate)('Africa\nAntarctica\nAsia\nAustralia\nEurope\nNorth America\nSouth America') }, (0, _utils.translate)('Continents') ), _react2.default.createElement( 'option', { value: (0, _utils.translate)('Afghanistan\nÅland Islands\nAlbania\nAlgeria' + '\nAmerican Samoa\nAndorra\nAngola\nAnguilla\nAntarctica' + '\nAntigua and Barbuda\nArgentina\nArmenia\nAruba\nAustralia' + '\nAustria\nAzerbaijan\nBahamas\nBahrain\nBangladesh' + '\nBarbados\nBelarus\nBelgium\nBelize\nBenin\nBermuda' + '\nBhutan\nBolivia\nBonaire, Sint Eustatius and Saba' + '\nBosnia and Herzegovina\nBotswana\nBouvet Island' + '\nBrazil\nBritish Indian Ocean Territory\nBrunei Darussalam' + '\nBulgaria\nBurkina Faso\nBurundi\nCabo Verde' + '\nCambodia\nCameroon\nCanada\nCayman Islands' + '\nCentral African Republic\nChad\nChile\nChina\nChristmas ' + 'Island\nCocos Islands\nColombia\nComoros\nCongo, ' + 'Democratic Republic of the\nCongo, ' + 'Republic of the\nCook Islands\nCosta Rica\nCôte ' + "d'Ivoire\nCroatia\nCuba\nCuraçao\nCyprus\nCzech " + 'Republic\nDenmark\nDjibouti\nDominica\nDominican ' + 'Republic\nEcuador\nEgypt\nEl Salvador\nEquatorial ' + 'Guinea\nEritrea\nEstonia\nEswatini\nEthiopia\nFalkland ' + 'Islands\nFaroe Islands\nFiji\nFinland\nFrance\nFrench ' + 'Guiana\nFrench Polynesia\nFrench Southern ' + 'Territories\nGabon\nGambia\nGeorgia\nGermany\nGhana' + '\nGibraltar\nGreece\nGreenland\nGrenada\nGuadeloupe' + '\nGuam\nGuatemala\nGuernsey\nGuinea\nGuinea-Bissau' + '\nGuyana\nHaiti\nHeard and McDonald Islands\nHoly ' + 'See\nHonduras\nHong Kong\nHungary\nIceland\nIndia' + '\nIndonesia\nIran\nIraq\nIreland\nIsle of Man\nIsrael\nItaly' + '\nJamaica\nJapan\nJersey\nJordan\nKazakhstan' + '\nKenya\nKiribati\nKuwait' + "\nKyrgyzstan\nLao People's Democratic Republic" + '\nLatvia\nLebanon\nLesotho\nLiberia\nLibya' + '\nLiechtenstein\nLithuania\nLuxembourg\nMacau\nMadagascar' + '\nMalawi\nMalaysia\nMaldives\nMali' + '\nMalta\nMarshall Islands\nMartinique\nMauritania\nMauritius' + '\nMayotte\nMexico\nMicronesia\nMoldova\nMonaco\nMongolia' + '\nMontenegro\nMontserrat\nMorocco' + '\nMozambique\nMyanmar\nNamibia\nNauru' + '\nNepal\nNetherlands\nNew Caledonia\nNew Zealand' + '\nNicaragua\nNiger\nNigeria\nNiue\nNorfolk Island\nNorth Korea' + '\nNorth Macedonia\nNorthern Mariana Islands\nNorway\nOman' + '\nPakistan\nPalau\nPalestine, State of\nPanama\nPapua New Guinea' + '\nParaguay\nPeru\nPhilippines\nPitcairn\nPoland\nPortugal' + '\nPuerto Rico\nQatar\nRéunion\nRomania\nRussia\nRwanda' + '\nSaint Barthélemy\nSaint Helena, Ascension and Tristan ' + 'da Cunha\nSaint Kitts and Nevis\nSaint Lucia' + '\nSaint Martin\nSaint Pierre and Miquelon\nSaint ' + 'Vincent and the Grenadines\nSamoa\nSan Marino\nSao ' + 'Tome and Principe\nSaudi Arabia\nSenegal\nSerbia\nSeychelles' + '\nSierra Leone\nSingapore\nSint Maarten\nSlovakia\nSlovenia' + '\nSolomon Islands\nSomalia\nSouth Africa\nSouth Georgia ' + 'and the South Sandwich Islands\nSouth Korea\nSouth Sudan' + '\nSpain\nSri Lanka\nSudan\nSuriname\nSvalbard and Jan Mayen ' + 'Islands\nSweden\nSwitzerland\nSyria\nTaiwan\nTajikistan' + '\nTanzania\nThailand\nTimor-Leste\nTogo\nTokelau\nTonga' + '\nTrinidad and Tobago\nTunisia\nTurkey\nTurkmenistan' + '\nTurks and Caicos Islands\nTuvalu\nUganda\nUkraine' + '\nUnited Arab Emirates\nUnited Kingdom\nUnited States' + '\nUruguay\nUS Minor Outlying Islands\nUzbekistan\nVanuatu' + '\nVenezuela\nVietnam\nVirgin Islands, British' + '\nVirgin Islands, U.S.\nWallis and Futuna\nWestern Sahara' + '\nYemen\nZambia\nZimbabwe') }, (0, _utils.translate)('Countries') ), _react2.default.createElement( 'option', { value: (0, _utils.translate)('Alabama\nAlaska\nArizona\nArkansas\nCalifornia\nColorado\nConnecticut\nDelaware\nDistrict of Columbia\nFlorida\nGeorgia\nHawaii\nIdaho\nIllinois\nIndiana\nIowa\nKansas\nKentucky\nLouisiana\nMaine\nMaryland\nMassachusetts\nMichigan\nMinnesota\nMississippi\nMissouri\nMontana\nNebraska\nNevada\nNew Hampshire\nNew Jersey\nNew Mexico\nNew York\nNorth Carolina\nNorth Dakota\nOhio\nOklahoma\nOregon\nPennsylvania\nRhode Island\nSouth Carolina\nSouth Dakota\nTennessee\nTexas\nUtah\nVermont\nVirginia\nWashington\nWest Virginia\nWisconsin\nWyoming') }, (0, _utils.translate)('American States') ), _react2.default.createElement( 'option', { value: (0, _utils.translate)('Alberta\nBritish Columbia\nManitoba\nNew Brunswick\nNewfoundland and Labrador\nNorthwest Territories\nNova Scotia\nNunavut\nOntario\nPrince Edward Island\nQuebec\nSaskatchewan\nYukon') }, (0, _utils.translate)('Canadian Provinces') ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-insert-variables' }, _react2.default.createElement('textarea', { id: 'bulk-edit-textarea', value: this.state.value, placeholder: this.props.placeholder, className: 'sui-form-control', onChange: function onChange(e) { _this3.updateValue(e.target.value); }, rows: '8' }), this.props.isRequired && !this.isValid(value) && _react2.default.createElement( 'span', { className: 'sui-error-message' }, requiredError ), this.props.description && _react2.default.createElement( 'span', { className: 'sui-description bulk-editor-description' }, this.props.description ) ) ); } }]); return SuiTags; }(_react.Component); exports.default = SuiTags; /***/ }), /* 507 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _labels = __webpack_require__(200); var _labels2 = _interopRequireDefault(_labels); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _tabs = __webpack_require__(9); var _tabs2 = _interopRequireDefault(_tabs); var _multiName = __webpack_require__(508); var _multiName2 = _interopRequireDefault(_multiName); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _validation = __webpack_require__(226); var _validation2 = _interopRequireDefault(_validation); var _border = __webpack_require__(170); var _border2 = _interopRequireDefault(_border); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _prefill = __webpack_require__(76); var _prefill2 = _interopRequireDefault(_prefill); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Name = function (_Component) { _inherits(Name, _Component); function Name(props) { _classCallCheck(this, Name); var _this = _possibleConstructorReturn(this, (Name.__proto__ || Object.getPrototypeOf(Name)).call(this, props)); _this.multiFields = [{ slug: 'prefix', label: (0, _utils.translate)('Prefix') }, { slug: 'fname', label: (0, _utils.translate)('First Name') }, { slug: 'mname', label: (0, _utils.translate)('Middle Name') }, { slug: 'lname', label: (0, _utils.translate)('Last Name') }]; return _this; } _createClass(Name, [{ key: 'hasChildrens', value: function hasChildrens(childrens) { var result = _.filter(childrens, function (child) { if (_.isUndefined(child)) { return false; } return true; }); if (_.isEmpty(result)) { return false; } return true; } }, { key: 'render', value: function render() { var _this2 = this; var type = this.props.type; switch (type) { case 'labels': return _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'multiple_name', settings: this.props.state, 'default': 'false', divClass: 'sui-tabs-content-lg' }), _react2.default.createElement( _labels2.default, _extends({ settings: this.props.state }, this.props, { value: 'false' }), (0, _utils.translate)('Single') ), _react2.default.createElement( _multiName2.default, _extends({ settings: this.props.state }, this.props, { value: 'true' }), (0, _utils.translate)('Multiple') ) ); case 'settings': if (this.props.state.multiple_name === 'true') { // Used to get first tab to be activated by default var firstTab = void 0; var childrens = this.multiFields.map(function (field, i) { if (!_.isUndefined(_this2.props.state[field.slug]) && _this2.props.state[field.slug]) { if (_.isEmpty(firstTab)) { firstTab = field.slug; } if (field.slug === 'prefix') { return _react2.default.createElement( _col2.default, { cols: '12', label: (0, _escapeHtml.escapeHTML)(field.label), value: field.slug, settings: _this2.props.state, boxClass: 'sui-tab-boxed', key: i }, _react2.default.createElement(_prefill2.default, _extends({}, _this2.props, { prefix: field.slug })) ); } if (field.slug !== 'prefix') { return _react2.default.createElement( _col2.default, { cols: '12', label: (0, _escapeHtml.escapeHTML)(field.label), settings: _this2.props.state, value: field.slug, required: _this2.props.state[field.slug + '_required'], boxClass: 'sui-tab-boxed', key: i }, _react2.default.createElement(_required2.default, _extends({}, _this2.props, { prefix: field.slug })), _react2.default.createElement(_prefill2.default, _extends({}, _this2.props, { prefix: field.slug })) ); } } }); if (!this.hasChildrens(childrens)) { return _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('At least one field must be enabled') ) ) ) ); } return _react2.default.createElement( 'div', null, _react2.default.createElement( _tabs2.default, { 'default': firstTab }, childrens ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Layout'), labelDark: true, description: (0, _utils.translate)('By default, the "Prefix" and "First Name" fields are added to the first row, and the rest of the name fields are added to the second row. Under the Custom tab, you can choose the number of columns for displaying the name fields.'), sidebar: false }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'default_layout', settings: this.props.state, 'default': 'default', label: '' }), _react2.default.createElement( _empty2.default, { value: 'default' }, (0, _utils.translate)('Default') ), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'custom', label: (0, _utils.translate)('Custom'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( 'div', { className: 'fui-form-field--row' }, _react2.default.createElement( 'div', { className: 'fui-form-field--col', style: { maxWidth: 160 } }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Number of columns'), placeholder: '1', property: 'layout_columns' }), _react2.default.createElement( 'option', { value: '1' }, '1' ), _react2.default.createElement( 'option', { value: '2' }, '2' ), _react2.default.createElement( 'option', { value: '3' }, '3' ), _react2.default.createElement( 'option', { value: '4' }, '4' ) ) ) ) ) ) ) ); } if (this.props.state.multiple_name !== 'true') { return _react2.default.createElement( 'div', null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement(_prefill2.default, this.props) ); } case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Name; }(_react.Component); exports.default = Name; /***/ }), /* 508 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _accordionToggle = __webpack_require__(187); var _accordionToggle2 = _interopRequireDefault(_accordionToggle); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MultiEmail = function (_Component) { _inherits(MultiEmail, _Component); function MultiEmail(props) { _classCallCheck(this, MultiEmail); return _possibleConstructorReturn(this, (MultiEmail.__proto__ || Object.getPrototypeOf(MultiEmail)).call(this, props)); } _createClass(MultiEmail, [{ key: 'render', value: function render() { var _this2 = this; var multiFields = [{ slug: 'fname', label: (0, _utils.translate)('First Name') }, { slug: 'mname', label: (0, _utils.translate)('Middle Name') }, { slug: 'lname', label: (0, _utils.translate)('Last Name') }]; return _react2.default.createElement( 'div', { className: 'sui-accordion sui-accordion-flushed', value: 'multiple' }, _react2.default.createElement( _accordionToggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Prefix'), property: 'prefix', required: this.props.state['prefix_required'], settings: this.props.state }), _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'prefix_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({ property: 'prefix_placeholder', label: (0, _utils.translate)('Default value'), settings: this.props.state }, this.props), _react2.default.createElement( 'option', { value: 'Mr' }, (0, _utils.translate)('Mr.') ), _react2.default.createElement( 'option', { value: 'Mrs' }, (0, _utils.translate)('Mrs.') ), _react2.default.createElement( 'option', { value: 'Ms' }, (0, _utils.translate)('Ms.') ), _react2.default.createElement( 'option', { value: 'Mx' }, (0, _utils.translate)('Mx.') ), _react2.default.createElement( 'option', { value: 'Miss' }, (0, _utils.translate)('Miss') ), _react2.default.createElement( 'option', { value: 'Dr' }, (0, _utils.translate)('Dr.') ), _react2.default.createElement( 'option', { value: 'Prof' }, (0, _utils.translate)('Prof.') ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'prefix_description' })) ) ) ) ), multiFields.map(function (field, i) { return _react2.default.createElement( _accordionToggle2.default, _extends({}, _this2.props, { label: field.label, property: field.slug, settings: _this2.props.state, required: _this2.props.state[field.slug + '_required'], key: i }), _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: field.slug + '_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter Placeholder'), property: field.slug + '_placeholder' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: field.slug + '_description' })) ) ) ) ); }) ); } }]); return MultiEmail; }(_react.Component); exports.default = MultiEmail; /***/ }), /* 509 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _toggle = __webpack_require__(188); var _toggle2 = _interopRequireDefault(_toggle); var _prefill = __webpack_require__(76); var _prefill2 = _interopRequireDefault(_prefill); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable dot-notation */ var Number = function (_Component) { _inherits(Number, _Component); function Number(props) { _classCallCheck(this, Number); return _possibleConstructorReturn(this, (Number.__proto__ || Object.getPrototypeOf(Number)).call(this, props)); } _createClass(Number, [{ key: 'render', value: function render() { var type = this.props.type; var separators = !_.isUndefined(this.props.state['separators']) ? this.props.state['separators'] : ''; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter Placeholder'), property: 'placeholder' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Default Value (optional)'), placeholder: (0, _utils.translate)('Enter default value'), property: 'default_value' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Limits'), labelDark: true, description: (0, _utils.translate)('Set the minimum and maximum values the ' + 'user can choose. Leave the fields blank ' + 'to allow any number including negatives.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( 'div', { className: 'sui-form-field-inline' }, _react2.default.createElement(_input2.default, _extends({ type: 'number' }, this.props, { settings: this.props.state, placeholder: '0', property: 'limit_min', label: (0, _utils.translate)('Minimum'), fieldClass: 'sui-input-md' })), _react2.default.createElement(_input2.default, _extends({ type: 'number' }, this.props, { settings: this.props.state, placeholder: '0', property: 'limit_max', label: (0, _utils.translate)('Maximum'), fieldClass: 'sui-input-md' })) ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'limit_message', settings: this.props.state, 'default': 'false', label: (0, _utils.translate)('Error Messages'), divClass: 'sui-tabs-content-lg' }), _react2.default.createElement(_empty2.default, { value: 'false', label: (0, _utils.translate)('Default') }), _react2.default.createElement( _container2.default, { value: 'true', label: (0, _utils.translate)('Custom'), boxClass: 'sui-tab-boxed' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, type: 'text', property: 'limit_min_message', label: (0, _utils.translate)('When number is smaller than the min limit'), placeholder: (0, _utils.translate)('E.g. Please enter a number greater than 0.') })), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, type: 'text', property: 'limit_max_message', label: (0, _utils.translate)('When number is greater than the max limit'), placeholder: (0, _utils.translate)('E.g. Please enter a number lower than 1000.') })) ) ) ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Formatting'), labelDark: true, description: (0, _utils.translate)('Choose how do you want to format the value ' + 'of this field.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'separators', settings: this.props.state, defaultValue: '1234567.89', label: (0, _utils.translate)('Separators'), fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: 'blank' }, (0, _utils.translate)('1234567.89') ), _react2.default.createElement( 'option', { value: 'comma_dot' }, (0, _utils.translate)('1,234,567.89') ), _react2.default.createElement( 'option', { value: 'dot_comma' }, (0, _utils.translate)('1.234.567,89') ), _react2.default.createElement( 'option', { value: 'space_comma' }, (0, _utils.translate)('1 234 567,89') ) ) ), 'custom' !== separators && _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'precision', settings: this.props.state, defaultValue: '0', label: (0, _utils.translate)('Round To'), fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: '0' }, (0, _utils.translate)('0 decimals') ), _react2.default.createElement( 'option', { value: '1' }, (0, _utils.translate)('1 decimals') ), _react2.default.createElement( 'option', { value: '2' }, (0, _utils.translate)('2 decimals') ), _react2.default.createElement( 'option', { value: '3' }, (0, _utils.translate)('3 decimals') ), _react2.default.createElement( 'option', { value: '4' }, (0, _utils.translate)('4 decimals') ) ) ) ), 'custom' === separators && _react2.default.createElement( 'div', { className: 'sui-form-field-inline sui-border-frame', style: { marginBottom: '5px' } }, _react2.default.createElement(_input2.default, _extends({ type: 'text' }, this.props, { settings: this.props.state, placeholder: (0, _utils.translate)('E.g. $'), property: 'thousand-separators', defaultValue: ',', label: (0, _utils.translate)('Thousand Separator'), fieldClass: 'sui-input-md' })), _react2.default.createElement(_input2.default, _extends({ type: 'text' }, this.props, { settings: this.props.state, placeholder: (0, _utils.translate)('E.g. $'), property: 'decimal-separators', defaultValue: '.', label: (0, _utils.translate)('Decimal Separator'), fieldClass: 'sui-input-md' })) ), 'custom' === separators && _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'precision', settings: this.props.state, defaultValue: '2', label: (0, _utils.translate)('Round To'), fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: '0' }, (0, _utils.translate)('0 decimals') ), _react2.default.createElement( 'option', { value: '1' }, (0, _utils.translate)('1 decimals') ), _react2.default.createElement( 'option', { value: '2' }, (0, _utils.translate)('2 decimals') ), _react2.default.createElement( 'option', { value: '3' }, (0, _utils.translate)('3 decimals') ), _react2.default.createElement( 'option', { value: '4' }, (0, _utils.translate)('4 decimals') ) ) ) ) ), _react2.default.createElement(_prefill2.default, this.props) ); case 'calculations': return _react2.default.createElement(_toggle2.default, this.props); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Number; }(_react.Component); exports.default = Number; /***/ }), /* 510 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Pagination = function (_Component) { _inherits(Pagination, _Component); function Pagination(props) { _classCallCheck(this, Pagination); return _possibleConstructorReturn(this, (Pagination.__proto__ || Object.getPrototypeOf(Pagination)).call(this, props)); } _createClass(Pagination, [{ key: 'render', value: function render() { var type = this.props.type; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Step label'), placeholder: (0, _utils.translate)('Enter step label'), property: 'pagination-label' })), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'pagination-labels', settings: this.props.state, settingsLabel: (0, _utils.translate)('Buttons Text'), 'default': 'none', description: (0, _utils.translate)('Choose whether you want to use default text for ' + 'the Previous and Next button or use custom text.') }), _react2.default.createElement( _empty2.default, { value: 'none' }, (0, _utils.translate)('Default') ), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'custom', boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Custom') }), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Previous Button'), placeholder: (0, _utils.translate)('Enter text'), property: 'pagination-footer-button-text' })), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Next Button'), placeholder: (0, _utils.translate)('Enter text'), property: 'pagination-right-button-text' })) ) ) ); case 'settings': return _react2.default.createElement('div', null); case 'visibility': return _react2.default.createElement('div', null); case 'styling': return _react2.default.createElement('div', null); default: return _react2.default.createElement('div', null); } } }]); return Pagination; }(_react.Component); exports.default = Pagination; /***/ }), /* 511 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _labels = __webpack_require__(200); var _labels2 = _interopRequireDefault(_labels); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _border = __webpack_require__(170); var _border2 = _interopRequireDefault(_border); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _prefill = __webpack_require__(76); var _prefill2 = _interopRequireDefault(_prefill); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Phone = function (_Component) { _inherits(Phone, _Component); function Phone(props) { _classCallCheck(this, Phone); return _possibleConstructorReturn(this, (Phone.__proto__ || Object.getPrototypeOf(Phone)).call(this, props)); } _createClass(Phone, [{ key: 'render', value: function render() { var type = this.props.type; var countryData = window.intlTelInputGlobals.getCountryData(); var countries = new Object(); for (var i = 0; i < countryData.length; i++) { countries[countryData[i].iso2] = countryData[i].name; } switch (type) { case 'labels': return _react2.default.createElement(_labels2.default, this.props); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Validation') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Make sure the users fill this field as per the ' + 'selected validation and warn them when they haven\'t') ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'validation', settings: this.props.state, 'default': 'none', label: (0, _utils.translate)('Type'), divClass: 'sui-tabs-content-lg' }), _react2.default.createElement(_empty2.default, { value: 'none', label: (0, _utils.translate)('None') }), _react2.default.createElement( _container2.default, { value: 'standard', label: (0, _utils.translate)('National'), boxClass: 'sui-tab-boxed' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Select the country to validate phone number for'), property: 'phone_national_country' }), _.map(countries, function (country, x) { return _react2.default.createElement( 'option', { value: x, key: x }, country ); }) ), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Validation message'), type: 'text', placeholder: (0, _utils.translate)('Enter validation message'), property: 'validation_message' })) ), _react2.default.createElement( _container2.default, { value: 'international', label: (0, _utils.translate)('International'), boxClass: 'sui-tab-boxed' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Default country'), property: 'phone_international_country', defaultValue: 'US' }), _.map(countries, function (country, x) { return _react2.default.createElement( 'option', { value: x, key: x }, country ); }) ), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Validation message'), type: 'text', placeholder: (0, _utils.translate)('Enter validation message'), property: 'validation_message' })) ), _react2.default.createElement( _container2.default, { value: 'character_limit', label: (0, _utils.translate)('Character Limit'), boxClass: 'sui-tab-boxed' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Limit field to'), type: 'text', placeholder: (0, _utils.translate)('10'), property: 'limit', suffix: (0, _utils.translate)('Characters'), inputClass: 'sui-field-has-suffix' })), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Validation message'), type: 'text', placeholder: (0, _utils.translate)('Enter validation message'), property: 'validation_message' })) ) ) ) ), _react2.default.createElement(_prefill2.default, this.props) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Phone; }(_react.Component); exports.default = Phone; /***/ }), /* 512 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _accordionToggle = __webpack_require__(187); var _accordionToggle2 = _interopRequireDefault(_accordionToggle); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _checkbox = __webpack_require__(41); var _checkbox2 = _interopRequireDefault(_checkbox); var _multiCustomFieldValue = __webpack_require__(376); var _multiCustomFieldValue2 = _interopRequireDefault(_multiCustomFieldValue); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Postdata = function (_Component) { _inherits(Postdata, _Component); function Postdata(props) { _classCallCheck(this, Postdata); var _this = _possibleConstructorReturn(this, (Postdata.__proto__ || Object.getPrototypeOf(Postdata)).call(this, props)); _this.multiFields = [{ slug: 'post_title', label: (0, _utils.translate)('Title'), placeholder: false }, { slug: 'post_content', label: (0, _utils.translate)('Content'), placeholder: true }, { slug: 'post_excerpt', label: (0, _utils.translate)('Excerpt'), placeholder: false }, { slug: 'post_image', label: (0, _utils.translate)('Featured Image'), placeholder: true }]; // eslint-disable-next-line camelcase _this.post_type = _this.props.state.post_type; // eslint-disable-next-line camelcase _this.post_categories = []; if (!_.isUndefined(forminatorData.postCategories[_this.post_type]) && !_.isEmpty(forminatorData.postCategories[_this.post_type])) { // eslint-disable-next-line camelcase _this.post_categories = forminatorData.postCategories[_this.post_type]; _this.post_categories.map(function (category) { _this.multiFields.push({ slug: category.value, label: category.label, placeholder: true }); }); } _this.multiFields.push({ slug: 'post_custom_fields', label: (0, _utils.translate)('Custom Fields'), placeholder: false }); return _this; } _createClass(Postdata, [{ key: 'render', value: function render() { var _this2 = this; var type = this.props.type; // eslint-disable-next-line camelcase, max-len var post_categories = !_.isUndefined(forminatorData.postCategories[this.props.state.post_type]) ? forminatorData.postCategories[this.props.state.post_type] : []; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'p', { className: 'sui-description' }, (0, _utils.translate)('Allow users to submit post data with this field. By default, ' + 'this will create new posts, but you can assign it to any post ' + 'type in the {{strong}}Settings{{/strong}} tab.', { components: { strong: _react2.default.createElement('strong', null) } }) ), _react2.default.createElement( 'div', { value: 'multiple', className: 'sui-accordion sui-accordion-flushed fui-modal-accordion' }, this.multiFields.map(function (field, i) { if (field.placeholder === false && field.slug !== 'post_custom_fields') { return _react2.default.createElement( _accordionToggle2.default, _extends({}, _this2.props, { label: field.label, property: field.slug, settings: _this2.props.state, required: _this2.props.state[field.slug + '_required'], key: i }), _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: field.slug + '_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter Placeholder'), property: field.slug + '_placeholder' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: field.slug + '_description' })) ) ) ) ); } if (field.placeholder === true && field.slug !== 'post_custom_fields') { return _react2.default.createElement( _accordionToggle2.default, _extends({}, _this2.props, { label: field.label, property: field.slug, settings: _this2.props.state, required: _this2.props.state[field.slug + '_required'], key: i }), _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: field.slug + '_label' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: field.slug + '_description' })) ) ) ) ); } if (field.slug === 'post_custom_fields') { return _react2.default.createElement( _accordionToggle2.default, _extends({}, _this2.props, { label: field.label, property: field.slug, settings: _this2.props.state, key: i, noBoxBody: true }), _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_multiCustomFieldValue2.default, _extends({ wrappers: _this2.props.wrappers }, _this2.props)) ) ); } }) ) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'p', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Post type') ), _react2.default.createElement( 'p', { className: 'sui-description' }, (0, _utils.translate)('Choose the post type associated with this field.') ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Assigned post type'), placeholder: (0, _utils.translate)('post'), property: 'post_type', fieldClass: 'sui-input-md' }), _.map(forminatorData.postTypeList, function (post, i) { return _react2.default.createElement( 'option', { value: post.value, key: i }, (0, _escapeHtml.escapeHTML)(post.label) ); }) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'p', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Default status') ), _react2.default.createElement( 'p', { className: 'sui-description' }, (0, _utils.translate)('When a user submits this form, choose ' + 'what status this post data is.') ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Status'), placeholder: (0, _utils.translate)('pending'), property: 'data_status', fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: 'draft' }, (0, _utils.translate)('Draft') ), _react2.default.createElement( 'option', { value: 'pending' }, (0, _utils.translate)('Pending Review') ), _react2.default.createElement( 'option', { value: 'publish' }, (0, _utils.translate)('Published') ) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'p', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Default author') ), _react2.default.createElement( 'p', { className: 'sui-description' }, (0, _utils.translate)("By default we'll assign posts to users if they're " + 'logged in, and fall back to the user specified below ' + "if you're allowing visitors to make posts. You can " + 'also override this to always assign posts to a ' + 'specified user.') ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Default author'), property: 'select_author', fieldClass: 'sui-input-md fui-reduce-spacing' }), _.map(forminatorData.userList, function (user, i) { return _react2.default.createElement( 'option', { value: user.value, key: i }, (0, _escapeHtml.escapeHTML)(user.label) ); }) ), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { settings: this.props.state, property: 'default_author', label: (0, _utils.translate)('Always assign posts to this user'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })) ), post_categories.length > 0 && _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Taxonomies limits') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose whether to allow single or multiple ' + 'categories or tags on this post.') ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( _row2.default, null, _.map(post_categories, function (category, key) { return _react2.default.createElement( _col2.default, { cols: '6', key: key }, _react2.default.createElement( _radio2.default, _extends({}, _this2.props, { settings: _this2.props.state, property: category.value + '_multiple', defaultValue: '0', label: category.label }), _react2.default.createElement( 'div', { value: '0' }, (0, _utils.translate)('Single') ), _react2.default.createElement( 'div', { value: '1' }, (0, _utils.translate)('Multiple') ) ) ); }) ) ) ) ) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Postdata; }(_react.Component); exports.default = Postdata; /***/ }), /* 513 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _suiVariables = __webpack_require__(50); var _suiVariables2 = _interopRequireDefault(_suiVariables); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MultiCustomFieldOption = function (_Component) { _inherits(MultiCustomFieldOption, _Component); function MultiCustomFieldOption(props) { _classCallCheck(this, MultiCustomFieldOption); var _this = _possibleConstructorReturn(this, (MultiCustomFieldOption.__proto__ || Object.getPrototypeOf(MultiCustomFieldOption)).call(this, props)); _this.state = { focus: false }; return _this; } _createClass(MultiCustomFieldOption, [{ key: 'getNameOptions', value: function getNameOptions() { var nameOptions = []; var nameFields = (0, _utils.getFields)(this.props.wrappers, [ // disable these fields 'page-break', 'postdata', 'captcha', 'consent', 'gdprcheckbox', 'stripe', 'paypal', 'password']); nameFields.map(function (field) { nameOptions.push({ value: '{' + field.element_id + '}', label: field.label }); }); return nameOptions; } }, { key: 'removeOption', value: function removeOption() { this.props.removeOption(this.props.counter); } }, { key: 'updateLabel', value: function updateLabel(e) { this.props.updateLabel(this.props.counter, e.target.value); } }, { key: 'updateValue', value: function updateValue(e) { this.props.updateValue(this.props.counter, e.target.value); } }, { key: 'onFocus', value: function onFocus() { this.setState({ focus: true }); } }, { key: 'onBlur', value: function onBlur() { if (this.state.focus) { this.setState({ focus: false }); } } }, { key: 'render', value: function render() { var hasErrorClass = _.isEmpty(this.props.option.label) ? 'sui-form-field-error' : ''; return _react2.default.createElement( 'div', { className: 'sui-builder-field sui-can_move sui-react ' + hasErrorClass }, _react2.default.createElement( 'div', { className: 'sui-field-info', style: { overflow: 'inherit' } }, _react2.default.createElement('i', { className: 'sui-icon-drag sui-align_top', 'aria-hidden': 'true' }), _react2.default.createElement( 'div', { className: 'sui-builder-field-form' }, _react2.default.createElement( 'div', { className: 'sui-form-field-row' }, _react2.default.createElement('input', { type: 'text', placeholder: (0, _utils.translate)('Label'), value: this.props.option.label, className: 'sui-form-control', onChange: this.updateLabel.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }) ), _react2.default.createElement( 'div', { className: 'sui-form-field-row' }, _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { settings: this.props.option, property: 'value', placeholder: (0, _utils.translate)('Value'), className: 'sui-form-control', onChange: this.updateValue.bind(this) }), this.getNameOptions().map(function (option, i) { return _react2.default.createElement( 'option', { key: i, value: option.value, 'data-content': option.value }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-field-actions sui-align_top' }, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-button-red', onClick: this.removeOption.bind(this) }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Delete meta') ) ) ) ); } }]); return MultiCustomFieldOption; }(_react.Component); exports.default = MultiCustomFieldOption; /***/ }), /* 514 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Section = function (_Component) { _inherits(Section, _Component); function Section(props) { _classCallCheck(this, Section); return _possibleConstructorReturn(this, (Section.__proto__ || Object.getPrototypeOf(Section)).call(this, props)); } _createClass(Section, [{ key: 'render', value: function render() { var type = this.props.type; switch (type) { case 'labels': return _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Title'), placeholder: (0, _utils.translate)('Enter title'), property: 'section_title' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Subtitle (optional)'), placeholder: (0, _utils.translate)('Enter subtitle'), property: 'section_subtitle' })) ) ); case 'settings': return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Border') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Add a border to this section.') ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'section_border', settings: this.props.state, 'default': 'none' }), _react2.default.createElement( _empty2.default, { value: 'none' }, (0, _utils.translate)('None') ), _react2.default.createElement( _container2.default, _extends({ settings: this.props.state }, this.props, { value: 'solid', label: (0, _utils.translate)('Solid'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'number', settings: this.props.state, label: (0, _utils.translate)('Width'), note: 'px', placeholder: '0', property: 'cform-section-border-width' })) ), _react2.default.createElement( _col2.default, { cols: '9' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Color'), property: 'cform-section-border-color', defaultValue: 'rgba(233,233,233,1)', isAlpha: true })) ) ) ), _react2.default.createElement( _container2.default, _extends({ settings: this.props.state }, this.props, { value: 'dashed', label: (0, _utils.translate)('Dashed'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'number', settings: this.props.state, label: (0, _utils.translate)('Width'), note: 'px', placeholder: '0', property: 'cform-section-border-width' })) ), _react2.default.createElement( _col2.default, { cols: '9' }, _react2.default.createElement(_colorPicker2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Color'), property: 'cform-section-border-color', defaultValue: 'rgba(233,233,233,1)', isAlpha: true })) ) ) ) ) ) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Section; }(_react.Component); exports.default = Section; /***/ }), /* 515 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _multiValue = __webpack_require__(228); var _multiValue2 = _interopRequireDefault(_multiValue); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _toggle = __webpack_require__(188); var _toggle2 = _interopRequireDefault(_toggle); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _optionsOrder = __webpack_require__(229); var _optionsOrder2 = _interopRequireDefault(_optionsOrder); var _prefill = __webpack_require__(76); var _prefill2 = _interopRequireDefault(_prefill); var _radioOptions = __webpack_require__(115); var _radioOptions2 = _interopRequireDefault(_radioOptions); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Singlevalue = function (_Component) { _inherits(Singlevalue, _Component); function Singlevalue(props) { _classCallCheck(this, Singlevalue); return _possibleConstructorReturn(this, (Singlevalue.__proto__ || Object.getPrototypeOf(Singlevalue)).call(this, props)); } _createClass(Singlevalue, [{ key: 'render', value: function render() { var type = this.props.type; var value_type = this.props.state.value_type; var isRadio = value_type === 'multiselect' ? 'false' : 'true'; var limit_status = this.props.state.limit_status; var isLimit = limit_status === 'enable' ? 'true' : 'false'; var required = this.props.state.required; var isRequire = required === true ? 'true' : 'false'; var multiselect_style = this.props.state.multiselect_style; var showPlaceholder = 'multiselect' !== value_type || 'multiselect' === value_type && 'modern' === multiselect_style; var prefillMessage = (0, _utils.translate)('Note: Pass comma-separated values for this query ' + 'parameter to pre-populate multiple options.'); switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, defaultValue: 'single', label: (0, _utils.translate)('Type'), property: 'value_type', clearOptions: 'true' }), _react2.default.createElement( 'span', { value: 'single' }, (0, _utils.translate)('Single') ), _react2.default.createElement( 'span', { value: 'multiselect' }, (0, _utils.translate)('Multiple') ) ) ) ), showPlaceholder && _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder'), placeholder: (0, _utils.translate)('Enter Placeholder'), property: 'placeholder' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ), _react2.default.createElement(_multiValue2.default, _extends({}, this.props, { isRadio: isRadio, isLimit: isLimit })) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props), value_type === 'multiselect' && _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Multi Select Style') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('Choose whether you want to use the Standard or Modern style.') ), _react2.default.createElement( 'div', { className: 'sui-form-field', style: { marginTop: '0' } }, _react2.default.createElement( _radioOptions2.default, _extends({}, this.props, { settings: this.props.state, radioClass: 'sui-radio-sm', defaultValue: 'standard', property: 'multiselect_style' }), _react2.default.createElement( 'div', { value: 'standard', hasImage: true, image1x: 'multiselect-standard.png', image2x: 'multiselect-standard@2x.png' }, (0, _utils.translate)('Standard') ), _react2.default.createElement( 'div', { value: 'modern', hasImage: true, image1x: 'multiselect-modern.png', image2x: 'multiselect-modern@2x.png' }, (0, _utils.translate)('Modern') ) ) ) ), (value_type !== 'multiselect' || 'multiselect' === value_type && 'modern' === multiselect_style) && _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Search') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('Display the search box in a dropdown') ), _react2.default.createElement( 'div', { className: 'sui-form-field', style: { marginTop: '0' } }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, defaultValue: 'disable', property: 'search_status', clearOptions: 'true', noWrapper: true }), _react2.default.createElement( 'span', { value: 'enable' }, (0, _utils.translate)('Enable') ), _react2.default.createElement( 'span', { value: 'disable' }, (0, _utils.translate)('Disable') ) ) ) ), 'multiselect' === value_type && 'modern' === multiselect_style && _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Checkbox In Dropdown Options') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('Select if you want to show or hide checkboxes in the Multi Select dropdown options') ), _react2.default.createElement( 'div', { className: 'sui-form-field', style: { marginTop: '0' } }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, defaultValue: 'hide', property: 'checkbox_in_dropdown', clearOptions: 'true', noWrapper: true }), _react2.default.createElement( 'span', { value: 'hide' }, (0, _utils.translate)('Hide') ), _react2.default.createElement( 'span', { value: 'show' }, (0, _utils.translate)('Show') ) ) ) ), _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Limit Submission') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('You can limit submissions of each option to a certain ' + 'number, and once an option reaches the submission limit, ' + 'we\'ll hide that option from the dropdown list.') ), _react2.default.createElement( 'div', { className: 'sui-form-field', style: { marginTop: '0' } }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { settings: this.props.state, 'default': 'disable', property: 'limit_status', simple: true }), _react2.default.createElement(_empty2.default, { value: 'disable', label: (0, _utils.translate)('Disable') }), _react2.default.createElement( _row2.default, _extends({}, this.props, { settings: this.props.state, value: 'enable', label: (0, _utils.translate)('Enable') }), _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('You can set a limit for your options in the ' + 'LABELS tab. Options for which limit field ' + 'is left empty can have unlimited submissions.') ) ) ) ) ) ) ) ), _react2.default.createElement(_optionsOrder2.default, this.props), _react2.default.createElement(_prefill2.default, _extends({}, this.props, { notice: value_type === 'multiselect' ? prefillMessage : false })) ); case 'calculations': return _react2.default.createElement(_toggle2.default, this.props); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Singlevalue; }(_react.Component); exports.default = Singlevalue; /***/ }), /* 516 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _border = __webpack_require__(170); var _border2 = _interopRequireDefault(_border); var _prefill = __webpack_require__(76); var _prefill2 = _interopRequireDefault(_prefill); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Text = function (_Component) { _inherits(Text, _Component); function Text(props) { _classCallCheck(this, Text); return _possibleConstructorReturn(this, (Text.__proto__ || Object.getPrototypeOf(Text)).call(this, props)); } _createClass(Text, [{ key: 'render', value: function render() { var type = this.props.type; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter Placeholder'), property: 'placeholder' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Default Value (optional)'), placeholder: (0, _utils.translate)('Enter default value'), property: 'default' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Max characters') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('By default the user can enter as many characters as they want. ' + 'Use this setting to limit the number of characters the user can ' + 'enter. Leave field blank to allow unlimited characters.') ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Character limit') ), _react2.default.createElement( 'div', { className: 'sui-form-field-inline' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, placeholder: (0, _utils.translate)('E.g. 100'), property: 'limit', fieldClass: 'sui-input-sm' })), _react2.default.createElement( _suiSelect2.default, _extends({ property: 'limit_type', settings: this.props.state }, this.props), _react2.default.createElement( 'option', { value: 'characters' }, (0, _utils.translate)('Characters') ), _react2.default.createElement( 'option', { value: 'words' }, (0, _utils.translate)('Words') ) ) ) ) ) ), _react2.default.createElement(_prefill2.default, this.props) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Text; }(_react.Component); exports.default = Text; /***/ }), /* 517 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _textarea = __webpack_require__(377); var _textarea2 = _interopRequireDefault(_textarea); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _border = __webpack_require__(170); var _border2 = _interopRequireDefault(_border); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _prefill = __webpack_require__(76); var _prefill2 = _interopRequireDefault(_prefill); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Textarea = function (_Component) { _inherits(Textarea, _Component); function Textarea(props) { _classCallCheck(this, Textarea); var _this = _possibleConstructorReturn(this, (Textarea.__proto__ || Object.getPrototypeOf(Textarea)).call(this, props)); _this.updateProperty = _this.updateProperty.bind(_this); return _this; } // Make it possible to update state from child components _createClass(Textarea, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.props.state[slug] = value; } }, { key: 'render', value: function render() { var type = this.props.type; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })), !(0, _utils.isTrue)(this.props.state['editor-type']) && _react2.default.createElement(_textarea2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter Placeholder') + '\n' + (0, _utils.translate)('You can add new line'), property: 'placeholder' })), _react2.default.createElement(_textarea2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Default Value (optional)'), placeholder: (0, _utils.translate)('Enter default value'), property: 'default' })), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Rich-Text editor') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Enable TinyMCE editor to allow the formatted text.') ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'editor-type', defaultValue: 'false' }), _react2.default.createElement( 'div', { value: 'false' }, (0, _utils.translate)('Disable') ), _react2.default.createElement( 'div', { value: 'true' }, (0, _utils.translate)('Enable') ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Max characters') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('By default the user can enter as many characters as ' + 'they want. Use this setting to limit the number of ' + 'characters the user can enter. Leave field blank to ' + 'allow unlimited characters.') ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Character limit') ), _react2.default.createElement( 'div', { className: 'sui-form-field-inline' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, placeholder: (0, _utils.translate)('E.g. 100'), property: 'limit', inputClass: 'sui-input-sm' })), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'limit_type', settings: this.props.state }), _react2.default.createElement( 'option', { value: 'characters' }, (0, _utils.translate)('Characters') ), _react2.default.createElement( 'option', { value: 'words' }, (0, _utils.translate)('Words') ) ) ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Default height') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose the default minimum height of your ' + 'textarea field.') ), _react2.default.createElement( 'div', { className: 'sui-form-field-inline' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, defaultValue: '140', property: 'default-height', inputClass: 'sui-input-sm' })), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('px') ) ) ) ), _react2.default.createElement(_prefill2.default, this.props) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Textarea; }(_react.Component); exports.default = Textarea; /***/ }), /* 518 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _border = __webpack_require__(170); var _border2 = _interopRequireDefault(_border); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _accordion = __webpack_require__(34); var _accordion2 = _interopRequireDefault(_accordion); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _prefill = __webpack_require__(76); var _prefill2 = _interopRequireDefault(_prefill); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable dot-notation */ var Time = function (_Component) { _inherits(Time, _Component); function Time(props) { _classCallCheck(this, Time); var _this = _possibleConstructorReturn(this, (Time.__proto__ || Object.getPrototypeOf(Time)).call(this, props)); _this.timeTypeChanged = false; _this.checkTimeTypeChange = _this.checkTimeTypeChange.bind(_this); return _this; } _createClass(Time, [{ key: 'isTimeValid', value: function isTimeValid(timeType) { var isValid = true; var timeFormat = 'twelve' === timeType ? 'h:mma' : 'H:mm'; if (!_.isUndefined(this.props.state['restrict_time']) && 'specific' === this.props.state['restrict_time']) { var restrict_start_hour = !_.isUndefined(this.props.state['restrict_start_hour']) ? this.props.state['restrict_start_hour'] : 0; var restrict_start_minute = !_.isUndefined(this.props.state['restrict_start_minute']) ? this.props.state['restrict_start_minute'] : 0; var restrict_start_ampm = !_.isUndefined(this.props.state['restrict_start_ampm']) ? this.props.state['restrict_start_ampm'] : 'AM'; var restrict_end_hour = !_.isUndefined(this.props.state['restrict_end_hour']) ? this.props.state['restrict_end_hour'] : 0; var restrict_end_minute = !_.isUndefined(this.props.state['restrict_end_minute']) ? this.props.state['restrict_end_minute'] : 0; var restrict_end_ampm = !_.isUndefined(this.props.state['restrict_end_ampm']) ? this.props.state['restrict_end_ampm'] : 'AM'; var default_time = !_.isUndefined(this.props.state['default_time']) ? this.props.state['default_time'] : 'none'; var default_time_hour = !_.isUndefined(this.props.state['default_time_hour']) ? this.props.state['default_time_hour'] : 0; var default_time_minute = !_.isUndefined(this.props.state['default_time_minute']) ? this.props.state['default_time_minute'] : 0; var default_time_ampm = !_.isUndefined(this.props.state['default_time_ampm']) ? this.props.state['default_time_ampm'] : 'AM'; var start_time_ampm = 'twelve' === timeType ? restrict_start_ampm : ''; var end_time_ampm = 'twelve' === timeType ? restrict_end_ampm : ''; var default_ampm = 'twelve' === timeType ? default_time_ampm : ''; var startDate = moment(restrict_start_hour + ':' + restrict_start_minute + start_time_ampm, timeFormat); var endDate = moment(restrict_end_hour + ':' + restrict_end_minute + end_time_ampm, timeFormat); var defaultDate = moment(default_time_hour + ':' + default_time_minute + default_ampm, timeFormat); if ('default' === default_time && (defaultDate.isBefore(startDate) || endDate.isBefore(defaultDate))) { isValid = false; } } return isValid; } }, { key: 'checkTimeTypeChange', value: function checkTimeTypeChange(val) { if (_.isUndefined(this.props.state.restrict_time) || 'none' === this.props.state.restrict_time) { return; } if (this.props.state.time_type !== val) { this.timeTypeChanged = true; this.convertTime(); } else { this.timeTypeChanged = false; } } }, { key: 'convertTime', value: function convertTime() { var state = this.props.state; var startMinute = _.isUndefined(state.restrict_start_minute) ? '00' : state.restrict_start_minute; var endMinute = _.isUndefined(state.restrict_end_minute) ? '00' : state.restrict_end_minute; var startHour = parseInt(state.restrict_start_hour); var startMeridiem = _.isUndefined(state.restrict_start_ampm) ? '' : state.restrict_start_ampm; var endHour = parseInt(state.restrict_end_hour); var endMeridiem = _.isUndefined(state.restrict_end_ampm) ? '' : state.restrict_end_ampm; if ('twelve' === state.time_type) { if ('pm' === startMeridiem) { startHour = startHour + 12; startMeridiem = ''; } if ('pm' === endMeridiem) { endHour = endHour + 12; endMeridiem = ''; } this.updateProperty('restrict_start_hour', startHour); this.updateProperty('restrict_start_minute', startMinute); this.updateProperty('restrict_start_ampm', startMeridiem); this.updateProperty('restrict_end_hour', endHour); this.updateProperty('restrict_end_minute', endMinute); this.updateProperty('restrict_end_ampm', endMeridiem); } else { if (startHour > 12) { startHour = startHour - 12; startMeridiem = 'pm'; } else { startMeridiem = 'am'; } if (endHour > 12) { endHour = endHour - 12; endMeridiem = 'pm'; } else { endMeridiem = 'am'; } this.updateProperty('restrict_start_hour', startHour); this.updateProperty('restrict_start_minute', startMinute); this.updateProperty('restrict_start_ampm', startMeridiem); this.updateProperty('restrict_end_hour', endHour); this.updateProperty('restrict_end_minute', endMinute); this.updateProperty('restrict_end_ampm', endMeridiem); } } }, { key: 'updateProperty', value: function updateProperty(prop, val) { this.props.updateProperty(prop, val); } }, { key: 'render', value: function render() { var type = this.props.type; var timeType = !_.isUndefined(this.props.state['time_type']) ? this.props.state['time_type'] : 'twelve'; var fieldType = !_.isUndefined(this.props.state['field_type']) ? this.props.state['field_type'] : 'input'; var hoursMax = timeType === 'twelve' ? 12 : 24; var prefillMessage = (0, _utils.translate)('{{strong}}Note:{{/strong}} ' + 'The query parameter\'s value passed in URL should match with the ' + 'selected time format.', { components: { strong: _react2.default.createElement('strong', null) } }); var isLimit = this.isTimeValid(timeType); var timeFormat = 'twelve' === timeType ? 'h:mma' : 'H:mm'; var state = this.props.state; var startHour = state.restrict_start_hour; var startMinute = _.isUndefined(state.restrict_start_minute) ? '0' : state.restrict_start_minute; var startMeridiem = _.isUndefined(state.restrict_start_ampm) ? '' : state.restrict_start_ampm; var endHour = state.restrict_end_hour; var endMinute = _.isUndefined(state.restrict_end_minute) ? '0' : state.restrict_end_minute; var endMeridiem = _.isUndefined(state.restrict_end_ampm) ? '' : state.restrict_end_ampm; var startTime = moment(startHour + ':' + startMinute + startMeridiem, timeFormat).format(timeFormat); var endTime = moment(endHour + ':' + endMinute + endMeridiem, timeFormat).format(timeFormat); switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'field_type', label: (0, _utils.translate)('Type') }), _react2.default.createElement( 'span', { value: 'select' }, (0, _utils.translate)('Dropdowns') ), _react2.default.createElement( 'span', { value: 'input' }, (0, _utils.translate)('Number inputs') ) ) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'time_type', label: (0, _utils.translate)('Format'), timeType: this.checkTimeTypeChange }), _react2.default.createElement( 'span', { value: 'twelve' }, (0, _utils.translate)('12 hour') ), _react2.default.createElement( 'span', { value: 'twentyfour' }, (0, _utils.translate)('24 hour') ) ) ) ), this.timeTypeChanged && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-grey sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('We have mapped the time limit you have set to match the new time format you have chosen. ' + ('The current time limit is set between ' + startTime + ' and ' + endTime + '. ') + 'You can adjust this limit under the Settings tab.') ) ) ) ), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })), _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Fields') ), _react2.default.createElement( 'div', { className: 'sui-accordion sui-accordion-flushed', style: { marginTop: '10px' } }, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Hours') }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label (optional)'), placeholder: (0, _utils.translate)('Enter label'), property: 'hh_label' })) ), fieldType !== 'select' && _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter placeholder'), property: 'hh_placeholder' })) ) ) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Minutes') }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label (optional)'), placeholder: (0, _utils.translate)('Enter label'), property: 'mm_label' })) ), fieldType !== 'select' && _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter placeholder'), property: 'mm_placeholder' })) ) ) ) ) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Increments'), labelDark: true, description: (0, _utils.translate)('Choose what time increments you want to use ' + 'for the hour and minute timepickers.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( 'div', { className: 'sui-form-field-inline' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Hour'), property: 'increment_hour', 'data-width': '86' }), [].concat(_toConsumableArray(Array(hoursMax))).map(function (x, i) { return _react2.default.createElement( 'option', { value: i, key: i }, i ); }) ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Minute'), property: 'increment_minute', 'data-width': '86' }), [].concat(_toConsumableArray(Array(60))).map(function (x, i) { return _react2.default.createElement( 'option', { value: i, key: i }, i ); }) ) ) ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Limits'), labelDark: true, description: (0, _utils.translate)('Choose a time limit for the time picker field ' + 'to restrict the time selection between specific ' + 'hours.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'restrict_time', settings: this.props.state, 'default': 'none', simple: true }), _react2.default.createElement( _container2.default, _extends({ settings: this.props.state }, this.props, { value: 'specific', label: (0, _utils.translate)('Specific Hours'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Start Time') ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, placeholder: '1', property: 'restrict_start_hour' }), [].concat(_toConsumableArray(Array(hoursMax))).map(function (x, i) { return _react2.default.createElement( 'option', { value: i, key: i }, i ); }) ) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, placeholder: '0', property: 'restrict_start_minute' }), [].concat(_toConsumableArray(Array(60))).map(function (x, i) { return _react2.default.createElement( 'option', { value: i, key: i }, i ); }) ) ), timeType === 'twelve' && _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'restrict_start_ampm' }), _react2.default.createElement( 'option', { value: 'am' }, (0, _utils.translate)('AM') ), _react2.default.createElement( 'option', { value: 'pm' }, (0, _utils.translate)('PM') ) ) ) ), _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('End Time') ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, placeholder: '1', property: 'restrict_end_hour' }), [].concat(_toConsumableArray(Array(hoursMax))).map(function (x, i) { return _react2.default.createElement( 'option', { value: i, key: i }, i ); }) ) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, placeholder: '0', property: 'restrict_end_minute' }), [].concat(_toConsumableArray(Array(60))).map(function (x, i) { return _react2.default.createElement( 'option', { value: i, key: i }, i ); }) ) ), timeType === 'twelve' && _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'restrict_end_ampm' }), _react2.default.createElement( 'option', { value: 'am' }, (0, _utils.translate)('AM') ), _react2.default.createElement( 'option', { value: 'pm' }, (0, _utils.translate)('PM') ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Error Message'), property: 'restrict_message', description: (0, _utils.translate)('This error message will be used when time ' + 'entered is out of the set limits.') })) ) ) ), _react2.default.createElement( _empty2.default, { value: 'none' }, (0, _utils.translate)('None') ) ) ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Default Time'), labelDark: true, description: (0, _utils.translate)('Use this feature to specify a default selected time.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'default_time', settings: this.props.state, 'default': 'none', simple: true }), _react2.default.createElement( _container2.default, _extends({}, this.props, { label: (0, _utils.translate)('Default'), settings: this.props.state, value: 'default', boxClass: 'sui-tab-boxed' }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Hour'), placeholder: '1', property: 'default_time_hour' }), [].concat(_toConsumableArray(Array(hoursMax))).map(function (x, i) { return _react2.default.createElement( 'option', { value: i, key: i }, i ); }) ) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Minute'), placeholder: '0', property: 'default_time_minute' }), [].concat(_toConsumableArray(Array(60))).map(function (x, i) { return _react2.default.createElement( 'option', { value: i, key: i }, i ); }) ) ), timeType === 'twelve' && _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: '\xA0', property: 'default_time_ampm' }), _react2.default.createElement( 'option', { value: 'am' }, (0, _utils.translate)('AM') ), _react2.default.createElement( 'option', { value: 'pm' }, (0, _utils.translate)('PM') ) ) ) ), !isLimit && _react2.default.createElement( 'span', { className: 'sui-error-message' }, (0, _utils.translate)('Default time can\'t be outside the allowed time limit.') ) ), _react2.default.createElement( _empty2.default, { value: 'none' }, (0, _utils.translate)('None') ) ) ), _react2.default.createElement(_prefill2.default, _extends({}, this.props, { notice: prefillMessage })) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Time; }(_react.Component); exports.default = Time; /***/ }), /* 519 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _filetypes = __webpack_require__(520); var _filetypes2 = _interopRequireDefault(_filetypes); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Upload = function (_Component) { _inherits(Upload, _Component); function Upload(props) { _classCallCheck(this, Upload); return _possibleConstructorReturn(this, (Upload.__proto__ || Object.getPrototypeOf(Upload)).call(this, props)); } _createClass(Upload, [{ key: 'render', value: function render() { var type = this.props.type; var uploadLimit = !_.isUndefined(this.props.state['upload-limit']) ? this.props.state['upload-limit'] : 0; var fileSizeUnit = !_.isUndefined(this.props.state['filesize']) ? this.props.state['filesize'] : 'MB'; var maxUpload = 'KB' === fileSizeUnit ? parseInt(forminatorData.maxUpload) * 1000 : 'B' === fileSizeUnit ? parseInt(forminatorData.maxUpload) * 1000000 : parseInt(forminatorData.maxUpload); var fileType = !_.isUndefined(this.props.state['file-type']) ? this.props.state['file-type'] : 0; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, defaultValue: 'single', label: (0, _utils.translate)('Type'), property: 'file-type', clearOptions: 'true' }), _react2.default.createElement( 'span', { value: 'single' }, (0, _utils.translate)('Single') ), _react2.default.createElement( 'span', { value: 'multiple' }, (0, _utils.translate)('Multiple') ) ), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement(_filetypes2.default, this.props), 'multiple' === fileType && _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Limit number of files') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose the maximum number of files that can ' + 'be uploaded using this field.') ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { settings: this.props.state, property: 'file-limit', defaultValue: 'unlimited' }), _react2.default.createElement(_empty2.default, { value: 'unlimited', label: (0, _utils.translate)('Unlimited') }), _react2.default.createElement( _container2.default, { value: 'custom', label: (0, _utils.translate)('Custom'), boxClass: 'sui-tab-boxed' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'number', placeholder: '5', defaultValue: '5', property: 'file-limit-input', inputClass: 'sui-input-sm', label: (0, _utils.translate)('File upload limit'), settings: this.props.state })) ) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, fileType === 'multiple' ? (0, _utils.translate)('Filesize limit per file') : (0, _utils.translate)('Filesize limit') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)("We've detected your server will allow uploads " + 'up to %(maxUpload)sMB in size currently. You can ' + 'set a lower limit than this using the input below, ' + 'however if you want uploads of more than %(maxUpload)s' + 'MB you\'ll need to adjust this in your server\'s PHP.ini ' + 'settings.', { args: { maxUpload: forminatorData.maxUpload } }) ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Upload limit per file') ), _react2.default.createElement( 'div', { className: 'sui-form-field-inline' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, defaultValue: '8', property: 'upload-limit', fieldClass: 'sui-input-sm' + ( // eslint-disable-next-line max-len parseInt(uploadLimit) > maxUpload ? ' sui-form-field-error' : '') })), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'filesize', settings: this.props.state, defaultValue: 'MB', elementClass: 'sui-select-inline', simple: true }), _react2.default.createElement( 'option', { value: 'MB' }, (0, _utils.translate)('MB') ), _react2.default.createElement( 'option', { value: 'KB' }, (0, _utils.translate)('KB') ), _react2.default.createElement( 'option', { value: 'B' }, (0, _utils.translate)('B') ) ) ), _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice' + ( // eslint-disable-next-line max-len '' + (parseInt(uploadLimit) > maxUpload && ' sui-active')), style: { display: parseInt(uploadLimit) > maxUpload ? 'block' : 'none' }, 'aria-live': 'assertive' }, // eslint-disable-next-line max-len parseInt(uploadLimit) > maxUpload && _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('The file size you have entered exceeds what ' + 'your current hosting settings are capped to. ' + 'You need to increase your max filesize limit ' + 'at the server level first.') ) ) ) ) ) ), 'multiple' === fileType && _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Upload method') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose whether you want to use AJAX to upload individual ' + 'files as they are selected or use the traditional method ' + 'of uploading all files together on form submission. We ' + 'recommend using the AJAX method to avoid server timeouts.') ), _react2.default.createElement( 'div', { className: 'sui-form-field-inline' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'upload-method', defaultValue: 'ajax' }), _react2.default.createElement( 'div', { value: 'ajax' }, (0, _utils.translate)('AJAX') ), _react2.default.createElement( 'div', { value: 'submission' }, (0, _utils.translate)('On form submission') ) ) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Show files in media library') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose whether you want to show the files uploaded ' + 'by your visitors using this field in your media library.') ), _react2.default.createElement( 'div', { className: 'sui-form-field-inline' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'use_library', defaultValue: '' }), _react2.default.createElement( 'div', { value: 'true' }, (0, _utils.translate)('Enable') ), _react2.default.createElement( 'div', { value: '' }, (0, _utils.translate)('Disable') ) ) ) ) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Upload; }(_react.Component); exports.default = Upload; /***/ }), /* 520 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _checkbox = __webpack_require__(41); var _checkbox2 = _interopRequireDefault(_checkbox); var _checkboxes = __webpack_require__(521); var _checkboxes2 = _interopRequireDefault(_checkboxes); var _textarea = __webpack_require__(377); var _textarea2 = _interopRequireDefault(_textarea); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Filetypes = function (_Component) { _inherits(Filetypes, _Component); function Filetypes(props) { _classCallCheck(this, Filetypes); return _possibleConstructorReturn(this, (Filetypes.__proto__ || Object.getPrototypeOf(Filetypes)).call(this, props)); } _createClass(Filetypes, [{ key: 'toggleValue', value: function toggleValue(value) { this.props.updateProperty('custom-files', value); } }, { key: 'render', value: function render() { var customFiles = _.isUndefined(this.props.state['custom-files']) ? false : this.props.state['custom-files']; var AudioCheckboxes = []; var DocumentCheckboxes = []; var ImageCheckboxes = []; var VideoCheckboxes = []; var ArchiveCheckboxes = []; var TextCheckboxes = []; var SpreadsheetCheckboxes = []; var InteractiveCheckboxes = []; if (!_.isUndefined(forminatorData.fileExts.audio)) { forminatorData.fileExts.audio.map(function (ext) { AudioCheckboxes.push({ value: ext, label: '.' + ext, itemClass: 'sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre' }); }); } if (!_.isUndefined(forminatorData.fileExts.document)) { forminatorData.fileExts.document.map(function (ext) { DocumentCheckboxes.push({ value: ext, label: '.' + ext, itemClass: 'sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre' }); }); } if (!_.isUndefined(forminatorData.fileExts.image)) { forminatorData.fileExts.image.map(function (ext) { ImageCheckboxes.push({ value: ext, label: '.' + ext, itemClass: 'sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre' }); }); } if (!_.isUndefined(forminatorData.fileExts.video)) { forminatorData.fileExts.video.map(function (ext) { VideoCheckboxes.push({ value: ext, label: '.' + ext, itemClass: 'sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre' }); }); } if (!_.isUndefined(forminatorData.fileExts.archive)) { forminatorData.fileExts.archive.map(function (ext) { ArchiveCheckboxes.push({ value: ext, label: '.' + ext, itemClass: 'sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre' }); }); } if (!_.isUndefined(forminatorData.fileExts.text)) { forminatorData.fileExts.text.map(function (ext) { TextCheckboxes.push({ value: ext, label: '.' + ext, itemClass: 'sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre' }); }); } if (!_.isUndefined(forminatorData.fileExts.spreadsheet)) { forminatorData.fileExts.spreadsheet.map(function (ext) { SpreadsheetCheckboxes.push({ value: ext, label: '.' + ext, itemClass: 'sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre' }); }); } if (!_.isUndefined(forminatorData.fileExts.interactive)) { forminatorData.fileExts.interactive.map(function (ext) { InteractiveCheckboxes.push({ value: ext, label: '.' + ext, itemClass: 'sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre' }); }); } return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Allowed filetypes') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('We use WordPress\' {{a}}default allowed mime types{{/a}} to determine ' + 'which file types can be uploaded. If you want to allow or ' + 'restrict specific file types from being upload, you can do ' + 'so by choosing the Specific filetypes option below.', { components: { a: _react2.default.createElement('a', { href: 'https://developer.wordpress.org/reference/functions/get_allowed_mime_types', target: '_blank' }) } }) ), _react2.default.createElement( 'div', { className: 'sui-tabs sui-side-tabs', style: { marginTop: '10px' } }, _react2.default.createElement( 'div', { className: 'sui-tabs-menu' }, _react2.default.createElement( 'div', { className: 'sui-tab-item ' + (customFiles ? '' : 'active'), onClick: this.toggleValue.bind(this, false) }, (0, _utils.translate)('Default') ), _react2.default.createElement( 'div', { className: 'sui-tab-item ' + (customFiles ? 'active' : ''), onClick: this.toggleValue.bind(this, true) }, (0, _utils.translate)('Specific filetypes') ) ), _react2.default.createElement( 'div', { className: 'sui-tabs-content' }, _react2.default.createElement( 'div', { className: 'sui-tab-boxed ' + (customFiles ? 'active' : '') }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_checkboxes2.default, _extends({}, this.props, { label: (0, _utils.translate)('Images'), settings: this.props.state, fileType: 'all-image', property: 'filetypes', checkboxes: ImageCheckboxes })) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_checkboxes2.default, _extends({}, this.props, { label: (0, _utils.translate)('Documents'), settings: this.props.state, fileType: 'all-document', property: 'filetypes', checkboxes: DocumentCheckboxes })) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_checkboxes2.default, _extends({}, this.props, { label: (0, _utils.translate)('Audio'), settings: this.props.state, fileType: 'all-audio', property: 'filetypes', checkboxes: AudioCheckboxes })) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_checkboxes2.default, _extends({}, this.props, { label: (0, _utils.translate)('Video'), settings: this.props.state, fileType: 'all-video', property: 'filetypes', checkboxes: VideoCheckboxes })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_checkboxes2.default, _extends({}, this.props, { label: (0, _utils.translate)('Archive'), settings: this.props.state, fileType: 'all-archive', property: 'filetypes', checkboxes: ArchiveCheckboxes })) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_checkboxes2.default, _extends({}, this.props, { label: (0, _utils.translate)('Text'), settings: this.props.state, fileType: 'all-text', property: 'filetypes', checkboxes: TextCheckboxes })) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_checkboxes2.default, _extends({}, this.props, { label: (0, _utils.translate)('Spreadsheet'), settings: this.props.state, fileType: 'all-spreadsheet', property: 'filetypes', checkboxes: SpreadsheetCheckboxes })) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_checkboxes2.default, _extends({}, this.props, { label: (0, _utils.translate)('Interactive'), settings: this.props.state, fileType: 'all-interactive', property: 'filetypes', checkboxes: InteractiveCheckboxes })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_textarea2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Additional filetypes'), placeholder: (0, _utils.translate)('E.g. .ai, .sketch, .studio'), property: 'additional-type', description: (0, _utils.translate)('Add a comma-separated list of filetypes you ' + 'want to allow in addition to the ones enabled above.') })), _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Note that if you\'re having trouble uploading ' + 'one of the enabled filetypes, that filetype ' + 'may be restricted by your hosting provider.') ) ) ) ) ) ) ) ) ), _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-warning', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-warning-alert', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('For security reasons, the following file ' + 'types are disabled by default: .htm, ' + '.html, .shtml, .phtml, .jse, .jar, ' + '.xml, .css, .asp, .aspx, .jsp, .sql, .hta, ' + '.dll, .bat, .com, .sh, .bash, .py, .pl, .js, ' + '.php, .svg, .swf, .dfxp and .exe. The above file ' + 'types could potentially allow malicious ' + 'files to be uploaded, which could be used ' + 'to gain access to your site.') ) ) ) ) ) ); } }]); return Filetypes; }(_react.Component); exports.default = Filetypes; /***/ }), /* 521 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Checkboxes = function (_Component) { _inherits(Checkboxes, _Component); function Checkboxes(props) { _classCallCheck(this, Checkboxes); var _this = _possibleConstructorReturn(this, (Checkboxes.__proto__ || Object.getPrototypeOf(Checkboxes)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); _this.updateCheckboxItem = _this.updateCheckboxItem.bind(_this); _this.onSelectAllCheckboxes = _this.onSelectAllCheckboxes.bind(_this); return _this; } _createClass(Checkboxes, [{ key: 'updateValue', value: function updateValue(value) { // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } } }, { key: 'onSelectAllCheckboxes', value: function onSelectAllCheckboxes(property, value, checkboxes) { var checkedValues = _.isUndefined(this.props.settings[this.props.property]) || !_.isArray(this.props.settings[this.props.property]) ? [] : this.props.settings[this.props.property]; checkboxes.map(function (item) { if (value) { checkedValues = checkedValues.concat(property); if (checkedValues.indexOf(item.value) < 0) { checkedValues = checkedValues.concat(item.value); } } else { checkedValues = checkedValues.filter(function (i) { return i !== property; }); if (checkedValues.indexOf(item.value) >= 0) { checkedValues = checkedValues.filter(function (v) { return v !== item.value; }); } } }); this.updateValue(checkedValues); } }, { key: 'updateCheckboxItem', value: function updateCheckboxItem(item, value, checkboxes) { var _this2 = this; var checkedValues = _.isUndefined(this.props.settings[this.props.property]) || !_.isArray(this.props.settings[this.props.property]) ? [] : this.props.settings[this.props.property]; // checked if (value) { if (checkedValues.indexOf(item) < 0) { checkedValues = checkedValues.concat(item); } } else if (!value && checkedValues.indexOf(item) >= 0) { checkedValues = checkedValues.filter(function (v) { return v !== item; }); } if (!_.isUndefined(this.props.fileType)) { var intersection = checkboxes.filter(function (x) { return checkedValues.includes(x.value); }); if (intersection.length === checkboxes.length) { checkedValues = checkedValues.concat(this.props.fileType); } else { checkedValues = checkedValues.filter(function (i) { return i !== _this2.props.fileType; }); } } this.updateValue(checkedValues); } }, { key: 'render', value: function render() { var _this3 = this; var checkedValues = _.isUndefined(this.props.settings[this.props.property]) || !_.isArray(this.props.settings[this.props.property]) ? [] : this.props.settings[this.props.property]; var checkboxes = this.props.checkboxes; return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property, className: 'sui-label' }, this.props.label ), _react2.default.createElement( 'label', { htmlFor: 'forminator-field-' + this.props.property + '-' + this.props.fileType, className: 'sui-checkbox sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre' }, _react2.default.createElement('input', { type: 'checkbox', id: 'forminator-field-' + this.props.property + '-' + this.props.fileType, value: this.props.fileType, checked: checkedValues.indexOf(this.props.fileType) >= 0 ? 'checked' : '', onChange: function onChange(e) { _this3.onSelectAllCheckboxes(_this3.props.fileType, e.target.checked, checkboxes); } }), _react2.default.createElement('span', { 'aria-hidden': 'true' }), _react2.default.createElement( 'span', null, (0, _utils.translate)('All') ) ), checkboxes.map(function (item, i) { return _react2.default.createElement( 'label', { key: i, htmlFor: 'forminator-field-' + _this3.props.property + '-' + item.value, className: 'sui-checkbox ' + item.itemClass }, _react2.default.createElement('input', { type: 'checkbox', id: 'forminator-field-' + _this3.props.property + '-' + item.value, value: item.value, checked: checkedValues.indexOf(item.value) >= 0 ? 'checked' : '', onChange: function onChange(e) { _this3.updateCheckboxItem(item.value, e.target.checked, checkboxes); } }), _react2.default.createElement('span', { 'aria-hidden': 'true' }), _react2.default.createElement( 'span', null, (0, _escapeHtml.escapeHTML)(item.label) ) ); }) ); } }]); return Checkboxes; }(_react.Component); exports.default = Checkboxes; /***/ }), /* 522 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _validation = __webpack_require__(226); var _validation2 = _interopRequireDefault(_validation); var _prefill = __webpack_require__(76); var _prefill2 = _interopRequireDefault(_prefill); var _border = __webpack_require__(170); var _border2 = _interopRequireDefault(_border); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Website = function (_Component) { _inherits(Website, _Component); function Website(props) { _classCallCheck(this, Website); return _possibleConstructorReturn(this, (Website.__proto__ || Object.getPrototypeOf(Website)).call(this, props)); } _createClass(Website, [{ key: 'render', value: function render() { var type = this.props.type; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter Placeholder'), property: 'placeholder' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Default Value (optional)'), placeholder: (0, _utils.translate)('Enter default value'), property: 'default' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ) ); case 'settings': return _react2.default.createElement( 'div', null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement(_validation2.default, this.props), _react2.default.createElement(_prefill2.default, this.props) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Website; }(_react.Component); exports.default = Website; /***/ }), /* 523 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _multiValue = __webpack_require__(228); var _multiValue2 = _interopRequireDefault(_multiValue); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _toggle = __webpack_require__(188); var _toggle2 = _interopRequireDefault(_toggle); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _radioCheckboxVisibility = __webpack_require__(375); var _radioCheckboxVisibility2 = _interopRequireDefault(_radioCheckboxVisibility); var _optionsOrder = __webpack_require__(229); var _optionsOrder2 = _interopRequireDefault(_optionsOrder); var _prefill = __webpack_require__(76); var _prefill2 = _interopRequireDefault(_prefill); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Radio = function (_Component) { _inherits(Radio, _Component); function Radio(props) { _classCallCheck(this, Radio); return _possibleConstructorReturn(this, (Radio.__proto__ || Object.getPrototypeOf(Radio)).call(this, props)); } _createClass(Radio, [{ key: 'render', value: function render() { var type = this.props.type; var imageEnabled = _.isUndefined(this.props.state.enable_images) ? false : this.props.state.enable_images; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ), _react2.default.createElement(_multiValue2.default, _extends({}, this.props, { isRadio: 'true' })) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Layout') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('By default, we stack the options vertically. However, ' + 'you can change the options layout below.') ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'layout', defaultValue: 'vertical', noWrapper: true }), _react2.default.createElement( 'div', { value: 'vertical' }, (0, _utils.translate)('Vertical') ), _react2.default.createElement( 'div', { value: 'horizontal' }, (0, _utils.translate)('Horizontal') ) ) ), imageEnabled && _react2.default.createElement(_radioCheckboxVisibility2.default, this.props), _react2.default.createElement(_optionsOrder2.default, this.props), _react2.default.createElement(_prefill2.default, this.props) ); case 'calculations': return _react2.default.createElement(_toggle2.default, _extends({}, this.props, { description: (0, _utils.translate)('Choose whether to allow this field to be used ' + 'in calculations or not.') })); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Radio; }(_react.Component); exports.default = Radio; /***/ }), /* 524 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _calculation = __webpack_require__(525); var _calculation2 = _interopRequireDefault(_calculation); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _checkbox = __webpack_require__(41); var _checkbox2 = _interopRequireDefault(_checkbox); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Calculation = function (_Component) { _inherits(Calculation, _Component); function Calculation(props) { _classCallCheck(this, Calculation); var _this = _possibleConstructorReturn(this, (Calculation.__proto__ || Object.getPrototypeOf(Calculation)).call(this, props)); _this.updateHidden = _this.updateHidden.bind(_this); return _this; } _createClass(Calculation, [{ key: 'updateHidden', value: function updateHidden(slug, value) { this.props.updateProperty('hidden', value); this.removeConditions(); } }, { key: 'removeConditions', value: function removeConditions() { if ((0, _utils.isTrue)(this.props.state.hidden) && !_.isEmpty(this.props.state.conditions)) { this.props.state.conditions = {}; this.props.updateProperty('conditions', this.props.state.conditions); } } }, { key: 'render', value: function render() { var type = this.props.type; var _props$state = this.props.state, hidden = _props$state.hidden, conditions = _props$state.conditions; // eslint-disable-next-line dot-notation var separators = !_.isUndefined(this.props.state['separators']) // eslint-disable-next-line dot-notation ? this.props.state['separators'] : ''; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Field Type') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('By default, the calculation field is read-only. You can ' + 'also hide the field if you don\'t want to show the ' + 'calculated result on the form.') ), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'read-only', settings: this.props.state, label: (0, _utils.translate)('Read-only'), disabled: 'true', defaultValue: 'true', itemClass: 'sui-checkbox-sm sui-checkbox-stacked' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'hidden', settings: this.props.state, label: (0, _utils.translate)('Hidden'), itemClass: 'sui-checkbox-sm sui-checkbox-stacked', updateProperty: this.updateHidden.bind(this) })), !hidden && !_.isEmpty(conditions) && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Visibility rules have been added for this field. ' + 'Enabling the Hidden option will remove the existing visibility rules.') ) ) ) ) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Formatting') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '20px' } }, (0, _utils.translate)('Choose how do you want to format the value ' + 'of this field.') ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({ type: 'text' }, this.props, { settings: this.props.state, placeholder: (0, _utils.translate)('E.g., $'), property: 'prefix', label: (0, _utils.translate)('Prefix') })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({ type: 'text' }, this.props, { settings: this.props.state, placeholder: (0, _utils.translate)('E.g., Kg'), property: 'suffix', label: (0, _utils.translate)('Suffix') })) ) ), 'custom' === separators && _react2.default.createElement( _react.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( 'div', { className: 'sui-form-field sui-input-md', style: { marginBottom: '5px' } }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Separators') ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'separators', settings: this.props.state, defaultValue: 'blank', simple: true }), _react2.default.createElement( 'option', { value: 'blank' }, (0, _utils.translate)('1234567.89') ), _react2.default.createElement( 'option', { value: 'comma_dot' }, (0, _utils.translate)('1,234,567.89') ), _react2.default.createElement( 'option', { value: 'dot_comma' }, (0, _utils.translate)('1.234.567,89') ), _react2.default.createElement( 'option', { value: 'space_comma' }, (0, _utils.translate)('1 234 567,89') ) ) ), _react2.default.createElement( 'div', { className: 'sui-border-frame' }, _react2.default.createElement( 'div', { className: 'sui-form-field-inline' }, _react2.default.createElement(_input2.default, _extends({ type: 'text' }, this.props, { settings: this.props.state, placeholder: (0, _utils.translate)('E.g. $'), property: 'thousand-separators', defaultValue: ',', label: (0, _utils.translate)('Thousand Separator') })), _react2.default.createElement(_input2.default, _extends({ type: 'text' }, this.props, { settings: this.props.state, placeholder: (0, _utils.translate)('E.g. $'), property: 'decimal-separators', defaultValue: '.', label: (0, _utils.translate)('Decimal Separator') })) ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'precision', settings: this.props.state, defaultValue: '2', label: (0, _utils.translate)('Round To'), fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: '0' }, (0, _utils.translate)('0 decimals') ), _react2.default.createElement( 'option', { value: '1' }, (0, _utils.translate)('1 decimals') ), _react2.default.createElement( 'option', { value: '2' }, (0, _utils.translate)('2 decimals') ), _react2.default.createElement( 'option', { value: '3' }, (0, _utils.translate)('3 decimals') ), _react2.default.createElement( 'option', { value: '4' }, (0, _utils.translate)('4 decimals') ) ) ) ) ), 'custom' !== separators && _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'separators', settings: this.props.state, defaultValue: 'blank', label: (0, _utils.translate)('Separators') }), _react2.default.createElement( 'option', { value: 'blank' }, (0, _utils.translate)('1234567.89') ), _react2.default.createElement( 'option', { value: 'comma_dot' }, (0, _utils.translate)('1,234,567.89') ), _react2.default.createElement( 'option', { value: 'dot_comma' }, (0, _utils.translate)('1.234.567,89') ), _react2.default.createElement( 'option', { value: 'space_comma' }, (0, _utils.translate)('1 234 567,89') ) ) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'precision', settings: this.props.state, defaultValue: '2', label: (0, _utils.translate)('Round To') }), _react2.default.createElement( 'option', { value: '0' }, (0, _utils.translate)('0 decimals') ), _react2.default.createElement( 'option', { value: '1' }, (0, _utils.translate)('1 decimals') ), _react2.default.createElement( 'option', { value: '2' }, (0, _utils.translate)('2 decimals') ), _react2.default.createElement( 'option', { value: '3' }, (0, _utils.translate)('3 decimals') ), _react2.default.createElement( 'option', { value: '4' }, (0, _utils.translate)('4 decimals') ) ) ) ) ) ); case 'calculations': return _react2.default.createElement(_calculation2.default, _extends({ property: 'formula', settings: this.props.state }, this.props)); case 'visibility': return _react2.default.createElement( _react2.default.Fragment, null, hidden && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)("You can't set visibility conditions for a hidden field. " + 'Uncheck the Hidden option in the settings tab and come back ' + 'here to define visibility rules.') ) ) ) ), !hidden && _react2.default.createElement(_visibility2.default, this.props) ); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Calculation; }(_react.Component); exports.default = Calculation; /***/ }), /* 525 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _hiddenBehavior = __webpack_require__(227); var _hiddenBehavior2 = _interopRequireDefault(_hiddenBehavior); var _escapeHtml = __webpack_require__(17); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Calculation = function (_Component) { _inherits(Calculation, _Component); function Calculation(props) { _classCallCheck(this, Calculation); var _this = _possibleConstructorReturn(this, (Calculation.__proto__ || Object.getPrototypeOf(Calculation)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); _this.insertChar = _this.insertChar.bind(_this); _this.deleteChar = _this.deleteChar.bind(_this); _this.insert = _this.insert.bind(_this); return _this; } _createClass(Calculation, [{ key: 'componentDidMount', value: function componentDidMount() { this.$el = jQuery(this.el); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.$el.unbind().removeData(); } }, { key: 'updateValue', value: function updateValue(value) { // Validate formula to update isValid this.validateFormula(value); // Check if we're on field settings if (typeof this.props.updateProperty === 'function') { // Update field state this.props.updateProperty(this.props.property, value); } else { // Update store this.props.actions.settingsActions.updateSetting(this.props.property, value); } } }, { key: 'insert', value: function insert(e, char) { e.preventDefault(); var value = _.isUndefined(this.props.settings[this.props.property]) ? '' : this.props.settings[this.props.property]; var $textarea = this.$el.find('textarea'); var index = $textarea.prop('selectionStart'); var newValue = value.slice(0, index) + char + value.slice(index); this.updateValue(newValue); $textarea.val(newValue); $textarea.focus(); $textarea.prop('selectionStart', index + char.length); $textarea.prop('selectionEnd', index + char.length); } }, { key: 'deleteChar', value: function deleteChar(event) { if (event.which === 8) { var $textarea = this.$el.find('textarea'); var index = $textarea.prop('selectionStart'); var val = $textarea.val(); var charIndex = index - 1; var charToDelete = val.substr(charIndex, 1); if (charToDelete === '}' && charIndex !== -1) { event.preventDefault(); var start = index; var end = index; while (val.substr(start - 1, 1) !== '{' && start - 1 >= 0) { start -= 1; } var newValue = val.slice(0, start - 1) + val.slice(end, val.length); this.updateValue(newValue); $textarea.val(newValue); $textarea.prop('selectionStart', start - 1); $textarea.prop('selectionEnd', start - 1); } } } }, { key: 'insertChar', value: function insertChar(event) { var allowed = [32, 34, 37, 40, 41, 42, 43, 44, 45, 47, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 94]; var isAllowed = _.contains(allowed, event.charCode); if (!isAllowed) { event.preventDefault(); } } }, { key: 'getDisabledFields', value: function getDisabledFields() { var allowed = ['number', 'slider', 'radio', 'select', 'checkbox', 'calculation', 'currency']; var disabled = []; // Push disabled fields _.each(forminatorData.fields, function (field) { if (!_.contains(allowed, field.type)) { disabled.push(field.type); } }); return disabled; } }, { key: 'getFields', value: function getFields() { var disabledFields = this.getDisabledFields(); return (0, _utils.getFields)(this.props.wrappers, disabledFields); } /** * Check is calculation for the field is enabled. * * @param {string} id Element ID. * @return {boolean} Enabled/Disabled */ }, { key: 'isCalculationEnabled', value: function isCalculationEnabled(id) { var enabled = true; _.each(this.props.wrappers, function (wrapper) { _.each(wrapper.fields, function (field) { if (field.element_id === id && (field.calculations === 'false' || field.calculations === false)) { enabled = false; } }); }); return enabled; } }, { key: 'maybeReplaceFields', value: function maybeReplaceFields(formula) { var useLabel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var matches = void 0; var fieldTypes = _.map(forminatorData.fields, function (field) { return field.type; }); var joinedFieldTypes = fieldTypes.join('|'); var incrementFieldPattern = '(' + joinedFieldTypes + ')-\\d+'; var pattern = new RegExp('\\{(' + incrementFieldPattern + ')(\\-[A-Za-z-_]+)?(\\-[0-9\\*]+)?\\}', 'g'); var parsedFormula = formula; while (matches = pattern.exec(formula)) { var match = matches[0]; if (_.isUndefined(match)) { continue; } var hasCalculation = this.isCalculationEnabled(matches[1]); if (!hasCalculation) { return { error: (0, _utils.translate)('%s is disabled for calculations. Please insert a ' + 'valid field from the merged tags option.', { args: [match] }), result: false }; } var exist = (0, _utils.fieldExist)(matches[1], this.props.wrappers); if (exist) { if (useLabel) { var label = (0, _utils.getFieldLabel)(matches[1], this.props.wrappers); var suffix = matches[3] || ''; parsedFormula = parsedFormula.replace(match, '<span className="forminator-preview-label">' + (0, _escapeHtml.escapeHTML)(label) + suffix + '</span>'); } else { parsedFormula = parsedFormula.replace(match, '(1)'); } } else { return { error: (0, _utils.translate)('%s does not exist in your form. Please insert a ' + 'valid field from the merged tags option.', { args: [match] }), result: false }; } } return parsedFormula; } }, { key: 'previewFormula', value: function previewFormula(value) { return this.maybeReplaceFields(value, true); } }, { key: 'validateFormula', value: function validateFormula(value) { var formula = this.maybeReplaceFields(value, false); if (!_.isUndefined(formula.error)) { this.props.modal.isValid = false; this.props.modal.validationError = (0, _utils.translate)('Calculation formula is required!'); return formula; } var calculation = window.forminatorCalculator(formula); var result = {}; var calculated = void 0; try { calculated = calculation.calculate(); if (!isFinite(calculated)) { result.error = (0, _utils.translate)('Infinity calculation result.'); result.result = false; this.props.modal.isValid = false; this.props.modal.validationError = result.error; return result; } result.result = Number(calculated.toFixed(2)); this.props.modal.isValid = true; } catch (e) { result.error = e; result.result = false; this.props.modal.isValid = false; this.props.modal.validationError = result.error; } return result; } }, { key: 'render', value: function render() { var _this2 = this; var fields = this.getFields(), wraps = _.indexBy(this.props.wrappers, 'wrapper_id'), wrapper_id = (this.props.modal.wrapper ? this.props.modal.wrapper.wrapper_id : null) || this.props.state.wrapper_id, currentGroup = wraps[wrapper_id].parent_group; var calcFields = _.map(fields, function (field, index) { if (field.element_id === _this2.props.state.element_id && 'slider' !== field.field_type) { return; } if (field.hasCalcs || field.field_type === 'calculation') { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option', key: index }, _react2.default.createElement( 'button', { onClick: function onClick(event) { return _this2.insert(event, '{' + field.element_id + '}'); } }, (0, _escapeHtml.escapeHTML)(field.label) ) ), field.parent_group && !currentGroup && _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option', key: index }, _react2.default.createElement( 'button', { onClick: function onClick(event) { return _this2.insert(event, '{' + field.element_id + '-*}'); } }, field.label + (0, _utils.translate)(' (all)') ) ) ); } }); var functions = ['abs', 'avg', 'ceil', 'floor', 'max', 'min', 'round'], calcFunctions = _.map(functions, function (func) { return _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option', key: func }, _react2.default.createElement( 'button', { onClick: function onClick(event) { return _this2.insert(event, '' + func + '()'); } }, func + '()' ) ); }); var value = _.isUndefined(this.props.settings[this.props.property]) ? '' : this.props.settings[this.props.property]; var result = this.validateFormula(value); var formulaPreview = this.previewFormula(value); var errorClass = result.result === false ? ' fui-error' : ''; return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Calculation Formula') ), _react2.default.createElement( 'div', { className: 'fui-calculations' + errorClass, ref: function ref(el) { return _this2.el = el; } }, _react2.default.createElement( 'div', { className: 'fui-calcs-bar' }, _react2.default.createElement( 'div', { className: 'sui-dropdown sui-dropdown-right' }, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-button-blue sui-tooltip sui-tooltip-top-left sui-dropdown-anchor', 'data-tooltip': (0, _utils.translate)('Add Form Fields') }, _react2.default.createElement('i', { className: 'sui-icon-layout', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Open list of fields') ) ), _react2.default.createElement( 'ul', null, calcFields ) ), _react2.default.createElement( 'button', { className: 'sui-button-icon', onClick: function onClick(event) { return _this2.insert(event, '+'); } }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Sum') ) ), _react2.default.createElement( 'button', { className: 'sui-button-icon', onClick: function onClick(event) { return _this2.insert(event, '-'); } }, _react2.default.createElement( 'b', { 'aria-hidden': 'true' }, '-' ), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Minus') ) ), _react2.default.createElement( 'button', { className: 'sui-button-icon', onClick: function onClick(event) { return _this2.insert(event, '*'); } }, _react2.default.createElement( 'b', { 'aria-hidden': 'true' }, '*' ), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Multiply') ) ), _react2.default.createElement( 'button', { className: 'sui-button-icon', onClick: function onClick(event) { return _this2.insert(event, '/'); } }, _react2.default.createElement( 'b', { 'aria-hidden': 'true' }, '/' ), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Divide') ) ), _react2.default.createElement( 'button', { className: 'sui-button-icon', onClick: function onClick(event) { return _this2.insert(event, '^'); } }, _react2.default.createElement( 'b', { 'aria-hidden': 'true' }, '^' ), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Exponentiate') ) ), _react2.default.createElement( 'button', { className: 'sui-button-icon', onClick: function onClick(event) { return _this2.insert(event, '%'); } }, _react2.default.createElement( 'b', { 'aria-hidden': 'true' }, '%' ), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Modulus') ) ), _react2.default.createElement( 'button', { className: 'sui-button-icon', onClick: function onClick(event) { return _this2.insert(event, '('); } }, _react2.default.createElement( 'b', { 'aria-hidden': 'true' }, '(' ), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Open parenthesis') ) ), _react2.default.createElement( 'button', { className: 'sui-button-icon', onClick: function onClick(event) { return _this2.insert(event, ')'); } }, _react2.default.createElement( 'b', { 'aria-hidden': 'true' }, ')' ), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Close parenthesis') ) ), _react2.default.createElement( 'button', { className: 'sui-button-icon', onClick: function onClick(event) { return _this2.insert(event, ','); } }, _react2.default.createElement( 'b', { 'aria-hidden': 'true' }, ',' ), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Comma') ) ), _react2.default.createElement( 'button', { className: 'sui-button-icon', onClick: function onClick(event) { return _this2.insert(event, 'PI'); } }, _react2.default.createElement( 'b', { 'aria-hidden': 'true' }, 'PI' ), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('PI constant') ) ), _react2.default.createElement( 'div', { className: 'sui-dropdown sui-dropdown-right' }, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-tooltip sui-tooltip-top-left sui-dropdown-anchor', 'data-tooltip': (0, _utils.translate)('Add Function') }, _react2.default.createElement('i', { className: 'sui-icon-more', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Open function list') ) ), _react2.default.createElement( 'ul', null, calcFunctions ) ) ), _react2.default.createElement( 'div', { className: 'fui-calcs-editor' }, _react2.default.createElement('textarea', { autoFocus: true, onKeyPress: function onKeyPress(event) { return _this2.insertChar(event); }, onKeyDown: function onKeyDown(event) { return _this2.deleteChar(event); }, defaultValue: value, onChange: function onChange(e) { _this2.updateValue(e.target.value); } }) ) ), result.result === false && _react2.default.createElement( 'span', { className: 'sui-error-message' }, result.error ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('You can preview your form and check if the formula ' + 'is generating expected results.') ) ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Formula Preview') ), _react2.default.createElement('div', { className: 'fui-calculations-preview', dangerouslySetInnerHTML: { __html: formulaPreview } }) ), _react2.default.createElement(_hiddenBehavior2.default, this.props) ); } }]); return Calculation; }(_react.Component); exports.default = Calculation; /***/ }), /* 526 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _suiSelect3 = __webpack_require__(16); var _suiSelect4 = _interopRequireDefault(_suiSelect3); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _metadataValue = __webpack_require__(527); var _metadataValue2 = _interopRequireDefault(_metadataValue); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _suiVariables = __webpack_require__(50); var _suiVariables2 = _interopRequireDefault(_suiVariables); var _paymentPlans = __webpack_require__(529); var _paymentPlans2 = _interopRequireDefault(_paymentPlans); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Stripe = function (_Component) { _inherits(Stripe, _Component); function Stripe(props) { _classCallCheck(this, Stripe); var _this = _possibleConstructorReturn(this, (Stripe.__proto__ || Object.getPrototypeOf(Stripe)).call(this, props)); _this.updateProperty = _this.updateProperty.bind(_this); return _this; } // Make it possible to update state from child components _createClass(Stripe, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.props.state[slug] = value; } }, { key: 'getNameOptions', value: function getNameOptions() { var nameOptions = []; var nameFields = (0, _utils.getFields)(this.props.wrappers, [ // disable these fields 'page-break', 'postdata', 'upload', 'captcha', 'date', 'time', 'consent', 'gdprcheckbox']); nameFields.map(function (field) { nameOptions.push({ value: '{' + field.element_id + '}', label: field.label }); }); return nameOptions; } }, { key: 'getDisabledFields', value: function getDisabledFields() { var allowed = ['calculation', 'currency']; var disabled = []; // Push disabled fields _.each(forminatorData.fields, function (field) { if (!_.contains(allowed, field.type)) { disabled.push(field.type); } }); return disabled; } }, { key: 'requireErrorState', value: function requireErrorState() { var validation = { isValid: true, error: false, paymentKey: [] }; validation = (0, _utils.getPlanValidation)(validation, this.props.state.payments); return validation; } }, { key: 'getEmailFields', value: function getEmailFields() { var emails = []; var emailFields = (0, _utils.getFieldsByType)('email', this.props.wrappers); emailFields.map(function (field) { emails.push({ value: '{' + field.element_id + '}', label: field.field_label }); }); return emails; } }, { key: 'getFieldsByType', value: function getFieldsByType(type) { var fields = []; var fieldsByType = (0, _utils.getFieldsByType)(type, this.props.wrappers); fieldsByType.map(function (field) { var label = field.field_label; if (type === 'address') { label = field.element_id; } fields.push({ value: field.element_id, label: label }); }); return fields; } }, { key: 'getFields', value: function getFields() { var disabledFields = this.getDisabledFields(); return (0, _utils.getFields)(this.props.wrappers, disabledFields); } }, { key: 'getZipFields', value: function getZipFields() { return (0, _utils.getFields)(this.props.wrappers, ['calculation', 'currency', 'paypal', 'stripe', 'postdata', 'pagination', 'upload', 'time', 'section', 'captcha', 'hidden']); } }, { key: 'conditionNotes', value: function conditionNotes() { var valid = true, validPayment = []; if (!_.isUndefined(this.props.state.payments) && !_.isEmpty(this.props.state.payments)) { _.each(this.props.state.payments, function (payment) { if (!_.isEmpty(payment.conditions)) { validPayment.push(payment); } }); } if (this.props.state.payments.length <= validPayment.length) { valid = false; } return valid; } }, { key: 'render', value: function render() { var type = this.props.type; var zipFields = this.getZipFields(); var errorState = this.requireErrorState(); var notes = this.conditionNotes(); var canManageSettings = (0, _utils.isTrue)(forminatorData.userPermissions['manage_forminator_settings']) || (0, _utils.isTrue)(forminatorData.userPermissions['manage_options']); switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), defaulValue: (0, _utils.translate)('Credit / Debit Card'), property: 'field_label' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'language', label: (0, _utils.translate)('Language'), description: (0, _utils.translate)('Choose your preferred language for the Stripe ' + 'field. This will affect the placeholders language, ' + 'and the card validation errors returned by the Stripe.') }), _react2.default.createElement( 'option', { value: 'auto' }, (0, _utils.translate)('Auto') ), _react2.default.createElement( 'option', { value: 'en' }, (0, _utils.translate)('English (en)') ), _react2.default.createElement( 'option', { value: 'zh' }, (0, _utils.translate)('Simplified Chinese (zh)') ), _react2.default.createElement( 'option', { value: 'da' }, (0, _utils.translate)('Danish (da)') ), _react2.default.createElement( 'option', { value: 'nl' }, (0, _utils.translate)('Dutch (nl)') ), _react2.default.createElement( 'option', { value: 'fi' }, (0, _utils.translate)('Finnish (fi)') ), _react2.default.createElement( 'option', { value: 'fr' }, (0, _utils.translate)('French (fr)') ), _react2.default.createElement( 'option', { value: 'de' }, (0, _utils.translate)('German (de)') ), _react2.default.createElement( 'option', { value: 'it' }, (0, _utils.translate)('Italian (it)') ), _react2.default.createElement( 'option', { value: 'ja' }, (0, _utils.translate)('Japanese (ja)') ), _react2.default.createElement( 'option', { value: 'no' }, (0, _utils.translate)('Norwegian (no)') ), _react2.default.createElement( 'option', { value: 'es' }, (0, _utils.translate)('Spanish (es)') ), _react2.default.createElement( 'option', { value: 'sv' }, (0, _utils.translate)('Swedish (sv)') ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'card_icon', defaultValue: 'true', label: (0, _utils.translate)('Card icon'), description: (0, _utils.translate)('Choose whether you want to show the card ' + 'icon on the Stripe field.') }), _react2.default.createElement( 'div', { value: 'true' }, (0, _utils.translate)('Show') ), _react2.default.createElement( 'div', { value: 'false' }, (0, _utils.translate)('Hide') ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'verify_zip', settings: this.props.state, 'default': 'false', label: (0, _utils.translate)('Postal code'), description: (0, _utils.translate)('Choose whether you want to collect the postal ' + 'code on the Stripe field.') }), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'true', label: (0, _utils.translate)('Enable'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( 'div', { className: 'sui-form-field sui-input-md', style: { marginBottom: '10px' } }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Prefill (optional)') ), _react2.default.createElement( _suiSelect4.default, _extends({}, this.props, { settings: this.props.state, property: 'zip_field', noWrapper: true }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select field') ), _.map(zipFields, function (field, key) { return _react2.default.createElement( 'option', { value: field.element_id, key: key }, (0, _escapeHtml.escapeHTML)(field.label) ); }) ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('If you are already collecting ZIP code on your form, ' + 'you can pre-fill it on the Stripe field.') ) ), _react2.default.createElement(_empty2.default, _extends({}, this.props, { settings: this.props.state, value: 'false', label: (0, _utils.translate)('Disable') })) ) ) ) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red' + (!forminatorData.hasStripe && ' sui-active'), style: { display: !forminatorData.hasStripe ? 'block' : 'none' }, 'aria-live': 'assertive' }, !forminatorData.hasStripe && _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('You have not connected your Stripe account with Forminator. '), '\xA0', canManageSettings && (0, _utils.translate)('Connect your Stripe account ' + '{{link}}here{{/link}} ' + 'and then come back to configure this field.', { components: { link: _react2.default.createElement('a', { href: forminatorData.settingsUrl + '§ion=payments', target: '_blank' }) } }) ) ) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Payment Mode') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('We recommend using Test mode to ensure the payments ' + 'are working as expected and when you are ready to start ' + 'collecting live payments, switch to Live payments mode. ') ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, defaultValue: 'test', property: 'mode', clearOptions: 'true' }), _react2.default.createElement( 'span', { value: 'test' }, (0, _utils.translate)('Test') ), _react2.default.createElement( 'span', { value: 'live' }, (0, _utils.translate)('Live') ) ), _react2.default.createElement( _suiSelect4.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Charge currency'), property: 'currency', description: (0, _utils.translate)('Choose the currency your users will be ' + 'charged in.'), fieldsize: '240' }), _.map(forminatorData.currencies, function (currency, key) { return _react2.default.createElement( 'option', { value: key, key: key }, key ); }) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Payment Plan') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('Payment plans let you set up options for ' + 'accepting payments on your site. You can add ' + 'multiple plans and conditionally process them ' + 'based on your form data.') ), _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-blue ' + (this.props.state.payments.length > 1 && notes && ' sui-active'), style: { display: this.props.state.payments.length > 1 && notes ? 'block' : 'none' }, 'aria-live': 'assertive' }, this.props.state.payments.length > 1 && notes && _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Note: You\'ll need to configure conditions ' + 'on each plan to let Forminator know when to ' + 'process each of the payment plans below.') ) ) ) ), _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-error' + (!errorState.isValid && ' sui-active'), style: { display: !errorState.isValid ? 'block' : 'none' }, 'aria-live': 'assertive' }, !errorState.isValid && _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('There is an error in one or more of your ' + 'payment plans. Please review the error ' + 'and try again.') ) ) ) ), _react2.default.createElement(_paymentPlans2.default, _extends({}, this.props, { errorState: errorState.paymentKey })) ) ); case 'advanced-settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Payment Receipt') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('Choose whether you want Stripe to email a receipt ' + 'to your customers on successful payment. Note that ' + 'Stripe sends the email receipt only for live payments. ' + '{{link}}Customize email template{{/link}}.', { components: { link: _react2.default.createElement('a', { href: 'https://dashboard.stripe.com/account/branding', target: '_blank' }) } }) ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'receipt', settings: this.props.state, defaultValue: 'true' }), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'true', label: (0, _utils.translate)('Enable'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( _suiSelect4.default, _extends({}, this.props, { property: 'customer_email', settings: this.props.state, label: (0, _utils.translate)('Email address'), defaultValue: '', placeholder: (0, _utils.translate)('E.g. john@doe.com') }), _react2.default.createElement( 'option', { selected: true, value: '' }, (0, _utils.translate)('Select an email field') ), _.map(this.getEmailFields(), function (field, key) { return _react2.default.createElement( 'option', { value: field.value, key: key }, (0, _escapeHtml.escapeHTML)(field.label), ' ', field.value ); }) ) ), _react2.default.createElement(_empty2.default, _extends({}, this.props, { settings: this.props.state, value: 'false', label: (0, _utils.translate)('Disable') })) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Payment Details (optional)') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('You can add a statement decipher and a description ' + 'to help you and your customers recognise the ' + 'transactions made on this form.') ), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Statement decipher'), type: 'text', maxLength: '22', placeholder: (0, _utils.translate)('E.g. Company Name'), property: 'company_name', description: (0, _utils.translate)('This is the business name your customers ' + 'will see on their card statement.'), note: (0, _utils.translate)('Up to 22 characters only') })), _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { settings: this.props.state, property: 'product_description', placeholder: (0, _utils.translate)('Enter your payment description here'), description: (0, _utils.translate)('This appears on your Stripe account and on the ' + 'payment receipt sent to your customers.'), label: (0, _utils.translate)('Payment description'), updateProperty: this.updateProperty }), this.getNameOptions().map(function (option, i) { return _react2.default.createElement( 'option', { key: i, value: option.value, 'data-content': option.value }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Card Validation') ), _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-blue sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Note: Stripe field automatically validates the card ' + 'as the user fills the card details regardless of the ' + 'validation behavior set on the Behaviours tab.') ) ) ) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Billing Details') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('If you are collecting billing details on your forms, ' + 'you can send that data to Stripe. The billing details ' + 'will appear on your Stripe dashboard for each payment.') ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { settings: this.props.state, property: 'billing', 'default': 'false' }), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'true', label: (0, _utils.translate)('Enable'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( _suiSelect4.default, _extends({}, this.props, { settings: this.props.state, property: 'billing_name', label: (0, _utils.translate)('Customer name (optional)') }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select a name field') ), _.map(this.getFieldsByType('name'), function (field, key) { return _react2.default.createElement( 'option', { value: field.value, key: key }, (0, _escapeHtml.escapeHTML)(field.label) ); }) ), _react2.default.createElement( _suiSelect4.default, _extends({}, this.props, { settings: this.props.state, property: 'billing_email', label: (0, _utils.translate)('Customer email address (optional)') }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select an email field') ), _.map(this.getFieldsByType('email'), function (field, key) { return _react2.default.createElement( 'option', { value: field.value, key: key }, (0, _escapeHtml.escapeHTML)(field.label) ); }) ), _react2.default.createElement( _suiSelect4.default, _extends({}, this.props, { settings: this.props.state, property: 'billing_address', label: (0, _utils.translate)('Billing address (optional)') }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select an address field') ), _.map(this.getFieldsByType('address'), function (field, key) { return _react2.default.createElement( 'option', { value: field.value, key: key }, (0, _escapeHtml.escapeHTML)(field.label) ); }) ) ), _react2.default.createElement(_empty2.default, _extends({}, this.props, { value: 'false', label: (0, _utils.translate)('Disable') })) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Meta Data') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '55px' } }, (0, _utils.translate)('You can send custom meta data to Stripe. This would ' + 'appear under the MetaData section of every payment. ' + 'A maximum of 20 meta keys can be sent. The key name ' + 'must be 20 characters or less, and the mapped data ' + 'will be truncated to 500 characters as Stripe\'s ' + 'requirements.') ), _react2.default.createElement(_metadataValue2.default, _extends({}, this.props, { settings: this.props.state })) ) ); case 'meta': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Meta Data') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('You can send custom meta data to Stripe. This would ' + 'appear under the MetaData section of every payment. ' + 'A maximum of 20 meta keys can be sent. The key name ' + 'must be 20 characters or less, and the mapped data ' + 'will be truncated to 500 characters as Stripe\'s ' + 'requirements.') ) ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'span', { className: 'sui-label' }, (0, _utils.translate)('MetaData') ) ), _react2.default.createElement(_metadataValue2.default, _extends({}, this.props, { settings: this.props.state })) ); case 'styling': return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Additional CSS Classes') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Stripe automatically adds classes to the container ' + 'DOM element based on the field state. However, you ' + 'can customize them here. {{link}}Read more{{/link}}', { components: { link: _react2.default.createElement('a', { href: 'https://stripe.com/docs/stripe-js/reference#element-options', target: '_blank' }) } }) ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'base_class', defaultValue: 'StripeElement', settings: this.props.state, label: (0, _utils.translate)('Base class') })), _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'complete_class', defaultValue: 'StripeElement--complete', settings: this.props.state, label: (0, _utils.translate)('Complete') })), _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'empty_class', defaultValue: 'StripeElement--empty', settings: this.props.state, label: (0, _utils.translate)('Empty') })), _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'focused_class', defaultValue: 'StripeElement--focus', settings: this.props.state, label: (0, _utils.translate)('Focused') })), _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'invalid_class', defaultValue: 'StripeElement--invalid', settings: this.props.state, label: (0, _utils.translate)('Invalid') })), _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'autofilled_class', defaultValue: 'StripeElement--webkit-autofill', settings: this.props.state, label: (0, _utils.translate)('Autofilled (Chrome and Safari only)') })) ) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Stripe; }(_react.Component); exports.default = Stripe; /***/ }), /* 527 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _metadataOption = __webpack_require__(528); var _metadataOption2 = _interopRequireDefault(_metadataOption); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MetadataValue = function (_Component) { _inherits(MetadataValue, _Component); function MetadataValue(props) { _classCallCheck(this, MetadataValue); var _this = _possibleConstructorReturn(this, (MetadataValue.__proto__ || Object.getPrototypeOf(MetadataValue)).call(this, props)); _this.addOption = _this.addOption.bind(_this); _this.removeOption = _this.removeOption.bind(_this); _this.updateLabel = _this.updateLabel.bind(_this); _this.updateValue = _this.updateValue.bind(_this); _this.state = { options: [].concat(_toConsumableArray(_this.props.state.options)) }; return _this; } _createClass(MetadataValue, [{ key: 'componentDidMount', value: function componentDidMount() { var self = this; this.$el = jQuery(this.el); this.moveOption = this.moveOption.bind(this); var firstSort = true; this.$el.find('.sui-builder-fields').sortable({ start: function start(e, ui) { if (firstSort) { self.$el.find('.sui-builder-fields').sortable('refreshPositions'); firstSort = false; } }, stop: function stop(e, ui) { var to = ui.item.index(); self.$el.find('.sui-builder-fields').sortable('cancel'); var from = ui.item.index(); self.moveOption(from, to); } }); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.$el.unbind().removeData(); } }, { key: 'updateState', value: function updateState(state) { this.setState({ options: state }); this.props.updateProperty('options', state); } }, { key: 'updateLabel', value: function updateLabel(index, value) { var newState = this.state.options; newState[index].label = value; this.updateState(newState); } }, { key: 'updateValue', value: function updateValue(index, value) { var newState = this.state.options; newState[index].value = value; this.updateState(newState); } }, { key: 'moveOption', value: function moveOption(from, to) { var newState = this.state.options; newState.splice(to, 0, newState.splice(from, 1)[0]); this.updateState(newState); } }, { key: 'removeOption', value: function removeOption(index) { var newState = this.state.options; newState.splice(index, 1); this.updateState(newState); } }, { key: 'addOption', value: function addOption() { var newState = this.state.options; newState.push({ label: '', value: '', default: false }); this.updateState(newState); } }, { key: 'render', value: function render() { var _this2 = this; var options = this.state.options; return _react2.default.createElement( 'div', { className: 'sui-box-builder sui-flushed', ref: function ref(el) { return _this2.el = el; } }, _react2.default.createElement( 'div', { className: 'sui-box-builder-body' }, _react2.default.createElement( 'div', { className: 'sui-builder-fields' }, _.map(options, function (option, i) { return _react2.default.createElement(_metadataOption2.default, _extends({ key: i, counter: i, option: option, removeOption: _this2.removeOption, updateValue: _this2.updateValue, updateLabel: _this2.updateLabel }, _this2.props)); }), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-dashed', onClick: this.addOption }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add Custom Meta') ) ), options.length === 0 && _react2.default.createElement( 'div', { className: 'sui-form-field sui-block-content-center' }, _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('No custom meta data created yet. Click on "+ Add Custom ' + 'to create custom meta and map form fields to it.') ) ) ) ) ); } }]); return MetadataValue; }(_react.Component); exports.default = MetadataValue; /***/ }), /* 528 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MetadataOption = function (_Component) { _inherits(MetadataOption, _Component); function MetadataOption(props) { _classCallCheck(this, MetadataOption); var _this = _possibleConstructorReturn(this, (MetadataOption.__proto__ || Object.getPrototypeOf(MetadataOption)).call(this, props)); _this.state = { focus: false }; return _this; } _createClass(MetadataOption, [{ key: 'removeOption', value: function removeOption() { this.props.removeOption(this.props.counter); } }, { key: 'updateLabel', value: function updateLabel(e) { this.props.updateLabel(this.props.counter, e.target.value); } }, { key: 'updateValue', value: function updateValue(e) { this.props.updateValue(this.props.counter, e.target.value); } }, { key: 'onFocus', value: function onFocus() { this.setState({ focus: true }); } }, { key: 'onBlur', value: function onBlur() { if (this.state.focus) { this.setState({ focus: false }); } } }, { key: 'render', value: function render() { var focusClass = this.state.focus ? 'fui-on_focus' : ''; var hasErrorClass = _.isEmpty(this.props.option.label) ? 'sui-form-field-error' : ''; var fields = (0, _utils.getFields)(this.props.wrappers, ['stripe', 'paypal', 'upload', 'section']); return _react2.default.createElement( 'div', { className: 'sui-builder-field sui-can_move sui-react ' + focusClass }, _react2.default.createElement( 'div', { className: 'sui-field-info' }, _react2.default.createElement('i', { className: 'sui-icon-drag sui-align_top', 'aria-hidden': 'true' }), _react2.default.createElement( 'div', { className: 'sui-builder-field-form' }, _react2.default.createElement( 'div', { className: 'sui-form-field-row' }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement('input', { type: 'text', size: '1', placeholder: (0, _utils.translate)('Label'), value: (0, _escapeHtml.escapeHTML)(this.props.option.label), className: 'sui-form-control', onChange: this.updateLabel.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }) ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.option.value, onChange: this.updateValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select a Field') ), _.map(fields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-field-actions sui-align_top' }, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-button-red', onClick: this.removeOption.bind(this) }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Delete MetaData') ) ) ) ); } }]); return MetadataOption; }(_react.Component); exports.default = MetadataOption; /***/ }), /* 529 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _paymentPlan = __webpack_require__(530); var _paymentPlan2 = _interopRequireDefault(_paymentPlan); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var PaymentPlans = function (_Component) { _inherits(PaymentPlans, _Component); function PaymentPlans(props) { _classCallCheck(this, PaymentPlans); var _this = _possibleConstructorReturn(this, (PaymentPlans.__proto__ || Object.getPrototypeOf(PaymentPlans)).call(this, props)); _this.addPayment = _this.addPayment.bind(_this); _this.removePayment = _this.removePayment.bind(_this); _this.updatePayment = _this.updatePayment.bind(_this); _this.updateActivePayment = _this.updateActivePayment.bind(_this); _this.state = { activePayment: 0 }; return _this; } _createClass(PaymentPlans, [{ key: 'updateState', value: function updateState(state) { this.props.updateProperty('payments', state); } }, { key: 'updateActivePayment', value: function updateActivePayment(payment) { this.setState({ activePayment: payment }); } }, { key: 'getPropState', value: function getPropState() { var props = []; _.each(this.props.state.payments, function (element) { var newElement = Object.assign({}, element); props.push(newElement); }); return props; } }, { key: 'updatePayment', value: function updatePayment(index, slug, value) { var newState = this.getPropState(); newState[index][slug] = value; this.updateState(newState); } }, { key: 'removePayment', value: function removePayment(index) { var newState = this.getPropState(); newState.splice(index, 1); this.updateState(newState); } }, { key: 'addPayment', value: function addPayment() { var newState = this.getPropState(); var paymentPlans = typeof this.props.state.payments !== "undefined" ? this.props.state.payments.length : 0; var planCount = paymentPlans + 1; newState.push({ plan_name: (0, _utils.translate)('Plan') + ' ' + planCount, payment_method: 'single', amount_type: 'fixed', subscription_amount_type: 'fixed', quantity_type: 'fixed', quantity: '1', bill_input: '1' }); this.updateState(newState); this.props.router.navigate('/builder/settings/stripe/plan'); this.updateActivePayment(paymentPlans); } }, { key: 'render', value: function render() { var _this2 = this; return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { className: 'sui-box-builder sui-flushed', style: { marginTop: 30 } }, _react2.default.createElement( 'div', { className: 'sui-box-builder-body' }, _react2.default.createElement( 'div', { id: 'fui-stripe-plans', className: 'sui-accordion sui-accordion-block' }, _.map(this.props.state.payments, function (payment, i) { return _react2.default.createElement(_paymentPlan2.default, _extends({}, _this2.props, { key: i, counter: i, payment: payment, removePayment: _this2.removePayment, updatePayment: _this2.updatePayment, activePayment: _this2.state.activePayment, updateActivePayment: _this2.updateActivePayment, errorStateClass: _this2.props.errorState.indexOf(i) > -1 ? true : false })); }) ) ) ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost', accessKey: 'a', onClick: this.addPayment }, _react2.default.createElement('span', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add Another Plan') ) ); } }]); return PaymentPlans; }(_react.Component); exports.default = (0, _withRouter.withRouter)(PaymentPlans); /***/ }), /* 530 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _reactRouterDom = __webpack_require__(24); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _planSetup = __webpack_require__(531); var _planSetup2 = _interopRequireDefault(_planSetup); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var PaymentPlan = function (_Component) { _inherits(PaymentPlan, _Component); function PaymentPlan(props) { _classCallCheck(this, PaymentPlan); // Bind events var _this = _possibleConstructorReturn(this, (PaymentPlan.__proto__ || Object.getPrototypeOf(PaymentPlan)).call(this, props)); _this.toggleState = _this.toggleState.bind(_this); _this.removePayment = _this.removePayment.bind(_this); _this.updatePayment = _this.updatePayment.bind(_this); _this.updateProperty = _this.updateProperty.bind(_this); return _this; } // Make it possible to update state from child components _createClass(PaymentPlan, [{ key: 'updatePayment', value: function updatePayment(index, slug, value) { this.props.updatePayment(index, slug, value); } }, { key: 'updateProperty', value: function updateProperty(slug, value) { this.props.payment[slug] = value; this.forceUpdate(); } }, { key: 'toggleState', value: function toggleState() { this.props.router.navigate('/builder/settings/stripe/plan'); var payment = this.props.counter; if (this.props.activePayment === this.props.counter) { payment = -1; } this.props.updateActivePayment(payment); } }, { key: 'removePayment', value: function removePayment() { this.props.removePayment(this.props.counter); } }, { key: 'showPlanLabel', value: function showPlanLabel() { if (this.props.payment.payment_method === 'single') { var amountType = (0, _utils.translate)('Fixed'); if (this.props.payment.amount_type === 'variable') { amountType = (0, _utils.translate)('Variable'); } return (0, _utils.translate)('One Time') + ' (' + amountType + ')'; } if (this.props.payment.payment_method === 'subscription') { return (0, _utils.translate)('Subscription'); } } }, { key: 'conditionMarkup', value: function conditionMarkup() { var mappedFields = (0, _utils.getFields)(this.props.wrappers); var actionLabel = this.props.payment.condition_action === 'hide' ? (0, _utils.translate)('Hide') : (0, _utils.translate)('Show'); // Condition does not exist, return if (_.isUndefined(this.props.payment.conditions)) { return; } // Get first condition var firstCondition = this.props.payment.conditions[0]; // Condition does not exist, return if (_.isUndefined(firstCondition)) { return; } // Get condition field data var conditionData = _.filter(mappedFields, function (field) { return field.element_id === firstCondition.element_id; }); // Condition field not exist ( could be deleted ), return if (_.isUndefined(conditionData) || _.isEmpty(conditionData)) { return; } var fieldLabel = conditionData[0].label, ruleLabel = (0, _utils.getRuleLabel)(firstCondition.rule, conditionData.field_type), valueLabel = (0, _utils.getConditionLabel)(conditionData[0], firstCondition); var total = this.props.payment.conditions.length; var more = ''; if (total - 1 > 0) { more = '+ ' + (total - 1) + ' ' + (0, _utils.translate)('more condition(s)'); } return _react2.default.createElement( 'span', { className: 'fui-has_conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile', 'data-tooltip': actionLabel + ' ' + (0, _utils.translate)('if') + ' ' + fieldLabel + ' ' + ruleLabel + ' ' + valueLabel + ' ' + more }, _react2.default.createElement('span', { className: 'sui-icon-link sui-sm', 'aria-hidden': 'true' }) ); } }, { key: 'render', value: function render() { var _this2 = this; var planId = 'plan-' + this.props.counter; var conditionData = this.conditionMarkup(); return _react2.default.createElement( 'div', { className: 'sui-accordion-item' + (this.props.counter === this.props.activePayment ? ' sui-accordion-item--open' : '') + (this.props.errorStateClass ? ' validation-error' : '') }, _react2.default.createElement( 'div', { className: 'sui-accordion-item-header', onClick: function onClick() { return _this2.toggleState(); } }, _react2.default.createElement( 'div', { className: 'sui-accordion-item-title sui-trim-title' }, _react2.default.createElement( 'span', { className: 'sui-trim-text' }, this.props.payment.plan_name ) ), _react2.default.createElement( 'div', { className: 'sui-accordion-item-tag sui-trim-title' }, _react2.default.createElement( 'span', { className: 'sui-tag sui-tag-sm' }, this.showPlanLabel() ) ), _react2.default.createElement( 'div', { className: 'sui-accordion-col-auto' }, this.props.state.payments.length > 1 && _react2.default.createElement( 'button', { className: 'sui-button-icon sui-button-red', onClick: function onClick() { return _this2.removePayment(); } }, _react2.default.createElement('span', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Remove This Plan') ) ), _react2.default.createElement( 'button', { id: 'forminator-field-' + planId, className: 'sui-button-icon sui-accordion-open-indicator', 'aria-controls': 'forminator-field-' + planId + '-content', 'aria-expanded': this.props.counter === this.props.activePayment, onClick: function onClick() { return _this2.toggleState(); } }, _react2.default.createElement('span', { className: 'sui-icon-chevron-down', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Open Plan Settings') ) ), !_.isUndefined(this.props.payment.conditions) && this.props.payment.conditions.length > 0 && _react2.default.createElement( _react2.default.Fragment, null, conditionData ) ) ), _react2.default.createElement( 'div', { role: 'region', id: 'forminator-field-' + planId + '-content', className: 'sui-accordion-item-body', 'aria-labelledby': 'forminator-field-' + planId, 'aria-hidden': this.props.counter === this.props.activePayment ? false : true }, _react2.default.createElement( 'div', { className: 'sui-tabs sui-tabs-flushed' }, _react2.default.createElement( 'div', { role: 'tablist', className: 'sui-tabs-menu' }, _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/settings/stripe/plan', className: function className(_ref) { var isActive = _ref.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; }, role: 'tab' }, (0, _utils.translate)('Plan setup') ), _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/settings/stripe/conditions', className: function className(_ref2) { var isActive = _ref2.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; }, role: 'tab' }, (0, _utils.translate)('Conditions') ) ), _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/', element: _react2.default.createElement(_reactRouterDom.Navigate, { to: '/builder/settings/stripe/plan', replace: true }) }) ), _react2.default.createElement( 'div', { className: 'sui-tabs-content' }, _react2.default.createElement( 'div', { className: 'sui-tab-content active', role: 'tabpanel' }, _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/stripe/plan', element: _react2.default.createElement(_planSetup2.default, _extends({}, this.props, { payment: this.props.payment, updatePayment: this.updatePayment })) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/stripe/conditions', element: _react2.default.createElement(_visibility2.default, _extends({}, this.props, { state: this.props.payment, updateProperty: this.updateProperty, updatePayment: this.updatePayment, isPayment: true })) }) ) ) ) ) ) ); } }]); return PaymentPlan; }(_react.Component); exports.default = (0, _withRouter.withRouter)(PaymentPlan); /***/ }), /* 531 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _singlePayment = __webpack_require__(532); var _singlePayment2 = _interopRequireDefault(_singlePayment); var _subscription = __webpack_require__(533); var _subscription2 = _interopRequireDefault(_subscription); var _addonRequired = __webpack_require__(374); var _addonRequired2 = _interopRequireDefault(_addonRequired); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Plan = function (_Component) { _inherits(Plan, _Component); function Plan(props) { _classCallCheck(this, Plan); var _this = _possibleConstructorReturn(this, (Plan.__proto__ || Object.getPrototypeOf(Plan)).call(this, props)); _this.updatePayment = _this.updatePayment.bind(_this); return _this; } // Make it possible to update state from child components _createClass(Plan, [{ key: 'updatePayment', value: function updatePayment(slug, value) { this.props.updatePayment(this.props.counter, slug, value); } }, { key: 'updateState', value: function updateState(state) { this.props.updateProperty('payments', state); } }, { key: 'render', value: function render() { var Content = forminatorData.isPro ? (0, _utils.translate)('The Stripe Subscription Add-ons is required to use ' + 'this feature. Install it from the Add-ons page.') : (0, _utils.translate)('Collect recurring/subscription Stripe payments with Forminator Pro on your WordPress sites.'); var SubscriptionLable = forminatorData.isPro ? (0, _utils.translate)('Subscription') : (0, _utils.translate)('Subscription {{span}}Pro{{/span}}', { components: { span: _react2.default.createElement('span', { className: 'sui-tag sui-tag-pro' }) } }); return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.payment, label: (0, _utils.translate)('Plan name'), placeholder: (0, _utils.translate)('Plan'), description: (0, _utils.translate)('This will be displayed on the submissions ' + 'as well as the Stripe dashboard.'), property: 'plan_name', isRequired: 'true', requiredError: (0, _utils.translate)('Plan Name is required.'), updateProperty: this.updatePayment })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { settings: this.props.payment, property: 'payment_method', 'default': 'single', label: (0, _utils.translate)('Payment type'), updateProperty: this.updatePayment }), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'single', label: (0, _utils.translate)('One Time'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement(_singlePayment2.default, _extends({}, this.props, { payment: this.props.payment, updatePayment: this.updatePayment })) ), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'subscription', label: SubscriptionLable, boxClass: 'sui-tab-boxed' }), forminatorData.hasStripePro && forminatorData.isPro && _react2.default.createElement(_subscription2.default, _extends({}, this.props, { payment: this.props.payment, updatePayment: this.updatePayment })), (!forminatorData.hasStripePro || !forminatorData.isPro) && _react2.default.createElement(_addonRequired2.default, _extends({}, this.props, { text: Content, addonUrl: 'https://wpmudev.com/project/forminator-pro/?coupon=FORMINATOR-SUBSCRIPTIONS&checkout=0&utm_source=forminator&utm_medium=plugin&utm_campaign=forminator_form-builder_stripe-addon', addonImg: 'https://wpmudev.com/wp-content/uploads/2021/08/forminator-stripe-logo.png' })) ) ) ) ) ); } }]); return Plan; }(_react.Component); exports.default = Plan; /***/ }), /* 532 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SinglePayment = function (_Component) { _inherits(SinglePayment, _Component); function SinglePayment(props) { _classCallCheck(this, SinglePayment); var _this = _possibleConstructorReturn(this, (SinglePayment.__proto__ || Object.getPrototypeOf(SinglePayment)).call(this, props)); _this.updateProperty = _this.updateProperty.bind(_this); _this.updatePayment = _this.updatePayment.bind(_this); return _this; } // Make it possible to update state from child components _createClass(SinglePayment, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.props.state.payments[this.props.counter][slug] = value; this.forceUpdate(); } }, { key: 'updatePayment', value: function updatePayment(slug, value) { this.props.updatePayment(slug, value); } }, { key: 'getDisabledFields', value: function getDisabledFields() { var allowed = ['calculation', 'currency', 'number', 'slider']; var disabled = []; // Push disabled fields _.each(forminatorData.fields, function (field) { if (!_.contains(allowed, field.type)) { disabled.push(field.type); } }); return disabled; } }, { key: 'getFields', value: function getFields() { var disabledFields = this.getDisabledFields(); return (0, _utils.getFields)(this.props.wrappers, disabledFields); } }, { key: 'render', value: function render() { var currencyNote = (0, _utils.translate)('In %s', { args: [this.props.state.currency] }); var calcFields = this.getFields(); return _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'amount_type', settings: this.props.payment, updateProperty: this.updatePayment, defaultValue: 'fixed', wrapperClass: 'fui-plan-amount', label: (0, _utils.translate)('Plan amount'), description: (0, _utils.translate)('Enter an amount or select a value from a form ' + 'field in the Variable tab.') }), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'fixed', label: (0, _utils.translate)('Fixed') }), _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'number', property: 'amount', settings: this.props.payment, updateProperty: this.updatePayment, fieldClass: 'fui-fixed-plan', inputClass: 'sui-field-has-suffix', suffix: this.props.state.currency, placeholder: (0, _utils.translate)('E.g., 20.00'), isRequired: 'true', requiredError: (0, _utils.translate)('Enter an amount or choose a form field.') })) ), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'variable', label: (0, _utils.translate)('Variable'), boxClass: '' }), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.payment, updateProperty: this.updatePayment, property: 'variable', note: currencyNote }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select field') ), _.map(calcFields, function (field, key) { return _react2.default.createElement( 'option', { value: field.element_id, key: key }, (0, _escapeHtml.escapeHTML)(field.label) ); }) ) ) ); } }]); return SinglePayment; }(_react.Component); exports.default = SinglePayment; /***/ }), /* 533 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _suiSelect3 = __webpack_require__(18); var _suiSelect4 = _interopRequireDefault(_suiSelect3); var _checkbox = __webpack_require__(41); var _checkbox2 = _interopRequireDefault(_checkbox); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Subscription = function (_Component) { _inherits(Subscription, _Component); function Subscription(props) { _classCallCheck(this, Subscription); var _this = _possibleConstructorReturn(this, (Subscription.__proto__ || Object.getPrototypeOf(Subscription)).call(this, props)); _this.updateProperty = _this.updateProperty.bind(_this); _this.updatePayment = _this.updatePayment.bind(_this); return _this; } // Make it possible to update state from child components _createClass(Subscription, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.props.state.payments[this.props.counter][slug] = value; this.forceUpdate(); } }, { key: 'updatePayment', value: function updatePayment(slug, value) { this.props.updatePayment(slug, value); } }, { key: 'getDisabledFields', value: function getDisabledFields() { var allowed = ['calculation', 'currency', 'number', 'slider']; var disabled = []; // Push disabled fields _.each(forminatorData.fields, function (field) { if (!_.contains(allowed, field.type)) { disabled.push(field.type); } }); return disabled; } }, { key: 'getFields', value: function getFields() { var disabledFields = this.getDisabledFields(); return (0, _utils.getFields)(this.props.wrappers, disabledFields); } }, { key: 'render', value: function render() { var currencyNote = (0, _utils.translate)('In %s', { args: [this.props.state.currency] }); var calcFields = this.getFields(); var limit_min = !_.isUndefined(this.props.payment['bill_input']) ? this.props.payment['bill_input'] : 1; return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'subscription_amount_type', settings: this.props.payment, updateProperty: this.updatePayment, wrapperClass: 'fui-plan-amount', 'default': 'fixed', label: (0, _utils.translate)('Plan amount'), description: (0, _utils.translate)('Enter an amount or select a value from a form ' + 'field in the Variable tab.') }), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'fixed', label: (0, _utils.translate)('Fixed'), boxClass: 'sui-border-frame' }), _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'subscription_amount', settings: this.props.payment, updateProperty: this.updatePayment, type: 'number', placeholder: (0, _utils.translate)('E.g. 20.00'), suffix: this.props.state.currency, fieldClass: 'fui-fixed-plan', inputClass: 'sui-field-has-suffix', label: (0, _utils.translate)('Amount'), isRequired: 'true', requiredError: (0, _utils.translate)('Enter an amount or choose a form field.') })) ), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'variable', label: (0, _utils.translate)('Variable'), boxClass: 'sui-border-frame' }), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.payment, updateProperty: this.updatePayment, property: 'subscription_variable', label: (0, _utils.translate)('Choose form field'), note: currencyNote }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select field') ), _.map(calcFields, function (field, key) { return _react2.default.createElement( 'option', { value: field.element_id, key: key }, (0, _escapeHtml.escapeHTML)(field.label) ); }) ) ) ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'quantity_type', settings: this.props.payment, updateProperty: this.updatePayment, 'default': 'fixed', label: (0, _utils.translate)('Quantity'), description: (0, _utils.translate)('Enter the quantity or let your users set ' + 'the quantity in a form field.') }), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'fixed', label: (0, _utils.translate)('Fixed'), boxClass: 'sui-border-frame' }), _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'quantity', settings: this.props.payment, updateProperty: this.updatePayment, type: 'number', defaultValue: '1', placeholder: (0, _utils.translate)('E.g., 1'), fieldClass: 'sui-input-md', label: (0, _utils.translate)('Quantity'), isRequired: 'true', requiredError: (0, _utils.translate)('Please enter a quantity or select a ' + 'form field.') })) ), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'variable', label: (0, _utils.translate)('Variable'), boxClass: 'sui-border-frame' }), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.payment, updateProperty: this.updatePayment, property: 'variable_quantity', label: (0, _utils.translate)('Choose form field'), note: currencyNote }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select field') ), _.map(calcFields, function (field, key) { return _react2.default.createElement( 'option', { value: field.element_id, key: key }, (0, _escapeHtml.escapeHTML)(field.label) ); }) ) ) ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Bill every'), '\xA0', _react2.default.createElement( 'span', { className: 'sui-error', 'aria-hidden': 'true' }, '*' ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'bill_input', settings: this.props.payment, updateProperty: this.updatePayment, type: 'number', defaultValue: '1', placeholder: (0, _utils.translate)('E.g., 1'), isRequired: 'true', requiredError: (0, _utils.translate)('Duration cannot be empty.'), fieldClass: parseInt(limit_min) <= 0 ? ' sui-form-field-error' : '' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'bill_period', settings: this.props.payment, updateProperty: this.updatePayment, defaultValue: 'years' }), _react2.default.createElement( 'option', { value: 'day' }, (0, _utils.translate)('Day(s)') ), _react2.default.createElement( 'option', { value: 'week' }, (0, _utils.translate)('Week(s)') ), _react2.default.createElement( 'option', { value: 'month' }, (0, _utils.translate)('Month(s)') ), _react2.default.createElement( 'option', { value: 'year' }, (0, _utils.translate)('Year(s)') ) ) ) ) ), _react2.default.createElement( 'div', { style: { marginBottom: this.props.payment.allow_trial ? 20 : 0 } }, _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'allow_trial', settings: this.props.payment, fieldId: 'allow-trial' + this.props.counter, updateProperty: this.updatePayment, label: (0, _utils.translate)('Allow Trial Period'), tooltip: (0, _utils.translate)('Check this option to offer a limited-time ' + 'free trial for this plan'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })) ), this.props.payment.allow_trial && _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'trial_days', settings: this.props.payment, updateProperty: this.updatePayment, inputClass: 'sui-field-has-suffix', label: (0, _utils.translate)('Trial Duration'), description: (0, _utils.translate)('Enter the number of days that users will try ' + 'your product for free before they start paying.'), type: 'number', defaultValue: '14', placeholder: (0, _utils.translate)('E.g., 14'), suffix: (0, _utils.translate)('Days') })) ); } }]); return Subscription; }(_react.Component); exports.default = Subscription; /***/ }), /* 534 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _toggle = __webpack_require__(188); var _toggle2 = _interopRequireDefault(_toggle); var _prefill = __webpack_require__(76); var _prefill2 = _interopRequireDefault(_prefill); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable dot-notation */ var Number = function (_Component) { _inherits(Number, _Component); function Number(props) { _classCallCheck(this, Number); return _possibleConstructorReturn(this, (Number.__proto__ || Object.getPrototypeOf(Number)).call(this, props)); } _createClass(Number, [{ key: 'render', value: function render() { var type = this.props.type; var limitMin = !_.isUndefined(this.props.state['limit_min']) ? this.props.state['limit_min'] : 1; var limitMax = !_.isUndefined(this.props.state['limit_max']) ? this.props.state['limit_max'] : 150; var separators = !_.isUndefined(this.props.state['separators']) ? this.props.state['separators'] : ''; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter Placeholder'), property: 'placeholder' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Default Value (optional)'), placeholder: (0, _utils.translate)('Enter default value'), property: 'default_value' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Currency'), labelDark: true, description: (0, _utils.translate)('Choose the currency to display on the field. If you are ' + 'going to collect payments based on this field, it is ' + 'recommended to keep this currency same as your charge ' + 'currency to avoid any confusions.'), sidebar: false }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'currency', hasSearch: true }), _.map(forminatorData.currencies, function (currency, key) { return _react2.default.createElement( 'option', { value: key, key: key }, currency[0] ); }) ) ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Limit'), labelDark: true, description: (0, _utils.translate)('Restrict the value that your users can enter in ' + 'this field within a custom range.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( 'div', { className: 'sui-form-field-inline' }, _react2.default.createElement(_input2.default, _extends({ type: 'number' }, this.props, { settings: this.props.state, placeholder: '0', property: 'limit_min', label: (0, _utils.translate)('Min'), fieldClass: 'sui-input-sm' + ('' + (parseInt(limitMin) >= parseInt(limitMax) ? ' sui-form-field-error' : '')) })), _react2.default.createElement(_input2.default, _extends({ type: 'number' }, this.props, { settings: this.props.state, placeholder: '0', property: 'limit_max', label: (0, _utils.translate)('Max'), fieldClass: 'sui-input-sm' + ('' + (parseInt(limitMin) >= parseInt(limitMax) ? ' sui-form-field-error' : '')) })) ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'limit_message', settings: this.props.state, 'default': 'false', label: (0, _utils.translate)('Error Messages') }), _react2.default.createElement(_empty2.default, { value: 'false', label: (0, _utils.translate)('Default') }), _react2.default.createElement( _container2.default, { value: 'true', label: (0, _utils.translate)('Custom'), boxClass: 'sui-tab-boxed' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, property: 'limit_min_message', type: 'text', label: (0, _utils.translate)('When number is smaller than the min limit'), placeholder: (0, _utils.translate)('E.g. Please enter a number greater than 0.') })), _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, type: 'text', property: 'limit_max_message', label: (0, _utils.translate)('When number is greater than the max limit'), placeholder: (0, _utils.translate)('E.g. Please enter a number lower than 1000.') })) ) ) ) ), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Formatting'), labelDark: true, description: (0, _utils.translate)('Choose how do you want to format the value ' + 'of this field.'), descriptionSpacing: 20, sidebar: false }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'separators', settings: this.props.state, defaultValue: '1234567.89', label: (0, _utils.translate)('Separators'), fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: 'blank' }, (0, _utils.translate)('1234567.89') ), _react2.default.createElement( 'option', { value: 'comma_dot' }, (0, _utils.translate)('1,234,567.89') ), _react2.default.createElement( 'option', { value: 'dot_comma' }, (0, _utils.translate)('1.234.567,89') ), _react2.default.createElement( 'option', { value: 'space_comma' }, (0, _utils.translate)('1 234 567,89') ) ) ), 'custom' !== separators && _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'precision', settings: this.props.state, defaultValue: '2', label: (0, _utils.translate)('Round To'), fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: '0' }, (0, _utils.translate)('0 decimals') ), _react2.default.createElement( 'option', { value: '1' }, (0, _utils.translate)('1 decimals') ), _react2.default.createElement( 'option', { value: '2' }, (0, _utils.translate)('2 decimals') ), _react2.default.createElement( 'option', { value: '3' }, (0, _utils.translate)('3 decimals') ), _react2.default.createElement( 'option', { value: '4' }, (0, _utils.translate)('4 decimals') ) ) ) ), 'custom' === separators && _react2.default.createElement( 'div', { className: 'sui-border-frame' }, _react2.default.createElement( 'div', { className: 'sui-form-field-inline', style: { marginBottom: '5px' } }, _react2.default.createElement(_input2.default, _extends({ type: 'text' }, this.props, { settings: this.props.state, placeholder: (0, _utils.translate)('E.g. $'), property: 'thousand-separators', defaultValue: ',', label: (0, _utils.translate)('Thousand Separator'), fieldClass: 'sui-input-md' })), _react2.default.createElement(_input2.default, _extends({ type: 'text' }, this.props, { settings: this.props.state, placeholder: (0, _utils.translate)('E.g. $'), property: 'decimal-separators', defaultValue: '.', label: (0, _utils.translate)('Decimal Separator'), fieldClass: 'sui-input-md' })) ) ), 'custom' === separators && _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'precision', settings: this.props.state, defaultValue: '2', label: (0, _utils.translate)('Round To'), fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: '0' }, (0, _utils.translate)('0 decimals') ), _react2.default.createElement( 'option', { value: '1' }, (0, _utils.translate)('1 decimals') ), _react2.default.createElement( 'option', { value: '2' }, (0, _utils.translate)('2 decimals') ), _react2.default.createElement( 'option', { value: '3' }, (0, _utils.translate)('3 decimals') ), _react2.default.createElement( 'option', { value: '4' }, (0, _utils.translate)('4 decimals') ) ) ) ) ) ), _react2.default.createElement(_prefill2.default, this.props) ); case 'calculations': return _react2.default.createElement(_toggle2.default, this.props); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Number; }(_react.Component); exports.default = Number; /***/ }), /* 535 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _accordionToggle = __webpack_require__(187); var _accordionToggle2 = _interopRequireDefault(_accordionToggle); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _wpEditor = __webpack_require__(31); var _wpEditor2 = _interopRequireDefault(_wpEditor); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Password = function (_Component) { _inherits(Password, _Component); function Password(props) { _classCallCheck(this, Password); return _possibleConstructorReturn(this, (Password.__proto__ || Object.getPrototypeOf(Password)).call(this, props)); } _createClass(Password, [{ key: 'render', value: function render() { var type = this.props.type; switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Enter Placeholder'), property: 'placeholder' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { settings: this.props.state, extraId: 'password', label: (0, _utils.translate)('Description (optional)'), property: 'description', hideEditorOptions: 'true', cutomTinymce: 'bold,italic,underline,link,alignleft,aligncenter,alignright' })) ) ), this.props.formType === 'registration' && _react2.default.createElement( 'div', { className: 'sui-accordion sui-accordion-flushed', value: 'multiple' }, _react2.default.createElement( _accordionToggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Confirm Password'), property: 'confirm-password', settings: this.props.state }), _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Confirm password'), property: 'confirm-password-label' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Placeholder (optional)'), placeholder: (0, _utils.translate)('Confirm new password'), property: 'confirm-password-placeholder' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { settings: this.props.state, extraId: 'confirm-password', label: (0, _utils.translate)('Description (optional)'), property: 'confirm-password-description', hideEditorOptions: 'true', cutomTinymce: 'bold,italic,underline,link,alignleft,aligncenter,alignright' })) ) ) ) ) ) ); case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, this.props.formType === 'registration' && _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Minimum password strength'), labelDark: true, description: (0, _utils.translate)('Choose a minimum password strength required ' + 'to force your users to sign up with a password ' + 'stronger than the minimum requirement.'), sidebar: false }, _react2.default.createElement( 'div', { style: { marginTop: '10px', marginBottom: '0' } }, _react2.default.createElement( _suiSelect2.default, _extends({ property: 'strength', settings: this.props.state }, this.props, { defaultValue: 'none', fieldClass: 'sui-input-md' }), _react2.default.createElement( 'option', { value: 'none' }, (0, _utils.translate)('None') ), _react2.default.createElement( 'option', { value: 'short' }, (0, _utils.translate)('Short') ), _react2.default.createElement( 'option', { value: 'bad' }, (0, _utils.translate)('Bad') ), _react2.default.createElement( 'option', { value: 'good' }, (0, _utils.translate)('Good') ), _react2.default.createElement( 'option', { value: 'strong' }, (0, _utils.translate)('Strong') ) ) ), 'none' !== this.props.state.strength && _react2.default.createElement( 'div', { className: 'sui-border-frame' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Error message'), type: 'text', className: 'sui-form-control', property: 'strength_validation_message', description: (0, _utils.translate)('This is displayed when the user\'s password ' + 'is weaker than the minimum requirement.') })) ) ), _react2.default.createElement(_required2.default, this.props), (0, _utils.isTrue)(this.props.state['confirm-password']) && _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Password validation error message'), labelDark: true, description: (0, _utils.translate)('Enter an error message to be displayed when the passwords do not match.'), sidebar: false }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, type: 'text', placeholder: (0, _utils.translate)('Passwords do not match. Please try again.'), property: 'validation_message' })) ) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Password; }(_react.Component); exports.default = Password; /***/ }), /* 536 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _suiSelect3 = __webpack_require__(18); var _suiSelect4 = _interopRequireDefault(_suiSelect3); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _checkbox = __webpack_require__(41); var _checkbox2 = _interopRequireDefault(_checkbox); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var PayPal = function (_Component) { _inherits(PayPal, _Component); function PayPal(props) { _classCallCheck(this, PayPal); return _possibleConstructorReturn(this, (PayPal.__proto__ || Object.getPrototypeOf(PayPal)).call(this, props)); } _createClass(PayPal, [{ key: 'getDisabledFields', value: function getDisabledFields() { var allowed = ['calculation', 'currency', 'number', 'slider']; var disabled = []; // Push disabled fields _.each(forminatorData.fields, function (field) { if (!_.contains(allowed, field.type)) { disabled.push(field.type); } }); return disabled; } }, { key: 'getFields', value: function getFields() { var disabledFields = this.getDisabledFields(); return (0, _utils.getFields)(this.props.wrappers, disabledFields); } }, { key: 'getFieldsByType', value: function getFieldsByType(type) { var fields = []; var fieldsByType = (0, _utils.getFieldsByType)(type, this.props.wrappers); fieldsByType.map(function (field) { var label = field.field_label; if (type === 'address') { label = field.element_id; } fields.push({ value: field.element_id, label: label }); }); return fields; } }, { key: 'isCountryRequired', value: function isCountryRequired(element_id) { var isRequired = void 0; this.props.wrappers.map(function (wrapper) { wrapper.fields.map(function (field) { if (field.element_id === element_id) { isRequired = field.address_country_required; } }); }); return (0, _utils.isTrue)(isRequired); } }, { key: 'render', value: function render() { var canManageSettings = (0, _utils.isTrue)(forminatorData.userPermissions['manage_forminator_settings']) || (0, _utils.isTrue)(forminatorData.userPermissions['manage_options']); var type = this.props.type; var layout = this.props.state.layout; var card = this.props.state.card; var currencyNote = (0, _utils.translate)('In %s', { args: [this.props.state.currency] }); var calcFields = this.getFields(); var heightOptions = []; for (var i = 25; i < 56; i++) { heightOptions.push(i); } switch (type) { case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, !forminatorData.hasPayPal && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('You have not connected your PayPal account with Forminator. '), '\xA0', canManageSettings && (0, _utils.translate)('Connect your PayPal account ' + '{{link}}here{{/link}} ' + 'and then come back to configure this field.', { components: { link: _react2.default.createElement('a', { href: forminatorData.settingsUrl + '§ion=payments', target: '_blank' }) } }) ) ) ) ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, defaultValue: 'sandbox', label: (0, _utils.translate)('Mode of payment'), property: 'mode', clearOptions: 'true', description: (0, _utils.translate)('We recommend using sandbox mode to ensure the payments are ' + 'working as expected and when you are ready to start collecting ' + 'live payments, switch to the {{strong}}Live{{/strong}} ' + 'payments mode.', { components: { strong: _react2.default.createElement('strong', null) } }) }), _react2.default.createElement( 'span', { value: 'sandbox' }, (0, _utils.translate)('Sandbox') ), _react2.default.createElement( 'span', { value: 'live' }, (0, _utils.translate)('Live') ) ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Charge currency'), property: 'currency', description: (0, _utils.translate)('It\'s recommended to charge in your customers\' currency to drive ' + 'more sales and avoid foreign exchange fee to your customers.'), fieldsize: '240' }), _.map(forminatorData.ppCurrencies, function (currency, key) { return _react2.default.createElement( 'option', { value: key, key: key }, key ); }) ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'amount_type', settings: this.props.state, 'default': 'fixed', label: (0, _utils.translate)('Payment amount') }), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'fixed', label: (0, _utils.translate)('Fixed'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'number', property: 'amount', settings: this.props.state, inputClass: 'sui-field-has-suffix', label: (0, _utils.translate)('Fixed amount'), suffix: this.props.state.currency, placeholder: (0, _utils.translate)('E.g. 20.00'), isRequired: 'true', requiredError: (0, _utils.translate)('Enter an amount or choose a form field.') })) ), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'variable', label: (0, _utils.translate)('Variable'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( 'div', { className: 'sui-form-field sui-input-md', style: { marginBottom: '10px' } }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Variable amount'), _react2.default.createElement( 'span', { className: 'sui-label-note' }, currencyNote ) ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'variable', note: currencyNote, noWrapper: true }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select field') ), _.map(calcFields, function (field, key) { return _react2.default.createElement( 'option', { value: field.element_id, key: key }, (0, _escapeHtml.escapeHTML)(field.label) ); }) ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('A currency field can be used to take user-defined ' + 'payments such as donations and calculation field ' + 'can be used to charge a calculated value based on ' + 'a formula.') ) ) ) ); case 'customize': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), property: 'label', description: (0, _utils.translate)('Choose a label for your PayPal button. Note that PayPal ' + 'checkout doesn\'t allow a custom label for the PayPal ' + 'button. You can only choose from the pre-defined labels.'), fieldsize: '240' }), _react2.default.createElement( 'option', { value: 'checkout' }, (0, _utils.translate)('PayPal Checkout') ), _react2.default.createElement( 'option', { value: 'pay' }, (0, _utils.translate)('Pay with PayPal') ), _react2.default.createElement( 'option', { value: 'paypal' }, (0, _utils.translate)('PayPal') ) ), _react2.default.createElement( _suiSelect4.default, _extends({}, this.props, { settings: this.props.state, property: 'color', elementClass: 'sui-select-colors', fieldsize: '240', label: (0, _utils.translate)('Color'), description: (0, _utils.translate)('PayPal recommends using the Gold button since it is ' + 'widely known as their brand color. However, if that ' + 'does not suit your theme, you can choose a different color.') }), _react2.default.createElement( 'option', { value: 'gold', 'data-color': '#FFC439' }, (0, _utils.translate)('Gold') ), _react2.default.createElement( 'option', { value: 'blue', 'data-color': '#009CDE' }, (0, _utils.translate)('Blue') ), _react2.default.createElement( 'option', { value: 'silver', 'data-color': '#EEEEEE' }, (0, _utils.translate)('Silver') ), _react2.default.createElement( 'option', { value: 'white', 'data-color': '#FFFFFF' }, (0, _utils.translate)('White') ), _react2.default.createElement( 'option', { value: 'black', 'data-color': '#2C2E2F' }, (0, _utils.translate)('Black') ) ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Width') ), _react2.default.createElement( 'div', { style: { width: '100%', maxWidth: '100px', display: 'inline-block' } }, _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'number', property: 'width', minValue: '150', maxValue: '750', settings: this.props.state, placeholder: (0, _utils.translate)('E.g. 250'), simple: true })) ), _react2.default.createElement( 'span', { className: 'sui-field-suffix' }, (0, _utils.translate)('px') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose the width of PayPal Smart Buttons. It can ' + 'be anywhere between 150px to 750px. Leave this empty ' + 'if you want the buttons to take the full width of the ' + 'form up to the 750px limit.') ) ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Height') ), _react2.default.createElement( 'div', { style: { width: '100%', maxWidth: '100px', display: 'inline-block', verticalAlign: 'middle' } }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'height', noWrapper: true }), heightOptions.map(function (x, i) { return _react2.default.createElement( 'option', { value: x, key: i }, x ); }) ) ), _react2.default.createElement( 'span', { className: 'sui-field-suffix' }, (0, _utils.translate)('px') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose the height of PayPal Smart Buttons. It can be anywhere ' + 'between 25px to 55px') ) ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, defaultValue: 'rect', label: (0, _utils.translate)('Shape'), property: 'shape', clearOptions: 'true', description: (0, _utils.translate)('Choose your preferred shape from your ' + 'PayPal Smart Buttons.') }), _react2.default.createElement( 'span', { value: 'rect' }, (0, _utils.translate)('Rectangular') ), _react2.default.createElement( 'span', { value: 'pill' }, (0, _utils.translate)('Pill') ) ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, defaultValue: 'vertical', label: (0, _utils.translate)('Layout'), property: 'layout', clearOptions: 'true', description: (0, _utils.translate)('We recommend the vertical layout as it allows additional ' + 'payment methods such as Credit Cards. You can read about ' + 'the layout options {{link}}here{{/link}}.', { components: { link: _react2.default.createElement('a', { href: 'https://developer.paypal.com/docs/checkout/integration-features/customize-button/#layout', target: '_blank' }) } }) }), _react2.default.createElement( 'span', { value: 'vertical' }, (0, _utils.translate)('Vertical') ), _react2.default.createElement( 'span', { value: 'horizontal' }, (0, _utils.translate)('Horizontal') ) ), layout !== 'vertical' && _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, defaultValue: 'true', label: (0, _utils.translate)('Tagline'), property: 'tagline', clearOptions: 'true', description: (0, _utils.translate)('Choose whether to show the default PayPal tagline ' + '{{strong}}"The safer, easier way to pay"{{/strong}} ' + 'below your PayPal button.', { components: { strong: _react2.default.createElement('strong', null) } }) }), _react2.default.createElement( 'span', { value: 'true' }, (0, _utils.translate)('Show') ), _react2.default.createElement( 'span', { value: 'false' }, (0, _utils.translate)('Hide') ) ) ); case 'advanced-settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Disable Funding Sources') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('PayPal automatically adds additional funding ' + 'sources to the PayPal checkout for visitors ' + 'from supported countries. However, you can ' + 'choose to disable funding sources which ' + 'shouldn\'t be displayed to visitors.') ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'card', settings: this.props.state, label: (0, _utils.translate)('Credit or debit cards'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'credit', settings: this.props.state, label: (0, _utils.translate)('PayPal Credit'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'bancontact', settings: this.props.state, label: (0, _utils.translate)('Bancontact'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'blik', settings: this.props.state, label: (0, _utils.translate)('BLIK'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'eps', settings: this.props.state, label: (0, _utils.translate)('eps'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'giropay', settings: this.props.state, label: (0, _utils.translate)('giropay'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'ideal', settings: this.props.state, label: (0, _utils.translate)('iDEAL'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'mercadopago', settings: this.props.state, label: (0, _utils.translate)('Mercado Pago'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'mybank', settings: this.props.state, label: (0, _utils.translate)('MyBank'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'p24', settings: this.props.state, label: (0, _utils.translate)('Przelewy24'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'sepa', settings: this.props.state, label: (0, _utils.translate)('SEPA-Lastschrift'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'sofort', settings: this.props.state, label: (0, _utils.translate)('Sofort'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'venmo', settings: this.props.state, label: (0, _utils.translate)('Venmo'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })) ) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Pre-fill Billing Details') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('Pre-fill the payer\'s billing info ' + 'collected on your form on the Debit ' + 'or Credit Card checkout, so the payer ' + 'doesn\'t have to enter those details ' + 'again.') ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'billing-details', settings: this.props.state, 'default': 'false' }), _react2.default.createElement( _container2.default, _extends({}, this.props, { settings: this.props.state, value: 'true', label: (0, _utils.translate)('Enable'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Customer name (optional)') ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'billing-name', noWrapper: true }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select a name field') ), _.map(this.getFieldsByType('name'), function (field, key) { return _react2.default.createElement( 'option', { value: field.value, key: key }, (0, _escapeHtml.escapeHTML)(field.label) ); }) ) ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Customer email address (optional)') ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'billing-email', noWrapper: true }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select an email field') ), _.map(this.getFieldsByType('email'), function (field, key) { return _react2.default.createElement( 'option', { value: field.value, key: key }, (0, _escapeHtml.escapeHTML)(field.label) ); }) ) ), _react2.default.createElement( 'div', { className: 'sui-form-field', style: { marginBottom: '10px' } }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Billing address (optional)') ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { settings: this.props.state, property: 'billing-address', noWrapper: true }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select an address field') ), _.map(this.getFieldsByType('address'), function (field, key) { return _react2.default.createElement( 'option', { value: field.value, key: key }, (0, _escapeHtml.escapeHTML)(field.label) ); }) ) ), !_.isEmpty(this.props.state['billing-address']) && !this.isCountryRequired(this.props.state['billing-address']) && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Ensure the Country option is enabled and required for ' + '{{strong}}%(fieldName)s{{/strong}} to process Paypal’s transaction successfully.', { args: { fieldName: this.props.state['billing-address'] }, components: { strong: _react2.default.createElement('strong', null) } }) ) ) ) ) ), _react2.default.createElement(_empty2.default, _extends({}, this.props, { settings: this.props.state, value: 'false', label: (0, _utils.translate)('Disable') })) ) ) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Shipping Address') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('If you are selling a product that doesn\'t ' + 'need to be shipped, you can choose to disable ' + 'and hide the shipping address fields from ' + 'the PayPal payment page.') ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'shipping_address', defaultValue: 'disable', noWrapper: true }), _react2.default.createElement( 'div', { value: 'enable' }, (0, _utils.translate)('Enable') ), _react2.default.createElement( 'div', { value: 'disable' }, (0, _utils.translate)('Disable') ) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Language') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('By default, PayPal detects the language for the visitors ' + 'based on their geolocation and browser preferences. It is ' + 'recommended to pass this parameter only if you need the PayPal ' + 'buttons to render in the same language as the rest of your ' + 'site. {{link}}Supported locale codes.{{/link}}', { components: { link: _react2.default.createElement('a', { href: 'https://developer.paypal.com/docs/api/reference/locale-codes/#supported-locale-codes', target: '_blank' }) } }) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, placeholder: (0, _utils.translate)('Eg. en_US'), property: 'locale' })) ) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Debug Mode') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('PayPal debug mode helps troubleshoot any issues. However, ' + 'it\'s recommended to disable this in production as it causes ' + 'a significant increase in the script size and performance ' + 'decrease.') ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'debug_mode', defaultValue: 'disable', noWrapper: true }), _react2.default.createElement( 'div', { value: 'disable' }, (0, _utils.translate)('Disable') ), _react2.default.createElement( 'div', { value: 'enable' }, (0, _utils.translate)('Enable') ) ) ) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return PayPal; }(_react.Component); exports.default = PayPal; /***/ }), /* 537 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _wpEditor = __webpack_require__(31); var _wpEditor2 = _interopRequireDefault(_wpEditor); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var RichText = function (_Component) { _inherits(RichText, _Component); function RichText(props) { _classCallCheck(this, RichText); return _possibleConstructorReturn(this, (RichText.__proto__ || Object.getPrototypeOf(RichText)).call(this, props)); } _createClass(RichText, [{ key: 'render', value: function render() { var type = this.props.type; var modifiedVars = {}; _.assign(modifiedVars, forminatorData.variables); switch (type) { case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), property: 'field_label' })), _react2.default.createElement(_toggle2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Hide label'), property: 'hide-label' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { extraId: 'html-type', settings: this.props.state, boxClass: 'sui-tab-boxed', property: 'value', disableMiscData: false, editorOptions: modifiedVars, enableAllFormFields: false, enableAllNonFormFields: false, allowRepeater: false, excludeSubFields: true, enableFormData: true, enablePostData: false, enableUpload: 'true', allowButtonOnclick: 'true', enableParentForm: 'true', mainOptionsLabel: (0, _utils.translate)('Site Information'), mainOptions: { site_title: (0, _utils.translate)('Site Title'), site_url: (0, _utils.translate)('Site URL'), date_dmy: (0, _utils.translate)('Date') }, paymentOptions: forminatorData.payment_variables, label: (0, _utils.translate)('Value') })) ) ) ); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return RichText; }(_react.Component); exports.default = RichText; /***/ }), /* 538 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _suiVariables = __webpack_require__(50); var _suiVariables2 = _interopRequireDefault(_suiVariables); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var AllFormData = function (_Component) { _inherits(AllFormData, _Component); function AllFormData(props) { _classCallCheck(this, AllFormData); return _possibleConstructorReturn(this, (AllFormData.__proto__ || Object.getPrototypeOf(AllFormData)).call(this, props)); } _createClass(AllFormData, [{ key: 'getDisabledFields', value: function getDisabledFields() { var disabledFields = ['captcha', 'product', // 'hidden', 'page-break', // 'postdata', 'total', // 'upload', // 'stripe', 'paypal', 'password']; if (!_.isUndefined(this.props.enablePostData) && this.props.enablePostData && !_.isUndefined(this.props.enableUpload) && this.props.enableUpload) { disabledFields = ['captcha', 'product' /* , 'hidden' */, 'page-break', 'total', 'stripe', 'paypal', 'password']; } return disabledFields; } }, { key: 'getFields', value: function getFields() { var disabledFields = this.getDisabledFields(); return (0, _utils.getFields)(forminatorData.parentFormFields, disabledFields, undefined, undefined, true); } }, { key: 'render', value: function render() { var type = this.props.type; // const modifiedVars = {}; // _.assign( modifiedVars, forminatorData.variables ); // delete modifiedVars.submission_id; switch (type) { case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'input_label', label: (0, _utils.translate)('Hide or show input labels') }), _react2.default.createElement( 'span', { value: 'true' }, (0, _utils.translate)('Show') ), _react2.default.createElement( 'span', { value: 'false' }, (0, _utils.translate)('Hide') ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { settings: this.props.state, property: 'exclusion-field', type: 'textarea', placeholder: (0, _utils.translate)('Enter form fields to remove from PDF.'), boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Form field exclusion'), description: (0, _utils.translate)('Use the input option to remove specific field(s) from your PDF file.'), customClass: 'sui-variables-select-text' }), _.map(this.getFields(), function (field, index) { return _react2.default.createElement( 'option', { key: index, value: '{' + field.element_id + '}', 'data-content': field.element_id }, (0, _escapeHtml.escapeHTML)(field.label) ); }) ) ) ) ); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return AllFormData; }(_react.Component); exports.default = AllFormData; /***/ }), /* 539 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _wpEditor = __webpack_require__(31); var _wpEditor2 = _interopRequireDefault(_wpEditor); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); var _suiVariables = __webpack_require__(50); var _suiVariables2 = _interopRequireDefault(_suiVariables); var _accordionToggle = __webpack_require__(187); var _accordionToggle2 = _interopRequireDefault(_accordionToggle); var _escapeHtml = __webpack_require__(17); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Payment = function (_Component) { _inherits(Payment, _Component); function Payment(props) { _classCallCheck(this, Payment); var _this = _possibleConstructorReturn(this, (Payment.__proto__ || Object.getPrototypeOf(Payment)).call(this, props)); _this.updateProperty = _this.updateProperty.bind(_this); _this.multiFields = [{ slug: 'payment_amount', label: (0, _utils.translate)('Price') }, { slug: 'quantity', label: (0, _utils.translate)('Quantity') }, { slug: 'payment_type', label: (0, _utils.translate)('Payment Type') }, { slug: 'payment_method', label: (0, _utils.translate)('Payment Method') }, { slug: 'transaction_id', label: (0, _utils.translate)('Transaction/Payment ID') }, { slug: 'payment_status', label: (0, _utils.translate)('Payment Status') }, { slug: 'subtotal', label: (0, _utils.translate)('Subtotal') }, { slug: 'tax', label: (0, _utils.translate)('Tax') }, { slug: 'total_amount', label: (0, _utils.translate)('Total Amount') }]; return _this; } // Make it possible to update state from child components _createClass(Payment, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.setState(_defineProperty({}, slug, value)); } }, { key: 'getNameOptions', value: function getNameOptions() { var nameOptions = []; var nameFields = (0, _utils.getFields)(this.props.wrappers, [ // disable these fields 'page-break', 'postdata', 'upload', 'captcha', 'date', 'time', 'email', 'consent', 'gdprcheckbox', 'password']); nameFields.map(function (field) { nameOptions.push({ value: '{' + field.element_id + '}', label: field.label }); }); return nameOptions; } }, { key: 'render', value: function render() { var _this2 = this; var type = this.props.type; switch (type) { case 'settings': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { id: 'pdf-payment-modal', className: 'sui-accordion sui-accordion-flushed fui-modal-accordion-flushed' }, _react2.default.createElement( _accordionToggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Product name'), property: 'product_name', settings: this.props.state, required: this.props.state.product_name_required }), _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { settings: this.props.state, type: 'input', property: 'product_label', placeholder: (0, _utils.translate)('Enter Label'), defaultValue: (0, _utils.translate)('Product Name'), label: (0, _utils.translate)('Label') }), this.getNameOptions().map(function (option, i) { return _react2.default.createElement( 'option', { key: i, value: option.value }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ), _react2.default.createElement(_toggle2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Hide label'), property: 'hide-label' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { extraId: 'html-type', settings: this.props.state, boxClass: 'sui-tab-boxed', property: 'product_value', disableMiscData: true, allowRepeater: false, excludeSubFields: true, enableFormData: true, enablePostData: false, enableUpload: 'true', allowButtonOnclick: 'true', enableParentForm: 'true', mainOptions: [], label: (0, _utils.translate)('Value'), selectLabel: (0, _utils.translate)('Insert dynamic data'), tooltipLabel: (0, _utils.translate)('Add dynamic data') })) ) ) ) ), this.multiFields.map(function (field, i) { return _react2.default.createElement( _accordionToggle2.default, _extends({}, _this2.props, { label: field.label, property: field.slug, settings: _this2.props.state, required: _this2.props.state[field.slug + '_required'], key: i }), _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter label'), defaultValue: field.label, property: field.slug + '_label' })) ) ) ) ); }) ) ); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement('div', null); } } }]); return Payment; }(_react.Component); exports.default = Payment; /***/ }), /* 540 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _required = __webpack_require__(40); var _required2 = _interopRequireDefault(_required); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Rating = function (_Component) { _inherits(Rating, _Component); function Rating(props) { _classCallCheck(this, Rating); return _possibleConstructorReturn(this, (Rating.__proto__ || Object.getPrototypeOf(Rating)).call(this, props)); } _createClass(Rating, [{ key: 'render', value: function render() { var type = this.props.type; var _props$state = this.props.state, icon = _props$state.icon, size = _props$state.size, suffix = _props$state.suffix, maxRating = _props$state.max_rating; var maxRatingValue = Math.max(0, Math.min(Math.floor(Number(maxRating)), 50)); var roundedRating = Math.ceil(maxRatingValue / 2); switch (type) { case 'labels': return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Label'), placeholder: (0, _utils.translate)('Enter Label'), property: 'field_label' })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, label: (0, _utils.translate)('Description (optional)'), placeholder: (0, _utils.translate)('Enter description'), property: 'description' })) ) ) ); case 'settings': return _react2.default.createElement( 'div', null, _react2.default.createElement(_required2.default, this.props), _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Maximum Rating'), labelDark: true, description: (0, _utils.translate)('Specify the maximum rating number.'), sidebar: false }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.state, type: 'number', isPositive: true, maxValid: 50, maxValidError: (0, _utils.translate)('Max value should be 50.'), placeholder: (0, _utils.translate)('Enter Maximum Rating'), property: 'max_rating', minValue: '0', maxValue: '50', step: '1' })) ), _react2.default.createElement( _settingsRow2.default, { sidebar: false }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'div', { style: { display: 'flex', justifyContent: 'space-between' } }, _react2.default.createElement( 'div', null, _react2.default.createElement( 'span', { className: 'sui-settings-label sui-dark' }, (0, _utils.translate)('Rating Icon') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('Select the style and size of the rating icon.') ) ), _react2.default.createElement(_toggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Show suffix'), property: 'suffix', settings: this.props.state, unWrap: true })) ), _react2.default.createElement( 'div', { style: { border: '1px solid #e6e6e6', padding: '30px', borderRadius: '4px' } }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'icon', defaultValue: 'star', settings: this.props.state }), _react2.default.createElement( 'option', { value: 'star' }, (0, _utils.translate)('Star') ), _react2.default.createElement( 'option', { value: 'heart' }, (0, _utils.translate)('Heart') ), _react2.default.createElement( 'option', { value: 'like' }, (0, _utils.translate)('Thumb') ), _react2.default.createElement( 'option', { value: 'smile' }, (0, _utils.translate)('Smiley face') ) ) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'size', defaultValue: 'md', settings: this.props.state }), _react2.default.createElement( 'option', { value: 'sm' }, (0, _utils.translate)('Small - 16px') ), _react2.default.createElement( 'option', { value: 'md' }, (0, _utils.translate)('Medium - 24px') ), _react2.default.createElement( 'option', { value: 'lg' }, (0, _utils.translate)('Large - 32px') ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( 'div', { className: 'forminator-rating-field forminator-rating-preview forminator-rating-size--' + size }, _react2.default.createElement( 'div', { className: 'forminator-rating-items' }, [].concat(_toConsumableArray(Array(maxRatingValue))).map(function (value, i) { return _react2.default.createElement('span', { key: i, className: 'forminator-icon-' + icon + ' ' + (i < roundedRating ? 'forminator-rating-active' : ''), 'aria-hidden': 'true' }); }), suffix && _react2.default.createElement( 'span', { className: 'forminator-rating-suffix' }, '(' + roundedRating + '/' + maxRatingValue + ')' ) ) ) ) ) ) ) ) ); case 'visibility': return _react2.default.createElement(_visibility2.default, this.props); case 'styling': return _react2.default.createElement(_styling2.default, this.props); default: return _react2.default.createElement( 'div', null, (0, _utils.translate)('Wrong field type!') ); } } }]); return Rating; }(_react.Component); exports.default = Rating; /***/ }), /* 541 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _colorPicker = __webpack_require__(6); var _colorPicker2 = _interopRequireDefault(_colorPicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var AdvancedSettings = function (_Component) { _inherits(AdvancedSettings, _Component); function AdvancedSettings(props) { _classCallCheck(this, AdvancedSettings); var _this = _possibleConstructorReturn(this, (AdvancedSettings.__proto__ || Object.getPrototypeOf(AdvancedSettings)).call(this, props)); var fieldData = (0, _utils.getForminatorField)(_this.props.state); _this.settings = fieldData.settings; return _this; } _createClass(AdvancedSettings, [{ key: 'render', value: function render() { var _this2 = this; var settings = _.map(this.settings, function (setting, i) { switch (setting.type) { case 'Toggle': return _react2.default.createElement( _col2.default, { cols: setting.size, customClass: setting.className, key: i }, _react2.default.createElement(_toggle2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: setting.label || '', placeholder: setting.placeholder || '', property: setting.name, defaultValue: setting.default })) ); case 'Text': return _react2.default.createElement( _col2.default, { cols: setting.size, key: i }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: setting.label || '', placeholder: setting.placeholder || '', property: setting.name, defaultValue: setting.default })) ); case 'Color': return _react2.default.createElement( _col2.default, { cols: setting.size, key: i }, _react2.default.createElement(_colorPicker2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: setting.label || '', placeholder: setting.placeholder || '', property: setting.name, defaultValue: setting.default })) ); case 'Select': return _react2.default.createElement( _col2.default, { cols: setting.size, key: i }, _react2.default.createElement( _suiSelect2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: setting.label || '', placeholder: setting.placeholder || '', property: setting.name, defaultValue: setting.default }), _.map(setting.values, function (value, x) { return _react2.default.createElement( 'option', { value: value.value, key: x }, (0, _escapeHtml.escapeHTML)(value.label) ); }) ) ); case 'Radio': return _react2.default.createElement( _col2.default, { cols: setting.size, key: i }, _react2.default.createElement( _radio2.default, _extends({}, _this2.props, { settings: _this2.props.state, label: setting.label || '', placeholder: setting.placeholder || '', property: setting.name, defaultValue: setting.default }), _.map(setting.values, function (value, x) { return _react2.default.createElement( _container2.default, { value: value.value, key: x }, (0, _escapeHtml.escapeHTML)(value.label) ); }) ) ); default: return _react2.default.createElement( 'div', null, (0, _utils.translate)('Unknown setting') ); } }); return _react2.default.createElement( 'div', { className: 'forminator-advanced-settings' }, _react2.default.createElement( _row2.default, null, settings ) ); } }]); return AdvancedSettings; }(_react.Component); exports.default = AdvancedSettings; /***/ }), /* 542 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var previewModal = function (_Component) { _inherits(previewModal, _Component); function previewModal(props) { _classCallCheck(this, previewModal); var _this = _possibleConstructorReturn(this, (previewModal.__proto__ || Object.getPrototypeOf(previewModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.previewLoaded = _this.previewLoaded.bind(_this); return _this; } _createClass(previewModal, [{ key: 'componentDidMount', value: function componentDidMount() { this.$el = jQuery(this.el); this.$body = jQuery(this.body); this.mounted = true; this.load(); jQuery(document).off('after.load.forminator'); jQuery(document).on('after.load.forminator', this.previewLoaded); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.mounted = false; // Restore window.jQuery in case member used WPEditor instance, only if Post Data element exist if ((0, _utils.hasFieldType)('postdata', this.props.wrappers)) { window.jQuery = window.jQueryFormi; } } }, { key: 'previewLoaded', value: function previewLoaded() { this.$body.find('.sui-notice-loading').remove(); } }, { key: 'load', value: function load() { var state = { wrappers: this.props.wrappers, settings: this.props.settings }; var config = { id: this.props.id, action: 'forminator_load_form', type: 'forminator_forms', nonce: forminatorData.previewNonce, render_id: 0, is_preview: 1, preview_data: state, last_submit_data: {} }; this.$el.forminatorLoader(config); } }, { key: 'render', value: function render() { var _this2 = this; return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { closeType: 'icon', closeModal: this.closeModal }, _react2.default.createElement(_title2.default, { label: (0, _utils.translate)('Preview') }) ), _react2.default.createElement( 'div', { className: 'sui-box-body', ref: function ref(body) { return _this2.body = body; } }, _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-loading sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-loader sui-loading', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Loading preview…') ) ) ) ), _react2.default.createElement('form', { ref: function ref(el) { return _this2.el = el; }, id: 'forminator-module-' + this.props.id, 'data-forminator-render': '0', className: 'sui-hidden' }) ) ); } }]); return previewModal; }(_react.Component); exports.default = previewModal; /***/ }), /* 543 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactRouterDom = __webpack_require__(24); var _utils = __webpack_require__(1); var _visibility = __webpack_require__(27); var _visibility2 = _interopRequireDefault(_visibility); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); var _footer = __webpack_require__(59); var _footer2 = _interopRequireDefault(_footer); var _close = __webpack_require__(63); var _close2 = _interopRequireDefault(_close); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var submitModal = function (_Component) { _inherits(submitModal, _Component); function submitModal(props) { _classCallCheck(this, submitModal); var _this = _possibleConstructorReturn(this, (submitModal.__proto__ || Object.getPrototypeOf(submitModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.updateProperty = _this.updateProperty.bind(_this); _this.applyChanges = _this.applyChanges.bind(_this); _this.state = _this.props.settings.submitData || {}; return _this; } // Make it possible to update state from child components _createClass(submitModal, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.setState(_defineProperty({}, slug, value)); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.props.router.navigate('/builder/'); } }, { key: 'applyChanges', value: function applyChanges() { this.props.actions.settingsActions.updateSetting('submitData', this.state); // Close modal this.closeModal(); } }, { key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { closeType: 'icon', closeModal: this.closeModal }, _react2.default.createElement(_title2.default, { label: (0, _utils.translate)('Edit Field'), tag: (0, _utils.translate)('Submit') }) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'div', { className: 'sui-tabs sui-tabs-flushed' }, _react2.default.createElement( 'div', { className: 'sui-tabs-menu' }, _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/labels', className: function className(_ref) { var isActive = _ref.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Labels') ), _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/visibility/', className: function className(_ref2) { var isActive = _ref2.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Visibility') ), _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/styling/', className: function className(_ref3) { var isActive = _ref3.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Styling') ) ), _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/', element: _react2.default.createElement(_reactRouterDom.Navigate, { to: '/builder/labels', replace: true }) }) ), _react2.default.createElement( 'div', { className: 'sui-tabs-content' }, _react2.default.createElement( 'div', { className: 'sui-tab-content active' }, _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/labels', element: _react2.default.createElement( 'div', { key: 'builder-labels' }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.state, label: (0, _utils.translate)('Button text'), placeholder: (0, _utils.translate)('Enter text'), property: 'custom-submit-text', updateProperty: this.updateProperty })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.state, label: (0, _utils.translate)('Error message'), placeholder: (0, _utils.translate)('Enter message'), property: 'custom-invalid-form-message', updateProperty: this.updateProperty })) ) ) ) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/visibility', element: _react2.default.createElement(_visibility2.default, _extends({}, this.props, { updateProperty: this.updateProperty, settings: this.state, state: this.state })) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/styling', element: _react2.default.createElement(_styling2.default, _extends({}, this.props, { updateProperty: this.updateProperty, state: this.state })) }) ) ) ) ) ), _react2.default.createElement( _footer2.default, { alignment: 'separated' }, _react2.default.createElement(_close2.default, { icon: 'undo', label: (0, _utils.translate)('Discard Changes'), closeModal: this.closeModal, customClass: 'sui-button-ghost forminator-discard-field-settings' }), _react2.default.createElement( 'button', { className: 'sui-button forminator-save-field-settings', onClick: this.applyChanges }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }), (0, _utils.translate)('Apply') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ); } }]); return submitModal; }(_react.Component); exports.default = (0, _withRouter.withRouter)(submitModal); /***/ }), /* 544 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var publishModal = function (_Component) { _inherits(publishModal, _Component); function publishModal(props) { _classCallCheck(this, publishModal); var _this = _possibleConstructorReturn(this, (publishModal.__proto__ || Object.getPrototypeOf(publishModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); return _this; } _createClass(publishModal, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { className: 'sui-box-header ' + 'sui-flatten ' + 'sui-content-center ' + 'sui-spacing-top--60' + ('' + (forminatorData.showBranding ? ' sui-spacing-bottom--30' : ' sui-spacing-bottom--60')) }, _react2.default.createElement('span', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }), _react2.default.createElement( 'h3', { className: 'sui-box-title sui-lg', id: 'dialogTitle' }, (0, _utils.translate)('Publishing form…') ), _react2.default.createElement( 'p', { className: 'sui-description' }, (0, _utils.translate)('Great work! Please hold tight a few moments while ' + 'we publish your form to the world.') ) ) ); } }]); return publishModal; }(_react.Component); exports.default = publishModal; /***/ }), /* 545 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactRouterDom = __webpack_require__(24); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _close = __webpack_require__(63); var _close2 = _interopRequireDefault(_close); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _footer = __webpack_require__(59); var _footer2 = _interopRequireDefault(_footer); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var deleteModal = function (_Component) { _inherits(deleteModal, _Component); function deleteModal(props) { _classCallCheck(this, deleteModal); var _this = _possibleConstructorReturn(this, (deleteModal.__proto__ || Object.getPrototypeOf(deleteModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.closeSettingModal = _this.closeSettingModal.bind(_this); _this.trashField = _this.trashField.bind(_this); return _this; } _createClass(deleteModal, [{ key: 'trashField', value: function trashField() { // Delete field this.props.modal.modalProps.trashField(); // Close modal this.closeModal(); this.closeNotice(); } }, { key: 'closeNotice', value: function closeNotice() { var hasStripe = (0, _utils.hasFieldType)('stripe', this.props.wrappers); var hasPayPal = (0, _utils.hasFieldType)('paypal', this.props.wrappers); if (hasStripe && !hasPayPal || hasPayPal && !hasStripe) { var $popup = jQuery('#forminator-notification'); $popup.stop().slideUp('slow'); } } }, { key: 'editSettings', value: function editSettings(reference) { var wrappersString = JSON.stringify(this.props.wrappers); var wrappers = JSON.parse(wrappersString); var wraps = wrappers.map(function (wrapper) { wrapper.fields = wrapper.fields.filter(function (field) { return field.element_id === reference.id; }); return wrapper; }); var wrap = wraps.filter(function (wrapper) { return !_.isEmpty(wrapper.fields); }); this.closeModal(); // Hide field settings menu this.props.actions.modalActions.showModal({ open: true, field: reference.field.fieldData, wrapper: wrap[0], closeModal: this.closeSettingModal, isValid: true }, 'field-settings'); } }, { key: 'closeSettingModal', value: function closeSettingModal(event) { this.props.actions.modalActions.showModal({ open: false, field: this.props.field, wrapper: this.props.wrapper }, 'field-settings'); } }, { key: 'render', value: function render() { var _this2 = this; var self = this; var goToSection = function goToSection(module) { _this2.closeModal(); setTimeout(function () { self.props.router.navigate('/' + module); }, 800); }; var fieldLabel = !_.isEmpty(this.props.modal.modalProps.field.field_label) ? this.props.modal.modalProps.field.field_label : this.props.modal.modalProps.field.element_id; var mappedMetaKeys = _.filter(this.props.settings, function (value, key) { return 0 === key.indexOf('registration'); }); var calcFields = (0, _utils.getCalculationFields)(this.props.wrappers); var references = []; _.each(calcFields, function (field) { // Make sure formula field is defined if (_.isUndefined(field.formula) || field.formula === false) { field.formula = ''; } if (field.formula.indexOf('{' + _this2.props.modal.modalProps.field.element_id + '}') >= 0) { references.push({ id: field.element_id, label: field.label, field: field }); } }); if (_.isEmpty(references)) { var title = 'group' === this.props.modal.modalProps.field.type ? (0, _utils.translate)('Delete Field Group') : (0, _utils.translate)('Delete Field'); var descr = 'group' === this.props.modal.modalProps.field.type ? (0, _utils.translate)('Are you sure you want to delete this group and all the fields it contains?') : (0, _utils.translate)('Deleting this field {%(name)s} will also remove ' + 'associated values from existing submissions.', { args: { name: this.props.modal.modalProps.field.element_id } }); return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { flatten: true, alignment: 'center', closeType: 'icon', closeModal: this.closeModal, customClass: 'sui-spacing-top--60' }, _react2.default.createElement(_title2.default, { id: this.props.modal.modalProps.id, label: title, size: 'lg' }), _react2.default.createElement( 'p', { id: 'modal-desc-' + this.props.modal.modalProps.id, className: 'sui-description' }, descr ), mappedMetaKeys.length > 0 && -1 !== mappedMetaKeys.indexOf(this.props.modal.modalProps.field.element_id) && _react2.default.createElement( 'p', { className: 'sui-description' }, (0, _utils.translate)('Note that this field is mapped in {{link}}Default Meta Keys{{/link}}. ' + 'If deleted, you will need to remap meta keys {{link}}here{{/link}}.', { components: { link: _react2.default.createElement('a', { onClick: function onClick() { return goToSection('registration'); }, style: { cursor: 'pointer' } }) } }) ) ), _react2.default.createElement( _footer2.default, { customClass: 'sui-flatten sui-content-center' }, _react2.default.createElement(_close2.default, { label: (0, _utils.translate)('Cancel'), closeModal: this.closeModal, customClass: 'sui-button-ghost' }), _react2.default.createElement( 'button', { className: 'sui-button sui-button-red sui-button-ghost', onClick: this.trashField }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), (0, _utils.translate)('Delete') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ); } if (!_.isEmpty(references)) { var refMarkup = _.map(references, function (reference, index) { return _react2.default.createElement( 'li', { className: 'wpmudev-dropdown--option', key: index }, _react2.default.createElement('i', { className: 'fui-list-icon sui-icon-calculator', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'fui-list-label' }, (0, _escapeHtml.escapeHTML)(reference.label) ), _react2.default.createElement( 'button', { className: 'sui-button-icon', onClick: _this2.editSettings.bind(_this2, reference) }, _react2.default.createElement('i', { className: 'sui-icon-pencil', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Edit Field') ) ) ); }); return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { flatten: true, alignment: 'center', closeType: 'icon', closeModal: this.closeModal, customClass: 'sui-spacing-top--60' }, _react2.default.createElement(_title2.default, { id: this.props.modal.modalProps.id, label: (0, _utils.translate)('Delete Field') }), _react2.default.createElement( 'p', { id: 'modal-desc-' + this.props.modal.modalProps.id, className: 'sui-description' }, (0, _utils.translate)('Please remove the references to this field from ' + 'the following form fields first.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Form Fields') ), _react2.default.createElement( 'ul', { className: 'fui-list-fields' }, refMarkup ) ) ), _react2.default.createElement( _footer2.default, { flatten: true, alignment: 'center' }, _react2.default.createElement(_close2.default, { label: (0, _utils.translate)('Got It'), closeModal: this.closeModal }) ) ); } } }]); return deleteModal; }(_react.Component); exports.default = (0, _withRouter.withRouter)(deleteModal); /***/ }), /* 546 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _notifications = __webpack_require__(28); var _notifications2 = _interopRequireDefault(_notifications); var _reactButtonIcon = __webpack_require__(21); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var shortcodeModal = function (_Component) { _inherits(shortcodeModal, _Component); function shortcodeModal(props) { _classCallCheck(this, shortcodeModal); var _this = _possibleConstructorReturn(this, (shortcodeModal.__proto__ || Object.getPrototypeOf(shortcodeModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.copyToClipboard = _this.copyToClipboard.bind(_this); return _this; } _createClass(shortcodeModal, [{ key: 'copyToClipboard', value: function copyToClipboard() { this.input.select(); document.execCommand('copy'); var custom = new _notifications2.default({ type: 'success', text: (0, _utils.translate)('Shortcode has been copied successfully.'), time: 4000 }); custom.open(); } }, { key: 'render', value: function render() { var _this2 = this; return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { className: 'sui-box-header sui-flatten sui-content-center sui-spacing-top--60' }, _react2.default.createElement(_reactButtonIcon.ButtonIcon, { icon: 'close', iconSize: 'md', label: (0, _utils.translate)('Close this dialog window'), className: 'sui-button-float--right forminator-cancel-create-form', onClick: this.closeModal }), _react2.default.createElement('span', { className: 'sui-icon-check sui-lg', 'aria-hidden': 'true' }), _react2.default.createElement( 'h3', { id: 'dialogTitle', className: 'sui-box-title sui-lg' }, (0, _utils.translate)('Ready to go!') ), _react2.default.createElement( 'p', { className: 'sui-description' }, (0, _utils.translate)('Your form is now ready to be embedded into a page or ' + 'template of your choice. Simply copy and paste the ' + 'shortcode below to display it!') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body' + (forminatorData.showBranding ? '' : ' sui-spacing-bottom--60') }, _react2.default.createElement( 'div', { id: 'forminator-form-name-input', className: 'sui-form-field' }, _react2.default.createElement( 'label', { htmlFor: 'forminator-form-name', className: 'sui-label' }, (0, _utils.translate)('Shortcode') ), _react2.default.createElement( 'div', { className: 'sui-with-button sui-with-button-icon' }, _react2.default.createElement('input', { type: 'text', defaultValue: '[forminator_form id="' + this.props.id + '"]', id: 'forminator-form-shortcode', className: 'sui-form-control', ref: function ref(input) { return _this2.input = input; } }), _react2.default.createElement(_reactButtonIcon.ButtonIcon, { icon: 'copy', iconSize: 'sm', label: (0, _utils.translate)('Copy shortcode'), onClick: this.copyToClipboard }) ) ) ) ); } }]); return shortcodeModal; }(_react.Component); exports.default = shortcodeModal; /***/ }), /* 547 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _axios = __webpack_require__(37); var _axios2 = _interopRequireDefault(_axios); var _qs = __webpack_require__(38); var _qs2 = _interopRequireDefault(_qs); var _notifications = __webpack_require__(28); var _notifications2 = _interopRequireDefault(_notifications); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var applyPresetModal = function (_Component) { _inherits(applyPresetModal, _Component); function applyPresetModal(props) { _classCallCheck(this, applyPresetModal); var _this = _possibleConstructorReturn(this, (applyPresetModal.__proto__ || Object.getPrototypeOf(applyPresetModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); return _this; } _createClass(applyPresetModal, [{ key: 'applyPreset', value: function applyPreset() { var _this2 = this; var settings = this.props.settings, $target = jQuery('#forminator-apply-preset'), ids = [forminatorData.currentForm.settings.form_id], presetId = jQuery('#forminator-field-appearance_preset').val(); $target.addClass('sui-button-onload-text'); var object = { action: 'forminator_apply_appearance_preset', _ajax_nonce: forminatorData.modules.ApplyPreset.nonce, edit_form: true, settings: JSON.stringify(settings), preset_id: presetId, ids: ids }; _axios2.default.post(forminatorData.ajaxUrl, _qs2.default.stringify(object)).then(function (data) { if (data.data.success) { _this2.props.actions.settingsActions.resetSettings(data.data.data); jQuery('.sui-accordion-item--open .sui-accordion-item-header').trigger('click'); _this2.closeModal(); var custom = new _notifications2.default({ type: 'success', text: (0, _utils.translate)('Appearance preset successfully applied.'), time: 4000 }); custom.open(); } else { var _custom = new _notifications2.default({ type: 'error', text: data.data.data }); _custom.open(); } }).catch(function (err) { var custom = new _notifications2.default({ type: 'error', text: (0, _utils.translate)('Something went wrong. Please try again.') }); custom.open(); console.log(err); }).then(function () { setTimeout(function () { $target.removeClass('sui-button-onload-text'); }, 1000); }); } }, { key: 'render', value: function render() { var _this3 = this; return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { className: 'sui-box-header sui-flatten sui-content-center sui-spacing-top--60', style: { paddingBottom: '0' } }, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-button-float--right forminator-popup-close forminator-cancel-create-form', 'aria-label': (0, _utils.translate)('Close this dialog window'), onClick: this.closeModal }, _react2.default.createElement('span', { className: 'sui-icon-close sui-md', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Close this dialog window') ) ), _react2.default.createElement( 'h3', { className: 'sui-box-title sui-lg', id: 'dialogTitle' }, forminatorData.modules.ApplyPreset.title ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginTop: '15px' } }, (0, _utils.translate)('Select an appearance preset from the list below to apply the appearance to your form. ' + 'You can edit or create new presets in {{link}}Settings > Appearance Preset{{/link}}', { components: { link: _react2.default.createElement('a', { href: forminatorData.modules.ApplyPreset.presetUrl, target: '_blank' }) } }) ) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'div', { className: 'sui-form-field', style: { marginBottom: '10px' } }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'appearance_preset' }), _.map(forminatorData.modules.ApplyPreset.presets, function (label, x) { return _react2.default.createElement( 'option', { value: x, key: x }, label ); }) ) ), _react2.default.createElement( 'div', { className: 'sui-notice', style: { marginTop: '10px' } }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info sui-md', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Your form\'s current appearance configurations will be overwritten.') ) ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-footer sui-flatten sui-content-center', style: { paddingTop: '0' } }, _react2.default.createElement( 'button', { id: 'forminator-apply-preset', className: 'sui-button sui-button-blue', onClick: function onClick() { return _this3.applyPreset(); } }, _react2.default.createElement( 'span', { className: 'sui-button-text-default' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }), ' ', forminatorData.modules.ApplyPreset.button ), _react2.default.createElement( 'span', { className: 'sui-button-text-onload' }, _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }), (0, _utils.translate)('Applying preset...') ) ) ) ); } }]); return applyPresetModal; }(_react.Component); exports.default = applyPresetModal; /***/ }), /* 548 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactRouterDom = __webpack_require__(24); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _radioOptions = __webpack_require__(115); var _radioOptions2 = _interopRequireDefault(_radioOptions); var _paginationCustomText = __webpack_require__(549); var _paginationCustomText2 = _interopRequireDefault(_paginationCustomText); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _footer = __webpack_require__(59); var _footer2 = _interopRequireDefault(_footer); var _close = __webpack_require__(63); var _close2 = _interopRequireDefault(_close); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var paginationModal = function (_Component) { _inherits(paginationModal, _Component); function paginationModal(props) { _classCallCheck(this, paginationModal); var _this = _possibleConstructorReturn(this, (paginationModal.__proto__ || Object.getPrototypeOf(paginationModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.updateProperty = _this.updateProperty.bind(_this); _this.applyChanges = _this.applyChanges.bind(_this); _this.state = _this.props.settings.paginationData || {}; _this.fields = (0, _utils.getFields)(_this.props.wrappers, []); _this.fields = _.filter(_this.fields, function (field) { return field.field_type === 'page-break'; }); return _this; } // Make it possible to update state from child components _createClass(paginationModal, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.setState(_defineProperty({}, slug, value)); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.props.router.navigate('/builder/'); } }, { key: 'applyChanges', value: function applyChanges() { this.props.actions.settingsActions.updateSetting('paginationData', this.state); // Close modal this.closeModal(); } }, { key: 'render', value: function render() { var _this2 = this; var fieldLength = this.fields.length; return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { closeType: 'icon', closeModal: this.closeModal }, _react2.default.createElement(_title2.default, { label: (0, _utils.translate)('Edit Field'), tag: (0, _utils.translate)('Pagination') }) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'div', { className: 'sui-tabs sui-tabs-flushed' }, _react2.default.createElement( 'div', { className: 'sui-tabs-menu' }, _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/labels', className: function className(_ref) { var isActive = _ref.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Labels') ), _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/settings/', className: function className(_ref2) { var isActive = _ref2.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Settings') ) ), _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/', element: _react2.default.createElement(_reactRouterDom.Navigate, { to: '/builder/labels', replace: true }) }) ), _react2.default.createElement( 'div', { className: 'sui-tabs-content' }, _react2.default.createElement( 'div', { className: 'sui-tab-content active' }, _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/labels', element: _react2.default.createElement( 'div', { key: 'builder-labels' }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Your form is divided into multiple pages by ' + 'Page Break field(s), and you can customize the label ' + 'of each page here. Page names appear on your form header ' + 'along with the progress indicator.') ) ) ), _.map(this.fields, function (field, x) { return _react2.default.createElement( _row2.default, { key: field.element_id }, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, _this2.props, { settings: _this2.state, label: 'Page ' + (x + 1), defaultValue: 'Page ' + (x + 1), property: field.element_id + '-steps', updateProperty: _this2.updateProperty })) ) ); }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.state, label: (0, _utils.translate)('Finish'), defaultValue: 'Finish', property: 'last-steps', updateProperty: this.updateProperty })) ) ) ) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/settings', element: _react2.default.createElement( 'div', { key: 'builder-settings' }, _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { settings: this.state, property: 'pagination-header-design', settingsLabel: (0, _utils.translate)('Progress Indicator'), 'default': 'show', description: (0, _utils.translate)('Choose whether to show a progress indicator ' + 'on top of your form, so your users know how ' + 'far they are through your form.'), updateProperty: this.updateProperty }), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'show', boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Show') }), _react2.default.createElement( _radioOptions2.default, _extends({}, this.props, { settings: this.state, defaultValue: 'nav', radioClass: 'sui-radio-sm', property: 'pagination-header', updateProperty: this.updateProperty }), _react2.default.createElement( 'div', { value: 'nav', hasImage: true, image1x: 'pagination-steps.png', image2x: 'pagination-steps@2x.png' }, (0, _utils.translate)('Steps') ), _react2.default.createElement( 'div', { value: 'bar', hasImage: true, image1x: 'pagination-progress-bar.png', image2x: 'pagination-progress-bar@2x.png' }, (0, _utils.translate)('Progress Bar') ) ) ), _react2.default.createElement( _empty2.default, { value: 'off' }, (0, _utils.translate)('Hide') ) ) ), _react2.default.createElement( _settingsRow2.default, null, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { settings: this.state, property: 'pagination-labels', settingsLabel: (0, _utils.translate)('Buttons Text'), 'default': 'default', description: (0, _utils.translate)('Choose whether you want to use default text for the ' + 'Previous and Next button or use custom text.'), updateProperty: this.updateProperty }), _react2.default.createElement( _empty2.default, { value: 'default' }, (0, _utils.translate)('Default') ), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'custom', label: (0, _utils.translate)('Custom') }), _react2.default.createElement(_paginationCustomText2.default, _extends({}, this.props, { field: this.fields, length: fieldLength, updateProperty: this.updateProperty, state: this.state })) ) ) ) ) }) ) ) ) ) ), _react2.default.createElement( _footer2.default, { alignment: 'separated' }, _react2.default.createElement(_close2.default, { icon: 'undo', label: (0, _utils.translate)('Discard Changes'), closeModal: this.closeModal, customClass: 'sui-button-ghost forminator-discard-field-settings' }), _react2.default.createElement( 'button', { className: 'sui-button forminator-save-field-settings', onClick: this.applyChanges }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }), (0, _utils.translate)('Apply') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ); } }]); return paginationModal; }(_react.Component); exports.default = (0, _withRouter.withRouter)(paginationModal); /***/ }), /* 549 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var PaginationButtonTable = function (_Component) { _inherits(PaginationButtonTable, _Component); function PaginationButtonTable(props) { _classCallCheck(this, PaginationButtonTable); return _possibleConstructorReturn(this, (PaginationButtonTable.__proto__ || Object.getPrototypeOf(PaginationButtonTable)).call(this, props)); } _createClass(PaginationButtonTable, [{ key: 'render', value: function render() { var _this2 = this; return _react2.default.createElement( 'table', { className: 'sui-table fui-table--pagination' }, _react2.default.createElement( 'thead', null, _react2.default.createElement( 'tr', null, _react2.default.createElement( 'th', null, (0, _utils.translate)('Page') ), _react2.default.createElement( 'th', null, (0, _utils.translate)('Previous Button') ), _react2.default.createElement( 'th', null, (0, _utils.translate)('Next Button') ) ) ), _react2.default.createElement( 'tbody', null, _.map(this.props.field, function (field, x) { return _react2.default.createElement( 'tr', null, _react2.default.createElement( 'td', { className: 'sui-table-item-title' }, 'Page ' + (x + 1) ), _react2.default.createElement( 'td', null, x <= 0 && _react2.default.createElement( 'strong', { style: { color: '#888888' } }, (0, _utils.translate)('No Previous button') ), x > 0 && _react2.default.createElement('input', { type: 'text', placeholder: (0, _utils.translate)('Previous'), className: 'sui-form-control', value: !_.isUndefined(_this2.props.state[field.element_id + '-previous']) ? _this2.props.state[field.element_id + '-previous'] : (0, _utils.translate)('Previous'), onChange: function onChange(e) { _this2.props.updateProperty(field.element_id + '-previous', e.target.value); } }) ), _react2.default.createElement( 'td', null, _react2.default.createElement('input', { type: 'text', placeholder: (0, _utils.translate)('Next'), className: 'sui-form-control', value: !_.isUndefined(_this2.props.state[field.element_id + '-next']) ? _this2.props.state[field.element_id + '-next'] : (0, _utils.translate)('Next'), onChange: function onChange(e) { _this2.props.updateProperty(field.element_id + '-next', e.target.value); } }) ) ); }), _react2.default.createElement( 'tr', null, _react2.default.createElement( 'td', { className: 'sui-table-item-title' }, 'Page ' + (this.props.length + 1) ), _react2.default.createElement( 'td', null, _react2.default.createElement('input', { type: 'text', placeholder: (0, _utils.translate)('Previous'), className: 'sui-form-control', value: !_.isUndefined(this.props.state['last-previous']) ? this.props.state['last-previous'] : (0, _utils.translate)('Previous'), onChange: function onChange(e) { _this2.props.updateProperty('last-previous', e.target.value); } }) ), _react2.default.createElement( 'td', null, _react2.default.createElement( 'strong', { style: { color: '#888888' } }, (0, _utils.translate)('No Next button') ) ) ) ) ); } }]); return PaginationButtonTable; }(_react.Component); exports.default = PaginationButtonTable; /***/ }), /* 550 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactRouterDom = __webpack_require__(24); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _wpEditor = __webpack_require__(31); var _wpEditor2 = _interopRequireDefault(_wpEditor); var _suiVariables = __webpack_require__(50); var _suiVariables2 = _interopRequireDefault(_suiVariables); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _emailRouting = __webpack_require__(551); var _emailRouting2 = _interopRequireDefault(_emailRouting); var _conditions = __webpack_require__(553); var _conditions2 = _interopRequireDefault(_conditions); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); var _footer = __webpack_require__(59); var _footer2 = _interopRequireDefault(_footer); var _close = __webpack_require__(63); var _close2 = _interopRequireDefault(_close); var _pdfAttachment = __webpack_require__(555); var _pdfAttachment2 = _interopRequireDefault(_pdfAttachment); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var notificationModal = function (_Component) { _inherits(notificationModal, _Component); function notificationModal(props) { _classCallCheck(this, notificationModal); var _this = _possibleConstructorReturn(this, (notificationModal.__proto__ || Object.getPrototypeOf(notificationModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.updateProperty = _this.updateProperty.bind(_this); _this.applyChanges = _this.applyChanges.bind(_this); _this.data = Object.assign({}, _this.props.modal.modalProps); _this.state = _this.data.notification; return _this; } // Make it possible to update state from child components _createClass(notificationModal, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.setState(_defineProperty({}, slug, value)); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.props.router.navigate('/notifications/'); } }, { key: 'getNameOptions', value: function getNameOptions() { var nameOptions = []; var nameFields = (0, _utils.getFields)(this.props.wrappers, [ // disable these fields 'page-break', 'postdata', 'upload', 'captcha', 'date', 'time', 'email', 'consent', 'gdprcheckbox', 'password']); nameFields.map(function (field) { nameOptions.push({ value: '{' + field.element_id + '}', label: field.label }); }); return nameOptions; } }, { key: 'getEmailOptions', value: function getEmailOptions() { var emailOptions = []; var emailFields = (0, _utils.getFields)(this.props.wrappers, [ // disable these fields 'address', 'captcha', 'date', 'consent', 'gdprcheckbox', 'html', 'name', 'number', 'slider', 'page-break', 'phone', 'postdata', 'section', 'time', 'upload', 'website', 'textarea', 'text', 'paypal', 'stripe', 'currency', 'calculation', 'password', 'signature', 'rating']); emailFields.map(function (field) { emailOptions.push({ value: '{' + field.element_id + '}', label: field.label }); }); return emailOptions; } }, { key: 'getRecipientAddressesOptions', value: function getRecipientAddressesOptions() { var recipientEmailOptions = this.getEmailOptions(); var recipientEmailOptionsValues = []; recipientEmailOptions.map(function (opt) { recipientEmailOptionsValues.push({ id: opt.value, text: opt.label }); }); return recipientEmailOptionsValues; } }, { key: 'getRecipientTagsOptions', value: function getRecipientTagsOptions() { var getRecipient = this.getRecipientAddressesOptions(); return { tags: true, tokenSeparators: [',', ' '], language: { searching: function searching() { return (0, _utils.translate)('Searching'); }, noResults: function noResults() { return (0, _utils.translate)('No Result Found'); } }, placeholder: (0, _utils.translate)('Recipient(s)'), ajax: { url: forminatorData.ajaxUrl, type: 'POST', delay: 350, data: function data(params) { return { action: 'forminator_builder_search_emails', _wpnonce: forminatorData.searchNonce, q: params.term, permission: 'forminator' }; }, processResults: function processResults(data) { return { results: getRecipient.concat(data.data) }; }, cache: true }, templateResult: function templateResult(result) { if (!_.isUndefined(result.id) && !_.isUndefined(result.text) && !_.isUndefined(result.display_name)) { return jQuery('<span>' + '<b>' + result.text + '</b> - ' + '<small>' + result.display_name + '</small>' + '</span>'); } return result.text; }, createTag: function createTag(params) { var term = params.term.trim(); if (!(0, _utils.isEmailWp)(term)) { return null; } return { id: term, text: term }; } }; } }, { key: 'applyChanges', value: function applyChanges() { // We have new Notification, insert new one if (this.data.new) { var newNotification = Object.assign({}, this.state); var newState = [].concat(_toConsumableArray(this.data.notifications), [newNotification]); this.props.actions.notificationsActions.updateNotifications(newState); } // We edit existing Notification, update it if (!this.data.new) { this.props.actions.notificationsActions.updateNotification(this.state); } // Close modal this.closeModal(); } }, { key: 'render', value: function render() { var emailRecipient = !_.isUndefined(this.state['email-recipients']) ? this.state['email-recipients'] : 'default'; var hasUpload = (0, _utils.hasFieldType)('upload', this.props.wrappers); var notifType = !_.isUndefined(this.state['type']) ? this.state['type'] : 'default'; var isValid = true, validationError = '', styles = {}; if (emailRecipient === 'default') { if (_.isEmpty(this.state['recipients'])) { isValid = false; validationError = (0, _utils.translate)('Please enter recipients'); } } if (emailRecipient === 'routing') { if (!_.isUndefined(this.state.routing) && !_.isEmpty(this.state.routing)) { _.each(this.state.routing, function (element) { if (_.isEmpty(element.email)) { validationError = (0, _utils.translate)('Please enter recipients'); isValid = false; } if (_.isEmpty(element.rule)) { validationError = (0, _utils.translate)('Please select rule'); isValid = false; } }); } else { validationError = (0, _utils.translate)('Please add email routing'); isValid = false; } } var registrationActivationMethod = '', notificationEmailSubject = 'email-subject', notificationEmailEditor = 'email-editor'; if ('registration' === this.props.formType) { registrationActivationMethod = !_.isUndefined(this.props.settings['activation-method']) ? this.props.settings['activation-method'] : ''; switch (registrationActivationMethod) { case 'email': notificationEmailSubject = 'email-subject-method-email'; notificationEmailEditor = 'email-editor-method-email'; break; case 'manual': notificationEmailSubject = 'email-subject-method-manual'; notificationEmailEditor = 'email-editor-method-manual'; break; case 'default': default: notificationEmailSubject = 'email-subject'; notificationEmailEditor = 'email-editor'; break; } } if (_.isUndefined(this.state[notificationEmailEditor]) || _.isEmpty(this.state[notificationEmailEditor])) { isValid = false; validationError = (0, _utils.translate)('Please fix the error(s) in the EMAIL tab.'); } if (_.isUndefined(this.state[notificationEmailSubject]) || _.isEmpty(this.state[notificationEmailSubject])) { isValid = false; validationError = (0, _utils.translate)('Please fix the error(s) in the EMAIL tab.'); } if (!_.isEmpty(this.state['form-email'])) { styles = { display: 'block' }; } return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { closeType: 'icon', closeModal: this.closeModal, customClass: 'forminator-builder-fields-close' }, _react2.default.createElement(_title2.default, { id: '' // Missing id. , label: (0, _utils.translate)('Add Email Notification') }) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'div', { className: 'sui-tabs sui-tabs-flushed' }, _react2.default.createElement( 'div', { className: 'sui-tabs-menu' }, _react2.default.createElement( _reactRouterDom.NavLink, { to: '/notifications/email/', className: function className(_ref) { var isActive = _ref.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Email') ), 'save_draft' !== notifType && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/notifications/recipients/', className: function className(_ref2) { var isActive = _ref2.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Recipients') ), _react2.default.createElement( _reactRouterDom.NavLink, { to: '/notifications/advanced/', className: function className(_ref3) { var isActive = _ref3.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Advanced') ), 'save_draft' !== notifType && _react2.default.createElement( _reactRouterDom.NavLink, { to: '/notifications/conditions/', className: function className(_ref4) { var isActive = _ref4.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Conditions') ) ), _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/notifications/', element: _react2.default.createElement(_reactRouterDom.Navigate, { to: '/notifications/email/', replace: true }) }) ), _react2.default.createElement( 'div', { className: 'sui-tabs-content' }, _react2.default.createElement( 'div', { className: 'sui-tab-content active' }, _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/notifications/email', element: _react2.default.createElement( 'div', { key: 'notifications-email' }, _react2.default.createElement( _row2.default, { key: 'index-1' }, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.state, label: (0, _utils.translate)('Label'), description: (0, _utils.translate)('The label is to help you identify ' + "this email and won't appear " + 'anywhere in the email.'), placeholder: (0, _utils.translate)('E.g. Sales Team Notification'), property: 'label', updateProperty: this.updateProperty })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { settings: this.state, property: notificationEmailSubject, placeholder: (0, _utils.translate)('E.g. New Form Submission'), label: (0, _utils.translate)('Subject'), required: 'true', isRequired: 'true', requiredError: (0, _utils.translate)("Email subject can't be empty"), updateProperty: this.updateProperty }), this.getNameOptions().map(function (option, i) { return _react2.default.createElement( 'option', { key: i, value: option.value, 'data-content': option.value }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { settings: this.state, property: notificationEmailEditor, extraId: 'email-editor', editorOptions: forminatorData.variables, paymentOptions: forminatorData.payment_variables, enableFormData: 'true', enableAllFormFields: 'true', enableAllNonFormFields: 'true', enablePostData: 'true', enableUpload: 'true', wrappers: this.props.wrappers, boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Body'), isRequired: 'true', requiredError: (0, _utils.translate)("Email body can't be empty"), updateProperty: this.updateProperty })) ) ), hasUpload && _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.state, property: 'email-attachment', defaultValue: 'false', label: (0, _utils.translate)('Attachments'), description: (0, _utils.translate)('Choose whether you want to attach the files ' + 'uploaded via the File Upload fields to this email.'), updateProperty: this.updateProperty }), _react2.default.createElement( 'div', { value: 'false' }, (0, _utils.translate)('None') ), _react2.default.createElement( 'div', { value: 'true' }, (0, _utils.translate)('Uploaded files') ) ) ) ), 'save_draft' !== notifType && _react2.default.createElement(_pdfAttachment2.default, _extends({}, this.props, { settings: this.state, property: 'email-pdfs', updateProperty: this.updateProperty })) ) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/notifications/recipients', element: _react2.default.createElement( 'div', { key: 'notifications-recipients' }, _react2.default.createElement( 'span', { className: 'sui-description', style: { marginTop: '0', marginBottom: '10px' } }, (0, _utils.translate)('The default behavior is to send the email ' + 'to the same recipients. If you want to send ' + 'this email to different recipients ' + 'conditionally, you can enable the email ' + 'routing and change the recipients of this ' + 'email based on the user input.') ), _react2.default.createElement( 'div', { className: 'sui-form-field', style: { marginTop: '0' } }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'email-recipients', 'default': 'default', settings: this.state, updateProperty: this.updateProperty, simple: true }), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'default', label: (0, _utils.translate)('Default'), boxClass: 'sui-tab-boxed' }), _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { settings: this.state, property: 'recipients', placeholder: (0, _utils.translate)('E.g. sales@website.com'), label: (0, _utils.translate)('Recipients'), required: 'true', type: 'textarea', updateProperty: this.updateProperty, note: (0, _utils.translate)('(Separate multiple emails with a comma)'), customClass: 'sui-variables-select-text' }), this.getEmailOptions().map(function (option, i) { return _react2.default.createElement( 'option', { key: i, value: option.value, 'data-content': option.value }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ) ), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'routing', label: (0, _utils.translate)('Email Routing') }), _react2.default.createElement(_emailRouting2.default, _extends({}, this.props, { updateProperty: this.updateProperty, state: this.state })) ) ) ) ) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/notifications/advanced', element: _react2.default.createElement( 'div', { key: 'notifications-advanced' }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { settings: this.state, property: 'from-name', placeholder: (0, _utils.translate)('Enter from name here'), label: (0, _utils.translate)('From Name'), updateProperty: this.updateProperty }), this.getNameOptions().map(function (option, i) { return _react2.default.createElement( 'option', { key: i, value: option.value }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { settings: this.state, property: 'form-email', placeholder: (0, _utils.translate)('Enter from email here'), label: (0, _utils.translate)('From Email'), updateProperty: this.updateProperty }), this.getEmailOptions().map(function (option, i) { return _react2.default.createElement( 'option', { key: i, value: option.value, 'data-content': option.value }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ), _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice ' + 'sui-notice-blue' + ('' + (!_.isEmpty(this.state['form-email']) && ' sui-active')), 'aria-live': 'assertive', style: styles }, !_.isEmpty(this.state['form-email']) && _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Some hosts do not allow "from email" to be overridden or replaced due to spam issues.') ) ) ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { settings: this.state, property: 'replyto-email', placeholder: (0, _utils.translate)('Enter reply-to email here'), label: (0, _utils.translate)('Reply-to Email'), updateProperty: this.updateProperty }), this.getEmailOptions().map(function (option, i) { return _react2.default.createElement( 'option', { key: i, value: option.value, 'data-content': option.value }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { settings: this.state, property: 'cc-email', placeholder: (0, _utils.translate)('Enter CC email here'), label: (0, _utils.translate)('CC Emails'), updateProperty: this.updateProperty }), this.getEmailOptions().map(function (option, i) { return _react2.default.createElement( 'option', { key: i, value: option.value, 'data-content': option.value }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { settings: this.state, property: 'bcc-email', placeholder: (0, _utils.translate)('Enter BCC email here'), label: (0, _utils.translate)('BCC Emails'), updateProperty: this.updateProperty }), this.getEmailOptions().map(function (option, i) { return _react2.default.createElement( 'option', { key: i, value: option.value, 'data-content': option.value }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ) ) ) ) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/notifications/conditions', element: _react2.default.createElement(_conditions2.default, _extends({}, this.props, { updateProperty: this.updateProperty, state: this.state })) }) ) ) ) ) ), _react2.default.createElement( _footer2.default, { alignment: 'separated' }, _react2.default.createElement(_close2.default, { icon: 'undo', label: (0, _utils.translate)('Discard Changes'), closeModal: this.closeModal }), isValid && _react2.default.createElement( 'button', { className: 'sui-button forminator-save-field-settings', onClick: this.applyChanges }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }), (0, _utils.translate)('Add') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ), !isValid && _react2.default.createElement( 'div', { className: 'sui-tooltip', 'data-tooltip': validationError }, _react2.default.createElement( 'button', { className: 'sui-button forminator-save-field-settings sui-tooltip', disabled: 'disabled', 'data-tooltip': validationError }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }), (0, _utils.translate)('Add') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ) ); } }]); return notificationModal; }(_react.Component); exports.default = (0, _withRouter.withRouter)(notificationModal); /***/ }), /* 551 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _emailRoutingRule = __webpack_require__(552); var _emailRoutingRule2 = _interopRequireDefault(_emailRoutingRule); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var EmailRouting = function (_Component) { _inherits(EmailRouting, _Component); function EmailRouting(props) { _classCallCheck(this, EmailRouting); var _this = _possibleConstructorReturn(this, (EmailRouting.__proto__ || Object.getPrototypeOf(EmailRouting)).call(this, props)); _this.addRule = _this.addRule.bind(_this); _this.removeRule = _this.removeRule.bind(_this); _this.updateValue = _this.updateValue.bind(_this); _this.updateField = _this.updateField.bind(_this); _this.updateRule = _this.updateRule.bind(_this); _this.updateRuleValue = _this.updateRuleValue.bind(_this); _this.updateInputValue = _this.updateInputValue.bind(_this); _this.fields = (0, _utils.getFields)(_this.props.wrappers); // Remove Stripe & PayPal fields from the list _this.fields = _.filter(_this.fields, function (field) { return field.field_type !== 'stripe' && field.field_type !== 'paypal' && field.field_type !== 'page-break' && field.field_type !== 'pagination' && field.field_type !== 'section' && field.field_type !== 'html'; }); _this.validateConditions(); return _this; } _createClass(EmailRouting, [{ key: 'updateState', value: function updateState(state) { this.props.updateProperty('routing', state); } }, { key: 'getPropState', value: function getPropState() { var props = []; _.each(this.props.state.routing, function (element) { var newElement = Object.assign({}, element); props.push(newElement); }); return props; } }, { key: 'updateField', value: function updateField(index, value) { var newState = this.getPropState(); // eslint-disable-next-line camelcase newState[index].element_id = value; newState[index].rule = 'is'; newState[index].value = ''; this.updateState(newState); } }, { key: 'updateValue', value: function updateValue(index, value) { var newState = this.getPropState(); newState[index].email = value; this.updateState(newState); } }, { key: 'updateRule', value: function updateRule(index, value) { var newState = this.getPropState(); newState[index].rule = value; this.updateState(newState); } }, { key: 'updateRuleValue', value: function updateRuleValue(index, value) { var newState = this.getPropState(); newState[index].value = value; this.updateState(newState); } }, { key: 'updateInputValue', value: function updateInputValue(index, value) { var newState = this.getPropState(); newState[index].value = value; this.updateState(newState); } }, { key: 'removeRule', value: function removeRule(index) { var newState = this.getPropState(); newState.splice(index, 1); this.updateState(newState); } }, { key: 'addRule', value: function addRule() { var newState = this.getPropState(); var elementId = !_.isUndefined(this.fields[0]) ? this.fields[0].element_id : ''; newState.push({ // eslint-disable-next-line camelcase email: '', element_id: elementId, rule: 'is', value: '' }); this.updateState(newState); } }, { key: 'validateConditions', value: function validateConditions() { var rules = _.pluck(this.props.state.routing, 'element_id'); var fields = _.pluck(this.fields, 'element_id'); var invalidField = _.difference(rules, fields); if (!_.isUndefined(invalidField)) { this.removeCondition(invalidField); } } }, { key: 'removeCondition', value: function removeCondition(field) { var newState = this.getPropState(); var readyState = _.filter(newState, function (obj) { return !_.contains(field, obj.element_id); }); this.updateState(readyState); } }, { key: 'render', value: function render() { var _this2 = this; var noConditions = _react2.default.createElement( 'div', { className: 'fui-visibility-group' }, _react2.default.createElement( 'div', { className: 'fui-visibility', style: { marginTop: '0' } }, _react2.default.createElement( 'div', { className: 'fui-visibility-empty-message' }, (this.props.wrappers.length > 1 || this.fields.length > 1) && !_.isEmpty(this.fields) && _react2.default.createElement( 'button', { accessKey: 'a', onClick: this.addRule }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add Rule') ), _react2.default.createElement( 'p', null, (0, _utils.translate)('You haven\'t defined any email routing rules yet. ' + 'Click on the "+ Add Rule" button to add the ' + 'recipients along with the routing rules.') ) ) ) ); if (_.isUndefined(this.props.state.routing) || this.props.state.routing.length === 0) { _react2.default.createElement( _react2.default.Fragment, null, noConditions ); } if (!_.isUndefined(this.props.state.routing) && this.props.state.routing.length > 0 && !_.isEmpty(this.fields)) { return _react2.default.createElement( 'div', { className: 'fui-visibility-group' }, _react2.default.createElement( 'div', { className: 'fui-visibility', style: { marginTop: '0' } }, _react2.default.createElement( 'div', { className: 'fui-visibility-rules' }, _.map(this.props.state.routing, function (rule, i) { return _react2.default.createElement(_emailRoutingRule2.default, _extends({}, _this2.props, { rule: rule, key: i, counter: i, removeRule: _this2.removeRule, updateValue: _this2.updateValue, updateField: _this2.updateField, updateRule: _this2.updateRule, updateRuleValue: _this2.updateRuleValue, updateInputValue: _this2.updateInputValue, fields: _this2.fields })); }) ) ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-blue', accessKey: 'a', onClick: this.addRule }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add Rule') ) ); } return _react2.default.createElement( _react2.default.Fragment, null, noConditions ); } }]); return EmailRouting; }(_react.Component); exports.default = EmailRouting; /***/ }), /* 552 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _suiSelect3 = __webpack_require__(16); var _suiSelect4 = _interopRequireDefault(_suiSelect3); var _suiVariables = __webpack_require__(50); var _suiVariables2 = _interopRequireDefault(_suiVariables); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var RoutingRule = function (_Component) { _inherits(RoutingRule, _Component); function RoutingRule(props) { _classCallCheck(this, RoutingRule); // Bind events var _this = _possibleConstructorReturn(this, (RoutingRule.__proto__ || Object.getPrototypeOf(RoutingRule)).call(this, props)); _this.toggleState = _this.toggleState.bind(_this); _this.updateValue = _this.updateValue.bind(_this); _this.updateField = _this.updateField.bind(_this); _this.updateRule = _this.updateRule.bind(_this); _this.updateRuleValue = _this.updateRuleValue.bind(_this); _this.updateInputValue = _this.updateInputValue.bind(_this); _this.state = { open: false }; _this.fields = _this.props.fields; return _this; } _createClass(RoutingRule, [{ key: 'removeRule', value: function removeRule() { this.props.removeRule(this.props.counter); } }, { key: 'updateValue', value: function updateValue(prop, value) { this.props.updateValue(this.props.counter, value); } }, { key: 'updateField', value: function updateField(prop, value) { this.props.updateField(this.props.counter, value); } }, { key: 'updateRule', value: function updateRule(prop, value) { this.props.updateRule(this.props.counter, value); } }, { key: 'updateRuleValue', value: function updateRuleValue(e) { this.props.updateRuleValue(this.props.counter, e.target.value); } }, { key: 'updateInputValue', value: function updateInputValue(prop, value) { this.props.updateInputValue(this.props.counter, value); } }, { key: 'toggleState', value: function toggleState() { this.setState({ open: !this.state.open }); } }, { key: 'disableSearch', value: function disableSearch() { return { minimumResultsForSearch: -1 }; } }, { key: 'getEmailOptions', value: function getEmailOptions() { var emailOptions = []; var emailFields = (0, _utils.getFields)(this.props.wrappers, [ // disable these fields 'address', 'captcha', 'date', 'consent', 'gdprcheckbox', 'html', 'name', 'number', 'slider', 'page-break', 'phone', 'postdata', 'section', 'time', 'upload', 'website', 'textarea', 'text', 'paypal', 'stripe', 'currency', 'calculation', 'password', 'rating']); emailFields.map(function (field) { emailOptions.push({ value: '{' + field.element_id + '}', label: field.label }); }); return emailOptions; } }, { key: 'render', value: function render() { var _this2 = this; var routingId = 'routing-' + this.props.counter; var fieldData = _.where(this.fields, { element_id: this.props.rule.element_id })[0] || {}; var valueLabel = _.isEmpty(this.props.rule.value) ? (0, _utils.translate)('null') : this.props.rule.value; var emailLabel = _.isEmpty(this.props.rule.email) ? '' : this.props.rule.email; var month = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; var dateRules = ['day_is', 'day_is_not', 'month_is', 'month_is_not']; var days = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']; return _react2.default.createElement( 'div', { className: 'sui-box fui-visibility-rule' + (true === this.state.open ? ' fui-open' : '') }, _react2.default.createElement( 'h4', { className: 'fui-visibility-rule-header' }, _react2.default.createElement( 'button', { id: 'forminator-field-' + routingId, className: 'sui-box-header', 'aria-controls': 'forminator-field-' + routingId + '-content', 'aria-expanded': this.state.open, onClick: function onClick() { return _this2.toggleState(); } }, _react2.default.createElement('i', { className: 'sui-icon-sitemap fui-visibility-rule-icon', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'fui-visibility-rule-text' }, (0, _utils.translate)('Send to {{strong}}"%(label)s"{{/strong}} if ' + '{{strong}}%(field)s{{/strong}} %(rule)s ' + '{{strong}}%(value)s{{/strong}}', { args: { label: emailLabel, field: fieldData.label, rule: (0, _utils.getRuleLabel)(this.props.rule.rule, fieldData.field_type), value: valueLabel }, components: { strong: _react2.default.createElement('strong', null) } }) ), _react2.default.createElement('i', { className: 'sui-icon-chevron-down fui-visibility-rule-arrow', 'aria-hidden': 'true' }) ) ), _react2.default.createElement( 'div', { role: 'region', id: 'forminator-field-' + routingId + '-content', className: 'sui-box-body fui-visibility-rule-body', 'aria-labelledby': 'forminator-field-' + routingId, 'aria-hidden': true === this.state.open ? false : true }, _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { property: 'email', placeholder: (0, _utils.translate)('E.g. sales@website.com'), label: (0, _utils.translate)('Recipients'), settings: this.props.rule, value: this.props.rule.email, required: 'true', note: (0, _utils.translate)('Separate multiple emails with a comma'), onChange: this.updateValue.bind(this) }), this.getEmailOptions().map(function (option, i) { return _react2.default.createElement( 'option', { key: i, value: option.value, 'data-content': option.value }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ), _react2.default.createElement( _row2.default, { 'class': 'sui-align-bottom sui-spacing-10' }, _react2.default.createElement( _col2.default, { cols: '6', customClass: 'sui-padding-right-10' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { elementId: routingId + '-field', property: 'element_id', updateProperty: this.updateField, settings: this.props.rule, label: (0, _utils.translate)('Routing Condition') }), _.map(this.fields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ) ), _react2.default.createElement( _col2.default, { cols: '6', customClass: 'sui-padding-left-10' }, _react2.default.createElement( _suiSelect4.default, _extends({}, this.props, { elementId: routingId + '-condrule', settings: this.props.rule, property: 'rule', updateProperty: this.updateRule, options: this.disableSearch() }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select rule') ), 'signature' === fieldData.field_type && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is' }, (0, _utils.translate)('Is null') ), _react2.default.createElement( 'option', { value: 'is_not' }, (0, _utils.translate)('Is not null') ) ), 'signature' !== fieldData.field_type && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is' }, (0, _utils.translate)('Is') ), _react2.default.createElement( 'option', { value: 'is_not' }, (0, _utils.translate)('Is not') ) ), (fieldData.isNumber || 'rating' === fieldData.field_type) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is_great' }, (0, _utils.translate)('Is greater than') ), _react2.default.createElement( 'option', { value: 'is_less' }, (0, _utils.translate)('Is less than') ) ), !fieldData.isNumber && !fieldData.hasOptions && 'signature' !== fieldData.field_type && 'rating' !== fieldData.field_type && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'contains' }, (0, _utils.translate)('Contains') ), _react2.default.createElement( 'option', { value: 'does_not_contain' }, (0, _utils.translate)('Does not contain') ), _react2.default.createElement( 'option', { value: 'starts' }, (0, _utils.translate)('Starts with') ), _react2.default.createElement( 'option', { value: 'ends' }, (0, _utils.translate)('Ends with') ) ), 'date' === fieldData.field_type && ('date-day' === fieldData.field_slug || 'date' === fieldData.field_slug) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'day_is' }, (0, _utils.translate)('Day is') ), _react2.default.createElement( 'option', { value: 'day_is_not' }, (0, _utils.translate)('Day is not') ) ), 'date' === fieldData.field_type && ('date-month' === fieldData.field_slug || 'date' === fieldData.field_slug) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'month_is' }, (0, _utils.translate)('Month is') ), _react2.default.createElement( 'option', { value: 'month_is_not' }, (0, _utils.translate)('Month is not') ) ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, fieldData.hasOptions && _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateRuleValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select option') ), _.map(fieldData.values, function (option, x) { return _react2.default.createElement( 'option', { value: option.value, key: x }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ), !fieldData.hasOptions && 'signature' !== fieldData.field_type && (!dateRules.includes(this.props.rule.rule) || 'date' !== fieldData.field_type) && _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.rule, inputId: routingId + '-value', property: 'value', updateProperty: this.updateInputValue, placeholder: (0, _utils.translate)('Enter value') })), !fieldData.hasOptions && 'date' === fieldData.field_type && ('month_is' === this.props.rule.rule === 'month_is' || this.props.rule.rule === 'month_is_not') && _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateRuleValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select month') ), _.map(month, function (value) { return _react2.default.createElement( 'option', { value: value, key: value }, value ); }) ), !fieldData.hasOptions && 'date' === fieldData.field_type && ('day_is' === this.props.rule.rule || 'day_is_not' === this.props.rule.rule) && _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateRuleValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select day') ), _.map(days, function (value) { return _react2.default.createElement( 'option', { value: value, key: value }, value ); }) ) ) ), _react2.default.createElement( 'div', { className: 'fui-visibility-rule-footer' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-red sui-button-ghost', onClick: this.removeRule.bind(this) }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), (0, _utils.translate)('Delete') ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost', onClick: function onClick() { return _this2.toggleState(); } }, (0, _utils.translate)('Done') ) ) ) ); } }]); return RoutingRule; }(_react.Component); exports.default = RoutingRule; /***/ }), /* 553 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _conditionsRule = __webpack_require__(554); var _conditionsRule2 = _interopRequireDefault(_conditionsRule); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Conditions = function (_Component) { _inherits(Conditions, _Component); function Conditions(props) { _classCallCheck(this, Conditions); var _this = _possibleConstructorReturn(this, (Conditions.__proto__ || Object.getPrototypeOf(Conditions)).call(this, props)); _this.addRule = _this.addRule.bind(_this); _this.removeRule = _this.removeRule.bind(_this); _this.updateField = _this.updateField.bind(_this); _this.updateRule = _this.updateRule.bind(_this); _this.updateValue = _this.updateValue.bind(_this); _this.updateInputValue = _this.updateInputValue.bind(_this); _this.fields = (0, _utils.getFields)(_this.props.wrappers); // Remove Stripe & PayPal fields from the list _this.fields = _.filter(_this.fields, function (field) { return field.field_type !== 'stripe' && field.field_type !== 'paypal' && field.field_type !== 'page-break' && field.field_type !== 'pagination' && field.field_type !== 'section' && field.field_type !== 'html'; }); _this.validateConditions(); return _this; } _createClass(Conditions, [{ key: 'updateState', value: function updateState(state) { this.props.updateProperty('conditions', state); } }, { key: 'getPropState', value: function getPropState() { var props = []; _.each(this.props.state.conditions, function (element) { var newElement = Object.assign({}, element); props.push(newElement); }); return props; } }, { key: 'updateField', value: function updateField(index, value) { var newState = this.getPropState(); // eslint-disable-next-line camelcase newState[index].element_id = value; newState[index].rule = 'is'; newState[index].value = ''; this.updateState(newState); } }, { key: 'updateRule', value: function updateRule(index, value) { var newState = this.getPropState(); newState[index].rule = value; this.updateState(newState); } }, { key: 'updateValue', value: function updateValue(index, value) { var newState = this.getPropState(); newState[index].value = value; this.updateState(newState); } }, { key: 'updateInputValue', value: function updateInputValue(index, value) { var newState = this.getPropState(); newState[index].value = value; this.updateState(newState); } }, { key: 'removeRule', value: function removeRule(index) { var newState = this.getPropState(); newState.splice(index, 1); this.updateState(newState); } }, { key: 'addRule', value: function addRule() { var newState = this.getPropState(); var elementId = !_.isUndefined(this.fields[0]) ? this.fields[0].element_id : ''; newState.push({ // eslint-disable-next-line camelcase element_id: elementId, rule: 'is', value: '' }); this.updateState(newState); } }, { key: 'validateConditions', value: function validateConditions() { var rules = _.pluck(this.props.state.conditions, 'element_id'); var fields = _.pluck(this.fields, 'element_id'); var invalidField = _.difference(rules, fields); if (!_.isUndefined(invalidField)) { this.removeCondition(invalidField); } } }, { key: 'removeCondition', value: function removeCondition(field) { var newState = this.getPropState(); var readyState = _.filter(newState, function (obj) { return !_.contains(field, obj.element_id); }); this.updateState(readyState); } }, { key: 'render', value: function render() { var _this2 = this; var globalMarkup = _react2.default.createElement( 'div', { className: 'fui-visibility-options' }, _react2.default.createElement( 'div', { className: 'fui-visibility-option' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'condition_action', defaultValue: 'send', noWrapper: true }), _react2.default.createElement( 'span', { value: 'send' }, (0, _utils.translate)('Send') ), _react2.default.createElement( 'span', { value: 'dont-send' }, (0, _utils.translate)('Don\'t Send') ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('this email if') ) ), _react2.default.createElement( 'div', { className: 'fui-visibility-option' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'condition_rule', defaultValue: 'all', noWrapper: true }), _react2.default.createElement( 'span', { value: 'all' }, (0, _utils.translate)('All') ), _react2.default.createElement( 'span', { value: 'any' }, (0, _utils.translate)('Any') ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('of the following rules match:') ) ) ); var noConditions = _react2.default.createElement( 'div', { className: 'fui-visibility-group' }, (this.props.wrappers.length > 1 || this.fields.length >= 1) && !_.isEmpty(this.fields) && _react2.default.createElement( 'div', { className: 'fui-visibility-header' }, globalMarkup, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Conditions') ) ), _react2.default.createElement( 'div', { className: 'fui-visibility' }, _react2.default.createElement( 'div', { className: 'fui-visibility-empty-message' }, (this.props.wrappers.length > 1 || this.fields.length >= 1) && !_.isEmpty(this.fields) && _react2.default.createElement( 'button', { accessKey: 'a', onClick: this.addRule }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add Conditions') ), _react2.default.createElement( 'p', null, (0, _utils.translate)('By default, this email is always sent on form ' + 'submission. You can add conditions to send this ' + 'email conditionally based on user input.') ) ) ) ); if (_.isUndefined(this.props.state.conditions) || this.props.state.conditions.length === 0) { _react2.default.createElement( _react2.default.Fragment, null, noConditions ); } if (!_.isUndefined(this.props.state.conditions) && this.props.state.conditions.length > 0 && !_.isEmpty(this.fields)) { return _react2.default.createElement( 'div', { className: 'fui-visibility-group' }, (this.props.wrappers.length > 1 || this.fields.length > 1) && _react2.default.createElement( 'div', { className: 'fui-visibility-header' }, globalMarkup, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Conditions') ) ), _react2.default.createElement( 'div', { className: 'fui-visibility' }, _react2.default.createElement( 'div', { className: 'fui-visibility-rules' }, _.map(this.props.state.conditions, function (rule, i) { return _react2.default.createElement(_conditionsRule2.default, _extends({}, _this2.props, { rule: rule, key: i, counter: i, removeRule: _this2.removeRule, updateField: _this2.updateField, updateRule: _this2.updateRule, updateValue: _this2.updateValue, updateInputValue: _this2.updateInputValue, fields: _this2.fields })); }) ) ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-blue', accessKey: 'a', onClick: this.addRule }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add Rule') ) ); } return _react2.default.createElement( _react2.default.Fragment, null, noConditions ); } }]); return Conditions; }(_react.Component); exports.default = Conditions; /***/ }), /* 554 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _suiSelect3 = __webpack_require__(16); var _suiSelect4 = _interopRequireDefault(_suiSelect3); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ConditionRule = function (_Component) { _inherits(ConditionRule, _Component); function ConditionRule(props) { _classCallCheck(this, ConditionRule); // Bind events var _this = _possibleConstructorReturn(this, (ConditionRule.__proto__ || Object.getPrototypeOf(ConditionRule)).call(this, props)); _this.toggleState = _this.toggleState.bind(_this); _this.updateField = _this.updateField.bind(_this); _this.updateRule = _this.updateRule.bind(_this); _this.updateValue = _this.updateValue.bind(_this); _this.updateInputValue = _this.updateInputValue.bind(_this); _this.state = { open: false }; _this.fields = _this.props.fields; return _this; } _createClass(ConditionRule, [{ key: 'removeRule', value: function removeRule() { this.props.removeRule(this.props.counter); } }, { key: 'updateField', value: function updateField(prop, value) { this.props.updateField(this.props.counter, value); } }, { key: 'updateRule', value: function updateRule(prop, value) { this.props.updateRule(this.props.counter, value); } }, { key: 'updateValue', value: function updateValue(e) { this.props.updateValue(this.props.counter, e.target.value); } }, { key: 'updateInputValue', value: function updateInputValue(prop, value) { this.props.updateInputValue(this.props.counter, value); } }, { key: 'toggleState', value: function toggleState() { this.setState({ open: !this.state.open }); } }, { key: 'disableSearch', value: function disableSearch() { return { minimumResultsForSearch: -1 }; } }, { key: 'render', value: function render() { var _this2 = this; var conditionId = 'condition-' + this.props.counter; var fieldData = _.where(this.fields, { element_id: this.props.rule.element_id })[0] || {}; var valueLabel = _.isEmpty(this.props.rule.value) ? (0, _utils.translate)('null') : this.props.rule.value; var month = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; var dateRules = ['day_is', 'day_is_not', 'month_is', 'month_is_not']; var days = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']; return _react2.default.createElement( 'div', { className: 'sui-box fui-visibility-rule' + (true === this.state.open ? ' fui-open' : '') }, _react2.default.createElement( 'h4', { className: 'fui-visibility-rule-header' }, _react2.default.createElement( 'button', { id: 'forminator-field-' + conditionId, className: 'sui-box-header', 'aria-controls': 'forminator-field-' + conditionId + '-content', 'aria-expanded': this.state.open, onClick: function onClick() { return _this2.toggleState(); } }, _react2.default.createElement('i', { className: 'sui-icon-link fui-visibility-rule-icon', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'fui-visibility-rule-text' }, _react2.default.createElement( 'strong', null, (0, _escapeHtml.escapeHTML)(fieldData.label) ), '\xA0', (0, _utils.getRuleLabel)(this.props.rule.rule, fieldData.field_type), '\xA0', _react2.default.createElement( 'strong', null, valueLabel ) ), _react2.default.createElement('i', { className: 'sui-icon-chevron-down fui-visibility-rule-arrow', 'aria-hidden': 'true' }) ) ), _react2.default.createElement( 'div', { role: 'region', id: 'forminator-field-' + conditionId + '-content', className: 'sui-box-body fui-visibility-rule-body', 'aria-labelledby': 'forminator-field-' + conditionId, 'aria-hidden': true === this.state.open ? false : true }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { elementId: conditionId + '-field', property: 'element_id', updateProperty: this.updateField, settings: this.props.rule, label: (0, _utils.translate)('Field') }), _.map(this.fields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect4.default, _extends({}, this.props, { elementId: conditionId + '-condrule', settings: this.props.rule, property: 'rule', updateProperty: this.updateRule, label: (0, _utils.translate)('Condition (required)'), options: this.disableSearch() }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select rule') ), 'signature' === fieldData.field_type && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is' }, (0, _utils.translate)('Is null') ), _react2.default.createElement( 'option', { value: 'is_not' }, (0, _utils.translate)('Is not null') ) ), 'signature' !== fieldData.field_type && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is' }, (0, _utils.translate)('Is') ), _react2.default.createElement( 'option', { value: 'is_not' }, (0, _utils.translate)('Is not') ) ), (fieldData.isNumber || 'rating' === fieldData.field_type) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is_great' }, (0, _utils.translate)('Is greater than') ), _react2.default.createElement( 'option', { value: 'is_less' }, (0, _utils.translate)('Is less than') ) ), !fieldData.isNumber && !fieldData.hasOptions && 'signature' !== fieldData.field_type && 'rating' !== fieldData.field_type && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'contains' }, (0, _utils.translate)('Contains') ), _react2.default.createElement( 'option', { value: 'does_not_contain' }, (0, _utils.translate)('Does not contain') ), _react2.default.createElement( 'option', { value: 'starts' }, (0, _utils.translate)('Starts with') ), _react2.default.createElement( 'option', { value: 'ends' }, (0, _utils.translate)('Ends with') ) ), 'date' === fieldData.field_type && ('date-day' === fieldData.field_slug || 'date' === fieldData.field_slug) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'day_is' }, (0, _utils.translate)('Day is') ), _react2.default.createElement( 'option', { value: 'day_is_not' }, (0, _utils.translate)('Day is not') ) ), 'date' === fieldData.field_type && 'signature' !== fieldData.field_type && ('date-month' === fieldData.field_slug || 'date' === fieldData.field_slug) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'month_is' }, (0, _utils.translate)('Month is') ), _react2.default.createElement( 'option', { value: 'month_is_not' }, (0, _utils.translate)('Month is not') ) ) ) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _react2.default.Fragment, null, fieldData.hasOptions && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select option') ), _.map(fieldData.values, function (option, x) { return _react2.default.createElement( 'option', { value: option.value, key: x }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ) ), !fieldData.hasOptions && 'signature' !== fieldData.field_type && (!dateRules.includes(this.props.rule.rule) || 'date' !== fieldData.field_type) && _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.rule, inputId: conditionId + '-value', property: 'value', updateProperty: this.updateInputValue, label: (0, _utils.translate)('Value') })), !fieldData.hasOptions && 'date' === fieldData.field_type && ('month_is' === this.props.rule.rule === 'month_is' || this.props.rule.rule === 'month_is_not') && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select month') ), _.map(month, function (value) { return _react2.default.createElement( 'option', { value: value, key: value }, value ); }) ) ), !fieldData.hasOptions && 'date' === fieldData.field_type && ('day_is' === this.props.rule.rule || 'day_is_not' === this.props.rule.rule) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select day') ), _.map(days, function (value) { return _react2.default.createElement( 'option', { value: value, key: value }, value ); }) ) ) ) ) ), _react2.default.createElement( 'div', { className: 'fui-visibility-rule-footer' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-red sui-button-ghost', onClick: this.removeRule.bind(this) }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), (0, _utils.translate)('Delete') ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost', onClick: function onClick() { return _this2.toggleState(); } }, (0, _utils.translate)('Done') ) ) ) ); } }]); return ConditionRule; }(_react.Component); exports.default = ConditionRule; /***/ }), /* 555 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _pdfViewAddon = __webpack_require__(556); var _pdfViewAddon2 = _interopRequireDefault(_pdfViewAddon); var _pdfAttachmentNone = __webpack_require__(557); var _pdfAttachmentNone2 = _interopRequireDefault(_pdfAttachmentNone); var _pdfAttachmentCheckboxes = __webpack_require__(558); var _pdfAttachmentCheckboxes2 = _interopRequireDefault(_pdfAttachmentCheckboxes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var pdfAttachment = function (_Component) { _inherits(pdfAttachment, _Component); function pdfAttachment(props) { _classCallCheck(this, pdfAttachment); return _possibleConstructorReturn(this, (pdfAttachment.__proto__ || Object.getPrototypeOf(pdfAttachment)).call(this, props)); } _createClass(pdfAttachment, [{ key: 'render', value: function render() { var isPro = forminatorData.isPro; var isPdfAddonActive = forminatorData.pdfAddonActive; var viewAddon = _react2.default.createElement(_pdfViewAddon2.default, _extends({}, this.props, { text: isPro ? (0, _utils.translate)('The {{strong}}Forminator PDF Generator Add-on{{/strong}} is ' + 'required to use the PDF generator feature. ' + 'Install it from the Add-ons page.', { components: { strong: _react2.default.createElement('strong', null) } }) : (0, _utils.translate)('Generate and send PDF files ' + '(e.g. forms entries, receipts, invoices, quotations) ' + 'to users after form submission.'), buttonText: isPro ? (0, _utils.translate)('Get the Add-on') : (0, _utils.translate)('Upgrade to PRO{{icon/}}', { components: { icon: _react2.default.createElement('span', { className: 'sui-icon-open-new-window sui-sm', 'aria-hidden': 'true', style: { margin: 0 } }) } }), buttonUrl: isPro ? forminatorData.addonsUrl : 'https://wpmudev.com/project/forminator-pro/?utm_source=forminator&utm_medium=plugin&utm_campaign=forminator_form-builder_email-notification_pdf-addon', color: isPro ? 'blue' : 'purple' })); var content = void 0; if (isPro) { if (isPdfAddonActive) { if (_.isEmpty(this.props.pdfs)) { content = _react2.default.createElement( 'div', { className: 'sui-border-frame', style: { marginTop: '0' } }, _react2.default.createElement(_pdfAttachmentNone2.default, this.props) ); } else { content = _react2.default.createElement( 'div', { className: 'sui-border-frame' }, _react2.default.createElement(_pdfAttachmentCheckboxes2.default, _extends({}, this.props, { pdfs: this.props.pdfs })) ); } } else { content = _react2.default.createElement( 'div', { className: 'sui-border-frame' }, viewAddon ); } } else { content = viewAddon; } return _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { htmlFor: 'forminator-field-email-pdf-attachment', className: 'sui-label' }, (0, _utils.translate)('PDF Attachments'), !isPro && _react2.default.createElement( 'span', { className: 'sui-tag sui-tag-pro' }, (0, _utils.translate)('Pro') ) ), _react2.default.createElement( 'span', { className: 'sui-description', style: { padding: '5px 0 7px' } }, (0, _utils.translate)('Select PDF file(s) to attach to ' + 'this email notification.') ), content ) ) ); } }]); return pdfAttachment; }(_react.Component); exports.default = pdfAttachment; /***/ }), /* 556 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var PdfViewAddon = function (_Component) { _inherits(PdfViewAddon, _Component); function PdfViewAddon(props) { _classCallCheck(this, PdfViewAddon); return _possibleConstructorReturn(this, (PdfViewAddon.__proto__ || Object.getPrototypeOf(PdfViewAddon)).call(this, props)); } _createClass(PdfViewAddon, [{ key: 'render', value: function render() { var color = this.props.color; var canManageAddons = (0, _utils.isTrue)(forminatorData.userPermissions['manage_forminator_addons']) || (0, _utils.isTrue)(forminatorData.userPermissions['manage_options']); return _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-' + color + ' sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, this.props.text ), canManageAddons && _react2.default.createElement( 'p', null, _react2.default.createElement( 'a', { className: 'sui-button sui-button-' + color, href: this.props.buttonUrl, target: '_blank' }, this.props.buttonText ) ) ) ) ); } }]); return PdfViewAddon; }(_react.Component); exports.default = PdfViewAddon; /***/ }), /* 557 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var PdfAttachmentNone = function (_Component) { _inherits(PdfAttachmentNone, _Component); function PdfAttachmentNone(props) { _classCallCheck(this, PdfAttachmentNone); var _this = _possibleConstructorReturn(this, (PdfAttachmentNone.__proto__ || Object.getPrototypeOf(PdfAttachmentNone)).call(this, props)); _this.goToSection = _this.goToSection.bind(_this); return _this; } _createClass(PdfAttachmentNone, [{ key: 'goToSection', value: function goToSection(module) { var _this2 = this; this.props.modal.modalProps.closeModal(); setTimeout(function () { _this2.props.router.navigate('/' + module); }, 700); } }, { key: 'render', value: function render() { var _this3 = this; return _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('No PDF file available for this form yet. Go to the {{link}}PDF tab{{/link}} to create one.', { components: { link: _react2.default.createElement('a', { onClick: function onClick() { return _this3.goToSection('pdf'); }, href: '#' }) } }) ) ) ) ); } }]); return PdfAttachmentNone; }(_react.Component); exports.default = (0, _withRouter.withRouter)(PdfAttachmentNone); /***/ }), /* 558 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var PdfCheckboxes = function (_Component) { _inherits(PdfCheckboxes, _Component); function PdfCheckboxes(props) { _classCallCheck(this, PdfCheckboxes); var _this = _possibleConstructorReturn(this, (PdfCheckboxes.__proto__ || Object.getPrototypeOf(PdfCheckboxes)).call(this, props)); _this.updateValue = _this.updateValue.bind(_this); _this.getCheckedPdfs = _this.getCheckedPdfs.bind(_this); _this.state = { pdfsChecked: !_.isUndefined(_this.props.settings['email-pdfs']) ? _this.getCheckedPdfs() : [] }; return _this; } // Removes deleted PDFs that were selected before. _createClass(PdfCheckboxes, [{ key: 'getCheckedPdfs', value: function getCheckedPdfs() { var availablePdfs = this.props.pdfs.map(function (pdf) { return pdf.pdfId.toString(); }); var checkedPdfs = this.props.settings['email-pdfs'].filter(function (pdf) { if (availablePdfs.includes(pdf)) { return pdf; } }); return checkedPdfs; } }, { key: 'updateValue', value: function updateValue(e, value) { var checkedPdfs = this.state.pdfsChecked; value = String(value); if (e.target.checked) { checkedPdfs = _.union(checkedPdfs, [value]); } else { checkedPdfs = _.without(checkedPdfs, value); } this.props.updateProperty(this.props.property, checkedPdfs); this.setState({ pdfsChecked: checkedPdfs }); } }, { key: 'render', value: function render() { var _this2 = this; var pdfs = this.props.pdfs; var selectedPdfs = this.state.pdfsChecked; return _react2.default.createElement( 'div', { className: 'sui-form-field' }, pdfs.map(function (pdf, index) { return _react2.default.createElement( 'label', { htmlFor: 'forminator-pdf-' + pdf.pdfId, className: 'sui-checkbox sui-checkbox-stacked', key: 'forminator-pdf-' + pdf.pdfId + '-' + (0, _utils.randNumber)() }, _react2.default.createElement('input', { type: 'checkbox', id: 'forminator-pdf-' + pdf.pdfId, 'aria-labelledby': 'label-pdf-' + pdf.pdfId, checked: _.includes(selectedPdfs, String(pdf.pdfId)) ? 'checked' : '', onChange: function onChange(e) { _this2.updateValue(e, pdf.pdfId); } }), _react2.default.createElement('span', { 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { id: 'label-pdf-' + pdf.pdfId }, pdf.pdfFilename + '.pdf' ) ); }) ); } }]); return PdfCheckboxes; }(_react.Component); exports.default = PdfCheckboxes; /***/ }), /* 559 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactRouterDom = __webpack_require__(24); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _checkbox = __webpack_require__(41); var _checkbox2 = _interopRequireDefault(_checkbox); var _suiVariables = __webpack_require__(50); var _suiVariables2 = _interopRequireDefault(_suiVariables); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _wpEditor = __webpack_require__(31); var _wpEditor2 = _interopRequireDefault(_wpEditor); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _conditions = __webpack_require__(560); var _conditions2 = _interopRequireDefault(_conditions); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _reactButtonIcon = __webpack_require__(21); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var behaviorModal = function (_Component) { _inherits(behaviorModal, _Component); function behaviorModal(props) { _classCallCheck(this, behaviorModal); var _this = _possibleConstructorReturn(this, (behaviorModal.__proto__ || Object.getPrototypeOf(behaviorModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.updateProperty = _this.updateProperty.bind(_this); _this.applyChanges = _this.applyChanges.bind(_this); _this.data = Object.assign({}, _this.props.modal.modalProps); _this.state = _this.data.behavior; return _this; } // Make it possible to update state from child components _createClass(behaviorModal, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.setState(_defineProperty({}, slug, value)); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.props.router.navigate('/behaviour/'); } }, { key: 'applyChanges', value: function applyChanges() { // We have new Behavior, insert new one if (this.data.new) { var newBehavior = Object.assign({}, this.state); var newState = [].concat(_toConsumableArray(this.data.behaviors), [newBehavior]); this.props.actions.behaviorsActions.updateBehaviorArray(newState); } // We edit existing Notification, update it if (!this.data.new) { this.props.actions.behaviorsActions.updateBehavior(this.state); } // Close modal this.closeModal(); } }, { key: 'getNameOptions', value: function getNameOptions() { var nameOptions = []; var nameFields = (0, _utils.getFields)(this.props.wrappers, [ // disable these fields 'page-break', 'postdata', 'upload', 'captcha', 'gdprcheckbox', 'password']); nameFields.map(function (field) { nameOptions.push({ value: '{' + field.element_id + '}', label: field.label }); }); return nameOptions; } }, { key: 'render', value: function render() { var currentMethod = !_.isUndefined(this.props.settings['activation-method']) ? this.props.settings['activation-method'] : ''; var modifiedVars = {}; _.assign(modifiedVars, forminatorData.variables); delete modifiedVars.submission_id; var editorProperty = void 0, isValid = true, thankyouProp = 'thankyou-message', SubmissionBehaviors = (0, _utils.getSubmissionBehaviors)(), behaviors = Object.values(SubmissionBehaviors), behaviorKeys = Object.keys(SubmissionBehaviors), validationError = ''; if (currentMethod === 'email' || currentMethod === 'manual') { thankyouProp = currentMethod + '-' + thankyouProp; } return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { className: 'sui-box-header' }, _react2.default.createElement( 'h3', { id: 'dialogTitle', className: 'sui-box-title' }, (0, _utils.translate)('After Submission') ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement(_reactButtonIcon.ButtonIcon, { icon: 'close', iconSize: 'md', label: (0, _utils.translate)('Close this dialog window'), className: 'forminator-builder-fields-close', onClick: this.closeModal }) ) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'div', { className: 'sui-tabs sui-tabs-flushed' }, _react2.default.createElement( 'div', { className: 'sui-tabs-menu' }, _react2.default.createElement( _reactRouterDom.NavLink, { to: '/behaviour/behavior', className: function className(_ref) { var isActive = _ref.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Behavior') ), _react2.default.createElement( _reactRouterDom.NavLink, { to: '/behaviour/conditions/', className: function className(_ref2) { var isActive = _ref2.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Conditions') ) ), _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/behaviour/', element: _react2.default.createElement(_reactRouterDom.Navigate, { to: '/behaviour/behavior', replace: true }) }) ), _react2.default.createElement( 'div', { className: 'sui-tabs-content' }, _react2.default.createElement( 'div', { className: 'sui-tab-content active' }, _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/behaviour/behavior', element: _react2.default.createElement( 'div', { key: 'behaviour-behaviour' }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.state, label: (0, _utils.translate)('Label'), description: (0, _utils.translate)('Only used to identify this behavior, and not displayed to users.'), placeholder: (0, _utils.translate)('E.g., Inline Message'), property: 'label', updateProperty: this.updateProperty })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { settings: this.state, updateProperty: this.updateProperty, property: 'submission-behaviour', label: (0, _utils.translate)('Behavior'), 'default': behaviorKeys[0] }), _react2.default.createElement( _container2.default, { value: behaviorKeys[0], boxClass: 'sui-tab-boxed', label: behaviors[0] }, _react2.default.createElement( _wpEditor2.default, _extends({}, this.props, { settings: this.state, updateProperty: this.updateProperty, property: thankyouProp, descriptionTop: (0, _utils.translate)('Display an inline success message to the user after the form is submitted.'), editorOptions: modifiedVars, paymentOptions: forminatorData.payment_variables, cutomTinymce: 'bold,italic,bullist,numlist,alignleft,aligncenter,alignright,link', enableFormData: 'true' }), behaviors[0] ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'div', { style: { display: 'inline-block' } }, _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'autoclose', settings: this.state, updateProperty: this.updateProperty, defaultValue: 'true', itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })) ), _react2.default.createElement( 'span', { className: 'sui-field-prefix sui-field-suffix', style: { fontWeight: '500', fontSize: '13px' } }, (0, _utils.translate)('Auto-close success message after') ), _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'autoclose-time', settings: this.state, updateProperty: this.updateProperty, placeholder: (0, _utils.translate)('E.g. 5'), inputClass: 'sui-input-sm sui-field-has-suffix', disabled: !this.state.autoclose ? true : false, simple: true })), _react2.default.createElement( 'span', { className: 'sui-field-suffix', style: { fontWeight: '500', fontSize: '13px' } }, (0, _utils.translate)('seconds.') ) ) ), _react2.default.createElement( _container2.default, { value: behaviorKeys[1], boxClass: 'sui-tab-boxed', label: behaviors[1] }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { placeholder: (0, _utils.translate)('https://www.mywebsite.com'), property: 'redirect-url', settings: this.state, updateProperty: this.updateProperty, label: (0, _utils.translate)('Redirect URL'), boxClass: 'sui-tab-boxed', customClass: 'redirect-url', description: (0, _utils.translate)('Provide the absolute URL of the page you want to redirect ' + 'users to after submitting the login form. For example, ' + 'to redirect users to the WordPress admin, use the URL ' + '{{strong}}http://www.website.com/wp-admin/{{/strong}}.', { components: { strong: _react2.default.createElement('strong', null) } }) }), this.getNameOptions().map(function (option, i) { return _react2.default.createElement( 'option', { key: i, value: option.value, 'data-content': option.value }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'newtab', settings: this.state, updateProperty: this.updateProperty, label: (0, _utils.translate)('Redirection Option'), itemClass: 'sui-checkbox-stacked sui-checkbox-sm' }), _react2.default.createElement( 'option', { value: 'sametab' }, (0, _utils.translate)('Redirect on the same tab') ), _react2.default.createElement( 'option', { value: 'newtab_thankyou' }, (0, _utils.translate)('Redirect on new tab and show thank you message on form page') ), _react2.default.createElement( 'option', { value: 'newtab_hide' }, (0, _utils.translate)('Redirect on new tab and hide form on the form page') ) ) ) ) ), _react2.default.createElement( _container2.default, { value: behaviorKeys[2], boxClass: 'sui-tab-boxed', label: behaviors[2] }, _react2.default.createElement( _wpEditor2.default, _extends({}, this.props, { property: thankyouProp, settings: this.state, updateProperty: this.updateProperty, extraId: '-hide', descriptionTop: (0, _utils.translate)('Hide the form after submission, and display a success message to the user.'), editorOptions: modifiedVars, enableFormData: 'true' }), (0, _utils.translate)('Submit Message') ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'div', { style: { display: 'inline-block' } }, _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { property: 'autoclose', settings: this.state, updateProperty: this.updateProperty, defaultValue: 'true', itemClass: 'sui-checkbox-stacked sui-checkbox-sm' })) ), _react2.default.createElement( 'span', { className: 'sui-field-prefix sui-field-suffix', style: { fontWeight: '500', fontSize: '13px' } }, (0, _utils.translate)('Auto-close success message after') ), _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'autoclose-time', settings: this.state, updateProperty: this.updateProperty, defaultValue: '5', placeholder: (0, _utils.translate)('E.g. 5'), inputClass: 'sui-input-sm sui-field-has-suffix', disabled: !this.state.autoclose ? true : false, simple: true })), _react2.default.createElement( 'span', { className: 'sui-field-suffix', style: { fontWeight: '500', fontSize: '13px' } }, (0, _utils.translate)('seconds.') ) ) ) ) ) ) ) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/behaviour/conditions', element: _react2.default.createElement(_conditions2.default, _extends({}, this.props, { updateProperty: this.updateProperty, state: this.state })) }) ) ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-footer' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost forminator-discard-field-settings', onClick: this.closeModal }, _react2.default.createElement('i', { className: 'sui-icon-close', 'aria-hidden': 'true' }), (0, _utils.translate)('Cancel') ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, isValid && _react2.default.createElement( 'button', { className: 'sui-button forminator-save-field-settings', onClick: this.applyChanges }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }), (0, _utils.translate)('Apply') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ), !isValid && _react2.default.createElement( 'div', { className: 'sui-tooltip', 'data-tooltip': validationError }, _react2.default.createElement( 'button', { className: 'sui-button forminator-save-field-settings sui-tooltip', disabled: 'disabled', 'data-tooltip': validationError }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }), (0, _utils.translate)('Add') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ) ) ); } }]); return behaviorModal; }(_react.Component); exports.default = (0, _withRouter.withRouter)(behaviorModal); /***/ }), /* 560 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _conditionsRule = __webpack_require__(561); var _conditionsRule2 = _interopRequireDefault(_conditionsRule); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Conditions = function (_Component) { _inherits(Conditions, _Component); function Conditions(props) { _classCallCheck(this, Conditions); var _this = _possibleConstructorReturn(this, (Conditions.__proto__ || Object.getPrototypeOf(Conditions)).call(this, props)); _this.addRule = _this.addRule.bind(_this); _this.removeRule = _this.removeRule.bind(_this); _this.updateField = _this.updateField.bind(_this); _this.updateRule = _this.updateRule.bind(_this); _this.updateValue = _this.updateValue.bind(_this); _this.updateInputValue = _this.updateInputValue.bind(_this); _this.fields = (0, _utils.getFields)(_this.props.wrappers); // Remove Stripe & PayPal fields from the list _this.fields = _.filter(_this.fields, function (field) { return field.field_type !== 'stripe' && field.field_type !== 'paypal' && field.field_type !== 'page-break' && field.field_type !== 'pagination' && field.field_type !== 'section' && field.field_type !== 'html'; }); _this.validateConditions(); return _this; } _createClass(Conditions, [{ key: 'updateState', value: function updateState(state) { this.props.updateProperty('conditions', state); } }, { key: 'getPropState', value: function getPropState() { var props = []; _.each(this.props.state.conditions, function (element) { var newElement = Object.assign({}, element); props.push(newElement); }); return props; } }, { key: 'updateField', value: function updateField(index, value) { var newState = this.getPropState(); // eslint-disable-next-line camelcase newState[index].element_id = value; newState[index].rule = 'is'; newState[index].value = ''; this.updateState(newState); } }, { key: 'updateRule', value: function updateRule(index, value) { var newState = this.getPropState(); newState[index].rule = value; this.updateState(newState); } }, { key: 'updateValue', value: function updateValue(index, value) { var newState = this.getPropState(); newState[index].value = value; this.updateState(newState); } }, { key: 'updateInputValue', value: function updateInputValue(index, value) { var newState = this.getPropState(); newState[index].value = value; this.updateState(newState); } }, { key: 'removeRule', value: function removeRule(index) { var newState = this.getPropState(); newState.splice(index, 1); this.updateState(newState); } }, { key: 'addRule', value: function addRule() { var newState = this.getPropState(); var elementId = !_.isUndefined(this.fields[0]) ? this.fields[0].element_id : ''; newState.push({ // eslint-disable-next-line camelcase element_id: elementId, rule: 'is', value: '' }); this.updateState(newState); } }, { key: 'validateConditions', value: function validateConditions() { var rules = _.pluck(this.props.state.conditions, 'element_id'); var fields = _.pluck(this.fields, 'element_id'); var invalidField = _.difference(rules, fields); if (!_.isUndefined(invalidField)) { this.removeCondition(invalidField); } } }, { key: 'removeCondition', value: function removeCondition(field) { var newState = this.getPropState(); var readyState = _.filter(newState, function (obj) { return !_.contains(field, obj.element_id); }); this.updateState(readyState); } }, { key: 'render', value: function render() { var _this2 = this; var globalMarkup = _react2.default.createElement( 'div', { className: 'fui-visibility-options' }, _react2.default.createElement( 'div', { className: 'fui-visibility-option' }, _react2.default.createElement( 'span', { className: 'sui-description', style: { marginRight: '10px' } }, (0, _utils.translate)('Process behavior if ') ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'condition_rule', defaultValue: 'all', noWrapper: true }), _react2.default.createElement( 'span', { value: 'all' }, (0, _utils.translate)('All') ), _react2.default.createElement( 'span', { value: 'any' }, (0, _utils.translate)('Any') ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('of the conditions below match.') ) ) ); var noConditions = _react2.default.createElement( 'div', { className: 'fui-visibility-group' }, (this.props.wrappers.length > 1 || this.fields.length >= 1) && !_.isEmpty(this.fields) && _react2.default.createElement( 'div', { className: 'fui-visibility-header' }, globalMarkup, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Conditions') ) ), _react2.default.createElement( 'div', { className: 'fui-visibility' }, _react2.default.createElement( 'div', { className: 'fui-visibility-empty-message' }, (this.props.wrappers.length > 1 || this.fields.length >= 1) && !_.isEmpty(this.fields) && _react2.default.createElement( 'button', { accessKey: 'a', onClick: this.addRule }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add Conditions') ), _react2.default.createElement( 'p', null, (0, _utils.translate)('Add conditions for when this behavior will be processed.') ) ) ) ); if (_.isUndefined(this.props.state.conditions) || this.props.state.conditions.length === 0) { _react2.default.createElement( _react2.default.Fragment, null, noConditions ); } if (!_.isUndefined(this.props.state.conditions) && this.props.state.conditions.length > 0 && !_.isEmpty(this.fields)) { return _react2.default.createElement( 'div', { className: 'fui-visibility-group' }, (this.props.wrappers.length > 1 || this.fields.length > 1) && _react2.default.createElement( 'div', { className: 'fui-visibility-header' }, globalMarkup, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Conditions') ) ), _react2.default.createElement( 'div', { className: 'fui-visibility' }, _react2.default.createElement( 'div', { className: 'fui-visibility-rules' }, _.map(this.props.state.conditions, function (rule, i) { return _react2.default.createElement(_conditionsRule2.default, _extends({}, _this2.props, { rule: rule, key: i, counter: i, removeRule: _this2.removeRule, updateField: _this2.updateField, updateRule: _this2.updateRule, updateValue: _this2.updateValue, updateInputValue: _this2.updateInputValue, fields: _this2.fields })); }) ) ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-blue', accessKey: 'a', onClick: this.addRule }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add Condition') ) ); } return _react2.default.createElement( _react2.default.Fragment, null, noConditions ); } }]); return Conditions; }(_react.Component); exports.default = Conditions; /***/ }), /* 561 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ConditionRule = function (_Component) { _inherits(ConditionRule, _Component); function ConditionRule(props) { _classCallCheck(this, ConditionRule); // Bind events var _this = _possibleConstructorReturn(this, (ConditionRule.__proto__ || Object.getPrototypeOf(ConditionRule)).call(this, props)); _this.toggleState = _this.toggleState.bind(_this); _this.updateField = _this.updateField.bind(_this); _this.updateRule = _this.updateRule.bind(_this); _this.updateValue = _this.updateValue.bind(_this); _this.updateInputValue = _this.updateInputValue.bind(_this); _this.state = { open: false }; _this.fields = _this.props.fields; return _this; } _createClass(ConditionRule, [{ key: 'removeRule', value: function removeRule() { this.props.removeRule(this.props.counter); } }, { key: 'updateField', value: function updateField(prop, value) { this.props.updateField(this.props.counter, value); } }, { key: 'updateRule', value: function updateRule(prop, value) { this.props.updateRule(this.props.counter, value); } }, { key: 'updateValue', value: function updateValue(e) { this.props.updateValue(this.props.counter, e.target.value); } }, { key: 'updateInputValue', value: function updateInputValue(prop, value) { this.props.updateInputValue(this.props.counter, value); } }, { key: 'toggleState', value: function toggleState() { this.setState({ open: !this.state.open }); } }, { key: 'render', value: function render() { var _this2 = this; var conditionId = 'condition-' + this.props.counter; var fieldData = _.where(this.fields, { // eslint-disable-next-line camelcase element_id: this.props.rule.element_id })[0] || {}; var valueLabel = _.isEmpty(this.props.rule.value) ? (0, _utils.translate)('null') : this.props.rule.value; var month = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; var dateRules = ['day_is', 'day_is_not', 'month_is', 'month_is_not']; var days = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']; var isConsent = 'consent' === fieldData.field_type; if (isConsent) { this.props.rule.value = (0, _utils.translate)('checked'); } return _react2.default.createElement( 'div', { className: 'sui-box ' + 'fui-visibility-rule' + ('' + (true === this.state.open ? ' fui-open' : '')) }, _react2.default.createElement( 'h4', { className: 'fui-visibility-rule-header' }, _react2.default.createElement( 'button', { id: 'forminator-field-' + conditionId, className: 'sui-box-header', 'aria-controls': 'forminator-field-' + conditionId + '-content', 'aria-expanded': this.state.open, onClick: function onClick() { return _this2.toggleState(); } }, _react2.default.createElement('span', { className: 'sui-icon-link fui-visibility-rule-icon', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'fui-visibility-rule-text' }, _react2.default.createElement( 'strong', null, (0, _escapeHtml.escapeHTML)(fieldData.label) ), '\xA0', (0, _utils.getRuleLabel)(this.props.rule.rule, fieldData.field_type), '\xA0', _react2.default.createElement( 'strong', null, valueLabel ) ), _react2.default.createElement('span', { className: 'sui-icon-chevron-down fui-visibility-rule-arrow', 'aria-hidden': 'true' }) ) ), _react2.default.createElement( 'div', { role: 'region', id: 'forminator-field-' + conditionId + '-content', className: 'sui-box-body fui-visibility-rule-body', 'aria-labelledby': 'forminator-field-' + conditionId, 'aria-hidden': true === this.state.open ? false : true }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { elementId: conditionId + '-field', property: 'element_id', updateProperty: this.updateField, settings: this.props.rule, label: (0, _utils.translate)('Field'), hasSearch: true }), _.map(this.fields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { elementId: conditionId + '-condrule', settings: this.props.rule, property: 'rule', updateProperty: this.updateRule, label: (0, _utils.translate)('Condition (required)'), 'data-placeholder': (0, _utils.translate)('Select rule'), hasSearch: true }), _react2.default.createElement('option', null), 'signature' === fieldData.field_type && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is' }, (0, _utils.translate)('Is null') ), _react2.default.createElement( 'option', { value: 'is_not' }, (0, _utils.translate)('Is not null') ) ), 'signature' !== fieldData.field_type && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is' }, (0, _utils.translate)('Is') ), _react2.default.createElement( 'option', { value: 'is_not' }, (0, _utils.translate)('Is not') ) ), (fieldData.isNumber || 'rating' === fieldData.field_type) && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is_great' }, (0, _utils.translate)('Is greater than') ), _react2.default.createElement( 'option', { value: 'is_less' }, (0, _utils.translate)('Is less than') ) ), !fieldData.isNumber && !fieldData.hasOptions && 'signature' !== fieldData.field_type && 'rating' !== fieldData.field_type && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'contains' }, (0, _utils.translate)('Contains') ), _react2.default.createElement( 'option', { value: 'does_not_contain' }, (0, _utils.translate)('Does not contain') ), _react2.default.createElement( 'option', { value: 'starts' }, (0, _utils.translate)('Starts with') ), _react2.default.createElement( 'option', { value: 'ends' }, (0, _utils.translate)('Ends with') ) ), 'date' === fieldData.field_type && ('date-day' === fieldData.field_slug || 'date' === fieldData.field_slug) && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'day_is' }, (0, _utils.translate)('Day is') ), _react2.default.createElement( 'option', { value: 'day_is_not' }, (0, _utils.translate)('Day is not') ) ), 'date' === fieldData.field_type && 'signature' !== fieldData.field_type && ('date-month' === fieldData.field_slug || 'date' === fieldData.field_slug) && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'month_is' }, (0, _utils.translate)('Month is') ), _react2.default.createElement( 'option', { value: 'month_is_not' }, (0, _utils.translate)('Month is not') ) ) ) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _react2.default.Fragment, null, fieldData.hasOptions && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select option') ), _.map(fieldData.values, function (option, x) { return _react2.default.createElement( 'option', { value: option.value, key: x }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ) ), !fieldData.hasOptions && isConsent && _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.rule, inputId: conditionId + '-value', property: 'value', updateProperty: this.updateInputValue, label: (0, _utils.translate)('Status'), disabled: true })), !fieldData.hasOptions && 'signature' !== fieldData.field_type && !isConsent && (!dateRules.includes(this.props.rule.rule) || 'date' !== fieldData.field_type) && _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.rule, inputId: conditionId + '-value', property: 'value', updateProperty: this.updateInputValue, label: (0, _utils.translate)('Value') })), !fieldData.hasOptions && 'date' === fieldData.field_type && ('month_is' === this.props.rule.rule || 'month_is_not' === this.props.rule.rule) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select month') ), _.map(month, function (value) { return _react2.default.createElement( 'option', { value: value, key: value }, value ); }) ) ), !fieldData.hasOptions && 'date' === fieldData.field_type && ('day_is' === this.props.rule.rule || 'day_is_not' === this.props.rule.rule) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select day') ), _.map(days, function (value) { return _react2.default.createElement( 'option', { value: value, key: value }, value ); }) ) ) ) ) ), _react2.default.createElement( 'div', { className: 'fui-visibility-rule-footer' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-red sui-button-ghost', onClick: this.removeRule.bind(this) }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), (0, _utils.translate)('Delete') ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost', onClick: function onClick() { return _this2.toggleState(); } }, (0, _utils.translate)('Done') ) ) ) ); } }]); return ConditionRule; }(_react.Component); exports.default = ConditionRule; /***/ }), /* 562 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _conditions = __webpack_require__(563); var _conditions2 = _interopRequireDefault(_conditions); var _reactButtonIcon = __webpack_require__(21); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var integrationConditions = function (_Component) { _inherits(integrationConditions, _Component); function integrationConditions(props) { _classCallCheck(this, integrationConditions); var _this = _possibleConstructorReturn(this, (integrationConditions.__proto__ || Object.getPrototypeOf(integrationConditions)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.updateProperty = _this.updateProperty.bind(_this); _this.applyChanges = _this.applyChanges.bind(_this); _this.data = Object.assign({}, _this.props.modal.modalProps); _this.state = !_.isUndefined(_this.data.conditions[_this.data.integrationId]) ? _this.data.conditions[_this.data.integrationId] : {}; return _this; } // Make it possible to update state from child components _createClass(integrationConditions, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.setState(_defineProperty({}, slug, value)); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.props.router.navigate('/integrations/'); } }, { key: 'applyChanges', value: function applyChanges() { var newState = Object.assign({}, this.data.conditions); newState[this.data.integrationId] = Object.assign({}, this.state); this.props.actions.integrationActions.updateIntegrationConditions(newState); // Close modal this.closeModal(); } }, { key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { className: 'sui-box-header' }, _react2.default.createElement( 'h3', { id: 'dialogTitle', className: 'sui-box-title' }, (0, _utils.translate)('Conditions') ), _react2.default.createElement( 'div', { className: 'sui-actions-left' }, _react2.default.createElement( 'span', { className: 'sui-tag sui-tag-draft' }, this.data.integrationTitle ) ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement(_reactButtonIcon.ButtonIcon, { icon: 'close', iconSize: 'md', label: (0, _utils.translate)('Close this dialog window'), className: 'forminator-builder-fields-close', onClick: this.closeModal }) ) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement(_conditions2.default, _extends({}, this.props, { updateProperty: this.updateProperty, state: this.state })) ), _react2.default.createElement( 'div', { className: 'sui-box-footer' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost forminator-discard-field-settings', onClick: this.closeModal }, _react2.default.createElement('i', { className: 'sui-icon-close', 'aria-hidden': 'true' }), (0, _utils.translate)('Cancel') ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement( 'button', { className: 'sui-button forminator-save-field-settings', onClick: this.applyChanges }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }), (0, _utils.translate)('Apply') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ) ); } }]); return integrationConditions; }(_react.Component); exports.default = (0, _withRouter.withRouter)(integrationConditions); /***/ }), /* 563 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _conditionsRule = __webpack_require__(564); var _conditionsRule2 = _interopRequireDefault(_conditionsRule); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Conditions = function (_Component) { _inherits(Conditions, _Component); function Conditions(props) { _classCallCheck(this, Conditions); var _this = _possibleConstructorReturn(this, (Conditions.__proto__ || Object.getPrototypeOf(Conditions)).call(this, props)); _this.addRule = _this.addRule.bind(_this); _this.removeRule = _this.removeRule.bind(_this); _this.updateField = _this.updateField.bind(_this); _this.updateRule = _this.updateRule.bind(_this); _this.updateValue = _this.updateValue.bind(_this); _this.updateInputValue = _this.updateInputValue.bind(_this); _this.fields = (0, _utils.getFields)(_this.props.wrappers, null, { main_date_field: true }); // Remove Stripe & PayPal fields from the list _this.fields = _.filter(_this.fields, function (field) { return field.field_type !== 'stripe' && field.field_type !== 'paypal' && field.field_type !== 'page-break' && field.field_type !== 'pagination' && field.field_type !== 'section' && field.field_type !== 'html'; }); _this.validateConditions(); return _this; } _createClass(Conditions, [{ key: 'updateState', value: function updateState(state) { this.props.updateProperty('conditions', state); } }, { key: 'getPropState', value: function getPropState() { var props = []; _.each(this.props.state.conditions, function (element) { var newElement = Object.assign({}, element); props.push(newElement); }); return props; } }, { key: 'updateField', value: function updateField(index, value) { var newState = this.getPropState(); // eslint-disable-next-line camelcase newState[index].element_id = value; newState[index].rule = 'is'; newState[index].value = ''; this.updateState(newState); } }, { key: 'updateRule', value: function updateRule(index, value) { var newState = this.getPropState(); newState[index].rule = value; this.updateState(newState); } }, { key: 'updateValue', value: function updateValue(index, value) { var newState = this.getPropState(); newState[index].value = value; this.updateState(newState); } }, { key: 'updateInputValue', value: function updateInputValue(index, value) { var newState = this.getPropState(); newState[index].value = value; this.updateState(newState); } }, { key: 'removeRule', value: function removeRule(index) { var newState = this.getPropState(); newState.splice(index, 1); this.updateState(newState); } }, { key: 'addRule', value: function addRule() { var newState = this.getPropState(); var elementId = !_.isUndefined(this.fields[0]) ? this.fields[0].element_id : ''; newState.push({ // eslint-disable-next-line camelcase element_id: elementId, rule: 'is', value: '' }); this.updateState(newState); } }, { key: 'validateConditions', value: function validateConditions() { var rules = _.pluck(this.props.state.conditions, 'slug'); var fields = _.pluck(this.fields, 'element_id'); var invalidField = _.difference(rules, fields); if (!_.isUndefined(invalidField)) { this.removeCondition(invalidField); } } }, { key: 'removeCondition', value: function removeCondition(field) { var newState = this.getPropState(); var readyState = _.filter(newState, function (obj) { return !_.contains(field, obj.element_id); }); this.updateState(readyState); } }, { key: 'render', value: function render() { var _this2 = this; var globalMarkup = _react2.default.createElement( 'div', { className: 'fui-visibility-options' }, _react2.default.createElement( 'div', { className: 'fui-visibility-option' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'condition_action', defaultValue: 'send', noWrapper: true }), _react2.default.createElement( 'span', { value: 'send' }, (0, _utils.translate)('Send') ), _react2.default.createElement( 'span', { value: 'dont-send' }, (0, _utils.translate)('Don\'t Send') ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('data if') ) ), _react2.default.createElement( 'div', { className: 'fui-visibility-option' }, _react2.default.createElement( _radio2.default, _extends({}, this.props, { settings: this.props.state, property: 'condition_rule', defaultValue: 'all', noWrapper: true }), _react2.default.createElement( 'span', { value: 'all' }, (0, _utils.translate)('All') ), _react2.default.createElement( 'span', { value: 'any' }, (0, _utils.translate)('Any') ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('of the conditions below are met.') ) ) ); var header = _react2.default.createElement( 'div', { className: 'fui-visibility-header' }, globalMarkup, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Conditions') ) ); var description = _react2.default.createElement( 'div', { className: 'sui-description', style: { 'margin': '0 0 30px' } }, (0, _utils.translate)('Use conditional logic to send data to this app based on submitted form data.') ); var noConditions = _react2.default.createElement( 'div', { className: 'fui-visibility-group' }, description, (this.props.wrappers.length > 1 || this.fields.length >= 1) && !_.isEmpty(this.fields) && header, _react2.default.createElement( 'div', { className: 'fui-visibility' }, _react2.default.createElement( 'div', { className: 'fui-visibility-empty-message' }, (this.props.wrappers.length > 1 || this.fields.length >= 1) && !_.isEmpty(this.fields) && _react2.default.createElement( 'button', { accessKey: 'a', onClick: this.addRule }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add Conditions') ), _react2.default.createElement( 'p', null, (0, _utils.translate)('Add conditions under which data should be sent to this app.') ) ) ) ); if (!_.isUndefined(this.props.state.conditions) && this.props.state.conditions.length > 0 && !_.isEmpty(this.fields)) { return _react2.default.createElement( 'div', { className: 'fui-visibility-group' }, description, (this.props.wrappers.length > 1 || this.fields.length > 1) && header, _react2.default.createElement( 'div', { className: 'fui-visibility' }, _react2.default.createElement( 'div', { className: 'fui-visibility-rules' }, _.map(this.props.state.conditions, function (rule, i) { return _react2.default.createElement(_conditionsRule2.default, _extends({}, _this2.props, { rule: rule, key: i, counter: i, removeRule: _this2.removeRule, updateField: _this2.updateField, updateRule: _this2.updateRule, updateValue: _this2.updateValue, updateInputValue: _this2.updateInputValue, fields: _this2.fields })); }) ) ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-blue', accessKey: 'a', onClick: this.addRule }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add Condition') ) ); } return _react2.default.createElement( _react2.default.Fragment, null, noConditions ); } }]); return Conditions; }(_react.Component); exports.default = Conditions; /***/ }), /* 564 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _suiSelect3 = __webpack_require__(16); var _suiSelect4 = _interopRequireDefault(_suiSelect3); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ConditionRule = function (_Component) { _inherits(ConditionRule, _Component); function ConditionRule(props) { _classCallCheck(this, ConditionRule); // Bind events var _this = _possibleConstructorReturn(this, (ConditionRule.__proto__ || Object.getPrototypeOf(ConditionRule)).call(this, props)); _this.toggleState = _this.toggleState.bind(_this); _this.updateField = _this.updateField.bind(_this); _this.updateRule = _this.updateRule.bind(_this); _this.updateValue = _this.updateValue.bind(_this); _this.updateInputValue = _this.updateInputValue.bind(_this); _this.state = { open: false }; _this.fields = _this.props.fields; return _this; } _createClass(ConditionRule, [{ key: 'removeRule', value: function removeRule() { this.props.removeRule(this.props.counter); } }, { key: 'updateField', value: function updateField(prop, value) { this.props.updateField(this.props.counter, value); } }, { key: 'updateRule', value: function updateRule(prop, value) { this.props.updateRule(this.props.counter, value); } }, { key: 'updateValue', value: function updateValue(e) { this.props.updateValue(this.props.counter, e.target.value); } }, { key: 'updateInputValue', value: function updateInputValue(prop, value) { this.props.updateInputValue(this.props.counter, value); } }, { key: 'toggleState', value: function toggleState() { this.setState({ open: !this.state.open }); } }, { key: 'disableSearch', value: function disableSearch() { return { minimumResultsForSearch: -1 }; } }, { key: 'render', value: function render() { var _this2 = this; var conditionId = 'condition-' + this.props.counter; var fieldData = _.where(this.fields, { element_id: this.props.rule.element_id })[0] || {}; var valueLabel = _.isEmpty(this.props.rule.value) ? (0, _utils.translate)('null') : this.props.rule.value; var month = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; var dateRules = ['day_is', 'day_is_not', 'month_is', 'month_is_not']; var days = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']; var isConsent = 'consent' === fieldData.field_type; if (isConsent) { this.props.rule.value = (0, _utils.translate)('checked'); } return _react2.default.createElement( 'div', { className: 'sui-box fui-visibility-rule' + (true === this.state.open ? ' fui-open' : '') }, _react2.default.createElement( 'h4', { className: 'fui-visibility-rule-header' }, _react2.default.createElement( 'button', { id: 'forminator-field-' + conditionId, className: 'sui-box-header', 'aria-controls': 'forminator-field-' + conditionId + '-content', 'aria-expanded': this.state.open, onClick: function onClick() { return _this2.toggleState(); } }, _react2.default.createElement('i', { className: 'sui-icon-link fui-visibility-rule-icon', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'fui-visibility-rule-text' }, _react2.default.createElement( 'strong', null, (0, _escapeHtml.escapeHTML)(fieldData.label) ), '\xA0', (0, _utils.getRuleLabel)(this.props.rule.rule, fieldData.field_type), '\xA0', _react2.default.createElement( 'strong', null, valueLabel ) ), _react2.default.createElement('i', { className: 'sui-icon-chevron-down fui-visibility-rule-arrow', 'aria-hidden': 'true' }) ) ), _react2.default.createElement( 'div', { role: 'region', id: 'forminator-field-' + conditionId + '-content', className: 'sui-box-body fui-visibility-rule-body', 'aria-labelledby': 'forminator-field-' + conditionId, 'aria-hidden': true === this.state.open ? false : true }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { elementId: conditionId + '-field', property: 'element_id', updateProperty: this.updateField, settings: this.props.rule, label: (0, _utils.translate)('Field') }), _.map(this.fields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect4.default, _extends({}, this.props, { elementId: conditionId + '-condrule', settings: this.props.rule, property: 'rule', updateProperty: this.updateRule, label: (0, _utils.translate)('Condition (required)'), options: this.disableSearch() }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select rule') ), 'signature' === fieldData.field_type && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is' }, (0, _utils.translate)('Is null') ), _react2.default.createElement( 'option', { value: 'is_not' }, (0, _utils.translate)('Is not null') ) ), 'signature' !== fieldData.field_type && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is' }, (0, _utils.translate)('Is') ), _react2.default.createElement( 'option', { value: 'is_not' }, (0, _utils.translate)('Is not') ) ), (fieldData.isNumber || 'rating' === fieldData.field_type) && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is_great' }, (0, _utils.translate)('Is greater than') ), _react2.default.createElement( 'option', { value: 'is_less' }, (0, _utils.translate)('Is less than') ) ), !fieldData.isNumber && !fieldData.hasOptions && 'signature' !== fieldData.field_type && 'rating' !== fieldData.field_type && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'contains' }, (0, _utils.translate)('Contains') ), _react2.default.createElement( 'option', { value: 'does_not_contain' }, (0, _utils.translate)('Does not contain') ), _react2.default.createElement( 'option', { value: 'starts' }, (0, _utils.translate)('Starts with') ), _react2.default.createElement( 'option', { value: 'ends' }, (0, _utils.translate)('Ends with') ) ), 'date' === fieldData.field_type && ('date-day' === fieldData.field_slug || 'date' === fieldData.field_slug) && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'day_is' }, (0, _utils.translate)('Day is') ), _react2.default.createElement( 'option', { value: 'day_is_not' }, (0, _utils.translate)('Day is not') ) ), 'date' === fieldData.field_type && 'signature' !== fieldData.field_type && ('date-month' === fieldData.field_slug || 'date' === fieldData.field_slug) && !isConsent && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'month_is' }, (0, _utils.translate)('Month is') ), _react2.default.createElement( 'option', { value: 'month_is_not' }, (0, _utils.translate)('Month is not') ) ) ) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _react2.default.Fragment, null, fieldData.hasOptions && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select option') ), _.map(fieldData.values, function (option, x) { return _react2.default.createElement( 'option', { value: option.value, key: x }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ) ), !fieldData.hasOptions && isConsent && _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.rule, inputId: conditionId + '-value', property: 'value', updateProperty: this.updateInputValue, label: (0, _utils.translate)('Status'), disabled: true })), !fieldData.hasOptions && 'signature' !== fieldData.field_type && !isConsent && (!dateRules.includes(this.props.rule.rule) || 'date' !== fieldData.field_type) && _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.rule, inputId: conditionId + '-value', property: 'value', updateProperty: this.updateInputValue, label: (0, _utils.translate)('Value') })), !fieldData.hasOptions && 'date' === fieldData.field_type && ('month_is' === this.props.rule.rule === 'month_is' || this.props.rule.rule === 'month_is_not') && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select month') ), _.map(month, function (value) { return _react2.default.createElement( 'option', { value: value, key: value }, value ); }) ) ), !fieldData.hasOptions && 'date' === fieldData.field_type && ('day_is' === this.props.rule.rule || 'day_is_not' === this.props.rule.rule) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select day') ), _.map(days, function (value) { return _react2.default.createElement( 'option', { value: value, key: value }, value ); }) ) ) ) ) ), _react2.default.createElement( 'div', { className: 'fui-visibility-rule-footer' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-red sui-button-ghost', onClick: this.removeRule.bind(this) }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), (0, _utils.translate)('Delete') ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost', onClick: function onClick() { return _this2.toggleState(); } }, (0, _utils.translate)('Done') ) ) ) ); } }]); return ConditionRule; }(_react.Component); exports.default = ConditionRule; /***/ }), /* 565 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); var _footer = __webpack_require__(59); var _footer2 = _interopRequireDefault(_footer); var _close = __webpack_require__(63); var _close2 = _interopRequireDefault(_close); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var deleteModal = function (_Component) { _inherits(deleteModal, _Component); function deleteModal(props) { _classCallCheck(this, deleteModal); var _this = _possibleConstructorReturn(this, (deleteModal.__proto__ || Object.getPrototypeOf(deleteModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.trashField = _this.trashField.bind(_this); return _this; } _createClass(deleteModal, [{ key: 'trashField', value: function trashField() { // Delete field this.props.modal.modalProps.trashField(); // Close modal this.closeModal(); } }, { key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { flatten: true, alignment: 'center', closeModal: this.closeModal, closeType: 'icon', customClass: 'sui-spacing-top--60' }, _react2.default.createElement(_title2.default, { id: '' // Missing id. , label: (0, _utils.translate)('Delete Notification'), size: 'lg' }), _react2.default.createElement( 'p', { id: '' // Mising id. , className: 'sui-description' }, (0, _utils.translate)('Are you sure you wish to delete this Notification?') ) ), _react2.default.createElement( _footer2.default, { customClass: 'sui-flatten sui-content-center' }, _react2.default.createElement(_close2.default, { label: (0, _utils.translate)('Cancel'), closeModal: this.closeModal, customClass: 'sui-button-ghost forminator-discard-field-settings' }), _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost sui-button-red', onClick: this.trashField }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), (0, _utils.translate)('Delete') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ); } }]); return deleteModal; }(_react.Component); exports.default = deleteModal; /***/ }), /* 566 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); var _footer = __webpack_require__(59); var _footer2 = _interopRequireDefault(_footer); var _close = __webpack_require__(63); var _close2 = _interopRequireDefault(_close); var _notifications = __webpack_require__(28); var _notifications2 = _interopRequireDefault(_notifications); var _axios = __webpack_require__(37); var _axios2 = _interopRequireDefault(_axios); var _qs = __webpack_require__(38); var _qs2 = _interopRequireDefault(_qs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var deletePdfModal = function (_Component) { _inherits(deletePdfModal, _Component); function deletePdfModal(props) { _classCallCheck(this, deletePdfModal); var _this = _possibleConstructorReturn(this, (deletePdfModal.__proto__ || Object.getPrototypeOf(deletePdfModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.deletePdf = _this.deletePdf.bind(_this); _this.showNotification = _this.showNotification.bind(_this); _this.trashPDF = _this.trashPDF.bind(_this); _this.data = Object.assign({}, _this.props.modal.modalProps); return _this; } _createClass(deletePdfModal, [{ key: 'deletePdf', value: function deletePdf() { var _this2 = this; var pdfData = { action: 'forminator_delete_pdf', _wpnonce: forminatorData.formNonce, pdfId: this.data.pdf.pdfId }; _axios2.default.post(forminatorData.ajaxUrl, _qs2.default.stringify(pdfData)).then(function (res) { if (res.data.success) { _this2.showNotification('success', (0, _utils.translate)('PDF file successfully deleted.')); _this2.trashPDF(res.data.data); } else { _this2.showNotification('error', res.data); } }).catch(function (err) { _this2.showNotification('error', err); }); } }, { key: 'showNotification', value: function showNotification(type, msg) { var custom = new _notifications2.default({ type: type, text: 'error' === type ? (0, _utils.translate)('Something went wrong while creating your PDF. Please try again.') : msg }); custom.open(); if ('error' === type) { console.log(msg); } this.closeModal(); } }, { key: 'trashPDF', value: function trashPDF(pdfId) { var pdfs = [].concat(_toConsumableArray(this.props.pdfs)); var pdfsObj = this.getPDFWithoutCurrent(pdfs, pdfId); // Update state this.props.actions.pdfsActions.updatePdfs(pdfsObj); } }, { key: 'getPDFWithoutCurrent', value: function getPDFWithoutCurrent(pdfs, pdfId) { return pdfs.filter(function (pdf) { return parseInt(pdf.pdfId) !== parseInt(pdfId); }); } }, { key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { flatten: true, alignment: 'center', closeModal: this.closeModal, closeType: 'icon', customClass: 'sui-spacing-top--60' }, _react2.default.createElement(_title2.default, { id: 'forminator-delete-pdf-modal__title' // Missing id. , label: (0, _utils.translate)('Delete PDF File'), size: 'sm' }), _react2.default.createElement( 'p', { className: 'sui-description' }, (0, _utils.translate)('Are you sure you wish to delete'), _react2.default.createElement( 'b', null, ' ', this.data.pdf.pdfFilename, '.pdf' ), '?' ) ), _react2.default.createElement( _footer2.default, { customClass: 'sui-flatten sui-content-center' }, _react2.default.createElement(_close2.default, { label: (0, _utils.translate)('Cancel'), closeModal: this.closeModal, customClass: 'sui-button-ghost' }), _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost sui-button-red pdf-delete-button', onClick: this.deletePdf }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), (0, _utils.translate)('Delete') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ); } }]); return deletePdfModal; }(_react.Component); exports.default = deletePdfModal; /***/ }), /* 567 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); var _footer = __webpack_require__(59); var _footer2 = _interopRequireDefault(_footer); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var AccessPdfAddonModal = function (_Component) { _inherits(AccessPdfAddonModal, _Component); function AccessPdfAddonModal(props) { _classCallCheck(this, AccessPdfAddonModal); var _this = _possibleConstructorReturn(this, (AccessPdfAddonModal.__proto__ || Object.getPrototypeOf(AccessPdfAddonModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.onClickCallback = _this.onClickCallback.bind(_this); return _this; } _createClass(AccessPdfAddonModal, [{ key: 'onClickCallback', value: function onClickCallback(e, $link) { var _this2 = this; e.preventDefault(); (0, _utils.goToLink)($link); setTimeout(function () { _this2.closeModal(); }, 500); } }, { key: 'render', value: function render() { var _this3 = this; var encodedSiteUrl = encodeURIComponent(forminatorData.siteUrl); return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { alignment: 'center', closeModal: this.closeModal, closeType: 'icon', closeColor: 'white', flatten: true, imageName: 'connect-to-wpmudev' }, _react2.default.createElement(_title2.default, { id: 'forminator-delete-pdf-modal__title' // Missing id. , label: (0, _utils.translate)('Access PDF Generator Add-on'), size: 'lg' }), _react2.default.createElement( 'p', { className: 'sui-description' }, (0, _utils.translate)('Create an account with WPMU DEV (the developers of Forminator) ' + 'to get instant access to PDF Add-on, plus a host of bonus site ' + 'management tools that come included. It’s fast, easy, and free!') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body sui-content-center sui-spacing-bottom--20' }, _react2.default.createElement( 'button', { className: 'sui-button connect-button', style: { backgroundColor: '#286EF1' }, onClick: function onClick(e) { _this3.onClickCallback(e, 'https://wpmudev.com/register/?signup=forminator-pdf-addon&forminator_url=' + encodedSiteUrl); } }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, (0, _utils.translate)('Connect to WPMU DEV') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ), _react2.default.createElement( _footer2.default, { customClass: 'sui-flatten sui-content-center' }, _react2.default.createElement( 'small', { style: { fontWeight: '500' } }, (0, _utils.translate)('Already a member? {{link}}Connect site{{/link}}', { components: { link: _react2.default.createElement('a', { onClick: function onClick(e) { _this3.onClickCallback(e, 'https://wpmudev.com/login/?signin=forminator-pdf-addon&forminator_url=' + encodedSiteUrl); }, target: '_blank' }) } }) ) ) ); } }]); return AccessPdfAddonModal; }(_react.Component); exports.default = AccessPdfAddonModal; /***/ }), /* 568 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactRouterDom = __webpack_require__(24); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); var _footer = __webpack_require__(59); var _footer2 = _interopRequireDefault(_footer); var _close = __webpack_require__(63); var _close2 = _interopRequireDefault(_close); var _accordionToggle = __webpack_require__(187); var _accordionToggle2 = _interopRequireDefault(_accordionToggle); var _suiVariables = __webpack_require__(50); var _suiVariables2 = _interopRequireDefault(_suiVariables); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _uploads = __webpack_require__(64); var _uploads2 = _interopRequireDefault(_uploads); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var pdfHeaderModal = function (_Component) { _inherits(pdfHeaderModal, _Component); function pdfHeaderModal(props) { _classCallCheck(this, pdfHeaderModal); var _this = _possibleConstructorReturn(this, (pdfHeaderModal.__proto__ || Object.getPrototypeOf(pdfHeaderModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.updateProperty = _this.updateProperty.bind(_this); _this.applyChanges = _this.applyChanges.bind(_this); _this.state = _this.props.settings || {}; return _this; } _createClass(pdfHeaderModal, [{ key: 'getNameOptions', value: function getNameOptions() { var nameOptions = []; var nameFields = (0, _utils.getFields)(forminatorData.parentFormFields, [ // disable these fields 'page-break', 'postdata', 'captcha', 'consent', 'gdprcheckbox', 'stripe', 'paypal', 'password', 'group'], undefined, undefined, true); nameFields.map(function (field) { if (_.isEmpty(field.parent_group)) { nameOptions.push({ value: '{' + field.element_id + '}', label: field.label }); } }); return nameOptions; } // Make it possible to update state from child components }, { key: 'updateProperty', value: function updateProperty(slug, value) { this.setState(_defineProperty({}, slug, value)); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.props.router.navigate('/builder/'); } }, { key: 'applyChanges', value: function applyChanges() { this.props.actions.settingsActions.updateSettings(this.state); // Close modal this.closeModal(); } }, { key: 'getMiscData', value: function getMiscData() { var modifiedVars = {}; _.assign(modifiedVars, forminatorData.variables); var editorOptions = !_.isEmpty(modifiedVars) ? modifiedVars : []; return _react2.default.createElement( _react2.default.Fragment, null, editorOptions && _react2.default.createElement( 'optgroup', { label: (0, _utils.translate)('Misc Data') }, _.map(editorOptions, function (label, key) { return _react2.default.createElement( 'option', { key: key, value: '{' + key + '}', 'data-content': '{' + key + '}' }, label ); }) ) ); } }, { key: 'render', value: function render() { var siteInfoTags = [{ value: '{site_title}', label: 'Site Title' }, { value: '{site_url}', label: 'Site URL' }, { value: '{date_dmy}', label: 'Date' }]; var mergeTags = _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'optgroup', { label: (0, _utils.translate)('Site Information') }, siteInfoTags.map(function (option, i) { return _react2.default.createElement( 'option', { key: i, value: option.value, 'data-content': option.value }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ), this.getMiscData() ); return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { closeType: 'icon', closeModal: this.closeModal }, _react2.default.createElement(_title2.default, { label: (0, _utils.translate)('Edit Field'), tag: (0, _utils.translate)('Header') }) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'div', { className: 'sui-tabs sui-tabs-flushed' }, _react2.default.createElement( 'div', { className: 'sui-tabs-menu' }, _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/settings/', className: function className(_ref) { var isActive = _ref.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Settings') ), _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/styling/', className: function className(_ref2) { var isActive = _ref2.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Styling') ) ), _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/', element: _react2.default.createElement(_reactRouterDom.Navigate, { to: '/builder/settings/', replace: true }) }) ), _react2.default.createElement( 'div', { className: 'sui-tabs-content' }, _react2.default.createElement( 'div', { className: 'sui-tab-content active' }, _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/settings', element: _react2.default.createElement( 'div', { key: 'builder-settings', className: 'sui-accordion sui-accordion-flushed', style: { marginTop: '-30px', marginBottom: '-30px' }, value: 'multiple' }, _react2.default.createElement( _accordionToggle2.default, _extends({}, this.props, { settings: this.state, label: (0, _utils.translate)('Logo'), property: 'pdf_logo_enabled', open: true, updateProperty: this.updateProperty }), _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { label: (0, _utils.translate)('Logo Type'), property: 'pdf_logo_type', 'default': 'text', settings: this.state, updateProperty: this.updateProperty }), _react2.default.createElement( _container2.default, { value: 'text', label: (0, _utils.translate)('Text') }, _react2.default.createElement( 'div', { style: { marginTop: '20px' } }, _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { label: (0, _utils.translate)('Logo Text'), settings: this.state, property: 'pdf_logo_text', placeholder: (0, _utils.translate)('Value'), className: 'sui-form-control', updateProperty: this.updateProperty }), mergeTags ) ) ), _react2.default.createElement( _container2.default, { value: 'image', label: (0, _utils.translate)('Image') }, _react2.default.createElement( 'div', { style: { marginTop: '20px' } }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { label: (0, _utils.translate)('Logo image source'), property: 'pdf_logo_image_type', 'default': 'image_site_logo', settings: this.state, updateProperty: this.updateProperty }), _react2.default.createElement( _container2.default, { value: 'image_site_logo', label: (0, _utils.translate)('Use site logo') }, _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-blue sui-active', style: { display: 'block', marginTop: '20px' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Your site’s logo will be used as the ' + 'logo for this PDF file.') ) ) ) ), !forminatorData.hasSiteLogo && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-yellow sui-active', style: { display: 'block', marginTop: '20px' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Your site doesn’t have any logo image set. ' + 'You can set a site logo or upload a new logo ' + 'for your PDF file.') ) ) ) ) ), _react2.default.createElement( _container2.default, { value: 'image_upload_logo', label: (0, _utils.translate)('Use logo image'), boxClass: 'sui-tab-boxed' }, _react2.default.createElement(_uploads2.default, _extends({}, this.props, { settings: this.state, updateProperty: this.updateProperty, type: 'image', fieldClass: 'sui-auto', property: 'image_upload_logo_value', label: (0, _utils.translate)('Upload Image'), description: (0, _utils.translate)('Supported formats (.png, .gif, .jpg, and .svg). For best output, please upload an image with a height of 80px.') })) ), _react2.default.createElement( _container2.default, { value: 'image_logo_url', label: (0, _utils.translate)('Logo URL'), boxClass: 'sui-tab-boxed' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'image_logo_url_value', settings: this.state, updateProperty: this.updateProperty, label: (0, _utils.translate)('Image URL'), placeholder: (0, _utils.translate)('E.g. https://domain.com/images/logo.png'), requiredError: (0, _utils.translate)('Please enter the image URL for the logo.'), description: (0, _utils.translate)('For best output, image height is constrained ' + 'to 80px. You can adjust this size using custom ' + 'CSS.') })) ) ) ) ) ) ) ) ) ), _react2.default.createElement( _accordionToggle2.default, _extends({}, this.props, { settings: this.state, label: (0, _utils.translate)('Title'), property: 'pdf_title_enabled', open: true, updateProperty: this.updateProperty }), _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _suiVariables2.default, _extends({}, this.props, { settings: this.state, property: 'pdf_title', placeholder: (0, _utils.translate)('Value'), className: 'sui-form-control', updateProperty: this.updateProperty }), mergeTags ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { label: (0, _utils.translate)('Title alignment'), property: 'pdf_title_alignment', 'default': 'left', settings: this.state, updateProperty: this.updateProperty }), _react2.default.createElement( _empty2.default, { value: 'left' }, (0, _utils.translate)('Left') ), _react2.default.createElement( _empty2.default, { value: 'center' }, (0, _utils.translate)('Center') ), _react2.default.createElement( _empty2.default, { value: 'right' }, (0, _utils.translate)('Right') ) ) ) ) ) ) ) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/styling', element: _react2.default.createElement(_styling2.default, _extends({}, this.props, { updateProperty: this.updateProperty, state: this.state })) }) ) ) ) ) ), _react2.default.createElement( _footer2.default, { alignment: 'separated' }, _react2.default.createElement(_close2.default, { icon: 'undo', label: (0, _utils.translate)('Discard Changes'), closeModal: this.closeModal, customClass: 'sui-button-ghost forminator-discard-field-settings' }), _react2.default.createElement( 'button', { className: 'sui-button forminator-save-field-settings', disabled: (0, _utils.isTrue)(this.state.pdf_title_enabled) && _.isEmpty(this.state.pdf_title), onClick: this.applyChanges }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }), (0, _utils.translate)('Apply') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ); } }]); return pdfHeaderModal; }(_react.Component); exports.default = (0, _withRouter.withRouter)(pdfHeaderModal); /***/ }), /* 569 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactRouterDom = __webpack_require__(24); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _styling = __webpack_require__(26); var _styling2 = _interopRequireDefault(_styling); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); var _footer = __webpack_require__(59); var _footer2 = _interopRequireDefault(_footer); var _close = __webpack_require__(63); var _close2 = _interopRequireDefault(_close); var _wpEditor = __webpack_require__(31); var _wpEditor2 = _interopRequireDefault(_wpEditor); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var pageFooterModal = function (_Component) { _inherits(pageFooterModal, _Component); function pageFooterModal(props) { _classCallCheck(this, pageFooterModal); var _this = _possibleConstructorReturn(this, (pageFooterModal.__proto__ || Object.getPrototypeOf(pageFooterModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.updateProperty = _this.updateProperty.bind(_this); _this.applyChanges = _this.applyChanges.bind(_this); _this.state = _this.props.settings || {}; return _this; } // Make it possible to update state from child components _createClass(pageFooterModal, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.setState(_defineProperty({}, slug, value)); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.props.router.navigate('/builder/'); } }, { key: 'applyChanges', value: function applyChanges() { this.props.actions.settingsActions.updateSettings(this.state); // Close modal this.closeModal(); } }, { key: 'getFieldOptions', value: function getFieldOptions() { var fieldOptions = []; var fields = (0, _utils.getFields)(forminatorData.parentFormFields, [ // disable these fields 'page-break', 'postdata', 'captcha', 'consent', 'gdprcheckbox', 'stripe', 'paypal', 'password', 'group'], undefined, undefined, true); fields.map(function (field) { if (_.isEmpty(field.parent_group)) { fieldOptions[field.element_id] = field.label; } }); return fieldOptions; } }, { key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { closeType: 'icon', closeModal: this.closeModal }, _react2.default.createElement(_title2.default, { label: (0, _utils.translate)('Edit Field'), tag: (0, _utils.translate)('Footer') }) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'div', { className: 'sui-tabs sui-tabs-flushed' }, _react2.default.createElement( 'div', { className: 'sui-tabs-menu' }, _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/settings/', className: function className(_ref) { var isActive = _ref.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Settings') ), _react2.default.createElement( _reactRouterDom.NavLink, { to: '/builder/styling/', className: function className(_ref2) { var isActive = _ref2.isActive; return (isActive ? 'active ' : '') + 'sui-tab-item'; } }, (0, _utils.translate)('Styling') ) ), _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/', element: _react2.default.createElement(_reactRouterDom.Navigate, { to: '/builder/settings/', replace: true }) }) ), _react2.default.createElement( 'div', { className: 'sui-tabs-content' }, _react2.default.createElement( 'div', { className: 'sui-tab-content active' }, _react2.default.createElement( _reactRouterDom.Routes, null, _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/settings', element: _react2.default.createElement( 'div', { key: 'builder-settings' }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { extraId: 'html-type', settings: this.state, boxClass: 'sui-tab-boxed', property: 'footer_value', disableMiscData: true, allowRepeater: false, excludeSubFields: true, enableFormData: true, enablePostData: false, enableUpload: true, allowButtonOnclick: 'true', enableParentForm: 'true', mainOptions: [], label: (0, _utils.translate)('Value'), updateProperty: this.updateProperty })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_toggle2.default, _extends({}, this.props, { settings: this.state, label: (0, _utils.translate)('Show page number'), property: 'show_page_number', updateProperty: this.updateProperty, unWrap: true })) ) ) ) }), _react2.default.createElement(_reactRouterDom.Route, { path: '/builder/styling', element: _react2.default.createElement(_styling2.default, _extends({}, this.props, { updateProperty: this.updateProperty, state: this.state })) }) ) ) ) ) ), _react2.default.createElement( _footer2.default, { alignment: 'separated' }, _react2.default.createElement(_close2.default, { icon: 'undo', label: (0, _utils.translate)('Discard Changes'), closeModal: this.closeModal, customClass: 'sui-button-ghost forminator-discard-field-settings' }), _react2.default.createElement( 'button', { className: 'sui-button forminator-save-field-settings', onClick: this.applyChanges }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-check', 'aria-hidden': 'true' }), (0, _utils.translate)('Apply') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ); } }]); return pageFooterModal; }(_react.Component); exports.default = (0, _withRouter.withRouter)(pageFooterModal); /***/ }), /* 570 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); var _footer = __webpack_require__(59); var _footer2 = _interopRequireDefault(_footer); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _notifications = __webpack_require__(28); var _notifications2 = _interopRequireDefault(_notifications); var _axios = __webpack_require__(37); var _axios2 = _interopRequireDefault(_axios); var _qs = __webpack_require__(38); var _qs2 = _interopRequireDefault(_qs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var savedTemplateModal = function (_Component) { _inherits(savedTemplateModal, _Component); function savedTemplateModal(props) { _classCallCheck(this, savedTemplateModal); var _this = _possibleConstructorReturn(this, (savedTemplateModal.__proto__ || Object.getPrototypeOf(savedTemplateModal)).call(this, props)); _this.state = { options: [], templatesPageLoaded: 1, showLoadMore: false, templateSaveLoader: false, disabled: true, optionsLoaded: false, 'form-template-settings': 'form-template-name', 'form-template-name': '', 'form-existing-template': '' }; _this.closeModal = _this.closeModal.bind(_this); _this.getOptions = _this.getOptions.bind(_this); _this.openModal = _this.openModal.bind(_this); _this.onChange = _this.onChange.bind(_this); _this.showError = _this.showError.bind(_this); _this.saveTemplate = _this.saveTemplate.bind(_this); _this.updateProperty = _this.updateProperty.bind(_this); _this.resetFields(); return _this; } // check if button is disabled. _createClass(savedTemplateModal, [{ key: 'isDisabled', value: function isDisabled(property) { var settings = this.props.settings ? this.props.settings[property] : undefined; // If settings or this.props.settings[settings] is undefined, return true if (settings === undefined || this.props.settings[settings] === undefined) { return true; } return this.props.settings[settings] === ''; } // onChange of input and select. }, { key: 'onChange', value: function onChange(value) { if ('form-existing-template' === value) { // Check select value value = this.props.settings['form-existing-template']; } else if ('form-template-name' === value) { value = this.props.settings['form-template-name']; } this.setState({ disabled: '' === value }); } }, { key: 'getOptions', value: function getOptions() { var _this2 = this; window.fetch(ajaxurl, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8' }, body: 'action=forminator_get_cloud_templates&_ajax_nonce=' + forminatorData.load_cloud_templates + '&page_number=' + this.state.templatesPageLoaded }).then(function (response) { return response.json(); }).then(function (data) { if (data.success) { if (data.data.length) { // Transform data.data var transformedData = data.data.map(function (item) { return { id: item.template_id, text: item.name }; }); _this2.setState({ options: [].concat(_toConsumableArray(_this2.state.options), _toConsumableArray(transformedData)), templatesPageLoaded: _this2.state.templatesPageLoaded + 1 }); } if (data.data.length < forminatorData.templates_per_page) { // hide Load More button _this2.setState({ showLoadMore: false }); } _this2.setState({ optionsLoaded: true }); } }).catch(function (error) { console.log(error); }); } }, { key: 'saveTemplate', value: function saveTemplate() { var _this3 = this; var TemplateData = { action: 'forminator_save_template', _wpnonce: forminatorData.save_cloud_templates, form_id: this.props.settings.form_id, template_name: this.props.settings['form-template-name'], template_id: this.props.settings['form-existing-template'] }; this.setState({ templateSaveLoader: true }); _axios2.default.post(ajaxurl, _qs2.default.stringify(TemplateData)).then(function (res) { if (res.data.success) { _this3.openModal(); } else { _this3.showError(res.data); } _this3.resetFields(); }).catch(function (err) { _this3.showError(err); _this3.resetFields(); }); } }, { key: 'resetFields', value: function resetFields() { this.props.settings['form-template-settings'] = 'form-template-name'; this.props.settings['form-template-name'] = ''; this.props.settings['form-existing-template'] = ''; } }, { key: 'showError', value: function showError(err) { var custom = new _notifications2.default({ type: 'error', text: err.data || (0, _utils.translate)('Something went wrong while saving your template. Please try again.') }); custom.open(); console.log(err); this.closeModal(); } }, { key: 'updateProperty', value: function updateProperty(slug, value) { this.props.settings[slug] = value; this.setState(_defineProperty({}, slug, value)); } }, { key: 'openModal', value: function openModal() { var _this4 = this; setTimeout(function () { _this4.props.actions.modalActions.showModal({ open: true, title: _this4.actionText, id: 'save-template', activeElement: jQuery(document.activeElement), focusFirst: '.modal-close-button' }, 'savedTemplateSuccessModal'); }, 500); } }, { key: 'closeModal', value: function closeModal() { this.resetFields(); this.props.modal.modalProps.closeModal(); } }, { key: 'render', value: function render() { var _this5 = this; var optionsLoaded = this.state.optionsLoaded; return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { alignment: 'center', closeModal: this.closeModal, closeType: 'icon', flatten: true, customClass: 'sui-spacing-top--60' }, _react2.default.createElement(_title2.default, { id: 'forminator-save-template-modal__title', label: (0, _utils.translate)('Save Template'), size: 'lg' }), _react2.default.createElement( 'p', { className: 'sui-description' }, (0, _utils.translate)('Enter a name to save this form as a template or select an existing template to overwrite.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body sui-spacing-bottom--20' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'form-template-settings', 'default': this.state['form-template-settings'], updateProperty: function updateProperty(property, val) { _this5.updateProperty(property, val); _this5.props.settings['form-existing-template'] = ''; _this5.onChange(val); } }), _react2.default.createElement( _container2.default, { value: 'form-template-name', boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('New Template') }, _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'text', label: (0, _utils.translate)('Name'), placeholder: (0, _utils.translate)('E.g., Registration form template'), property: 'form-template-name', updateProperty: function updateProperty(property, val) { _this5.updateProperty(property, val); _this5.onChange(val); } })) ), _react2.default.createElement( _container2.default, { value: 'form-existing-template', boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Update Existing Template') }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { label: (0, _utils.translate)('Choose template'), property: 'form-existing-template', hasSearch: optionsLoaded, updateProperty: function updateProperty(property, val) { _this5.updateProperty(property, val); _this5.onChange(val); }, placeholder: (0, _utils.translate)('Select a template'), data: optionsLoaded ? this.state.options : [{ id: 'searching', text: (0, _utils.translate)('Searching…'), disabled: true }], loading: !optionsLoaded, fetchOptions: function fetchOptions() { return _this5.getOptions; } }), _react2.default.createElement('option', null) ), this.state.showLoadMore && _react2.default.createElement( 'a', { href: '#', onClick: this.getOptions, style: { display: 'block', marginTop: '-15px', marginBottom: '15px' } }, (0, _utils.translate)('Load more') ), _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block', marginTop: '-15px' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Warning! The selected template will be overwritten by this form.') ) ) ) ) ) ) ), _react2.default.createElement( _footer2.default, { customClass: 'sui-flatten sui-content-center' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-grey \n\t\t\t\t\t\t\t' + (this.state.templateSaveLoader ? 'sui-button-onload' : ''), disabled: '' + (this.state.disabled ? 'disabled' : ''), onClick: this.saveTemplate }, _react2.default.createElement( 'span', { 'class': 'sui-loading-text' }, _react2.default.createElement('span', { 'class': 'sui-icon-save', 'aria-hidden': 'true' }), (0, _utils.translate)('Save Template') ), _react2.default.createElement('span', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ); } }]); return savedTemplateModal; }(_react.Component); exports.default = savedTemplateModal; /***/ }), /* 571 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); var _footer = __webpack_require__(59); var _footer2 = _interopRequireDefault(_footer); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var savedTemplateSuccessModal = function (_Component) { _inherits(savedTemplateSuccessModal, _Component); function savedTemplateSuccessModal(props) { _classCallCheck(this, savedTemplateSuccessModal); var _this = _possibleConstructorReturn(this, (savedTemplateSuccessModal.__proto__ || Object.getPrototypeOf(savedTemplateSuccessModal)).call(this, props)); _this.closeModal = _this.closeModal.bind(_this); return _this; } _createClass(savedTemplateSuccessModal, [{ key: 'closeModal', value: function closeModal() { this.props.actions.modalActions.showModal({ open: false }, 'savedTemplateSuccessModal'); } }, { key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { alignment: 'center', closeModal: this.closeModal, closeType: 'icon', flatten: true, customClass: 'sui-spacing-top--60' }, _react2.default.createElement('span', { 'class': 'sui-icon-check sui-lg', 'aria-hidden': 'true' }), _react2.default.createElement(_title2.default, { id: 'forminator-save-template-modal__title', label: (0, _utils.translate)('Template Saved'), size: 'lg' }), _react2.default.createElement( 'p', { className: 'sui-description' }, (0, _utils.translate)('Template successfully saved to your Hub account. You can access the saved template in the '), _react2.default.createElement( 'a', { href: 'admin.php?page=forminator-templates', target: '_blank' }, (0, _utils.translate)('Templates Page.') ) ) ), _react2.default.createElement( _footer2.default, { customClass: 'sui-flatten sui-content-center' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-grey', onClick: this.closeModal }, (0, _utils.translate)('Close') ) ) ); } }]); return savedTemplateSuccessModal; }(_react.Component); exports.default = savedTemplateSuccessModal; /***/ }), /* 572 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _header = __webpack_require__(48); var _header2 = _interopRequireDefault(_header); var _title = __webpack_require__(49); var _title2 = _interopRequireDefault(_title); var _footer = __webpack_require__(59); var _footer2 = _interopRequireDefault(_footer); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var savedTemplateProModal = function (_Component) { _inherits(savedTemplateProModal, _Component); function savedTemplateProModal(props) { _classCallCheck(this, savedTemplateProModal); var _this = _possibleConstructorReturn(this, (savedTemplateProModal.__proto__ || Object.getPrototypeOf(savedTemplateProModal)).call(this, props)); _this.closeModal = _this.props.modal.modalProps.closeModal.bind(_this); _this.onClickCallback = _this.onClickCallback.bind(_this); return _this; } _createClass(savedTemplateProModal, [{ key: 'onClickCallback', value: function onClickCallback(e, $link) { var _this2 = this; e.preventDefault(); (0, _utils.goToLink)($link); setTimeout(function () { _this2.closeModal(); }, 500); } }, { key: 'render', value: function render() { var isPurple = !forminatorData.isPro || forminatorData.expiredMembership; var title = void 0, description = void 0, buttonText = void 0, buttonLink = void 0, logoButton = false; if (!forminatorData.isPro) { title = (0, _utils.translate)('Save Form as Template'); description = (0, _utils.translate)('Save your form as a template in the Hub cloud account to easily reuse them in any of the sites you manage via the Hub. Customize once, and reuse on any of your sites connected to the Hub.'); buttonText = (0, _utils.translate)('Upgrade to Save Templates'); buttonLink = 'https://wpmudev.com/project/forminator-pro/?utm_source=forminator&utm_medium=plugin&utm_campaign=forminator_form-page-modal_cloud-template_button'; } else if (!forminatorData.dashboardPlugin) { logoButton = true; title = forminatorl10n.templates.install_title; description = forminatorl10n.templates.install_dashboard; buttonText = forminatorl10n.templates.install_button; buttonLink = 'https://wpmudev.com/project/wpmu-dev-dashboard/'; } else if (!forminatorData.isWPMUDEVloggedIn) { title = (0, _utils.translate)('Log in to WPMU DEV Account'); description = (0, _utils.translate)('Looks like your site is not connected to WPMU DEV. Log in to your WPMU DEV account to save your form as a template.'); buttonText = (0, _utils.translate)('Log in to WPMU DEV'); buttonLink = forminatorl10n.templates.login_dashboard; } else if (forminatorData.expiredMembership) { logoButton = true; title = (0, _utils.translate)('Membership Expired'); description = forminatorl10n.templates.renew_membership2; buttonText = forminatorl10n.templates.renew_button; buttonLink = 'https://wpmudev.com/project/forminator-pro/?utm_source=forminator&utm_medium=plugin&utm_campaign=forminator_save_to_cloud-template_renew'; } return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _header2.default, { alignment: 'center', closeModal: this.closeModal, closeType: 'icon', closeColor: 'white', flatten: true, imageName: 'saved-form-template' }, _react2.default.createElement(_title2.default, { id: 'forminator-save-pro-modal__title' // Missing id. , label: title, size: 'lg', tag: forminatorData.isPro ? '' : 'PRO', tagColor: 'purple', tagSize: 'sm' }), _react2.default.createElement('p', { className: 'sui-description', dangerouslySetInnerHTML: { __html: description } }) ), _react2.default.createElement( 'div', { className: 'sui-box-body sui-content-center sui-spacing-bottom--20' }, _react2.default.createElement( 'a', { href: buttonLink, target: '_blank', className: 'sui-button sui-button-icon-right ' + (isPurple ? 'sui-button-purple' : 'sui-button-blue') }, logoButton && _react2.default.createElement('span', { className: 'sui-icon-wpmudev-logo', 'aria-hidden': 'true', style: { paddingRight: '10px' } }), buttonText, !forminatorData.isPro && _react2.default.createElement('span', { className: 'sui-icon-open-new-window', 'aria-hidden': 'true' }) ) ), _react2.default.createElement(_footer2.default, { customClass: 'sui-flatten sui-content-center' }) ); } }]); return savedTemplateProModal; }(_react.Component); exports.default = savedTemplateProModal; /***/ }), /* 573 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _reactRedux = __webpack_require__(11); var _redux = __webpack_require__(12); var _settings = __webpack_require__(113); var settingsActions = _interopRequireWildcard(_settings); var _modal = __webpack_require__(62); var modalActions = _interopRequireWildcard(_modal); var _appearance = __webpack_require__(574); var _appearance2 = _interopRequireDefault(_appearance); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function mapStateToProps(state) { return { settings: state.settings, wrappers: state.wrappers, formDesign: state.settings['form-style'] || 'default' }; } function mapDispatchToProps(dispatch) { return { actions: { settingsActions: (0, _redux.bindActionCreators)(settingsActions, dispatch), modalActions: (0, _redux.bindActionCreators)(modalActions, dispatch) } }; } exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_appearance2.default); /***/ }), /* 574 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _design = __webpack_require__(230); var _design2 = _interopRequireDefault(_design); var _layout = __webpack_require__(575); var _layout2 = _interopRequireDefault(_layout); var _colors = __webpack_require__(237); var _colors2 = _interopRequireDefault(_colors); var _fonts = __webpack_require__(268); var _fonts2 = _interopRequireDefault(_fonts); var _formContainer = __webpack_require__(270); var _formContainer2 = _interopRequireDefault(_formContainer); var _fieldsContainer = __webpack_require__(577); var _fieldsContainer2 = _interopRequireDefault(_fieldsContainer); var _customCss = __webpack_require__(274); var _customCss2 = _interopRequireDefault(_customCss); var _pageSettings = __webpack_require__(275); var _pageSettings2 = _interopRequireDefault(_pageSettings); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Appearance = function (_Component) { _inherits(Appearance, _Component); function Appearance(props) { _classCallCheck(this, Appearance); return _possibleConstructorReturn(this, (Appearance.__proto__ || Object.getPrototypeOf(Appearance)).call(this, props)); } _createClass(Appearance, [{ key: 'componentDidMount', value: function componentDidMount() { jQuery('html, body').animate({ scrollTop: 0 }, 'fast'); var self = this; jQuery('#forminator-open-apply-preset').off('click').on('click', function (e) { // Close method var close = function close(open) { self.props.actions.modalActions.showModal({ open: false }, 'applyPreset'); }; self.props.actions.modalActions.showModal({ open: true, closeModal: close }, 'applyPreset'); }); } }, { key: 'render', value: function render() { var _this2 = this; var goToSection = function goToSection(module) { _this2.props.router.navigate('/' + module); }; var fontStyle = !_.isUndefined(this.props.settings['form-style']) ? this.props.settings['form-style'] : 'default'; var formType = forminatorData.currentForm.settings['form-type'] || 'default'; var pdfClass = 'pdf-form' === formType ? 'pdf-appearance' : ''; return _react2.default.createElement( 'div', { id: 'forminator-form-appearance', className: 'sui-box ' + pdfClass }, _react2.default.createElement( 'div', { className: 'sui-box-header' }, _react2.default.createElement( 'h2', { className: 'sui-box-title' }, (0, _utils.translate)('Appearance') ), 'pdf-form' !== formType && _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement( 'button', { id: 'forminator-open-apply-preset', className: 'sui-button sui-button-ghost' }, _react2.default.createElement('span', { className: 'sui-icon-brush', 'aria-hidden': 'true' }), (0, _utils.translate)('Apply Preset') ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, 'pdf-form' === formType && _react2.default.createElement(_pageSettings2.default, this.props), 'pdf-form' !== formType && _react2.default.createElement(_design2.default, this.props), 'pdf-form' !== formType && _react2.default.createElement(_layout2.default, this.props), 'pdf-form' !== formType && fontStyle !== 'none' && _react2.default.createElement( _react2.default.Fragment, { key: (0, _utils.getThemePrefix)(this.props) + 'themeKey' }, _react2.default.createElement(_colors2.default, this.props), _react2.default.createElement(_fonts2.default, this.props), _react2.default.createElement(_formContainer2.default, this.props), _react2.default.createElement(_fieldsContainer2.default, this.props) ), _react2.default.createElement(_customCss2.default, _extends({}, this.props, { formType: formType })) ), _react2.default.createElement( 'div', { className: 'sui-box-footer' }, _react2.default.createElement( 'button', { className: 'sui-button', onClick: function onClick() { return goToSection(''); } }, _react2.default.createElement('span', { className: 'sui-icon-arrow-left', 'aria-hidden': 'true' }), (0, _utils.translate)('Fields') ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, formType !== 'registration' && formType !== 'login' && formType !== 'pdf-form' && _react2.default.createElement( 'button', { className: 'sui-button sui-button-icon-right', onClick: function onClick() { return goToSection('behaviour'); } }, (0, _utils.translate)('Behavior'), _react2.default.createElement('span', { className: 'sui-icon-arrow-right', 'aria-hidden': 'true' }) ), formType === 'registration' && _react2.default.createElement( 'button', { className: 'sui-button sui-button-icon-right', onClick: function onClick() { return goToSection('registration'); } }, (0, _utils.translate)('User Registration'), _react2.default.createElement('span', { className: 'sui-icon-arrow-right', 'aria-hidden': 'true' }) ), formType === 'login' && _react2.default.createElement( 'button', { className: 'sui-button sui-button-icon-right', onClick: function onClick() { return goToSection('login'); } }, (0, _utils.translate)('User Login'), _react2.default.createElement('span', { className: 'sui-icon-arrow-right', 'aria-hidden': 'true' }) ) ) ) ); } }]); return Appearance; }(_react.Component); exports.default = (0, _withRouter.withRouter)(Appearance); /***/ }), /* 575 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _fieldImageSize = __webpack_require__(576); var _fieldImageSize2 = _interopRequireDefault(_fieldImageSize); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Layout = function (_Component) { _inherits(Layout, _Component); function Layout() { _classCallCheck(this, Layout); return _possibleConstructorReturn(this, (Layout.__proto__ || Object.getPrototypeOf(Layout)).apply(this, arguments)); } _createClass(Layout, [{ key: 'render', value: function render() { return _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Layout'), labelDark: true, description: (0, _utils.translate)('Adjust the layout of fields.') }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'field-image-size', 'default': 'custom', settingsLabel: (0, _utils.translate)('Radio/Checkbox Image Size'), description: (0, _utils.translate)('Set radio/checkbox image size.') }), _react2.default.createElement( _empty2.default, { value: 'auto' }, (0, _utils.translate)('Automatic') ), _react2.default.createElement( _fieldImageSize2.default, _extends({}, this.props, { value: 'custom', boxClass: 'sui-tab-boxed' }), (0, _utils.translate)('Custom') ) ) ); } }]); return Layout; }(_react.Component); exports.default = Layout; /***/ }), /* 576 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var FieldImageSize = function (_Component) { _inherits(FieldImageSize, _Component); function FieldImageSize(props) { _classCallCheck(this, FieldImageSize); return _possibleConstructorReturn(this, (FieldImageSize.__proto__ || Object.getPrototypeOf(FieldImageSize)).call(this, props)); } _createClass(FieldImageSize, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-blue sui-active', 'aria-live': 'assertive', style: { display: 'block' } }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Note: If value is empty or zero, image will fallback to default size.') ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-row', style: { marginBottom: '10px' } }, _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Width'), type: 'number', placeholder: '0', defaultValue: 70, property: 'field-image-width' })) ), _react2.default.createElement( _col2.default, { cols: '3' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Height'), type: 'number', placeholder: '0', defaultValue: 70, property: 'field-image-height' })) ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Set your custom dimensions in pixels.') ) ); } }]); return FieldImageSize; }(_react.Component); exports.default = FieldImageSize; /***/ }), /* 577 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _borderCustom = __webpack_require__(578); var _borderCustom2 = _interopRequireDefault(_borderCustom); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var FieldsContainer = function (_Component) { _inherits(FieldsContainer, _Component); function FieldsContainer() { _classCallCheck(this, FieldsContainer); return _possibleConstructorReturn(this, (FieldsContainer.__proto__ || Object.getPrototypeOf(FieldsContainer)).apply(this, arguments)); } _createClass(FieldsContainer, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Field Container') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)("Customize the field container's border.") ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'field-border', settingsLabel: (0, _utils.translate)('Border'), description: (0, _utils.translate)('Add a border style around the field.') }), _react2.default.createElement( _empty2.default, { value: '' }, (0, _utils.translate)('None') ), _react2.default.createElement( _borderCustom2.default, _extends({}, this.props, { value: 'custom', boxClass: 'sui-tab-boxed' }), (0, _utils.translate)('Custom') ) ) ) ); } }]); return FieldsContainer; }(_react.Component); exports.default = FieldsContainer; /***/ }), /* 578 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var borderCustom = function (_Component) { _inherits(borderCustom, _Component); function borderCustom(props) { _classCallCheck(this, borderCustom); return _possibleConstructorReturn(this, (borderCustom.__proto__ || Object.getPrototypeOf(borderCustom)).call(this, props)); } _createClass(borderCustom, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'div', { className: 'sui-row', style: { marginBottom: '10px' } }, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Radius'), note: (0, _utils.translate)('in px'), type: 'number', placeholder: '0', property: 'field-border-radius' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Thickness'), note: (0, _utils.translate)('in px'), type: 'number', placeholder: '0', property: 'field-border-width' })) ) ) ); } }]); return borderCustom; }(_react.Component); exports.default = borderCustom; /***/ }), /* 579 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _reactRedux = __webpack_require__(11); var _redux = __webpack_require__(12); var _builder = __webpack_require__(193); var builderActions = _interopRequireWildcard(_builder); var _settings = __webpack_require__(113); var settingsActions = _interopRequireWildcard(_settings); var _modal = __webpack_require__(62); var modalActions = _interopRequireWildcard(_modal); var _registration = __webpack_require__(580); var _registration2 = _interopRequireDefault(_registration); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function mapStateToProps(state) { return { settings: state.settings, wrappers: state.wrappers }; } function mapDispatchToProps(dispatch) { return { actions: { settingsActions: (0, _redux.bindActionCreators)(settingsActions, dispatch), modalActions: (0, _redux.bindActionCreators)(modalActions, dispatch), builderActions: (0, _redux.bindActionCreators)(builderActions, dispatch) } }; } exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_registration2.default); /***/ }), /* 580 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _metaMapping = __webpack_require__(581); var _metaMapping2 = _interopRequireDefault(_metaMapping); var _siteRegistration = __webpack_require__(584); var _siteRegistration2 = _interopRequireDefault(_siteRegistration); var _accountActivation = __webpack_require__(585); var _accountActivation2 = _interopRequireDefault(_accountActivation); var _additionalSettings = __webpack_require__(586); var _additionalSettings2 = _interopRequireDefault(_additionalSettings); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Registration = function (_Component) { _inherits(Registration, _Component); function Registration(props) { _classCallCheck(this, Registration); return _possibleConstructorReturn(this, (Registration.__proto__ || Object.getPrototypeOf(Registration)).call(this, props)); } _createClass(Registration, [{ key: 'componentDidMount', value: function componentDidMount() { jQuery('html, body').animate({ scrollTop: 0 }, 'fast'); } }, { key: 'render', value: function render() { var _this2 = this; var goToSection = function goToSection(module) { _this2.props.router.navigate('/' + module); }; return _react2.default.createElement( 'div', { id: 'forminator-form-appearance', className: 'sui-box' }, _react2.default.createElement( 'div', { className: 'sui-box-header' }, _react2.default.createElement( 'h2', { className: 'sui-box-title' }, (0, _utils.translate)('User Registration') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement(_metaMapping2.default, this.props), forminatorData.isMainSite && _react2.default.createElement(_siteRegistration2.default, this.props), _react2.default.createElement(_accountActivation2.default, this.props), _react2.default.createElement(_additionalSettings2.default, this.props) ), _react2.default.createElement( 'div', { className: 'sui-box-footer' }, _react2.default.createElement( 'button', { className: 'sui-button', onClick: function onClick() { return goToSection('appearance'); } }, _react2.default.createElement('i', { className: 'sui-icon-arrow-left', 'aria-hidden': 'true' }), (0, _utils.translate)('Appearance') ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-icon-right', onClick: function onClick() { return goToSection('behaviour'); } }, (0, _utils.translate)('Behavior'), _react2.default.createElement('i', { className: 'sui-icon-arrow-right', 'aria-hidden': 'true' }) ) ) ) ); } }]); return Registration; }(_react.Component); exports.default = (0, _withRouter.withRouter)(Registration); /***/ }), /* 581 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _suiSelect2Custom = __webpack_require__(277); var _suiSelect2Custom2 = _interopRequireDefault(_suiSelect2Custom); var _suiSelect3 = __webpack_require__(18); var _suiSelect4 = _interopRequireDefault(_suiSelect3); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _multiCustomFieldValue = __webpack_require__(376); var _multiCustomFieldValue2 = _interopRequireDefault(_multiCustomFieldValue); var _userRole = __webpack_require__(582); var _userRole2 = _interopRequireDefault(_userRole); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MetaMapping = function (_Component) { _inherits(MetaMapping, _Component); function MetaMapping(props) { _classCallCheck(this, MetaMapping); var _this = _possibleConstructorReturn(this, (MetaMapping.__proto__ || Object.getPrototypeOf(MetaMapping)).call(this, props)); _this.updateProperty = _this.updateProperty.bind(_this); _this.state = _this.props.settings || {}; return _this; } _createClass(MetaMapping, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.setState(_defineProperty({}, slug, value)); } }, { key: 'render', value: function render() { var _this2 = this; var fields = (0, _utils.getFields)(this.props.wrappers, ['password']); var passFields = (0, _utils.mapFieldsByType)('password', this.props.wrappers); var customUserRoles = Object.assign({}, forminatorData.userRoles); var goToSection = function goToSection(module) { _this2.props.router.navigate('/' + module); }; var roleTitle = void 0, roleDescription = void 0; if (forminatorData.isMainSite) { roleTitle = (0, _utils.translate)('Network\'s Main Site Role'); roleDescription = (0, _utils.translate)('If you don\'t want to create a user in the network\'s main site, set this meta key ' + 'to {{strong}}Don\'t create a user in the network\'s main site{{/strong}}.', { components: { strong: _react2.default.createElement('strong', null) } }); customUserRoles.notCreate = { 'name': 'Don\'t create a user in the network\'s main site', 'capabilities': { 'read': true } }; } else { roleTitle = (0, _utils.translate)('User Role'); roleDescription = ''; } return _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('User Meta Mapping'), description: (0, _utils.translate)('Assign your form fields to the user meta keys to use ' + 'the data collected from the visitor to create a user ' + 'profile.') }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'h4', { className: 'sui-settings-label' }, (0, _utils.translate)('Default Meta Keys') ), _react2.default.createElement( 'p', { className: 'sui-description', style: { marginBottom: 10 } }, (0, _utils.translate)('Assign form fields to the default WordPress user ' + 'meta keys (used in Profiles) below. You can assign ' + 'a form field to multiple meta keys. If you assign ' + 'a non-required form field to a required user meta, that ' + 'form field will automatically become required in your form.') ), _react2.default.createElement( 'div', { className: 'sui-border-frame' }, _react2.default.createElement( _suiSelect2Custom2.default, _extends({}, this.props, { property: 'registration-username-field', label: (0, _utils.translate)('Username'), defaultValue: 'text-1', fieldClass: 'field-required', required: true }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select a field') ), _.map(fields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ), _react2.default.createElement( _suiSelect2Custom2.default, _extends({}, this.props, { property: 'registration-email-field', label: (0, _utils.translate)('Email'), defaultValue: 'email-1', fieldClass: 'field-required', required: true }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select a field') ), _.map(fields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'registration-first-name-field', label: (0, _utils.translate)('First Name'), defaultValue: '' }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select a field') ), _.map(fields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'registration-last-name-field', label: (0, _utils.translate)('Last Name'), defaultValue: '' }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select a field') ), _.map(fields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ), _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'registration-website-field', label: (0, _utils.translate)('Website'), defaultValue: '' }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select a field') ), _.map(fields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ), _react2.default.createElement( _suiSelect2Custom2.default, _extends({}, this.props, { property: 'registration-password-field', label: (0, _utils.translate)('Password'), defaultValue: 'password-1', fieldClass: 'field-required', required: true }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select a field') ), _.map(passFields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }), _react2.default.createElement( 'option', { value: 'auto' }, (0, _utils.translate)('Auto Generated Password') ) ), passFields.length > 0 && 'auto' === this.props.settings['registration-password-field'] && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-blue sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('This form includes a {{strong}}Password field{{/strong}}. Since user passwords will be {{strong}}automatically generated{{/strong}}, the {{strong}}Password field{{/strong}} should be deleted.', { components: { strong: _react2.default.createElement('strong', null) } }) ) ) ) ), 0 === passFields.length && 'auto' === this.props.settings['registration-password-field'] && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-blue sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('This form is set to ' + '{{strong}}automatically generate{{/strong}} ' + 'user passwords. To allow users to set their ' + 'own passwords, insert a ' + '{{strong}}Password field{{/strong}} into ' + '{{link}}this form{{/link}}.', { components: { strong: _react2.default.createElement('strong', null), link: _react2.default.createElement('a', { onClick: function onClick() { return goToSection('builder'); }, style: { cursor: 'pointer' } }) } }) ) ) ) ) ) ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'registration-user-role', settingsLabel: roleTitle, 'default': 'fixed', description: (0, _utils.translate)('Choose which user role you want to assign to ' + 'the visitors signing up. You can either assign ' + 'a fixed user role to all of them or assign a user ' + 'role conditionally, based on their response to the ' + 'form fields.') }), _react2.default.createElement( _container2.default, { value: 'fixed', label: (0, _utils.translate)('Fixed Role to All'), boxClass: 'sui-tab-boxed' }, _react2.default.createElement( _suiSelect4.default, _extends({}, this.props, { property: 'registration-role-field', label: roleTitle, defaultValue: 'subscriber', description: roleDescription, required: true }), _.map(customUserRoles, function (role, id) { return _react2.default.createElement( 'option', { value: id, key: id }, role.name ); }) ) ), _react2.default.createElement( _container2.default, { value: 'conditionally', label: (0, _utils.translate)('Assign Role Conditionally') }, _react2.default.createElement(_userRole2.default, _extends({}, this.props, { updateProperty: this.updateProperty, settings: this.state, state: this.state, metaDescription: (0, _utils.translate)('No custom user meta created yet. Click on "+ Add Custom User Meta" to ' + 'create custom user meta and map form fields to it.') })) ) ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'custom-mapping', settingsLabel: (0, _utils.translate)('Custom User Meta'), 'default': 'none', description: (0, _utils.translate)('Create custom user meta keys and assign your form fields ' + 'to them to set additional user meta keys upon successful user ' + 'registration.') }), _react2.default.createElement(_empty2.default, { value: 'none', label: (0, _utils.translate)('None') }), _react2.default.createElement( _container2.default, { value: 'custom', label: (0, _utils.translate)('Add Custom User Meta') }, _react2.default.createElement(_multiCustomFieldValue2.default, _extends({}, this.props, { updateProperty: this.updateProperty, settings: this.state, state: this.state, metaDescription: (0, _utils.translate)('No custom user meta created yet. Click on "+ Add Custom User Meta" to ' + 'create custom user meta and map form fields to it.') })) ) ) ); } }]); return MetaMapping; }(_react.Component); exports.default = (0, _withRouter.withRouter)(MetaMapping); /***/ }), /* 582 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _userRoleRule = __webpack_require__(583); var _userRoleRule2 = _interopRequireDefault(_userRoleRule); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var UserRole = function (_Component) { _inherits(UserRole, _Component); function UserRole(props) { _classCallCheck(this, UserRole); var _this = _possibleConstructorReturn(this, (UserRole.__proto__ || Object.getPrototypeOf(UserRole)).call(this, props)); _this.addRule = _this.addRule.bind(_this); _this.removeRule = _this.removeRule.bind(_this); _this.updateValue = _this.updateValue.bind(_this); _this.updateField = _this.updateField.bind(_this); _this.updateRule = _this.updateRule.bind(_this); _this.updateRuleValue = _this.updateRuleValue.bind(_this); _this.updateInputValue = _this.updateInputValue.bind(_this); _this.fields = (0, _utils.getFields)(_this.props.wrappers); // Remove Stripe & PayPal fields from the list _this.fields = _.filter(_this.fields, function (field) { return field.field_type !== 'stripe' && field.field_type !== 'paypal' && field.field_type !== 'page-break' && field.field_type !== 'pagination' && field.field_type !== 'section' && field.field_type !== 'html'; }); _this.validateConditions(); return _this; } _createClass(UserRole, [{ key: 'updateState', value: function updateState(state) { this.setState({ options: state }); this.props.updateProperty('user_role', state); if (!_.isUndefined(this.props.actions)) { this.props.actions.settingsActions.updateSetting('user_role', state); } } }, { key: 'getPropState', value: function getPropState() { var props = []; _.each(this.props.state.user_role, function (element) { var newElement = Object.assign({}, element); props.push(newElement); }); return props; } }, { key: 'updateField', value: function updateField(index, value) { var newState = this.getPropState(); // eslint-disable-next-line camelcase newState[index].element_id = value; newState[index].rule = 'is'; newState[index].value = ''; this.updateState(newState); } }, { key: 'updateValue', value: function updateValue(index, value) { var newState = this.getPropState(); newState[index].role = value; this.updateState(newState); } }, { key: 'updateRule', value: function updateRule(index, value) { var newState = this.getPropState(); newState[index].rule = value; this.updateState(newState); } }, { key: 'updateRuleValue', value: function updateRuleValue(index, value) { var newState = this.getPropState(); newState[index].value = value; this.updateState(newState); } }, { key: 'updateInputValue', value: function updateInputValue(index, value) { var newState = this.getPropState(); newState[index].value = value; this.updateState(newState); } }, { key: 'removeRule', value: function removeRule(index) { var newState = this.getPropState(); newState.splice(index, 1); this.updateState(newState); } }, { key: 'addRule', value: function addRule() { var newState = this.getPropState(); var elementId = !_.isUndefined(this.fields[0]) ? this.fields[0].element_id : ''; newState.push({ // eslint-disable-next-line camelcase role: 'subscriber', element_id: elementId, rule: 'is', value: '' }); this.updateState(newState); } }, { key: 'validateConditions', value: function validateConditions() { var rules = _.pluck(this.props.state.user_role, 'element_id'); var fields = _.pluck(this.fields, 'element_id'); var invalidField = _.difference(rules, fields); if (!_.isUndefined(invalidField)) { this.removeCondition(invalidField); } } }, { key: 'removeCondition', value: function removeCondition(field) { var newState = this.getPropState(); var readyState = _.filter(newState, function (obj) { return !_.contains(field, obj.element_id); }); this.updateState(readyState); } }, { key: 'render', value: function render() { var _this2 = this; return _react2.default.createElement( 'div', { className: 'sui-box-builder' }, _react2.default.createElement( 'div', { className: 'fui-visibility sui-box-builder-body', style: { margin: 0 } }, _react2.default.createElement( 'div', { className: 'sui-builder-fields' }, _.map(this.props.state.user_role, function (rule, i) { return _react2.default.createElement(_userRoleRule2.default, _extends({}, _this2.props, { rule: rule, key: i, counter: i, removeRule: _this2.removeRule, updateValue: _this2.updateValue, updateField: _this2.updateField, updateRule: _this2.updateRule, updateRuleValue: _this2.updateRuleValue, updateInputValue: _this2.updateInputValue, fields: _this2.fields })); }) ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-dashed', onClick: this.addRule }, _react2.default.createElement('span', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add User Role') ) ) ); } }]); return UserRole; }(_react.Component); exports.default = UserRole; /***/ }), /* 583 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(18); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _suiSelect3 = __webpack_require__(16); var _suiSelect4 = _interopRequireDefault(_suiSelect3); var _datePicker = __webpack_require__(114); var _datePicker2 = _interopRequireDefault(_datePicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var UserRoleRule = function (_Component) { _inherits(UserRoleRule, _Component); function UserRoleRule(props) { _classCallCheck(this, UserRoleRule); // Bind events var _this = _possibleConstructorReturn(this, (UserRoleRule.__proto__ || Object.getPrototypeOf(UserRoleRule)).call(this, props)); _this.toggleState = _this.toggleState.bind(_this); _this.updateValue = _this.updateValue.bind(_this); _this.updateField = _this.updateField.bind(_this); _this.updateRule = _this.updateRule.bind(_this); _this.updateRuleValue = _this.updateRuleValue.bind(_this); _this.updateInputValue = _this.updateInputValue.bind(_this); _this.state = { open: false }; _this.fields = _this.props.fields; return _this; } _createClass(UserRoleRule, [{ key: 'removeRule', value: function removeRule() { this.props.removeRule(this.props.counter); } }, { key: 'updateValue', value: function updateValue(prop, value) { this.props.updateValue(this.props.counter, value); } }, { key: 'updateField', value: function updateField(prop, value) { this.props.updateField(this.props.counter, value); } }, { key: 'updateRule', value: function updateRule(prop, value) { this.props.updateRule(this.props.counter, value); } }, { key: 'updateRuleValue', value: function updateRuleValue(e) { this.props.updateRuleValue(this.props.counter, e.target.value); } }, { key: 'updateInputValue', value: function updateInputValue(prop, value) { this.props.updateInputValue(this.props.counter, value); } }, { key: 'toggleState', value: function toggleState() { this.setState({ open: !this.state.open }); } }, { key: 'disableSearch', value: function disableSearch() { return { minimumResultsForSearch: -1 }; } }, { key: 'getEmailOptions', value: function getEmailOptions() { var emailOptions = []; var emailFields = (0, _utils.getFields)(this.props.wrappers, [ // disable these fields 'address', 'captcha', 'date', 'consent', 'gdprcheckbox', 'html', 'name', 'number', 'slider', 'page-break', 'phone', 'postdata', 'section', 'time', 'upload', 'website', 'textarea', 'text', 'paypal', 'stripe', 'currency', 'calculation', 'password', 'rating']); emailFields.map(function (field) { emailOptions.push({ value: '{' + field.element_id + '}', label: field.label }); }); return emailOptions; } }, { key: 'render', value: function render() { var _this2 = this; var routingId = 'routing-' + this.props.counter; var fieldData = _.where(this.fields, { element_id: this.props.rule.element_id })[0] || {}; var valueLabel = _.isEmpty(this.props.rule.value) ? (0, _utils.translate)('null') : this.props.rule.value; var user_role = _.isEmpty(this.props.rule.role) ? 'subscriber' : this.props.rule.role; var month = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; var dateRules = ['day_is', 'day_is_not', 'month_is', 'month_is_not']; var days = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']; var roleTitle = void 0, roleDescription = void 0; var customUserRoles = Object.assign({}, forminatorData.userRoles); if (forminatorData.isMainSite) { roleTitle = (0, _utils.translate)("Network's Main Site Role"); roleDescription = (0, _utils.translate)('If you don\'t want to create a user in the network\'s main site, set this meta key ' + 'to {{strong}}Don\'t create a user in the network\'s main site{{/strong}}.', { components: { strong: _react2.default.createElement('strong', null) } }); customUserRoles.notCreate = { 'name': 'Don\'t create a user in the network\'s main site', 'capabilities': { 'read': true } }; } else { roleTitle = (0, _utils.translate)('User Role'); roleDescription = ''; } return _react2.default.createElement( 'div', { className: 'sui-box fui-visibility-rule' + (true === this.state.open ? ' fui-open' : '') }, _react2.default.createElement( 'h4', { className: 'fui-visibility-rule-header' }, _react2.default.createElement( 'button', { id: 'forminator-field-' + routingId, className: 'sui-box-header', 'aria-controls': 'forminator-field-' + routingId + '-content', 'aria-expanded': this.state.open, onClick: function onClick() { return _this2.toggleState(); } }, _react2.default.createElement('i', { className: 'sui-icon-sitemap fui-visibility-rule-icon', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'fui-visibility-rule-text' }, (0, _utils.translate)('{{strong}}"%(label)s"{{/strong}} when ' + '{{strong}}%(field)s{{/strong}} %(rule)s ' + '{{strong}}%(value)s{{/strong}}', { args: { label: (0, _utils.ucfirst)(user_role), field: fieldData.label, rule: (0, _utils.getRuleLabel)(this.props.rule.rule, fieldData.field_type), value: valueLabel }, components: { strong: _react2.default.createElement('strong', null) } }) ), _react2.default.createElement('i', { className: 'sui-icon-chevron-down fui-visibility-rule-arrow', 'aria-hidden': 'true' }) ) ), _react2.default.createElement( 'div', { role: 'region', id: 'forminator-field-' + routingId + '-content', className: 'sui-box-body fui-visibility-rule-body', 'aria-labelledby': 'forminator-field-' + routingId, 'aria-hidden': true === this.state.open ? false : true }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'role', settings: this.props.rule, label: roleTitle, defaultValue: 'subscriber', value: this.props.rule.role, description: roleDescription, updateProperty: this.updateValue, required: true }), _.map(customUserRoles, function (role, id) { return _react2.default.createElement( 'option', { value: id, key: id }, role.name ); }) ), _react2.default.createElement( _row2.default, { className: 'sui-align-bottom sui-spacing-10' }, _react2.default.createElement( _col2.default, { cols: '6', customClass: 'sui-padding-right-10' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { elementId: routingId + '-field', property: 'element_id', updateProperty: this.updateField, settings: this.props.rule, label: (0, _utils.translate)('Field') }), _.map(this.fields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ) ), _react2.default.createElement( _col2.default, { cols: '6', customClass: 'sui-padding-left-10' }, _react2.default.createElement( _suiSelect4.default, _extends({}, this.props, { elementId: routingId + '-condrule', label: (0, _utils.translate)('Condition (Required)'), settings: this.props.rule, property: 'rule', updateProperty: this.updateRule, options: this.disableSearch() }), _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select rule') ), 'signature' === fieldData.field_type && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is' }, (0, _utils.translate)('Is null') ), _react2.default.createElement( 'option', { value: 'is_not' }, (0, _utils.translate)('Is not null') ) ), 'signature' !== fieldData.field_type && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is' }, (0, _utils.translate)('Is') ), _react2.default.createElement( 'option', { value: 'is_not' }, (0, _utils.translate)('Is not') ) ), fieldData.isNumber && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'is_great' }, (0, _utils.translate)('Is greater than') ), _react2.default.createElement( 'option', { value: 'is_less' }, (0, _utils.translate)('Is less than') ) ), !fieldData.isNumber && !fieldData.hasOptions && 'signature' !== fieldData.field_type && 'rating' !== fieldData.field_type && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'contains' }, (0, _utils.translate)('Contains') ), _react2.default.createElement( 'option', { value: 'does_not_contain' }, (0, _utils.translate)('Does not contain') ), _react2.default.createElement( 'option', { value: 'starts' }, (0, _utils.translate)('Starts with') ), _react2.default.createElement( 'option', { value: 'ends' }, (0, _utils.translate)('Ends with') ) ), 'date' === fieldData.field_type && ('date-day' === fieldData.field_slug || 'date' === fieldData.field_slug) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'day_is' }, (0, _utils.translate)('Day is') ), _react2.default.createElement( 'option', { value: 'day_is_not' }, (0, _utils.translate)('Day is not') ) ), 'date' === fieldData.field_type && ('date-month' === fieldData.field_slug || 'date' === fieldData.field_slug) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'option', { value: 'month_is' }, (0, _utils.translate)('Month is') ), _react2.default.createElement( 'option', { value: 'month_is_not' }, (0, _utils.translate)('Month is not') ) ) ) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( _react2.default.Fragment, null, fieldData.hasOptions && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateRuleValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select option') ), _.map(fieldData.values, function (option, x) { return _react2.default.createElement( 'option', { value: option.value, key: x }, (0, _escapeHtml.escapeHTML)(option.label) ); }) ) ), !fieldData.hasOptions && 'signature' !== fieldData.field_type && (!dateRules.includes(this.props.rule.rule) || 'date' !== fieldData.field_type) && _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.rule, inputId: routingId + '-value', property: 'value', updateProperty: this.updateInputValue, placeholder: (0, _utils.translate)('Enter value'), label: (0, _utils.translate)('Value') })), !fieldData.hasOptions && 'date' === fieldData.field_type && ('month_is' === this.props.rule.rule === 'month_is' || this.props.rule.rule === 'month_is_not') && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateRuleValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select month') ), _.map(month, function (value) { return _react2.default.createElement( 'option', { value: value, key: value }, value ); }) ) ), !fieldData.hasOptions && 'date' === fieldData.field_type && ('day_is' === this.props.rule.rule || 'day_is_not' === this.props.rule.rule) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, '\xA0' ), _react2.default.createElement( 'select', { className: 'fui-select', value: this.props.rule.value, onChange: this.updateRuleValue.bind(this) }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Select day') ), _.map(days, function (value) { return _react2.default.createElement( 'option', { value: value, key: value }, value ); }) ) ), !fieldData.hasOptions && 'date' === fieldData.field_type && ('is_before' === this.props.rule.rule || 'is_after' === this.props.rule.rule) && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-label' }, (0, _utils.translate)('Select date') ), _react2.default.createElement(_datePicker2.default, _extends({}, this.props, { settings: this.props.rule, property: 'value', id: routingId + '-value', placeholder: (0, _utils.translate)('20 April 2018'), updateProperty: this.updateInputValue })) ), !fieldData.hasOptions && 'date' === fieldData.field_type && ('is_before_n_or_more_days' === this.props.rule.rule || 'is_before_less_than_n_days' === this.props.rule.rule || 'is_after_n_or_more_days' === this.props.rule.rule || 'is_after_less_than_n_days' === this.props.rule.rule) && _react2.default.createElement(_input2.default, _extends({}, this.props, { settings: this.props.rule, inputId: routingId + '-value', property: 'value', updateProperty: this.updateInputValue, label: (0, _utils.translate)('Number of days'), placeholder: (0, _utils.translate)('E.g. 10'), type: 'number', minValue: '0' })) ) ) ), _react2.default.createElement( 'div', { className: 'fui-visibility-rule-footer' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-red sui-button-ghost', onClick: this.removeRule.bind(this) }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), (0, _utils.translate)('Delete') ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost', onClick: function onClick() { return _this2.toggleState(); } }, (0, _utils.translate)('Done') ) ) ) ); } }]); return UserRoleRule; }(_react.Component); exports.default = UserRoleRule; /***/ }), /* 584 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _suiSelect3 = __webpack_require__(18); var _suiSelect4 = _interopRequireDefault(_suiSelect3); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _suiSelect2Custom = __webpack_require__(277); var _suiSelect2Custom2 = _interopRequireDefault(_suiSelect2Custom); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SiteRegistration = function (_Component) { _inherits(SiteRegistration, _Component); function SiteRegistration() { _classCallCheck(this, SiteRegistration); return _possibleConstructorReturn(this, (SiteRegistration.__proto__ || Object.getPrototypeOf(SiteRegistration)).apply(this, arguments)); } _createClass(SiteRegistration, [{ key: 'render', value: function render() { var fields = (0, _utils.getFields)(this.props.wrappers, ['password']); var networkStructure = forminatorData.isSubdomainNetwork ? 'http://sitename.website.com' : 'http://website.com/network-name/sitename'; return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Site Registration') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose whether to allow site ' + 'registrations on your multisite ' + 'network and different related ' + 'settings.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'site-registration', 'default': 'enable' }), _react2.default.createElement( _container2.default, { value: 'enable', label: (0, _utils.translate)('Enable') }, _react2.default.createElement( 'div', { className: 'sui-border-frame' }, _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'span', { className: 'sui-description', style: { marginTop: '0', marginBottom: '10px' } }, (0, _utils.translate)('Assign form fields to the default WordPress site meta keys below.') ), _react2.default.createElement( _suiSelect2Custom2.default, _extends({}, this.props, { property: 'site-registration-name-field', label: (0, _utils.translate)('Site Name'), defaultValue: '', fieldClass: 'field-required', required: true, description: (0, _utils.translate)('Site address meta key will be automatically set based on this field as ' + '{{strong}}' + networkStructure + '{{/strong}}', { components: { strong: _react2.default.createElement('strong', null) } }) }), _.map(fields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ), _react2.default.createElement( _suiSelect2Custom2.default, _extends({}, this.props, { property: 'site-registration-title-field', label: (0, _utils.translate)('Site Title'), defaultValue: '', fieldClass: 'field-required', required: true }), _.map(fields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ), _react2.default.createElement( _suiSelect4.default, _extends({}, this.props, { property: 'site-registration-role-field', label: (0, _utils.translate)('Site Role'), defaultValue: '', required: true }), _.map(forminatorData.userRoles, function (role, id) { return _react2.default.createElement( 'option', { value: id, key: id }, role.name ); }) ) ) ) ), _react2.default.createElement(_empty2.default, { value: 'disable', label: (0, _utils.translate)('Disable') }) ) ) ) ); } }]); return SiteRegistration; }(_react.Component); exports.default = SiteRegistration; /***/ }), /* 585 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var AccountActivation = function (_Component) { _inherits(AccountActivation, _Component); function AccountActivation() { _classCallCheck(this, AccountActivation); return _possibleConstructorReturn(this, (AccountActivation.__proto__ || Object.getPrototypeOf(AccountActivation)).apply(this, arguments)); } _createClass(AccountActivation, [{ key: 'render', value: function render() { var registerPassword = !_.isUndefined(this.props.settings['registration-password-field']) ? this.props.settings['registration-password-field'] : ''; var activationMethod = !_.isUndefined(this.props.settings['activation-method']) ? this.props.settings['activation-method'] : ''; return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('User Account Activation') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose the activation method and other settings for ' + 'the user accounts.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'activation-method', settingsLabel: (0, _utils.translate)('Activation Method'), 'default': 'default', description: (0, _utils.translate)('By default, the user account is activated upon form submission. ' + 'However, you can choose between {{strong}}Email Activation{{/strong}}, ' + 'which requires the user to click on an activation email, or ' + '{{strong}}Manual Approval{{/strong}} which requires site admin to ' + 'approve an account.', { components: { strong: _react2.default.createElement('strong', null) } }) }), _react2.default.createElement(_empty2.default, { value: 'default', label: (0, _utils.translate)('Default') }), _react2.default.createElement( _container2.default, { value: 'email', label: (0, _utils.translate)('Email Activation'), boxClass: 'sui-tab-boxed' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'confirmation-page', label: (0, _utils.translate)('Confirmation Page'), defaultValue: '', triggerChange: '1', description: (0, _utils.translate)('Choose the page to redirect users to when ' + 'they click on the confirmation link.') }), _.map(forminatorData.pages, function (page, x) { return _react2.default.createElement( 'option', { value: page.ID, key: x }, !_.isEmpty(page.post_title) ? page.post_title : (0, _utils.translate)('page ID: ') + page.ID ); }) ) ), _react2.default.createElement( _container2.default, { value: 'manual', label: (0, _utils.translate)('Manual Approval') }, _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-blue sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('A site admin will have to manually approve ' + 'each entry from the submissions page to ' + 'activate the user accounts.') ) ) ) ) ) ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { property: 'activation-email', settingsLabel: (0, _utils.translate)('Activation Email'), 'default': 'default', settingsDesc: (0, _utils.translate)('By default, WordPress sends an activation email containing ' + 'user account information after the account activation. ' + 'However, you can choose not to send this email.') }), _react2.default.createElement( 'div', { value: 'default' }, (0, _utils.translate)('Default') ), _react2.default.createElement( 'div', { value: 'none' }, (0, _utils.translate)('None') ) ), registerPassword === 'auto' && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Since the {{strong}}Password{{/strong}} user meta key is mapped ' + 'to {{strong}}Auto Generate Password{{/strong}}, it\'s recommended ' + 'to keep this option to {{strong}}Default{{/strong}} so the ' + 'auto-generated password can be sent to the users.', { components: { strong: _react2.default.createElement('strong', null) } }) ) ) ) ), activationMethod === 'manual' && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Since the activation requires manual approval from site admin, ' + 'it\'s recommended to keep this option to {{strong}}Default{{/strong}} ' + 'to let users know when their account is activated.', { components: { strong: _react2.default.createElement('strong', null) } }) ) ) ) ) ) ); } }]); return AccountActivation; }(_react.Component); exports.default = AccountActivation; /***/ }), /* 586 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); var _wpEditor = __webpack_require__(31); var _wpEditor2 = _interopRequireDefault(_wpEditor); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var AdditionalSettings = function (_Component) { _inherits(AdditionalSettings, _Component); function AdditionalSettings(props) { _classCallCheck(this, AdditionalSettings); return _possibleConstructorReturn(this, (AdditionalSettings.__proto__ || Object.getPrototypeOf(AdditionalSettings)).call(this, props)); } _createClass(AdditionalSettings, [{ key: 'render', value: function render() { var isHideForm = !_.isUndefined(this.props.settings['hide-registration-form']) ? this.props.settings['hide-registration-form'] : ''; return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Additional Settings') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('These settings will add some extra control on ' + 'your registration process.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'div', { style: { marginBottom: '10px' } }, 'manual' !== this.props.settings['activation-method'] && _react2.default.createElement(_toggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Automatically log in newly activated users'), description: (0, _utils.translate)('This will automatically log in a user upon successful activation of their account.'), property: 'automatic-login' })), _react2.default.createElement(_toggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Hide the form if a user is already logged in'), description: (0, _utils.translate)('Enabling this will hide the form from logged-in users.'), property: 'hide-registration-form', unWrap: true })) ), isHideForm && _react2.default.createElement( 'div', { className: 'sui-border-frame sui-toggle-content' }, _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { property: 'hidden-registration-form-message', label: (0, _utils.translate)('Message (optional)'), hideEditorOptions: 'true', cutomTinymce: 'bold,italic,underline,link,alignleft,aligncenter,alignright', placeholder: (0, _utils.translate)('Type a message for logged in users here...'), description: (0, _utils.translate)('You can optionally add a message for logged in users, which ' + 'appears when the form is hidden.') })) ) ) ) ); } }]); return AdditionalSettings; }(_react.Component); exports.default = AdditionalSettings; /***/ }), /* 587 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _reactRedux = __webpack_require__(11); var _redux = __webpack_require__(12); var _settings = __webpack_require__(113); var settingsActions = _interopRequireWildcard(_settings); var _modal = __webpack_require__(62); var modalActions = _interopRequireWildcard(_modal); var _builder = __webpack_require__(193); var builderActions = _interopRequireWildcard(_builder); var _login = __webpack_require__(588); var _login2 = _interopRequireDefault(_login); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function mapStateToProps(state) { return { settings: state.settings, wrappers: state.wrappers }; } function mapDispatchToProps(dispatch) { return { actions: { settingsActions: (0, _redux.bindActionCreators)(settingsActions, dispatch), modalActions: (0, _redux.bindActionCreators)(modalActions, dispatch), builderActions: (0, _redux.bindActionCreators)(builderActions, dispatch) } }; } exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_login2.default); /***/ }), /* 588 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _metaMapping = __webpack_require__(589); var _metaMapping2 = _interopRequireDefault(_metaMapping); var _additionalSettings = __webpack_require__(590); var _additionalSettings2 = _interopRequireDefault(_additionalSettings); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Login = function (_Component) { _inherits(Login, _Component); function Login(props) { _classCallCheck(this, Login); return _possibleConstructorReturn(this, (Login.__proto__ || Object.getPrototypeOf(Login)).call(this, props)); } _createClass(Login, [{ key: 'componentDidMount', value: function componentDidMount() { jQuery('html, body').animate({ scrollTop: 0 }, 'fast'); } }, { key: 'render', value: function render() { var _this2 = this; var goToSection = function goToSection(module) { _this2.props.router.navigate('/' + module); }; return _react2.default.createElement( 'div', { id: 'forminator-form-appearance', className: 'sui-box' }, _react2.default.createElement( 'div', { className: 'sui-box-header' }, _react2.default.createElement( 'h2', { className: 'sui-box-title' }, (0, _utils.translate)('Login User') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement(_metaMapping2.default, this.props), _react2.default.createElement(_additionalSettings2.default, this.props) ), _react2.default.createElement( 'div', { className: 'sui-box-footer' }, _react2.default.createElement( 'button', { className: 'sui-button', onClick: function onClick() { return goToSection('appearance'); } }, _react2.default.createElement('i', { className: 'sui-icon-arrow-left', 'aria-hidden': 'true' }), (0, _utils.translate)('Appearance') ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-icon-right', onClick: function onClick() { return goToSection('behaviour'); } }, (0, _utils.translate)('Behavior'), _react2.default.createElement('i', { className: 'sui-icon-arrow-right', 'aria-hidden': 'true' }) ) ) ) ); } }]); return Login; }(_react.Component); exports.default = (0, _withRouter.withRouter)(Login); /***/ }), /* 589 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _escapeHtml = __webpack_require__(17); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _suiSelect3 = __webpack_require__(18); var _suiSelect4 = _interopRequireDefault(_suiSelect3); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _suiSelect2Custom = __webpack_require__(277); var _suiSelect2Custom2 = _interopRequireDefault(_suiSelect2Custom); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var MetaMapping = function (_Component) { _inherits(MetaMapping, _Component); function MetaMapping() { _classCallCheck(this, MetaMapping); return _possibleConstructorReturn(this, (MetaMapping.__proto__ || Object.getPrototypeOf(MetaMapping)).apply(this, arguments)); } _createClass(MetaMapping, [{ key: 'render', value: function render() { var fields = (0, _utils.getFields)(this.props.wrappers, ['password']); var emailFields = (0, _utils.mapFieldsByType)('email', this.props.wrappers); var inputFields = (0, _utils.mapFieldsByType)('text', this.props.wrappers); var nameFields = (0, _utils.mapFieldsByType)('name', this.props.wrappers); var userFields = emailFields.concat(inputFields, nameFields); var passFields = (0, _utils.mapFieldsByType)('password', this.props.wrappers); var firstUser = _.isEmpty(userFields) ? '' : userFields[0].element_id; var loginUser = this.props.settings['login-username-field']; var userFieldExists = _.find(userFields, function (n) { if (loginUser === n.element_id) { return true; } return false; }); this.props.settings['login-username-field'] = userFieldExists ? loginUser : firstUser; return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Login Fields') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Map your form fields to the meta keys and have ' + 'additional control over the login form fields.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Form Fields Mapping') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Assign your form fields to the meta keys ' + 'required to login a user.') ), _react2.default.createElement( 'div', { className: 'sui-border-frame' }, _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _suiSelect2Custom2.default, _extends({}, this.props, { property: 'login-username-field', label: (0, _utils.translate)('Username'), defaultValue: firstUser, fieldClass: 'field-required', required: true }), _.map(userFields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ), _react2.default.createElement( _suiSelect2Custom2.default, _extends({}, this.props, { property: 'login-password-field', label: (0, _utils.translate)('Password'), defaultValue: 'password-1', fieldClass: 'field-required', required: true }), _.map(passFields, function (field, x) { return _react2.default.createElement( 'option', { value: field.element_id, key: x }, (0, _escapeHtml.escapeHTML)(field.label), ' | ', field.element_id ); }) ) ) ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'remember-me', settingsLabel: (0, _utils.translate)('Remember Me Field'), 'default': 'true', description: (0, _utils.translate)('Choose whether to show the {{strong}}Remember Me{{/strong}} ' + 'field in your form. This option will add a Remember Me ' + 'checkbox before the submit button.', { components: { strong: _react2.default.createElement('strong', null) } }) }), _react2.default.createElement( _container2.default, { value: 'true', label: (0, _utils.translate)('Show'), boxClass: 'sui-tab-boxed' }, _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'remember-me-label', placeholder: (0, _utils.translate)('Remember me'), label: (0, _utils.translate)('Label') })) ) ), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '4' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'number', defaultValue: '0', property: 'remember-me-cookie-number', placeholder: '10', label: (0, _utils.translate)('Cookie Expiration') })) ), _react2.default.createElement( _col2.default, { cols: '4' }, _react2.default.createElement( _suiSelect4.default, _extends({}, this.props, { defaultValue: 'days', property: 'remember-me-cookie-type', label: '\xA0' }), _react2.default.createElement( 'option', { value: 'days' }, (0, _utils.translate)('day(s)') ), _react2.default.createElement( 'option', { value: 'weeks' }, (0, _utils.translate)('week(s)') ), _react2.default.createElement( 'option', { value: 'months' }, (0, _utils.translate)('month(s)') ), _react2.default.createElement( 'option', { value: 'years' }, (0, _utils.translate)('year(s)') ) ) ), _react2.default.createElement( _col2.default, { cols: '12' }, _react2.default.createElement( 'span', { className: 'sui-description sui-description-toggle' }, (0, _utils.translate)('Users will have to provide login details again after the selected period.') ) ) ) ), _react2.default.createElement(_empty2.default, { value: 'false', label: (0, _utils.translate)('Hide') }) ) ) ) ); } }]); return MetaMapping; }(_react.Component); exports.default = MetaMapping; /***/ }), /* 590 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); var _wpEditor = __webpack_require__(31); var _wpEditor2 = _interopRequireDefault(_wpEditor); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var AdditionalSettings = function (_Component) { _inherits(AdditionalSettings, _Component); function AdditionalSettings(props) { _classCallCheck(this, AdditionalSettings); return _possibleConstructorReturn(this, (AdditionalSettings.__proto__ || Object.getPrototypeOf(AdditionalSettings)).call(this, props)); } _createClass(AdditionalSettings, [{ key: 'render', value: function render() { var isHideForm = !_.isUndefined(this.props.settings['hide-login-form']) ? this.props.settings['hide-login-form'] : ''; return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Additional Settings') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('These settings will add some extra control on ' + 'your login process.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'div', { style: { marginBottom: '10px' } }, _react2.default.createElement(_toggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Hide the form if a user is already logged in'), description: (0, _utils.translate)('Enabling this will hide the form from logged-in users.'), property: 'hide-login-form', unWrap: true })) ), isHideForm && _react2.default.createElement( 'div', { className: 'sui-border-frame sui-toggle-content' }, _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { property: 'hidden-login-form-message', label: (0, _utils.translate)('Message (optional)'), hideEditorOptions: 'true', cutomTinymce: 'bold,italic,underline,link,alignleft,aligncenter,alignright', placeholder: (0, _utils.translate)('Type a message for logged in users here...'), description: (0, _utils.translate)('You can optionally add a message for logged in users, which ' + 'appears when the form is hidden.') })) ) ) ) ); } }]); return AdditionalSettings; }(_react.Component); exports.default = AdditionalSettings; /***/ }), /* 591 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _reactRedux = __webpack_require__(11); var _redux = __webpack_require__(12); var _settings = __webpack_require__(113); var settingsActions = _interopRequireWildcard(_settings); var _modal = __webpack_require__(62); var modalActions = _interopRequireWildcard(_modal); var _behavior = __webpack_require__(211); var behaviorsActions = _interopRequireWildcard(_behavior); var _behaviour = __webpack_require__(592); var _behaviour2 = _interopRequireDefault(_behaviour); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function mapStateToProps(state) { return { settings: state.settings, wrappers: state.wrappers, notifications: state.notifications, behaviors: state.behaviorArray, formType: state.settings['form-type'] || 'default' }; } function mapDispatchToProps(dispatch) { return { actions: { settingsActions: (0, _redux.bindActionCreators)(settingsActions, dispatch), behaviorsActions: (0, _redux.bindActionCreators)(behaviorsActions, dispatch), modalActions: (0, _redux.bindActionCreators)(modalActions, dispatch) } }; } exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_behaviour2.default); /***/ }), /* 592 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _submission = __webpack_require__(593); var _submission2 = _interopRequireDefault(_submission); var _autofill = __webpack_require__(596); var _autofill2 = _interopRequireDefault(_autofill); var _security = __webpack_require__(278); var _security2 = _interopRequireDefault(_security); var _lifespan = __webpack_require__(597); var _lifespan2 = _interopRequireDefault(_lifespan); var _render = __webpack_require__(598); var _render2 = _interopRequireDefault(_render); var _saveAndContinue = __webpack_require__(599); var _saveAndContinue2 = _interopRequireDefault(_saveAndContinue); var _payments = __webpack_require__(600); var _payments2 = _interopRequireDefault(_payments); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Behaviour = function (_Component) { _inherits(Behaviour, _Component); function Behaviour(props) { _classCallCheck(this, Behaviour); return _possibleConstructorReturn(this, (Behaviour.__proto__ || Object.getPrototypeOf(Behaviour)).call(this, props)); } _createClass(Behaviour, [{ key: 'componentDidMount', value: function componentDidMount() { jQuery('html, body').animate({ scrollTop: 0 }, 'fast'); } }, { key: 'render', value: function render() { var _this2 = this; var goToSection = function goToSection(module) { _this2.props.router.navigate('/' + module); }; var hasStripe = (0, _utils.hasFieldType)('stripe', this.props.wrappers); var hasPayPal = (0, _utils.hasFieldType)('paypal', this.props.wrappers); var formType = forminatorData.currentForm.settings['form-type'] || 'default'; return _react2.default.createElement( 'div', { id: 'forminator-form-appearance', className: 'sui-box' }, _react2.default.createElement( 'div', { className: 'sui-box-header' }, _react2.default.createElement( 'h2', { className: 'sui-box-title' }, (0, _utils.translate)('Behavior') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, this.props.formType === 'leads' && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-blue sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Some of the settings you\'d find in a regular ' + 'form are unavailable in this form template ' + 'because they are either unnecessary or ' + 'controlled by the parent quiz automatically.') ) ) ) ) ), _react2.default.createElement(_submission2.default, this.props), (hasStripe || hasPayPal) && _react2.default.createElement(_payments2.default, this.props), _react2.default.createElement(_autofill2.default, this.props), _react2.default.createElement(_security2.default, _extends({}, this.props, { moduleSlug: 'form' })), this.props.formType !== 'leads' && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement(_lifespan2.default, this.props), _react2.default.createElement(_render2.default, this.props), _react2.default.createElement(_saveAndContinue2.default, this.props) ) ), _react2.default.createElement( 'div', { className: 'sui-box-footer' }, formType !== 'registration' && formType !== 'login' && _react2.default.createElement( 'button', { className: 'sui-button', onClick: function onClick() { return goToSection('appearance'); } }, _react2.default.createElement('i', { className: 'sui-icon-arrow-left', 'aria-hidden': 'true' }), (0, _utils.translate)('Appearance') ), formType === 'registration' && _react2.default.createElement( 'button', { className: 'sui-button', onClick: function onClick() { return goToSection('registration'); } }, _react2.default.createElement('i', { className: 'sui-icon-arrow-left', 'aria-hidden': 'true' }), (0, _utils.translate)('User Registration') ), formType === 'login' && _react2.default.createElement( 'button', { className: 'sui-button', onClick: function onClick() { return goToSection('login'); } }, _react2.default.createElement('i', { className: 'sui-icon-arrow-left', 'aria-hidden': 'true' }), (0, _utils.translate)('User Login') ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, this.props.formType === 'leads' && _react2.default.createElement( 'button', { className: 'sui-button sui-button-icon-right', onClick: function onClick() { return goToSection('settings'); } }, (0, _utils.translate)('Settings'), _react2.default.createElement('i', { className: 'sui-icon-arrow-right', 'aria-hidden': 'true' }) ), this.props.formType !== 'leads' && _react2.default.createElement( 'button', { className: 'sui-button sui-button-icon-right', onClick: function onClick() { return goToSection('pdf'); } }, (0, _utils.translate)('PDF'), _react2.default.createElement('i', { className: 'sui-icon-arrow-right', 'aria-hidden': 'true' }) ) ) ) ); } }]); return Behaviour; }(_react.Component); exports.default = (0, _withRouter.withRouter)(Behaviour); /***/ }), /* 593 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _behaviors = __webpack_require__(594); var _behaviors2 = _interopRequireDefault(_behaviors); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SubmissionBehaviour = function (_Component) { _inherits(SubmissionBehaviour, _Component); function SubmissionBehaviour() { _classCallCheck(this, SubmissionBehaviour); return _possibleConstructorReturn(this, (SubmissionBehaviour.__proto__ || Object.getPrototypeOf(SubmissionBehaviour)).apply(this, arguments)); } _createClass(SubmissionBehaviour, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Submission Behavior') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Configure what should happen when a user submits this form.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, this.props.formType !== 'leads' && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('After submission') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: 10 } }, (0, _utils.translate)('Choose what happens after successful submission of this form. Multiple submission behaviors can be added and conditionally processed based on submitted form data.') ), this.props.behaviors.length > 1 && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-blue sui-active', style: { style: 'block', margin: '10px 0 20px' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('You’ll need to configure conditional logic ' + 'for each submission behavior to ensure ' + 'Forminator knows when each behavior should be ' + 'processed. If no conditions have been set, the ' + 'first submission behavior will be processed.') ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-body', style: { marginBottom: 30 } }, _react2.default.createElement(_behaviors2.default, this.props) ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'enable-ajax', defaultValue: 'true', settingsLabel: (0, _utils.translate)('Method'), disabled: (0, _utils.hasFieldType)('stripe', this.props.wrappers), description: (0, _utils.translate)('Choose whether you want to use AJAX to send this ' + 'form without reloading the page, or use the more ' + 'traditional method of reloading the page.') }), _react2.default.createElement( _container2.default, { value: 'true', label: (0, _utils.translate)('Ajax') }, (0, _utils.hasFieldType)('stripe', this.props.wrappers) && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-blue sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Note that you can only use the Ajax submission ' + 'method while using the Stripe field in your form. ' + 'The Ajax method will hide your form after the ' + 'successful submission and only your inline ' + 'success message will be shown. The form will ' + 'be available again when the page is reloaded.') ) ) ) ) ), _react2.default.createElement( _container2.default, { value: 'false', label: (0, _utils.translate)('Page Reload') }, (0, _utils.hasFieldType)('stripe', this.props.wrappers) && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-blue sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Note that you can only use the Ajax submission ' + 'method while using the Stripe field in your form. ' + 'The Ajax method will hide your form after the ' + 'successful submission and only your inline ' + 'success message will be shown. The form will ' + 'be available again when the page is reloaded.') ) ) ) ) ) ) ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { property: 'validation', defaultValue: 'true', settingsLabel: (0, _utils.translate)('Validation'), settingsDesc: (0, _utils.translate)('For fields that you\'ve chosen to validate, choose how ' + 'you want the validation to behave. On submission will ' + 'run validation checks when the user submits the form ' + 'using Ajax (recommended). The Live method will check ' + 'fields at the same time as the user fills them out. ' + 'Server side does the validation using PHP and returns ' + 'any error messages after a page reload.') }), _react2.default.createElement( 'div', { value: 'on_submit' }, (0, _utils.translate)('On Submit') ), _react2.default.createElement( 'div', { value: 'server' }, (0, _utils.translate)('Server Side') ) ), _react2.default.createElement(_toggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Enable inline validation (as user types)'), property: 'validation-inline', unWrap: true })), _react2.default.createElement( 'div', { style: { marginTop: '30px' } }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'submission-indicator', settingsLabel: (0, _utils.translate)('Submission Indicator'), 'default': '', description: (0, _utils.translate)('Choose whether you want to show a loader on your form ' + 'until it is submitted. We highly recommend using this on ' + 'long forms or forms with payment field since they may ' + 'take a few seconds to submit.') }), _react2.default.createElement( _container2.default, { value: 'show', boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Show Loader') }, _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'indicator-label', placeholder: (0, _utils.translate)('E.g. Submitting...'), defaultValue: 'Submitting...', description: (0, _utils.translate)('Choose the text to show on the right of loading icon') })) ), _react2.default.createElement(_empty2.default, { label: (0, _utils.translate)('None'), value: '' }) ) ) ) ); } }]); return SubmissionBehaviour; }(_react.Component); exports.default = SubmissionBehaviour; /***/ }), /* 594 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _behavior = __webpack_require__(595); var _behavior2 = _interopRequireDefault(_behavior); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var BehaviorLines = function (_Component) { _inherits(BehaviorLines, _Component); function BehaviorLines(props) { _classCallCheck(this, BehaviorLines); var _this = _possibleConstructorReturn(this, (BehaviorLines.__proto__ || Object.getPrototypeOf(BehaviorLines)).call(this, props)); _this.addBehavior = _this.addBehavior.bind(_this); _this.closeModal = _this.closeModal.bind(_this); return _this; } _createClass(BehaviorLines, [{ key: 'closeModal', value: function closeModal() { this.props.actions.modalActions.showModal({ open: false }, 'behavior'); } }, { key: 'addBehavior', value: function addBehavior() { var newBehavior = { slug: 'behavior-' + (0, _utils.randNumber)(), autoclose: true, 'autoclose-time': 5, newtab: 'sametab' }; newBehavior['submission-behaviour'] = this.props.settings['submission-behaviour'] ? this.props.settings['submission-behaviour'] : 'behaviour-thankyou'; if (this.props.settings['thankyou-message']) { newBehavior['thankyou-message'] = this.props.settings['thankyou-message']; } if (this.props.settings['email-thankyou-message']) { newBehavior['email-thankyou-message'] = this.props.settings['email-thankyou-message']; } if (this.props.settings['manual-thankyou-message']) { newBehavior['manual-thankyou-message'] = this.props.settings['manual-thankyou-message']; } this.props.actions.modalActions.showModal({ open: true, new: true, behavior: newBehavior, field: this.props.field, behaviors: this.props.behaviors, closeModal: this.closeModal }, 'behavior'); } }, { key: 'render', value: function render() { var _this2 = this; return _react2.default.createElement( 'div', { className: 'sui-box-builder sui-flushed', ref: function ref(el) { return _this2.el = el; } }, _react2.default.createElement( 'div', { className: 'sui-box-builder-body' }, this.props.behaviors.length > 0 && _react2.default.createElement( 'div', { className: 'sui-builder-fields' }, _.map(this.props.behaviors, function (behavior, i) { return _react2.default.createElement(_behavior2.default, _extends({ key: behavior.slug, behavior: behavior }, _this2.props, { counter: i })); }) ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-dashed', onClick: this.addBehavior }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add Behavior') ) ) ); } }]); return BehaviorLines; }(_react.Component); exports.default = BehaviorLines; /***/ }), /* 595 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var BehaviorLine = function (_Component) { _inherits(BehaviorLine, _Component); function BehaviorLine(props) { _classCallCheck(this, BehaviorLine); var _this = _possibleConstructorReturn(this, (BehaviorLine.__proto__ || Object.getPrototypeOf(BehaviorLine)).call(this, props)); _this.deleteBehavior = _this.deleteBehavior.bind(_this); _this.editModal = _this.editModal.bind(_this); _this.closeEditModal = _this.closeEditModal.bind(_this); return _this; } _createClass(BehaviorLine, [{ key: 'closeMenu', value: function closeMenu() { jQuery('.sui-dropdown').removeClass('open'); } }, { key: 'getAllWithoutCurrent', value: function getAllWithoutCurrent(behaviors) { var _this2 = this; return behaviors.filter(function (field) { return field.slug !== _this2.props.behavior.slug; }); } }, { key: 'deleteBehavior', value: function deleteBehavior() { var behaviors = [].concat(_toConsumableArray(this.props.behaviors)); var behaviorsObj = this.getAllWithoutCurrent(behaviors); // Hide field settings menu this.closeMenu(); // Update state this.props.actions.behaviorsActions.updateBehaviorArray(behaviorsObj); } }, { key: 'closeEditModal', value: function closeEditModal() { this.props.actions.modalActions.showModal({ open: false }, 'behavior'); } }, { key: 'editModal', value: function editModal() { this.props.actions.modalActions.showModal({ open: true, new: false, behavior: this.props.behavior, field: this.props.field, behaviors: this.props.behaviors, closeModal: this.closeEditModal }, 'behavior'); } }, { key: 'conditionMarkup', value: function conditionMarkup() { var mappedFields = (0, _utils.getFields)(this.props.wrappers); // Condition does not exist, return if (_.isUndefined(this.props.behavior.conditions)) { return; } // Get first condition var firstCondition = this.props.behavior.conditions[0]; // Condition does not exist, return if (_.isUndefined(firstCondition)) { return; } // Get condition field data var conditionData = _.filter(mappedFields, function (field) { return field.element_id === firstCondition.element_id; }); // Condition field not exist ( could be deleted ), return if (_.isUndefined(conditionData)) { return; } // Bail if no label for condition data is found // Prevent error when time/date fields format changes. if (_.isUndefined(conditionData[0])) { return; } var fieldLabel = conditionData[0].label; var ruleLabel = (0, _utils.getRuleLabel)(firstCondition.rule, conditionData.field_type); var valueLabel = (0, _utils.getConditionLabel)(conditionData[0], firstCondition); var total = this.props.behavior.conditions.length; var more = ''; if (total - 1 > 0) { more = '+ ' + (total - 1) + ' ' + (0, _utils.translate)('more condition(s)'); } return _react2.default.createElement( 'span', { className: 'fui-conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile', 'data-tooltip': (0, _utils.translate)('Process behavior if') + ' ' + fieldLabel + ' ' + ruleLabel + ' ' + valueLabel + ' ' + more, 'aria-hidden': 'true' }, _react2.default.createElement('i', { className: 'sui-icon-link sui-sm' }) ); } }, { key: 'render', value: function render() { var label = '', additionalInfo = '', submissionBehaviors = (0, _utils.getSubmissionBehaviors)(), submissionBehavior = Object.keys(submissionBehaviors)[0]; if (!_.isUndefined(this.props.behavior['submission-behaviour']) && !_.isEmpty(this.props.behavior['submission-behaviour'])) { submissionBehavior = this.props.behavior['submission-behaviour']; } if (this.props.behavior.label) { label = this.props.behavior.label; } else { label = submissionBehaviors[submissionBehavior]; } // For `Redirect user to a URL` option if (submissionBehavior === Object.keys(submissionBehaviors)[1]) { additionalInfo = this.props.behavior['redirect-url']; } else { additionalInfo = this.props.behavior['thankyou-message'] ? jQuery('<div>' + this.props.behavior['thankyou-message'] + '</div>').text() : ''; } var conditionData = this.conditionMarkup(); return _react2.default.createElement( 'div', { className: 'sui-builder-field sui-react sui-can_open' }, !_.isUndefined(this.props.behavior.conditions) && this.props.behavior.conditions.length > 0 && _react2.default.createElement( _react2.default.Fragment, null, conditionData ), _react2.default.createElement( 'div', { className: 'sui-field-info fui-behaviors-info', onClick: this.editModal }, _react2.default.createElement( 'div', { className: 'sui-builder-field-label fui-behaviors-label', style: { minWidth: '90px' } }, _react2.default.createElement('i', { className: '', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', null, label ) ), _react2.default.createElement( 'div', { className: 'sui-builder-field-label fui-notifications-recipient' }, _react2.default.createElement( 'span', null, additionalInfo ) ) ), _react2.default.createElement( 'div', { className: 'sui-field-actions' }, _react2.default.createElement( 'div', { className: 'sui-dropdown' }, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-dropdown-anchor' }, _react2.default.createElement('i', { className: 'sui-icon-widget-settings-config', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Open condition settings') ) ), _react2.default.createElement( 'ul', null, _react2.default.createElement( 'li', null, _react2.default.createElement( 'button', { onClick: this.editModal }, _react2.default.createElement('i', { className: 'sui-icon-pencil', 'aria-hidden': 'true' }), (0, _utils.translate)('Edit Behavior') ) ), this.props.behaviors.length > 1 && _react2.default.createElement( 'li', null, _react2.default.createElement( 'button', { className: 'sui-option-red', onClick: this.deleteBehavior }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), (0, _utils.translate)('Delete') ) ) ) ) ) ); } }]); return BehaviorLine; }(_react.Component); exports.default = BehaviorLine; /***/ }), /* 596 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); var _accordion = __webpack_require__(34); var _accordion2 = _interopRequireDefault(_accordion); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var AutofillBehaviour = function (_Component) { _inherits(AutofillBehaviour, _Component); function AutofillBehaviour() { _classCallCheck(this, AutofillBehaviour); return _possibleConstructorReturn(this, (AutofillBehaviour.__proto__ || Object.getPrototypeOf(AutofillBehaviour)).apply(this, arguments)); } _createClass(AutofillBehaviour, [{ key: 'getFieldsWithAutofill', value: function getFieldsWithAutofill() { var _this2 = this; this.fields = (0, _utils.getFields)(this.props.wrappers, []); this.savedFieldsAutofill = _.isUndefined(this.props.settings['fields-autofill']) ? [] : this.props.settings['fields-autofill']; this.fieldsWithAutoFill = []; this.fields.map(function (formField) { var fieldType = formField.field_type, autofillProviders = (0, _utils.getFieldAutofillProviders)(fieldType), fieldSlug = formField.field_slug; if (!_.isUndefined(autofillProviders[fieldSlug])) { if (!_.isUndefined(autofillProviders[fieldSlug].values) && !_.isEmpty(autofillProviders[fieldSlug].values)) { var selectedProvider = { element_id: '', provider: '', is_editable: 'no' }, savedProvider = _this2.savedFieldsAutofill.filter(function (savedProv) { return savedProv.element_id === formField.element_id; }), isActive = false; if (!_.isUndefined(savedProvider) && !_.isEmpty(savedProvider)) { savedProvider = savedProvider[0]; selectedProvider = { element_id: savedProvider.element_id, provider: savedProvider.provider, is_editable: savedProvider.is_editable }; isActive = true; } formField.selectedProvider = selectedProvider; formField.isActive = isActive; formField.autofillProviders = autofillProviders[fieldSlug].values; _this2.fieldsWithAutoFill.push(formField); } } }); } }, { key: 'maybeGetNoFieldsMarkup', value: function maybeGetNoFieldsMarkup() { if (_.isEmpty(this.fieldsWithAutoFill)) { return _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Form does not have fields that can be autofilled.') ) ) ) ); } return ''; } }, { key: 'updateProvider', value: function updateProvider(property, val, elementId) { var toSavedFieldAutofill = this.savedFieldsAutofill.filter(function (savedFieldAutofill) { return savedFieldAutofill.element_id === elementId; }); if (!_.isEmpty(toSavedFieldAutofill)) { toSavedFieldAutofill = toSavedFieldAutofill[0]; toSavedFieldAutofill.provider = val; this.savedFieldsAutofill = this.savedFieldsAutofill.map(function (savedFieldAutofill) { if (savedFieldAutofill.element_id === elementId) { return toSavedFieldAutofill; } return savedFieldAutofill; }); } else { toSavedFieldAutofill = { element_id: elementId, provider: val, is_editable: 'no' }; this.savedFieldsAutofill.push(toSavedFieldAutofill); } this.props.actions.settingsActions.updateSetting('fields-autofill', this.savedFieldsAutofill); } }, { key: 'updateEditable', value: function updateEditable(property, val, elementId) { var toSavedFieldAutofill = this.savedFieldsAutofill.filter(function (savedFieldAutofill) { return savedFieldAutofill.element_id === elementId; }); if (!_.isEmpty(toSavedFieldAutofill)) { toSavedFieldAutofill = toSavedFieldAutofill[0]; toSavedFieldAutofill.is_editable = val; this.savedFieldsAutofill = this.savedFieldsAutofill.map(function (savedFieldAutofill) { if (savedFieldAutofill.element_id === elementId) { return toSavedFieldAutofill; } return savedFieldAutofill; }); } else { toSavedFieldAutofill = { element_id: elementId, provider: '', is_editable: val }; this.savedFieldsAutofill.push(toSavedFieldAutofill); } this.props.actions.settingsActions.updateSetting('fields-autofill', this.savedFieldsAutofill); } }, { key: 'renderProviderOptions', value: function renderProviderOptions(autofillProviders) { var optgroup = []; Object.entries(autofillProviders).forEach(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), providerKey = _ref2[0], provider = _ref2[1]; var options = []; Object.entries(provider.attributes).forEach(function (_ref3) { var _ref4 = _slicedToArray(_ref3, 2), attrKey = _ref4[0], attribute = _ref4[1]; options.push(_react2.default.createElement( 'option', { value: attrKey, key: attrKey }, attribute.name )); }); optgroup.push(_react2.default.createElement( 'optgroup', { label: provider.name, key: providerKey }, options )); }); return optgroup; } }, { key: 'render', value: function render() { var _this3 = this; this.getFieldsWithAutofill(); var value = _.isUndefined(this.props.settings['use-autofill']) ? '' : this.props.settings['use-autofill']; var classContent = 'sui-hidden'; if (value && value !== 'false') { classContent = 'sui-toggle-content'; } var is_login = !_.isUndefined(this.props.settings['form-type']) && _.contains(['registration', 'login'], this.props.settings['form-type']); return !is_login && _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Autofill') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('If the user filling out the form is logged in, ' + 'we can auto-fill fields with any available data.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement(_toggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Enable Autofill'), property: 'use-autofill', unWrap: true })), _react2.default.createElement( 'div', { className: classContent, style: { marginTop: '10px' } }, this.maybeGetNoFieldsMarkup(), _react2.default.createElement( 'div', { className: 'sui-accordion' }, this.fieldsWithAutoFill.map(function (fieldWithAutoFill) { return _react2.default.createElement( _accordion2.default, _extends({}, _this3.props, { label: fieldWithAutoFill.label, key: fieldWithAutoFill.element_id }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, { property: 'provider', updateProperty: function updateProperty(property, val) { _this3.updateProvider(property, val, fieldWithAutoFill.element_id); }, defaultValue: '', label: (0, _utils.translate)('Autofill source'), settings: fieldWithAutoFill.selectedProvider, hasSearch: true, elementId: fieldWithAutoFill.element_id }, _react2.default.createElement( 'option', { value: '' }, (0, _utils.translate)('Disable Autofill') ), _this3.renderProviderOptions(fieldWithAutoFill.autofillProviders) ) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, { property: 'is_editable', updateProperty: function updateProperty(property, val) { _this3.updateEditable(property, val, fieldWithAutoFill.element_id); }, defaultValue: 'no', label: (0, _utils.translate)('Editable'), settings: fieldWithAutoFill.selectedProvider, elementId: fieldWithAutoFill.element_id + '_editable' }, _react2.default.createElement( 'option', { value: 'no' }, (0, _utils.translate)('No') ), _react2.default.createElement( 'option', { value: 'yes' }, (0, _utils.translate)('Yes') ) ) ) ) ); }) ) ) ) ); } }]); return AutofillBehaviour; }(_react.Component); exports.default = AutofillBehaviour; /***/ }), /* 597 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _datePicker = __webpack_require__(114); var _datePicker2 = _interopRequireDefault(_datePicker); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var LifespanBehaviour = function (_Component) { _inherits(LifespanBehaviour, _Component); function LifespanBehaviour() { _classCallCheck(this, LifespanBehaviour); return _possibleConstructorReturn(this, (LifespanBehaviour.__proto__ || Object.getPrototypeOf(LifespanBehaviour)).apply(this, arguments)); } _createClass(LifespanBehaviour, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Lifespan') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('By default this form will always be available for ' + 'submissions. However you can lock down if need be.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'label', { className: 'sui-settings-label', style: { marginBottom: '10px' } }, (0, _utils.translate)('Expiry') ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'form-expire', 'default': 'no_expire', simple: true }), _react2.default.createElement( _empty2.default, { value: 'no_expire' }, (0, _utils.translate)('None') ), _react2.default.createElement( _container2.default, { value: 'date', boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Date') }, _react2.default.createElement(_datePicker2.default, _extends({}, this.props, { property: 'expire_date', placeholder: (0, _utils.translate)('20 April 2018'), hasWordFormat: true })), _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Expiration Message'), placeholder: (0, _utils.translate)('Whoops! This form has expired.'), property: 'expire_message', description: (0, _utils.translate)('Add some custom message for users to see when your form ' + 'stops appearing or leave empty to show nothing (just an ' + 'empty space).') })) ), _react2.default.createElement( _container2.default, { value: 'submits', boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Submissions') }, _react2.default.createElement(_input2.default, _extends({}, this.props, { placeholder: '10', property: 'expire_submits', type: 'number' })), _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Expiration Message'), placeholder: (0, _utils.translate)('Whoops! This form has expired.'), property: 'expire_message', description: (0, _utils.translate)('Add some custom message for users to see when your form ' + 'stops appearing or leave empty to show nothing (just an ' + 'empty space).') })) ) ) ) ); } }]); return LifespanBehaviour; }(_react.Component); exports.default = LifespanBehaviour; /***/ }), /* 598 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var RenderBehaviour = function (_Component) { _inherits(RenderBehaviour, _Component); function RenderBehaviour() { _classCallCheck(this, RenderBehaviour); return _possibleConstructorReturn(this, (RenderBehaviour.__proto__ || Object.getPrototypeOf(RenderBehaviour)).apply(this, arguments)); } _createClass(RenderBehaviour, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Rendering') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose how you want your form to be rendered for users.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement(_toggle2.default, _extends({}, this.props, { property: 'use_ajax_load', label: (0, _utils.translate)('Load form using AJAX'), description: (0, _utils.translate)('Enabling this feature will load the form via AJAX after the page ' + 'has loaded up, effectively speeding up your page load time. ' + 'This method can also (in most cases) avoid page caching issues ' + 'with your form.') })), _react2.default.createElement(_toggle2.default, _extends({}, this.props, { property: 'use_donotcachepage', label: (0, _utils.translate)('Prevent page caching on form pages'), description: (0, _utils.translate)('Page caching plugins serve a static HTML version of the page which ' + "can cause issues to your dynamic forms. By enabling this, we'll " + 'use {{strong}}DONOTCACHEPAGE{{/strong}} constant to prevent ' + 'pages with this form on it from being cached.', { components: { strong: _react2.default.createElement('strong', null) } }) })) ) ); } }]); return RenderBehaviour; }(_react.Component); exports.default = RenderBehaviour; /***/ }), /* 599 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _wpEditor = __webpack_require__(31); var _wpEditor2 = _interopRequireDefault(_wpEditor); var _accordion = __webpack_require__(34); var _accordion2 = _interopRequireDefault(_accordion); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SaveAndContinueBehaviour = function (_Component) { _inherits(SaveAndContinueBehaviour, _Component); function SaveAndContinueBehaviour(props) { _classCallCheck(this, SaveAndContinueBehaviour); return _possibleConstructorReturn(this, (SaveAndContinueBehaviour.__proto__ || Object.getPrototypeOf(SaveAndContinueBehaviour)).call(this, props)); } _createClass(SaveAndContinueBehaviour, [{ key: 'componentDidUpdate', value: function componentDidUpdate() { this.addSaveAndContinueNotification(); } }, { key: 'addSaveAndContinueNotification', value: function addSaveAndContinueNotification() { var isSaveAndContinueAdded = _.findIndex(this.props.notifications, { slug: 'notification-0008-7000' }); // Remove the save and continue notification. if (!this.props.settings.use_save_and_continue || !this.props.settings.sc_email_link) { if (-1 !== isSaveAndContinueAdded) { this.props.notifications.splice(isSaveAndContinueAdded, 1); } return; } var saveAndContinueEmail = { slug: "notification-0008-7000", recipients: "{save_and_continue_email}", label: (0, _utils.translate)("Save and Continue"), "email-subject": (0, _utils.translate)("Your {form_name} form on {site_title} has been saved as draft"), "email-editor": (0, _utils.translate)("<p>Hi there!</p>" + "<p>You've successfully saved <b>{form_name}</b> form on <a href='{site_url}' target='_blank' rel='noopener noreferrer' style='color:#17A8E3;'>{site_title}</a>.\n" + "To continue where you left off, click the link below or copy the link to your web browser.</p>" + "<p><a href='{form_link}' target='_blank' rel='noopener noreferrer' style='color:#17A8E3;'>{form_link}</a></p>" + "<p>The above link will expire in {retention_period} days. Also note that anyone visiting the link will be able to view your partially completed form data.</p>"), 'email-recipients': 'default', 'email-attachment': 'false', type: 'save_draft' }; if (-1 === isSaveAndContinueAdded) { this.props.notifications.push(saveAndContinueEmail); } } }, { key: 'render', value: function render() { var _this2 = this; var goToSection = function goToSection(module) { _this2.props.router.navigate('/' + module); }; var settings = this.props.settings; var saveAndContinue = !_.isUndefined(settings.use_save_and_continue) ? settings.use_save_and_continue : false; if (_.isUndefined(settings.sc_email_link)) { settings.sc_email_link = true; } if (_.isUndefined(settings.sc_message)) { settings.sc_message = (0, _utils.translate)('<p>Your form has been saved as draft and a resume link ' + 'has been generated so you can return to the form anytime ' + 'within {retention_period} days from today. ' + 'Copy and save the link or enter your email address ' + 'below to have the link sent to your mail.</p>' + '<p>These fields weren\'t saved to your submission draft: ' + 'Paypal, Stripe, Signature, Password, Captcha, and Upload. ' + 'Kindly fill them out before submitting the form.</p>'); } if ('login' === settings['form-type']) { return ''; } return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Save and Continue') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Enable this option if you want to allow users save their progress ' + 'and return to complete the form at a later time.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement(_toggle2.default, _extends({}, this.props, { property: 'use_save_and_continue', label: (0, _utils.translate)('Enable save and continue'), unWrap: true })), saveAndContinue && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'sc_tab', 'default': 'configuration', wrapperClass: 'save-continue-wrap mtop10', simple: true, basicTabs: true }), _react2.default.createElement( _container2.default, { value: 'configuration', boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Configuration') }, _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'sc_draft_retention', label: (0, _utils.translate)('Draft retention period'), defaultValue: '30', description: (0, _utils.translate)('Enter the number of days a form\'s draft will be stored ' + 'on your server before they are automatically deleted.'), suffix: 'days' })), _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'sc_link_text', label: (0, _utils.translate)('Save form link text'), defaultValue: (0, _utils.translate)('Save as Draft'), description: (0, _utils.translate)('Edit text for the save draft link.') })), _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { property: 'sc_message', extraId: '-draft', updateProperty: this.updateProperty, label: (0, _utils.translate)('Resume message'), description: (0, _utils.translate)('This message will be shown when a form is successfully saved as draft.'), editorOptions: forminatorData.variables /* paymentOptions={forminatorData.payment_variables} */ , cutomTinymce: 'bold,italic,bullist,numlist,alignleft,aligncenter,alignright,link', enableFormData: 'true' })), _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', 'aria-live': 'assertive', style: { display: 'block' } }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('These fields will not be saved in the submission draft: ' + 'Paypal, Stripe, Signature, Password, Captcha, and Upload.') ) ) ) ), _react2.default.createElement(_toggle2.default, _extends({}, this.props, { property: 'sc_email_link', label: (0, _utils.translate)('Allow send draft link to email'), description: (0, _utils.translate)('Enable to allow users send the draft form\'s link to their email.'), unWrap: true })), settings.sc_email_link && _react2.default.createElement( 'div', { className: 'sui-border-frame' }, _react2.default.createElement( 'p', null, _react2.default.createElement( 'small', null, (0, _utils.translate)('Configure the send link email form below. ' + 'You can edit the email contents in the ' + '{{link}}Email Notifications{{/link}} tab.', { components: { link: _react2.default.createElement('a', { onClick: function onClick() { return goToSection('notifications'); }, href: '#' }) } }) ) ), _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'sc_email_input_label', label: (0, _utils.translate)('Email input label'), defaultValue: (0, _utils.translate)('Send draft link to') })), _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'sc_email_placeholder', label: (0, _utils.translate)('Placeholder (Optional)'), defaultValue: (0, _utils.translate)('E.g., johndoe@gmail.com') })), _react2.default.createElement(_input2.default, _extends({}, this.props, { property: 'sc_email_button_label', label: (0, _utils.translate)('Send link button label'), defaultValue: (0, _utils.translate)('Send draft link') })) ) ), _react2.default.createElement( _container2.default, { value: 'permission', boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Permission') }, _react2.default.createElement( 'p', { style: { marginBottom: '20px' } }, _react2.default.createElement( 'small', null, (0, _utils.translate)('Select which users can save their forms as draft.') ) ), _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'sc_permission', 'default': 'public', simple: true }), _react2.default.createElement( _container2.default, { value: 'public', boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Public') }, _react2.default.createElement( 'p', null, _react2.default.createElement( 'small', null, (0, _utils.translate)('Every user can save their forms as draft.') ) ) ), _react2.default.createElement( _container2.default, { value: 'registered', boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Registered Users') }, _react2.default.createElement( 'p', null, _react2.default.createElement( 'small', null, (0, _utils.translate)('Only registered users can save their forms as draft.') ) ) ) ) ) ) ) ) ); } }]); return SaveAndContinueBehaviour; }(_react.Component); exports.default = (0, _withRouter.withRouter)(SaveAndContinueBehaviour); /***/ }), /* 600 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Payments = function (_Component) { _inherits(Payments, _Component); function Payments() { _classCallCheck(this, Payments); return _possibleConstructorReturn(this, (Payments.__proto__ || Object.getPrototypeOf(Payments)).apply(this, arguments)); } _createClass(Payments, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Payments') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Choose how you want the form to behave when you are collecting payments.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement(_toggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Require SSL certificate to submit this form'), property: 'payment_require_ssl', description: (0, _utils.translate)('Enabling this will allow the form submission on an HTTPS ' + 'page only. It is highly recommended to embed the form with ' + 'payments action on an HTTPS page to avoid any man in the ' + 'middle attack.') })) ) ); } }]); return Payments; }(_react.Component); exports.default = Payments; /***/ }), /* 601 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _reactRedux = __webpack_require__(11); var _redux = __webpack_require__(12); var _settings = __webpack_require__(113); var settingsActions = _interopRequireWildcard(_settings); var _modal = __webpack_require__(62); var modalActions = _interopRequireWildcard(_modal); var _pdfs = __webpack_require__(378); var pdfsActions = _interopRequireWildcard(_pdfs); var _pdf = __webpack_require__(602); var _pdf2 = _interopRequireDefault(_pdf); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function mapStateToProps(state) { return { wrappers: state.wrappers, settings: state.settings, formType: state.settings['form-type'] || 'default', pdfs: state.pdfs || {}, formState: state }; } function mapDispatchToProps(dispatch) { return { actions: { settingsActions: (0, _redux.bindActionCreators)(settingsActions, dispatch), modalActions: (0, _redux.bindActionCreators)(modalActions, dispatch), pdfsActions: (0, _redux.bindActionCreators)(pdfsActions, dispatch) } }; } exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_pdf2.default); /***/ }), /* 602 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _disconnected = __webpack_require__(603); var _disconnected2 = _interopRequireDefault(_disconnected); var _viewAddons = __webpack_require__(604); var _viewAddons2 = _interopRequireDefault(_viewAddons); var _managePdfs = __webpack_require__(605); var _managePdfs2 = _interopRequireDefault(_managePdfs); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Pdf = function (_Component) { _inherits(Pdf, _Component); function Pdf(props) { _classCallCheck(this, Pdf); return _possibleConstructorReturn(this, (Pdf.__proto__ || Object.getPrototypeOf(Pdf)).call(this, props)); } _createClass(Pdf, [{ key: 'componentDidMount', value: function componentDidMount() { jQuery('html, body').animate({ scrollTop: 0 }, 'fast'); } }, { key: 'render', value: function render() { var _this2 = this; var goToSection = function goToSection(module) { _this2.props.router.navigate('/' + module); }; var isPro = forminatorData.isPro; var isPdfAddonActive = forminatorData.pdfAddonActive; var content = void 0; if (isPro) { if (isPdfAddonActive) { content = _react2.default.createElement(_managePdfs2.default, this.props); } else { content = _react2.default.createElement(_viewAddons2.default, this.props); } } else { content = _react2.default.createElement(_disconnected2.default, this.props); } return _react2.default.createElement( 'div', { id: 'forminator-form-pdf', className: 'sui-box' }, _react2.default.createElement( 'div', { className: 'sui-box-header' }, _react2.default.createElement( 'h2', { className: 'sui-box-title' }, (0, _utils.translate)('PDF') ), _react2.default.createElement( 'div', { className: 'sui-actions-left' }, !isPro && _react2.default.createElement( 'span', { className: 'sui-tag sui-tag-pro' }, (0, _utils.translate)('Pro') ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, content ), _react2.default.createElement( 'div', { className: 'sui-box-footer' }, _react2.default.createElement( 'button', { className: 'sui-button', onClick: function onClick() { return goToSection('behaviour'); } }, _react2.default.createElement('i', { className: 'sui-icon-arrow-left', 'aria-hidden': 'true' }), (0, _utils.translate)('Behavior') ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-icon-right', onClick: function onClick() { return goToSection('notifications'); } }, (0, _utils.translate)('Email Notifications'), _react2.default.createElement('i', { className: 'sui-icon-arrow-right', 'aria-hidden': 'true' }) ) ) ) ); } }]); return Pdf; }(_react.Component); exports.default = (0, _withRouter.withRouter)(Pdf); /***/ }), /* 603 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var PdfDisconnected = function (_Component) { _inherits(PdfDisconnected, _Component); function PdfDisconnected(props) { _classCallCheck(this, PdfDisconnected); return _possibleConstructorReturn(this, (PdfDisconnected.__proto__ || Object.getPrototypeOf(PdfDisconnected)).call(this, props)); } _createClass(PdfDisconnected, [{ key: 'render', value: function render() { return _react2.default.createElement( _react2.default.Fragment, null, forminatorData.showBranding && _react2.default.createElement('img', { src: 'https://wpmudev.com/wp-content/uploads/2023/08/Project-pdf-logo.png', style: { borderRadius: '50%' }, width: '60', className: 'sui-image sui-image-center' }), _react2.default.createElement( 'p', { className: 'sui-block-content-center', style: { maxWidth: '600px', margin: '15px auto' } }, _react2.default.createElement( 'small', null, (0, _utils.translate)('Generate and send PDF files ' + '(e.g. forms entries, receipts, invoices, quotations) ' + 'to users after form submission.') ) ), _react2.default.createElement( 'p', { className: 'sui-block-content-center' }, _react2.default.createElement( 'a', { className: 'sui-button sui-button-purple', target: '_blank', href: 'https://wpmudev.com/project/forminator-pro/?utm_source=forminator&utm_medium=plugin&utm_campaign=forminator_form-builder_pdf-addon' }, (0, _utils.translate)('Upgrade to PRO{{icon/}}', { components: { icon: _react2.default.createElement('span', { className: 'sui-icon-open-new-window sui-sm', 'aria-hidden': 'true', style: { margin: 0 } }) } }) ) ) ); } }]); return PdfDisconnected; }(_react.Component); exports.default = PdfDisconnected; /***/ }), /* 604 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ViewAddons = function (_Component) { _inherits(ViewAddons, _Component); function ViewAddons() { _classCallCheck(this, ViewAddons); return _possibleConstructorReturn(this, (ViewAddons.__proto__ || Object.getPrototypeOf(ViewAddons)).apply(this, arguments)); } _createClass(ViewAddons, [{ key: 'render', value: function render() { var imgUrl = forminatorData.pluginUrl + 'assets/images/'; var canManageAddons = (0, _utils.isTrue)(forminatorData.userPermissions['manage_forminator_addons']) || (0, _utils.isTrue)(forminatorData.userPermissions['manage_options']); return _react2.default.createElement( _react2.default.Fragment, null, forminatorData.showBranding && _react2.default.createElement('img', { src: imgUrl + '/forminator-disabled.png', srcSet: imgUrl + '/forminator-disabled.png 1x,\n\t\t\t\t\t\t' + imgUrl + '/forminator-disabled@2x.png 2x', className: 'sui-image sui-image-center' }), _react2.default.createElement( 'p', { className: 'sui-block-content-center', style: { 'marginTop': '30px' } }, _react2.default.createElement( 'small', null, (0, _utils.translate)('The {{b}}Forminator PDF Generator Add-on{{/b}} is ' + 'required to use the PDF generator feature. ' + 'Install it from the Add-ons page.', { components: { b: _react2.default.createElement('b', null) } }) ) ), canManageAddons && _react2.default.createElement( 'p', { className: 'sui-block-content-center' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-blue', href: forminatorData.addonsUrl, onClick: function onClick(e) { (0, _utils.goToLink)(forminatorData.addonsUrl); } }, (0, _utils.translate)('Get the Add-on') ) ) ); } }]); return ViewAddons; }(_react.Component); exports.default = ViewAddons; /***/ }), /* 605 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _noPdf = __webpack_require__(606); var _noPdf2 = _interopRequireDefault(_noPdf); var _pdfTable = __webpack_require__(607); var _pdfTable2 = _interopRequireDefault(_pdfTable); var _createPdf = __webpack_require__(608); var _createPdf2 = _interopRequireDefault(_createPdf); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ManagePdfs = function (_Component) { _inherits(ManagePdfs, _Component); function ManagePdfs(props) { _classCallCheck(this, ManagePdfs); var _this = _possibleConstructorReturn(this, (ManagePdfs.__proto__ || Object.getPrototypeOf(ManagePdfs)).call(this, props)); _this.closeModal = _this.closeModal.bind(_this); return _this; } _createClass(ManagePdfs, [{ key: 'closeModal', value: function closeModal() { this.props.actions.modalActions.showModal({ open: false }, 'createPdf'); } }, { key: 'render', value: function render() { var _this2 = this; var pdfExtensionsEnabled = forminatorData.pdfExtensionsEnabled; return _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Manage PDF files') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Create one or more PDF file templates that will be generated ' + 'and populated with user data on form submissions. ') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Available PDF files') ), !(0, _utils.isTrue)(pdfExtensionsEnabled) && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red sui-active', 'aria-live': 'assertive', style: { display: 'block', margin: '10px 0 20px' } }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('{{b}}Forminator PDF Generator Add-on{{/b}} requires the following modules ({{b}}mbstring{{/b}} and {{b}}gd{{/b}}). ' + 'Please contact your hosting provider to enable the extensions.', { components: { b: _react2.default.createElement('b', null) /* link: <a href="#" target="_blank" />, */ } }) ) ) ) ), (0, _utils.isTrue)(pdfExtensionsEnabled) && _react2.default.createElement( 'div', { className: 'pdf-files-box', style: { marginTop: '10px' } }, this.props.pdfs.length > 0 && _react2.default.createElement( 'table', { className: 'sui-table' }, _react2.default.createElement( 'tbody', null, _.map(this.props.pdfs, function (pdf, i) { return _react2.default.createElement(_pdfTable2.default, _extends({}, _this2.props, { key: i, pdf: pdf })); }) ) ), this.props.pdfs.length <= 0 && _react2.default.createElement(_noPdf2.default, this.props) ), _react2.default.createElement(_createPdf2.default, this.props) ) ); } }]); return ManagePdfs; }(_react.Component); exports.default = ManagePdfs; /***/ }), /* 606 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var NoPdf = function (_Component) { _inherits(NoPdf, _Component); function NoPdf() { _classCallCheck(this, NoPdf); return _possibleConstructorReturn(this, (NoPdf.__proto__ || Object.getPrototypeOf(NoPdf)).apply(this, arguments)); } _createClass(NoPdf, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('You haven\'t created any PDF files yet. When ' + 'you do, you\'ll be able to view them all here.') ) ) ) ); } }]); return NoPdf; }(_react.Component); exports.default = NoPdf; /***/ }), /* 607 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var PdfTable = function (_Component) { _inherits(PdfTable, _Component); function PdfTable(props) { _classCallCheck(this, PdfTable); var _this = _possibleConstructorReturn(this, (PdfTable.__proto__ || Object.getPrototypeOf(PdfTable)).call(this, props)); _this.showPreview = _this.showPreview.bind(_this); _this.editPdf = _this.editPdf.bind(_this); _this.deletePdf = _this.deletePdf.bind(_this); _this.closeModal = _this.closeModal.bind(_this); return _this; } _createClass(PdfTable, [{ key: 'showPreview', value: function showPreview(pdfId) { (0, _utils.goToLink)(window.location.href + '&form_type=pdf-form' + '&forminator_action=pdf-preview' + '&preview_nonce=' + forminatorData.previewNonce + '&pdf_id=' + pdfId); } }, { key: 'editPdf', value: function editPdf(pdfId) { window.location.href = forminatorData.formEditUrl + '&id=' + pdfId; } }, { key: 'deletePdf', value: function deletePdf(pdf) { this.props.actions.modalActions.showModal({ open: true, pdf: pdf, closeModal: this.closeModal, focusFirst: '.pdf-delete-button' }, 'deletePdf'); } }, { key: 'closeModal', value: function closeModal() { this.props.actions.modalActions.showModal({ open: false }, 'deletePdf'); } }, { key: 'render', value: function render() { var _this2 = this; return _react2.default.createElement( 'tr', { key: this.props.pdf.pdfId, className: 'pdf-' + this.props.pdf.pdfId }, _react2.default.createElement( 'td', { className: 'sui-table-item-title', colSpan: 2 }, _react2.default.createElement('span', { className: 'sui-icon-page-pdf', 'aria-hidden': 'true' }), this.props.pdf.pdfFilename + '.pdf' ), _react2.default.createElement( 'td', { colSpan: 1, style: { textAlign: 'right' } }, _react2.default.createElement( 'button', { role: 'button', className: 'sui-button-icon sui-tooltip sui-tooltip-left', 'data-tooltip': (0, _utils.translate)('Preview this PDF'), onClick: function onClick() { _this2.showPreview(_this2.props.pdf.pdfId); } }, _react2.default.createElement('span', { className: 'sui-icon-eye', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Preview this PDF') ) ), _react2.default.createElement( 'button', { role: 'button', className: 'sui-button-icon sui-tooltip sui-tooltip', 'data-tooltip': (0, _utils.translate)('Edit PDF File'), onClick: function onClick() { _this2.editPdf(_this2.props.pdf.pdfId); } }, _react2.default.createElement('span', { className: 'sui-icon-pencil', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Edit PDF File') ) ), _react2.default.createElement( 'button', { role: 'button', className: 'sui-button-icon sui-button-red sui-tooltip', 'data-tooltip': (0, _utils.translate)('Delete PDF File'), onClick: function onClick() { _this2.deletePdf(_this2.props.pdf); } }, _react2.default.createElement('span', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Delete PDF File') ) ) ) ); } }]); return PdfTable; }(_react.Component); exports.default = PdfTable; /***/ }), /* 608 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _unsavedChanges = __webpack_require__(609); var _unsavedChanges2 = _interopRequireDefault(_unsavedChanges); var _filename = __webpack_require__(610); var _filename2 = _interopRequireDefault(_filename); var _chooseTemplate = __webpack_require__(611); var _chooseTemplate2 = _interopRequireDefault(_chooseTemplate); var _preloadContent = __webpack_require__(612); var _preloadContent2 = _interopRequireDefault(_preloadContent); var _loading = __webpack_require__(613); var _loading2 = _interopRequireDefault(_loading); var _fileCreated = __webpack_require__(614); var _fileCreated2 = _interopRequireDefault(_fileCreated); var _reactModal = __webpack_require__(615); var _receiptInfo = __webpack_require__(616); var _receiptInfo2 = _interopRequireDefault(_receiptInfo); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var CreatePdf = function (_Component) { _inherits(CreatePdf, _Component); function CreatePdf(props) { _classCallCheck(this, CreatePdf); var _this = _possibleConstructorReturn(this, (CreatePdf.__proto__ || Object.getPrototypeOf(CreatePdf)).call(this, props)); _this.updateProperty = _this.updateProperty.bind(_this); _this.closeModal = _this.closeModal.bind(_this); _this.state = { pdfId: '', pdfFilename: '', pdfTemplate: '', payeeInfo: '', payerInfo: '', paymentNote: '', pdfPreloadContent: '', pdfSaved: false }; return _this; } _createClass(CreatePdf, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.setState(_defineProperty({}, slug, value)); } }, { key: 'closeModal', value: function closeModal() { this.props.actions.modalActions.showModal({ open: false }, 'createPdf'); } }, { key: 'render', value: function render() { var _this2 = this; var formHasChanges = window.forminatorChanges.settings; var modalUnsavedChanges = function modalUnsavedChanges(_ref) { var closeModal = _ref.closeModal, slideTo = _ref.slideTo; return _react2.default.createElement(_unsavedChanges2.default, _extends({}, _this2.props, { closeModal: closeModal, slideTo: slideTo, state: _this2.state })); }; var modalFilename = function modalFilename(_ref2) { var closeModal = _ref2.closeModal, slideTo = _ref2.slideTo; return _react2.default.createElement(_filename2.default, _extends({}, _this2.props, { closeModal: closeModal, slideTo: slideTo, state: _this2.state, updateProperty: _this2.updateProperty })); }; var modalChooseTemplate = function modalChooseTemplate(_ref3) { var closeModal = _ref3.closeModal, slideTo = _ref3.slideTo; return _react2.default.createElement(_chooseTemplate2.default, _extends({}, _this2.props, { closeModal: closeModal, slideTo: slideTo, state: _this2.state, updateProperty: _this2.updateProperty })); }; var modalPreloadContent = function modalPreloadContent(_ref4) { var closeModal = _ref4.closeModal, slideTo = _ref4.slideTo; return _react2.default.createElement(_preloadContent2.default, _extends({}, _this2.props, { closeModal: closeModal, slideTo: slideTo, state: _this2.state, updateProperty: _this2.updateProperty })); }; var modalInvoiceInfo = function modalInvoiceInfo(_ref5) { var closeModal = _ref5.closeModal, slideTo = _ref5.slideTo; return _react2.default.createElement(_receiptInfo2.default, _extends({}, _this2.props, { closeModal: closeModal, slideTo: slideTo, state: _this2.state, updateProperty: _this2.updateProperty })); }; var modalLoading = function modalLoading(_ref6) { var closeModal = _ref6.closeModal, slideTo = _ref6.slideTo; return _react2.default.createElement(_loading2.default, _extends({}, _this2.props, { closeModal: closeModal, slideTo: slideTo, state: _this2.state, updateProperty: _this2.updateProperty })); }; var modalFileCreated = function modalFileCreated(_ref7) { var closeModal = _ref7.closeModal, slideTo = _ref7.slideTo; return _react2.default.createElement(_fileCreated2.default, _extends({}, _this2.props, { closeModal: closeModal, slideTo: slideTo, state: _this2.state, updateProperty: _this2.updateProperty })); }; var pdfExtensionsEnabled = forminatorData.pdfExtensionsEnabled; var triggerContent = function triggerContent(_ref8) { var openModal = _ref8.openModal; return _react2.default.createElement( 'button', { className: 'sui-button sui-button-blue', onClick: openModal, disabled: !(0, _utils.isTrue)(pdfExtensionsEnabled) }, _react2.default.createElement('span', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Create New PDF') ); }; var modalContent = { pdfUnsavedSlide: { render: modalUnsavedChanges, focus: '.forminator-pdf-save-continue', size: 'sm' }, pdfFilenameSlide: { render: modalFilename, focus: '#forminator-field-pdf-filename', size: 'sm' }, pdfChooseTemplateSlide: { render: modalChooseTemplate, size: 'xl' } }; if ('receipt' === this.state.pdfTemplate) { modalContent.invoiceInfoSlide = { render: modalInvoiceInfo, size: 'lg' }; } else { modalContent.pdfPreloadContentSlide = { render: modalPreloadContent, size: 'lg' }; } modalContent.pdfLoadingSlide = { render: modalLoading, size: 'sm' }; modalContent.pdfFileCreatedSlide = { render: modalFileCreated, size: 'sm' }; return _react2.default.createElement( 'p', { id: 'create-new-pdf-btn' }, _react2.default.createElement(_reactModal.Modal, _extends({}, this.props, { dialogId: 'create-pdf-modal', firstSlide: formHasChanges ? 'pdfUnsavedSlide' : 'pdfFilenameSlide', titleId: 'forminator-pdf-modal__title', modalContent: modalContent, triggerContent: triggerContent, focusTrapPaused: 'receipt' === this.state.pdfTemplate })) ); } }]); return CreatePdf; }(_react.Component); exports.default = CreatePdf; /***/ }), /* 609 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _reactButtonIcon = __webpack_require__(21); var _axios = __webpack_require__(37); var _axios2 = _interopRequireDefault(_axios); var _qs = __webpack_require__(38); var _qs2 = _interopRequireDefault(_qs); var _notifications = __webpack_require__(28); var _notifications2 = _interopRequireDefault(_notifications); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var unsavedChanges = function (_Component) { _inherits(unsavedChanges, _Component); function unsavedChanges(props) { _classCallCheck(this, unsavedChanges); var _this = _possibleConstructorReturn(this, (unsavedChanges.__proto__ || Object.getPrototypeOf(unsavedChanges)).call(this, props)); _this.closeModal = _this.closeModal.bind(_this); _this.saveForm = _this.saveForm.bind(_this); return _this; } _createClass(unsavedChanges, [{ key: 'closeModal', value: function closeModal() { this.props.closeModal(); } }, { key: 'saveForm', value: function saveForm() { var _this2 = this; var formState = this.props.formState; var formStatus = !_.isUndefined(formState.settings.form_status) ? formState.settings.form_status : 'draft'; var formNameValue = !_.isUndefined(formState.settings.formName) ? formState.settings.formName : ''; var formId = !_.isUndefined(formState.settings.form_id) ? formState.settings.form_id : -1; var newStatus = 'draft'; if ('publish' === formStatus) { newStatus = 'publish'; } var ajaxData = { action: 'forminator_save_builder', _wpnonce: forminatorData.formNonce, formName: formNameValue, form_id: formId, status: newStatus, version: forminatorData.version, data: JSON.stringify(formState) }; _axios2.default.post(forminatorData.ajaxUrl, _qs2.default.stringify(ajaxData)).then(function (data) { // Retrieve all stripe fields from the model var stripeFields = (0, _utils.getFieldsByType)('stripe', formState.wrappers); if (data.data.success) { // Check if there is any Payment plan with empty Plan ID _this2.reloadPageForSubscriptionPlans(stripeFields); // Update form ID if (formStatus.form_id === -1) { _this2.props.actions.settingsActions.updateSetting('form_id', data.data.data); // update form_id on window forminatorData, for future reference forminatorData.currentForm.settings.form_id = data.data.data; window.history.pushState({}, 'Edit Form', forminatorData.formEditUrl + '&id=' + data.data.data); } // Update form status _this2.props.actions.settingsActions.saveBuilder('form_status', newStatus); // Slide to continue to create PDF _this2.props.slideTo('pdfFilenameSlide', 'right'); } else { var errorText = data.data.data && 'string' === typeof data.data.data ? data.data.data : (0, _utils.translate)('Something went wrong while saving your form. Please try again.'); var custom = new _notifications2.default({ type: 'error', text: errorText }); custom.open(); _this2.closeModal(); } }).catch(function (err) { var custom = new _notifications2.default({ type: 'error', text: (0, _utils.translate)('Something went wrong while saving your form. Please try again.') }); custom.open(); _this2.closeModal(); }); } }, { key: 'reloadPageForSubscriptionPlans', value: function reloadPageForSubscriptionPlans(stripeFields) { var needsReload = false; stripeFields.map(function (field) { if (!_.isUndefined(field.payments)) { field.payments.map(function (plan) { // Check if the payment method is subscription if (!_.isUndefined(plan.payment_method) && plan.payment_method === 'subscription') { // Check if the plan ID exist if (_.isUndefined(plan.plan_id) || _.isEmpty(plan.plan_id)) { // We have to reload the page to fill the plan id to prevent multiple plans created needsReload = true; } } }); } }); // Reload the page if it needs reload if (needsReload) { window.forminatorChanges = { fields: [], settings: false, saved: true }; location.reload(); } } }, { key: 'render', value: function render() { var closeModal = this.props.closeModal; return _react2.default.createElement( 'div', { className: 'sui-box', style: { marginBottom: 0 } }, _react2.default.createElement( 'div', { className: 'sui-box-header sui-flatten sui-content-center sui-spacing-top--60' }, _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement(_reactButtonIcon.ButtonIcon, { icon: 'close', iconSize: 'md', label: (0, _utils.translate)('Close this dialog window'), className: 'sui-button-float--right forminator-pdf-create-close', onClick: closeModal }) ), _react2.default.createElement( 'h2', { id: 'forminator-pdf-modal__title', className: 'sui-box-title sui-lg' }, (0, _utils.translate)('You have unsaved changes') ), _react2.default.createElement( 'p', { id: 'forminator-settings__description', className: 'sui-description' }, (0, _utils.translate)('Your form contains unsaved changes. Please save your form before proceeding.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body sui-flatten sui-content-center sui-spacing-top--20 sui-spacing-bottom--40' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost forminator-discard-pdf-settings', onClick: closeModal }, (0, _utils.translate)('Cancel') ), _react2.default.createElement( 'button', { className: 'sui-button forminator-pdf-save-continue', onClick: this.saveForm }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, (0, _utils.translate)('Save and Continue') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ); } }]); return unsavedChanges; }(_react.Component); exports.default = unsavedChanges; /***/ }), /* 610 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _reactButtonIcon = __webpack_require__(21); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var FileName = function (_Component) { _inherits(FileName, _Component); function FileName(props) { _classCallCheck(this, FileName); var _this = _possibleConstructorReturn(this, (FileName.__proto__ || Object.getPrototypeOf(FileName)).call(this, props)); _this.filename_input = _react2.default.createRef(); _this.createBtn = _react2.default.createRef(); _this.hyphenateFilename = _this.hyphenateFilename.bind(_this); _this.setFilename = _this.setFilename.bind(_this); _this.state = { fileName: !_.isEmpty(_this.props.state.pdfFilename) ? _this.props.state.pdfFilename : '' }; return _this; } _createClass(FileName, [{ key: 'componentDidMount', value: function componentDidMount() { if (_.isEmpty(this.props.state.pdfFilename)) { jQuery(this.createBtn.current).prop('disabled', true); } } }, { key: 'hyphenateFilename', value: function hyphenateFilename(e) { var createBtn = jQuery(this.createBtn.current); var fileName = e.currentTarget.value; fileName = fileName.replace(' ', '-'); e.currentTarget.value = fileName; this.setState({ fileName: fileName }); if (fileName.length > 0) { createBtn.prop('disabled', false); } else { createBtn.prop('disabled', true); } } }, { key: 'setFilename', value: function setFilename() { var self = this; this.props.updateProperty('pdfFilename', this.state.fileName); setTimeout(function () { self.props.slideTo('pdfChooseTemplateSlide', 'right'); }, 20); } }, { key: 'render', value: function render() { var _this2 = this; var closeModal = this.props.closeModal; return _react2.default.createElement( 'div', { className: 'sui-box', style: { marginBottom: 0 } }, _react2.default.createElement( 'div', { className: 'sui-box-header sui-flatten sui-content-center sui-spacing-top--60' }, _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement(_reactButtonIcon.ButtonIcon, { icon: 'close', iconSize: 'md', label: (0, _utils.translate)('Close this dialog window'), className: 'sui-button-float--right forminator-pdf-create-close', onClick: closeModal }) ), _react2.default.createElement( 'h2', { id: 'forminator-pdf-modal__title', className: 'sui-box-title sui-lg' }, (0, _utils.translate)('Enter PDF filename') ), _react2.default.createElement( 'p', { id: 'forminator-settings__description', className: 'sui-description' }, (0, _utils.translate)('Give your file a name so you can identify it later.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body sui-content-center' }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement('input', { type: 'text', id: 'forminator-field-pdf-filename', name: 'pdf_filename', className: 'sui-form-control', defaultValue: this.state.fileName, onChange: function onChange(e) { return _this2.hyphenateFilename(e); }, ref: this.filename_input }) ), _react2.default.createElement( 'button', { id: 'forminator-pdf-create-btn', className: 'sui-button pdf-btn-next', onClick: this.setFilename, ref: this.createBtn }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, (0, _utils.translate)('Next') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ); } }]); return FileName; }(_react.Component); exports.default = FileName; /***/ }), /* 611 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _reactButtonIcon = __webpack_require__(21); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ChooseTemplate = function (_Component) { _inherits(ChooseTemplate, _Component); function ChooseTemplate(props) { _classCallCheck(this, ChooseTemplate); var _this = _possibleConstructorReturn(this, (ChooseTemplate.__proto__ || Object.getPrototypeOf(ChooseTemplate)).call(this, props)); _this.templates = _react2.default.createRef(); _this.saveTemplate = _this.saveTemplate.bind(_this); _this.setTemplate = _this.setTemplate.bind(_this); _this.state = { pdfTemplate: !_.isEmpty(_this.props.state.pdfTemplate) ? _this.props.state.pdfTemplate : 'basic' }; return _this; } _createClass(ChooseTemplate, [{ key: 'saveTemplate', value: function saveTemplate() { this.props.updateProperty('pdfTemplate', this.state.pdfTemplate); // Slide to loading state. var nextSlide = 'receipt' === this.state.pdfTemplate ? 'invoiceInfoSlide' : 'pdfPreloadContentSlide'; this.props.slideTo(nextSlide, 'right'); } }, { key: 'setTemplate', value: function setTemplate(e) { this.setState({ pdfTemplate: e.currentTarget.value }); } }, { key: 'render', value: function render() { var _this2 = this; var _props = this.props, closeModal = _props.closeModal, slideTo = _props.slideTo; var hasStripe = (0, _utils.hasFieldType)('stripe', this.props.wrappers); var hasPaypal = (0, _utils.hasFieldType)('paypal', this.props.wrappers); var templates = [{ name: 'basic', disabled: false }, { name: 'receipt', disabled: false }, { name: 'quotation', disabled: true }]; return _react2.default.createElement( 'div', { className: 'sui-box', style: { marginBottom: 0 } }, _react2.default.createElement( 'div', { className: 'sui-box-header sui-flatten sui-content-center sui-spacing-top--60' }, _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement(_reactButtonIcon.ButtonIcon, { icon: 'close', iconSize: 'md', label: (0, _utils.translate)('Close this dialog window'), className: 'sui-button-float--right forminator-pdf-create-close', onClick: closeModal }) ), _react2.default.createElement( 'h2', { id: 'forminator-pdf-modal__title', className: 'sui-box-title sui-lg' }, (0, _utils.translate)('Choose a template') ), _react2.default.createElement( 'p', { id: 'forminator-settings__description', className: 'sui-description' }, (0, _utils.translate)('Select a template below to get started.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body sui-spacing-sides--0 sui-spacing-bottom--0' }, _react2.default.createElement( 'div', { className: 'sui-box-selectors sui-box-selectors-col-3', ref: this.templates }, _react2.default.createElement( 'ul', { role: 'radiogroup' }, templates.map(function (template, index) { return _react2.default.createElement( 'li', { key: 'template-' + (0, _utils.randNumber)() }, _react2.default.createElement( 'label', { htmlFor: 'pdf-template-' + template.name, className: 'sui-box-selector ' + (template.disabled ? 'sui-disabled' : '') }, _react2.default.createElement('input', { type: 'radio', id: 'pdf-template-' + template.name, name: 'pdf-template', 'aria-labelledby': 'pdf-template-' + template.name + '-label', value: template.name, defaultChecked: template.name === _this2.state.pdfTemplate, onClick: _this2.setTemplate }), _react2.default.createElement( 'span', { 'aria-hidden': 'true', className: 'box-select-head' }, _react2.default.createElement( 'span', { id: 'pdf-template-' + template.name + '-label', 'aria-hidden': 'true', style: { textTransform: 'capitalize' } }, (0, _utils.translate)(template.name) ), template.disabled && _react2.default.createElement( 'span', { className: 'sui-tag sui-tag-blue', style: { padding: '0 5px', marginLeft: '10px', fontWeight: '900', fontSize: '8px', textTransform: 'uppercase', minHeight: '0', lineHeight: '1.1' } }, (0, _utils.translate)('Coming Soon') ) ), _react2.default.createElement( 'span', { 'aria-hidden': 'true', className: 'pdf-template-img' }, _react2.default.createElement('img', { src: forminatorData.imagesUrl + '/pdf-template-' + template.name + '.png', srcSet: forminatorData.imagesUrl + '/pdf-template-' + template.name + '.png 1x,\n\t\t\t\t\t\t\t\t\t\t\t' + forminatorData.imagesUrl + '/pdf-template-' + template.name + '@2x.png 2x', alt: 'pdf-template-' + template.name }) ) ) ); }) ), 'receipt' === this.state.pdfTemplate && !hasStripe && !hasPaypal && _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-red sui-active', style: { display: 'block', paddingTop: '30px' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Receipt template requires at least one ' + 'payment field. Please add a PayPal or ' + 'Stripe field to your form to proceed or ' + 'choose a different template.') ) ) ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-footer' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost', onClick: function onClick() { return slideTo('pdfFilenameSlide', 'left'); } }, (0, _utils.translate)('Back') ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement( 'button', { className: 'sui-button pdf-btn-next', onClick: function onClick(e) { return _this2.saveTemplate(e); }, disabled: 'receipt' === this.state.pdfTemplate && !hasStripe && !hasPaypal }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, (0, _utils.translate)('Next') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ) ); } }]); return ChooseTemplate; }(_react.Component); exports.default = ChooseTemplate; /***/ }), /* 612 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _reactButtonIcon = __webpack_require__(21); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var PreloadContent = function (_Component) { _inherits(PreloadContent, _Component); function PreloadContent(props) { _classCallCheck(this, PreloadContent); var _this = _possibleConstructorReturn(this, (PreloadContent.__proto__ || Object.getPrototypeOf(PreloadContent)).call(this, props)); _this.contentTypes = _react2.default.createRef(); _this.setType = _this.setType.bind(_this); _this.state = { preloadContent: 'preload' }; return _this; } _createClass(PreloadContent, [{ key: 'createPdf', value: function createPdf(e) { this.props.updateProperty('pdfPreloadContent', this.state.preloadContent); // Slide to loading state. this.props.slideTo('pdfLoadingSlide', 'right'); } }, { key: 'setType', value: function setType(e) { this.setState({ preloadContent: e.currentTarget.value }); } }, { key: 'render', value: function render() { var _this2 = this; var _props = this.props, closeModal = _props.closeModal, slideTo = _props.slideTo; var contentTypes = [{ name: (0, _utils.translate)('Preload form fields in PDF file'), value: 'preload' }, { name: (0, _utils.translate)('Start with a blank PDF file'), value: 'blank' }]; return _react2.default.createElement( 'div', { className: 'sui-box', style: { marginBottom: 0 } }, _react2.default.createElement( 'div', { className: 'sui-box-header sui-flatten sui-content-center sui-spacing-top--60' }, _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement(_reactButtonIcon.ButtonIcon, { icon: 'close', iconSize: 'md', label: (0, _utils.translate)('Close this dialog window'), className: 'sui-button-float--right forminator-pdf-create-close', onClick: closeModal }) ), _react2.default.createElement( 'h2', { id: 'forminator-pdf-modal__title', className: 'sui-box-title sui-lg' }, (0, _utils.translate)('Preload PDF Content') ), _react2.default.createElement( 'p', { id: 'forminator-settings__description', className: 'sui-description' }, (0, _utils.translate)('Choose if you want to load form data into your PDF file or start with a blank PDF file.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body sui-content-center sui-spacing-sides--0 sui-spacing-bottom--0' }, _react2.default.createElement( 'div', { className: 'sui-box-selectors sui-box-selectors-col-2', style: { marginBottom: '0' }, ref: this.contentTypes }, _react2.default.createElement( 'ul', { role: 'radiogroup' }, contentTypes.map(function (content, index) { return _react2.default.createElement( 'li', { key: 'content-' + (0, _utils.randNumber)() }, _react2.default.createElement( 'label', { htmlFor: 'pdf-content-' + content.value, className: 'sui-box-selector' }, _react2.default.createElement('input', { type: 'radio', id: 'pdf-content-' + content.value, name: 'pdf-content', 'aria-labelledby': 'pdf-content-' + content.value + '-label', value: content.value, checked: content.value === _this2.state.preloadContent, onChange: function onChange(e) { return _this2.setType(e); } }), _react2.default.createElement( 'span', { 'aria-hidden': 'true', className: 'box-select-head' }, _react2.default.createElement( 'span', { id: 'pdf-content-' + content.value + '-label', 'aria-hidden': 'true' }, content.name ) ) ) ); }) ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-footer' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost', onClick: function onClick() { return slideTo('pdfChooseTemplateSlide', 'left'); } }, (0, _utils.translate)('Back') ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-blue pdf-btn-next', onClick: function onClick(e) { return _this2.createPdf(e); } }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Create') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ) ); } }]); return PreloadContent; }(_react.Component); exports.default = PreloadContent; /***/ }), /* 613 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _axios = __webpack_require__(37); var _axios2 = _interopRequireDefault(_axios); var _qs = __webpack_require__(38); var _qs2 = _interopRequireDefault(_qs); var _notifications = __webpack_require__(28); var _notifications2 = _interopRequireDefault(_notifications); var _reactButtonIcon = __webpack_require__(21); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Loading = function (_Component) { _inherits(Loading, _Component); function Loading(props) { _classCallCheck(this, Loading); var _this = _possibleConstructorReturn(this, (Loading.__proto__ || Object.getPrototypeOf(Loading)).call(this, props)); _this.save = _this.save.bind(_this); _this.showError = _this.showError.bind(_this); return _this; } _createClass(Loading, [{ key: 'componentDidMount', value: function componentDidMount() { if (!this.props.state.pdfSaved) { this.save({ action: 'forminator_save_pdf', _wpnonce: forminatorData.formNonce, parent_form_id: this.props.settings.form_id, pdf_filename: this.props.state.pdfFilename, pdf_template: this.props.state.pdfTemplate, payee_info: this.props.state.payeeInfo, payer_info: this.props.state.payerInfo, payment_note: this.props.state.paymentNote, pdf_preload: this.props.state.pdfPreloadContent, version: forminatorData.version }); } } }, { key: 'save', value: function save(pdfData) { var _this2 = this; // Prevent duplicate calls for save PDF. this.props.updateProperty('pdfSaved', true); _axios2.default.post(forminatorData.ajaxUrl, _qs2.default.stringify(pdfData)).then(function (res) { if (res.data.success) { _this2.props.updateProperty('pdfId', res.data.data.pdf_id); setTimeout(function () { _this2.props.slideTo('pdfFileCreatedSlide', 'right'); }, 20); } else { _this2.showError(res.data); } }).catch(function (err) { _this2.showError(err); }); } }, { key: 'showError', value: function showError(err) { var custom = new _notifications2.default({ type: 'error', text: (0, _utils.translate)('Something went wrong while creating your PDF. Please try again.') }); custom.open(); console.log(err); this.props.closeModal(); } }, { key: 'render', value: function render() { var closeModal = this.props.closeModal; return _react2.default.createElement( 'div', { className: 'sui-box', style: { marginBottom: 0 } }, _react2.default.createElement( 'div', { className: 'sui-box-header sui-flatten sui-content-center sui-spacing-top--60' }, _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement(_reactButtonIcon.ButtonIcon, { icon: 'close', iconSize: 'md', label: (0, _utils.translate)('Close this dialog window'), className: 'sui-button-float--right forminator-pdf-create-close', onClick: closeModal }) ) ), _react2.default.createElement( 'div', { className: 'sui-box-body sui-content-center' }, _react2.default.createElement( 'p', null, _react2.default.createElement('span', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ), _react2.default.createElement( 'p', null, (0, _utils.translate)('Hold tight a few moments while we create your PDF file.') ) ) ); } }]); return Loading; }(_react.Component); exports.default = Loading; /***/ }), /* 614 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _reactButtonIcon = __webpack_require__(21); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var FileCreated = function (_Component) { _inherits(FileCreated, _Component); function FileCreated(props) { _classCallCheck(this, FileCreated); var _this = _possibleConstructorReturn(this, (FileCreated.__proto__ || Object.getPrototypeOf(FileCreated)).call(this, props)); _this.customizePdf = _this.customizePdf.bind(_this); _this.closeModal = _this.closeModal.bind(_this); _this.applyChanges = _this.applyChanges.bind(_this); return _this; } _createClass(FileCreated, [{ key: 'customizePdf', value: function customizePdf(pdfId) { window.location.href = forminatorData.formEditUrl + '&id=' + pdfId; } }, { key: 'closeModal', value: function closeModal() { this.props.closeModal(); } }, { key: 'applyChanges', value: function applyChanges() { var newState = this.getPropState(); newState = [this.props.state].concat(_toConsumableArray(newState)); this.props.actions.pdfsActions.updatePdfs(newState); this.closeModal(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.props.updateProperty('pdfFilename', ''); this.props.updateProperty('pdfTemplate', ''); this.props.updateProperty('pdfPreloadContent', 'preload'); this.props.updateProperty('pdfSaved', false); } }, { key: 'getPropState', value: function getPropState() { var props = []; _.each(this.props.pdfs, function (element) { var newElement = Object.assign({}, element); props.push(newElement); }); return props; } }, { key: 'render', value: function render() { var _this2 = this; return _react2.default.createElement( 'div', { className: 'sui-box', style: { marginBottom: 0 } }, _react2.default.createElement( 'div', { className: 'sui-box-header sui-flatten sui-content-center sui-spacing-top--60' }, _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement(_reactButtonIcon.ButtonIcon, { icon: 'close', iconSize: 'md', label: (0, _utils.translate)('Close this dialog window'), className: 'sui-button-float--right forminator-pdf-create-close', onClick: this.closeModal }) ), _react2.default.createElement( 'p', null, _react2.default.createElement('span', { className: 'sui-icon-check sui-lg', 'aria-hidden': 'true' }) ), _react2.default.createElement( 'h2', { id: 'forminator-pdf-modal__title', className: 'sui-box-title sui-lg' }, (0, _utils.translate)('PDF File Created!') ), _react2.default.createElement( 'p', { id: 'forminator-settings__description', className: 'sui-description' }, (0, _utils.translate)('The PDF file has been created. ' + 'Click “Edit PDF” to customize the created PDF or ' + '“Continue” to continue building your form.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body sui-content-center' }, _react2.default.createElement( 'button', { className: 'sui-button forminator-customize-pdf-settings', 'data-pdf-id': '', onClick: function onClick() { return _this2.customizePdf(_this2.props.state.pdfId); } }, (0, _utils.translate)('Edit PDF') ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost', onClick: this.applyChanges }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, (0, _utils.translate)('Continue') ) ) ) ); } }]); return FileCreated; }(_react.Component); exports.default = FileCreated; /***/ }), /* 615 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Modal", function() { return Modal; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(23); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function () {}; return { s: F, n: function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function (e) { throw e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function () { it = it.call(o); }, n: function () { var step = it.next(); normalCompletion = step.done; return step; }, e: function (e) { didErr = true; err = e; }, f: function () { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } // https://github.com/davidtheclark/no-scroll/blob/master/index.js var isOn = false; var scrollbarSize; var scrollTop; function getScrollbarSize() { if (typeof scrollbarSize !== 'undefined') return scrollbarSize; var doc = document.documentElement; var dummyScroller = document.createElement('div'); dummyScroller.setAttribute('style', 'width:99px;height:99px;' + 'position:absolute;top:-9999px;overflow:scroll;'); doc.appendChild(dummyScroller); scrollbarSize = dummyScroller.offsetWidth - dummyScroller.clientWidth; doc.removeChild(dummyScroller); return scrollbarSize; } function hasScrollbar() { return document.documentElement.scrollHeight > window.innerHeight; } function on() { if (typeof document === 'undefined' || isOn) return; var doc = document.documentElement; scrollTop = window.pageYOffset; if (hasScrollbar()) { doc.style.width = 'calc(100% - ' + getScrollbarSize() + 'px)'; } else { doc.style.width = '100%'; } doc.style.position = 'fixed'; doc.style.top = -scrollTop + 'px'; doc.style.overflow = 'hidden'; isOn = true; } function off() { if (typeof document === 'undefined' || !isOn) return; var doc = document.documentElement; doc.style.width = ''; doc.style.position = ''; doc.style.top = ''; doc.style.overflow = ''; if (typeof scrollTop === 'number') { window.scroll(0, scrollTop); } isOn = false; } // https://github.com/davidtheclark/tabbable/blob/master/src/index.js var candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])']; var candidateSelector = candidateSelectors.join(','); var matches = typeof Element === 'undefined' ? function () { return false; } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; function getHTMLElements(root, selector) { var result = []; var _iterator = _createForOfIteratorHelper(root.querySelectorAll(selector)), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var el = _step.value; if (el instanceof HTMLElement) { result.push(el); } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } return result; } function tabbable(el, optionalOptions) { var options = optionalOptions || {}; var regularTabbables = []; var orderedTabbables = []; var candidates = getHTMLElements(el, candidateSelector); if (options.includeContainer) { if (matches.call(el, candidateSelector)) { candidates = Array.prototype.slice.apply(candidates); candidates.unshift(el); } } var candidate; var candidateTabindex; for (var i = 0; i < candidates.length; i++) { candidate = candidates[i]; if (!isNodeMatchingSelectorTabbable(candidate)) { continue; } candidateTabindex = getTabindex(candidate); if (candidateTabindex === 0) { regularTabbables.push(candidate); } else { orderedTabbables.push({ documentOrder: i, tabIndex: candidateTabindex, node: candidate }); } } var tabbableNodes = orderedTabbables.sort(sortOrderedTabbables).map(function (a) { return a.node; }).concat(regularTabbables); return tabbableNodes; } tabbable.isTabbable = isTabbable; tabbable.isFocusable = isFocusable; function isNodeMatchingSelectorTabbable(node) { if (!isNodeMatchingSelectorFocusable(node) || isNonTabbableRadio(node) || getTabindex(node) < 0) { return false; } return true; } function isTabbable(node) { if (!node) { throw new Error('No node provided'); } if (matches.call(node, candidateSelector) === false) { return false; } return isNodeMatchingSelectorTabbable(node); } function isNodeMatchingSelectorFocusable(node) { if (node.disabled || isHiddenInput(node) || isHidden(node)) { return false; } return true; } var focusableCandidateSelector = candidateSelectors.concat('iframe').join(','); function isFocusable(node) { if (!node) { throw new Error('No node provided'); } // Added this to make TypeScript work. if (!(node instanceof HTMLElement)) return false; if (matches.call(node, focusableCandidateSelector) === false) { return false; } return isNodeMatchingSelectorFocusable(node); } function getTabindex(node) { var tabindexAttr = parseInt(node.getAttribute('tabindex') || '', 10); if (!isNaN(tabindexAttr)) { return tabindexAttr; } // Browsers do not return `tabIndex` correctly for contentEditable nodes; // so if they don't have a tabindex attribute specifically set, assume it's 0. if (isContentEditable(node)) { return 0; } return node.tabIndex; } function sortOrderedTabbables(a, b) { return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex; } function isContentEditable(node) { return node.contentEditable === 'true'; } function isInput(node) { return node.tagName === 'INPUT'; } function isHiddenInput(node) { return isInput(node) && node.type === 'hidden'; } function isRadio(node) { return isInput(node) && node.type === 'radio'; } function isNonTabbableRadio(node) { return isRadio(node) && !isTabbableRadio(node); } function getCheckedRadio(nodes) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].checked) { return nodes[i]; } } return undefined; } function isTabbableRadio(node) { if (!node.name) { return true; } if (!node.ownerDocument) { // Need this for TypeScript to be OK with the rest of this code. // I guess we'll just assume that anything without an owner // document isn't tabbable... return false; } // This won't account for the edge case where you have radio groups with the same // in separate forms on the same page. var radioSet = Array.from(node.ownerDocument.querySelectorAll('input[type="radio"][name="' + node.name + '"]')); var checked = getCheckedRadio(radioSet); return !checked || checked === node; } function isHidden(node) { // offsetParent being null will allow detecting cases where an element is invisible or inside an invisible element, // as long as the element does not use position: fixed. For them, their visibility has to be checked directly as well. return node.offsetParent === null || getComputedStyle(node).visibility === 'hidden'; } var activeFocusDelay; var activeFocusTraps = function () { var trapQueue = []; return { activateTrap: function activateTrap(trap) { if (trapQueue.length > 0) { var activeTrap = trapQueue[trapQueue.length - 1]; if (activeTrap !== trap) { activeTrap.pause(); } } var trapIndex = trapQueue.indexOf(trap); if (trapIndex === -1) { trapQueue.push(trap); } else { // move this existing trap to the front of the queue trapQueue.splice(trapIndex, 1); trapQueue.push(trap); } }, deactivateTrap: function deactivateTrap(trap) { var trapIndex = trapQueue.indexOf(trap); if (trapIndex !== -1) { trapQueue.splice(trapIndex, 1); } if (trapQueue.length > 0) { trapQueue[trapQueue.length - 1].unpause(); } } }; }(); function getHTMLElement(doc, selector) { var el = doc.querySelector(selector); if (!(el && el instanceof HTMLElement)) { throw new Error("No HTML element matches \"".concat(selector, "\"!")); } return el; } function createFocusTrap(element, userOptions) { var doc = document; var container = typeof element === 'string' ? getHTMLElement(doc, element) : element; var config = _objectSpread2({ returnFocusOnDeactivate: true, escapeDeactivates: true }, userOptions); var state = { firstTabbableNode: null, lastTabbableNode: null, nodeFocusedBeforeActivation: null, mostRecentlyFocusedNode: null, active: false, paused: false }; var trap = { activate: activate, deactivate: deactivate, pause: pause, unpause: unpause }; return trap; function activate(activateOptions) { if (state.active) return; updateTabbableNodes(); state.active = true; state.paused = false; state.nodeFocusedBeforeActivation = doc.activeElement; var onActivate = activateOptions && activateOptions.onActivate ? activateOptions.onActivate : config.onActivate; if (onActivate) { onActivate(); } addListeners(); return trap; } function deactivate(deactivateOptions) { if (!state.active) return; clearTimeout(activeFocusDelay); removeListeners(); state.active = false; state.paused = false; activeFocusTraps.deactivateTrap(trap); var onDeactivate = deactivateOptions && deactivateOptions.onDeactivate !== undefined ? deactivateOptions.onDeactivate : config.onDeactivate; if (onDeactivate) { onDeactivate(); } var returnFocus = deactivateOptions && deactivateOptions.returnFocus !== undefined ? deactivateOptions.returnFocus : config.returnFocusOnDeactivate; if (returnFocus) { delay(function () { tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)); }); } return trap; } function containerContains(el) { if (el && el instanceof Node) return container.contains(el); return false; } function pause() { if (state.paused || !state.active) return; state.paused = true; removeListeners(); } function unpause() { if (!state.paused || !state.active) return; state.paused = false; updateTabbableNodes(); addListeners(); } function addListeners() { if (!state.active) return; // There can be only one listening focus trap at a time activeFocusTraps.activateTrap(trap); // Delay ensures that the focused element doesn't capture the event // that caused the focus trap activation. activeFocusDelay = delay(function () { tryFocus(getInitialFocusNode()); }); doc.addEventListener('focusin', checkFocusIn, true); doc.addEventListener('mousedown', checkPointerDown, { capture: true, passive: false }); doc.addEventListener('touchstart', checkPointerDown, { capture: true, passive: false }); doc.addEventListener('click', checkClick, { capture: true, passive: false }); doc.addEventListener('keydown', checkKey, { capture: true, passive: false }); return trap; } function removeListeners() { if (!state.active) return; doc.removeEventListener('focusin', checkFocusIn, true); doc.removeEventListener('mousedown', checkPointerDown, true); doc.removeEventListener('touchstart', checkPointerDown, true); doc.removeEventListener('click', checkClick, true); doc.removeEventListener('keydown', checkKey, true); return trap; } function getNodeForOption(optionName) { var optionValue = config[optionName]; var node = optionValue; if (!optionValue) { return null; } if (typeof optionValue === 'string') { node = doc.querySelector(optionValue); if (!node) { throw new Error('`' + optionName + '` refers to no known node'); } } if (typeof optionValue === 'function') { node = optionValue(); if (!node) { throw new Error('`' + optionName + '` did not return a node'); } } return node; } function getInitialFocusNode() { var node; if (getNodeForOption('initialFocus') !== null) { node = getNodeForOption('initialFocus'); } else if (container.contains(doc.activeElement)) { node = doc.activeElement; } else { node = state.firstTabbableNode || getNodeForOption('fallbackFocus'); } if (!node) { throw new Error('Your focus-trap needs to have at least one focusable element'); } return node; } function getReturnFocusNode(previousActiveElement) { var node = getNodeForOption('setReturnFocus'); return node ? node : previousActiveElement; } // This needs to be done on mousedown and touchstart instead of click // so that it precedes the focus event. function checkPointerDown(e) { if (containerContains(e.target)) return; if (config.clickOutsideDeactivates) { deactivate({ returnFocus: !tabbable.isFocusable(e.target) }); return; } // This is needed for mobile devices. // (If we'll only let `click` events through, // then on mobile they will be blocked anyways if `touchstart` is blocked.) if (config.allowOutsideClick && config.allowOutsideClick(e)) { return; } e.preventDefault(); } // In case focus escapes the trap for some strange reason, pull it back in. function checkFocusIn(e) { // In Firefox when you Tab out of an iframe the Document is briefly focused. if (containerContains(e.target) || e.target instanceof Document) { return; } e.stopImmediatePropagation(); tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode()); } function checkKey(e) { if (config.escapeDeactivates !== false && isEscapeEvent(e)) { e.preventDefault(); deactivate(); return; } if (isTabEvent(e)) { checkTab(e); return; } } // Hijack Tab events on the first and last focusable nodes of the trap, // in order to prevent focus from escaping. If it escapes for even a // moment it can end up scrolling the page and causing confusion so we // kind of need to capture the action at the keydown phase. function checkTab(e) { updateTabbableNodes(); if (e.shiftKey && e.target === state.firstTabbableNode) { e.preventDefault(); tryFocus(state.lastTabbableNode); return; } if (!e.shiftKey && e.target === state.lastTabbableNode) { e.preventDefault(); tryFocus(state.firstTabbableNode); return; } } function checkClick(e) { if (config.clickOutsideDeactivates) return; if (containerContains(e.target)) return; if (config.allowOutsideClick && config.allowOutsideClick(e)) { return; } e.preventDefault(); e.stopImmediatePropagation(); } function updateTabbableNodes() { var tabbableNodes = tabbable(container); state.firstTabbableNode = tabbableNodes[0] || getInitialFocusNode(); state.lastTabbableNode = tabbableNodes[tabbableNodes.length - 1] || getInitialFocusNode(); } function tryFocus(node) { if (node === doc.activeElement) return; if (!node || !node.focus) { tryFocus(getInitialFocusNode()); return; } node.focus({ preventScroll: userOptions.preventScroll }); state.mostRecentlyFocusedNode = node; if (isSelectableInput(node)) { node.select(); } } } function isSelectableInput(node) { return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function'; } function isEscapeEvent(e) { return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27; } function isTabEvent(e) { return e.key === 'Tab' || e.keyCode === 9; } function delay(fn) { return window.setTimeout(fn, 0); } function isFocusableElement(el) { // This isn't actually a great way of testing this, but we want to // preserve the original behavior while also satisfying TypeScript. return el.focus; } var ReactFocusTrap = /*#__PURE__*/function (_React$Component) { _inherits(ReactFocusTrap, _React$Component); var _super = _createSuper(ReactFocusTrap); function ReactFocusTrap(props) { var _this; _classCallCheck(this, ReactFocusTrap); _this = _super.call(this, props); _this.setFocusTrapElement = function (element) { _this.focusTrapElement = element; }; if (typeof document !== 'undefined') { _this.previouslyFocusedElement = document.activeElement; } return _this; } _createClass(ReactFocusTrap, [{ key: "componentDidMount", value: function componentDidMount() { // We need to hijack the returnFocusOnDeactivate option, // because React can move focus into the element before we arrived at // this lifecycle hook (e.g. with autoFocus inputs). So the component // captures the previouslyFocusedElement in componentWillMount, // then (optionally) returns focus to it in componentWillUnmount. var specifiedFocusTrapOptions = this.props.focusTrapOptions; var tailoredFocusTrapOptions = { returnFocusOnDeactivate: false }; for (var optionName in specifiedFocusTrapOptions) { if (!Object.prototype.hasOwnProperty.call(specifiedFocusTrapOptions, optionName)) continue; if (optionName === 'returnFocusOnDeactivate') continue; tailoredFocusTrapOptions[optionName] = specifiedFocusTrapOptions[optionName]; } // eslint-disable-next-line react/no-find-dom-node var focusTrapElementDOMNode = __WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.findDOMNode(this.focusTrapElement); if (!(focusTrapElementDOMNode instanceof HTMLElement)) { throw new Error('Focus trap element DOM node is not an HTML element!'); } this.focusTrap = this.props._createFocusTrap(focusTrapElementDOMNode, tailoredFocusTrapOptions); if (this.props.active) { this.focusTrap.activate(); } if (this.props.paused) { this.focusTrap.pause(); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (!this.focusTrap) { throw new Error('Assertion failure!'); } if (prevProps.active && !this.props.active) { var returnFocusOnDeactivate = this.props.focusTrapOptions.returnFocusOnDeactivate; var returnFocus = returnFocusOnDeactivate || false; var config = { returnFocus: returnFocus }; this.focusTrap.deactivate(config); } else if (!prevProps.active && this.props.active) { this.focusTrap.activate(); } if (prevProps.paused && !this.props.paused) { this.focusTrap.unpause(); } else if (!prevProps.paused && this.props.paused) { this.focusTrap.pause(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (!this.focusTrap) { throw new Error('Assertion failure!'); } this.focusTrap.deactivate(); if (this.props.focusTrapOptions.returnFocusOnDeactivate !== false && this.previouslyFocusedElement && isFocusableElement(this.previouslyFocusedElement)) { this.previouslyFocusedElement.focus(); } } }, { key: "render", value: function render() { var _this2 = this; var child = __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.only(this.props.children); var composedRefCallback = function composedRefCallback(element) { _this2.setFocusTrapElement(element); if (typeof child.ref === 'function') { child.ref(element); } }; var childWithRef = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.cloneElement(child, { ref: composedRefCallback }); return childWithRef; } }]); return ReactFocusTrap; }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component); ReactFocusTrap.defaultProps = { active: true, paused: false, focusTrapOptions: {}, _createFocusTrap: createFocusTrap }; function displace(WrappedComponent, optionalOptions) { var options = optionalOptions || {}; var Displaced = /*#__PURE__*/function (_React$Component) { _inherits(Displaced, _React$Component); var _super = _createSuper(Displaced); function Displaced() { _classCallCheck(this, Displaced); return _super.apply(this, arguments); } _createClass(Displaced, [{ key: "componentDidMount", value: function componentDidMount() { this.container = function () { var renderTo = options.renderTo; if (!renderTo) { var result = document.createElement('div'); document.body.appendChild(result); return result; } else if (typeof renderTo === 'string') { var el = document.querySelector(renderTo); if (!el) { throw new Error("No element matches \"".concat(renderTo, "\"!")); } return el; } else { return renderTo; } }(); this.forceUpdate(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (!options.renderTo && this.container && this.container.parentNode) { this.container.parentNode.removeChild(this.container); } } }, { key: "render", value: function render() { if (this.props.mounted === false) return null; if (this.container) { return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.createPortal( /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(WrappedComponent, this.props, this.props.children), this.container); } return false; } }]); return Displaced; }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component); return Displaced; } var Modal$1 = /*#__PURE__*/function (_React$Component) { _inherits(Modal, _React$Component); var _super = _createSuper(Modal); function Modal(props) { var _this; _classCallCheck(this, Modal); _this = _super.call(this, props); _defineProperty(_assertThisInitialized(_this), "clearTimer", function () { var _this$timeout; (_this$timeout = _this.timeout) === null || _this$timeout === void 0 ? void 0 : _this$timeout.forEach(function (timer) { clearTimeout(timer); }); }); _this.getApplicationNode = function () { if (_this.props.getApplicationNode) return _this.props.getApplicationNode(); return _this.props.applicationNode; }; _this.checkUnderlayClick = function (event) { if (_this.dialogNode && event.target instanceof Node && _this.dialogNode.contains(event.target) || // If the click is on the scrollbar we don't want to close the modal. event.target instanceof Element && event.target.ownerDocument && (event.pageX > event.target.ownerDocument.documentElement.offsetWidth || event.pageY > event.target.ownerDocument.documentElement.offsetHeight)) return; _this.exit(event); }; _this.checkDocumentKeyDown = function (event) { if (_this.props.escapeExits && (event.key === 'Escape' || event.key === 'Esc' || event.keyCode === 27)) { _this.exit(event); } }; _this.exit = function (event) { if (_this.props.onExit) { _this.props.onExit(event); } }; if (!_this.props.titleText && !_this.props.titleId) { throw new Error('react-aria-modal instances should have a `titleText` or `titleId`'); } _this.timeout = []; return _this; } _createClass(Modal, [{ key: "componentDidMount", value: function componentDidMount() { if (this.props.onEnter) { this.props.onEnter(); } // Timeout to ensure this happens *after* focus has moved var applicationNode = this.getApplicationNode(); this.timeout.push(setTimeout(function () { if (applicationNode && applicationNode instanceof Element) { applicationNode.setAttribute("aria-hidden", "true"); } }, 0)); if (this.props.escapeExits) { this.timeout.push(this.addKeyDownListener()); } if (this.props.scrollDisabled) { on(); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (prevProps.scrollDisabled && !this.props.scrollDisabled) { off(); } else if (!prevProps.scrollDisabled && this.props.scrollDisabled) { on(); } if (this.props.escapeExits && !prevProps.escapeExits) { this.timeout.push(this.addKeyDownListener()); } else if (!this.props.escapeExits && prevProps.escapeExits) { this.timeout.push(this.removeKeyDownListener()); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.props.scrollDisabled) { off(); } var applicationNode = this.getApplicationNode(); if (applicationNode && applicationNode instanceof Element) { applicationNode.setAttribute('aria-hidden', 'false'); } this.timeout.push(this.removeKeyDownListener()); this.clearTimer(); } }, { key: "addKeyDownListener", value: function addKeyDownListener() { var _this2 = this; return setTimeout(function () { document.addEventListener("keydown", _this2.checkDocumentKeyDown); }); } }, { key: "removeKeyDownListener", value: function removeKeyDownListener() { var _this3 = this; return setTimeout(function () { document.removeEventListener("keydown", _this3.checkDocumentKeyDown); }); } }, { key: "render", value: function render() { var _this4 = this; var props = this.props; var style = {}; // @edited // if (props.includeDefaultStyles) { // style = { // position: "fixed", // top: 0, // left: 0, // width: "100%", // height: "100%", // zIndex: 1050, // overflowX: "hidden", // overflowY: "auto", // WebkitOverflowScrolling: "touch", // textAlign: "center" // }; // if (props.underlayColor) { // style.background = props.underlayColor; // } // if (props.underlayClickExits) { // style.cursor = "pointer"; // } // } if (props.underlayStyle) { for (var key in props.underlayStyle) { if (!Object.prototype.hasOwnProperty.call(props.underlayStyle, key)) continue; style[key] = props.underlayStyle[key]; } } var underlayProps = { className: props.underlayClass, style: style }; if (props.underlayClickExits) { underlayProps.onMouseDown = this.checkUnderlayClick; } for (var prop in this.props.underlayProps) { underlayProps[prop] = this.props.underlayProps[prop]; } var verticalCenterStyle = {}; // @edited // if (props.includeDefaultStyles) { // verticalCenterStyle = { // display: "inline-block", // height: "100%", // verticalAlign: "middle" // }; // } var dialogStyle = {}; // @edited // if (props.includeDefaultStyles) { // dialogStyle = { // display: "inline-block", // textAlign: "left", // top: 0, // maxWidth: "100%", // cursor: "default", // outline: props.focusDialog ? 0 : undefined // }; // if (props.verticallyCenter) { // dialogStyle.verticalAlign = "middle"; // dialogStyle.top = 0; // } // } if (props.dialogStyle) { for (var _key in props.dialogStyle) { if (!Object.prototype.hasOwnProperty.call(props.dialogStyle, _key)) continue; dialogStyle[_key] = props.dialogStyle[_key]; } } var dialogProps = { key: 'b', ref: function ref(el) { _this4.dialogNode = el; }, role: props.alert ? 'alertdialog' : 'dialog', id: props.dialogId, className: props.dialogClass, style: dialogStyle }; if (props.titleId) { dialogProps['aria-labelledby'] = props.titleId; } else if (props.titleText) { dialogProps['aria-label'] = props.titleText; } if (props.focusDialog) { dialogProps.tabIndex = -1; } // Apply data- and aria- attributes passed as props for (var _key2 in props) { if (/^(data-|aria-)/.test(_key2)) { dialogProps[_key2] = props[_key2]; } } var childrenArray = [/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', _objectSpread2({}, dialogProps), props.children)]; if (props.verticallyCenter) { childrenArray.unshift( /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { key: 'a', style: verticalCenterStyle })); } var focusTrapOptions = props.focusTrapOptions || {}; if (props.focusDialog || props.initialFocus) { focusTrapOptions.initialFocus = props.focusDialog ? "#".concat(this.props.dialogId) : props.initialFocus; } focusTrapOptions.escapeDeactivates = props.escapeExits; return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(ReactFocusTrap, { focusTrapOptions: focusTrapOptions, paused: props.focusTrapPaused }, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', _objectSpread2({}, underlayProps), childrenArray)); } }]); return Modal; }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component); Modal$1.defaultProps = { underlayProps: {}, dialogId: 'react-aria-modal-dialog', // @edited // underlayClickExits: true, escapeExits: true, // @edited // underlayColor: "rgba(0,0,0,0.5)", // includeDefaultStyles: true, focusTrapPaused: false, scrollDisabled: true }; var AriaModal = displace(Modal$1); AriaModal.renderTo = function (input) { return displace(Modal$1, { renderTo: input }); }; var _excluded = ["modalContent", "triggerContent"]; var Modal = function Modal(_ref) { var modalContent = _ref.modalContent, triggerContent = _ref.triggerContent, props = _objectWithoutProperties(_ref, _excluded); var _React$useState = __WEBPACK_IMPORTED_MODULE_0_react___default.a.useState(false), _React$useState2 = _slicedToArray(_React$useState, 2), isOpen = _React$useState2[0], setIsOpen = _React$useState2[1]; var _React$useState3 = __WEBPACK_IMPORTED_MODULE_0_react___default.a.useState(false), _React$useState4 = _slicedToArray(_React$useState3, 2), isClosing = _React$useState4[0], setIsClosing = _React$useState4[1]; // States for sliders. var _React$useState5 = __WEBPACK_IMPORTED_MODULE_0_react___default.a.useState(props.firstSlide), _React$useState6 = _slicedToArray(_React$useState5, 2), currentSlide = _React$useState6[0], setCurrentSlide = _React$useState6[1]; var _React$useState7 = __WEBPACK_IMPORTED_MODULE_0_react___default.a.useState(null), _React$useState8 = _slicedToArray(_React$useState7, 2), slideDirection = _React$useState8[0], setSlideDirection = _React$useState8[1]; __WEBPACK_IMPORTED_MODULE_0_react___default.a.useEffect(function () { if (!props.dialogId) { throw new Error('SUI Modal instances should have a `dialogId`'); } }, [props.dialogId]); var isSlider = 'object' === _typeof(modalContent) && null !== modalContent; var openModal = function openModal() { return setIsOpen(true); }; var closeModal = function closeModal() { // Close the modal with the exit animation and reset the slider. setIsClosing(true); setTimeout(function () { setIsOpen(false); setIsClosing(false); if (isSlider) { setSlideDirection(null); setCurrentSlide(props.firstSlide); } }, 300); }; var slideTo = function slideTo(slide) { var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'left'; setCurrentSlide(slide); setSlideDirection(direction); }; var _props$getApplication = props.getApplicationNode, getApplicationNode = _props$getApplication === void 0 ? function () { return document.getElementsByClassName('sui-wrap')[0]; } : _props$getApplication; var dialogClass = "sui-modal-content sui-content-".concat(isClosing ? 'fade-out' : 'fade-in', " ").concat(props.dialogClass || ''); var renderContent, modalSize, initialFocus; if (!isSlider) { // Not a slider, we can just render the content. renderContent = modalContent; modalSize = props.size; initialFocus = props.initialFocus || false; } else { // Render the content from the given slides. renderContent = modalContent[currentSlide].render; initialFocus = modalContent[currentSlide].focus || false; modalSize = modalContent[currentSlide].size; // Add the slide direction class when provided and we're not closing the modal. if (slideDirection && !isClosing) { dialogClass += "sui-modal-slide sui-active sui-fadein-".concat(slideDirection); } } // Use 'isOpen' as an alias of 'mounted' if not defined. if ('undefined' === typeof props.mounted) { props.mounted = isOpen; } var wrapper = !props.renderToNode ? '.sui-wrap' : props.renderToNode; var AltModal = wrapper ? AriaModal.renderTo(wrapper) : AriaModal; return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Fragment, null, /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(AltModal, _extends({ getApplicationNode: getApplicationNode, dialogClass: dialogClass, underlayClass: "sui-modal sui-modal-".concat(modalSize || 'md', " sui-active ").concat(props.underlayClass || ''), includeDefaultStyle: false, initialFocus: initialFocus }, props), renderContent({ closeModal: closeModal, slideTo: slideTo })), triggerContent && triggerContent({ openModal: openModal })); }; /***/ }), /* 616 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _reactButtonIcon = __webpack_require__(21); var _wpEditor = __webpack_require__(31); var _wpEditor2 = _interopRequireDefault(_wpEditor); var _accordion = __webpack_require__(34); var _accordion2 = _interopRequireDefault(_accordion); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var InvoiceInfo = function (_Component) { _inherits(InvoiceInfo, _Component); function InvoiceInfo(props) { _classCallCheck(this, InvoiceInfo); var _this = _possibleConstructorReturn(this, (InvoiceInfo.__proto__ || Object.getPrototypeOf(InvoiceInfo)).call(this, props)); _this.contentTypes = _react2.default.createRef(); _this.saveReceiptInfo = _this.saveReceiptInfo.bind(_this); _this.updateProperty = _this.updateProperty.bind(_this); _this.state = { payeeInfo: !_.isEmpty(_this.props.state.payeeInfo) ? _this.props.state.payeeInfo : '', payerInfo: !_.isEmpty(_this.props.state.payerInfo) ? _this.props.state.payerInfo : '', paymentNote: !_.isEmpty(_this.props.state.paymentNote) ? _this.props.state.paymentNote : '' }; return _this; } // Make it possible to update state from child components _createClass(InvoiceInfo, [{ key: 'updateProperty', value: function updateProperty(slug, value) { this.setState(_defineProperty({}, slug, value)); } }, { key: 'getOptions', value: function getOptions() { var options = []; var fields = (0, _utils.getFields)(this.props.wrappers); fields.map(function (field) { options.push({ value: '{' + field.element_id + '}', label: field.label }); }); return options; } }, { key: 'saveReceiptInfo', value: function saveReceiptInfo() { this.props.updateProperty('payeeInfo', this.state.payeeInfo); this.props.updateProperty('payerInfo', this.state.payerInfo); this.props.updateProperty('paymentNote', this.state.paymentNote); // Slide to loading state. this.props.slideTo('pdfLoadingSlide', 'right'); } }, { key: 'getFieldElementId', value: function getFieldElementId(type) { var fieldsByType = (0, _utils.getFieldsByType)(type, this.props.wrappers); var elementId = ''; fieldsByType.map(function (field, index) { if (0 === index) { elementId = '{' + field.element_id + '}'; } }); return elementId; } }, { key: 'render', value: function render() { var _this2 = this; var _props = this.props, closeModal = _props.closeModal, slideTo = _props.slideTo; var siteInfoTags = { site_title: (0, _utils.translate)('Site Title'), site_url: (0, _utils.translate)('Site URL'), date_dmy: (0, _utils.translate)('Date') }, nameSlug = this.getFieldElementId('name'), emailSlug = this.getFieldElementId('email'), addressSlug = this.getFieldElementId('address'); var modifiedVars = {}; _.assign(modifiedVars, forminatorData.variables); return _react2.default.createElement( 'div', { className: 'sui-box', style: { marginBottom: 0 } }, _react2.default.createElement( 'div', { className: 'sui-box-header sui-flatten sui-content-center sui-spacing-top--60' }, _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement(_reactButtonIcon.ButtonIcon, { icon: 'close', iconSize: 'md', label: (0, _utils.translate)('Close this dialog window'), className: 'sui-button-float--right forminator-pdf-create-close', onClick: closeModal }) ), _react2.default.createElement( 'h2', { id: 'forminator-pdf-modal__title', className: 'sui-box-title sui-lg' }, (0, _utils.translate)('Payee and Payer Details') ), _react2.default.createElement( 'p', { id: 'forminator-settings__description', className: 'sui-description' }, (0, _utils.translate)('Enter the payee and payer details ' + 'for your receipt. You can insert merge tags ' + 'or manually enter the details below. ' + 'The details can later be changed in the ' + 'PDF editor.') ) ), _react2.default.createElement( 'div', { className: 'sui-accordion sui-accordion-flushed', style: { marginTop: '30px' } }, _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Payee details'), expanded: true, defaultContentRender: true }), _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { extraId: 'payee-info', settings: this.props.state, boxClass: 'sui-tab-boxed', property: 'payeeInfo', disableMiscData: false, editorOptions: modifiedVars, allowRepeater: false, excludeSubFields: true, enableFormData: true, enableAllFormFields: false, enableAllNonFormFields: false, enablePostData: false, enableUpload: 'true', allowButtonOnclick: 'true', enableParentForm: 'true', mainOptionsLabel: (0, _utils.translate)('Site Information'), mainOptions: siteInfoTags, paymentOptions: forminatorData.payment_variables, label: (0, _utils.translate)('Payee details'), updateProperty: this.updateProperty, selectLabel: (0, _utils.translate)('Insert dynamic data'), tooltipLabel: (0, _utils.translate)('Add dynamic data'), defaultValue: '<strong>' + (0, _utils.translate)('Company:') + '</strong> {site_title}<br>' + ('<strong>' + (0, _utils.translate)('Address:') + '</strong> ' + addressSlug + '<br>') + ('<strong>' + (0, _utils.translate)('Invoice No:') + '</strong> INV-{date_dmy}-{submission_id}') })) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Payer details'), defaultContentRender: true }), _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { extraId: 'payer-info', settings: this.props.state, boxClass: 'sui-tab-boxed', property: 'payerInfo', disableMiscData: false, editorOptions: modifiedVars, allowRepeater: false, excludeSubFields: true, enableFormData: true, enablePostData: false, enableUpload: 'true', allowButtonOnclick: 'true', enableParentForm: 'true', mainOptions: siteInfoTags, paymentOptions: forminatorData.payment_variables, label: (0, _utils.translate)('Payer details'), updateProperty: this.updateProperty, selectLabel: (0, _utils.translate)('Insert dynamic data'), tooltipLabel: (0, _utils.translate)('Add dynamic data'), defaultValue: '<strong>' + (0, _utils.translate)('Name / Company:') + '</strong> ' + nameSlug + '<br>' + ('<strong>' + (0, _utils.translate)('Address:') + '</strong> ' + addressSlug + '<br>') + ('<strong>' + (0, _utils.translate)('Email:') + '</strong> ' + emailSlug + '<br>') + ('<strong>' + (0, _utils.translate)('Date:') + '</strong> {date_dmy}') })) ), _react2.default.createElement( _accordion2.default, _extends({}, this.props, { label: (0, _utils.translate)('Payment note or other instructions (Optional)') }), _react2.default.createElement(_wpEditor2.default, _extends({}, this.props, { extraId: 'payment-note', settings: this.props.state, boxClass: 'sui-tab-boxed', property: 'paymentNote', disableMiscData: false, editorOptions: modifiedVars, allowRepeater: false, excludeSubFields: true, enableFormData: true, enablePostData: false, enableUpload: 'true', allowButtonOnclick: 'true', enableParentForm: 'true', mainOptions: siteInfoTags, paymentOptions: forminatorData.payment_variables, label: (0, _utils.translate)('Payment note or other instructions (Optional)'), updateProperty: this.updateProperty, selectLabel: (0, _utils.translate)('Insert dynamic data'), tooltipLabel: (0, _utils.translate)('Add dynamic data') })) ) ), _react2.default.createElement( 'div', { className: 'sui-box-footer' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-ghost', onClick: function onClick() { return slideTo('pdfChooseTemplateSlide', 'left'); } }, (0, _utils.translate)('Back') ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-blue pdf-btn-next', onClick: function onClick(e) { return _this2.saveReceiptInfo(e); } }, _react2.default.createElement( 'span', { className: 'sui-loading-text' }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Create') ), _react2.default.createElement('i', { className: 'sui-icon-loader sui-loading', 'aria-hidden': 'true' }) ) ) ) ); } }]); return InvoiceInfo; }(_react.Component); exports.default = InvoiceInfo; /***/ }), /* 617 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _reactRedux = __webpack_require__(11); var _redux = __webpack_require__(12); var _notification = __webpack_require__(212); var notificationsActions = _interopRequireWildcard(_notification); var _modal = __webpack_require__(62); var modalActions = _interopRequireWildcard(_modal); var _notifications = __webpack_require__(618); var _notifications2 = _interopRequireDefault(_notifications); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function mapStateToProps(state) { return { settings: state.settings, wrappers: state.wrappers, notifications: state.notifications }; } function mapDispatchToProps(dispatch) { return { actions: { notificationsActions: (0, _redux.bindActionCreators)(notificationsActions, dispatch), modalActions: (0, _redux.bindActionCreators)(modalActions, dispatch) } }; } exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_notifications2.default); /***/ }), /* 618 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _notifications = __webpack_require__(619); var _notifications2 = _interopRequireDefault(_notifications); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Notifications = function (_Component) { _inherits(Notifications, _Component); function Notifications(props) { _classCallCheck(this, Notifications); return _possibleConstructorReturn(this, (Notifications.__proto__ || Object.getPrototypeOf(Notifications)).call(this, props)); } _createClass(Notifications, [{ key: 'componentDidMount', value: function componentDidMount() { jQuery('html, body').animate({ scrollTop: 0 }, 'fast'); } }, { key: 'render', value: function render() { var _this2 = this; var goToSection = function goToSection(module) { _this2.props.router.navigate('/' + module); }; return _react2.default.createElement( 'div', { id: 'forminator-form-notifications', className: 'sui-box' }, _react2.default.createElement( 'div', { className: 'sui-box-header' }, _react2.default.createElement( 'h2', { className: 'sui-box-title' }, (0, _utils.translate)('Email Notifications') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'p', { className: 'sui-description' }, (0, _utils.translate)('You can send customized email notifications to your site admins ' + 'and visitors on successful form submission. Advanced features ' + 'like email routing and conditional emails provide granular ' + 'control over the email notifications.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement(_notifications2.default, this.props) ), _react2.default.createElement( 'div', { className: 'sui-box-footer' }, _react2.default.createElement( 'button', { className: 'sui-button', onClick: function onClick() { return goToSection('pdf'); } }, _react2.default.createElement('i', { className: 'sui-icon-arrow-left', 'aria-hidden': 'true' }), (0, _utils.translate)('PDF') ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-icon-right', onClick: function onClick() { return goToSection('integrations'); } }, (0, _utils.translate)('Integrations'), _react2.default.createElement('i', { className: 'sui-icon-arrow-right', 'aria-hidden': 'true' }) ) ) ) ); } }]); return Notifications; }(_react.Component); exports.default = (0, _withRouter.withRouter)(Notifications); /***/ }), /* 619 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _notification = __webpack_require__(620); var _notification2 = _interopRequireDefault(_notification); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Notifications = function (_Component) { _inherits(Notifications, _Component); function Notifications(props) { _classCallCheck(this, Notifications); var _this = _possibleConstructorReturn(this, (Notifications.__proto__ || Object.getPrototypeOf(Notifications)).call(this, props)); _this.addNotification = _this.addNotification.bind(_this); _this.closeModal = _this.closeModal.bind(_this); return _this; } _createClass(Notifications, [{ key: 'closeModal', value: function closeModal() { this.props.actions.modalActions.showModal({ open: false }, 'notification'); } }, { key: 'addNotification', value: function addNotification() { var newNotification = { slug: 'notification-' + (0, _utils.randNumber)() + '-' + (0, _utils.randNumber)() }; this.props.actions.modalActions.showModal({ open: true, new: true, notification: newNotification, field: this.props.field, notifications: this.props.notifications, closeModal: this.closeModal }, 'notification'); } }, { key: 'render', value: function render() { var _this2 = this; return _react2.default.createElement( 'div', { className: 'sui-box-builder sui-flushed', ref: function ref(el) { return _this2.el = el; } }, _react2.default.createElement( 'div', { className: 'sui-box-builder-body' }, this.props.notifications.length > 0 && _react2.default.createElement( 'div', { className: 'sui-builder-fields' }, _.map(this.props.notifications, function (notification, i) { return _react2.default.createElement(_notification2.default, _extends({ key: notification.slug, notification: notification }, _this2.props, { counter: i })); }) ), _react2.default.createElement( 'button', { className: 'sui-button sui-button-dashed', onClick: this.addNotification }, _react2.default.createElement('i', { className: 'sui-icon-plus', 'aria-hidden': 'true' }), (0, _utils.translate)('Add Email Notification') ) ) ); } }]); return Notifications; }(_react.Component); exports.default = Notifications; /***/ }), /* 620 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Notification = function (_Component) { _inherits(Notification, _Component); function Notification(props) { _classCallCheck(this, Notification); var _this = _possibleConstructorReturn(this, (Notification.__proto__ || Object.getPrototypeOf(Notification)).call(this, props)); _this.trashNotification = _this.trashNotification.bind(_this); _this.deleteNotification = _this.deleteNotification.bind(_this); _this.closeDeleteField = _this.closeDeleteField.bind(_this); _this.editModal = _this.editModal.bind(_this); _this.closeEditModal = _this.closeEditModal.bind(_this); _this.duplicateNotification = _this.duplicateNotification.bind(_this); return _this; } _createClass(Notification, [{ key: 'closeMenu', value: function closeMenu() { jQuery('.sui-dropdown').removeClass('open'); } }, { key: 'getNotificationsWithoutCurrent', value: function getNotificationsWithoutCurrent(notifications) { var _this2 = this; return notifications.filter(function (field) { return field.slug !== _this2.props.notification.slug; }); } }, { key: 'deleteNotification', value: function deleteNotification() { // Hide field settings menu this.closeMenu(); this.props.actions.modalActions.showModal({ open: true, notification: this.props.notification, closeModal: this.closeDeleteField, trashField: this.trashNotification }, 'deleteNotification'); } }, { key: 'closeDeleteField', value: function closeDeleteField() { this.props.actions.modalActions.showModal({ open: false, notification: this.props.notification, closeModal: this.closeDeleteField, trashField: this.trashNotification }, 'deleteNotification'); } }, { key: 'trashNotification', value: function trashNotification() { var notifications = [].concat(_toConsumableArray(this.props.notifications)); var notificationsObj = this.getNotificationsWithoutCurrent(notifications); // Hide field settings menu this.closeMenu(); // Update state this.props.actions.notificationsActions.updateNotifications(notificationsObj); } }, { key: 'closeEditModal', value: function closeEditModal() { this.props.actions.modalActions.showModal({ open: false }, 'notification'); } }, { key: 'editModal', value: function editModal() { this.props.actions.modalActions.showModal({ open: true, new: false, notification: this.props.notification, field: this.props.field, notifications: this.props.notifications, closeModal: this.closeEditModal }, 'notification'); } }, { key: 'duplicateNotification', value: function duplicateNotification() { var newNotification = Object.assign({}, this.props.notification); newNotification.slug = 'notification-' + (0, _utils.randNumber)() + '-' + (0, _utils.randNumber)(); var newState = [].concat(_toConsumableArray(this.props.notifications), [newNotification]); this.props.actions.notificationsActions.updateNotifications(newState); } }, { key: 'conditionMarkup', value: function conditionMarkup() { var mappedFields = (0, _utils.getFields)(this.props.wrappers); var actionLabel = this.props.notification.condition_action === 'hide' ? (0, _utils.translate)('Hide') : (0, _utils.translate)('Show'); // Condition does not exist, return if (_.isUndefined(this.props.notification.conditions)) { return; } // Get first condition var firstCondition = this.props.notification.conditions[0]; // Condition does not exist, return if (_.isUndefined(firstCondition)) { return; } // Get condition field data var conditionData = _.filter(mappedFields, function (field) { return field.element_id === firstCondition.element_id; }); // Condition field not exist ( could be deleted ), return if (_.isUndefined(conditionData)) { return; } // Bail if no label for condition data is found // Prevent error when time/date fields format changes. if (_.isUndefined(conditionData[0])) { return; } var fieldLabel = conditionData[0].label; var ruleLabel = (0, _utils.getRuleLabel)(firstCondition.rule, conditionData.field_type); var valueLabel = (0, _utils.getConditionLabel)(conditionData[0], firstCondition); var total = this.props.notification.conditions.length; var more = ''; if (total - 1 > 0) { more = '+ ' + (total - 1) + ' ' + (0, _utils.translate)('more condition(s)'); } return _react2.default.createElement( 'span', { className: 'fui-conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile', 'data-tooltip': actionLabel + ' ' + (0, _utils.translate)('if') + ' ' + fieldLabel + ' ' + ruleLabel + ' ' + valueLabel + ' ' + more, 'aria-hidden': 'true' }, _react2.default.createElement('i', { className: 'sui-icon-link sui-sm' }) ); } }, { key: 'render', value: function render() { var emailRecipient = ''; if (!_.isUndefined(this.props.notification['email-recipients']) && this.props.notification['email-recipients'] === 'routing') { emailRecipient = (0, _utils.translate)('Email routing is enabled'); } else { var emailDefault = ''; if (!_.isUndefined(this.props.notification['recipients']) && !_.isEmpty(this.props.notification['recipients'])) { var recipients = this.props.notification['recipients'].split(','); var total = recipients.length; if (total > 2) { emailDefault = recipients[0] + ', ' + recipients[1] + ' + ' + (total - 2) + ' ' + (0, _utils.translate)('more recipient(s)'); } else { emailDefault = this.props.notification['recipients']; } emailRecipient = emailDefault; } } var conditionData = this.conditionMarkup(); var saveAndContinueSlug = 'notification-0008-7000'; return _react2.default.createElement( 'div', { className: 'sui-builder-field sui-react sui-can_open' }, !_.isUndefined(this.props.notification.conditions) && this.props.notification.conditions.length > 0 && _react2.default.createElement( _react2.default.Fragment, null, conditionData ), _react2.default.createElement( 'div', { className: 'sui-field-info fui-notifications-info', onClick: this.editModal }, _react2.default.createElement( 'div', { className: 'sui-builder-field-label fui-notifications-label' }, _react2.default.createElement('i', { className: 'sui-icon-mail', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', null, this.props.notification.label ) ), _react2.default.createElement( 'div', { className: 'sui-builder-field-label fui-notifications-recipient' }, _react2.default.createElement( 'span', null, emailRecipient ) ) ), _react2.default.createElement( 'div', { className: 'sui-field-actions' }, _react2.default.createElement( 'div', { className: 'sui-dropdown' }, _react2.default.createElement( 'button', { className: 'sui-button-icon sui-dropdown-anchor' }, _react2.default.createElement('i', { className: 'sui-icon-widget-settings-config', 'aria-hidden': 'true' }), _react2.default.createElement( 'span', { className: 'sui-screen-reader-text' }, (0, _utils.translate)('Open field settings') ) ), _react2.default.createElement( 'ul', null, _react2.default.createElement( 'li', null, _react2.default.createElement( 'button', { onClick: this.editModal }, _react2.default.createElement('i', { className: 'sui-icon-pencil', 'aria-hidden': 'true' }), (0, _utils.translate)('Edit') ) ), saveAndContinueSlug !== this.props.notification['slug'] && _react2.default.createElement( _react2.default.Fragment, null, _react2.default.createElement( 'li', null, _react2.default.createElement( 'button', { onClick: this.duplicateNotification }, _react2.default.createElement('i', { className: 'sui-icon-copy', 'aria-hidden': 'true' }), (0, _utils.translate)('Duplicate') ) ), _react2.default.createElement( 'li', null, _react2.default.createElement( 'button', { className: 'sui-option-red', onClick: this.deleteNotification }, _react2.default.createElement('i', { className: 'sui-icon-trash', 'aria-hidden': 'true' }), (0, _utils.translate)('Delete') ) ) ) ) ) ) ); } }]); return Notification; }(_react.Component); exports.default = Notification; /***/ }), /* 621 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _reactRedux = __webpack_require__(11); var _redux = __webpack_require__(12); var _modal = __webpack_require__(62); var modalActions = _interopRequireWildcard(_modal); var _integration = __webpack_require__(210); var integrationActions = _interopRequireWildcard(_integration); var _integrations = __webpack_require__(622); var _integrations2 = _interopRequireDefault(_integrations); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function mapDispatchToProps(dispatch) { return { actions: { integrationActions: (0, _redux.bindActionCreators)(integrationActions, dispatch), modalActions: (0, _redux.bindActionCreators)(modalActions, dispatch) } }; } function mapStateToProps(state) { return { integrationConditions: state.integrationConditions, wrappers: state.wrappers }; } exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_integrations2.default); /***/ }), /* 622 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _integrationsModal = __webpack_require__(175); var _integrationsModal2 = _interopRequireDefault(_integrationsModal); __webpack_require__(177); var _settingsRow = __webpack_require__(15); var _settingsRow2 = _interopRequireDefault(_settingsRow); var _reactButton = __webpack_require__(46); var _reactButton2 = _interopRequireDefault(_reactButton); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Integrations = function (_Component) { _inherits(Integrations, _Component); function Integrations(props) { _classCallCheck(this, Integrations); var _this = _possibleConstructorReturn(this, (Integrations.__proto__ || Object.getPrototypeOf(Integrations)).call(this, props)); _this.state = { loading: false, markup: '' }; _this.loadIntegrations = _this.loadIntegrations.bind(_this); _this.closeModal = _this.closeModal.bind(_this); _this.conditionMarkup = _this.conditionMarkup.bind(_this); return _this; } _createClass(Integrations, [{ key: 'componentDidUpdate', value: function componentDidUpdate() { if (!_.isEmpty(this.props.integrationConditions)) { this.conditionMarkup(); } } }, { key: 'componentDidMount', value: function componentDidMount() { this.mounted = true; this.loadIntegrations(); jQuery('html, body').animate({ scrollTop: 0 }, 'fast'); var self = this; window.jQuery('#forminator-form-appearance').on('click', '.conditions-integration', function () { var integrationId = jQuery(this).data('multi-id'); var integrationTitle = jQuery(this).data('title'); self.openConditionsModal(integrationId, integrationTitle); }); } }, { key: 'openConditionsModal', value: function openConditionsModal(integrationId, integrationTitle) { this.props.actions.modalActions.showModal({ open: true, integrationId: integrationId, integrationTitle: integrationTitle, field: this.props.field, conditions: this.props.integrationConditions, closeModal: this.closeModal }, 'integration'); } }, { key: 'closeModal', value: function closeModal() { this.props.actions.modalActions.showModal({ open: false }, 'integration'); } }, { key: 'conditionMarkup', value: function conditionMarkup() { var _this2 = this; var mappedFields = (0, _utils.getFields)(this.props.wrappers); Object.entries(this.props.integrationConditions).forEach(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), integrationId = _ref2[0], data = _ref2[1]; if (!jQuery('.fui-connected').length) { return; } var icon = jQuery('.fui-conditions[data-integration-id="' + integrationId + '"]'); if (!icon.length) { // Delete conditions as this integration was disconnected. delete _this2.props.integrationConditions[integrationId]; return; } icon.hide(); // Condition does not exist, return if (_.isUndefined(data.conditions)) { return; } // Get first condition var firstCondition = data.conditions[0]; // Condition does not exist, return if (_.isUndefined(firstCondition)) { return; } // Get condition field data var conditionData = _.filter(mappedFields, function (field) { return field.element_id === firstCondition.element_id; }); // Condition field not exist ( could be deleted ), return if (_.isUndefined(conditionData)) { return; } // Bail if no label for condition data is found // Prevent error when time/date fields format changes. if (_.isUndefined(conditionData[0])) { return; } var conditionAction = 'send' === data.condition_action || _.isUndefined(data.condition_action) ? (0, _utils.translate)('Send') : (0, _utils.translate)('Don\'t send'); var fieldLabel = conditionData[0].label; var ruleLabel = (0, _utils.getRuleLabel)(firstCondition.rule, conditionData.field_type); var valueLabel = (0, _utils.getConditionLabel)(conditionData[0], firstCondition); var total = data.conditions.length; var more = ''; if (total - 1 > 0) { more = '+ ' + (total - 1) + ' ' + (0, _utils.translate)('more condition(s)'); } var tooltip = conditionAction + ' ' + (0, _utils.translate)('data if') + ' ' + fieldLabel + ' ' + ruleLabel + ' ' + valueLabel + ' ' + more; icon.attr('data-tooltip', tooltip).show(); }); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.mounted = false; } }, { key: 'loadIntegrations', value: function loadIntegrations() { var _this3 = this; var formId = forminatorData.currentForm.settings.form_id; // check if form id exists, means its saved if (_.isUndefined(formId) || +formId <= 0) { return; } // Check if we already process ajax request if (this.state.loading) { // Ajax request in process, skip return; } this.setState({ markup: '', loading: true }); window.fetch(forminatorData.ajaxUrl, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8' }, body: 'action=forminator_addon_get_module_addons&_ajax_nonce=' + forminatorData.addonNonce + '&data[module_type]=form' + '&data[module_id]=' + formId }).then(function (response) { return response.json(); }).then(function (data) { if (data.success && _this3.mounted) { var self = _this3; _this3.setState({ markup: data.data.data }); setTimeout(function () { var $addons = window.jQuery('.form-integrations-wrapper'); $addons.ForminatorIntegrationsModal(); $addons.on('reload', function () { $addons.unbind(); self.loadIntegrations(); }); }, 10); // Set loading to false _this3.setState({ loading: false }); } }).catch(function (error) { console.log(error); }); } }, { key: 'render', value: function render() { var _this4 = this; var loading = this.state.loading; var markup = this.state.markup; var formId = forminatorData.currentForm.settings.form_id; var goToSection = function goToSection(module) { _this4.props.router.navigate('/' + module); }; var canManageIntegrations = (0, _utils.isTrue)(forminatorData.userPermissions['manage_forminator_integrations']) || (0, _utils.isTrue)(forminatorData.userPermissions['manage_options']); var content = ''; if (loading) { content = _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-loader sui-loading', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Fetching integration list…') ) ) ) ); } else if (_.isUndefined(formId) || +formId <= 0) { content = _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-notice-yellow sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('You need to save this form before using integrations.') ) ), _react2.default.createElement( 'div', { className: 'sui-notice-actions' }, _react2.default.createElement(_reactButton2.default, { label: (0, _utils.translate)('Try Again'), onClick: this.loadIntegrations }) ) ) ); } else { content = _react2.default.createElement('span', { className: 'form-integrations-wrapper', dangerouslySetInnerHTML: { __html: markup } }); } return _react2.default.createElement( 'div', { id: 'forminator-form-appearance', className: 'sui-box' }, _react2.default.createElement( 'div', { className: 'sui-box-header' }, _react2.default.createElement( 'h2', { className: 'sui-box-title' }, (0, _utils.translate)('Integrations') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( _settingsRow2.default, { label: (0, _utils.translate)('Applications'), description: (0, _utils.translate)('You can send this form\'s data to any of the connected third ' + 'party apps. Connect to more apps on the {{link}}Integrations{{/link}} page.', { components: { link: canManageIntegrations ? _react2.default.createElement('a', { href: forminatorData.integrationsUrl }) : _react2.default.createElement('b', null) } }) }, content ) ), _react2.default.createElement( 'div', { className: 'sui-box-footer' }, _react2.default.createElement( 'button', { className: 'sui-button', onClick: function onClick() { return goToSection('notifications'); } }, _react2.default.createElement('i', { className: 'sui-icon-arrow-left', 'aria-hidden': 'true' }), (0, _utils.translate)('Email Notifications') ), _react2.default.createElement( 'div', { className: 'sui-actions-right' }, _react2.default.createElement( 'button', { className: 'sui-button sui-button-icon-right', onClick: function onClick() { return goToSection('settings'); } }, (0, _utils.translate)('Settings'), _react2.default.createElement('i', { className: 'sui-icon-arrow-right', 'aria-hidden': 'true' }) ) ) ) ); } }]); return Integrations; }(_react.Component); exports.default = (0, _withRouter.withRouter)(Integrations); /***/ }), /* 623 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactRedux = __webpack_require__(11); var _redux = __webpack_require__(12); var _settings = __webpack_require__(113); var settingsActions = _interopRequireWildcard(_settings); var _modal = __webpack_require__(62); var modalActions = _interopRequireWildcard(_modal); var _settings2 = __webpack_require__(624); var _settings3 = _interopRequireDefault(_settings2); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function mapStateToProps(state) { return { settings: state.settings, formType: state.settings['form-type'] || 'default' }; } function mapDispatchToProps(dispatch) { return { actions: { settingsActions: (0, _redux.bindActionCreators)(settingsActions, dispatch), modalActions: (0, _redux.bindActionCreators)(modalActions, dispatch) } }; } exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_settings3.default); /***/ }), /* 624 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(1); var _toggle = __webpack_require__(22); var _toggle2 = _interopRequireDefault(_toggle); var _checkbox = __webpack_require__(41); var _checkbox2 = _interopRequireDefault(_checkbox); var _radioTabs = __webpack_require__(7); var _radioTabs2 = _interopRequireDefault(_radioTabs); var _container = __webpack_require__(3); var _container2 = _interopRequireDefault(_container); var _input = __webpack_require__(4); var _input2 = _interopRequireDefault(_input); var _suiSelect = __webpack_require__(16); var _suiSelect2 = _interopRequireDefault(_suiSelect); var _row = __webpack_require__(8); var _row2 = _interopRequireDefault(_row); var _col = __webpack_require__(5); var _col2 = _interopRequireDefault(_col); var _radio = __webpack_require__(19); var _radio2 = _interopRequireDefault(_radio); var _empty = __webpack_require__(10); var _empty2 = _interopRequireDefault(_empty); var _withRouter = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Settings = function (_Component) { _inherits(Settings, _Component); function Settings(props) { _classCallCheck(this, Settings); return _possibleConstructorReturn(this, (Settings.__proto__ || Object.getPrototypeOf(Settings)).call(this, props)); } _createClass(Settings, [{ key: 'componentDidMount', value: function componentDidMount() { jQuery('html, body').animate({ scrollTop: 0 }, 'fast'); } }, { key: 'render', value: function render() { var _this2 = this; var goToSection = function goToSection(module) { _this2.props.router.navigate('/' + module); }; var retainForever = _.isEmpty(forminatorData.retain_number) || forminatorData.retain_number === '0'; var retainDefault = _react2.default.createElement( _react2.default.Fragment, null, retainForever && _react2.default.createElement( _react2.default.Fragment, null, (0, _utils.translate)('forever') ), !retainForever && _react2.default.createElement( _react2.default.Fragment, null, forminatorData.retain_number, ' ', forminatorData.retain_unit ) ); var erasure = forminatorData.erasure ? (0, _utils.translate)('remove') : (0, _utils.translate)('retain'); var canManageSettings = (0, _utils.isTrue)(forminatorData.userPermissions['manage_forminator_settings']) || (0, _utils.isTrue)(forminatorData.userPermissions['manage_options']); var privacyLink = canManageSettings ? _react2.default.createElement( 'a', { href: forminatorData.settingsUrl + '§ion=submissions', target: '_blank' }, (0, _utils.translate)('global privacy settings.') ) : (0, _utils.translate)('global privacy settings.'); return _react2.default.createElement( 'div', { id: 'forminator-form-appearance', className: 'sui-box' }, _react2.default.createElement( 'div', { className: 'sui-box-header' }, _react2.default.createElement( 'h2', { className: 'sui-box-title' }, (0, _utils.translate)('Settings') ) ), _react2.default.createElement( 'div', { className: 'sui-box-body' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Data Storage') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('By default we will store all submissions in your database.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement(_toggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Store Submissions in Database'), property: 'store_submissions', description: (0, _utils.translate)('Disable this feature to prevent submissions from being stored in your database. ' + 'Note that any submissions previously stored in the database will be retained and automatically deleted ' + 'according to the retention schedule configured in the Privacy settings below.'), unWrap: true })) ) ), forminatorData.geolocation && _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('User’s Geolocation') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Enabling this option will attempt to collect and store users\' location information when this form is submitted.') ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( _toggle2.default, _extends({}, this.props, { label: (0, _utils.translate)('Enable current user’s Geolocation'), property: 'geolocation_field', unWrap: true }), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Enable the checkbox to make it mandatory for users to grant access to the location permission to submit this form.') ), _react2.default.createElement(_checkbox2.default, _extends({}, this.props, { label: (0, _utils.translate)('Require access to users\' location'), property: 'geolocation_field_required', itemClass: 'sui-checkbox-sm sui-checkbox-stacked' })), _react2.default.createElement(_input2.default, _extends({}, this.props, { label: (0, _utils.translate)('Error message'), placeholder: (0, _utils.translate)('Enter message'), property: 'require_geolocation_field', fieldClass: 'sui-margin-top' })) ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Multiple Option Value') ), _react2.default.createElement( 'span', { className: 'sui-description' }, _react2.default.createElement( 'div', null, (0, _utils.translate)('Choose how you want to handle multiple option values in form submissions and email notifications.') ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Default Stored Value') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('By default, we store option labels of multiple option fields (' + '{{strong}}e.g., Radio, Checkbox, and Select{{/strong}}' + ') in submissions, and use the same in email notifications.' + ' You can choose to use option values instead.', { components: { strong: _react2.default.createElement('strong', null) } }) ), _react2.default.createElement( 'div', { className: 'sui-side-tabs' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'print_value', 'default': 'false' }), _react2.default.createElement( _empty2.default, { value: 'false' }, (0, _utils.translate)('Option labels') ), _react2.default.createElement( _empty2.default, { value: 'true' }, (0, _utils.translate)('Option values') ) ) ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-row' }, _react2.default.createElement( 'div', { className: 'sui-box-settings-col-1' }, _react2.default.createElement( 'span', { className: 'sui-settings-label' }, (0, _utils.translate)('Privacy') ), _react2.default.createElement( 'span', { className: 'sui-description' }, _react2.default.createElement( 'div', null, (0, _utils.translate)('Choose how you want to handle this form\'s data storage.') ), _react2.default.createElement( 'div', null, (0, _utils.translate)('By default we will use the configuration you have set in your') ), _react2.default.createElement( 'div', null, privacyLink ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-settings-col-2' }, _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Submissions') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('How long do you want to retain this form\'s submissions for?') ), _react2.default.createElement( 'div', { className: 'sui-side-tabs' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { 'default': 'false', property: 'enable-submissions-retention' }), _react2.default.createElement( _container2.default, { value: 'false', label: (0, _utils.translate)('Use default') }, _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Your default setting value ' + 'is to keep the submissions'), ' ', retainDefault ) ) ) ) ), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'true', boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Custom') }), _react2.default.createElement( _row2.default, null, _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement(_input2.default, _extends({}, this.props, { type: 'number', placeholder: '10', property: 'submissions-retention-number' })) ), _react2.default.createElement( _col2.default, { cols: '6' }, _react2.default.createElement( _suiSelect2.default, _extends({}, this.props, { property: 'submissions-retention-unit', defaultValue: 'days' }), _react2.default.createElement( 'option', { value: 'days' }, (0, _utils.translate)('Days') ), _react2.default.createElement( 'option', { value: 'weeks' }, (0, _utils.translate)('Weeks') ), _react2.default.createElement( 'option', { value: 'months' }, (0, _utils.translate)('Months') ), _react2.default.createElement( 'option', { value: 'years' }, (0, _utils.translate)('Years') ) ) ) ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('Leave the field blank to retain submissions forever.') ) ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Account Erasure Requests') ), _react2.default.createElement( 'span', { className: 'sui-description', style: { marginBottom: '10px' } }, (0, _utils.translate)('When handling an account erasure request that ' + 'contains an email associated with a submission, ' + 'what do you want to do?') ), _react2.default.createElement( 'div', { className: 'sui-side-tabs' }, _react2.default.createElement( _radioTabs2.default, _extends({}, this.props, { property: 'enable-submissions-erasure', 'default': 'false' }), _react2.default.createElement( _container2.default, { value: 'false', label: (0, _utils.translate)('Use default') }, _react2.default.createElement( 'div', { role: 'alert', className: 'sui-notice sui-active', style: { display: 'block' }, 'aria-live': 'assertive' }, _react2.default.createElement( 'div', { className: 'sui-notice-content' }, _react2.default.createElement( 'div', { className: 'sui-notice-message' }, _react2.default.createElement('span', { className: 'sui-notice-icon sui-icon-info', 'aria-hidden': 'true' }), _react2.default.createElement( 'p', null, (0, _utils.translate)('Your default setting value is to '), ' ', erasure, ' ', (0, _utils.translate)(' the submission.') ) ) ) ) ), _react2.default.createElement( _container2.default, _extends({}, this.props, { value: 'true', boxClass: 'sui-tab-boxed', label: (0, _utils.translate)('Custom') }), _react2.default.createElement( _suiSelect2.default, _extends({ property: 'submission-erasure-remove', defaultValue: 'false' }, this.props), _react2.default.createElement( 'option', { value: 'false' }, (0, _utils.translate)('Retain Submissions') ), _react2.default.createElement( 'option', { value: 'true' }, (0, _utils.translate)('Remove Submissions') ) ) ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-form-field' }, _react2.default.createElement( 'label', { className: 'sui-settings-label' }, (0, _utils.translate)('Submission Files') ), _react2.default.createElement( 'span', { className: 'sui-description' }, (0, _utils.translate)('If your form has file upload field(s), choose whether ' + 'to delete the file(s) related to a submission when that ' + 'submission gets deleted.') ), _react2.default.createElement( _radio2.default, _extends({}, this.props, { property: 'submission-file', defaultValue: 'delete' }), _react2.default.createElement( 'div', { value: 'delete' }, (0, _utils.translate)('Delete') ), _react2.default.createElement( 'div', { value: 'keep' }, (0, _utils.translate)('Keep') ) ) ) ) ) ), _react2.default.createElement( 'div', { className: 'sui-box-footer' }, this.props.formType === 'leads' && _react2.default.createElement( 'button', { className: 'sui-button', onClick: function onClick() { return goToSection('behaviour'); } }, _react2.default.createElement('i', { className: 'sui-icon-arrow-left', 'aria-hidden': 'true' }), ' ', (0, _utils.translate)('Behavior') ), this.props.formType !== 'leads' && _react2.default.createElement( 'button', { className: 'sui-button', onClick: function onClick() { return goToSection('integrations'); } }, _react2.default.createElement('i', { className: 'sui-icon-arrow-left', 'aria-hidden': 'true' }), ' ', (0, _utils.translate)('Integrations') ) ) ); } }]); return Settings; }(_react.Component); exports.default = (0, _withRouter.withRouter)(Settings); /***/ }) /******/ ]); //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgODFlNmM2Zjg5ZjE3ODNiM2EwNWEiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL3JlYWN0L2luZGV4LmpzIiwid2VicGFjazovLy8uL3NyYy91dGlscy5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvcHJvY2Vzcy9icm93c2VyLmpzIiwid2VicGFjazovLy8uL3NyYy9zZXR0aW5ncy9jb250YWluZXJzL2NvbnRhaW5lci5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvc2V0dGluZ3MvaW5wdXRzL2lucHV0LmpzIiwid2VicGFjazovLy8uL3NyYy9zZXR0aW5ncy9jb250YWluZXJzL2NvbC5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvc2V0dGluZ3MvaW5wdXRzL2NvbG9yLXBpY2tlci5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvc2V0dGluZ3MvaW5wdXRzL3JhZGlvLXRhYnMuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3NldHRpbmdzL2NvbnRhaW5lcnMvcm93LmpzIiwid2VicGFjazovLy8uL3NyYy9zZXR0aW5ncy9jb250YWluZXJzL3RhYnMuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3NldHRpbmdzL2NvbnRhaW5lcnMvZW1wdHkuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL3JlYWN0LXJlZHV4L2Rpc3QvcmVhY3QtcmVkdXgubGVnYWN5LWVzbS5qcyIs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HJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSB7XG4gICAgICAgICAgICBjb25zdCB7XG4gICAgICAgICAgICAgIGlkZW50aXR5RnVuY3Rpb25DaGVjazogZmluYWxJZGVudGl0eUZ1bmN0aW9uQ2hlY2ssXG4gICAgICAgICAgICAgIHN0YWJpbGl0eUNoZWNrOiBmaW5hbFN0YWJpbGl0eUNoZWNrXG4gICAgICAgICAgICB9ID0gX19zcHJlYWRWYWx1ZXMoe1xuICAgICAgICAgICAgICBzdGFiaWxpdHlDaGVjayxcbiAgICAgICAgICAgICAgaWRlbnRpdHlGdW5jdGlvbkNoZWNrXG4gICAgICAgICAgICB9LCBkZXZNb2RlQ2hlY2tzKTtcbiAgICAgICAgICAgIGlmIChmaW5hbFN0YWJpbGl0eUNoZWNrID09PSBcImFsd2F5c1wiIHx8IGZpbmFsU3RhYmlsaXR5Q2hlY2sgPT09IFwib25jZVwiICYmIGZpcnN0UnVuLmN1cnJlbnQpIHtcbiAgICAgICAgICAgICAgY29uc3QgdG9Db21wYXJlID0gc2VsZWN0b3Ioc3RhdGUpO1xuICAgICAgICAgICAgICBpZiAoIWVxdWFsaXR5Rm4oc2VsZWN0ZWQsIHRvQ29tcGFyZSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgc3RhY2sgPSB2b2lkIDA7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigpO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgIDtcbiAgICAgICAgICAgICAgICAgICh7IHN0YWNrIH0gPSBlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc29sZS53YXJuKFxuICAgICAgICAgICAgICAgICAgXCJTZWxlY3RvciBcIiArIChzZWxlY3Rvci5uYW1lIHx8IFwidW5rbm93blwiKSArIFwiIHJldHVybmVkIGEgZGlmZmVyZW50IHJlc3VsdCB3aGVuIGNhbGxlZCB3aXRoIHRoZSBzYW1lIHBhcmFtZXRlcnMuIFRoaXMgY2FuIGxlYWQgdG8gdW5uZWNlc3NhcnkgcmVyZW5kZXJzLlxcblNlbGVjdG9ycyB0aGF0IHJldHVybiBhIG5ldyByZWZlcmVuY2UgKHN1Y2ggYXMgYW4gb2JqZWN0IG9yIGFuIGFycmF5KSBzaG91bGQgYmUgbWVtb2l6ZWQ6IGh0dHBzOi8vcmVkdXguanMub3JnL3VzYWdlL2Rlcml2aW5nLWRhdGEtc2VsZWN0b3JzI29wdGltaXppbmctc2VsZWN0b3JzLXdpdGgtbWVtb2l6YXRpb25cIixcbiAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhdGUsXG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkLFxuICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZDI6IHRvQ29tcGFyZSxcbiAgICAgICAgICAgICAgICAgICAgc3RhY2tcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZmluYWxJZGVudGl0eUZ1bmN0aW9uQ2hlY2sgPT09IFwiYWx3YXlzXCIgfHwgZmluYWxJZGVudGl0eUZ1bmN0aW9uQ2hlY2sgPT09IFwib25jZVwiICYmIGZpcnN0UnVuLmN1cnJlbnQpIHtcbiAgICAgICAgICAgICAgaWYgKHNlbGVjdGVkID09PSBzdGF0ZSkge1xuICAgICAgICAgICAgICAgIGxldCBzdGFjayA9IHZvaWQgMDtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgO1xuICAgICAgICAgICAgICAgICAgKHsgc3RhY2sgfSA9IGUpO1xuICAgICAgIC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AgICAgICAgICAgICAgLyogQF9fUFVSRV9fICovIFJlYWN0LmNyZWF0ZUVsZW1lbnQocHJvcHNDb250ZXh0LkNvbnN1bWVyLCBudWxsKVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmICghaXNWYWxpZCkge1xuICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAgICAgXCJZb3UgbXVzdCBwYXNzIGEgdmFsaWQgUmVhY3QgY29udGV4dCBjb25zdW1lciBhcyBgcHJvcHMuY29udGV4dGBcIlxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgUmVzdWx0Q29udGV4dCA9IHByb3BzQ29udGV4dDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIFJlc3VsdENvbnRleHQ7XG4gICAgICB9LCBbcHJvcHNDb250ZXh0LCBDb250ZXh0XSk7XG4gICAgICBjb25zdCBjb250ZXh0VmFsdWUgPSBSZWFjdC51c2VDb250ZXh0KENvbnRleHRUb1VzZSk7XG4gICAgICBjb25zdCBkaWRTdG9yZUNvbWVGcm9tUHJvcHMgPSBCb29sZWFuKHByb3BzLnN0b3JlKSAmJiBCb29sZWFuKHByb3BzLnN0b3JlLmdldFN0YXRlKSAmJiBCb29sZWFuKHByb3BzLnN0b3JlLmRpc3BhdGNoKTtcbiAgICAgIGNvbnN0IGRpZFN0b3JlQ29tZUZyb21Db250ZXh0ID0gQm9vbGVhbihjb250ZXh0VmFsdWUpICYmIEJvb2xlYW4oY29udGV4dFZhbHVlLnN0b3JlKTtcbiAgICAgIGlmIChwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gXCJwcm9kdWN0aW9uXCIgJiYgIWRpZFN0b3JlQ29tZUZyb21Qcm9wcyAmJiAhZGlkU3RvcmVDb21lRnJvbUNvbnRleHQpIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgIGBDb3VsZCBub3QgZmluZC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ICAgICAgICAgcmV0dXJuICgpID0+IHtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBzdWJzY3JpYmVVcGRhdGVzKFxuICAgICAgICAgICAgc2hvdWxkSGFuZGxlU3RhdGVDaGFuZ2VzLFxuICAgICAgICAgICAgc3RvcmUsXG4gICAgICAgICAgICBzdWJzY3JpcHRpb24sXG4gICAgICAgICAgICAvLyBAdHMtaWdub3JlXG4gICAgICAgICAgICBjaGlsZFByb3BzU2VsZWN0b3IsXG4gICAgICAgICAgICBsYXN0V3JhcHBlclByb3BzLFxuICAgICAgICAgICAgbGFzdENoaWxkUHJvcHMsXG4gICAgICAgICAgICByZW5kZXJJc1NjaGVkdWxlZCxcbiAgICAgICAgICAgIGlzTW91bnRlZCxcbiAgICAgICAgICAgIGNoaWxkUHJvcHNGcm9tU3RvcmVVcGRhdGUsXG4gICAgICAgICAgICBub3RpZnlOZXN0ZWRTdWJzLFxuICAgICAgICAgICAgcmVhY3RMaXN0ZW5lclxuICAgICAgICAgICk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBzdWJzY3JpYmU7XG4gICAgICB9LCBbc3Vic2NyaXB0aW9uXSk7XG4gICAgICB1c2VJc29tb3JwaGljTGF5b3V0RWZmZWN0V2l0aEFyZ3MoY2FwdHVyZVdyYXBwZXJQcm9wcywgW1xuICAgICAgICBsYXN0V3JhcHBlclByb3BzLFxuICAgICAgICBsYXN0Q2hpbGRQcm9wcyxcbiAgICAgICAgcmVuZGVySXNTY2hlZHVsZWQsXG4gICAgICAgIHdyYXBwZXJQcm9wcyxcbiAgICAgICAgY2hpbGRQcm9wc0Zyb21TdG9yZVVwZGF0ZSxcbiAgICAgICAgbm90aWZ5TmVzdGVkU3Vic1xuICAgICAgXSk7XG4gICAgICBsZXQgYWN0dWFsQ2hpbGRQcm9wcztcbiAgICAgIHRyeSB7XG4gICAgICAgIGFjdHVhbENoaWxkUHJvcHMgPSB1c2VTeW5jRXh0Z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gICBzaG9ydENpcmN1aXRlZDogdHJ1ZVxuICAgICAgICB9O1xuICAgICAgfSBlbHNlIGlmIChkaXNjb3ZlclJlc3VsdC50eXBlID09PSBcImVycm9yXCIpIHtcbiAgICAgICAgbGV0IHtcbiAgICAgICAgICBlcnJvcixcbiAgICAgICAgICBub3RGb3VuZE1hdGNoZXMsXG4gICAgICAgICAgcm91dGVcbiAgICAgICAgfSA9IGhhbmRsZURpc2NvdmVyUm91dGVFcnJvcihsb2NhdGlvbi5wYXRobmFtZSwgZGlzY292ZXJSZXN1bHQpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIG1hdGNoZXM6IG5vdEZvdW5kTWF0Y2hlcyxcbiAgICAgICAgICBsb2FkZXJEYXRhOiB7fSxcbiAgICAgICAgICBlcnJvcnM6IHtcbiAgICAgICAgICAgIFtyb3V0ZS5pZF06IGVycm9yXG4gICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgfSBlbHNlIGlmICghZGlzY292ZXJSZXN1bHQubWF0Y2hlcykge1xuICAgICAgICBsZXQge1xuICAgICAgICAgIGVycm9yLFxuICAgICAgICAgIG5vdEZvdW5kTWF0Y2hlcyxcbiAgICAgICAgICByb3V0ZVxuICAgICAgICB9ID0gaGFuZGxlTmF2aWdhdGlvbmFsNDA0KGxvY2F0aW9uLnBhdGhuYW1lKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBtYXRjaGVzOiBub3RGb3VuZE1hdGNoZXMsXG4gICAgICAgICAgbG9hZGVyRGF0YToge30sXG4gICAgICAgICAgZXJyb3JzOiB7XG4gICAgICAgICAgICBbcm91dGUuaWRdOiBlcnJvclxuICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIG1hdGNoZXMgPSBkaXNjb3ZlclJlc3VsdC5tYXRjaGVzO1xuICAgICAgfVxuICAgIH1cbiAgICBsZXQgcm91dGVzVG9Vc2UgPSBpbkZsaWdodERhdGFSb3V0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GxldCBbbmFtZSwgdmFsdWVdID0gX3JlZjU7XG4gICAgICAgIHJldHVybiBcIlwiICsgYWNjICsgbmFtZSArIFwiPVwiICsgdmFsdWUgKyBcIlxcblwiO1xuICAgICAgfSwgXCJcIikgOiBTdHJpbmcob3B0cy5ib2R5KTtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHBhdGgsXG4gICAgICAgIHN1Ym1pc3Npb246IHtcbiAgICAgICAgICBmb3JtTWV0aG9kLFxuICAgICAgICAgIGZvcm1BY3Rpb24sXG4gICAgICAgICAgZm9ybUVuY1R5cGU6IG9wdHMuZm9ybUVuY1R5cGUsXG4gICAgICAgICAgZm9ybURhdGE6IHVuZGVmaW5lZCxcbiAgICAgICAgICBqc29uOiB1bmRlZmluZWQsXG4gICAgICAgICAgdGV4dFxuICAgICAgICB9XG4gICAgICB9O1xuICAgIH0gZWxzZSBpZiAob3B0cy5mb3JtRW5jVHlwZSA9PT0gXCJhcHBsaWNhdGlvbi9qc29uXCIpIHtcbiAgICAgIC8vIGpzb24gb25seSBzdXBwb3J0cyBQT1NUL1BVVC9QQVRDSC9ERUxFVEUgc3VibWlzc2lvbnNcbiAgICAgIGlmICghaXNNdXRhdGlvbk1ldGhvZChmb3JtTWV0aG9kKSkge1xuICAgICAgICByZXR1cm4gZ2V0SW52YWxpZEJvZHlFcnJvcigpO1xuICAgICAgfVxuICAgICAgdHJ5IHtcbiAgICAgICAgbGV0IGpzb24gPSB0eXBlb2Ygb3B0cy5ib2R5ID09PSBcInN0cmluZ1wiID8gSlNPTi5wYXJzZShvcHRzLmJvZHkpIDogb3B0cy5ib2R5O1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHBhdGgsXG4gICAgICAgICAgc3VibWlzc2lvbjoge1xuICAgICAgICAgICAgZm9ybU1ldGhvZCxcbiAgICAgICAgICAgIGZvcm1BY3Rpb24sXG4gICAgICAgICAgICBmb3JtRW5jVHlwZTogb3B0cy5mb3JtRW5jVHlwZSxcbiAgICAgICAg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srKSB7XG4gICAgICAgIHZhciBjID0gbXNnLmNoYXJDb2RlQXQoaSk7XG4gICAgICAgIGlmIChjIDwgMTI4KSB7XG4gICAgICAgICAgcmVzW3ArK10gPSBjO1xuICAgICAgICB9IGVsc2UgaWYgKGMgPCAyMDQ4KSB7XG4gICAgICAgICAgcmVzW3ArK10gPSAoYyA+PiA2KSB8IDE5MjtcbiAgICAgICAgICByZXNbcCsrXSA9IChjICYgNjMpIHwgMTI4O1xuICAgICAgICB9IGVsc2UgaWYgKGlzU3Vycm9nYXRlUGFpcihtc2csIGkpKSB7XG4gICAgICAgICAgYyA9IDB4MTAwMDAgKyAoKGMgJiAweDAzRkYpIDw8IDEwKSArIChtc2cuY2hhckNvZGVBdCgrK2kpICYgMHgwM0ZGKTtcbiAgICAgICAgICByZXNbcCsrXSA9IChjID4+IDE4KSB8IDI0MDtcbiAgICAgICAgICByZXNbcCsrXSA9ICgoYyA+PiAxMikgJiA2MykgfCAxMjg7XG4gICAgICAgICAgcmVzW3ArK10gPSAoKGMgPj4gNikgJiA2MykgfCAxMjg7XG4gICAgICAgICAgcmVzW3ArK10gPSAoYyAmIDYzKSB8IDEyODtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXNbcCsrXSA9IChjID4+IDEyKSB8IDIyNDtcbiAgICAgICAgICByZXNbcCsrXSA9ICgoYyA+PiA2KSAmIDYzKSB8IDEyODtcbiAgICAgICAgICByZXNbcCsrXSA9IChjICYgNjMpIHwgMTI4O1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfSBlbHNlIGlmIChlbmMgPT09ICdoZXgnKSB7XG4gICAgICBtc2cgPSBtc2cucmVwbGFjZSgvW15hLXowLTldKy9pZywgJycpO1xuICAgICAgaWYgKG1zZy5sZW5ndGggJSAyICE9PSAwKVxuICAgICAgICBtc2cgPSAnMCcgKyBtc2c7XG4gICAgICBmb3IgKGkgPSAwOyBpIDwgbXNnLmxlbmd0aDsgaSArPSAyKVxuICAgICAgICByZXMucH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m9wVHlwZXMuZnVuY3Rpb25gIGluc3RlYWQgb2YgYFByb3BUeXBlcy5mdW5jYC4nXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgZXJyLm5hbWUgPSAnSW52YXJpYW50IFZpb2xhdGlvbic7XG4gICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgfVxuICAgICAgICAgIGVycm9yID0gdHlwZVNwZWNzW3R5cGVTcGVjTmFtZV0odmFsdWVzLCB0eXBlU3BlY05hbWUsIGNvbXBvbmVudE5hbWUsIGxvY2F0aW9uLCBudWxsLCBSZWFjdFByb3BUeXBlc1NlY3JldCk7XG4gICAgICAgIH0gY2F0Y2ggKGV4KSB7XG4gICAgICAgICAgZXJyb3IgPSBleDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoZXJyb3IgJiYgIShlcnJvciBpbnN0YW5jZW9mIEVycm9yKSkge1xuICAgICAgICAgIHByaW50V2FybmluZyhcbiAgICAgICAgICAgIChjb21wb25lbnROYW1lIHx8ICdSZWFjdCBjbGFzcycpICsgJzogdHlwZSBzcGVjaWZpY2F0aW9uIG9mICcgK1xuICAgICAgICAgICAgbG9jYXRpb24gKyAnIGAnICsgdHlwZVNwZWNOYW1lICsgJ2AgaXMgaW52YWxpZDsgdGhlIHR5cGUgY2hlY2tlciAnICtcbiAgICAgICAgICAgICdmdW5jdGlvbiBtdXN0IHJldHVybiBgbnVsbGAgb3IgYW4gYEVycm9yYCBidXQgcmV0dXJuZWQgYSAnICsgdHlwZW9mIGVycm9yICsgJy4gJyArXG4gICAgICAgICAgICAnWW91IG1heSBoYXZlIGZvcmdvdHRlbiB0byBwYXNzIGFuIGFyZ3VtZW50IHRvIHRoZSB0eXBlIGNoZWNrZXIgJyArXG4gICAgICAgICAgICAnY3JlYXRvciAoYXJyYXlPZiwgaW5zdGFuY2VPZiwgb2JqZWN0T2YsIG9uZU9mLCBvbmVPZlR5cGUsIGFuZCAnICtcbiAgICAgICAgICAgICdzaGFwZSBhbGwgcmVx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dGVtICYmIHR5cGVvZiB0YXJnZXRJdGVtID09PSAnb2JqZWN0JyAmJiBpdGVtICYmIHR5cGVvZiBpdGVtID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgICAgICB0YXJnZXRbaV0gPSBtZXJnZSh0YXJnZXRJdGVtLCBpdGVtLCBvcHRpb25zKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0YXJnZXQucHVzaChpdGVtKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRhcmdldFtpXSA9IGl0ZW07XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gdGFyZ2V0O1xuICAgIH1cblxuICAgIHJldHVybiBPYmplY3Qua2V5cyhzb3VyY2UpLnJlZHVjZShmdW5jdGlvbiAoYWNjLCBrZXkpIHtcbiAgICAgICAgdmFyIHZhbHVlID0gc291cmNlW2tleV07XG5cbiAgICAgICAgaWYgKGhhcy5jYWxsKGFjYywga2V5KSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBtZXJnZShhY2Nba2V5XSwgdmFsdWUsIG9wdGlvbnMpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgYWNjW2tleV0gPSB2YWx1ZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYWNjO1xuICAgIH0sIG1lcmdlVGFyZ2V0KTtcbn07XG5cbnZhciBhc3NpZ24gPSBmdW5jdGlvbiBhc3NpZ25TaW5nbGVTb3VyY2UodGFyZ2V0LCBzb3VyY2UpIHtcbiAgICByZXR1cm4gT2JqZWN0LmtleXMoc291cmNlKS5yZWR1Y2UoZnVuY3Rpb24gKGFjYywga2V5KSB7XG4gICAgICAgIGFjY1trZXldID0gc291cmNlW2tleV07XG4gICAgICAgIHJldHVybiBhY2M7XG4gICAgfSwgdGFyZ2V0KTtcbn07XG5cbnZhciBkZWNvZG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B4MzkpIC8vIDAtOVxuICAgICAgICAgICAgICAgIHx8IChjID49IDB4NDEgJiYgYyA8PSAweDVBKSAvLyBhLXpcbiAgICAgICAgICAgICAgICB8fCAoYyA+PSAweDYxICYmIGMgPD0gMHg3QSkgLy8gQS1aXG4gICAgICAgICAgICAgICAgfHwgKGZvcm1hdCA9PT0gZm9ybWF0cy5SRkMxNzM4ICYmIChjID09PSAweDI4IHx8IGMgPT09IDB4MjkpKSAvLyAoIClcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGFyclthcnIubGVuZ3RoXSA9IHNlZ21lbnQuY2hhckF0KGkpO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoYyA8IDB4ODApIHtcbiAgICAgICAgICAgICAgICBhcnJbYXJyLmxlbmd0aF0gPSBoZXhUYWJsZVtjXTtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGMgPCAweDgwMCkge1xuICAgICAgICAgICAgICAgIGFyclthcnIubGVuZ3RoXSA9IGhleFRhYmxlWzB4QzAgfCAoYyA+PiA2KV1cbiAgICAgICAgICAgICAgICAgICAgKyBoZXhUYWJsZVsweDgwIHwgKGMgJiAweDNGKV07XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChjIDwgMHhEODAwIHx8IGMgPj0gMHhFMDAwKSB7XG4gICAgICAgICAgICAgICAgYXJyW2Fyci5sZW5ndGhdID0gaGV4VGFibGVbMHhFMCB8IChjID4+IDEyKV1cbiAgICAgICAgICAgICAgICAgICAgKyBoZXhUYWJsZVsweDgwIHwgKChjID4+IDYpICYgMHgzRildXG4gICAgICAgICAgICAgICAgICAgICsgaGV4VGFibGVbMHg4MCB8IChjICYgMHgzRildO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpICs9IDE7XG4gICAgICAgICAgICBjID0gMHgxMDAwMCArICgoKGMgJiAweDNGRikgPDwgMTApIHwgKHNlZ21lbnQuY2hhckNvZGVBdChpKSAmIDB4M0ZGKSk7XG5cbiAgICAgICAgICAgIGFyclthcnIubGVuZ3RoXSA9IGhleFRhYmxlWzB4RjAgfCAoYyA+PiAxOCldXG4gICAgICAgICAgICAgICAgKyBoZXhUYWJsZVsweDgwIHwgKChjID4+IDEyKSAmIDB4M0YpXVxuICAgICAgICAgICAgICAgICsgaGV4VGFibGVbMHg4MCB8ICgoYyA+PiA2KSAmIDB4M0YpXVxuICAgICAgICAgICAgICAgICsgaGV4VGFibGVbMHg4MCB8IChjICYgMHgzRildO1xuICAgICAgICB9XG5cbiAgICAgICAgb3V0ICs9IGFyci5qb2luKCcnKTtcbiAgICB9XG5cbiAgICByZXR1cm4gb3V0O1xufTtcblxudmFyIGNvbXBhY3QgPSBmdW5jdGlvbiBjb21wYWN0KHZhbHVlKSB7XG4gICAgdmFyIHF1ZXVlID0gW3sgb2JqOiB7IG86IHZhbHVlIH0sIHByb3A6ICdvJyB9XTtcbiAgICB2YXIgcmVmcyA9IFtdO1xuXG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCBxdWV1ZS5sZW5ndGg7ICsraSkge1xuICAgICAgICB2YXIgaXRlbSA9IHF1ZXVlW2ldO1xuICAgICAgICB2YXIgb2JqID0gaXRlbS5vYmpbaXRlbS5wcm9wXTtcblxuICAgICAgICB2YXIga2V5cyA9IE9iamVjdC5rZXlzKG9iaik7XG4gICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwga2V5cy5sZW5ndGg7ICsraikge1xuICAgICAgICAgICAgdmFyIGtleSA9IGtleXNbal07XG4gICAgICAgICAgICB2YXIgdmFsID0gb2JqW2tleV07XG4gICAgICAgICAgICBpZiAodHlwZW9mIHZhbCA9PT0gJ29iamVjdCcgJiYgdmFsICE9PSBudWxsICYmIHJlZnMuaW5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EU6XG4gICAgICAgIHJldHVybiBnZXRXcmFwcGVkTmFtZSh0eXBlLCB0eXBlLnJlbmRlciwgJ0ZvcndhcmRSZWYnKTtcblxuICAgICAgY2FzZSBSRUFDVF9NRU1PX1RZUEU6XG4gICAgICAgIHZhciBvdXRlck5hbWUgPSB0eXBlLmRpc3BsYXlOYW1lIHx8IG51bGw7XG5cbiAgICAgICAgaWYgKG91dGVyTmFtZSAhPT0gbnVsbCkge1xuICAgICAgICAgIHJldHVybiBvdXRlck5hbWU7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZ2V0Q29tcG9uZW50TmFtZUZyb21UeXBlKHR5cGUudHlwZSkgfHwgJ01lbW8nO1xuXG4gICAgICBjYXNlIFJFQUNUX0xBWllfVFlQRTpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBsYXp5Q29tcG9uZW50ID0gdHlwZTtcbiAgICAgICAgICB2YXIgcGF5bG9hZCA9IGxhenlDb21wb25lbnQuX3BheWxvYWQ7XG4gICAgICAgICAgdmFyIGluaXQgPSBsYXp5Q29tcG9uZW50Ll9pbml0O1xuXG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHJldHVybiBnZXRDb21wb25lbnROYW1lRnJvbVR5cGUoaW5pdChwYXlsb2FkKSk7XG4gICAgICAgICAgfSBjYXRjaCAoeCkge1xuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1mYWxsdGhyb3VnaFxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBudWxsO1xufVxuXG52YXIgaGFzT3duUHJvcGVydHkgPSBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5O1xuXG52YXIgUkVTRVJWRURfUFJPUFMgPSB7XG4gIGtleTogdHJ1ZSxcbiAgcmVmOiB0cnVlLFxuICBfX3NlbGY6IHRydWUsXG4gIF9fc291cmNlOiB0cnV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3BlLlxuXG4gICAgICB2YXIgd2FzQXdhaXRlZCA9IGZhbHNlO1xuICAgICAgdmFyIHRoZW5hYmxlID0ge1xuICAgICAgICB0aGVuOiBmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgd2FzQXdhaXRlZCA9IHRydWU7XG4gICAgICAgICAgdGhlbmFibGVSZXN1bHQudGhlbihmdW5jdGlvbiAocmV0dXJuVmFsdWUpIHtcbiAgICAgICAgICAgIHBvcEFjdFNjb3BlKHByZXZBY3RTY29wZURlcHRoKTtcblxuICAgICAgICAgICAgaWYgKGFjdFNjb3BlRGVwdGggPT09IDApIHtcbiAgICAgICAgICAgICAgLy8gV2UndmUgZXhpdGVkIHRoZSBvdXRlcm1vc3QgYWN0IHNjb3BlLiBSZWN1cnNpdmVseSBmbHVzaCB0aGVcbiAgICAgICAgICAgICAgLy8gcXVldWUgdW50aWwgdGhlcmUncyBubyByZW1haW5pbmcgd29yay5cbiAgICAgICAgICAgICAgcmVjdXJzaXZlbHlGbHVzaEFzeW5jQWN0V29yayhyZXR1cm5WYWx1ZSwgcmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJlc29sdmUocmV0dXJuVmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0sIGZ1bmN0aW9uIChlcnJvcikge1xuICAgICAgICAgICAgLy8gVGhlIGNhbGxiYWNrIHRocmV3IGFuIGVycm9yLlxuICAgICAgICAgICAgcG9wQWN0U2NvcGUocHJldkFjdFNjb3BlRGVwdGgpO1xuICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfTtcblxuICAgICAge1xuICAgICAgICBpZiAoIWRpZFdhcm5Ob0F3YWl0QWN0ICYmIHR5cGVvZiBQcm9taXNlICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgIC8vIGVzbGludC1kaX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xuICAgIGZ1bmN0aW9uIHJ1bih0YXNrKSB7XG4gICAgICAgIHZhciBjYWxsYmFjayA9IHRhc2suY2FsbGJhY2s7XG4gICAgICAgIHZhciBhcmdzID0gdGFzay5hcmdzO1xuICAgICAgICBzd2l0Y2ggKGFyZ3MubGVuZ3RoKSB7XG4gICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgIGNhbGxiYWNrKCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgY2FsbGJhY2soYXJnc1swXSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgY2FsbGJhY2soYXJnc1swXSwgYXJnc1sxXSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgY2FsbGJhY2soYXJnc1swXSwgYXJnc1sxXSwgYXJnc1syXSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIGNhbGxiYWNrLmFwcGx5KHVuZGVmaW5lZCwgYXJncyk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIHJ1bklmUHJlc2VudChoYW5kbGUpIHtcbiAgICAgICAgLy8gRnJvbSB0aGUgc3BlYzogXCJXYWl0IHVudGlsIGFueSBpbnZvY2F0aW9ucyBvZiB0aGlzIGFsZ29yaXRobSBzdGFydGVkIGJlZm9yZSB0aGlzIG9uZSBoYXZlIGNvbXBsZXRlZC5cIlxuICAgICAgICAvLyBTbyBpZiB3ZSdyZSBjdXJyZW50bHkgcnVubmluZyBhIHRhc2ssIHdlJ2xsIG5lZWQgdG8gZGVsYXkgdGhpcyBpbnZvY2F0aW9uLlxuICAgICAgICBpZiAoY3VycmVudGx5UnVubmluZ0FUYXNrKSB7XG4gICAgICAgICAgICAvLyBEZWxheSBieSBkb2luZyBhIHNldFRpbWVvdXQuIHNldEltbWVkaWF0ZSB3YXMgdHJpZWQgaW5zdGVhZCwgYnV0IGluIEZpcmVmb3ggNyBpdCBnZW5lcmF0ZWQgYVxuICAgICAgICAgICAgLy8gXCJ0b28gbXVjaCByZWN1cnNpb25cIiBlcnJvci5cbiAgICAgICAgICAgIHNldFRpbWVvdXQocnVuSWZQcmVzZW50LCAwLCBoYW5kbGUpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIHRhc2sgPSB0YXNrc0J5SGFuZGxlW2hhbmRsZV07XG4gICAgICAgICAgICBpZiAodGFzaykge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRseVJ1bm5pbmdBVGFzayA9IHRydWU7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgcnVuKHRhc2spO1xuICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIGNsZWFySW1tZWRpYXRlKGhhbmRsZSk7XG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnRseVJ1bm5pbmdBVGFzayA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGluc3RhbGxOZXh0VGlja0ltcGxlbWVudGF0aW9uKCkge1xuICAgICAgICByZWdpc3RlckltbWVkaWF0ZSA9IGZ1bmN0aW9uKGhhbmRsZSkge1xuICAgICAgICAgICAgcHJvY2Vzcy5uZXh0VGljayhmdW5jdGlvbiAoKSB7IHJ1bklmUHJlc2VudChoYW5kbGUpOyB9KTtcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBjYW5Vc2VQb3N0TWVzc2FnZSgpIHtcbiAgICAgICAgLy8gVGhlIHRlc3QgYWdhaW5zdCBgaW1wb3J0U2NyaXB0c2AgcHJldmVudHMgdGhpcyBpbXBsZW1lbnRhdGlvbiBmcm9tIGJlaW5nIGluc3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m9wcyxcbiAgICAgICAgZ3JvdXA6IHByb3BzLFxuICAgICAgICBncm91cENvbGxhcHNlZDogcHJvcHMsXG4gICAgICAgIGdyb3VwRW5kOiBwcm9wc1xuICAgICAgfSk7XG4gICAgICAvKiBlc2xpbnQtZW5hYmxlIHJlYWN0LWludGVybmFsL25vLXByb2R1Y3Rpb24tbG9nZ2luZyAqL1xuICAgIH1cblxuICAgIGRpc2FibGVkRGVwdGgrKztcbiAgfVxufVxuZnVuY3Rpb24gcmVlbmFibGVMb2dzKCkge1xuICB7XG4gICAgZGlzYWJsZWREZXB0aC0tO1xuXG4gICAgaWYgKGRpc2FibGVkRGVwdGggPT09IDApIHtcbiAgICAgIC8qIGVzbGludC1kaXNhYmxlIHJlYWN0LWludGVybmFsL25vLXByb2R1Y3Rpb24tbG9nZ2luZyAqL1xuICAgICAgdmFyIHByb3BzID0ge1xuICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgIGVudW1lcmFibGU6IHRydWUsXG4gICAgICAgIHdyaXRhYmxlOiB0cnVlXG4gICAgICB9OyAvLyAkRmxvd0ZpeE1lIEZsb3cgdGhpbmtzIGNvbnNvbGUgaXMgaW1tdXRhYmxlLlxuXG4gICAgICBPYmplY3QuZGVmaW5lUHJvcGVydGllcyhjb25zb2xlLCB7XG4gICAgICAgIGxvZzogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2TG9nXG4gICAgICAgIH0pLFxuICAgICAgICBpbmZvOiBhc3NpZ24oe30sIHByb3BzLCB7XG4gICAgICAgICAgdmFsdWU6IHByZXZJbmZvXG4gICAgICAgIH0pLFxuICAgICAgICB3YXJuOiBhc3NpZ24oe30sIHByb3BzLCB7XG4gICAgICAgICAgdmFsdWU6IHByZXZXYXJuXG4gICAgICAgIH0pLFxuICAgICAgICBlcnJvcjogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2RXJyb3JcbiAgICAgICAgf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hhbmdlIHRoZXNlIHR3byB2YWx1ZXMuIFRoZXkncmUgdXNlZCBieSBSZWFjdCBEZXYgVG9vbHMuXG52YXIgTm9GbGFncyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAqL1xuMDtcbnZhciBQZXJmb3JtZWRXb3JrID1cbi8qICAgICAgICAgICAgICAgICovXG4xOyAvLyBZb3UgY2FuIGNoYW5nZSB0aGUgcmVzdCAoYW5kIGFkZCBtb3JlKS5cblxudmFyIFBsYWNlbWVudCA9XG4vKiAgICAgICAgICAgICAgICAgICAgKi9cbjI7XG52YXIgVXBkYXRlID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuNDtcbnZhciBDaGlsZERlbGV0aW9uID1cbi8qICAgICAgICAgICAgICAgICovXG4xNjtcbnZhciBDb250ZW50UmVzZXQgPVxuLyogICAgICAgICAgICAgICAgICovXG4zMjtcbnZhciBDYWxsYmFjayA9XG4vKiAgICAgICAgICAgICAgICAgICAgICovXG42NDtcbnZhciBEaWRDYXB0dXJlID1cbi8qICAgICAgICAgICAgICAgICAgICovXG4xMjg7XG52YXIgRm9yY2VDbGllbnRSZW5kZXIgPVxuLyogICAgICAgICAgICAqL1xuMjU2O1xudmFyIFJlZiA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjUxMjtcbnZhciBTbmFwc2hvdCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICovXG4xMDI0O1xudmFyIFBhc3NpdmUgPVxuLyogICAgICAgICAgICAgICAgICAgICAgKi9cbjIwNDg7XG52YXIgSHlkcmF0aW5nID1cbi8qICAgICAgICAgICAgICAgICAgICAqL1xuNDA5NjtcbnZhciBWaXNpYmlsaXR5ID1cbi8qICAgICAgICAgICAgICAgICAgICovXG44MTkyO1xudmFyIFN0b3JlQ29uc2lzdGVuY3kgPVxuLyogICAgICAgICAgICAgKi9cbjE2Mzg0O1xudmFyIExpZmVjeWNsZUVmZmVjdE1hc2sgPSBQYXNzaXZlIHwgVXBkYXR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Ymxpbmc7XG4gICAgICB9XG5cbiAgICAgIGlmICghZGlkRmluZENoaWxkKSB7XG4gICAgICAgIC8vIFNlYXJjaCBwYXJlbnQgQidzIGNoaWxkIHNldFxuICAgICAgICBfY2hpbGQgPSBwYXJlbnRCLmNoaWxkO1xuXG4gICAgICAgIHdoaWxlIChfY2hpbGQpIHtcbiAgICAgICAgICBpZiAoX2NoaWxkID09PSBhKSB7XG4gICAgICAgICAgICBkaWRGaW5kQ2hpbGQgPSB0cnVlO1xuICAgICAgICAgICAgYSA9IHBhcmVudEI7XG4gICAgICAgICAgICBiID0gcGFyZW50QTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChfY2hpbGQgPT09IGIpIHtcbiAgICAgICAgICAgIGRpZEZpbmRDaGlsZCA9IHRydWU7XG4gICAgICAgICAgICBiID0gcGFyZW50QjtcbiAgICAgICAgICAgIGEgPSBwYXJlbnRBO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NoaWxkID0gX2NoaWxkLnNpYmxpbmc7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWRpZEZpbmRDaGlsZCkge1xuICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ2hpbGQgd2FzIG5vdCBmb3VuZCBpbiBlaXRoZXIgcGFyZW50IHNldC4gVGhpcyBpbmRpY2F0ZXMgYSBidWcgJyArICdpbiBSZWFjdCByZWxhdGVkIHRvIHRoZSByZXR1cm4gcG9pbnRlci4gUGxlYXNlIGZpbGUgYW4gaXNzdWUuJyk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoYS5hbHRlcm5hdGUgIT09IGIpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihcIlJldHVybiBmaWJlcnMgc2hvdWxkIGFsd2F5cyBiZSBlYWNoIG90aGVycycgYWx0ZXJuYXRlcy4gXCIgKyAnVGhpcyBlcnJvciB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40O1xudmFyIERlZmF1bHRIeWRyYXRpb25MYW5lID1cbi8qICAgICAgICAgICAgKi9cbjg7XG52YXIgRGVmYXVsdExhbmUgPVxuLyogICAgICAgICAgICAgICAgICAgICAqL1xuMTY7XG52YXIgVHJhbnNpdGlvbkh5ZHJhdGlvbkxhbmUgPVxuLyogICAgICAgICAgICAgICAgKi9cbjMyO1xudmFyIFRyYW5zaXRpb25MYW5lcyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjQxOTQyNDA7XG52YXIgVHJhbnNpdGlvbkxhbmUxID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjY0O1xudmFyIFRyYW5zaXRpb25MYW5lMiA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4xMjg7XG52YXIgVHJhbnNpdGlvbkxhbmUzID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjI1NjtcbnZhciBUcmFuc2l0aW9uTGFuZTQgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuNTEyO1xudmFyIFRyYW5zaXRpb25MYW5lNSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4xMDI0O1xudmFyIFRyYW5zaXRpb25MYW5lNiA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4yMDQ4O1xudmFyIFRyYW5zaXRpb25MYW5lNyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG40MDk2O1xudmFyIFRyYW5zaXRpb25MYW5lOCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG44MTkyO1xudmFyIFRyYW5zaXRpb25MYW5lOSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4xNjM4NDtcbnZhciBUcmFuc2l0aW9uTGFuZTEwID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMzI3Njg7XG52YXIgVHJhbnNpdGlvbkxhbmUxMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjY1NTM2O1xudmFyIFRyYW5zaXRpb25MYW5lMTIgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG4xMzEwNzI7XG52YXIgVHJhbnNpdGlvbkxhbmUxMyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjI2MjE0NDtcbnZhciBUcmFuc2l0aW9uTGFuZTE0ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuNTI0Mjg4O1xudmFyIFRyYW5zaXRpb25MYW5lMTUgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG4xMDQ4NTc2O1xudmFyIFRyYW5zaXRpb25MYW5lMTYgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG4yMDk3MTUyO1xudmFyIFJldHJ5TGFuZXMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjEzMDAyMzQyNDtcbnZhciBSZXRyeUxhbmUxID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuNDE5NDMwNDtcbnZhciBSZXRyeUxhbmUyID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuODM4ODYwODtcbnZhciBSZXRyeUxhbmUzID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTY3NzcyMTY7XG52YXIgUmV0cnlMYW5lNCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjMzNTU0NDMyO1xudmFyIFJldHJ5TGFuZTUgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICovXG42NzEwODg2NDtcbnZhciBTb21lUmV0cnlMYW5lID0gUmV0cnlMYW5lMTtcbnZhciBTZWxlY3RpdmVIeWRyYXRpb25MYW5lID1cbi8qICAgICAgICAgICovXG4xMzQyMTc3Mjg7XG52YXIgTm9uSWRsZUxhbmVzID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuMjY4NDM1NDU1O1xudmFyIElkbGVIeWRyYXRpb25MYW5lID1cbi8qIC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RDb250YWluZXIoY29udGFpbmVyLCB0YXJnZXRDb250YWluZXJOb2RlKSkge1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKG5vZGVUYWcgPT09IEhvc3RQb3J0YWwpIHtcbiAgICAgICAgICAgIC8vIFRoZSB0YXJnZXQgaXMgYSBwb3J0YWwsIGJ1dCBpdCdzIG5vdCB0aGUgcm9vdENvbnRhaW5lciB3ZSdyZSBsb29raW5nIGZvci5cbiAgICAgICAgICAgIC8vIE5vcm1hbGx5IHBvcnRhbHMgaGFuZGxlIHRoZWlyIG93biBldmVudHMgYWxsIHRoZSB3YXkgZG93biB0byB0aGUgcm9vdC5cbiAgICAgICAgICAgIC8vIFNvIHdlIHNob3VsZCBiZSBhYmxlIHRvIHN0b3Agbm93LiBIb3dldmVyLCB3ZSBkb24ndCBrbm93IGlmIHRoaXMgcG9ydGFsXG4gICAgICAgICAgICAvLyB3YXMgcGFydCBvZiAqb3VyKiByb290LlxuICAgICAgICAgICAgdmFyIGdyYW5kTm9kZSA9IG5vZGUucmV0dXJuO1xuXG4gICAgICAgICAgICB3aGlsZSAoZ3JhbmROb2RlICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIHZhciBncmFuZFRhZyA9IGdyYW5kTm9kZS50YWc7XG5cbiAgICAgICAgICAgICAgaWYgKGdyYW5kVGFnID09PSBIb3N0Um9vdCB8fCBncmFuZFRhZyA9PT0gSG9zdFBvcnRhbCkge1xuICAgICAgICAgICAgICAgIHZhciBncmFuZENvbnRhaW5lciA9IGdyYW5kTm9kZS5zdGF0ZU5vZGUuY29udGFpbmVySW5mbztcblxuICAgICAgICAgICAgICAgIGlmIChpc01hdGNoaW5nUm9vdENvbnRhaW5lcihncmFuZENvbnRhaW5lciwgdGFyZ2V0Q29udGFpbmVyTm9kZSkpIHtcbiAgICAgICAgICAgICAgICAgIC8vIFRoaXMgaXMgdGhlIHJvb3RDb250YWluZXIgd2UncmUgbG9va2luZyB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5lcihwYXJlbnRDb250YWluZXIsIHR5cGUpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAgICAgICAgdmFyIHRleHQgPSBmaWJlci5wZW5kaW5nUHJvcHM7XG4gICAgICAgICAgICAgIGRpZE5vdEZpbmRIeWRyYXRhYmxlVGV4dEluc3RhbmNlV2l0aGluQ29udGFpbmVyKHBhcmVudENvbnRhaW5lciwgdGV4dCk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBwYXJlbnRUeXBlID0gcmV0dXJuRmliZXIudHlwZTtcbiAgICAgICAgICB2YXIgcGFyZW50UHJvcHMgPSByZXR1cm5GaWJlci5tZW1vaXplZFByb3BzO1xuICAgICAgICAgIHZhciBwYXJlbnRJbnN0YW5jZSA9IHJldHVybkZpYmVyLnN0YXRlTm9kZTtcblxuICAgICAgICAgIHN3aXRjaCAoZmliZXIudGFnKSB7XG4gICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB2YXIgX3R5cGUgPSBmaWJlci50eXBlO1xuICAgICAgICAgICAgICAgIHZhciBfcHJvcHMgPSBmaWJlci5wZW5kaW5nUHJvcHM7XG4gICAgICAgICAgICAgICAgdmFyIGlzQ29uY3VycmVudE1vZGUgPSAocmV0dXJuRmliZXIubW9kZSAmIENvbmN1cnJlbnRNb2RlKSAhPT0gTm9Nb2RlO1xuICAgICAgICAgICAgICAgIGRpZE5vdEZpbmRIeWRyYXRhYmxlSW5zdGFuY2UocGFyZW50VHlwZSwgcGFyZW50UHJvcHMsIHBhcmVudEluc3RhbmNlLCBfdHlwZSwgX3Byb3BzLCAvLyBUT0RPOiBEZWxldGUgdGhpcyBhcmd1bWVudCB3aGVuIHdlIHJlbW92ZSB0aGUgbGVnYWN5IHJvb3QgQVBJLlxuICAgICAgICAgICAgICAgIGlzQ29uY3VycmVudE1vZGUpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNhc2UgSG9zdFRleHQ6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB2YXIgX3RleHQgPSBmaWJlci5wZW5kaW5nUHJvcHM7XG5cbiAgICAgICAgICAgICAgICB2YXIgX2lzQ29uY3VycmVudE1vZGUgPSAocmV0dXJuRmliZXIubW9kZSAmIENvbmN1cnJlbnRNb2RlKSAhPT0gTm9Nb2RlO1xuXG4gICAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVUZXh0SW5zdGFuY2UocGFyZW50VHlwZSwgcGFyZW50UHJvcHMsIHBhcmVudEluc3RhbmNlLCBfdGV4dCwgLy8gVE9ETzogRGVsZXRlIHRoaXMgYXJndW1lbnQgd2hlbiB3ZSByZW1vdmUgdGhlIGxlZ2FjeSByb290IEFQSS5cbiAgICAgICAgICAgICAgICBfaXNDb25jdXJyZW50TW9kZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHN1c3BlbnNlU3RhdGUgPSByZXR1cm5GaWJlci5tZW1vaXplZFN0YXRlO1xuICAgICAgICAgIHZhciBfcGFyZW50SW5zdGFuY2UgPSBzdXNwZW5zZVN0YXRlLmRlaHlkcmF0ZWQ7XG4gICAgICAgICAgaWYgKF9wYXJlbnRJbnN0YW5jZSAhPT0gbnVsbCkgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAgdmFyIF90eXBlMiA9IGZpYmVyLnR5cGU7XG4gICAgICAgICAgICAgIHZhciBfcHJvcHMyID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZUluc3RhbmNlV2l0aGluU3VzcGVuc2VJbnN0YW5jZShfcGFyZW50SW5zdGFuY2UsIF90eXBlMik7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIEhvc3RUZXh0OlxuICAgICAgICAgICAgICB2YXIgX3RleHQyID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVRleHRJbnN0YW5jZVdpdGhpblN1c3BlbnNlSW5zdGFuY2UoX3BhcmVudEluc3RhbmNlLCBfdGV4dDIpO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgZGVmYXVsdDpcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgfVxufVxuXG5mdW5jdGlvbiBpbnNlcnROb25IeWRyYXRlZEluc3RhbmNlKHJldHVybkZpYmVyLCBmaWJlcikge1xuICBmaWJlci5mbGFncyA9IGZpYmVyLmZsYWdzICYgfkh5ZHJhdGluZyB8IFBsYWNlbWVudDtcbiAgd2Fybk5vbmh5ZHJhdGVkSW5zdGFuY2UocmV0dXJuRmliZXIsIGZpYmVyKTtcbn1cblxuZnVuY3Rpb24gdHJ5SHlkcmF0ZShmaWJlciwgbmV4dEluc3RhbmNlKSB7XG4gIHN3aXRjaCAoZmliZXIudGFnKSB7XG4gICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAge1xuICAgICAgICB2YXIgdHlwZSA9IGZpYmVyLnR5cGU7XG4gICAgICAgIHZhciBwcm9wcyA9IGZpYmVyLnBlbmRpbmdQcm9wcztcbiAgICAgICAg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LyBoeWRyYXRpb24gcGFyZW50IGlzIHRoZSBwYXJlbnQgaG9zdCBjb21wb25lbnQgb2YgdGhpcyBob3N0IHRleHQuXG4gICAgdmFyIHJldHVybkZpYmVyID0gaHlkcmF0aW9uUGFyZW50RmliZXI7XG5cbiAgICBpZiAocmV0dXJuRmliZXIgIT09IG51bGwpIHtcbiAgICAgIHN3aXRjaCAocmV0dXJuRmliZXIudGFnKSB7XG4gICAgICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICAgICAge1xuICAgICAgICAgICAgdmFyIHBhcmVudENvbnRhaW5lciA9IHJldHVybkZpYmVyLnN0YXRlTm9kZS5jb250YWluZXJJbmZvO1xuICAgICAgICAgICAgdmFyIGlzQ29uY3VycmVudE1vZGUgPSAocmV0dXJuRmliZXIubW9kZSAmIENvbmN1cnJlbnRNb2RlKSAhPT0gTm9Nb2RlO1xuICAgICAgICAgICAgZGlkTm90TWF0Y2hIeWRyYXRlZENvbnRhaW5lclRleHRJbnN0YW5jZShwYXJlbnRDb250YWluZXIsIHRleHRJbnN0YW5jZSwgdGV4dENvbnRlbnQsIC8vIFRPRE86IERlbGV0ZSB0aGlzIGFyZ3VtZW50IHdoZW4gd2UgcmVtb3ZlIHRoZSBsZWdhY3kgcm9vdCBBUEkuXG4gICAgICAgICAgICBpc0NvbmN1cnJlbnRNb2RlKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAge1xuICAgICAgICAgICAgdmFyIHBhcmVudFR5cGUgPSByZXR1cm5GaWJlci50eXBlO1xuICAgICAgICAgICAgdmFyIHBhcmVudFByb3BzID0gcmV0dXJuRmliZXIubWVtb2l6ZWRQcm9wcztcbiAgICAgICAgICAgIHZhciBwYXJlbnRJbnN0YW5jZSA9IHJldHVybkZpYmVyLnN0YXRlTm9kZTtcblxuICAgICAgICAgICAgdmFyIF9pc0NvbmN1cnJlbnRNb2RlMiA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cblxuICAgICAgICByZXR1cm4gdXBkYXRlRnJhZ21lbnQocmV0dXJuRmliZXIsIF9tYXRjaGVkRmliZXIzLCBuZXdDaGlsZCwgbGFuZXMsIG51bGwpO1xuICAgICAgfVxuXG4gICAgICB0aHJvd09uSW52YWxpZE9iamVjdFR5cGUocmV0dXJuRmliZXIsIG5ld0NoaWxkKTtcbiAgICB9XG5cbiAgICB7XG4gICAgICBpZiAodHlwZW9mIG5ld0NoaWxkID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgIHdhcm5PbkZ1bmN0aW9uVHlwZShyZXR1cm5GaWJlcik7XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIG51bGw7XG4gIH1cbiAgLyoqXG4gICAqIFdhcm5zIGlmIHRoZXJlIGlzIGEgZHVwbGljYXRlIG9yIG1pc3Npbmcga2V5XG4gICAqL1xuXG5cbiAgZnVuY3Rpb24gd2Fybk9uSW52YWxpZEtleShjaGlsZCwga25vd25LZXlzLCByZXR1cm5GaWJlcikge1xuICAgIHtcbiAgICAgIGlmICh0eXBlb2YgY2hpbGQgIT09ICdvYmplY3QnIHx8IGNoaWxkID09PSBudWxsKSB7XG4gICAgICAgIHJldHVybiBrbm93bktleXM7XG4gICAgICB9XG5cbiAgICAgIHN3aXRjaCAoY2hpbGQuJCR0eXBlb2YpIHtcbiAgICAgICAgY2FzZSBSRUFDVF9FTEVNRU5UX1RZUEU6XG4gICAgICAgIGNhc2UgUkVBQ1RfUE9SVEFMX1RZUEU6XG4gICAgICAgICAgd2FybkZvck1pc3NpbmdLZXkoY2hpbGQsIHJldHVybkZpYmVyKTtcbiAgICAgICAgICB2YXIga2V5ID0gY2hpbGQua2V5O1xuXG4gICAgICAgICAgaWYgKHR5cGVvZiBrZXkgIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoa25vd25LZXlzID09PSBudWxsKSB7XG4gICAgICAgICAgICBrbm93bktleXMgPSBuZXcgU2V0KCk7XG4gICAgICAgICAgICBrbm93bktleXMuYWRkKGtleSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoIWtub3duS2V5cy5oYXMoa2V5KSkge1xuICAgICAgICAgICAga25vd25LZXlzLmFkZChrZXkpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgZXJyb3IoJ0VuY291bnRlcmVkIHR3byBjaGlsZHJlbiB3aXRoIHRoZSBzYW1lIGtleSwgYCVzYC4gJyArICdLZXlzIHNob3VsZCBiZSB1bmlxdWUgc28gdGhhdCBjb21wb25lbnRzIG1haW50YWluIHRoZWlyIGlkZW50aXR5ICcgKyAnYWNyb3NzIHVwZGF0ZXMuIE5vbi11bmlxdWUga2V5cyBtYXkgY2F1c2UgY2hpbGRyZW4gdG8gYmUgJyArICdkdXBsaWNhdGVkIGFuZC9vciBvbWl0dGVkIOKAlCB0aGUgYmVoYXZpb3IgaXMgdW5zdXBwb3J0ZWQgYW5kICcgKyAnY291bGQgY2hhbmdlIGluIGEgZnV0dXJlIHZlcnNpb24uJywga2V5KTtcblxuICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgUkVBQ1RfTEFaWV9UWVBFOlxuICAgICAgICAgIHZhciBwYXlsb2FkID0gY2hpbGQuX3BheWxvYWQ7XG4gICAgICAgICAgdmFyIGluaXQgPSBjaGlsZC5faW5pdDtcbiAgICAgICAgICB3YXJuT25JbnZhbGlkS2V5KGluaXQocGF5bG9hZCksIGtub3duS2V5cywgcmV0dXJuRmliZXIpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBrbm93bktleXM7XG4gIH1cblxuICBmdW5jdGlvbiByZWNvbmNpbGVDaGlsZHJlbkFycmF5KHJldHVybkZpYmVyLCBjdXJyZW50Rmlyc3RDaGlsZCwgbmV3Q2hpbGRyZW4sIG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LiBFeGl0LlxuICAgICAgICAgIG5leHRGaWJlciA9IG51bGw7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgc2libGluZyA9IG5leHRGaWJlci5zaWJsaW5nO1xuXG4gICAgICAgIGlmIChzaWJsaW5nICE9PSBudWxsKSB7XG4gICAgICAgICAgLy8gU2V0IHRoZSByZXR1cm4gcG9pbnRlciBvZiB0aGUgc2libGluZyB0byB0aGUgd29yay1pbi1wcm9ncmVzcyBmaWJlci5cbiAgICAgICAgICBzaWJsaW5nLnJldHVybiA9IG5leHRGaWJlci5yZXR1cm47XG4gICAgICAgICAgbmV4dEZpYmVyID0gc2libGluZztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfSAvLyBObyBtb3JlIHNpYmxpbmdzLiBUcmF2ZXJzZSB1cC5cblxuXG4gICAgICAgIG5leHRGaWJlciA9IG5leHRGaWJlci5yZXR1cm47XG4gICAgICB9XG4gICAgfVxuXG4gICAgZmliZXIgPSBuZXh0RmliZXI7XG4gIH1cbn1cbmZ1bmN0aW9uIHByZXBhcmVUb1JlYWRDb250ZXh0KHdvcmtJblByb2dyZXNzLCByZW5kZXJMYW5lcykge1xuICBjdXJyZW50bHlSZW5kZXJpbmdGaWJlciA9IHdvcmtJblByb2dyZXNzO1xuICBsYXN0Q29udGV4dERlcGVuZGVuY3kgPSBudWxsO1xuICBsYXN0RnVsbHlPYnNlcnZlZENvbnRleHQgPSBudWxsO1xuICB2YXIgZGVwZW5kZW5jaWVzID0gd29ya0luUHJvZ3Jlc3MuZGVwZW5kZW5jaWVzO1xuXG4gIGlmIChkZXBlbmRlbmNpZXMgIT09IG51bGwpIHtcbiAgICB7XG4gICAgICB2YXIgZmlyc3RDb250ZXh0ID0gZGVwZW5kZW5jaWVzLmZpcnN0Q29udGV4dDtcblxuICAgICAgaWYgKGZpcnN0Q29udGV4dCAhPT0gbnVsbCkge1xuICAgICAgICBpZiAoaW5jbHVkZXNTb21lTGFuZShkZ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lYWRJbkRFVigpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciBuZXh0U3RhdGUgPSBwYXlsb2FkLmNhbGwoaW5zdGFuY2UsIHByZXZTdGF0ZSwgbmV4dFByb3BzKTtcblxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmICggd29ya0luUHJvZ3Jlc3MubW9kZSAmIFN0cmljdExlZ2FjeU1vZGUpIHtcbiAgICAgICAgICAgICAgc2V0SXNTdHJpY3RNb2RlRm9yRGV2dG9vbHModHJ1ZSk7XG5cbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBwYXlsb2FkLmNhbGwoaW5zdGFuY2UsIHByZXZTdGF0ZSwgbmV4dFByb3BzKTtcbiAgICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgICBzZXRJc1N0cmljdE1vZGVGb3JEZXZ0b29scyhmYWxzZSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZXhpdERpc2FsbG93ZWRDb250ZXh0UmVhZEluREVWKCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIG5leHRTdGF0ZTtcbiAgICAgICAgfSAvLyBTdGF0ZSBvYmplY3RcblxuXG4gICAgICAgIHJldHVybiBwYXlsb2FkO1xuICAgICAgfVxuXG4gICAgY2FzZSBDYXB0dXJlVXBkYXRlOlxuICAgICAge1xuICAgICAgICB3b3JrSW5Qcm9ncmVzcy5mbGFncyA9IHdvcmtJblByb2dyZXNzLmZsYWdzICYgflNob3VsZENhcHR1cmUgfCBEaWRDYXB0dXJlO1xuICAgICAgfVxuICAgIC8vIEludGVudGlvbmFsIGZhbGx0aHJvdWdoXG5cbiAgICBjYXNlIFVwZGF0ZVN0YXRlOlxuICAgICAge1xuICAgICAgICB2YXIgX3BheWxvYWQgPSB1cGRhdGUucGF5bG9hZDtcbiAgICAgICAgdmFyIHBhcnRpYWxTdGF0ZTtcblxuICAgICAgICBpZiAodHlwZW9mIF9wYXlsb2FkID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgLy8gVXBkYXRlciBmdW5jdGlvblxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGVudGVyRGlzYWxsb3dlZENvbnRleHRSZWFkSW5ERVYoKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBwYXJ0aWFsU3RhdGUgPSBfcGF5bG9hZC5jYWxsKGluc3RhbmNlLCBwcmV2U3RhdGUsIG5leHRQcm9wcyk7XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAoIHdvcmtJblByb2dyZXNzLm1vZGUgJiBTdHJpY3RMZWdhY3lNb2RlKSB7XG4gICAgICAgICAgICAgIHNldElzU3RyaWN0TW9kZUZvckRldnRvb2xzKHRydWUpO1xuXG4gICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgX3BheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuICAgICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgIHNldElzU3RyaWN0TW9kZUZvckRldnRvb2xzKGZhbHNlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBleGl0RGlzYWxsb3dlZENvbnRleHRSZWFkSW5ERVYoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgLy8gUGFydGlhbCBzdGF0ZSBvYmplY3RcbiAgICAgICAgICBwYXJ0aWFsU3RhdGUgPSBfcGF5bG9hZDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChwYXJ0aWFsU3RhdGUgPT09IG51bGwgfHwgcGFydGlhbFN0YXRlID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAvLyBOdWxsIGFuZCB1bmRlZmluZWQgYXJlIHRyZWF0ZWQgYXMgbm8tb3BzLlxuICAgICAgICAgIHJldHVybiBwcmV2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b2dyZXNzLmNoaWxkO1xuICAgICAgICAgIHdvcmtJblByb2dyZXNzLmNoaWxkID0gbnVsbDtcblxuICAgICAgICAgIHdoaWxlIChyb3cgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHZhciBjdXJyZW50Um93ID0gcm93LmFsdGVybmF0ZTsgLy8gTmV3IHJvd3MgY2FuJ3QgYmUgY29udGVudCByb3dzLlxuXG4gICAgICAgICAgICBpZiAoY3VycmVudFJvdyAhPT0gbnVsbCAmJiBmaW5kRmlyc3RTdXNwZW5kZWQoY3VycmVudFJvdykgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgLy8gVGhpcyBpcyB0aGUgYmVnaW5uaW5nIG9mIHRoZSBtYWluIGNvbnRlbnQuXG4gICAgICAgICAgICAgIHdvcmtJblByb2dyZXNzLmNoaWxkID0gcm93O1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIG5leHRSb3cgPSByb3cuc2libGluZztcbiAgICAgICAgICAgIHJvdy5zaWJsaW5nID0gX3RhaWw7XG4gICAgICAgICAgICBfdGFpbCA9IHJvdztcbiAgICAgICAgICAgIHJvdyA9IG5leHRSb3c7XG4gICAgICAgICAgfSAvLyBUT0RPOiBJZiB3b3JrSW5Qcm9ncmVzcy5jaGlsZCBpcyBudWxsLCB3ZSBjYW4gY29udGludWUgb24gdGhlIHRhaWwgaW1tZWRpYXRlbHkuXG5cblxuICAgICAgICAgIGluaXRTdXNwZW5zZUxpc3RSZW5kZXJTdGF0ZSh3b3JrSW5Qcm9ncmVzcywgdHJ1ZSwgLy8gaXNCYWNrd2FyZHNcbiAgICAgICAgICBfdGFpbCwgbnVsbCwgLy8gbGFzdFxuICAgICAgICAgIHRhaWxNb2RlKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlICd0b2dldGhlcic6XG4gICAgICAgIHtcbiAgICAgICAgICBpbml0U3VzcGVuc2VMaXN0UmVuZG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AgICAgICAgICAgdmFyIGhhc0ludmlzaWJsZUNoaWxkQ29udGV4dCA9IGN1cnJlbnQgPT09IG51bGwgJiYgKHdvcmtJblByb2dyZXNzLm1lbW9pemVkUHJvcHMudW5zdGFibGVfYXZvaWRUaGlzRmFsbGJhY2sgIT09IHRydWUgfHwgIWVuYWJsZVN1c3BlbnNlQXZvaWRUaGlzRmFsbGJhY2spO1xuXG4gICAgICAgICAgICAgIGlmIChoYXNJbnZpc2libGVDaGlsZENvbnRleHQgfHwgaGFzU3VzcGVuc2VDb250ZXh0KHN1c3BlbnNlU3RhY2tDdXJzb3IuY3VycmVudCwgSW52aXNpYmxlUGFyZW50U3VzcGVuc2VDb250ZXh0KSkge1xuICAgICAgICAgICAgICAgIC8vIElmIHRoaXMgd2FzIGluIGFuIGludmlzaWJsZSB0cmVlIG9yIGEgbmV3IHJlbmRlciwgdGhlbiBzaG93aW5nXG4gICAgICAgICAgICAgICAgLy8gdGhpcyBib3VuZGFyeSBpcyBvay5cbiAgICAgICAgICAgICAgICByZW5kZXJEaWRTdXNwZW5kKCk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gT3RoZXJ3aXNlLCB3ZSdyZSBnb2luZyB0byBoYXZlIHRvIGhpZGUgY29udGVudCBzbyB3ZSBzaG91bGRcbiAgICAgICAgICAgICAgICAvLyBzdXNwZW5kIGZvciBsb25nZXIgaWYgcG9zc2libGUuXG4gICAgICAgICAgICAgICAgcmVuZGVyRGlkU3VzcGVuZERlbGF5SWZQb3NzaWJsZSgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHdha2VhYmxlcyA9IHdvcmtJblByb2dyZXNzLnVwZGF0ZVF1ZXVlO1xuXG4gICAgICAgIGlmICh3YWtlYWJsZXMgIT09IG51bGwpIHtcbiAgICAgICAgICAvLyBTY2hlZHVsZSBhbiBlZmZlY3QgdG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CwgbmVhcmVzdE1vdW50ZWRBbmNlc3RvciwgZXJyb3IpO1xuICB9XG59XG5cbmZ1bmN0aW9uIHNhZmVseURldGFjaFJlZihjdXJyZW50LCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yKSB7XG4gIHZhciByZWYgPSBjdXJyZW50LnJlZjtcblxuICBpZiAocmVmICE9PSBudWxsKSB7XG4gICAgaWYgKHR5cGVvZiByZWYgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgIHZhciByZXRWYWw7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIGlmIChlbmFibGVQcm9maWxlclRpbWVyICYmIGVuYWJsZVByb2ZpbGVyQ29tbWl0SG9va3MgJiYgY3VycmVudC5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgcmV0VmFsID0gcmVmKG51bGwpO1xuICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihjdXJyZW50KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmV0VmFsID0gcmVmKG51bGwpO1xuICAgICAgICB9XG4gICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihjdXJyZW50LCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBlcnJvcik7XG4gICAgICB9XG5cbiAgICAgIHtcbiAgICAgICAgaWYgKHR5cGVvZiByZXRWYWwgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICBlcnJvcignVW5leHBlY3RlZCByZXR1cm4gdmFsdWUgZnJvbSBhIGNhbGxiYWNrIHJlZiBpbiAlcy4gJyArICdBIGNhbGxiYWNrIHJlZiBzaG91bGQgbm90IHJldHVybiBhIGZ1bmN0aW9uLicsIGdldENvbXBv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dXJuID0gZmliZXIucmV0dXJuO1xuICAgICAgbmV4dEVmZmVjdCA9IHNpYmxpbmc7XG4gICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgbmV4dEVmZmVjdCA9IGZpYmVyLnJldHVybjtcbiAgfVxufVxuXG5mdW5jdGlvbiBjb21taXRCZWZvcmVNdXRhdGlvbkVmZmVjdHNPbkZpYmVyKGZpbmlzaGVkV29yaykge1xuICB2YXIgY3VycmVudCA9IGZpbmlzaGVkV29yay5hbHRlcm5hdGU7XG4gIHZhciBmbGFncyA9IGZpbmlzaGVkV29yay5mbGFncztcblxuICBpZiAoKGZsYWdzICYgU25hcHNob3QpICE9PSBOb0ZsYWdzKSB7XG4gICAgc2V0Q3VycmVudEZpYmVyKGZpbmlzaGVkV29yayk7XG5cbiAgICBzd2l0Y2ggKGZpbmlzaGVkV29yay50YWcpIHtcbiAgICAgIGNhc2UgRnVuY3Rpb25Db21wb25lbnQ6XG4gICAgICBjYXNlIEZvcndhcmRSZWY6XG4gICAgICBjYXNlIFNpbXBsZU1lbW9Db21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgaWYgKGN1cnJlbnQgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHZhciBwcmV2UHJvcHMgPSBjdXJyZW50Lm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgICB2YXIgcHJldlN0YXRlID0gY3VycmVudC5tZW1vaXplZFN0YXRlO1xuICAgICAgICAgICAgdmFyIGluc3RhbmNlID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZTsgLy8gV2UgY291bGQgdXBkYXRlIGluc3RhbmNlIHByb3BzIGFuZCBzdGF0ZSBoZXJlLFxuICAgICAgICAgICAgLy8gYnV0IGluc3RlYWQgd2UgcmVseSBvbiB0aGVtIGJlaW5nIHNldCBkdXJpbmcgbGFzdCByZW5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yArICdhIGNvbXBvbmVudCByZWFzc2lnbnMgaXRzIG93biBgdGhpcy5zdGF0ZWAuICcgKyAnUGxlYXNlIGZpbGUgYW4gaXNzdWUuJywgZ2V0Q29tcG9uZW50TmFtZUZyb21GaWJlcihmaW5pc2hlZFdvcmspIHx8ICdpbnN0YW5jZScpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgc25hcHNob3QgPSBpbnN0YW5jZS5nZXRTbmFwc2hvdEJlZm9yZVVwZGF0ZShmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgPT09IGZpbmlzaGVkV29yay50eXBlID8gcHJldlByb3BzIDogcmVzb2x2ZURlZmF1bHRQcm9wcyhmaW5pc2hlZFdvcmsudHlwZSwgcHJldlByb3BzKSwgcHJldlN0YXRlKTtcblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICB2YXIgZGlkV2FyblNldCA9IGRpZFdhcm5BYm91dFVuZGVmaW5lZFNuYXBzaG90QmVmb3JlVXBkYXRlO1xuXG4gICAgICAgICAgICAgIGlmIChzbmFwc2hvdCA9PT0gdW5kZWZpbmVkICYmICFkaWRXYXJuU2V0LmhhcyhmaW5pc2hlZFdvcmsudHlwZSkpIHtcbiAgICAgICAgICAgICAgICBkaWRXYXJuU2V0LmFkZChmaW5pc2hlZFdvcmsudHlwZSk7XG5cbiAgICAgICAgICAgICAgICBlcnJvcignJXMuZ2V0U25hcHNob3RCZWZvcmVVcGRhdGUoKTogQSBzbmFwc2hvdCB2YWx1ZSAob3IgbnVsbCkgJyArICdtdXN0IGJlIHJldHVybmVkLiBZb3UgaGF2ZSByZXR1cm5lZCB1bmRlZmluZWQuJywgZ2V0Q29tcG9uZW50TmFtZUZyb21GaWJlcihmaW5pc2hlZFdvcmspKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpbnN0YW5jZS5fX3JlYWN0SW50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9IGZpcnN0RWZmZWN0O1xuXG4gICAgZG8ge1xuICAgICAgaWYgKChlZmZlY3QudGFnICYgZmxhZ3MpID09PSBmbGFncykge1xuICAgICAgICB7XG4gICAgICAgICAgaWYgKChmbGFncyAmIFBhc3NpdmUkMSkgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgbWFya0NvbXBvbmVudFBhc3NpdmVFZmZlY3RNb3VudFN0YXJ0ZWQoZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICB9IGVsc2UgaWYgKChmbGFncyAmIExheW91dCkgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgbWFya0NvbXBvbmVudExheW91dEVmZmVjdE1vdW50U3RhcnRlZChmaW5pc2hlZFdvcmspO1xuICAgICAgICAgIH1cbiAgICAgICAgfSAvLyBNb3VudFxuXG5cbiAgICAgICAgdmFyIGNyZWF0ZSA9IGVmZmVjdC5jcmVhdGU7XG5cbiAgICAgICAge1xuICAgICAgICAgIGlmICgoZmxhZ3MgJiBJbnNlcnRpb24pICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgIHNldElzUnVubmluZ0luc2VydGlvbkVmZmVjdCh0cnVlKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBlZmZlY3QuZGVzdHJveSA9IGNyZWF0ZSgpO1xuXG4gICAgICAgIHtcbiAgICAgICAgICBpZiAoKGZsYWdzICYgSW5zZXJ0aW9uKSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICBzZXRJc1J1bm5pbmdJbnNlcnRpb25FZmZlY3QoZmFsc2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHtcbiAgICAgICAgICBpZiAoKGZsYWdzICYgUGFzc2l2ZSQxKSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICBtYXJrQ29tcG9uZW50UGFzc2l2ZUVmZmVjdE1vdW50U3RvcHBlZCgpO1xuICAgICAgICAgIH0gZWxzZSBpZiAoKGZsYWdzICYgTGF5b3V0KSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0TW91bnRTdG9wcGVkKCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAge1xuICAgICAgICAgIHZhciBkZXN0cm95ID0gZWZmZWN0LmRlc3Ryb3k7XG5cbiAgICAgICAgICBpZiAoZGVzdHJveSAhPT0gdW5kZWZpbmVkICYmIHR5cGVvZiBkZXN0cm95ICE9PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICB2YXIgaG9va05hbWUgPSB2b2lkIDA7XG5cbiAgICAgICAgICAgIGlmICgoZWZmZWN0LnRhZyAmIExheW91dCkgIT09IE5vRmxhZ3MpIHtcbiAgICAgICAgICAgICAgaG9va05hbWUgPSAndXNlTGF5b3V0RWZmZWN0JztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoKGVmZmVjdC50YWcgJiBJbnNlcnRpb24pICE9PSBOb0ZsYWdzKSB7XG4gICAgICAgICAgICAgIGhvb2tOYW1lID0gJ3VzZUluc2VydGlvbkVmZmVjdCc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBob29rTmFtZSA9ICd1c2VFZmZlY3QnO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgYWRkZW5kdW0gPSB2b2lkIDA7XG5cbiAgICAgICAgICAgIGlmIChkZXN0cm95ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgIGFkZGVuZHVtID0gJyBZb3UgcmV0dXJuZWQgbnVsbC4gSWYgeW91ciBlZmZlY3QgZG9lcyBub3QgcmVxdWlyZSBjbGVhbiAnICsgJ3VwLCByZXR1cm4gdW5kZWZpbmVkIChvciBub3RoaW5nKS4nO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgZGVzdHJveS50aGVuID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICA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AgICAgICAgICAgdmFyIHBoYXNlID0gZmluaXNoZWRXb3JrLmFsdGVybmF0ZSA9PT0gbnVsbCA/ICdtb3VudCcgOiAndXBkYXRlJztcblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBpZiAoaXNDdXJyZW50VXBkYXRlTmVzdGVkKCkpIHtcbiAgICAgICAgICAgICAgICBwaGFzZSA9ICduZXN0ZWQtdXBkYXRlJztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIG9uUG9zdENvbW1pdCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICBvblBvc3RDb21taXQoaWQsIHBoYXNlLCBwYXNzaXZlRWZmZWN0RHVyYXRpb24sIGNvbW1pdFRpbWUpO1xuICAgICAgICAgICAgfSAvLyBCdWJibGUgdGltZXMgdG8gdGhlIG5leHQgbmVhcmVzdCBhbmNlc3RvciBQcm9maWxlci5cbiAgICAgICAgICAgIC8vIEFmdGVyIHdlIHByb2Nlc3MgdGhhdCBQcm9maWxlciwgd2UnbGwgYnViYmxlIGZ1cnRoZXIgdXAuXG5cblxuICAgICAgICAgICAgdmFyIHBhcmVudEZpYmVyID0gZmluaXNoZWRXb3JrLnJldHVybjtcblxuICAgICAgICAgICAgb3V0ZXI6IHdoaWxlIChwYXJlbnRGaWJlciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBzd2l0Y2ggKHBhcmVudEZpYmVyLnRhZykge1xuICAgICAgICAgICAgICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICAgICAgICAgICAgICB2YXIgcm9vdCA9IHBhcmVudEZpYmVyLnN0YXRlTm9kZTtcbiAgICAgICAgICAgICAgICAgIHJvb3QucGFzc2l2ZUVmZmVjdER1cmF0aW9uICs9IHBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBQcm9ma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dGggZWFjaCBvdGhlcixcbiAgICAgICAgICAgIC8vIGUuZy4gYSBkZXN0cm95IGZ1bmN0aW9uIGluIG9uZSBjb21wb25lbnQgc2hvdWxkIG5ldmVyIG92ZXJyaWRlIGEgcmVmIHNldFxuICAgICAgICAgICAgLy8gYnkgYSBjcmVhdGUgZnVuY3Rpb24gaW4gYW5vdGhlciBjb21wb25lbnQgZHVyaW5nIHRoZSBzYW1lIGNvbW1pdC5cbiAgICAgICAgICAgIGlmICggZmluaXNoZWRXb3JrLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdE1vdW50KExheW91dCB8IEhhc0VmZmVjdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihmaW5pc2hlZFdvcmspO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdE1vdW50KExheW91dCB8IEhhc0VmZmVjdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIGluc3RhbmNlID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmIChmaW5pc2hlZFdvcmsuZmxhZ3MgJiBVcGRhdGUpIHtcbiAgICAgICAgICAgIGlmICghb2Zmc2NyZWVuU3VidHJlZVdhc0hpZGRlbikge1xuICAgICAgICAgICAgICBpZiAoY3VycmVudCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIC8vIFdlIGNvdWxkIHVwZGF0ZSBpbnN0YW5jZSBwcm9wcyBhbmQgc3RhdGUgaGVyZSxcbiAgICAgICAgICAgICAgICAvLyBidXQgaW5zdGVhZCB3ZSByZWx5IG9uIHRoZW0gYmVpbmcgc2V0IGR1cmluZyBsYXN0IHJlbmRlci5cbiAgICAgICAgICAgICAgICAvLyBUT0RPOiByZXZpc2l0IHRoaXMgd2hlbiB3ZSBpbXBsZW1lbnQgcmVzdW1pbmcuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgaWYgKGZpbmlzaGVkV29yay50eXBlID09PSBmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgJiYgIWRpZFdhcm5BYm91dFJlYXNzaWduaW5nUHJvcHMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGluc3RhbmNlLnByb3BzICE9PSBmaW5pc2hlZFdvcmsubWVtb2l6ZWRQcm9wcykge1xuICAgICAgICAgICAgICAgICAgICAgIGVycm9yKCdFeHBlY3RlZCAlcyBwcm9wcyB0byBtYXRjaCBtZW1vaXplZCBwcm9wcyBiZWZvcmUgJyArICdjb21wb25lbnREaWRNb3VudC4gJyArICdUaGlzIG1pZ2h0IGVpdGhlciBiZSBiZWNhdXNlIG9mIGEgYnVnIGluIFJlYWN0LCBvciBiZWNhdXNlICcgKyAnYSBjb21wb25lbnQgcmVhc3NpZ25zIGl0cyBvd24gYHRoaXMucHJvcHNgLiAnICsgJ1BsZWFzZSBmaWxlIGFuIGlzc3VlLicsIGdldENvbXBvbmVudE5hbWVGcm9tRmliZXIoZmluaXNoZWRXb3JrKSB8fCAnaW5zdGFuY2UnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnN0YW5jZS5zdGF0ZSAhPT0gZmluaXNoZWRXb3JrLm1lbW9pemVkU3RhdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICBlcnJvcignRXhwZWN0ZWQgJXMgc3RhdGUgdG8gbWF0Y2ggbWVtb2l6ZWQgc3RhdGUgYmVmb3JlICcgKyAnY29tcG9uZW50RGlkTW91bnQuICcgKyAnVGhpcyBtaWdodCBlaXRoZXIgYmUgYmVjYXVzZSBvZiBhIGJ1ZyBpbiBSZWFjdCwgb3IgYmVjYXVzZSAnICsgJ2EgY29tcG9uZW50IHJlYXNzaWducyBpdHMgb3duIGB0aGlzLnN0YXRlYC4gJyArICdQbGVhc2UgZmlsZSBhbiBpc3N1ZS4nLCBnZXRDb21wb25lbnROYW1lRnJvbUZpYmVyKGZpbmlzaGVkV29yaykgfHwgJ2luc3RhbmNlJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIGZpbmlzaGVkV29yay5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgaW5zdGFuY2UuY29tcG9uZW50RGlkTW91bnQoKTtcbiAgICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGluc3RhbmNlLmNvbXBvbmVudERpZE1vdW50KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBwcmV2UHJvcHMgPSBmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgPT09IGZpbmlzaGVkV29yay50eXBlID8gY3VycmVudC5tZW1vaXplZFByb3BzIDogcmVzb2x2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gICAgICAgICAgICAgICBpZiAoaW5zdGFuY2Uuc3RhdGUgIT09IGZpbmlzaGVkV29yay5tZW1vaXplZFN0YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgZXJyb3IoJ0V4cGVjdGVkICVzIHN0YXRlIHRvIG1hdGNoIG1lbW9pemVkIHN0YXRlIGJlZm9yZSAnICsgJ2NvbXBvbmVudERpZFVwZGF0ZS4gJyArICdUaGlzIG1pZ2h0IGVpdGhlciBiZSBiZWNhdXNlIG9mIGEgYnVnIGluIFJlYWN0LCBvciBiZWNhdXNlICcgKyAnYSBjb21wb25lbnQgcmVhc3NpZ25zIGl0cyBvd24gYHRoaXMuc3RhdGVgLiAnICsgJ1BsZWFzZSBmaWxlIGFuIGlzc3VlLicsIGdldENvbXBvbmVudE5hbWVGcm9tRmliZXIoZmluaXNoZWRXb3JrKSB8fCAnaW5zdGFuY2UnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICggZmluaXNoZWRXb3JrLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgICAgICAgICBpbnN0YW5jZS5jb21wb25lbnREaWRVcGRhdGUocHJldlByb3BzLCBwcmV2U3RhdGUsIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlKTtcbiAgICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGluc3RhbmNlLmNvbXBvbmVudERp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AgICAgLy8gVE9ETzogSSB0aGluayB0aGlzIGlzIG5vdyBhbHdheXMgbm9uLW51bGwgYnkgdGhlIHRpbWUgaXQgcmVhY2hlcyB0aGVcbiAgICAgICAgICAvLyBjb21taXQgcGhhc2UuIENvbnNpZGVyIHJlbW92aW5nIHRoZSB0eXBlIGNoZWNrLlxuICAgICAgICAgIHZhciBfdXBkYXRlUXVldWUgPSBmaW5pc2hlZFdvcmsudXBkYXRlUXVldWU7XG5cbiAgICAgICAgICBpZiAoX3VwZGF0ZVF1ZXVlICE9PSBudWxsKSB7XG4gICAgICAgICAgICB2YXIgX2luc3RhbmNlID0gbnVsbDtcblxuICAgICAgICAgICAgaWYgKGZpbmlzaGVkV29yay5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBzd2l0Y2ggKGZpbmlzaGVkV29yay5jaGlsZC50YWcpIHtcbiAgICAgICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgICAgICBfaW5zdGFuY2UgPSBnZXRQdWJsaWNJbnN0YW5jZShmaW5pc2hlZFdvcmsuY2hpbGQuc3RhdGVOb2RlKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgICAgICAgICAgICAgIF9pbnN0YW5jZSA9IGZpbmlzaGVkV29yay5jaGlsZC5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb21taXRVcGRhdGVRdWV1ZShmaW5pc2hlZFdvcmssIF91cGRhdGVRdWV1ZSwgX2luc3RhbmNlKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgX2luc3RhbmNlMiA9IGZpbmlzaGVkV29yay5zdGF0ZU5vZGU7IC8vIFJlbmRlcmVycyBtYXkgc2NoZWR1bGUgd29yayB0byBiZSBkb25lIGFmdGVyIGhvc3QgY29tcG9uZW50cyBhcmUgbW91bnRlZFxuICAgICAgICAgIC8vIChlZyBET00gcmVuZGVyZXIgbWF5IHNjaGVkdWxlIGF1dG8tZm9jdXMgZm9yIGlucHV0cyBhbmQgZm9ybSBjb250cm9scykuXG4gICAgICAgICAgLy8gVGhlc2UgZWZmZWN0cyBzaG91bGQgb25seSBiZSBjb21taXR0ZWQgd2hlbiBjb21wb25lbnRzIGFyZSBmaXJzdCBtb3VudGVkLFxuICAgICAgICAgIC8vIGFrYSB3aGVuIHRoZXJlIGlzIG5vIGN1cnJlbnQvYWx0ZXJuYXRlLlxuXG4gICAgICAgICAgaWYgKGN1cnJlbnQgPT09IG51bGwgJiYgZmluaXNoZWRXb3JrLmZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAgICB2YXIgdHlwZSA9IGZpbmlzaGVkV29yay50eXBlO1xuICAgICAgICAgICAgdmFyIHByb3BzID0gZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgICBjb21taXRNb3VudChfaW5zdGFuY2UyLCB0eXBlLCBwcm9wcyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAge1xuICAgICAgICAgIC8vIFdlIGhhdmUgbm8gbGlmZS1jeWNsZXMgYXNzb2NpYXRlZCB3aXRoIHRleHQuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAgICB7XG4gICAgICAgICAgLy8gV2UgaGF2ZSBubyBsaWZlLWN5Y2xlcyBhc3NvY2lhdGVkIHdpdGggcG9ydGFscy5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFByb2ZpbGVyOlxuICAgICAgICB7XG4gICAgICAgICAge1xuICAgICAgICAgICAgdmFyIF9maW5pc2hlZFdvcmskbWVtb2l6ZTIgPSBmaW5pc2hlZFdvcmsubWVtb2l6ZWRQcm9wcyxcbiAgICAgICAgICAgICAgICBvbkNvbW1pdCA9IF9maW5pc2hlZFdvcmskbWVtb2l6ZTIub25Db21taXQsXG4gICAgICAgICAgICAgICAgb25SZW5kZXIgPSBfZmluaXNoZWRXb3JrJG1lbW9pemUyLm9uUmVuZGVyO1xuICAgICAgICAgICAgdmFyIGVmZmVjdER1cmF0aW9uID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZS5lZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgIHZhciBjb21taXRUaW1lID0gZ2V0Q29tbWl0VGltZSgpO1xuICAgICAgICAgICAgdmFyIHBoYXNlID0gY3VycmVudCA9PT0gbnVsbCA/ICdtb3VudCcgOiAndXBkYXRlJztcblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBpZiAoaXNDdXJyZW50VXBkYXRlTmVzdGVkKCkpIHtcbiAgICAgICAgICAgICAgICBwaGFzZSA9ICduZXN0ZWQtdXBkYXRlJztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIG9uUmVuZGVyID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgIG9uUmVuZGVyKGZpbmlzaGVkV29yay5tZW1vaXplZFByb3BzLmlkLCBwaGFzZSwgZmluaXNoZWRXb3JrLmFjdHVhbER1cmF0aW9uLCBmaW5pc2hlZFdvcmsudHJlZUJhc2VEdXJhdGlvbiwgZmluaXNoZWRXb3JrLmFjdHVhbFN0YXJ0VGltZSwgY29tbWl0VGltZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvbkNvbW1pdCA9PT0gJ2Z1bmN0aW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Q6XG4gICAgICAgICAgICAgICAgICAgIHZhciByb290ID0gcGFyZW50RmliZXIuc3RhdGVOb2RlO1xuICAgICAgICAgICAgICAgICAgICByb290LmVmZmVjdER1cmF0aW9uICs9IGVmZmVjdER1cmF0aW9uO1xuICAgICAgICAgICAgICAgICAgICBicmVhayBvdXRlcjtcblxuICAgICAgICAgICAgICAgICAgY2FzZSBQcm9maWxlcjpcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBhcmVudFN0YXRlTm9kZSA9IHBhcmVudEZpYmVyLnN0YXRlTm9kZTtcbiAgICAgICAgICAgICAgICAgICAgcGFyZW50U3RhdGVOb2RlLmVmZmVjdER1cmF0aW9uICs9IGVmZmVjdER1cmF0aW9uO1xuICAgICAgICAgICAgICAgICAgICBicmVhayBvdXRlcjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBwYXJlbnRGaWJlciA9IHBhcmVudEZpYmVyLnJldHVybjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgU3VzcGVuc2VDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICBjb21taXRTdXNwZW5zZUh5ZHJhdGlvbkNhbGxiYWNrcyhmaW5pc2hlZFJvb3QsIGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBTdXNwZW5zZUxpc3RDb21wb25lbnQ6XG4gICAgICBjYXNlIEluY29tcGxldGVDbGFzc0NvbXBvbmVudDpcbiAgICAgIGNhc2UgU2NvcGVDb21wb25lbnQ6XG4gICAgICBjYXNlIE9mZnNjcmVlbkNvbXBvbmVudDpcbiAgICAgIGNhc2UgTGVnYWN5SGlkZGVuQ29tcG9uZW50OlxuICAgICAgY2FzZSBUcmFjaW5nTWFya2VyQ29tcG9uZW50OlxuICAgICAgICB7XG4gIC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Vyc2UgZG93biBpdHNcbiAgICAvLyBjaGlsZHJlbiB0byBmaW5kIGFsbCB0aGUgdGVybWluYWwgbm9kZXMuXG4gICAgdmFyIG5vZGUgPSBmaW5pc2hlZFdvcms7XG5cbiAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgaWYgKG5vZGUudGFnID09PSBIb3N0Q29tcG9uZW50KSB7XG4gICAgICAgIGlmIChob3N0U3VidHJlZVJvb3QgPT09IG51bGwpIHtcbiAgICAgICAgICBob3N0U3VidHJlZVJvb3QgPSBub2RlO1xuXG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHZhciBpbnN0YW5jZSA9IG5vZGUuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgICBpZiAoaXNIaWRkZW4pIHtcbiAgICAgICAgICAgICAgaGlkZUluc3RhbmNlKGluc3RhbmNlKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHVuaGlkZUluc3RhbmNlKG5vZGUuc3RhdGVOb2RlLCBub2RlLm1lbW9pemVkUHJvcHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAobm9kZS50YWcgPT09IEhvc3RUZXh0KSB7XG4gICAgICAgIGlmIChob3N0U3VidHJlZVJvb3QgPT09IG51bGwpIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgdmFyIF9pbnN0YW5jZTMgPSBub2RlLnN0YXRlTm9kZTtcblxuICAgICAgICAgICAgaWYgKGlzSGlkZGVuKSB7XG4gICAgICAgICAgICAgIGhpZGVUZXh0SW5zdGFuY2UoX2luc3RhbmNlMyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB1bmhpZGVUZXh0SW5zdGFuY2UoX2luc3RhbmNlMywgbm9kZS5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKChub2RlLnRhZyA9PT0gT2Zmc2NyZWVuQ29tcG9uZW50IHx8IG5vZGUudGFnID09PSBMZWdhY3lIaWRkZW5Db21wb25lbnQpICYmIG5vZGUubWVtb2l6ZWRTdGF0ZSAhPT0gbnVsbCAmJiBub2RlICE9PSBmaW5pc2hlZFdvcmspIDsgZWxzZSBpZiAobm9kZS5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICBub2RlLmNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICAgIG5vZGUgPSBub2RlLmNoaWxkO1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKG5vZGUgPT09IGZpbmlzaGVkV29yaykge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHdoaWxlIChub2RlLnNpYmxpbmcgPT09IG51bGwpIHtcbiAgICAgICAgaWYgKG5vZGUucmV0dXJuID09PSBudWxsIHx8IG5vZGUucmV0dXJuID09PSBmaW5pc2hlZFdvcmspIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaG9zdFN1YnRyZWVSb290ID09PSBub2RlKSB7XG4gICAgICAgICAgaG9zdFN1YnRyZWVSb290ID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIG5vZGUgPSBub2RlLnJldHVybjtcbiAgICAgIH1cblxuICAgICAgaWYgKGhvc3RTdWJ0cmVlUm9vdCA9PT0gbm9kZSkge1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pbGUgKHBhcmVudCAhPT0gbnVsbCkge1xuICAgICAgc3dpdGNoIChwYXJlbnQudGFnKSB7XG4gICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICB7XG4gICAgICAgICAgICBob3N0UGFyZW50ID0gcGFyZW50LnN0YXRlTm9kZTtcbiAgICAgICAgICAgIGhvc3RQYXJlbnRJc0NvbnRhaW5lciA9IGZhbHNlO1xuICAgICAgICAgICAgYnJlYWsgZmluZFBhcmVudDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAgICB7XG4gICAgICAgICAgICBob3N0UGFyZW50ID0gcGFyZW50LnN0YXRlTm9kZS5jb250YWluZXJJbmZvO1xuICAgICAgICAgICAgaG9zdFBhcmVudElzQ29udGFpbmVyID0gdHJ1ZTtcbiAgICAgICAgICAgIGJyZWFrIGZpbmRQYXJlbnQ7XG4gICAgICAgICAgfVxuXG4gICAgICAgIGNhc2UgSG9zdFBvcnRhbDpcbiAgICAgICAgICB7XG4gICAgICAgICAgICBob3N0UGFyZW50ID0gcGFyZW50LnN0YXRlTm9kZS5jb250YWluZXJJbmZvO1xuICAgICAgICAgICAgaG9zdFBhcmVudElzQ29udGFpbmVyID0gdHJ1ZTtcbiAgICAgICAgICAgIGJyZWFrIGZpbmRQYXJlbnQ7XG4gICAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBwYXJlbnQgPSBwYXJlbnQucmV0dXJuO1xuICAgIH1cblxuICAgIGlmIChob3N0UGFyZW50ID09PSBudWxsKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ0V4cGVjdGVkIHRvIGZpbmQgYSBob3N0IHBhcmVudC4gVGhpcyBlcnJvciBpcyBsaWtlbHkgY2F1c2VkIGJ5ICcgKyAnYSBidWcgaW4gUmVhY3QuIFBsZWFzZSBmaWxlIGFuIGlzc3VlLicpO1xuICAgIH1cblxuICAgIGNvbW1pdERlbGV0aW9uRWZmZWN0c09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1ZSA9IGRlbGV0ZWRGaWJlci51cGRhdGVRdWV1ZTtcblxuICAgICAgICAgIGlmICh1cGRhdGVRdWV1ZSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgdmFyIGxhc3RFZmZlY3QgPSB1cGRhdGVRdWV1ZS5sYXN0RWZmZWN0O1xuXG4gICAgICAgICAgICBpZiAobGFzdEVmZmVjdCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICB2YXIgZmlyc3RFZmZlY3QgPSBsYXN0RWZmZWN0Lm5leHQ7XG4gICAgICAgICAgICAgIHZhciBlZmZlY3QgPSBmaXJzdEVmZmVjdDtcblxuICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgdmFyIF9lZmZlY3QgPSBlZmZlY3QsXG4gICAgICAgICAgICAgICAgICAgIGRlc3Ryb3kgPSBfZWZmZWN0LmRlc3Ryb3ksXG4gICAgICAgICAgICAgICAgICAgIHRhZyA9IF9lZmZlY3QudGFnO1xuXG4gICAgICAgICAgICAgICAgaWYgKGRlc3Ryb3kgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgaWYgKCh0YWcgJiBJbnNlcnRpb24pICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZGVsZXRlZEZpYmVyLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHRhZyAmIExheW91dCkgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgbWFya0NvbXBvbmVudExheW91dEVmZmVjdFVubW91bnRTdGFydGVkKGRlbGV0ZWRGaWJlcik7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAoIGRlbGV0ZWRGaWJlci5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICBzdGFydExheW91dEVmZmVjdFRpbWVyKCk7XG4gICAgICAgICAgICAgICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZGVsZXRlZEZpYmVyLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcbiAgICAgICAgICAgICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihkZWxldGVkRmliZXIpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgIHNhZmVseUNhbGxEZXN0cm95KGRlbGV0ZWRGaWJlciwgbmVhcmVzdE1vdW50ZWRBbmNlc3RvciwgZGVzdHJveSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgbWFya0NvbXBvbmVudExheW91dEVmZmVjdFVubW91bnRTdG9wcGVkKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBlZmZlY3QgPSBlZmZlY3QubmV4dDtcbiAgICAgICAgICAgICAgfSB3aGlsZSAoZWZmZWN0ICE9PSBmaXJzdEVmZmVjdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmVjdXJzaXZlbHlUcmF2ZXJzZURlbGV0aW9uRWZmZWN0cyhmaW5pc2hlZFJvb3QsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlbGV0ZWRGaWJlcik7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgQ2xhc3NDb21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIGlmICghb2Zmc2NyZWVuU3VidHJlZVdhc0hpZGRlbikge1xuICAgICAgICAgIHNhZmVseURldGFjaFJlZihkZWxldGVkRmliZXIsIG5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b3RoZXIsXG4gICAgICAgICAgLy8gZS5nLiBhIGRlc3Ryb3kgZnVuY3Rpb24gaW4gb25lIGNvbXBvbmVudCBzaG91bGQgbmV2ZXIgb3ZlcnJpZGUgYSByZWYgc2V0XG4gICAgICAgICAgLy8gYnkgYSBjcmVhdGUgZnVuY3Rpb24gaW4gYW5vdGhlciBjb21wb25lbnQgZHVyaW5nIHRoZSBzYW1lIGNvbW1pdC5cblxuXG4gICAgICAgICAgaWYgKCBmaW5pc2hlZFdvcmsubW9kZSAmIFByb2ZpbGVNb2RlKSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICBzdGFydExheW91dEVmZmVjdFRpbWVyKCk7XG4gICAgICAgICAgICAgIGNvbW1pdEhvb2tFZmZlY3RMaXN0VW5tb3VudChMYXlvdXQgfCBIYXNFZmZlY3QsIGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybik7XG4gICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmVjb3JkTGF5b3V0RWZmZWN0RHVyYXRpb24oZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgY29tbWl0SG9va0VmZmVjdExpc3RVbm1vdW50KExheW91dCB8IEhhc0VmZmVjdCwgZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuKTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgIGNhcHR1cmVDb21taXRQaGFzZUVycm9yKGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybiwgZXJyb3IpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgQ2xhc3NDb21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIHJlY3Vyc2l2ZWx5VHJhdmVyc2VNdXRhdGlvbkVmZmVjdHMocm9vdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgY29tbWl0UmVjb25jaWxpYXRpb25FZmZlY3RzKGZpbmlzaGVkV29yayk7XG5cbiAgICAgICAgaWYgKGZsYWdzICYgUmVmKSB7XG4gICAgICAgICAgaWYgKGN1cnJlbnQgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHNhZmVseURldGFjaFJlZihjdXJyZW50LCBjdXJyZW50LnJldHVybik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAge1xuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlTXV0YXRpb25FZmZlY3RzKHJvb3QsIGZpbmlzaGVkV29yayk7XG4gICAgICAgIGNvbW1pdFJlY29uY2lsaWF0aW9uRWZmZWN0cyhmaW5pc2hlZFdvcmspO1xuXG4gICAgICAgIGlmIChmbGFncyAmIFJlZikge1xuICAgICAgICAgIGlmIChjdXJyZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgICBzYWZlbHlEZXRhY2hSZWYoY3VycmVudCwgY3VycmVudC5yZXR1cm4pO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHtcbiAgICAgICAgICAvLyBUT0RPOiBDb250ZW50UmVzZXQgZ2V0cyBjbGVhcmVkIGJ5IHRoZSBjaGlsZHJlbiBkdXJpbmcgdGhlIGNvbW1pdFxuICAgICAgICAgIC8vIHBoYXNlLiBUaGlzIGlzIGEgcmVmYWN0b3IgaGF6YXJkIGJlY2F1c2UgaXQgbWVhbnMgd2UgbXVzdCByZWFkXG4gICAgICAgICAgL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AgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGNvbW1pdFRleHRVcGRhdGUodGV4dEluc3RhbmNlLCBvbGRUZXh0LCBuZXdUZXh0KTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgIGNhcHR1cmVDb21taXRQaGFzZUVycm9yKGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybiwgZXJyb3IpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICB7XG4gICAgICAgIHJlY3Vyc2l2ZWx5VHJhdmVyc2VNdXRhdGlvbkVmZmVjdHMocm9vdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgY29tbWl0UmVjb25jaWxpYXRpb25FZmZlY3RzKGZpbmlzaGVkV29yayk7XG5cbiAgICAgICAgaWYgKGZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKGN1cnJlbnQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgdmFyIHByZXZSb290U3RhdGUgPSBjdXJyZW50Lm1lbW9pemVkU3RhdGU7XG5cbiAgICAgICAgICAgICAgaWYgKHByZXZSb290U3RhdGUuaXNEZWh5ZHJhdGVkKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgIGNvbW1pdEh5ZHJhdGVkQ29udGFpbmVyKHJvb3QuY29udGFpbmVySW5mbyk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgIGNhcHR1cmVDb21taXRQaGFzZUVycm9yKGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybiwgZXJyb3IpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfV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ZhciBvZmZzY3JlZW5Cb3VuZGFyeSA9IGZpbmlzaGVkV29yazsgLy8gVHJhY2sgdGhlIGN1cnJlbnQgc3RhdGUgb24gdGhlIE9mZnNjcmVlbiBpbnN0YW5jZSBzbyB3ZSBjYW5cbiAgICAgICAgICAvLyByZWFkIGl0IGR1cmluZyBhbiBldmVudFxuXG4gICAgICAgICAgX29mZnNjcmVlbkluc3RhbmNlLmlzSGlkZGVuID0gX2lzSGlkZGVuO1xuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKF9pc0hpZGRlbikge1xuICAgICAgICAgICAgICBpZiAoIV93YXNIaWRkZW4pIHtcbiAgICAgICAgICAgICAgICBpZiAoKG9mZnNjcmVlbkJvdW5kYXJ5Lm1vZGUgJiBDb25jdXJyZW50TW9kZSkgIT09IE5vTW9kZSkge1xuICAgICAgICAgICAgICAgICAgbmV4dEVmZmVjdCA9IG9mZnNjcmVlbkJvdW5kYXJ5O1xuICAgICAgICAgICAgICAgICAgdmFyIG9mZnNjcmVlbkNoaWxkID0gb2Zmc2NyZWVuQm91bmRhcnkuY2hpbGQ7XG5cbiAgICAgICAgICAgICAgICAgIHdoaWxlIChvZmZzY3JlZW5DaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBuZXh0RWZmZWN0ID0gb2Zmc2NyZWVuQ2hpbGQ7XG4gICAgICAgICAgICAgICAgICAgIGRpc2FwcGVhckxheW91dEVmZmVjdHNfYmVnaW4ob2Zmc2NyZWVuQ2hpbGQpO1xuICAgICAgICAgICAgICAgICAgICBvZmZzY3JlZW5DaGlsZCA9IG9mZnNjcmVlbkNoaWxkLnNpYmxpbmc7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAge1xuICAgICAgICAgICAgLy8gVE9ETzogVGhpcyBuZWVkcyB0byBydW4gd2hlbmV2ZXIgd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3VudChMYXlvdXQsIGZpYmVyLCBmaWJlci5yZXR1cm4pO1xuICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgcmVjb3JkTGF5b3V0RWZmZWN0RHVyYXRpb24oZmliZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdFVubW91bnQoTGF5b3V0LCBmaWJlciwgZmliZXIucmV0dXJuKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgLy8gVE9ETyAoT2Zmc2NyZWVuKSBDaGVjazogZmxhZ3MgJiBSZWZTdGF0aWNcbiAgICAgICAgICBzYWZlbHlEZXRhY2hSZWYoZmliZXIsIGZpYmVyLnJldHVybik7XG4gICAgICAgICAgdmFyIGluc3RhbmNlID0gZmliZXIuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgaWYgKHR5cGVvZiBpbnN0YW5jZS5jb21wb25lbnRXaWxsVW5tb3VudCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgc2FmZWx5Q2FsbENvbXBvbmVudFdpbGxVbm1vdW50KGZpYmVyLCBmaWJlci5yZXR1cm4sIGluc3RhbmNlKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICBzYWZlbHlEZXRhY2hSZWYoZmliZXIsIGZpYmVyLnJldHVybik7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBPZmZzY3JlZW5Db21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBDaGVjayBpZiB0aGlzIGlzIGFcbiAgICAgICAgICB2YXIgaXNIaWRk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F5b3V0RWZmZWN0TW91bnRJbkRFVihmaWJlcikge1xuICB7XG4gICAgLy8gV2UgZG9uJ3QgbmVlZCB0byByZS1jaGVjayBTdHJpY3RFZmZlY3RzTW9kZSBoZXJlLlxuICAgIC8vIFRoaXMgZnVuY3Rpb24gaXMgb25seSBjYWxsZWQgaWYgdGhhdCBjaGVjayBoYXMgYWxyZWFkeSBwYXNzZWQuXG4gICAgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgIGNhc2UgRnVuY3Rpb25Db21wb25lbnQ6XG4gICAgICBjYXNlIEZvcndhcmRSZWY6XG4gICAgICBjYXNlIFNpbXBsZU1lbW9Db21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29tbWl0SG9va0VmZmVjdExpc3RNb3VudChMYXlvdXQgfCBIYXNFZmZlY3QsIGZpYmVyKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmliZXIsIGZpYmVyLnJldHVybiwgZXJyb3IpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgQ2xhc3NDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgaW5zdGFuY2UgPSBmaWJlci5zdGF0ZU5vZGU7XG5cbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgaW5zdGFuY2UuY29tcG9uZW50RGlkTW91bnQoKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmliZXIsIGZpYmVyLnJldHVybiwgZXJyb3IpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgfVxuICB9XG59XG5cbmZ1bmN0aW9uIGludm9rZVBhc3NpdmVFZmZlY3RNb3Vud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ZGVyZWRWYWx1ZSA9IGNoZWNrLnZhbHVlO1xuXG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICBpZiAoIW9iamVjdElzKGdldFNuYXBzaG90KCksIHJlbmRlcmVkVmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgLy8gRm91bmQgYW4gaW5jb25zaXN0ZW50IHN0b3JlLlxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgLy8gSWYgYGdldFNuYXBzaG90YCB0aHJvd3MsIHJldHVybiBgZmFsc2VgLiBUaGlzIHdpbGwgc2NoZWR1bGVcbiAgICAgICAgICAgICAgLy8gYSByZS1yZW5kZXIsIGFuZCB0aGUgZXJyb3Igd2lsbCBiZSByZXRocm93biBkdXJpbmcgcmVuZGVyLlxuICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgdmFyIGNoaWxkID0gbm9kZS5jaGlsZDtcblxuICAgIGlmIChub2RlLnN1YnRyZWVGbGFncyAmIFN0b3JlQ29uc2lzdGVuY3kgJiYgY2hpbGQgIT09IG51bGwpIHtcbiAgICAgIGNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICBub2RlID0gY2hpbGQ7XG4gICAgICBjb250aW51ZTtcbiAgICB9XG5cbiAgICBpZiAobm9kZSA9PT0gZmluaXNoZWRXb3JrKSB7XG4gICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG5cbiAgICB3aGlsZSAobm9kZS5zaWJsaW5nID09PSBudWxsKSB7XG4gICAgICBpZiAobm9kZS5yZXR1cm4gPT09IG51bGwgfHwgbm9kZS5yZXR1cm4gPT09IGZpbmlzaGVkV29yaykge1xuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgIH1cblxuICAg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UNJTkdfTUFSS0VSX1RZUEU6XG5cbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1mYWxsdGhyb3VnaFxuXG4gICAgICBjYXNlIFJFQUNUX0RFQlVHX1RSQUNJTkdfTU9ERV9UWVBFOlxuXG4gICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tZmFsbHRocm91Z2hcblxuICAgICAgZGVmYXVsdDpcbiAgICAgICAge1xuICAgICAgICAgIGlmICh0eXBlb2YgdHlwZSA9PT0gJ29iamVjdCcgJiYgdHlwZSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgc3dpdGNoICh0eXBlLiQkdHlwZW9mKSB7XG4gICAgICAgICAgICAgIGNhc2UgUkVBQ1RfUFJPVklERVJfVFlQRTpcbiAgICAgICAgICAgICAgICBmaWJlclRhZyA9IENvbnRleHRQcm92aWRlcjtcbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9DT05URVhUX1RZUEU6XG4gICAgICAgICAgICAgICAgLy8gVGhpcyBpcyBhIGNvbnN1bWVyXG4gICAgICAgICAgICAgICAgZmliZXJUYWcgPSBDb250ZXh0Q29uc3VtZXI7XG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuXG4gICAgICAgICAgICAgIGNhc2UgUkVBQ1RfRk9SV0FSRF9SRUZfVFlQRTpcbiAgICAgICAgICAgICAgICBmaWJlclRhZyA9IEZvcndhcmRSZWY7XG5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICByZXNvbHZlZFR5cGUgPSByZXNvbHZlRm9yd2FyZFJlZkZvckhvdFJlbG9hZGluZyhyZXNvbHZlZFR5cGUpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGJyZWFrIGdldFRhZztcblxuICAgICAgICAgICAgICBjYXNlIFJFQUNUX01FTU9fVFlQRTpcbiAgICAgICAgICAgICAgICBmaWJlclRhZyA9IE1lbW9Db21wb25lbnQ7XG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuXG4gICAgICAgICAgICAgIGNhc2UgUkVBQ1RfTEFaWV9UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gTGF6eUNvbXBvbmVudDtcbiAgICAgICAgICAgICAgICByZXNvbHZlZFR5cGUgPSBudWxsO1xuICAgICAgICAgICAgICAgIGJyZWFrIGdldFRhZztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB2YXIgaW5mbyA9ICcnO1xuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKHR5cGUgPT09IHVuZGVmaW5lZCB8fCB0eXBlb2YgdHlwZSA9PT0gJ29iamVjdCcgJiYgdHlwZSAhPT0gbnVsbCAmJiBPYmplY3Qua2V5cyh0eXBlKS5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgaW5mbyArPSAnIFlvdSBsaWtlbHkgZm9yZ290IHRvIGV4cG9ydCB5b3VyIGNvbXBvbmVudCBmcm9tIHRoZSBmaWxlICcgKyBcIml0J3MgZGVmaW5lZCBpbiwgb3IgeW91IG1pZ2h0IGhhdmUgbWl4ZWQgdXAgZGVmYXVsdCBhbmQgXCIgKyAnbmFtZWQgaW1wb3J0cy4nO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgb3duZXJOYW1lID0gb3duZXIgPyBnZXRDb21wb25lbnROYW1lRnJvbUZpYmVyKG93bmVyKSA6IG51bGw7XG5cbiAgICAgICAgICAgIGlmIChvd25lck5hbWUpIHtcbiAgICAgICAgICAgICAgaW5mbyArPSAnXFxuXFxuQ2hlY2sgdGhlIHJlbmRlciBtZXRob2Qgb2YgYCcgKyBvd25lck5hbWUgKyAnYC4nO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRWxlbWVudCB0eXBl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OVElGSUVSID0gUisrXG5zcmNbTlVNRVJJQ0lERU5USUZJRVJdID0gJzB8WzEtOV1cXFxcZConXG52YXIgTlVNRVJJQ0lERU5USUZJRVJMT09TRSA9IFIrK1xuc3JjW05VTUVSSUNJREVOVElGSUVSTE9PU0VdID0gJ1xcXFxkKydcblxuLy8gIyMgTm9uLW51bWVyaWMgSWRlbnRpZmllclxuLy8gWmVybyBvciBtb3JlIGRpZ2l0cywgZm9sbG93ZWQgYnkgYSBsZXR0ZXIgb3IgaHlwaGVuLCBhbmQgdGhlbiB6ZXJvIG9yXG4vLyBtb3JlIGxldHRlcnMsIGRpZ2l0cywgb3IgaHlwaGVucy5cblxudmFyIE5PTk5VTUVSSUNJREVOVElGSUVSID0gUisrXG5zcmNbTk9OTlVNRVJJQ0lERU5USUZJRVJdID0gJ1xcXFxkKlthLXpBLVotXScgKyBMRVRURVJEQVNITlVNQkVSICsgJyonXG5cbi8vICMjIE1haW4gVmVyc2lvblxuLy8gVGhyZWUgZG90LXNlcGFyYXRlZCBudW1lcmljIGlkZW50aWZpZXJzLlxuXG52YXIgTUFJTlZFUlNJT04gPSBSKytcbnNyY1tNQUlOVkVSU0lPTl0gPSAnKCcgKyBzcmNbTlVNRVJJQ0lERU5USUZJRVJdICsgJylcXFxcLicgK1xuICAgICAgICAgICAgICAgICAgICcoJyArIHNyY1tOVU1FUklDSURFTlRJRklFUl0gKyAnKVxcXFwuJyArXG4gICAgICAgICAgICAgICAgICAgJygnICsgc3JjW05VTUVSSUNJREVOVElGSUVSXSArICcpJ1xuXG52YXIgTUFJTlZFUlNJT05MT09TRSA9IFIrK1xuc3JjW01BSU5WRVJTSU9OTE9PU0VdID0gJygnICsgc3JjW05VTUVSSUNJREVOVElGSUVSTE9PU0VdICsgJylcXFxcLicgK1xuICAgICAgICAgICAgICAgICAgICAgICAgJygnICsgc3JjW05VTUVSSUNJREVOVElGSUVSTE9PU0VdICsgJylcXFxcLicgK1xuICAgICAgICAgICAgICAgICAgICAgICAg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3JjW05VTUVSSUNJREVOVElGSUVSTE9PU0VdICsgJ3x4fFh8XFxcXConXG52YXIgWFJBTkdFSURFTlRJRklFUiA9IFIrK1xuc3JjW1hSQU5HRUlERU5USUZJRVJdID0gc3JjW05VTUVSSUNJREVOVElGSUVSXSArICd8eHxYfFxcXFwqJ1xuXG52YXIgWFJBTkdFUExBSU4gPSBSKytcbnNyY1tYUkFOR0VQTEFJTl0gPSAnW3Y9XFxcXHNdKignICsgc3JjW1hSQU5HRUlERU5USUZJRVJdICsgJyknICtcbiAgICAgICAgICAgICAgICAgICAnKD86XFxcXC4oJyArIHNyY1tYUkFOR0VJREVOVElGSUVSXSArICcpJyArXG4gICAgICAgICAgICAgICAgICAgJyg/OlxcXFwuKCcgKyBzcmNbWFJBTkdFSURFTlRJRklFUl0gKyAnKScgK1xuICAgICAgICAgICAgICAgICAgICcoPzonICsgc3JjW1BSRVJFTEVBU0VdICsgJyk/JyArXG4gICAgICAgICAgICAgICAgICAgc3JjW0JVSUxEXSArICc/JyArXG4gICAgICAgICAgICAgICAgICAgJyk/KT8nXG5cbnZhciBYUkFOR0VQTEFJTkxPT1NFID0gUisrXG5zcmNbWFJBTkdFUExBSU5MT09TRV0gPSAnW3Y9XFxcXHNdKignICsgc3JjW1hSQU5HRUlERU5USUZJRVJMT09TRV0gKyAnKScgK1xuICAgICAgICAgICAgICAgICAgICAgICAgJyg/OlxcXFwuKCcgKyBzcmNbWFJBTkdFSURFTlRJRklFUkxPT1NFXSArICcpJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAnKD86XFxcXC4oJyArIHNyY1tYUkFOR0VJREVOVElGSUVSTE9PU0VdICsgJyknICtcbiAgICAgICAgICAgICAgICAgICAgICAgICcoPzonICsgc3JjW1BSRVJFTEVBU0VMT09TRV0gKyAnKT8nICtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNyY1tCVUlMRF0gKyAnPycgK1xuICAgICAgICAgICAgICAgICAgICAgICAgJyk/KT8nXG5cbnZhciBYUk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2UgaWYgKGlzWChtKSkge1xuICAgICAgcmV0ID0gJz49JyArIE0gKyAnLjAuMCA8JyArICgrTSArIDEpICsgJy4wLjAnXG4gICAgfSBlbHNlIGlmIChpc1gocCkpIHtcbiAgICAgIGlmIChNID09PSAnMCcpIHtcbiAgICAgICAgcmV0ID0gJz49JyArIE0gKyAnLicgKyBtICsgJy4wIDwnICsgTSArICcuJyArICgrbSArIDEpICsgJy4wJ1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0ID0gJz49JyArIE0gKyAnLicgKyBtICsgJy4wIDwnICsgKCtNICsgMSkgKyAnLjAuMCdcbiAgICAgIH1cbiAgICB9IGVsc2UgaWYgKHByKSB7XG4gICAgICBkZWJ1ZygncmVwbGFjZUNhcmV0IHByJywgcHIpXG4gICAgICBpZiAoTSA9PT0gJzAnKSB7XG4gICAgICAgIGlmIChtID09PSAnMCcpIHtcbiAgICAgICAgICByZXQgPSAnPj0nICsgTSArICcuJyArIG0gKyAnLicgKyBwICsgJy0nICsgcHIgK1xuICAgICAgICAgICAgICAgICcgPCcgKyBNICsgJy4nICsgbSArICcuJyArICgrcCArIDEpXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmV0ID0gJz49JyArIE0gKyAnLicgKyBtICsgJy4nICsgcCArICctJyArIHByICtcbiAgICAgICAgICAgICAgICAnIDwnICsgTSArICcuJyArICgrbSArIDEpICsgJy4wJ1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXQgPSAnPj0nICsgTSArICcuJyArIG0gKyAnLicgKyBwICsgJy0nICsgcHIgK1xuICAgICAgICAgICAgICAnIDwnICsgKCtNICsgMSkgKyAnLjAuMCdcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgZGVidWcoJ25vIHByJylcbiAgICAgIGlmIChNID09PSAnMCcpIHtcbiAgICAgICAgaWYgKG0gPT09ICcwJykge1xuICAgICAgICAgIHJldCA9ICc+PScgKyBNICsgJy4nICsgbSArICcuJyArIHAgK1xuICAgICAgICAgICAgICAgICcgPCcgKyBNICsgJy4nICsgbSArICcuJyArICgrcCArIDEpXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmV0ID0gJz49JyArIE0gKyAnLicgKyBtICsgJy4nICsgcCArXG4gICAgICAgICAgICAgICAgJyA8JyArIE0gKyAnLicgKyAoK20gKyAxKSArICcuMCdcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0ID0gJz49JyArIE0gKyAnLicgKyBtICsgJy4nICsgcCArXG4gICAgICAgICAgICAgICcgPCcgKyAoK00gKyAxKSArICcuMC4wJ1xuICAgICAgfVxuICAgIH1cblxuICAgIGRlYnVnKCdjYXJldCByZXR1cm4nLCByZXQpXG4gICAgcmV0dXJuIHJldFxuICB9KVxufVxuXG5mdW5jdGlvbiByZXBsYWNlWFJhbmdlcyAoY29tcCwgb3B0aW9ucykge1xuICBkZWJ1ZygncmVwbGFjZVhSYW5nZXMnLCBjb21wLCBvcHRpb25zKVxuICByZXR1cm4gY29tcC5zcGxpdCgvXFxzKy8pLm1hcChmdW5jdGlvbiAoY29tcCkge1xuICAgIHJldHVybiByZXBsYWNlWFJhbmdlKGNvbXAsIG9wdGlvbnMpXG4gIH0pLmpvaW4oJyAnKVxufVxuXG5mdW5jdGlvbiByZXBsYWNlWFJhbmdlIChjb21wLCBvcHRpb25zKSB7XG4gIGNvbXAgPSBjb21wLnRyaW0oKVxuICB2YXIgciA9IG9wdGlvbnMubG9vc2UgPyBzYWZlUmVbWFJBTkdFTE9PU0VdIDogc2FmZVJlW1hSQU5HRV1cbiAgcmV0dXJuIGNvbXAucmVwbGFjZShyLCBmdW5jdGlvbiAocmV0LCBndGx0LCBNLCBtLCBwLCBwcikge1xuICAgIGRlYnVnKCd4UmFuZ2UnLCBjb21wLCByZXQsIGd0bHQsIE0sIG0sIHAsIHByKVxuICAgIHZhciB4TSA9IGlzWChNKVxuICAgIHZhciB4bSA9IHhNIHx8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3BlcmF0b3IpIHtcbiAgICAgICAgY2FzZSAnPic6XG4gICAgICAgICAgaWYgKGNvbXB2ZXIucHJlcmVsZWFzZS5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIGNvbXB2ZXIucGF0Y2grK1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjb21wdmVyLnByZXJlbGVhc2UucHVzaCgwKVxuICAgICAgICAgIH1cbiAgICAgICAgICBjb21wdmVyLnJhdyA9IGNvbXB2ZXIuZm9ybWF0KClcbiAgICAgICAgICAvKiBmYWxsdGhyb3VnaCAqL1xuICAgICAgICBjYXNlICcnOlxuICAgICAgICBjYXNlICc+PSc6XG4gICAgICAgICAgaWYgKCFtaW52ZXIgfHwgZ3QobWludmVyLCBjb21wdmVyKSkge1xuICAgICAgICAgICAgbWludmVyID0gY29tcHZlclxuICAgICAgICAgIH1cbiAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlICc8JzpcbiAgICAgICAgY2FzZSAnPD0nOlxuICAgICAgICAgIC8qIElnbm9yZSBtYXhpbXVtIHZlcnNpb25zICovXG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1VuZXhwZWN0ZWQgb3BlcmF0aW9uOiAnICsgY29tcGFyYXRvci5vcGVyYXRvcilcbiAgICAgIH1cbiAgICB9KVxuICB9XG5cbiAgaWYgKG1pbnZlciAmJiByYW5nZS50ZXN0KG1pbnZlcikpIHtcbiAgICByZXR1cm4gbWludmVyXG4gIH1cblxuICByZXR1cm4gbnVsbFxufVxuXG5leHBvcnRzLnZhbGlkUmFuZ2UgPSB2YWxpZFJhbmdlXG5mdW5jdGlvbiB2YWxpZFJhbmdlIChyYW5nZSwgb3B0aW9ucykge1xuICB0cnkge1xuICAgIC8vIFJldHVybiAnKicgaW5zdGVhZCBvZiAnJyBzbyB0a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ZW5ndGg7IGkgPCBsOyBpKysgKSB7XG4gICAgICAgICAgaWYgKCBpIGluIG9iaiAmJiBpdGVyYXRvci5jYWxsKCBjb250ZXh0LCBvYmpbaV0sIGksIG9iaiApID09PSBicmVha2VyICkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIGZvciAoIGtleSBpbiBvYmopIHtcbiAgICAgICAgICBpZiAoIGhhc093blByb3AuY2FsbCggb2JqLCBrZXkgKSApIHtcbiAgICAgICAgICAgIGlmICggaXRlcmF0b3IuY2FsbCAoY29udGV4dCwgb2JqW2tleV0sIGtleSwgb2JqICkgPT09IGJyZWFrZXIgKSB7XG4gICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuICAgIGV4dGVuZCA6IGZ1bmN0aW9uKCBvYmogKSB7XG4gICAgICB0aGlzLmZvckVhY2goIHNsaWNlLmNhbGwoIGFyZ3VtZW50cywgMSApLCBmdW5jdGlvbiAoIHNvdXJjZSApIHtcbiAgICAgICAgZm9yICggdmFyIHByb3AgaW4gc291cmNlICkge1xuICAgICAgICAgIG9ialtwcm9wXSA9IHNvdXJjZVtwcm9wXTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gb2JqO1xuICAgIH1cbiAgfTtcbiAgLy8gRU5EIE1pbmlhdHVyZSB1bmRlcnNjb3JlIGltcGxcblxuICAvLyBKZWQgaXMgYSBjb25zdHJ1Y3RvciBmdW5jdGlvblxuICB2YXIgSmVkID0gZnVuY3Rpb24gKCBvcHRpb25zICkge1xuICAgIC8vIFNvbWUgbWluaW1hbCBkZWZhdWx0c1xuICAgIHRoaXMuZGVmYXVsdHMgPSB7XG4gICAgICBcImxvY2FsZV9kYXRhXCIgOiB7XG4gICAgICAgIFwibWVzc2FnZXNcIiA6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zl0gcHJvcGVydHkgXCIlc1wiIGRvZXMgbm90IGV4aXN0JywgbWF0Y2hbMl1ba10pKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBhcmcgPSBhcmdbbWF0Y2hbMl1ba11dO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBlbHNlIGlmIChtYXRjaFsxXSkgeyAvLyBwb3NpdGlvbmFsIGFyZ3VtZW50IChleHBsaWNpdClcbiAgICAgICAgICAgIGFyZyA9IGFyZ3ZbbWF0Y2hbMV1dO1xuICAgICAgICAgIH1cbiAgICAgICAgICBlbHNlIHsgLy8gcG9zaXRpb25hbCBhcmd1bWVudCAoaW1wbGljaXQpXG4gICAgICAgICAgICBhcmcgPSBhcmd2W2N1cnNvcisrXTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoL1tec10vLnRlc3QobWF0Y2hbOF0pICYmIChnZXRfdHlwZShhcmcpICE9ICdudW1iZXInKSkge1xuICAgICAgICAgICAgdGhyb3coc3ByaW50ZignW3NwcmludGZdIGV4cGVjdGluZyBudW1iZXIgYnV0IGZvdW5kICVzJywgZ2V0X3R5cGUoYXJnKSkpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIC8vIEplZCBFRElUXG4gICAgICAgICAgaWYgKCB0eXBlb2YgYXJnID09ICd1bmRlZmluZWQnIHx8IGFyZyA9PT0gbnVsbCApIHtcbiAgICAgICAgICAgIGFyZyA9ICcnO1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLyBKZWQgRURJVFxuXG4gICAgICAgICAgc3dpdGNoIChtYXRjaFs4XSkge1xuICAgICAgICAgICAgY2FzZSAnYic6IGFyZyA9IGFyZy50b1N0cmluZygyKTsgYnJlYWs7XG4gICAgICAgICAgICBjYXNlICdjJzogYXJnID0gU3RyaW5nLmZyb21DaGFyQ29kZShhcmcpOyBicmVhaztcbiAgICAgICAgICAgIGNhc2UgJ2QnOiBhcmcgPSBwYXJzZUludChhcmcsID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FthLXpfXVthLXpfXFxkXSopL2kuZXhlYyhyZXBsYWNlbWVudF9maWVsZCkpICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIGZpZWxkX2xpc3QucHVzaChmaWVsZF9tYXRjaFsxXSk7XG4gICAgICAgICAgICAgIHdoaWxlICgocmVwbGFjZW1lbnRfZmllbGQgPSByZXBsYWNlbWVudF9maWVsZC5zdWJzdHJpbmcoZmllbGRfbWF0Y2hbMF0ubGVuZ3RoKSkgIT09ICcnKSB7XG4gICAgICAgICAgICAgICAgaWYgKChmaWVsZF9tYXRjaCA9IC9eXFwuKFthLXpfXVthLXpfXFxkXSopL2kuZXhlYyhyZXBsYWNlbWVudF9maWVsZCkpICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICBmaWVsZF9saXN0LnB1c2goZmllbGRfbWF0Y2hbMV0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmICgoZmllbGRfbWF0Y2ggPSAvXlxcWyhcXGQrKVxcXS8uZXhlYyhyZXBsYWNlbWVudF9maWVsZCkpICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICBmaWVsZF9saXN0LnB1c2goZmllbGRfbWF0Y2hbMV0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIHRocm93KCdbc3ByaW50Zl0gaHVoPycpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgIHRocm93KCdbc3ByaW50Zl0gaHVoPycpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbWF0Y2hbMl0gPSBmaWVsZF9saXN0O1xuICAgICAgICAgIH1cbiAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGFyZ19uYW1lcyB8PSAyO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoYXJnX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5QRi5leHRyYWN0UGx1cmFsRXhwciggcCApO1xuICAgIHJldHVybiBKZWQuUEYucGFyc2VyLnBhcnNlLmNhbGwoSmVkLlBGLnBhcnNlciwgcGx1cmFsX3N0cik7XG4gIH07XG5cbiAgSmVkLlBGLmNvbXBpbGUgPSBmdW5jdGlvbiAoIHAgKSB7XG4gICAgLy8gSGFuZGxlIHRydWVzIGFuZCBmYWxzZXMgYXMgMCBhbmQgMVxuICAgIGZ1bmN0aW9uIGltcGx5KCB2YWwgKSB7XG4gICAgICByZXR1cm4gKHZhbCA9PT0gdHJ1ZSA/IDEgOiB2YWwgPyB2YWwgOiAwKTtcbiAgICB9XG5cbiAgICB2YXIgYXN0ID0gSmVkLlBGLnBhcnNlKCBwICk7XG4gICAgcmV0dXJuIGZ1bmN0aW9uICggbiApIHtcbiAgICAgIHJldHVybiBpbXBseSggSmVkLlBGLmludGVycHJldGVyKCBhc3QgKSggbiApICk7XG4gICAgfTtcbiAgfTtcblxuICBKZWQuUEYuaW50ZXJwcmV0ZXIgPSBmdW5jdGlvbiAoIGFzdCApIHtcbiAgICByZXR1cm4gZnVuY3Rpb24gKCBuICkge1xuICAgICAgdmFyIHJlcztcbiAgICAgIHN3aXRjaCAoIGFzdC50eXBlICkge1xuICAgICAgICBjYXNlICdHUk9VUCc6XG4gICAgICAgICAgcmV0dXJuIEplZC5QRi5pbnRlcnByZXRlciggYXN0LmV4cHIgKSggbiApO1xuICAgICAgICBjYXNlICdURVJOQVJZJzpcbiAgICAgICAgICBpZiAoIEplZC5QRi5pbnRlcnByZXRlciggYXN0LmV4cHIgKSggbiApICkge1xuICAgICAgICAgICAgcmV0dXJuIEplZC5QRi5pbnRlcnByZXRlciggYXN0LnRydXRoeSApKCBuICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBKZWQuUEYuaW50ZXJwcmV0ZXIoIGFzdC5mYWxzZXkgKSggbiApO1xuICAgICAgICBjYXNlICdPUic6XG4gICAgICAgICAgcmV0dXJuIEplZC5QRi5pbnRlcnByZXRlciggYXN0LmxlZnQgKSggbiApIHx8IEplZC5QRi5pbnRlcnByZXRlciggYXN0LnJpZ2h0ICkoIG4gKTtcbiAgICAgICAgY2FzZSAnQU5EJzpcbiAgICAgICAgICByZXR1cm4gSmVkLlBGLmludGVycHJldGVyKCBhc3QubGVmdCApKCBuICkgJiYgSmVkLlBGLmludGVycHJldGVyKCBhc3QucmlnaHQgKSggbiApO1xuICAgICAgICBjYXNlICdMVCc6XG4gICAgICAgICAgcmV0dXJuIEplZC5QRi5pbnRlcnByZXRlciggYXN0LmxlZnQgKSggbiApIDwgSmVkLlBGLmludGVycHJldGVyKCBhc3QucmlnaHQgKSggbiApO1xuICAgICAgICBjYXNlICdHVCc6XG4gICAgICAgICAgcmV0dXJuIEplZC5QRi5pbnRlcnByZXRlciggYXN0LmxlZnQgKSggbiApID4gSmVkLlBGLmludGVycHJldGVyKCBhc3QucmlnaHQgKSggbiApO1xuICAgICAgICBjYXNlICdMVEUnOlxuICAgICAgICAgIHJldHVybiBKZWQuUEYuaW50ZXJwcmV0ZXIoIGFzdC5sZWZ0ICkoIG4gKSA8PSBKZWQuUEYuaW50ZXJwcmV0ZXIoIGFzdC5yaWdodCApKCBuICk7XG4gICAgICAgIGNhc2UgJ0dURSc6XG4gICAgICAgICAgcmV0dXJuIEplZC5QRi5pbnRlcnByZXRlciggYXN0LmxlZnQgKSggbiApID49IEplZC5QRi5pbnRlcnByZXRlciggYXN0LnJpZ2h0ICkoIG4gKTtcbiAgICAgICAgY2FzZSAnRVEnOlxuICAgICAgICAgIHJldHVybiBKZWQuUEYuaW50ZXJwcmV0ZXIoIGFzdC5sZWZ0ICkoIG4gKSA9PSBKZWQuUEYuaW50ZXJwcmV0ZXIoIGFzdC5yaWdodCApKCBuICk7XG4gICAgICAgIGNhc2UgJ05FUSc6XG4gICAgICAgICAgcmV0dXJuIEplZC5QRi5pbnRlcnByZXRlciggYXN0LmxlZnQgKSggbiApICE9IEplZC5QRi5pb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YWN0aW9uID09PSAndW5kZWZpbmVkJyB8fCAhYWN0aW9uLmxlbmd0aCB8fCAhYWN0aW9uWzBdKSB7XG5cbiAgICAgICAgICAgIGlmICghcmVjb3ZlcmluZykge1xuICAgICAgICAgICAgICAgIC8vIFJlcG9ydCBlcnJvclxuICAgICAgICAgICAgICAgIGV4cGVjdGVkID0gW107XG4gICAgICAgICAgICAgICAgZm9yIChwIGluIHRhYmxlW3N0YXRlXSkgaWYgKHRoaXMudGVybWluYWxzX1twXSAmJiBwID4gMikge1xuICAgICAgICAgICAgICAgICAgICBleHBlY3RlZC5wdXNoKFwiJ1wiK3RoaXMudGVybWluYWxzX1twXStcIidcIik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBlcnJTdHIgPSAnJztcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5sZXhlci5zaG93UG9zaXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgZXJyU3RyID0gJ1BhcnNlIGVycm9yIG9uIGxpbmUgJysoeXlsaW5lbm8rMSkrXCI6XFxuXCIrdGhpcy5sZXhlci5zaG93UG9zaXRpb24oKStcIlxcbkV4cGVjdGluZyBcIitleHBlY3RlZC5qb2luKCcsICcpICsgXCIsIGdvdCAnXCIgKyB0aGlzLnRlcm1pbmFsc19bc3ltYm9sXSsgXCInXCI7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZXJyU3RyID0gJ1BhcnNlIGVycm9yIG9uIGxpbmUgJysoeXlsaW5lbm8rMSkrXCI6IFVuZXhwZWN0ZWQgXCIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzeW1ib2wgPT0gMSAvKkVPRiovID8gXCJlbmQgb2YgaW5wdXRcIiA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFwiJ1wiKyh0aGlzLnRlcm1pbmFsc19bc3ltYm9sXSB8fCBzeW1ib2wpK1wiJ1wiKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMucGFyc2VFcnJvcihlcnJTdHIsXG4gICAgICAgICAgICAgICAgICAgIHt0ZXh0OiB0aGlzLmxleGVyLm1hdGNoLCB0b2tlbjogdGhpcy50ZXJtaW5hbHNfW3N5bWJvbF0gfHwgc3ltYm9sLCBsaW5lOiB0aGlzLmxleGVyLnl5bGluZW5vLCBsb2M6IHl5bG9jLCBleHBlY3RlZDogZXhwZWN0ZWR9KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8ganVzdCByZWNvdmVyZWQgZnJvbSBhbm90aGVyIGVycm9yXG4gICAgICAgICAgICBpZiAocmVjb3ZlcmluZyA9PSAzKSB7XG4gICAgICAgICAgICAgICAgaWYgKHN5bWJvbCA9PSBFT0YpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGVyclN0ciB8fCAnUGFyc2luZyBoYWx0ZWQuJyk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZGlzY2FyZCBjdXJyZW50IGxvb2thaGVhZCBhbmQgZ3JhYiBhbm90aGVyXG4gICAgICAgICAgICAgICAgeXlsZW5nID0gdGhpcy5sZXhlci55eWxlbmc7XG4gICAgICAgICAgICAgICAgeXl0ZXh0ID0gdGhpcy5sZXhlci55eXRleHQ7XG4gICAgICAgICAgICAgICAgeXlsaW5lbm8gPSB0aGlzLmxleGVyLnl5bGluZW5vO1xuICAgICAgICAgICAgICAgIHl5bG9jID0gdGhpcy5sZXhlci55eWxsb2M7XG4gICAgICAgICAgICAgICAgc3ltYm9sID0gbGV4KCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIHRyeSB0byByZWNvdmVyIGZyb20gZXJyb3JcbiAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgLy8gY2hlY2sgZm9yIGVycm9yIHJlY292ZXJ5IHJ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ICAgICAgdGhyb3cgbmV3IEVycm9yKCdQYXJzZSBFcnJvcjogbXVsdGlwbGUgYWN0aW9ucyBwb3NzaWJsZSBhdCBzdGF0ZTogJytzdGF0ZSsnLCB0b2tlbjogJytzeW1ib2wpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3dpdGNoIChhY3Rpb25bMF0pIHtcblxuICAgICAgICAgICAgY2FzZSAxOiAvLyBzaGlmdFxuICAgICAgICAgICAgICAgIC8vdGhpcy5zaGlmdENvdW50Kys7XG5cbiAgICAgICAgICAgICAgICBzdGFjay5wdXNoKHN5bWJvbCk7XG4gICAgICAgICAgICAgICAgdnN0YWNrLnB1c2godGhpcy5sZXhlci55eXRleHQpO1xuICAgICAgICAgICAgICAgIGxzdGFjay5wdXNoKHRoaXMubGV4ZXIueXlsbG9jKTtcbiAgICAgICAgICAgICAgICBzdGFjay5wdXNoKGFjdGlvblsxXSk7IC8vIHB1c2ggc3RhdGVcbiAgICAgICAgICAgICAgICBzeW1ib2wgPSBudWxsO1xuICAgICAgICAgICAgICAgIGlmICghcHJlRXJyb3JTeW1ib2wpIHsgLy8gbm9ybWFsIGV4ZWN1dGlvbi9ubyBlcnJvclxuICAgICAgICAgICAgICAgICAgICB5eWxlbmcgPSB0aGlzLmxleGVyLnl5bGVuZztcbiAgICAgICAgICAgICAgICAgICAgeXl0ZXh0ID0gdGhpcy5sZXhlci55eXRleHQ7XG4gICAgICAgICAgICAgICAgICAgIHl5bGluZW5vID0gdGhpcy5sZXhlci55eWxpbmVubztcbiAgICAgICAgICAgICAgICAgICAgeXlsb2MgPSB0aGlzLmxleGVyLnl5bGxvYztcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlY292ZXJpbmcgPiAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmVjb3ZlcmluZy0tO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7IC8vIGVycm9yIGp1c3Qgb2NjdXJyZWQsIHJlc3VtZSBvbGQgbG9va2FoZWFkIGYvIGJlZm9yZSBlcnJvclxuICAgICAgICAgICAgICAgICAgICBzeW1ib2wgPSBwcmVFcnJvclN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgcHJlRXJyb3JTeW1ib2wgPSBudWxsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAyOiAvLyByZWR1Y2VcbiAgICAgICAgICAgICAgICAvL3RoaXMucmVkdWN0aW9uQ291bnQrKztcblxuICAgICAgICAgICAgICAgIGxlbiA9IHRoaXMucHJvZHVjdGlvbnNfW2FjdGlvblsxXV1bMV07XG5cbiAgICAgICAgICAgICAgICAvLyBwZXJmb3JtIHNlbWFudGljIGFjdGlvblxuICAgICAgICAgICAgICAgIHl5dmFsLiQgPSB2c3RhY2tbdnN0YWNrLmxlbmd0aC1sZW5dOyAvLyBkZWZhdWx0IHRvICQkID0gJDFcbiAgICAgICAgICAgICAgICAvLyBkZWZhdWx0IGxvY2F0aW9uLCB1c2VzIGZpcnN0IHRva2VuIGZvciBmaXJzdHMsIGxhc3QgZm9yIGxhc3RzXG4gICAgICAgICAgICAgICAgeXl2YWwuXyQgPSB7XG4gICAgICAgICAgICAgICAgICAgIGZpcnN0X2xpbmU6IGxzdGFja1tsc3RhY2subGVuZ3RoLShsZW58fDEpXS5maXJzdF9saW5lLFxuICAgICAgICAgICAgICAgICAgICBsYXN0X2xpbmU6IGxzdGFja1tsc3RhY2subGVuZ3RoLTFdLmxhc3RfbGluZSxcbiAgICAgICAgICAgICAgICAgICAgZmlyc3RfY29sdW1uOiBsc3RhY2tbbHN0YWNrLmxlbmd0aC0obGVufHwxKV0uZmlyc3RfY29sdW1uLFxuICAgICAgICAgICAgICAgICAgICBsYXN0X2NvbHVtbjogbHN0YWNrW2xzdGFjay5sZW5ndGgtMV0ubGFzdF9jb2x1bW5cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHIgPSB0aGlzLnBlcmZvcm1BY3Rpb24uY2FsbCh5eXZhbCwgeXl0ZXh0LCB5eWxlbmcsIHl5bGluZW5vLCB0aGlzLnl5LCBhY3Rpb25bMV0sIHZzdGFjaywgbHN0YWNrKTtcblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgciAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHI7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gcG9wIG9mZiBzdGFja1xuICAgICAgICAgICAgICAgIGlmIChsZW4pIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2sgPSBzdGFjay5zbGljZSgwLC0xKmxlbioyKTtcbiAgICAgICAgICAgICAgICAgICAgdnN0YWNrID0gdnN0YWNrLnNsaWNlKDAsIC0xKmxlbik7XG4gICAgICAgICAgICAgICAgICAgIGxzdGFjayA9IGxzdGFjay5zbGljZSgwLCAtMSpsZW4pO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHN0YWNrLnB1c2godGhpcy5wcm9kdWN0aW9uc19bYWN0aW9uWzFdXVswXSk7ICAgIC8vIHB1c2ggbm9udGVybWluYWwgKHJlZHVjZSlcbiAgICAgICAgICAgICAgICB2c3RhY2sucHVzaCh5eXZhbC4kKTtcbiAgICAgICAgICAgICAgICBsc3RhY2sucHVzaCh5eXZhbC5fJCk7XG4gICAgICAgICAgICAgICAgLy8gZ290byBuZXcgc3RhdGUgPSB0YWJsZVtTVEFURV1bTk9OVEVSTUlOQUxdXG4gICAgICAgICAgICAgICAgbmV3U3RhdGUgPSB0YWJsZVtzdGFja1tzdGFjay5sZW5ndGgtMl1dW3N0YWNrW3N0YWNrLmxlbmd0aC0xXV07XG4gICAgICAgICAgICAgICAgc3RhY2sucHVzaChuZXdTdGF0ZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgMzogLy8gYWNjZXB0XG4gICAgICAgICAgICAgICAgcmV0dXJ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AgICAgICAgdmFyIHByZSA9IHRoaXMucGFzdElucHV0KCk7XG4gICAgICAgIHZhciBjID0gbmV3IEFycmF5KHByZS5sZW5ndGggKyAxKS5qb2luKFwiLVwiKTtcbiAgICAgICAgcmV0dXJuIHByZSArIHRoaXMudXBjb21pbmdJbnB1dCgpICsgXCJcXG5cIiArIGMrXCJeXCI7XG4gICAgfSxcbm5leHQ6ZnVuY3Rpb24gKCkge1xuICAgICAgICBpZiAodGhpcy5kb25lKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5FT0Y7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCF0aGlzLl9pbnB1dCkgdGhpcy5kb25lID0gdHJ1ZTtcblxuICAgICAgICB2YXIgdG9rZW4sXG4gICAgICAgICAgICBtYXRjaCxcbiAgICAgICAgICAgIGNvbCxcbiAgICAgICAgICAgIGxpbmVzO1xuICAgICAgICBpZiAoIXRoaXMuX21vcmUpIHtcbiAgICAgICAgICAgIHRoaXMueXl0ZXh0ID0gJyc7XG4gICAgICAgICAgICB0aGlzLm1hdGNoID0gJyc7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHJ1bGVzID0gdGhpcy5fY3VycmVudFJ1bGVzKCk7XG4gICAgICAgIGZvciAodmFyIGk9MDtpIDwgcnVsZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIG1hdGNoID0gdGhpcy5faW5wdXQubWF0Y2godGhpcy5ydWxlc1tydWxlc1tpXV0pO1xuICAgICAgICAgICAgaWYgKG1hdGNoKSB7XG4gICAgICAgICAgICAgICAgbGluZXMgPSBtYXRjaFswXS5tYXRjaCgvXFxuLiovZyk7XG4gICAgICAgICAgICAgICAgaWYgKGxpbmVzKSB0aGlzLnl5bGluZW5vICs9IGxpbmVzLmxlbmd0aDtcbiAgICAgICAgICAgICAgICB0aGlzLnl5bGxvYyA9IHtmaXJzdF9saW5lOiB0aGlzLnl5bGxvYy5sYXN0X2xpbmUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdF9saW5lOiB0aGlzLnl5bGluZW5vKzEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlyc3RfY29sdW1uOiB0aGlzLnl5bGxvYy5sYXN0X2NvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0X2NvbHVtbjogbGluZXMgPyBsaW5lc1tsaW5lcy5sZW5ndGgtMV0ubGVuZ3RoLTEgOiB0aGlzLnl5bGxvYy5sYXN0X2NvbHVtbiArIG1hdGNoWzBdLmxlbmd0aH1cbiAgICAgICAgICAgICAgICB0aGlzLnl5dGV4dCArPSBtYXRjaFswXTtcbiAgICAgICAgICAgICAgICB0aGlzLm1hdGNoICs9IG1hdGNoWzBdO1xuICAgICAgICAgICAgICAgIHRoaXMubWF0Y2hlcyA9IG1hdGNoO1xuICAgICAgICAgICAgICAgIHRoaXMueXlsZW5nID0gdGhpcy55eXRleHQubGVuZ3RoO1xuICAgICAgICAgICAgICAgIHRoaXMuX21vcmUgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB0aGlzLl9pbnB1dCA9IHRoaXMuX2lucHV0LnNsaWNlKG1hdGNoWzBdLmxlbmd0aCk7XG4gICAgICAgICAgICAgICAgdGhpcy5tYXRjaGVkICs9IG1hdGNoWzBdO1xuICAgICAgICAgICAgICAgIHRva2VuID0gdGhpcy5wZXJmb3JtQWN0aW9uLmNhbGwodGhpcywgdGhpcy55eSwgdGhpcywgcnVsZXNbaV0sdGhpcy5jb25kaXRpb25TdGFja1t0aGlzLmNvbmRpdGlvblN0YWNrLmxlbmd0aC0xXSk7XG4gICAgICAgICAgICAgICAgaWYgKHRva2VuKSByZXR1cm4gdG9rZW47XG4gICAgICAgICAgICAgICAgZWxzZSByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuX2lucHV0ID09PSBcIlwiKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5FT0Y7XG4g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mJiB0eXBlb2YgU3ltYm9sID09PSBcImZ1bmN0aW9uXCIgJiYgb2JqLmNvbnN0cnVjdG9yID09PSBTeW1ib2wgJiYgb2JqICE9PSBTeW1ib2wucHJvdG90eXBlID8gXCJzeW1ib2xcIiA6IHR5cGVvZiBvYmo7IH07IC8qKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogRXh0ZXJuYWwgRGVwZW5kZW5jaWVzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cblxuXG4vKipcbiAqIEludGVybmFsIERlcGVuZGVuY2llc1xuICovXG5cblxudmFyIF9yZWFjdCA9IHJlcXVpcmUoJ3JlYWN0Jyk7XG5cbnZhciBfcmVhY3QyID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfcmVhY3QpO1xuXG52YXIgX3JlYWN0QWRkb25zQ3JlYXRlRnJhZ21lbnQgPSByZXF1aXJlKCdyZWFjdC1hZGRvbnMtY3JlYXRlLWZyYWdtZW50Jyk7XG5cbnZhciBfcmVhY3RBZGRvbnNDcmVhd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wcm90b1tuYW1lXSA9IGNyZWF0ZUNoYWluZWRGdW5jdGlvbihwcm90b1tuYW1lXSwgcHJvcGVydHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBwcm90b1tuYW1lXSA9IHByb3BlcnR5O1xuICAgICAgICAgICAgaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicpIHtcbiAgICAgICAgICAgICAgLy8gQWRkIHZlcmJvc2UgZGlzcGxheU5hbWUgdG8gdGhlIGZ1bmN0aW9uLCB3aGljaCBoZWxwcyB3aGVuIGxvb2tpbmdcbiAgICAgICAgICAgICAgLy8gYXQgcHJvZmlsaW5nIHRvb2xzLlxuICAgICAgICAgICAgICBpZiAodHlwZW9mIHByb3BlcnR5ID09PSAnZnVuY3Rpb24nICYmIHNwZWMuZGlzcGxheU5hbWUpIHtcbiAgICAgICAgICAgICAgICBwcm90b1tuYW1lXS5kaXNwbGF5TmFtZSA9IHNwZWMuZGlzcGxheU5hbWUgKyAnXycgKyBuYW1lO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgZnVuY3Rpb24gbWl4U3RhdGljU3BlY0ludG9Db21wb25lbnQoQ29uc3RydWN0b3IsIHN0YXRpY3MpIHtcbiAgICBpZiAoIXN0YXRpY3MpIHtcbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICBmb3IgKHZhciBuYW1lIGluIHN0YXRpY3MpIHtcbiAgICAgIHZhciBwcm9wZXJ0eSA9IHN0YXRpY3NbbmFtZV07XG4gICAgICBpZiAoIXN0YXRpY3MuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcbiAgICAgICAgY29udGludWU7XG4gICAgICB9XG5cbiAgICAgIHZhciBpc1Jlc2VydmVkID0gbmFtZSBpbiBSRVNFUlZFRF9TUEVDX0tFWVM7XG4gIC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BzbyB5b3UgY2FuIHNhZmVseSByZW1vdmUgdGhpcyBjYWxsLiBTZWUgJXMnLFxuICAgICAgICAgICAgICBjb21wb25lbnROYW1lXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gYm91bmRNZXRob2Q7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHJlYm91bmRNZXRob2QgPSBfYmluZC5hcHBseShib3VuZE1ldGhvZCwgYXJndW1lbnRzKTtcbiAgICAgICAgcmVib3VuZE1ldGhvZC5fX3JlYWN0Qm91bmRDb250ZXh0ID0gY29tcG9uZW50O1xuICAgICAgICByZWJvdW5kTWV0aG9kLl9fcmVhY3RCb3VuZE1ldGhvZCA9IG1ldGhvZDtcbiAgICAgICAgcmVib3VuZE1ldGhvZC5fX3JlYWN0Qm91bmRBcmd1bWVudHMgPSBhcmdzO1xuICAgICAgICByZXR1cm4gcmVib3VuZE1ldGhvZDtcbiAgICAgIH07XG4gICAgfVxuICAgIHJldHVybiBib3VuZE1ldGhvZDtcbiAgfVxuXG4gIC8qKlxuICAgKiBCaW5kcyBhbGwgYXV0by1ib3VuZCBtZXRob2RzIGluIGEgY29tcG9uZW50LlxuICAgKlxuICAgKiBAcGFyYW0ge29iamVjdH0gY29tcG9uZW50IENvbXBvbmVudCB3aG9zZSBtZXRob2QgaXMgZ29pbmcgdG8gYmUgYm91bmQuXG4gICAqL1xuICBmdW5jdGlvbiBiaW5kQXV0b0JpbmRNZXRob2RzKGNvbXBvbmVudCkge1xuICAgIHZhciBwYWlycyA9IGNvbXBvbmVudC5fX3JlYWN0QXV0b0JpbmRQYWlycztcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHBhaXJzLmxlbmd0aDsgaSArPSAyKSB7XG4gICAgICB2YXIgYXV0b0JpbmRLZXkgPSBwYWlyc1tpXTtcbiAgICAgIHZhciBtZXRob2QgPSBwYWlyc1tpICsgMV07XG4gICAgICBjb21wb25lbnRbYXV0b0JpbmRLZXldID0gYm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5kZWZpbmVkIH1dO1xuICAgIH0gZWxzZSBpZiAoaXNBcnJheShmaWx0ZXIpKSB7XG4gICAgICAgIG9iaktleXMgPSBmaWx0ZXI7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIGtleXMgPSBPYmplY3Qua2V5cyhvYmopO1xuICAgICAgICBvYmpLZXlzID0gc29ydCA/IGtleXMuc29ydChzb3J0KSA6IGtleXM7XG4gICAgfVxuXG4gICAgdmFyIGVuY29kZWRQcmVmaXggPSBlbmNvZGVEb3RJbktleXMgPyBwcmVmaXgucmVwbGFjZSgvXFwuL2csICclMkUnKSA6IHByZWZpeDtcblxuICAgIHZhciBhZGp1c3RlZFByZWZpeCA9IGNvbW1hUm91bmRUcmlwICYmIGlzQXJyYXkob2JqKSAmJiBvYmoubGVuZ3RoID09PSAxID8gZW5jb2RlZFByZWZpeCArICdbXScgOiBlbmNvZGVkUHJlZml4O1xuXG4gICAgaWYgKGFsbG93RW1wdHlBcnJheXMgJiYgaXNBcnJheShvYmopICYmIG9iai5sZW5ndGggPT09IDApIHtcbiAgICAgICAgcmV0dXJuIGFkanVzdGVkUHJlZml4ICsgJ1tdJztcbiAgICB9XG5cbiAgICBmb3IgKHZhciBqID0gMDsgaiA8IG9iaktleXMubGVuZ3RoOyArK2opIHtcbiAgICAgICAgdmFyIGtleSA9IG9iaktleXNbal07XG4gICAgICAgIHZhciB2YWx1ZSA9IHR5cGVvZiBrZXkgPT09ICdvYmplY3QnICYmIHR5cGVvZiBrZXkudmFsdWUgIT09ICd1bmRlZmluZWQnID8ga2V5LnZhbHVlIDogb2JqW2tleV07XG5cbiAgICAgICAgaWYgKHNraXBOdWxscyAmJiB2YWx1ZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgZW5jb2RlZEtleSA9IGFsbG93RG90cyAmJiBlbmNvZGVEb3RJbktleXMgPyBrZXkucmVwbGFjZSgvXFwuL2csICclMkUnKSA6I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XIpKSB7XG4gICAgICAgIGZpbHRlciA9IG9wdGlvbnMuZmlsdGVyO1xuICAgICAgICBvYmpLZXlzID0gZmlsdGVyO1xuICAgIH1cblxuICAgIHZhciBrZXlzID0gW107XG5cbiAgICBpZiAodHlwZW9mIG9iaiAhPT0gJ29iamVjdCcgfHwgb2JqID09PSBudWxsKSB7XG4gICAgICAgIHJldHVybiAnJztcbiAgICB9XG5cbiAgICB2YXIgZ2VuZXJhdGVBcnJheVByZWZpeCA9IGFycmF5UHJlZml4R2VuZXJhdG9yc1tvcHRpb25zLmFycmF5Rm9ybWF0XTtcbiAgICB2YXIgY29tbWFSb3VuZFRyaXAgPSBnZW5lcmF0ZUFycmF5UHJlZml4ID09PSAnY29tbWEnICYmIG9wdGlvbnMuY29tbWFSb3VuZFRyaXA7XG5cbiAgICBpZiAoIW9iaktleXMpIHtcbiAgICAgICAgb2JqS2V5cyA9IE9iamVjdC5rZXlzKG9iaik7XG4gICAgfVxuXG4gICAgaWYgKG9wdGlvbnMuc29ydCkge1xuICAgICAgICBvYmpLZXlzLnNvcnQob3B0aW9ucy5zb3J0KTtcbiAgICB9XG5cbiAgICB2YXIgc2lkZUNoYW5uZWwgPSBnZXRTaWRlQ2hhbm5lbCgpO1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgb2JqS2V5cy5sZW5ndGg7ICsraSkge1xuICAgICAgICB2YXIga2V5ID0gb2JqS2V5c1tpXTtcblxuICAgICAgICBpZiAob3B0aW9ucy5za2lwTnVsbHMgJiYgb2JqW2tleV0gPT09IG51bGwpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIHB1c2hUb0FycmF5KGtleXMsIHN0cmluZ2lmeShcbiAgICAgICAgICAgIG9ialtrZXldLFxuICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgZ2VuZXJhdGVBcnJheVByZWZpeCxcbiAgICAgICAgICAgIGNvbW1hUm91bmRUcmlwLFxuICAgICAgICAgICAgb3B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B7XG4gICAgICAgICAgICBzdHIgKz0gam9pbmVyO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBzdHI7XG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGJpbmQodGhhdCkge1xuICAgIHZhciB0YXJnZXQgPSB0aGlzO1xuICAgIGlmICh0eXBlb2YgdGFyZ2V0ICE9PSAnZnVuY3Rpb24nIHx8IHRvU3RyLmFwcGx5KHRhcmdldCkgIT09IGZ1bmNUeXBlKSB7XG4gICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoRVJST1JfTUVTU0FHRSArIHRhcmdldCk7XG4gICAgfVxuICAgIHZhciBhcmdzID0gc2xpY3koYXJndW1lbnRzLCAxKTtcblxuICAgIHZhciBib3VuZDtcbiAgICB2YXIgYmluZGVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICBpZiAodGhpcyBpbnN0YW5jZW9mIGJvdW5kKSB7XG4gICAgICAgICAgICB2YXIgcmVzdWx0ID0gdGFyZ2V0LmFwcGx5KFxuICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgY29uY2F0dHkoYXJncywgYXJndW1lbnRzKVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChPYmplY3QocmVzdWx0KSA9PT0gcmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0YXJnZXQuYXBwbHkoXG4gICAgICAgICAgICB0aGF0LFxuICAgICAgICAgICAgY29uY2F0dHkoYXJncywgYXJndW1lbnRzKVxuICAgICAgICApO1xuXG4gICAgfTtcblxuICAgIHZhciBib3VuZExlbmd0aCA9IG1heCgwLCB0YXJnZXQubGVuZ3RoIC0gYXJncy5sZW5ndGgpO1xuICAgIHZhciBib3VuZEFyZ3MgPSBbXTtcbiAgICBmb3I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AgICAgIHNlZW4ucHVzaChmcm9tKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobm9JbmRlbnQpIHtcbiAgICAgICAgICAgIHZhciBuZXdPcHRzID0ge1xuICAgICAgICAgICAgICAgIGRlcHRoOiBvcHRzLmRlcHRoXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgaWYgKGhhcyhvcHRzLCAncXVvdGVTdHlsZScpKSB7XG4gICAgICAgICAgICAgICAgbmV3T3B0cy5xdW90ZVN0eWxlID0gb3B0cy5xdW90ZVN0eWxlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGluc3BlY3RfKHZhbHVlLCBuZXdPcHRzLCBkZXB0aCArIDEsIHNlZW4pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBpbnNwZWN0Xyh2YWx1ZSwgb3B0cywgZGVwdGggKyAxLCBzZWVuKTtcbiAgICB9XG5cbiAgICBpZiAodHlwZW9mIG9iaiA9PT0gJ2Z1bmN0aW9uJyAmJiAhaXNSZWdFeHAob2JqKSkgeyAvLyBpbiBvbGRlciBlbmdpbmVzLCByZWdleGVzIGFyZSBjYWxsYWJsZVxuICAgICAgICB2YXIgbmFtZSA9IG5hbWVPZihvYmopO1xuICAgICAgICB2YXIga2V5cyA9IGFyck9iaktleXMob2JqLCBpbnNwZWN0KTtcbiAgICAgICAgcmV0dXJuICdbRnVuY3Rpb24nICsgKG5hbWUgPyAnOiAnICsgbmFtZSA6ICcgKGFub255bW91cyknKSArICddJyArIChrZXlzLmxlbmd0aCA+IDAgPyAnIHsgJyArICRqb2luLmNhbGwoa2V5cywgJywgJykgKyAnIH0nIDogJycpO1xuICAgIH1cbiAgICBpZiAoaXNTeW1ib2wob2JqKSkge1xuICAgICAgICB2YXIgc3ltU3RyaW5nID0gaGFzU2hhbW1lZFN5bWJvbHMgPyAkcmVwbGFjZS5jYWxsKFN0cmluZyhvYmopLCAvXihTeW1ib2xcXCguKlxcKSlfW14pXSokLywgJyQxJykgOiBzeW1Ub1N0cmluZy5jYWxsKG9iaik7XG4gICAgICAgIHJldHVybiB0eXBlb2Ygb2JqID09PSAnb2JqZWN0JyAmJiAhaGFzU2hhbW1lZFN5bWJvbHMgPyBtYXJrQm94ZWQoc3ltU3RyaW5nKSA6IHN5bVN0cmluZztcbiAgICB9XG4gICAgaWYgKGlzRWxlbWVudChvYmopKSB7XG4gICAgICAgIHZhciBzID0gJzwnICsgJHRvTG93ZXJDYXNlLmNhbGwoU3RyaW5nKG9iai5ub2RlTmFtZSkpO1xuICAgICAgICB2YXIgYXR0cnMgPSBvYmouYXR0cmlidXRlcyB8fCBbXTtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhdHRycy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgcyArPSAnICcgKyBhdHRyc1tpXS5uYW1lICsgJz0nICsgd3JhcFF1b3RlcyhxdW90ZShhdHRyc1tpXS52YWx1ZSksICdkb3VibGUnLCBvcHRzKTtcbiAgICAgICAgfVxuICAgICAgICBzICs9ICc+JztcbiAgICAgICAgaWYgKG9iai5jaGlsZE5vZGVzICYmIG9iai5jaGlsZE5vZGVzLmxlbmd0aCkgeyBzICs9ICcuLi4nOyB9XG4gICAgICAgIHMgKz0gJzwvJyArICR0b0xvd2VyQ2FzZS5jYWxsKFN0cmluZyhvYmoubm9kZU5hbWUpKSArICc+JztcbiAgICAgICAgcmV0dXJuIHM7XG4gICAgfVxuICAgIGlmIChpc0FycmF5KG9iaikpIHtcbiAgICAgICAgaWYgKG9iai5sZW5ndGggPT09IDApIHsgcmV0dXJuICdbXSc7IH1cbiAgICAgICAgdmFyIHhzID0gYXJyT2JqS2V5cyhvYmosIGluc3BlY3QpO1xuICAgICAgICBpZiAoaW5kZW50ICYmICFzaW5nbGVMaW5lVmFsdWVzKHhzKSkge1xuICAgICAgICAgICAgcmV0dXJuICdbJyArIGluZGVudGVkSm9pbih4cywgaW5kZW50KSArICddJztcbiAgICAgICAgfVxuICAgICAgICByZXR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gpO1xuICAgICAgICB9XG4gICAgfVxuICAgIGlmIChpc01hcChvYmopKSB7XG4gICAgICAgIHZhciBtYXBQYXJ0cyA9IFtdO1xuICAgICAgICBpZiAobWFwRm9yRWFjaCkge1xuICAgICAgICAgICAgbWFwRm9yRWFjaC5jYWxsKG9iaiwgZnVuY3Rpb24gKHZhbHVlLCBrZXkpIHtcbiAgICAgICAgICAgICAgICBtYXBQYXJ0cy5wdXNoKGluc3BlY3Qoa2V5LCBvYmosIHRydWUpICsgJyA9PiAnICsgaW5zcGVjdCh2YWx1ZSwgb2JqKSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gY29sbGVjdGlvbk9mKCdNYXAnLCBtYXBTaXplLmNhbGwob2JqKSwgbWFwUGFydHMsIGluZGVudCk7XG4gICAgfVxuICAgIGlmIChpc1NldChvYmopKSB7XG4gICAgICAgIHZhciBzZXRQYXJ0cyA9IFtdO1xuICAgICAgICBpZiAoc2V0Rm9yRWFjaCkge1xuICAgICAgICAgICAgc2V0Rm9yRWFjaC5jYWxsKG9iaiwgZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgc2V0UGFydHMucHVzaChpbnNwZWN0KHZhbHVlLCBvYmopKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjb2xsZWN0aW9uT2YoJ1NldCcsIHNldFNpemUuY2FsbChvYmopLCBzZXRQYXJ0cywgaW5kZW50KTtcbiAgICB9XG4gICAgaWYgKGlzV2Vha01hcChvYmopKSB7XG4gICAgICAgIHJldHVybiB3ZWFrQ29sbGVjdGlvbk9mKCdXZWFrTWFwJyk7XG4gICAgfVxuICAgIGlmIChpc1dlYWtTZXQob2JqKSkge1xuICAgICAgICByZXR1cm4gd2Vha0NvbGxlY3Rpb25PZignV2Vha1NldCcpO1xuICAgIH1cbiAgICBpZiAoaXNXZWFrUmVmKG9iaikpIHtcbiAgICAgICAgcmV0dXJu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51ZTsgfSAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLXJlc3RyaWN0ZWQtc3ludGF4LCBuby1jb250aW51ZVxuICAgICAgICBpZiAoaGFzU2hhbW1lZFN5bWJvbHMgJiYgc3ltTWFwWyckJyArIGtleV0gaW5zdGFuY2VvZiBTeW1ib2wpIHtcbiAgICAgICAgICAgIC8vIHRoaXMgaXMgdG8gcHJldmVudCBzaGFtbWVkIFN5bWJvbHMsIHdoaWNoIGFyZSBzdG9yZWQgYXMgc3RyaW5ncywgZnJvbSBiZWluZyBpbmNsdWRlZCBpbiB0aGUgc3RyaW5nIGtleSBzZWN0aW9uXG4gICAgICAgICAgICBjb250aW51ZTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1yZXN0cmljdGVkLXN5bnRheCwgbm8tY29udGludWVcbiAgICAgICAgfSBlbHNlIGlmICgkdGVzdC5jYWxsKC9bXlxcdyRdLywga2V5KSkge1xuICAgICAgICAgICAgeHMucHVzaChpbnNwZWN0KGtleSwgb2JqKSArICc6ICcgKyBpbnNwZWN0KG9ialtrZXldLCBvYmopKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHhzLnB1c2goa2V5ICsgJzogJyArIGluc3BlY3Qob2JqW2tleV0sIG9iaikpO1xuICAgICAgICB9XG4gICAgfVxuICAgIGlmICh0eXBlb2YgZ09QUyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IHN5bXMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIGlmIChpc0VudW1lcmFibGUuY2FsbChvYmosIHN5bXNbal0pKSB7XG4gICAgICAgICAgICAgICAgeHMucHVzaCgnWycgKyBpbnNwZWN0KHN5bXNbal0pICsgJ106ICcgKyBpbnNwZWN0KG9ialtzeW1zW2pdXSwgb2JqKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHhzO1xufVxuXG5cblx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vdW5kXG4gICAgdmFyIGk7XG5cbiAgICB2YXIgY2hhcnNldCA9IG9wdGlvbnMuY2hhcnNldDtcbiAgICBpZiAob3B0aW9ucy5jaGFyc2V0U2VudGluZWwpIHtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IHBhcnRzLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICBpZiAocGFydHNbaV0uaW5kZXhPZigndXRmOD0nKSA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGlmIChwYXJ0c1tpXSA9PT0gY2hhcnNldFNlbnRpbmVsKSB7XG4gICAgICAgICAgICAgICAgICAgIGNoYXJzZXQgPSAndXRmLTgnO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocGFydHNbaV0gPT09IGlzb1NlbnRpbmVsKSB7XG4gICAgICAgICAgICAgICAgICAgIGNoYXJzZXQgPSAnaXNvLTg4NTktMSc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHNraXBJbmRleCA9IGk7XG4gICAgICAgICAgICAgICAgaSA9IHBhcnRzLmxlbmd0aDsgLy8gVGhlIGVzbGludCBzZXR0aW5ncyBkbyBub3QgYWxsb3cgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmb3IgKGkgPSAwOyBpIDwgcGFydHMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgaWYgKGkgPT09IHNraXBJbmRleCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHBhcnQgPSBwYXJ0c1tpXTtcblxuICAgICAgICB2YXIgYnJhY2tldEVxdWFsc1BvcyA9IHBhcnQuaW5kZXhPZignXT0nKTtcbiAgICAgICAgdmFyIHBvcyA9IGJyYWNrZXRFcXVhbHNQb3MgPT09IC0xID8gcGFydC5pbmRleE9mKCc9JykgOiBicmFja2V0RXF1YWxzUG9zICsgMTtcblxuICAgICAgICB2YXIga2V5LCB2YWw7XG4gICAgICAgIGlmIChwb3MgPT09IC0xKSB7XG4gICAgICAgICAgICBrZXkgPSBvcHRpb25zLmRlY29kZXIocGFydCwgZGVmYXVsdHMuZGVjb2RlciwgY2hhcnNldCwgJ2tleScpO1xuICAgICAgICAgICAgdmFsID0gb3B0aW9ucy5zdHJpY3ROdWxsSGFuZGxpbmcgPyBudWxsIDogJyc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBrZXkgPSBvcHRpb25zLmRlY29kZXIocGFydC5zbGljZSgwLCBwb3MpLCBkZWZhdWx0cy5kZWNvZGVyLCBjaGFyc2V0LCAna2V5Jyk7XG4gICAgICAgICAgICB2YWwgPSB1dGlscy5tYXliZU1hcChcbiAgICAgICAgICAgICAgICBwYXJzZUFycmF5VmFsdWUocGFydC5zbGljZShwb3MgKyAxKSwgb3B0aW9ucyksXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGVuY29kZWRWYWwpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wdGlvbnMuZGVjb2RlcihlbmNvZGVkVmFsLCBkZWZhdWx0cy5kZWNvZGVyLCBjaGFyc2V0LCAndmFsdWUnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHZhbCAmJiBvcHRpb25zLmludGVycHJldE51bWVyaWNFbnRpdGllcyAmJiBjaGFyc2V0ID09PSAnaXNvLTg4NTktMScpIHtcbiAgICAgICAgICAgIHZhbCA9IGludGVycHJldE51bWVyaWNFbnRpdGllcyh2YWwpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHBhcnQuaW5kZXhPZignW109JykgPiAtMSkge1xuICAgICAgICAgICAgdmFsID0gaXNBcnJheSh2YWwpID8gW3ZhbF0gOiB2YWw7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgZXhpc3RpbmcgPSBoYXMuY2FsbChvYmosIGtleSk7XG4gICAgICAgIGlmIChleGlzdGluZyAmJiBvcHRp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ucy5kZWNvZGVEb3RJbktleXMgPyBjbGVhblJvb3QucmVwbGFjZSgvJTJFL2csICcuJykgOiBjbGVhblJvb3Q7XG4gICAgICAgICAgICB2YXIgaW5kZXggPSBwYXJzZUludChkZWNvZGVkUm9vdCwgMTApO1xuICAgICAgICAgICAgaWYgKCFvcHRpb25zLnBhcnNlQXJyYXlzICYmIGRlY29kZWRSb290ID09PSAnJykge1xuICAgICAgICAgICAgICAgIG9iaiA9IHsgMDogbGVhZiB9O1xuICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAhaXNOYU4oaW5kZXgpXG4gICAgICAgICAgICAgICAgJiYgcm9vdCAhPT0gZGVjb2RlZFJvb3RcbiAgICAgICAgICAgICAgICAmJiBTdHJpbmcoaW5kZXgpID09PSBkZWNvZGVkUm9vdFxuICAgICAgICAgICAgICAgICYmIGluZGV4ID49IDBcbiAgICAgICAgICAgICAgICAmJiAob3B0aW9ucy5wYXJzZUFycmF5cyAmJiBpbmRleCA8PSBvcHRpb25zLmFycmF5TGltaXQpXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBvYmogPSBbXTtcbiAgICAgICAgICAgICAgICBvYmpbaW5kZXhdID0gbGVhZjtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZGVjb2RlZFJvb3QgIT09ICdfX3Byb3RvX18nKSB7XG4gICAgICAgICAgICAgICAgb2JqW2RlY29kZWRSb290XSA9IGxlYWY7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBsZWFmID0gb2JqO1xuICAgIH1cblxuICAgIHJldHVybiBsZWFmO1xufTtcblxudmFyIHBhcnNlS2V5cyA9IGZ1bmN0aW9uIHBhcnNlUXVlcnlTdHJpbmdLZXlzKGdpdmVuS2V5LCB2YWwsIG9wdGlvbnMsIHZhbHVlc1BhcnNlZCkge1xuICAgIGlmICghZ2l2ZW5LZXkpIHtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIC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