@gravityforms/components
Version:
UI components for use in Gravity Forms development. Both React and vanilla js flavors.
19 lines (17 loc) • 3.82 MB
JavaScript
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (function() { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "../components/dist/js/entry/admin.js":
/*!**********************************************************!*\
!*** ../components/dist/js/entry/admin.js + 122 modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
"use strict";
eval("\n// EXTERNAL MODULE: ../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js\nvar defineProperty = __webpack_require__(\"../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n// EXTERNAL MODULE: ../../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules\nvar slicedToArray = __webpack_require__(\"../../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n// EXTERNAL MODULE: ../../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules\nvar toConsumableArray = __webpack_require__(\"../../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n// EXTERNAL MODULE: external [\"gform\",\"libraries\"]\nvar external_gform_libraries_ = __webpack_require__(\"@gravityforms/libraries\");\n// EXTERNAL MODULE: external [\"gform\",\"utils\"]\nvar external_gform_utils_ = __webpack_require__(\"@gravityforms/utils\");\n// EXTERNAL MODULE: ../components/react/admin/elements/Box/index.js\nvar Box = __webpack_require__(\"../components/react/admin/elements/Box/index.js\");\n// EXTERNAL MODULE: ../components/react/admin/elements/Input/index.js\nvar Input = __webpack_require__(\"../components/react/admin/elements/Input/index.js\");\n// EXTERNAL MODULE: ../components/react/admin/modules/Dropdown/index.js + 11 modules\nvar Dropdown = __webpack_require__(\"../components/react/admin/modules/Dropdown/index.js\");\n// EXTERNAL MODULE: ../components/react/admin/modules/Dropdown/CountryDropdown/index.js\nvar CountryDropdown = __webpack_require__(\"../components/react/admin/modules/Dropdown/CountryDropdown/index.js\");\n;// ../components/react/admin/modules/Address/index.js\n\n\n\nfunction 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; }\nfunction _objectSpread(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) { (0,defineProperty[\"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; }\n\n\n\n\n\n\nvar useState = external_gform_libraries_.React.useState,\n forwardRef = external_gform_libraries_.React.forwardRef;\nvar NEEDS_I18N_LABEL = 'Needs i18n';\n\n// Default layout configuration\nvar DEFAULT_LAYOUT_CONFIG = [{\n key: 'lineOne',\n width: 'full'\n}, {\n key: 'lineTwo',\n width: 'full'\n}, {\n key: 'city',\n width: 'half'\n}, {\n key: 'state',\n width: 'half'\n}, {\n key: 'postalCode',\n width: 'half'\n}, {\n key: 'country',\n width: 'half'\n}];\n\n// Helper function to sort regions based on preferredRegions\nvar sortRegions = function sortRegions(regions, preferred) {\n if (!preferred || !Array.isArray(preferred) || preferred.length === 0) {\n return (0,toConsumableArray[\"default\"])(regions);\n }\n var preferredItems = [];\n var otherItems = [];\n regions.forEach(function (region) {\n var index = preferred.indexOf(region.value);\n if (index !== -1) {\n preferredItems[index] = region;\n } else {\n otherItems.push(region);\n }\n });\n\n // Filter out any undefined slots and combine with other items\n return [].concat((0,toConsumableArray[\"default\"])(preferredItems.filter(function (item) {\n return item !== undefined;\n })), otherItems);\n};\nvar transformRegionCodes = function transformRegionCodes(inputObj) {\n var result = {};\n var _loop = function _loop(key) {\n if (Object.prototype.hasOwnProperty.call(inputObj, key)) {\n result[key] = Object.entries(inputObj[key]).map(function (_ref) {\n var _ref2 = (0,slicedToArray[\"default\"])(_ref, 2),\n value = _ref2[0],\n label = _ref2[1];\n if (key === 'countries') {\n return value;\n }\n return {\n value: value,\n label: label\n };\n });\n }\n };\n for (var key in inputObj) {\n _loop(key);\n }\n return result;\n};\n\n/**\n * @module Address\n * @description Renders an address component.\n *\n * @since 5.5.0\n *\n * @param {React.ReactNode|React.ReactNode[]} [children] - React element children\n * @param {Record<string, any>} [customAttributes] - Custom attributes for the component\n * @param {string|string[]|Record<string, boolean>} [customClasses] - Custom classes for the component\n * @param {Record<string, any>} [countryDropdownAttributes] - Attributes for the country dropdown\n * @param {string|string[]|Record<string, boolean>} [countryDropdownClasses] - Classes for the country dropdown\n * @param {Record<string, any>} [defaultData] - Default data for the component state\n * @param {string[]} [disabledFields] - Fields to disable in the component. Use the state keys: lineOne, lineTwo, city, state, postalCode, country\n * @param {Record<string, any>} [initialData] - Initial data for the component state\n * @param {Record<string, any>} [i18n] - Internationalization settings\n * @param {Function} [onChange] - Callback for when the component changes, returns the state\n * @param {Array<object>} [layout] - Custom layout for the address fields. Each object should have a 'key' (string: 'lineOne', 'lineTwo', 'city', 'state', 'postalCode', 'country') and an optional 'width' (string: 'full' or 'half'). Defaults to a standard layout if not provided or invalid.\n * @param {boolean} [parseRegionCodes] - Whether to parse region codes for the component\n * @param {Record<string, any>} [preferredRegions] - Preferred regions for the component: countries, usStates, caProvinces\n * @param {Record<string, any>} [regionCodes] - Region codes for the component\n * @param {string|number|string[]|Record<string, any>} [spacing=''] - The spacing for the component\n * @param {Record<string, any>} [stateDropdownAttributes] - Attributes for the state/province dropdown\n * @param {string|string[]|Record<string, boolean>} [stateDropdownClasses] - Classes for the state/province dropdown\n * @param {boolean} [useSelectPlaceholders] - Whether to use select placeholders for the dropdowns\n * @param {React.RefObject<HTMLElement>|null} ref - Ref to the component\n *\n * @return {JSX.Element} The Address component.\n *\n * @example\n * import Address from '@gravityforms/components/react/admin/modules/Address';\n *\n * // Basic usage with all fields\n * <Address\n * regionCodes={{\n * countries: [{ value: 'US', label: 'United States' }, { value: 'CA', label: 'Canada' }],\n * usStates: [{ value: 'CA', label: 'California' }, { value: 'NY', label: 'New York' }],\n * caProvinces: [{ value: 'ON', label: 'Ontario' }, { value: 'QC', label: 'Quebec' }]\n * }}\n * onChange={(data) => console.log(data)}\n * />\n *\n * // With preferred regions and initial data\n * <Address\n * regionCodes={{\n * countries: [{ value: 'US', label: 'United States' }, { value: 'CA', label: 'Canada' }],\n * usStates: [{ value: 'CA', label: 'California' }, { value: 'NY', label: 'New York' }],\n * caProvinces: [{ value: 'ON', label: 'Ontario' }, { value: 'QC', label: 'Quebec' }]\n * }}\n * preferredRegions={{\n * countries: ['CA', 'US'],\n * usStates: ['NY'],\n * caProvinces: ['QC']\n * }}\n * initialData={{\n * country: 'US',\n * state: 'CA',\n * city: 'San Francisco'\n * }}\n * />\n *\n * // With disabled fields\n * <Address\n * regionCodes={{\n * countries: [{ value: 'US', label: 'United States' }, { value: 'CA', label: 'Canada' }]\n * }}\n * disabledFields={['lineTwo', 'state']}\n * initialData={{ country: 'US' }}\n * />\n *\n * // With custom classes and spacing\n * <Address\n * regionCodes={{\n * countries: [{ value: 'US', label: 'United States' }]\n * }}\n * customClasses={['custom-address-class']}\n * spacing={4}\n * customAttributes={{ 'data-test': 'address-component' }}\n * >\n * <div>Additional content</div>\n * </Address>\n *\n * // With custom layout (e.g., country first, city and postal code on the same line)\n * <Address\n * regionCodes={{\n * countries: [{ value: 'US', label: 'United States' }, { value: 'CA', label: 'Canada' }],\n * usStates: [{ value: 'CA', label: 'California' }, { value: 'NY', label: 'New York' }],\n * }}\n * layout={[\n * { key: 'country', width: 'full' },\n * { key: 'lineOne', width: 'full' },\n * { key: 'lineTwo', width: 'full' },\n * { key: 'city', width: 'half' },\n * { key: 'postalCode', width: 'half' },\n * { key: 'state', width: 'full' }, // Example: State takes full width on its own row\n * ]}\n * onChange={(data) => console.log(data)}\n * />\n *\n */\nvar Address = forwardRef(function (_ref3, ref) {\n var _ref3$children = _ref3.children,\n children = _ref3$children === void 0 ? null : _ref3$children,\n _ref3$customAttribute = _ref3.customAttributes,\n customAttributes = _ref3$customAttribute === void 0 ? {} : _ref3$customAttribute,\n _ref3$customClasses = _ref3.customClasses,\n customClasses = _ref3$customClasses === void 0 ? [] : _ref3$customClasses,\n _ref3$countryDropdown = _ref3.countryDropdownAttributes,\n countryDropdownAttributes = _ref3$countryDropdown === void 0 ? {} : _ref3$countryDropdown,\n _ref3$countryDropdown2 = _ref3.countryDropdownClasses,\n countryDropdownClasses = _ref3$countryDropdown2 === void 0 ? [] : _ref3$countryDropdown2,\n _ref3$defaultData = _ref3.defaultData,\n defaultData = _ref3$defaultData === void 0 ? {} : _ref3$defaultData,\n _ref3$disabledFields = _ref3.disabledFields,\n disabledFields = _ref3$disabledFields === void 0 ? [] : _ref3$disabledFields,\n _ref3$initialData = _ref3.initialData,\n initialData = _ref3$initialData === void 0 ? {} : _ref3$initialData,\n _ref3$i18n = _ref3.i18n,\n i18n = _ref3$i18n === void 0 ? {} : _ref3$i18n,\n _ref3$language = _ref3.language,\n language = _ref3$language === void 0 ? 'en' : _ref3$language,\n _ref3$layout = _ref3.layout,\n layout = _ref3$layout === void 0 ? undefined : _ref3$layout,\n _ref3$onChange = _ref3.onChange,\n onChange = _ref3$onChange === void 0 ? function () {} : _ref3$onChange,\n _ref3$parseRegionCode = _ref3.parseRegionCodes,\n parseRegionCodes = _ref3$parseRegionCode === void 0 ? false : _ref3$parseRegionCode,\n _ref3$preferredRegion = _ref3.preferredRegions,\n preferredRegions = _ref3$preferredRegion === void 0 ? {} : _ref3$preferredRegion,\n _ref3$regionCodes = _ref3.regionCodes,\n regionCodes = _ref3$regionCodes === void 0 ? {} : _ref3$regionCodes,\n _ref3$spacing = _ref3.spacing,\n spacing = _ref3$spacing === void 0 ? '' : _ref3$spacing,\n _ref3$stateDropdownAt = _ref3.stateDropdownAttributes,\n stateDropdownAttributes = _ref3$stateDropdownAt === void 0 ? {} : _ref3$stateDropdownAt,\n _ref3$stateDropdownCl = _ref3.stateDropdownClasses,\n stateDropdownClasses = _ref3$stateDropdownCl === void 0 ? [] : _ref3$stateDropdownCl,\n _ref3$useSelectPlaceh = _ref3.useSelectPlaceholders,\n useSelectPlaceholders = _ref3$useSelectPlaceh === void 0 ? true : _ref3$useSelectPlaceh;\n var getInitialValue = function getInitialValue(field) {\n if (disabledFields.includes(field)) {\n return undefined;\n }\n return initialData[field] || defaultData[field] || '';\n };\n var _useState = useState(function () {\n return ['lineOne', 'lineTwo', 'city', 'state', 'postalCode', 'country'].reduce(function (carry, key) {\n return _objectSpread(_objectSpread({}, carry), {}, (0,defineProperty[\"default\"])({}, key, getInitialValue(key)));\n }, {});\n }),\n _useState2 = (0,slicedToArray[\"default\"])(_useState, 2),\n addressData = _useState2[0],\n setAddressData = _useState2[1];\n var _ref4 = parseRegionCodes ? transformRegionCodes(regionCodes) : regionCodes,\n _ref4$countries = _ref4.countries,\n countries = _ref4$countries === void 0 ? [] : _ref4$countries,\n _ref4$usStates = _ref4.usStates,\n usStates = _ref4$usStates === void 0 ? [] : _ref4$usStates,\n _ref4$caProvinces = _ref4.caProvinces,\n caProvinces = _ref4$caProvinces === void 0 ? [] : _ref4$caProvinces;\n var sortedUsStates = sortRegions(usStates, preferredRegions.usStates);\n var sortedCaProvinces = sortRegions(caProvinces, preferredRegions.caProvinces);\n var handleAddressChange = function handleAddressChange() {\n var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var newAddressData = _objectSpread(_objectSpread({}, addressData), data);\n setAddressData(newAddressData);\n var filteredData = Object.fromEntries(Object.entries(newAddressData).filter(function (_ref5) {\n var _ref6 = (0,slicedToArray[\"default\"])(_ref5, 1),\n key = _ref6[0];\n return !disabledFields.includes(key);\n }));\n onChange(filteredData);\n };\n var handleInputChange = function handleInputChange(field) {\n return function (value) {\n if (disabledFields.includes(field)) {\n return;\n }\n handleAddressChange((0,defineProperty[\"default\"])({}, field, value));\n };\n };\n var handleDropdownChange = function handleDropdownChange(field) {\n return function (event, regionCode) {\n if (disabledFields.includes(field)) {\n return;\n }\n handleAddressChange(_objectSpread((0,defineProperty[\"default\"])({}, field, regionCode.value), field === 'country' && !disabledFields.includes('state') && {\n state: ''\n }));\n };\n };\n var getStateLabelPlaceholder = function getStateLabelPlaceholder() {\n if (addressData.country === 'US') {\n return {\n label: i18n.stateLabel || NEEDS_I18N_LABEL,\n placeholder: i18n.statePlaceholder || NEEDS_I18N_LABEL\n };\n }\n if (addressData.country === 'CA') {\n return {\n label: i18n.provinceLabel || NEEDS_I18N_LABEL,\n placeholder: i18n.provincePlaceholder || NEEDS_I18N_LABEL\n };\n }\n return {\n label: i18n.stateProvinceLabel || NEEDS_I18N_LABEL,\n placeholder: i18n.stateProvincePlaceholder || NEEDS_I18N_LABEL\n };\n };\n var getPostalCodeLabelPlaceholder = function getPostalCodeLabelPlaceholder() {\n if (addressData.country === 'US') {\n return {\n label: i18n.zipCodeLabel || NEEDS_I18N_LABEL,\n placeholder: i18n.zipCodePlaceholder || NEEDS_I18N_LABEL\n };\n }\n if (addressData.country === 'CA') {\n return {\n label: i18n.postalCodeLabel || NEEDS_I18N_LABEL,\n placeholder: i18n.postalCodePlaceholder || NEEDS_I18N_LABEL\n };\n }\n return {\n label: i18n.zipPostalCodeLabel || NEEDS_I18N_LABEL,\n placeholder: i18n.zipPostalCodePlaceholder || NEEDS_I18N_LABEL\n };\n };\n var renderInputField = function renderInputField(key) {\n if (disabledFields.includes(key)) {\n return null;\n }\n var label = i18n[\"\".concat(key, \"Label\")] || NEEDS_I18N_LABEL;\n var placeholder = i18n[\"\".concat(key, \"Placeholder\")] || NEEDS_I18N_LABEL;\n if (key === 'state') {\n var _getStateLabelPlaceho = getStateLabelPlaceholder();\n label = _getStateLabelPlaceho.label;\n placeholder = _getStateLabelPlaceho.placeholder;\n } else if (key === 'postalCode') {\n var _getPostalCodeLabelPl = getPostalCodeLabelPlaceholder();\n label = _getPostalCodeLabelPl.label;\n placeholder = _getPostalCodeLabelPl.placeholder;\n }\n return /*#__PURE__*/external_gform_libraries_.React.createElement(Input[\"default\"], {\n key: key,\n labelAttributes: {\n label: label\n },\n value: addressData[key],\n onChange: handleInputChange(key),\n placeholder: placeholder\n });\n };\n var renderCountryField = function renderCountryField() {\n if (disabledFields.includes('country')) {\n return null;\n }\n if (countries.length === 0) {\n return renderInputField('country');\n }\n var countryDropdownProps = _objectSpread(_objectSpread({\n countries: countries,\n hasSearch: true,\n i18n: i18n,\n language: language,\n label: i18n.countryLabel || NEEDS_I18N_LABEL,\n onChange: handleDropdownChange('country'),\n popoverMaxHeight: 300,\n preferredCountries: preferredRegions.countries,\n size: 'r'\n }, countryDropdownAttributes), {}, {\n customClasses: (0,external_gform_libraries_.classnames)(_objectSpread({\n 'gform-address__country-dropdown': true\n }, countryDropdownClasses))\n });\n return /*#__PURE__*/external_gform_libraries_.React.createElement(CountryDropdown[\"default\"], countryDropdownProps);\n };\n var renderStateProvinceField = function renderStateProvinceField() {\n if (disabledFields.includes('state')) {\n return null;\n }\n if (addressData.country === 'US' && sortedUsStates.length > 0) {\n var listItems = useSelectPlaceholders ? [{\n label: i18n.stateSelectPlaceholder || NEEDS_I18N_LABEL,\n value: ''\n }].concat((0,toConsumableArray[\"default\"])(sortedUsStates)) : sortedUsStates;\n var stateDropdownProps = _objectSpread(_objectSpread({\n controlled: true,\n hasSearch: true,\n i18n: i18n,\n label: i18n.stateLabel || NEEDS_I18N_LABEL,\n listItems: listItems,\n onChange: handleDropdownChange('state'),\n popoverMaxHeight: 300,\n size: 'r',\n value: addressData.state\n }, stateDropdownAttributes), {}, {\n customClasses: (0,external_gform_libraries_.classnames)(_objectSpread({\n 'gform-address__state-province-dropdown': true\n }, stateDropdownClasses))\n });\n return /*#__PURE__*/external_gform_libraries_.React.createElement(Dropdown[\"default\"], stateDropdownProps);\n }\n if (addressData.country === 'CA' && sortedCaProvinces.length > 0) {\n var _listItems = useSelectPlaceholders ? [{\n label: i18n.provinceSelectPlaceholder || NEEDS_I18N_LABEL,\n value: ''\n }].concat((0,toConsumableArray[\"default\"])(sortedCaProvinces)) : sortedCaProvinces;\n var _stateDropdownProps = _objectSpread(_objectSpread({\n controlled: true,\n hasSearch: true,\n i18n: i18n,\n label: i18n.provinceLabel || NEEDS_I18N_LABEL,\n listItems: _listItems,\n onChange: handleDropdownChange('state'),\n popoverMaxHeight: 300,\n size: 'r',\n value: addressData.state\n }, stateDropdownAttributes), {}, {\n customClasses: (0,external_gform_libraries_.classnames)(_objectSpread({\n 'gform-address__state-province-dropdown': true\n }, stateDropdownClasses))\n });\n return /*#__PURE__*/external_gform_libraries_.React.createElement(Dropdown[\"default\"], _stateDropdownProps);\n }\n return renderInputField('state');\n };\n var attributes = _objectSpread({\n className: (0,external_gform_libraries_.classnames)(_objectSpread({\n 'gform-address': true\n }, (0,external_gform_utils_.spacerClasses)(spacing)), customClasses),\n ref: ref\n }, customAttributes);\n var fieldRenderers = {\n lineOne: renderInputField,\n lineTwo: renderInputField,\n city: renderInputField,\n state: renderStateProvinceField,\n postalCode: renderInputField,\n country: renderCountryField\n };\n var currentLayout = layout && Array.isArray(layout) && layout.length > 0 ? layout : DEFAULT_LAYOUT_CONFIG;\n\n // Filter out fields that are disabled or have unknown keys from the layout\n var activeLayout = currentLayout.filter(function (fieldConfig) {\n return fieldConfig && typeof fieldConfig.key === 'string' && !disabledFields.includes(fieldConfig.key) && Object.prototype.hasOwnProperty.call(fieldRenderers, fieldConfig.key);\n });\n return /*#__PURE__*/external_gform_libraries_.React.createElement(\"div\", attributes, activeLayout.map(function (_ref7) {\n var key = _ref7.key,\n _ref7$width = _ref7.width,\n width = _ref7$width === void 0 ? 'full' : _ref7$width;\n var fieldRenderer = fieldRenderers[key];\n // Already checked for existence in activeLayout filter, but good practice\n if (!fieldRenderer) {\n // eslint-disable-next-line no-console\n console.warn(\"Address component: No renderer found for key \\\"\".concat(key, \"\\\" in layout.\"));\n return null;\n }\n var fieldElement = fieldRenderer(key); // Pass key to renderInputField if it's the one being called\n if (!fieldElement) {\n return null;\n }\n return /*#__PURE__*/external_gform_libraries_.React.createElement(Box[\"default\"], {\n key: key,\n customClasses: ['gform-address__field', \"gform-address__field--\".concat(key.toLowerCase()), \"gform-address__field--\".concat(width.toLowerCase())]\n }, fieldElement);\n }), children);\n});\nAddress.displayName = 'Address';\n/* harmony default export */ var modules_Address = (Address);\n// EXTERNAL MODULE: ../../../node_modules/@babel/runtime/helpers/esm/extends.js\nvar esm_extends = __webpack_require__(\"../../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n;// ../../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js\nfunction _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\n\n// EXTERNAL MODULE: ../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js + 1 modules\nvar toPropertyKey = __webpack_require__(\"../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js\");\n;// ../../../node_modules/@babel/runtime/helpers/esm/createClass.js\n\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, (0,toPropertyKey[\"default\"])(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\n\n;// ../components/html/admin/elements/Alert/index.js\n\n\n\n\n\nfunction Alert_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; }\nfunction Alert_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? Alert_ownKeys(Object(t), !0).forEach(function (r) { (0,defineProperty[\"default\"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Alert_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n\n/**\n * @function alertTemplate\n * @description Generates the markup for an alert in the admin.\n *\n * @since 1.1.16\n *\n * @param {object} options The options for the component template.\n * @param {string} options.content The content of the alert.\n * @param {string} options.ctaLabel The label for the call-to-action button.\n * @param {string} options.ctaLink The link href for the call-to-action button.\n * @param {object} options.customAttributes Any custom attributes.\n * @param {Array} options.customClasses An array of additional classes for the toggle.\n * @param {string} options.dismissableAriaLabel The aria-label for the dismiss button.\n * @param {string} options.dismissableTitle The title for the dismiss button.\n * @param {boolean} options.hasCta Whether or not the alert has a call-to-action button.\n * @param {string} options.id Id for the alert, auto generated if not passed.\n * @param {boolean} options.isDismissable Whether or not the alert is dismissable.\n * @param {boolean} options.isInline Whether or not the alert is inline.\n * @param {string} options.selector The data-js selector string for the alert.\n * @param {string|number|Array|object} options.spacing The spacing for the component, string, number, object or array.\n * @param {string} options.theme Theme for the toggle, primary or cosmos.\n * @param {string} options.type The type of the alert. Default, notice, success, error and accessibility.\n *\n * @return {string}\n * @example\n * import { alertTemplate } from '@gravityforms/components/html/admin/elements/Alert';\n *\n * function Example() {\n * const alertTemplateHTML = alertTemplateTemplate( options );\n * document.body.insertAdjacentHTML( 'beforeend', alertTemplateHTML );\n * }\n *\n */\nvar alertTemplate = function alertTemplate(_ref) {\n var _ref$content = _ref.content,\n content = _ref$content === void 0 ? '' : _ref$content,\n _ref$ctaLabel = _ref.ctaLabel,\n ctaLabel = _ref$ctaLabel === void 0 ? '' : _ref$ctaLabel,\n _ref$ctaLink = _ref.ctaLink,\n ctaLink = _ref$ctaLink === void 0 ? '' : _ref$ctaLink,\n _ref$customAttributes = _ref.customAttributes,\n customAttributes = _ref$customAttributes === void 0 ? {} : _ref$customAttributes,\n _ref$customClasses = _ref.customClasses,\n customClasses = _ref$customClasses === void 0 ? [] : _ref$customClasses,\n _ref$dismissableAriaL = _ref.dismissableAriaLabel,\n dismissableAriaLabel = _ref$dismissableAriaL === void 0 ? '' : _ref$dismissableAriaL,\n _ref$dismissableTitle = _ref.dismissableTitle,\n dismissableTitle = _ref$dismissableTitle === void 0 ? '' : _ref$dismissableTitle,\n _ref$hasCta = _ref.hasCta,\n hasCta = _ref$hasCta === void 0 ? false : _ref$hasCta,\n _ref$id = _ref.id,\n id = _ref$id === void 0 ? (0,external_gform_utils_.uniqueId)('alert') : _ref$id,\n _ref$isDismissable = _ref.isDismissable,\n isDismissable = _ref$isDismissable === void 0 ? false : _ref$isDismissable,\n _ref$isInline = _ref.isInline,\n isInline = _ref$isInline === void 0 ? false : _ref$isInline,\n _ref$spacing = _ref.spacing,\n spacing = _ref$spacing === void 0 ? '' : _ref$spacing,\n _ref$theme = _ref.theme,\n theme = _ref$theme === void 0 ? 'primary' : _ref$theme,\n _ref$type = _ref.type,\n type = _ref$type === void 0 ? 'default' : _ref$type;\n var componentAttrs = (0,external_gform_utils_.objectToAttributes)(Alert_objectSpread(Alert_objectSpread({}, customAttributes), {}, {\n id: id,\n class: ['gform-alert', \"gform-alert--\".concat(type), \"gform-alert--theme-\".concat(theme), isInline && 'gform-alert--inline'].concat((0,toConsumableArray[\"default\"])(Object.keys((0,external_gform_utils_.spacerClasses)(spacing))), (0,toConsumableArray[\"default\"])(customClasses))\n }));\n var iconAttrs = (0,external_gform_utils_.objectToAttributes)({\n 'aria-hidden': 'true',\n class: ['gform-alert__icon', 'gform-icon', type === 'default' && 'gform-icon--campaign', type === 'notice' && 'gform-icon--circle-notice-fine', type === 'success' && 'gform-icon--circle-check-fine', type === 'error' && 'gform-icon--circle-error-fine', type === 'accessibility' && 'gform-icon--accessibility']\n });\n return \"\\n\\t\\t<div \".concat(componentAttrs, \">\\n\\t\\t\\t<span \").concat(iconAttrs, \"></span>\\n\\t\\t\\t<div class=\\\"gform-alert__message-wrap\\\">\\n\\t\\t\\t\\t<p class=\\\"gform-alert__message\\\">\").concat(content, \"</p>\\n\\t\\t\\t\\t\").concat(hasCta ? \"\\n\\t\\t\\t\\t\\t<a\\n\\t\\t\\t\\t\\t\\tclass=\\\"gform-alert__cta gform-button gform-button--white gform-button--size-xs\\\"\\n\\t\\t\\t\\t\\t\\thref=\\\"\".concat(ctaLink, \"\\\"\\n\\t\\t\\t\\t\\t\\ttarget=\\\"_blank\\\"\\n\\t\\t\\t\\t\\t\\ttitle=\\\"title for a11y\\\"\\n\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t\").concat(ctaLabel, \"\\n\\t\\t\\t\\t\\t</a>\\n\\t\\t\\t\\t\") : '', \"\\n\\t\\t\\t</div>\\n\\t\\t\\t\").concat(isDismissable ? \"\\n\\t\\t\\t\\t<button\\n\\t\\t\\t\\t\\tclass=\\\"gform-alert__dismiss\\\"\\n\\t\\t\\t\\t\\taria-label=\\\"\".concat(dismissableAriaLabel, \"\\\"\\n\\t\\t\\t\\t\\ttitle=\\\"\").concat(dismissableTitle, \"\\\"\\n\\t\\t\\t\\t\\tdata-js=\\\"gform-alert-dismiss-trigger\\\"\\n\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t<span class=\\\"gform-icon gform-icon--delete\\\"></span>\\n\\t\\t\\t\\t</button>\\n\\t\\t\\t\") : '', \"\\n\\t\\t</div>\\n\\t\");\n};\n\n/**\n * @class Alert\n * @description A alert component with 5 styles, default, notice, success, error and accessibility. It also allows for a cookie to store dismissed state.\n *\n * @since 1.1.16\n *\n * @borrows alertTemplate as alertTemplate\n *\n * @param {object} options The options for the component.\n * @param {string} options.content The content of the alert.\n * @param {string} options.ctaLabel The label for the call-to-action button.\n * @param {string} options.ctaLink The link href for the call-to-action button.\n * @param {object} options.customAttributes Any custom attributes for the component.\n * @param {Array} options.customClasses An array of additional classes for the component.\n * @param {string} options.dismissableAriaLabel The aria-label for the dismiss button.\n * @param {string} options.dismissableTitle The title for the dismiss button.\n * @param {boolean} options.hasCta Whether or not the alert has a call-to-action button.\n * @param {string} options.id Id for the component, auto generated if not passed.\n * @param {boolean} options.isDismissable Whether or not the alert is dismissable.\n * @param {boolean} options.isInline Whether or not the alert is inline.\n * @param {string} options.rendered Is the component already rendered in the dom, eg by php?\n * @param {string} options.renderOnInit Render the component on init of the class?\n * @param {string|number|Array|object} options.spacing Spacing for the component.\n * @param {string} options.target The target to render to. Any valid css selector string.\n * @param {string} options.targetPosition The insert position for the component relative to the target.\n * @param {string} options.theme Theme for the component, primary or cosmos.\n * @param {string} options.type The type of the alert. Default, notice, success, error and accessibility.\n *\n * @return {Class} The class instance.\n * @example\n * import Alert from '@gravityforms/components/html/admin/elements/Alert';\n *\n * function Example() {\n * const alertInstance = new Alert( {\n * content: 'This is an alert',\n * id: 'my-alert',\n * renderOnInit: false,\n * target: '#example-target',\n * targetPosition: 'beforeend',\n * type: 'error',\n * } );\n *\n * // Some time later we can render it. This is only done if we set renderOnInit to false.\n * // If true it will render on initialization.\n * alertInstance.init();\n * }\n *\n */\nvar Alert = /*#__PURE__*/function () {\n function Alert() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, Alert);\n this.options = {};\n (0,esm_extends[\"default\"])(this.options, {\n container: document,\n content: '',\n cookieName: '',\n ctaLabel: '',\n ctaLink: '',\n customAttributes: {},\n customClasses: [],\n dismissableAriaLabel: '',\n dismissableTitle: '',\n hasCta: false,\n id: (0,external_gform_utils_.uniqueId)('alert'),\n isDismissable: false,\n isInline: false,\n rendered: false,\n renderOnInit: true,\n spacing: '',\n target: '',\n targetPosition: 'afterbegin',\n theme: 'cosmos',\n type: 'default'\n }, options);\n\n /**\n * @event gform/alert/pre_init\n * @type {object}\n * @description Fired before the component has started any internal init functions. A great chance to augment the options.\n *\n * @since 1.1.16\n *\n * @property {object} instance The Component class instance.\n */\n (0,external_gform_utils_.trigger)({\n event: 'gform/alert/pre_init',\n native: false,\n data: {\n instance: this\n }\n });\n this.elements = {};\n if (this.options.renderOnInit) {\n this.init();\n }\n }\n\n /**\n * @memberof Alert\n * @description Renders the component into the dom.\n *\n * @since 1.1.16\n *\n * @return {void}\n */\n return _createClass(Alert, [{\n key: \"render\",\n value: function render() {\n var _this$options = this.options,\n rendered = _this$options.rendered,\n target = _this$options.target,\n targetPosition = _this$options.targetPosition;\n if (!rendered) {\n var renderTarget = (0,external_gform_utils_.getNode)(target, document, true);\n renderTarget.insertAdjacentHTML(targetPosition, alertTemplate(this.options));\n }\n this.elements.alert = (0,external_gform_utils_.getNode)(\"#\".concat(this.options.id), document, true);\n }\n\n /**\n * @param e\n * @memberof Alert\n * @description Dismiss the alert and store a cookie if name is set.\n *\n * @since 1.1.16\n *\n * @return {void}\n */\n }, {\n key: \"dismissAlert\",\n value: function dismissAlert(e) {\n var parentEl = (0,external_gform_utils_.getClosest)(e.target, \"#\".concat(this.options.id));\n parentEl.style.display = 'none';\n if (this.options.cookieName) {\n var cookieValue = (0,external_gform_utils_.uniqueId)('gform-alert');\n external_gform_utils_.cookieStorage.set(this.options.cookieName, cookieValue, 1, true);\n }\n }\n\n /**\n * @memberof Alert\n * @description Bind event listeners for the alert.\n *\n * @since 1.1.16\n *\n * @return {void}\n */\n }, {\n key: \"bindEvents\",\n value: function bindEvents() {\n (0,external_gform_utils_.delegate)(\"#\".concat(this.options.id), '[data-js=\"gform-alert-dismiss-trigger\"]', 'click', this.dismissAlert.bind(this));\n }\n\n /**\n * @memberof Alert\n * @description Initialize the component.\n *\n * @fires gform/alert/post_render\n *\n * @since 1.1.16\n *\n * @return {void}\n */\n }, {\n key: \"init\",\n value: function init() {\n this.bindEvents();\n this.render();\n\n /**\n * @event gform/alert/post_render\n * @type {object}\n * @description Fired when the component has completed rendering and all class init functions have completed.\n *\n * @since 1.1.16\n *\n * @property {object} instance The Component class instance.\n */\n (0,external_gform_utils_.trigger)({\n event: 'gform/alert/post_render',\n native: false,\n data: {\n instance: this\n }\n });\n (0,external_gform_utils_.consoleInfo)(\"Gravity Forms Admin: Initialized alert component.\");\n }\n }]);\n}();\n\n// EXTERNAL MODULE: ../components/react/admin/elements/Button/index.js\nvar Button = __webpack_require__(\"../components/react/admin/elements/Button/index.js\");\n// EXTERNAL MODULE: ../components/react/admin/elements/Icon/index.js\nvar Icon = __webpack_require__(\"../components/react/admin/elements/Icon/index.js\");\n;// ../components/react/admin/elements/Link/index.js\n\nfunction Link_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; }\nfunction Link_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? Link_ownKeys(Object(t), !0).forEach(function (r) { (0,defineProperty[\"default\"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Link_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n\nvar Link_forwardRef = external_gform_libraries_.React.forwardRef;\n\n/**\n * @module Link\n * @description A link component in React.\n *\n * @since 1.1.15\n *\n * @param {object} props Component props.\n * @param {JSX.Element|null} props.children React element children.\n * @param {string} props.content Text content for the link.\n * @param {object} props.customAttributes Custom attributes for the component.\n * @param {string|Array|object} props.customClasses Custom classes for the component.\n * @param {string} props.href The href attribute for the link.\n * @param {string|number|Array|object} props.spacing The spacing for the component, as a string, number, array, or object.\n * @param {string} props.target The target attribute for the link.\n * @param {boolean} props.underline Whether to underline the link.\n * @param {string} props.weight The weight for the component, as a string.\n * @param {object|null} ref Ref to the component.\n *\n * @return {JSX.Element} The link component.\n *\n * @example\n * import Link from '@gravityforms/components/react/admin/elements/Link';\n *\n * return <Link href=\"https://path.to.link/\" target=\"_blank\">{ 'Click me' }</Link>;\n *\n */\nvar Link = Link_forwardRef(function (_ref, ref) {\n var _ref$children = _ref.children,\n children = _ref$children === void 0 ? null : _ref$children,\n _ref$content = _ref.content,\n content = _ref$content === void 0 ? '' : _ref$content,\n _ref$customAttributes = _ref.customAttributes,\n customAttributes = _ref$customAttributes === void 0 ? {} : _ref$customAttributes,\n _ref$customClasses = _ref.customClasses,\n customClasses = _ref$customClasses === void 0 ? [] : _ref$customClasses,\n _ref$href = _ref.href,\n href = _ref$href === void 0 ? '' : _ref$href,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 'text-sm' : _ref$size,\n _ref$spacing = _ref.spacing,\n spacing = _ref$spacing === void 0 ? '' : _ref$spacing,\n _ref$target = _ref.target,\n target = _ref$target === void 0 ? '' : _ref$target,\n _ref$underline = _ref.underline,\n underline = _ref$underline === void 0 ? true : _ref$underline,\n _ref$weight = _ref.weight,\n weight = _ref$weight === void 0 ? 'regular' : _ref$weight;\n var componentProps = Link_objectSpread({\n className: (0,external_gform_libraries_.classnames)(Link_objectSpread((0,defineProperty[\"default\"])((0,defineProperty[\"default\"])((0,defineProperty[\"default\"])({\n 'gform-link': true\n }, \"gform-typography--size-\".concat(size), true), \"gform-typography--weight-\".concat(weight), true), 'gform-link--underline', underline), (0,external_gform_utils_.spacerClasses)(spacing)), customClasses),\n href: href,\n target: target,\n ref: ref\n }, customAttributes);\n if (target === '_blank') {\n componentProps.rel = 'noopener';\n }\n return /*#__PURE__*/external_gform_libraries_.React.createElement(\"a\", componentProps, content, children);\n});\nLink.propTypes = {\n children: external_gform_libraries_.PropTypes.oneOfType([external_gform_libraries_.PropTypes.arrayOf(external_gform_libraries_.PropTypes.node), external_gform_libraries_.PropTypes.node]),\n content: external_gform_libraries_.PropTypes.string,\n customAttributes: external_gform_libraries_.PropTypes.object,\n customClasses: external_gform_libraries_.PropTypes.oneOfType([external_gform_libraries_.PropTypes.string, external_gform_libraries_.PropTypes.array, external_gform_libraries_.PropTypes.object]),\n href: external_gform_libraries_.PropTypes.string,\n spacing: external_gform_libraries_.PropTypes.oneOfType([external_gform_libraries_.PropTypes.string, external_gform_libraries_.PropTypes.number, external_gform_libraries_.PropTypes.array, external_gform_libraries_.PropTypes.object]),\n target: external_gform_libraries_.PropTypes.string,\n underline: external_gform_libraries_.PropTypes.bool,\n weight: external_gform_libraries_.PropTypes.string\n};\nLink.displayName = 'Link';\n/* harmony default export */ var elements_Link = (Link);\n// EXTERNAL MODULE: ../components/react/admin/elements/Text/index.js\nvar Text = __webpack_require__(\"../components/react/admin/elements/Text/index.js\");\n;// ../components/react/admin/modules/Alert/index.js\n\n\nfunction modules_Alert_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; }\nfunction modules_Alert_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? modules_Alert_ownKeys(Object(t), !0).forEach(function (r) { (0,defineProperty[\"default\"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : modules_Alert_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n\n\n\n\n\nvar Alert_forwardRef = external_gform_libraries_.React.forwardRef,\n Alert_useState = external_gform_libraries_.React.useState;\n\n/**\n * @module Alert\n * @description An alert component with predefined types and many customization arguments.\n *\n * @since 2.1.0\n *\n * @param {object} props The props for the component template.\n * @param {JSX.Element} props.children React element children.\n * @param {string} props.content The content of the alert.\n * @param {object} props.contentCustomAttributes Custom attributes for the content.\n * @param {string|Array|object} props.contentCustomClasses Custom classes for the content.\n * @param {string} props.ctaLabel The label for the call-to-action button.\n * @param {string} props.ctaLink The link href for the call-to-action button.\n * @param {object} props.customAttributes Any custom attributes.\n * @param {string|Array|object} props.customClasses An array of additional classes for the toggle.\n * @param {string} props.customIcon An icon override for the defaults that are set based on type.\n * @param {string} props.customIconPrefix The prefix for the custom override.\n * @param {string} props.dismissableAriaLabel The aria-label for the dismiss button.\n * @param {string} props.dismissableTitle The title for the dismiss button.\n * @param {boolean} props.hasCta Whether or not the alert has a call-to-action button.\n * @param {string} props.id Id for the alert, auto generated if not passed.\n * @param {boolean} props.isDismissable Whether or not the alert is dismissable.\n * @param {boolean} props.isInline Whether or not the alert is inline.\n * @param {string|number|Array|object} props.spacing The spacing for the component, string, number, object or array.\n * @param {string} props.theme Theme for the alert, primary or cosmos.\n * @param {string} props.type The type of the alert. Default, notice, success, error and accessibility.\n * @param {object|null} ref Ref to the component.\n *\n * @return {JSX.Element} The alert component.\n *\n * @example\n * import Alert from '@gravityforms/components/react/admin/modules/Alert';\n * import Text from '@gravityforms/components/react/admin/elements/Text';\n *\n * return (\n * <Alert>\n * <Text content=\"Some text for my alert!\">\n * </Alert>\n * );\n *\n */\nvar Alert_Alert = Alert_forwardRef(function (_ref, ref) {\n var _ref$children = _ref.children,\n children = _ref$children === void 0 ? null : _ref$children,\n _ref$content = _ref.content,\n content = _ref$content === void 0 ? '' : _ref$content,\n _ref$contentCustomAtt = _ref.contentCustomAttributes,\n contentCustomAttributes = _ref$contentCustomAtt === void 0 ? {} : _ref$contentCustomAtt,\n _ref$contentCustomCla = _ref.contentCustomClasses,\n contentCustomClasses = _ref$contentCustomCla === void 0 ? [] : _ref$contentCustomCla,\n _ref$ctaLabel = _ref.ctaLabel,\n ctaLabel = _ref$ctaLabel === void 0 ? '' : _ref$ctaLabel,\n _ref$ctaLink = _ref.ctaLink,\n ctaLink = _ref$ctaLink === void 0 ? '' : _ref$ctaLink,\n _ref$customAttributes = _ref.customAttributes,\n customAttributes = _ref$customAttributes === void 0 ? {} : _ref$customAttributes,\n _ref$customClasses = _ref.customClasses,\n customClasses = _ref$customClasses === void 0 ? [] : _ref$customClasses,\n _ref$customIcon = _ref.customIcon,\n customIcon = _ref$customIcon === void 0 ? '' : _ref$customIcon,\n _ref$customIconPrefix = _ref.customIconPrefix,\n customIconPrefix = _ref$customIconPrefix === void 0 ? 'gravity-component-icon' : _ref$customIconPrefix,\n _ref$dismissableAriaL = _ref.dismissableAriaLabel,\n dismissableAriaLabel = _ref$dismissableAriaL === void 0 ? '' : _ref$dismissableAriaL,\n _ref$dismissableTitle = _ref.dismissableTitle,\n dismissableTitle = _ref$dismissableTitle === void 0 ? '' : _ref$dismissableTitle,\n _ref$hasCta = _ref.hasCta,\n hasCta = _ref$hasCta === void 0 ? false : _ref$hasCta,\n _ref$iconAttributes = _ref.iconAttributes,\n iconAttributes = _ref$iconAttributes === void 0 ? {} : _ref$iconAttributes,\n _ref$iconClasses = _ref.iconClasses,\n iconClasses = _ref$iconClasses === void 0 ? [] : _ref$iconClasses,\n _ref$isDismissable = _ref.isDismissable,\n isDismissable = _ref$isDismissable === void 0 ? false : _ref$isDismissable,\n _ref$isInline = _ref.isInline,\n isInline = _ref$isInline === void 0 ? false : _ref$isInline,\n _ref$spacing = _ref.spacing,\n spacing = _ref$spacing === void 0 ? '' : _ref$spacing,\n _ref$theme = _ref.theme,\n theme = _ref$theme === void 0 ? 'cosmos' : _ref$theme,\n _ref$type = _ref.type,\n type = _ref$type === void 0 ? 'default' : _ref$type;\n var _useState = Alert_useState(false),\n _useState2 = (0,slicedToArray[\"default\"])(_useState, 2),\n isDismissed = _useState2[0],\n setIsDismissed = _useState2[1];\n var attributes = modules_Alert_objectSpread({\n className: (0,external_gform_libraries_.classnames)(modules_Alert_objectSpread((0,defineProperty[\"default\"])((0,defineProperty[\"default\"])((0,defineProperty[\"default\"])({\n 'gform-alert': true\n }, \"gform-alert--\".concat(type), true), \"gform-alert--theme-\".concat(theme